@atlaskit/a2ui-catalog 2.1.0 → 2.3.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/README.md +3 -21
- package/catalogs/agentic-forge-v0_9-v1/catalog.json +225 -0
- package/dist/cjs/agentic-forge-v0_9/apis.js +2 -1
- package/dist/cjs/agentic-forge-v0_9/catalog-component-apis.js +3 -3
- package/dist/cjs/agentic-forge-v0_9/schemas.js +65 -2
- package/dist/cjs/catalog-json/catalog-definitions.js +22 -11
- package/dist/cjs/entry-points/agentic-forge-v0_9-apis.js +6 -0
- package/dist/cjs/entry-points/agentic-forge-v0_9-schemas.js +6 -0
- package/dist/es2019/agentic-forge-v0_9/apis.js +2 -1
- package/dist/es2019/agentic-forge-v0_9/catalog-component-apis.js +4 -4
- package/dist/es2019/agentic-forge-v0_9/schemas.js +64 -1
- package/dist/es2019/catalog-json/catalog-definitions.js +14 -3
- package/dist/es2019/entry-points/agentic-forge-v0_9-apis.js +1 -1
- package/dist/es2019/entry-points/agentic-forge-v0_9-schemas.js +1 -1
- package/dist/esm/agentic-forge-v0_9/apis.js +2 -1
- package/dist/esm/agentic-forge-v0_9/catalog-component-apis.js +4 -4
- package/dist/esm/agentic-forge-v0_9/schemas.js +64 -1
- package/dist/esm/catalog-json/catalog-definitions.js +14 -3
- package/dist/esm/entry-points/agentic-forge-v0_9-apis.js +1 -1
- package/dist/esm/entry-points/agentic-forge-v0_9-schemas.js +1 -1
- package/dist/types/agentic-forge-v0_9/apis.d.ts +2 -1
- package/dist/types/agentic-forge-v0_9/catalog-component-apis.d.ts +2 -2
- package/dist/types/agentic-forge-v0_9/schemas.d.ts +29 -0
- package/dist/types/agentic-forge-v0_9/types.d.ts +8 -5
- package/dist/types/catalog-json/catalog-definitions.d.ts +8 -3
- package/dist/types/entry-points/agentic-forge-v0_9-apis.d.ts +1 -1
- package/dist/types/entry-points/agentic-forge-v0_9-schemas.d.ts +1 -1
- package/dist/types/entry-points/agentic-forge-v0_9-types.d.ts +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -120,7 +120,9 @@ surfaces against it:
|
|
|
120
120
|
| `com.atlassian.agentic-jira/v0_9/v1` | `catalogs/agentic-jira-v0_9-v1/catalog.json` |
|
|
121
121
|
|
|
122
122
|
The files are generated from the Zod schemas with `@a2ui/web_core`'s own inline-catalog
|
|
123
|
-
conversion. Common types are bundled under `$defs`, so every `$ref` is local. The catalog
|
|
123
|
+
conversion. Common types are bundled under `$defs`, so every `$ref` is local. The catalog
|
|
124
|
+
package's Atlaskit documentation shows each public catalog with a JSON preview and copy
|
|
125
|
+
button. Catalogs marked `isPrivate` are still published here and omitted from that page.
|
|
124
126
|
|
|
125
127
|
Each document contains `catalogId`, `instructions` for the agent, `components` (one schema per
|
|
126
128
|
component name), and `$defs`. Client-side functions (for example `openUrl`) are not included yet,
|
|
@@ -267,23 +269,3 @@ The trailing `/v1` in the ID is the catalog's own major version: breaking
|
|
|
267
269
|
schema changes mint a new ID (`…/v2`) registered alongside `v1`, letting
|
|
268
270
|
catalog negotiation migrate surfaces with zero downtime (see the versioning
|
|
269
271
|
policy in `catalog-id.ts`).
|
|
270
|
-
|
|
271
|
-
## Agentic Forge v0.9 catalog (`com.atlassian.agentic-forge/v0_9/v1`)
|
|
272
|
-
|
|
273
|
-
A dedicated catalog shipped from `src/agentic-forge-v0_9/`. It is not a
|
|
274
|
-
superset of the ADS base catalog. Props are literal strings, not `{ path }`
|
|
275
|
-
bindings.
|
|
276
|
-
|
|
277
|
-
| Component | Modelled on |
|
|
278
|
-
|-----------|-------------|
|
|
279
|
-
| `ResultPanel` | Completed result with a heading and a summary. No actions. |
|
|
280
|
-
|
|
281
|
-
`title` and `summary` are required. `summary` keeps authored line breaks.
|
|
282
|
-
There is no action prop. This catalog is not published as a `catalog.json`
|
|
283
|
-
document.
|
|
284
|
-
|
|
285
|
-
Import via the `./agentic-forge-v0_9/*` subpaths (`schemas`, `apis`, `types`,
|
|
286
|
-
`catalog-id`, `catalog-component-apis`). The rendering catalog is assembled by
|
|
287
|
-
`@atlassian/a2ui-renderer-next/agentic-forge-v0_9/catalog` →
|
|
288
|
-
`createAgenticForgeCatalog()`. It is opt-in and is not registered on the
|
|
289
|
-
default Rovo catalog set.
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2019-09/schema",
|
|
3
|
+
"$comment": "Generated from @atlaskit/a2ui-catalog by `yarn workspace @atlaskit/a2ui-catalog codegen:catalog-json`. Do not edit by hand.",
|
|
4
|
+
"title": "Atlassian Agentic Forge A2UI catalog",
|
|
5
|
+
"description": "A dedicated Forge catalog. ResultPanel shows a completed result from a literal title and summary. MultipleChoice selects one or more options. It is not a superset of the ADS catalog.",
|
|
6
|
+
"catalogId": "com.atlassian.agentic-forge/v0_9/v1",
|
|
7
|
+
"instructions": "Send A2UI v0.9 messages, each with \"version\": \"v0.9\". Start with createSurface using this catalogId, then send updateComponents. This catalog contains ResultPanel and MultipleChoice. It is not a superset of the ADS catalog. ResultPanel is a completed result: set component to \"ResultPanel\" and provide title and summary as literal strings. summary keeps authored line breaks. Do not add actions, data-binding path objects, or child component ids to ResultPanel. MultipleChoice chooses one or more options. Set options to an array of { label, value }. Set value to a string array or a { \"path\": \"/json/pointer\" } binding; the renderer writes the selected values back to that path. style is \"select\" (default) or \"action\". Use updateDataModel to seed a bound MultipleChoice value. Do not invent other component names.",
|
|
8
|
+
"components": {
|
|
9
|
+
"MultipleChoice": {
|
|
10
|
+
"allOf": [
|
|
11
|
+
{ "$ref": "#/$defs/ComponentCommon" },
|
|
12
|
+
{
|
|
13
|
+
"properties": {
|
|
14
|
+
"component": { "const": "MultipleChoice" },
|
|
15
|
+
"options": {
|
|
16
|
+
"type": "array",
|
|
17
|
+
"items": {
|
|
18
|
+
"type": "object",
|
|
19
|
+
"properties": {
|
|
20
|
+
"label": {
|
|
21
|
+
"anyOf": [
|
|
22
|
+
{ "type": "string" },
|
|
23
|
+
{
|
|
24
|
+
"type": "object",
|
|
25
|
+
"properties": { "path": { "type": "string" } },
|
|
26
|
+
"required": ["path"],
|
|
27
|
+
"additionalProperties": false
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"description": "A literal string OR a `{ path }` JSON-pointer binding into the surface data model."
|
|
31
|
+
},
|
|
32
|
+
"value": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"description": "Stable identifier persisted to the data model."
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"required": ["label", "value"],
|
|
38
|
+
"additionalProperties": false
|
|
39
|
+
},
|
|
40
|
+
"description": "Available options."
|
|
41
|
+
},
|
|
42
|
+
"value": {
|
|
43
|
+
"anyOf": [
|
|
44
|
+
{ "type": "array", "items": { "type": "string" } },
|
|
45
|
+
{
|
|
46
|
+
"type": "object",
|
|
47
|
+
"properties": { "path": { "type": "string" } },
|
|
48
|
+
"required": ["path"],
|
|
49
|
+
"additionalProperties": false
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
"description": "Selected values. A string array, or { \"path\": \"/pointer\" } so the selection is written back. Read that path to see what was picked."
|
|
53
|
+
},
|
|
54
|
+
"label": {
|
|
55
|
+
"$ref": "#/components/MultipleChoice/allOf/1/properties/options/items/properties/label",
|
|
56
|
+
"description": "Visible group label."
|
|
57
|
+
},
|
|
58
|
+
"multiple": {
|
|
59
|
+
"type": "boolean",
|
|
60
|
+
"description": "Allow more than one selection. Defaults to false. Ignored when style is \"action\"."
|
|
61
|
+
},
|
|
62
|
+
"style": {
|
|
63
|
+
"type": "string",
|
|
64
|
+
"enum": ["select", "action"],
|
|
65
|
+
"description": "\"select\" (default) is a dropdown. \"action\" is a menu. Picking an item writes value and fires onChange."
|
|
66
|
+
},
|
|
67
|
+
"placeholder": {
|
|
68
|
+
"$ref": "#/components/MultipleChoice/allOf/1/properties/options/items/properties/label",
|
|
69
|
+
"description": "A literal string OR a `{ path }` JSON-pointer binding into the surface data model."
|
|
70
|
+
},
|
|
71
|
+
"disabled": {
|
|
72
|
+
"anyOf": [
|
|
73
|
+
{ "type": "boolean" },
|
|
74
|
+
{
|
|
75
|
+
"type": "object",
|
|
76
|
+
"properties": { "path": { "type": "string" } },
|
|
77
|
+
"required": ["path"],
|
|
78
|
+
"additionalProperties": false
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
"description": "A literal boolean OR a `{ path }` JSON-pointer binding into the surface data model."
|
|
82
|
+
},
|
|
83
|
+
"invalid": {
|
|
84
|
+
"$ref": "#/components/MultipleChoice/allOf/1/properties/disabled",
|
|
85
|
+
"description": "A literal boolean OR a `{ path }` JSON-pointer binding into the surface data model."
|
|
86
|
+
},
|
|
87
|
+
"filterable": {
|
|
88
|
+
"type": "boolean",
|
|
89
|
+
"description": "Show a search box in the dropdown. Defaults to true. Ignored when style is \"action\"."
|
|
90
|
+
},
|
|
91
|
+
"onChange": {
|
|
92
|
+
"anyOf": [
|
|
93
|
+
{
|
|
94
|
+
"type": "object",
|
|
95
|
+
"properties": {
|
|
96
|
+
"event": {
|
|
97
|
+
"type": "object",
|
|
98
|
+
"properties": {
|
|
99
|
+
"name": { "type": "string" },
|
|
100
|
+
"context": { "type": "object", "additionalProperties": {} }
|
|
101
|
+
},
|
|
102
|
+
"required": ["name"],
|
|
103
|
+
"additionalProperties": false
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"required": ["event"],
|
|
107
|
+
"additionalProperties": false
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"type": "object",
|
|
111
|
+
"properties": {
|
|
112
|
+
"functionCall": {
|
|
113
|
+
"type": "object",
|
|
114
|
+
"properties": {
|
|
115
|
+
"call": { "type": "string" },
|
|
116
|
+
"args": { "type": "object", "additionalProperties": {} },
|
|
117
|
+
"returnType": { "type": "string" }
|
|
118
|
+
},
|
|
119
|
+
"required": ["call", "args"],
|
|
120
|
+
"additionalProperties": false
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"required": ["functionCall"],
|
|
124
|
+
"additionalProperties": false
|
|
125
|
+
}
|
|
126
|
+
],
|
|
127
|
+
"description": "Fired after the selection is written to value. It has no arguments. Read the value path to see the choice, or put context on the action, for example { \"event\": { \"name\": \"picked\", \"context\": { \"from\": \"fruit-menu\" } } }."
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"required": ["component", "options", "value"]
|
|
131
|
+
}
|
|
132
|
+
]
|
|
133
|
+
},
|
|
134
|
+
"ResultPanel": {
|
|
135
|
+
"allOf": [
|
|
136
|
+
{ "$ref": "#/$defs/ComponentCommon" },
|
|
137
|
+
{
|
|
138
|
+
"properties": {
|
|
139
|
+
"component": { "const": "ResultPanel" },
|
|
140
|
+
"summary": {
|
|
141
|
+
"type": "string",
|
|
142
|
+
"minLength": 1,
|
|
143
|
+
"description": "Result body. Line breaks are shown as authored."
|
|
144
|
+
},
|
|
145
|
+
"title": {
|
|
146
|
+
"type": "string",
|
|
147
|
+
"minLength": 1,
|
|
148
|
+
"description": "Heading for the completed result."
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
"required": ["component", "summary", "title"]
|
|
152
|
+
}
|
|
153
|
+
]
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
"$defs": {
|
|
157
|
+
"AccessibilityAttributes": {
|
|
158
|
+
"type": "object",
|
|
159
|
+
"properties": {
|
|
160
|
+
"label": {
|
|
161
|
+
"$ref": "#/$defs/DynamicString",
|
|
162
|
+
"description": "A short string used by assistive technologies to convey the purpose of an element."
|
|
163
|
+
},
|
|
164
|
+
"description": {
|
|
165
|
+
"$ref": "#/$defs/DynamicString",
|
|
166
|
+
"description": "Additional information provided by assistive technologies about an element."
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
"additionalProperties": false,
|
|
170
|
+
"description": "Attributes to enhance accessibility."
|
|
171
|
+
},
|
|
172
|
+
"ComponentCommon": {
|
|
173
|
+
"type": "object",
|
|
174
|
+
"description": "Properties shared by every A2UI component.",
|
|
175
|
+
"properties": {
|
|
176
|
+
"id": { "$ref": "#/$defs/ComponentId" },
|
|
177
|
+
"accessibility": { "$ref": "#/$defs/AccessibilityAttributes" }
|
|
178
|
+
},
|
|
179
|
+
"required": ["id"]
|
|
180
|
+
},
|
|
181
|
+
"ComponentId": { "type": "string", "description": "The unique identifier for a component." },
|
|
182
|
+
"DataBinding": {
|
|
183
|
+
"type": "object",
|
|
184
|
+
"properties": {
|
|
185
|
+
"path": {
|
|
186
|
+
"type": "string",
|
|
187
|
+
"description": "A JSON Pointer path to a value in the data model."
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
"required": ["path"],
|
|
191
|
+
"additionalProperties": false,
|
|
192
|
+
"description": "A JSON Pointer path to a value in the data model."
|
|
193
|
+
},
|
|
194
|
+
"DynamicString": {
|
|
195
|
+
"anyOf": [
|
|
196
|
+
{ "type": "string" },
|
|
197
|
+
{
|
|
198
|
+
"$ref": "#/$defs/DataBinding",
|
|
199
|
+
"description": "A JSON Pointer path to a value in the data model."
|
|
200
|
+
},
|
|
201
|
+
{ "$ref": "#/$defs/FunctionCall", "description": "Invokes a named function on the client." }
|
|
202
|
+
],
|
|
203
|
+
"description": "Represents a string"
|
|
204
|
+
},
|
|
205
|
+
"FunctionCall": {
|
|
206
|
+
"type": "object",
|
|
207
|
+
"properties": {
|
|
208
|
+
"call": { "type": "string", "description": "The name of the function to call." },
|
|
209
|
+
"args": {
|
|
210
|
+
"type": "object",
|
|
211
|
+
"additionalProperties": {},
|
|
212
|
+
"description": "Arguments passed to the function."
|
|
213
|
+
},
|
|
214
|
+
"returnType": {
|
|
215
|
+
"type": "string",
|
|
216
|
+
"enum": ["string", "number", "boolean", "array", "object", "any", "void"],
|
|
217
|
+
"default": "boolean"
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
"required": ["call", "args"],
|
|
221
|
+
"additionalProperties": false,
|
|
222
|
+
"description": "Invokes a named function on the client."
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.ResultPanelApi = void 0;
|
|
6
|
+
exports.ResultPanelApi = exports.MultipleChoiceApi = void 0;
|
|
7
7
|
var _schemas = require("./schemas");
|
|
8
8
|
/* eslint-disable @atlaskit/volt-strict-mode/no-multiple-exports -- Catalog binding file: one named `XxxApi` export per component is the entire point (mirrors `../v0_9/apis.ts`). */
|
|
9
9
|
|
|
@@ -27,4 +27,5 @@ var apiOf = function apiOf(name, schema) {
|
|
|
27
27
|
schema: schema
|
|
28
28
|
};
|
|
29
29
|
};
|
|
30
|
+
var MultipleChoiceApi = exports.MultipleChoiceApi = apiOf('MultipleChoice', _schemas.MultipleChoiceSchema);
|
|
30
31
|
var ResultPanelApi = exports.ResultPanelApi = apiOf('ResultPanel', _schemas.ResultPanelSchema);
|
|
@@ -10,8 +10,8 @@ var _apis = require("./apis");
|
|
|
10
10
|
* (`com.atlassian.agentic-forge/v0_9/v1`).
|
|
11
11
|
*
|
|
12
12
|
* This is the React-free source of truth for catalog membership. The renderer's
|
|
13
|
-
* `createAgenticForgeCatalog()` must implement exactly these components
|
|
14
|
-
* catalog is
|
|
13
|
+
* `createAgenticForgeCatalog()` must implement exactly these components and the published
|
|
14
|
+
* `catalog.json` is generated from this list.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
var AGENTIC_FORGE_CATALOG_COMPONENT_APIS = exports.AGENTIC_FORGE_CATALOG_COMPONENT_APIS = [_apis.ResultPanelApi];
|
|
17
|
+
var AGENTIC_FORGE_CATALOG_COMPONENT_APIS = exports.AGENTIC_FORGE_CATALOG_COMPONENT_APIS = [_apis.MultipleChoiceApi, _apis.ResultPanelApi];
|
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.ResultPanelSchema = void 0;
|
|
6
|
+
exports.ResultPanelSchema = exports.MultipleChoiceSchema = void 0;
|
|
7
7
|
var _zod = require("zod");
|
|
8
|
+
/* eslint-disable @atlaskit/volt-strict-mode/no-multiple-exports -- Catalog schema file: one named `XxxSchema` export per component. Shared binding helpers stay co-located. */
|
|
9
|
+
|
|
8
10
|
/**
|
|
9
11
|
* Zod schemas for the Agentic Forge v0.9 catalog
|
|
10
12
|
* (`com.atlassian.agentic-forge/v0_9/v1`).
|
|
@@ -12,8 +14,42 @@ var _zod = require("zod");
|
|
|
12
14
|
* `ResultPanel` is a completed result: a heading and a summary. Both values
|
|
13
15
|
* are literals. There is no action prop. The host's tool-result envelope
|
|
14
16
|
* (`text`, `ui`, `completed`) stays outside this schema.
|
|
17
|
+
*
|
|
18
|
+
* `MultipleChoice` is a copy of the ADS v0.9 `MultipleChoice` contract so a
|
|
19
|
+
* Forge surface can ask for a selection without loading the ADS catalog.
|
|
15
20
|
*/
|
|
16
21
|
|
|
22
|
+
/**
|
|
23
|
+
* Action shape mirrored from the ADS catalog. The adapter casts a resolved
|
|
24
|
+
* action to `() => void` at call time.
|
|
25
|
+
*/
|
|
26
|
+
var ActionSchema = _zod.z.union([_zod.z.object({
|
|
27
|
+
event: _zod.z.object({
|
|
28
|
+
name: _zod.z.string(),
|
|
29
|
+
context: _zod.z.record(_zod.z.string(), _zod.z.unknown()).optional()
|
|
30
|
+
})
|
|
31
|
+
}), _zod.z.object({
|
|
32
|
+
functionCall: _zod.z.object({
|
|
33
|
+
call: _zod.z.string(),
|
|
34
|
+
args: _zod.z.record(_zod.z.string(), _zod.z.unknown()),
|
|
35
|
+
returnType: _zod.z.string().optional()
|
|
36
|
+
})
|
|
37
|
+
})]).describe('Action payload dispatched when the component is interacted with.');
|
|
38
|
+
var BooleanDynamicValueSchema = _zod.z.union([_zod.z.boolean(), _zod.z.object({
|
|
39
|
+
path: _zod.z.string()
|
|
40
|
+
})]).describe('A literal boolean OR a `{ path }` JSON-pointer binding into the surface data model.');
|
|
41
|
+
var StringBindingSchema = _zod.z.union([_zod.z.string(), _zod.z.object({
|
|
42
|
+
path: _zod.z.string()
|
|
43
|
+
})]).describe('A literal string OR a `{ path }` JSON-pointer binding into the surface data model.');
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Wire-level shape for a value that resolves to `string[]`.
|
|
47
|
+
* Pass `{ path }` for two-way state.
|
|
48
|
+
*/
|
|
49
|
+
var StringListDataBindingSchema = _zod.z.union([_zod.z.array(_zod.z.string()), _zod.z.object({
|
|
50
|
+
path: _zod.z.string()
|
|
51
|
+
})]).describe('JSON-pointer binding to a string array, or a literal `string[]`. Two-way bound for multi-select; the adapter writes the selected values back.');
|
|
52
|
+
|
|
17
53
|
/**
|
|
18
54
|
* Agentic Forge v0.9 `ResultPanel` schema.
|
|
19
55
|
*
|
|
@@ -23,4 +59,31 @@ var _zod = require("zod");
|
|
|
23
59
|
var ResultPanelSchema = exports.ResultPanelSchema = _zod.z.object({
|
|
24
60
|
summary: _zod.z.string().min(1).describe('Result body. Line breaks are shown as authored.'),
|
|
25
61
|
title: _zod.z.string().min(1).describe('Heading for the completed result.')
|
|
26
|
-
}).strict();
|
|
62
|
+
}).strict();
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Agentic Forge v0.9 `MultipleChoice` schema.
|
|
66
|
+
*
|
|
67
|
+
* Copied from the ADS v0.9 `MultipleChoice` contract (DSP-25085):
|
|
68
|
+
* - `style` omitted / `'select'`, `multiple: false` → single select
|
|
69
|
+
* - `style` omitted / `'select'`, `multiple: true` → multi select
|
|
70
|
+
* - `style: 'action'` → menu of actions
|
|
71
|
+
*
|
|
72
|
+
* `value` is always a string array, either as a literal or a `{ path }`
|
|
73
|
+
* binding. The adapter writes the selection back when `value` is bound.
|
|
74
|
+
*/
|
|
75
|
+
var MultipleChoiceSchema = exports.MultipleChoiceSchema = _zod.z.object({
|
|
76
|
+
options: _zod.z.array(_zod.z.object({
|
|
77
|
+
label: StringBindingSchema,
|
|
78
|
+
value: _zod.z.string().describe('Stable identifier persisted to the data model.')
|
|
79
|
+
})).describe('Available options.'),
|
|
80
|
+
value: StringListDataBindingSchema.describe('Selected values. A string array, or { "path": "/pointer" } so the selection is written back. Read that path to see what was picked.'),
|
|
81
|
+
label: StringBindingSchema.optional().describe('Visible group label.'),
|
|
82
|
+
multiple: _zod.z.boolean().optional().describe('Allow more than one selection. Defaults to false. Ignored when style is "action".'),
|
|
83
|
+
style: _zod.z.enum(['select', 'action']).optional().describe('"select" (default) is a dropdown. "action" is a menu. Picking an item writes value and fires onChange.'),
|
|
84
|
+
placeholder: StringBindingSchema.optional(),
|
|
85
|
+
disabled: BooleanDynamicValueSchema.optional(),
|
|
86
|
+
invalid: BooleanDynamicValueSchema.optional(),
|
|
87
|
+
filterable: _zod.z.boolean().optional().describe('Show a search box in the dropdown. Defaults to true. Ignored when style is "action".'),
|
|
88
|
+
onChange: ActionSchema.optional().describe('Fired after the selection is written to value. It has no arguments. Read the value path to see the choice, or put context on the action, for example { "event": { "name": "picked", "context": { "from": "fruit-menu" } } }.')
|
|
89
|
+
});
|
|
@@ -4,32 +4,43 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.CATALOG_DEFINITIONS = void 0;
|
|
7
|
-
var _catalogComponentApis = require("../agentic-
|
|
8
|
-
var _catalogId = require("../agentic-
|
|
9
|
-
var _catalogComponentApis2 = require("../v0_9/catalog-component-apis");
|
|
10
|
-
var _catalogId2 = require("../v0_9/catalog-id");
|
|
7
|
+
var _catalogComponentApis = require("../agentic-forge-v0_9/catalog-component-apis");
|
|
8
|
+
var _catalogId = require("../agentic-forge-v0_9/catalog-id");
|
|
9
|
+
var _catalogComponentApis2 = require("../agentic-jira-v0_9/catalog-component-apis");
|
|
10
|
+
var _catalogId2 = require("../agentic-jira-v0_9/catalog-id");
|
|
11
|
+
var _catalogComponentApis3 = require("../v0_9/catalog-component-apis");
|
|
12
|
+
var _catalogId3 = require("../v0_9/catalog-id");
|
|
11
13
|
/**
|
|
12
14
|
* Every A2UI catalog owned by this package. Each entry is published as a
|
|
13
15
|
* standalone `catalog.json` under `catalogs/<slug>/catalog.json`.
|
|
14
16
|
*
|
|
15
|
-
* Add new catalogs here: the generator
|
|
16
|
-
*
|
|
17
|
-
*
|
|
17
|
+
* Add new catalogs here: the generator and the drift test iterate this list,
|
|
18
|
+
* so a catalog that is not listed here has no published JSON. Set `isPrivate`
|
|
19
|
+
* to publish a catalog in the npm package while omitting it from public docs.
|
|
18
20
|
*/
|
|
19
21
|
|
|
20
22
|
var COMMON_INSTRUCTIONS = 'Send A2UI v0.9 messages, each with "version": "v0.9". Start with createSurface using this catalogId, then send updateComponents with a flat list of components. Each component needs a unique id and a component name from this catalog; reference children by id. Exactly one component must have the id "root". Use data bindings ({ "path": "/json/pointer" }) for values the user can change, and send updateDataModel to set initial values.';
|
|
23
|
+
var FORGE_INSTRUCTIONS = 'Send A2UI v0.9 messages, each with "version": "v0.9". Start with createSurface using this catalogId, then send updateComponents. This catalog contains ResultPanel and MultipleChoice. It is not a superset of the ADS catalog. ResultPanel is a completed result: set component to "ResultPanel" and provide title and summary as literal strings. summary keeps authored line breaks. Do not add actions, data-binding path objects, or child component ids to ResultPanel. MultipleChoice chooses one or more options. Set options to an array of { label, value }. Set value to a string array or a { "path": "/json/pointer" } binding; the renderer writes the selected values back to that path. style is "select" (default) or "action". Use updateDataModel to seed a bound MultipleChoice value. Do not invent other component names.';
|
|
21
24
|
var CATALOG_DEFINITIONS = exports.CATALOG_DEFINITIONS = [{
|
|
22
|
-
catalogId:
|
|
25
|
+
catalogId: _catalogId3.ADS_CATALOG_ID,
|
|
23
26
|
slug: 'ads-v0_9',
|
|
24
27
|
title: 'Atlassian Design System A2UI catalog',
|
|
25
28
|
description: 'A2UI v0.9 components rendered with the Atlassian Design System: text, layout, cards, inputs, and forms.',
|
|
26
29
|
instructions: COMMON_INSTRUCTIONS,
|
|
27
|
-
components:
|
|
30
|
+
components: _catalogComponentApis3.ADS_CATALOG_COMPONENT_APIS
|
|
28
31
|
}, {
|
|
29
|
-
catalogId:
|
|
32
|
+
catalogId: _catalogId2.AGENTIC_JIRA_CATALOG_ID,
|
|
30
33
|
slug: 'agentic-jira-v0_9-v1',
|
|
31
34
|
title: 'Atlassian Agentic Jira A2UI catalog',
|
|
32
35
|
description: 'Every ADS catalog component plus agentic-workflow components for Jira: code diffs, multiple-choice questions, repository picking, and tool approval.',
|
|
33
36
|
instructions: "".concat(COMMON_INSTRUCTIONS, " When producing code changes, use CodeDiff to display file-level diffs with each patch in unified diff format. For modified files, include oldText and newText when available so unchanged lines can be expanded. Set mode to \"compact\" for chat sidebars and \"full\" for full-screen views."),
|
|
34
|
-
components:
|
|
37
|
+
components: _catalogComponentApis2.AGENTIC_JIRA_CATALOG_COMPONENT_APIS
|
|
38
|
+
}, {
|
|
39
|
+
catalogId: _catalogId.AGENTIC_FORGE_CATALOG_ID,
|
|
40
|
+
slug: 'agentic-forge-v0_9-v1',
|
|
41
|
+
title: 'Atlassian Agentic Forge A2UI catalog',
|
|
42
|
+
isPrivate: true,
|
|
43
|
+
description: 'A dedicated Forge catalog. ResultPanel shows a completed result from a literal title and summary. MultipleChoice selects one or more options. It is not a superset of the ADS catalog.',
|
|
44
|
+
instructions: FORGE_INSTRUCTIONS,
|
|
45
|
+
components: _catalogComponentApis.AGENTIC_FORGE_CATALOG_COMPONENT_APIS
|
|
35
46
|
}];
|
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
Object.defineProperty(exports, "MultipleChoiceApi", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _apis.MultipleChoiceApi;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
6
12
|
Object.defineProperty(exports, "ResultPanelApi", {
|
|
7
13
|
enumerable: true,
|
|
8
14
|
get: function get() {
|
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
Object.defineProperty(exports, "MultipleChoiceSchema", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _schemas.MultipleChoiceSchema;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
6
12
|
Object.defineProperty(exports, "ResultPanelSchema", {
|
|
7
13
|
enumerable: true,
|
|
8
14
|
get: function get() {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
// Import from web_core (not @a2ui/react) so this package stays React-free.
|
|
10
10
|
|
|
11
|
-
import { ResultPanelSchema } from './schemas';
|
|
11
|
+
import { MultipleChoiceSchema, ResultPanelSchema } from './schemas';
|
|
12
12
|
/**
|
|
13
13
|
* Tiny factory: pairs a catalog `name` with its `schema`. The `name`
|
|
14
14
|
* parameter is restricted to the `AgenticForgeV09ComponentName` union — a
|
|
@@ -19,4 +19,5 @@ const apiOf = (name, schema) => ({
|
|
|
19
19
|
name,
|
|
20
20
|
schema
|
|
21
21
|
});
|
|
22
|
+
export const MultipleChoiceApi = apiOf('MultipleChoice', MultipleChoiceSchema);
|
|
22
23
|
export const ResultPanelApi = apiOf('ResultPanel', ResultPanelSchema);
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* (`com.atlassian.agentic-forge/v0_9/v1`).
|
|
4
4
|
*
|
|
5
5
|
* This is the React-free source of truth for catalog membership. The renderer's
|
|
6
|
-
* `createAgenticForgeCatalog()` must implement exactly these components
|
|
7
|
-
* catalog is
|
|
6
|
+
* `createAgenticForgeCatalog()` must implement exactly these components and the published
|
|
7
|
+
* `catalog.json` is generated from this list.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import { ResultPanelApi } from './apis';
|
|
11
|
-
export const AGENTIC_FORGE_CATALOG_COMPONENT_APIS = [ResultPanelApi];
|
|
10
|
+
import { MultipleChoiceApi, ResultPanelApi } from './apis';
|
|
11
|
+
export const AGENTIC_FORGE_CATALOG_COMPONENT_APIS = [MultipleChoiceApi, ResultPanelApi];
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/* eslint-disable @atlaskit/volt-strict-mode/no-multiple-exports -- Catalog schema file: one named `XxxSchema` export per component. Shared binding helpers stay co-located. */
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* Zod schemas for the Agentic Forge v0.9 catalog
|
|
3
5
|
* (`com.atlassian.agentic-forge/v0_9/v1`).
|
|
@@ -5,10 +7,44 @@
|
|
|
5
7
|
* `ResultPanel` is a completed result: a heading and a summary. Both values
|
|
6
8
|
* are literals. There is no action prop. The host's tool-result envelope
|
|
7
9
|
* (`text`, `ui`, `completed`) stays outside this schema.
|
|
10
|
+
*
|
|
11
|
+
* `MultipleChoice` is a copy of the ADS v0.9 `MultipleChoice` contract so a
|
|
12
|
+
* Forge surface can ask for a selection without loading the ADS catalog.
|
|
8
13
|
*/
|
|
9
14
|
|
|
10
15
|
import { z } from 'zod';
|
|
11
16
|
|
|
17
|
+
/**
|
|
18
|
+
* Action shape mirrored from the ADS catalog. The adapter casts a resolved
|
|
19
|
+
* action to `() => void` at call time.
|
|
20
|
+
*/
|
|
21
|
+
const ActionSchema = z.union([z.object({
|
|
22
|
+
event: z.object({
|
|
23
|
+
name: z.string(),
|
|
24
|
+
context: z.record(z.string(), z.unknown()).optional()
|
|
25
|
+
})
|
|
26
|
+
}), z.object({
|
|
27
|
+
functionCall: z.object({
|
|
28
|
+
call: z.string(),
|
|
29
|
+
args: z.record(z.string(), z.unknown()),
|
|
30
|
+
returnType: z.string().optional()
|
|
31
|
+
})
|
|
32
|
+
})]).describe('Action payload dispatched when the component is interacted with.');
|
|
33
|
+
const BooleanDynamicValueSchema = z.union([z.boolean(), z.object({
|
|
34
|
+
path: z.string()
|
|
35
|
+
})]).describe('A literal boolean OR a `{ path }` JSON-pointer binding into the surface data model.');
|
|
36
|
+
const StringBindingSchema = z.union([z.string(), z.object({
|
|
37
|
+
path: z.string()
|
|
38
|
+
})]).describe('A literal string OR a `{ path }` JSON-pointer binding into the surface data model.');
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Wire-level shape for a value that resolves to `string[]`.
|
|
42
|
+
* Pass `{ path }` for two-way state.
|
|
43
|
+
*/
|
|
44
|
+
const StringListDataBindingSchema = z.union([z.array(z.string()), z.object({
|
|
45
|
+
path: z.string()
|
|
46
|
+
})]).describe('JSON-pointer binding to a string array, or a literal `string[]`. Two-way bound for multi-select; the adapter writes the selected values back.');
|
|
47
|
+
|
|
12
48
|
/**
|
|
13
49
|
* Agentic Forge v0.9 `ResultPanel` schema.
|
|
14
50
|
*
|
|
@@ -18,4 +54,31 @@ import { z } from 'zod';
|
|
|
18
54
|
export const ResultPanelSchema = z.object({
|
|
19
55
|
summary: z.string().min(1).describe('Result body. Line breaks are shown as authored.'),
|
|
20
56
|
title: z.string().min(1).describe('Heading for the completed result.')
|
|
21
|
-
}).strict();
|
|
57
|
+
}).strict();
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Agentic Forge v0.9 `MultipleChoice` schema.
|
|
61
|
+
*
|
|
62
|
+
* Copied from the ADS v0.9 `MultipleChoice` contract (DSP-25085):
|
|
63
|
+
* - `style` omitted / `'select'`, `multiple: false` → single select
|
|
64
|
+
* - `style` omitted / `'select'`, `multiple: true` → multi select
|
|
65
|
+
* - `style: 'action'` → menu of actions
|
|
66
|
+
*
|
|
67
|
+
* `value` is always a string array, either as a literal or a `{ path }`
|
|
68
|
+
* binding. The adapter writes the selection back when `value` is bound.
|
|
69
|
+
*/
|
|
70
|
+
export const MultipleChoiceSchema = z.object({
|
|
71
|
+
options: z.array(z.object({
|
|
72
|
+
label: StringBindingSchema,
|
|
73
|
+
value: z.string().describe('Stable identifier persisted to the data model.')
|
|
74
|
+
})).describe('Available options.'),
|
|
75
|
+
value: StringListDataBindingSchema.describe('Selected values. A string array, or { "path": "/pointer" } so the selection is written back. Read that path to see what was picked.'),
|
|
76
|
+
label: StringBindingSchema.optional().describe('Visible group label.'),
|
|
77
|
+
multiple: z.boolean().optional().describe('Allow more than one selection. Defaults to false. Ignored when style is "action".'),
|
|
78
|
+
style: z.enum(['select', 'action']).optional().describe('"select" (default) is a dropdown. "action" is a menu. Picking an item writes value and fires onChange.'),
|
|
79
|
+
placeholder: StringBindingSchema.optional(),
|
|
80
|
+
disabled: BooleanDynamicValueSchema.optional(),
|
|
81
|
+
invalid: BooleanDynamicValueSchema.optional(),
|
|
82
|
+
filterable: z.boolean().optional().describe('Show a search box in the dropdown. Defaults to true. Ignored when style is "action".'),
|
|
83
|
+
onChange: ActionSchema.optional().describe('Fired after the selection is written to value. It has no arguments. Read the value path to see the choice, or put context on the action, for example { "event": { "name": "picked", "context": { "from": "fruit-menu" } } }.')
|
|
84
|
+
});
|
|
@@ -2,16 +2,19 @@
|
|
|
2
2
|
* Every A2UI catalog owned by this package. Each entry is published as a
|
|
3
3
|
* standalone `catalog.json` under `catalogs/<slug>/catalog.json`.
|
|
4
4
|
*
|
|
5
|
-
* Add new catalogs here: the generator
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* Add new catalogs here: the generator and the drift test iterate this list,
|
|
6
|
+
* so a catalog that is not listed here has no published JSON. Set `isPrivate`
|
|
7
|
+
* to publish a catalog in the npm package while omitting it from public docs.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
+
import { AGENTIC_FORGE_CATALOG_COMPONENT_APIS } from '../agentic-forge-v0_9/catalog-component-apis';
|
|
11
|
+
import { AGENTIC_FORGE_CATALOG_ID } from '../agentic-forge-v0_9/catalog-id';
|
|
10
12
|
import { AGENTIC_JIRA_CATALOG_COMPONENT_APIS } from '../agentic-jira-v0_9/catalog-component-apis';
|
|
11
13
|
import { AGENTIC_JIRA_CATALOG_ID } from '../agentic-jira-v0_9/catalog-id';
|
|
12
14
|
import { ADS_CATALOG_COMPONENT_APIS } from '../v0_9/catalog-component-apis';
|
|
13
15
|
import { ADS_CATALOG_ID } from '../v0_9/catalog-id';
|
|
14
16
|
const COMMON_INSTRUCTIONS = 'Send A2UI v0.9 messages, each with "version": "v0.9". Start with createSurface using this catalogId, then send updateComponents with a flat list of components. Each component needs a unique id and a component name from this catalog; reference children by id. Exactly one component must have the id "root". Use data bindings ({ "path": "/json/pointer" }) for values the user can change, and send updateDataModel to set initial values.';
|
|
17
|
+
const FORGE_INSTRUCTIONS = 'Send A2UI v0.9 messages, each with "version": "v0.9". Start with createSurface using this catalogId, then send updateComponents. This catalog contains ResultPanel and MultipleChoice. It is not a superset of the ADS catalog. ResultPanel is a completed result: set component to "ResultPanel" and provide title and summary as literal strings. summary keeps authored line breaks. Do not add actions, data-binding path objects, or child component ids to ResultPanel. MultipleChoice chooses one or more options. Set options to an array of { label, value }. Set value to a string array or a { "path": "/json/pointer" } binding; the renderer writes the selected values back to that path. style is "select" (default) or "action". Use updateDataModel to seed a bound MultipleChoice value. Do not invent other component names.';
|
|
15
18
|
export const CATALOG_DEFINITIONS = [{
|
|
16
19
|
catalogId: ADS_CATALOG_ID,
|
|
17
20
|
slug: 'ads-v0_9',
|
|
@@ -26,4 +29,12 @@ export const CATALOG_DEFINITIONS = [{
|
|
|
26
29
|
description: 'Every ADS catalog component plus agentic-workflow components for Jira: code diffs, multiple-choice questions, repository picking, and tool approval.',
|
|
27
30
|
instructions: `${COMMON_INSTRUCTIONS} When producing code changes, use CodeDiff to display file-level diffs with each patch in unified diff format. For modified files, include oldText and newText when available so unchanged lines can be expanded. Set mode to "compact" for chat sidebars and "full" for full-screen views.`,
|
|
28
31
|
components: AGENTIC_JIRA_CATALOG_COMPONENT_APIS
|
|
32
|
+
}, {
|
|
33
|
+
catalogId: AGENTIC_FORGE_CATALOG_ID,
|
|
34
|
+
slug: 'agentic-forge-v0_9-v1',
|
|
35
|
+
title: 'Atlassian Agentic Forge A2UI catalog',
|
|
36
|
+
isPrivate: true,
|
|
37
|
+
description: 'A dedicated Forge catalog. ResultPanel shows a completed result from a literal title and summary. MultipleChoice selects one or more options. It is not a superset of the ADS catalog.',
|
|
38
|
+
instructions: FORGE_INSTRUCTIONS,
|
|
39
|
+
components: AGENTIC_FORGE_CATALOG_COMPONENT_APIS
|
|
29
40
|
}];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/volt-strict-mode/no-re-exports -- subpath entry point; re-exporting the implementation module is its purpose */
|
|
2
2
|
|
|
3
|
-
export { ResultPanelApi } from '../agentic-forge-v0_9/apis';
|
|
3
|
+
export { MultipleChoiceApi, ResultPanelApi } from '../agentic-forge-v0_9/apis';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/volt-strict-mode/no-re-exports -- subpath entry point; re-exporting the implementation module is its purpose */
|
|
2
2
|
|
|
3
|
-
export { ResultPanelSchema } from '../agentic-forge-v0_9/schemas';
|
|
3
|
+
export { MultipleChoiceSchema, ResultPanelSchema } from '../agentic-forge-v0_9/schemas';
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
// Import from web_core (not @a2ui/react) so this package stays React-free.
|
|
10
10
|
|
|
11
|
-
import { ResultPanelSchema } from './schemas';
|
|
11
|
+
import { MultipleChoiceSchema, ResultPanelSchema } from './schemas';
|
|
12
12
|
/**
|
|
13
13
|
* Tiny factory: pairs a catalog `name` with its `schema`. The `name`
|
|
14
14
|
* parameter is restricted to the `AgenticForgeV09ComponentName` union — a
|
|
@@ -21,4 +21,5 @@ var apiOf = function apiOf(name, schema) {
|
|
|
21
21
|
schema: schema
|
|
22
22
|
};
|
|
23
23
|
};
|
|
24
|
+
export var MultipleChoiceApi = apiOf('MultipleChoice', MultipleChoiceSchema);
|
|
24
25
|
export var ResultPanelApi = apiOf('ResultPanel', ResultPanelSchema);
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* (`com.atlassian.agentic-forge/v0_9/v1`).
|
|
4
4
|
*
|
|
5
5
|
* This is the React-free source of truth for catalog membership. The renderer's
|
|
6
|
-
* `createAgenticForgeCatalog()` must implement exactly these components
|
|
7
|
-
* catalog is
|
|
6
|
+
* `createAgenticForgeCatalog()` must implement exactly these components and the published
|
|
7
|
+
* `catalog.json` is generated from this list.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import { ResultPanelApi } from './apis';
|
|
11
|
-
export var AGENTIC_FORGE_CATALOG_COMPONENT_APIS = [ResultPanelApi];
|
|
10
|
+
import { MultipleChoiceApi, ResultPanelApi } from './apis';
|
|
11
|
+
export var AGENTIC_FORGE_CATALOG_COMPONENT_APIS = [MultipleChoiceApi, ResultPanelApi];
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/* eslint-disable @atlaskit/volt-strict-mode/no-multiple-exports -- Catalog schema file: one named `XxxSchema` export per component. Shared binding helpers stay co-located. */
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* Zod schemas for the Agentic Forge v0.9 catalog
|
|
3
5
|
* (`com.atlassian.agentic-forge/v0_9/v1`).
|
|
@@ -5,10 +7,44 @@
|
|
|
5
7
|
* `ResultPanel` is a completed result: a heading and a summary. Both values
|
|
6
8
|
* are literals. There is no action prop. The host's tool-result envelope
|
|
7
9
|
* (`text`, `ui`, `completed`) stays outside this schema.
|
|
10
|
+
*
|
|
11
|
+
* `MultipleChoice` is a copy of the ADS v0.9 `MultipleChoice` contract so a
|
|
12
|
+
* Forge surface can ask for a selection without loading the ADS catalog.
|
|
8
13
|
*/
|
|
9
14
|
|
|
10
15
|
import { z } from 'zod';
|
|
11
16
|
|
|
17
|
+
/**
|
|
18
|
+
* Action shape mirrored from the ADS catalog. The adapter casts a resolved
|
|
19
|
+
* action to `() => void` at call time.
|
|
20
|
+
*/
|
|
21
|
+
var ActionSchema = z.union([z.object({
|
|
22
|
+
event: z.object({
|
|
23
|
+
name: z.string(),
|
|
24
|
+
context: z.record(z.string(), z.unknown()).optional()
|
|
25
|
+
})
|
|
26
|
+
}), z.object({
|
|
27
|
+
functionCall: z.object({
|
|
28
|
+
call: z.string(),
|
|
29
|
+
args: z.record(z.string(), z.unknown()),
|
|
30
|
+
returnType: z.string().optional()
|
|
31
|
+
})
|
|
32
|
+
})]).describe('Action payload dispatched when the component is interacted with.');
|
|
33
|
+
var BooleanDynamicValueSchema = z.union([z.boolean(), z.object({
|
|
34
|
+
path: z.string()
|
|
35
|
+
})]).describe('A literal boolean OR a `{ path }` JSON-pointer binding into the surface data model.');
|
|
36
|
+
var StringBindingSchema = z.union([z.string(), z.object({
|
|
37
|
+
path: z.string()
|
|
38
|
+
})]).describe('A literal string OR a `{ path }` JSON-pointer binding into the surface data model.');
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Wire-level shape for a value that resolves to `string[]`.
|
|
42
|
+
* Pass `{ path }` for two-way state.
|
|
43
|
+
*/
|
|
44
|
+
var StringListDataBindingSchema = z.union([z.array(z.string()), z.object({
|
|
45
|
+
path: z.string()
|
|
46
|
+
})]).describe('JSON-pointer binding to a string array, or a literal `string[]`. Two-way bound for multi-select; the adapter writes the selected values back.');
|
|
47
|
+
|
|
12
48
|
/**
|
|
13
49
|
* Agentic Forge v0.9 `ResultPanel` schema.
|
|
14
50
|
*
|
|
@@ -18,4 +54,31 @@ import { z } from 'zod';
|
|
|
18
54
|
export var ResultPanelSchema = z.object({
|
|
19
55
|
summary: z.string().min(1).describe('Result body. Line breaks are shown as authored.'),
|
|
20
56
|
title: z.string().min(1).describe('Heading for the completed result.')
|
|
21
|
-
}).strict();
|
|
57
|
+
}).strict();
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Agentic Forge v0.9 `MultipleChoice` schema.
|
|
61
|
+
*
|
|
62
|
+
* Copied from the ADS v0.9 `MultipleChoice` contract (DSP-25085):
|
|
63
|
+
* - `style` omitted / `'select'`, `multiple: false` → single select
|
|
64
|
+
* - `style` omitted / `'select'`, `multiple: true` → multi select
|
|
65
|
+
* - `style: 'action'` → menu of actions
|
|
66
|
+
*
|
|
67
|
+
* `value` is always a string array, either as a literal or a `{ path }`
|
|
68
|
+
* binding. The adapter writes the selection back when `value` is bound.
|
|
69
|
+
*/
|
|
70
|
+
export var MultipleChoiceSchema = z.object({
|
|
71
|
+
options: z.array(z.object({
|
|
72
|
+
label: StringBindingSchema,
|
|
73
|
+
value: z.string().describe('Stable identifier persisted to the data model.')
|
|
74
|
+
})).describe('Available options.'),
|
|
75
|
+
value: StringListDataBindingSchema.describe('Selected values. A string array, or { "path": "/pointer" } so the selection is written back. Read that path to see what was picked.'),
|
|
76
|
+
label: StringBindingSchema.optional().describe('Visible group label.'),
|
|
77
|
+
multiple: z.boolean().optional().describe('Allow more than one selection. Defaults to false. Ignored when style is "action".'),
|
|
78
|
+
style: z.enum(['select', 'action']).optional().describe('"select" (default) is a dropdown. "action" is a menu. Picking an item writes value and fires onChange.'),
|
|
79
|
+
placeholder: StringBindingSchema.optional(),
|
|
80
|
+
disabled: BooleanDynamicValueSchema.optional(),
|
|
81
|
+
invalid: BooleanDynamicValueSchema.optional(),
|
|
82
|
+
filterable: z.boolean().optional().describe('Show a search box in the dropdown. Defaults to true. Ignored when style is "action".'),
|
|
83
|
+
onChange: ActionSchema.optional().describe('Fired after the selection is written to value. It has no arguments. Read the value path to see the choice, or put context on the action, for example { "event": { "name": "picked", "context": { "from": "fruit-menu" } } }.')
|
|
84
|
+
});
|
|
@@ -2,16 +2,19 @@
|
|
|
2
2
|
* Every A2UI catalog owned by this package. Each entry is published as a
|
|
3
3
|
* standalone `catalog.json` under `catalogs/<slug>/catalog.json`.
|
|
4
4
|
*
|
|
5
|
-
* Add new catalogs here: the generator
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* Add new catalogs here: the generator and the drift test iterate this list,
|
|
6
|
+
* so a catalog that is not listed here has no published JSON. Set `isPrivate`
|
|
7
|
+
* to publish a catalog in the npm package while omitting it from public docs.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
+
import { AGENTIC_FORGE_CATALOG_COMPONENT_APIS } from '../agentic-forge-v0_9/catalog-component-apis';
|
|
11
|
+
import { AGENTIC_FORGE_CATALOG_ID } from '../agentic-forge-v0_9/catalog-id';
|
|
10
12
|
import { AGENTIC_JIRA_CATALOG_COMPONENT_APIS } from '../agentic-jira-v0_9/catalog-component-apis';
|
|
11
13
|
import { AGENTIC_JIRA_CATALOG_ID } from '../agentic-jira-v0_9/catalog-id';
|
|
12
14
|
import { ADS_CATALOG_COMPONENT_APIS } from '../v0_9/catalog-component-apis';
|
|
13
15
|
import { ADS_CATALOG_ID } from '../v0_9/catalog-id';
|
|
14
16
|
var COMMON_INSTRUCTIONS = 'Send A2UI v0.9 messages, each with "version": "v0.9". Start with createSurface using this catalogId, then send updateComponents with a flat list of components. Each component needs a unique id and a component name from this catalog; reference children by id. Exactly one component must have the id "root". Use data bindings ({ "path": "/json/pointer" }) for values the user can change, and send updateDataModel to set initial values.';
|
|
17
|
+
var FORGE_INSTRUCTIONS = 'Send A2UI v0.9 messages, each with "version": "v0.9". Start with createSurface using this catalogId, then send updateComponents. This catalog contains ResultPanel and MultipleChoice. It is not a superset of the ADS catalog. ResultPanel is a completed result: set component to "ResultPanel" and provide title and summary as literal strings. summary keeps authored line breaks. Do not add actions, data-binding path objects, or child component ids to ResultPanel. MultipleChoice chooses one or more options. Set options to an array of { label, value }. Set value to a string array or a { "path": "/json/pointer" } binding; the renderer writes the selected values back to that path. style is "select" (default) or "action". Use updateDataModel to seed a bound MultipleChoice value. Do not invent other component names.';
|
|
15
18
|
export var CATALOG_DEFINITIONS = [{
|
|
16
19
|
catalogId: ADS_CATALOG_ID,
|
|
17
20
|
slug: 'ads-v0_9',
|
|
@@ -26,4 +29,12 @@ export var CATALOG_DEFINITIONS = [{
|
|
|
26
29
|
description: 'Every ADS catalog component plus agentic-workflow components for Jira: code diffs, multiple-choice questions, repository picking, and tool approval.',
|
|
27
30
|
instructions: "".concat(COMMON_INSTRUCTIONS, " When producing code changes, use CodeDiff to display file-level diffs with each patch in unified diff format. For modified files, include oldText and newText when available so unchanged lines can be expanded. Set mode to \"compact\" for chat sidebars and \"full\" for full-screen views."),
|
|
28
31
|
components: AGENTIC_JIRA_CATALOG_COMPONENT_APIS
|
|
32
|
+
}, {
|
|
33
|
+
catalogId: AGENTIC_FORGE_CATALOG_ID,
|
|
34
|
+
slug: 'agentic-forge-v0_9-v1',
|
|
35
|
+
title: 'Atlassian Agentic Forge A2UI catalog',
|
|
36
|
+
isPrivate: true,
|
|
37
|
+
description: 'A dedicated Forge catalog. ResultPanel shows a completed result from a literal title and summary. MultipleChoice selects one or more options. It is not a superset of the ADS catalog.',
|
|
38
|
+
instructions: FORGE_INSTRUCTIONS,
|
|
39
|
+
components: AGENTIC_FORGE_CATALOG_COMPONENT_APIS
|
|
29
40
|
}];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/volt-strict-mode/no-re-exports -- subpath entry point; re-exporting the implementation module is its purpose */
|
|
2
2
|
|
|
3
|
-
export { ResultPanelApi } from '../agentic-forge-v0_9/apis';
|
|
3
|
+
export { MultipleChoiceApi, ResultPanelApi } from '../agentic-forge-v0_9/apis';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/volt-strict-mode/no-re-exports -- subpath entry point; re-exporting the implementation module is its purpose */
|
|
2
2
|
|
|
3
|
-
export { ResultPanelSchema } from '../agentic-forge-v0_9/schemas';
|
|
3
|
+
export { MultipleChoiceSchema, ResultPanelSchema } from '../agentic-forge-v0_9/schemas';
|
|
@@ -4,5 +4,6 @@
|
|
|
4
4
|
* `createComponentImplementation(api, RenderFn)`.
|
|
5
5
|
*/
|
|
6
6
|
import type { ComponentApi } from '@a2ui/web_core/v0_9';
|
|
7
|
-
import { ResultPanelSchema } from './schemas';
|
|
7
|
+
import { MultipleChoiceSchema, ResultPanelSchema } from './schemas';
|
|
8
|
+
export declare const MultipleChoiceApi: ComponentApi<typeof MultipleChoiceSchema>;
|
|
8
9
|
export declare const ResultPanelApi: ComponentApi<typeof ResultPanelSchema>;
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* (`com.atlassian.agentic-forge/v0_9/v1`).
|
|
4
4
|
*
|
|
5
5
|
* This is the React-free source of truth for catalog membership. The renderer's
|
|
6
|
-
* `createAgenticForgeCatalog()` must implement exactly these components
|
|
7
|
-
* catalog is
|
|
6
|
+
* `createAgenticForgeCatalog()` must implement exactly these components and the published
|
|
7
|
+
* `catalog.json` is generated from this list.
|
|
8
8
|
*/
|
|
9
9
|
import type { ComponentApi } from '@a2ui/web_core/v0_9';
|
|
10
10
|
export declare const AGENTIC_FORGE_CATALOG_COMPONENT_APIS: ReadonlyArray<ComponentApi>;
|
|
@@ -5,6 +5,9 @@
|
|
|
5
5
|
* `ResultPanel` is a completed result: a heading and a summary. Both values
|
|
6
6
|
* are literals. There is no action prop. The host's tool-result envelope
|
|
7
7
|
* (`text`, `ui`, `completed`) stays outside this schema.
|
|
8
|
+
*
|
|
9
|
+
* `MultipleChoice` is a copy of the ADS v0.9 `MultipleChoice` contract so a
|
|
10
|
+
* Forge surface can ask for a selection without loading the ADS catalog.
|
|
8
11
|
*/
|
|
9
12
|
import { z } from 'zod';
|
|
10
13
|
/**
|
|
@@ -17,3 +20,29 @@ export declare const ResultPanelSchema: z.ZodObject<{
|
|
|
17
20
|
summary: z.ZodString;
|
|
18
21
|
title: z.ZodString;
|
|
19
22
|
}, 'strict'>;
|
|
23
|
+
/**
|
|
24
|
+
* Agentic Forge v0.9 `MultipleChoice` schema.
|
|
25
|
+
*
|
|
26
|
+
* Copied from the ADS v0.9 `MultipleChoice` contract (DSP-25085):
|
|
27
|
+
* - `style` omitted / `'select'`, `multiple: false` → single select
|
|
28
|
+
* - `style` omitted / `'select'`, `multiple: true` → multi select
|
|
29
|
+
* - `style: 'action'` → menu of actions
|
|
30
|
+
*
|
|
31
|
+
* `value` is always a string array, either as a literal or a `{ path }`
|
|
32
|
+
* binding. The adapter writes the selection back when `value` is bound.
|
|
33
|
+
*/
|
|
34
|
+
export declare const MultipleChoiceSchema: z.ZodObject<{
|
|
35
|
+
disabled: z.ZodOptional<z.ZodType>;
|
|
36
|
+
filterable: z.ZodOptional<z.ZodBoolean>;
|
|
37
|
+
invalid: z.ZodOptional<z.ZodType>;
|
|
38
|
+
label: z.ZodOptional<z.ZodType>;
|
|
39
|
+
multiple: z.ZodOptional<z.ZodBoolean>;
|
|
40
|
+
onChange: z.ZodOptional<z.ZodType>;
|
|
41
|
+
options: z.ZodArray<z.ZodObject<{
|
|
42
|
+
label: z.ZodType;
|
|
43
|
+
value: z.ZodString;
|
|
44
|
+
}>>;
|
|
45
|
+
placeholder: z.ZodOptional<z.ZodType>;
|
|
46
|
+
style: z.ZodOptional<z.ZodEnum<['select', 'action']>>;
|
|
47
|
+
value: z.ZodType;
|
|
48
|
+
}>;
|
|
@@ -3,21 +3,24 @@
|
|
|
3
3
|
* (`com.atlassian.agentic-forge/v0_9/v1`).
|
|
4
4
|
*/
|
|
5
5
|
import type { z } from 'zod';
|
|
6
|
-
import type { ResultPanelSchema } from './schemas';
|
|
6
|
+
import type { MultipleChoiceSchema, ResultPanelSchema } from './schemas';
|
|
7
|
+
export type AgenticForgeV09MultipleChoiceProps = z.infer<typeof MultipleChoiceSchema>;
|
|
7
8
|
export type AgenticForgeV09ResultPanelProps = z.infer<typeof ResultPanelSchema>;
|
|
8
9
|
/**
|
|
9
10
|
* One flat `updateComponents` entry for this catalog, the shape
|
|
10
11
|
* `createSurface({ components })` accepts. `component` is the catalog name
|
|
11
12
|
* and the remaining fields are that component's props.
|
|
12
13
|
*/
|
|
13
|
-
export type AgenticForgeV09ComponentInstance = {
|
|
14
|
+
export type AgenticForgeV09ComponentInstance = ({
|
|
15
|
+
component: 'MultipleChoice';
|
|
16
|
+
id: string;
|
|
17
|
+
} & AgenticForgeV09MultipleChoiceProps) | {
|
|
14
18
|
component: 'ResultPanel';
|
|
15
19
|
id: string;
|
|
16
20
|
summary: AgenticForgeV09ResultPanelProps['summary'];
|
|
17
21
|
title: AgenticForgeV09ResultPanelProps['title'];
|
|
18
22
|
};
|
|
19
23
|
/**
|
|
20
|
-
* Component names registered by this catalog.
|
|
21
|
-
* added as concrete needs arise.
|
|
24
|
+
* Component names registered by this catalog.
|
|
22
25
|
*/
|
|
23
|
-
export type AgenticForgeV09ComponentName = 'ResultPanel';
|
|
26
|
+
export type AgenticForgeV09ComponentName = 'MultipleChoice' | 'ResultPanel';
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Every A2UI catalog owned by this package. Each entry is published as a
|
|
3
3
|
* standalone `catalog.json` under `catalogs/<slug>/catalog.json`.
|
|
4
4
|
*
|
|
5
|
-
* Add new catalogs here: the generator
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* Add new catalogs here: the generator and the drift test iterate this list,
|
|
6
|
+
* so a catalog that is not listed here has no published JSON. Set `isPrivate`
|
|
7
|
+
* to publish a catalog in the npm package while omitting it from public docs.
|
|
8
8
|
*/
|
|
9
9
|
import type { ComponentApi } from '@a2ui/web_core/v0_9';
|
|
10
10
|
export type CatalogDefinition = {
|
|
@@ -14,6 +14,11 @@ export type CatalogDefinition = {
|
|
|
14
14
|
description: string;
|
|
15
15
|
/** Guidance for agents authoring surfaces against this catalog. */
|
|
16
16
|
instructions: string;
|
|
17
|
+
/**
|
|
18
|
+
* When true, the catalog JSON is still published in the npm package and
|
|
19
|
+
* omitted from public documentation.
|
|
20
|
+
*/
|
|
21
|
+
isPrivate?: boolean;
|
|
17
22
|
/** Directory name under `catalogs/`. Must be unique and filesystem-safe. */
|
|
18
23
|
slug: string;
|
|
19
24
|
title: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { ResultPanelApi } from '../agentic-forge-v0_9/apis';
|
|
1
|
+
export { MultipleChoiceApi, ResultPanelApi } from '../agentic-forge-v0_9/apis';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { ResultPanelSchema } from '../agentic-forge-v0_9/schemas';
|
|
1
|
+
export { MultipleChoiceSchema, ResultPanelSchema } from '../agentic-forge-v0_9/schemas';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type { AgenticForgeV09ResultPanelProps, AgenticForgeV09ComponentInstance, AgenticForgeV09ComponentName, } from '../agentic-forge-v0_9/types';
|
|
1
|
+
export type { AgenticForgeV09MultipleChoiceProps, AgenticForgeV09ResultPanelProps, AgenticForgeV09ComponentInstance, AgenticForgeV09ComponentName, } from '../agentic-forge-v0_9/types';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/a2ui-catalog",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0",
|
|
4
4
|
"description": "A2UI v0.9 catalog — Atlassian custom catalog (component APIs and Zod schemas) for the A2UI v0.9 protocol",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"atlassian": {
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
"@atlaskit/css": "^1.1.0",
|
|
32
32
|
"@atlaskit/docs": "^12.3.0",
|
|
33
33
|
"@atlaskit/heading": "^8.0.0",
|
|
34
|
-
"@atlaskit/primitives": "^22.
|
|
34
|
+
"@atlaskit/primitives": "^22.9.0",
|
|
35
35
|
"@atlaskit/tabs": "^21.3.0",
|
|
36
|
-
"@atlaskit/tokens": "^20.
|
|
36
|
+
"@atlaskit/tokens": "^20.15.0",
|
|
37
37
|
"@atlassian/testing-library": "^0.12.0",
|
|
38
38
|
"prettier": "^3.2.5",
|
|
39
39
|
"react": "^19.0.0",
|