ggaction 0.0.9 → 0.0.11

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.
Files changed (222) hide show
  1. package/CHANGELOG.md +84 -0
  2. package/README.md +5 -4
  3. package/knowledge/action-card.schema.json +1 -0
  4. package/knowledge/action-cards.json +1 -10941
  5. package/knowledge/action-cards.schema.json +1 -0
  6. package/knowledge/extension-authoring.md +248 -0
  7. package/knowledge/intent-taxonomy.json +1 -183
  8. package/knowledge/intent-taxonomy.schema.json +1 -0
  9. package/knowledge/mcp-resources.json +1 -95
  10. package/knowledge/mcp-resources.schema.json +1 -0
  11. package/knowledge/task-packet.schema.json +1 -159
  12. package/knowledge/task-resolver.js +1 -1230
  13. package/package.json +19 -2
  14. package/src/actions/boxPlots/edit.js +45 -298
  15. package/src/actions/boxPlots/options.js +46 -77
  16. package/src/actions/boxPlots/resolve.js +1 -1
  17. package/src/actions/charts/bar.js +3 -0
  18. package/src/actions/charts/heatmap.js +73 -83
  19. package/src/actions/charts/index.js +1 -1
  20. package/src/actions/charts/parallel.js +35 -1
  21. package/src/actions/charts/shared.js +20 -0
  22. package/src/actions/composition/actions.js +46 -49
  23. package/src/actions/data/bin2d.js +105 -2
  24. package/src/actions/data/box.js +17 -17
  25. package/src/actions/data/density.js +42 -78
  26. package/src/actions/data/gradientProfile.js +22 -52
  27. package/src/actions/data/horizon.js +16 -41
  28. package/src/actions/data/index.js +10 -10
  29. package/src/actions/data/interval.js +16 -38
  30. package/src/actions/data/intervalEdit.js +55 -0
  31. package/src/actions/data/regression.js +7 -17
  32. package/src/actions/data/shared.js +47 -0
  33. package/src/actions/data/timeUnit.js +14 -38
  34. package/src/actions/data/window.js +14 -38
  35. package/src/actions/distributions/revision.js +154 -34
  36. package/src/actions/encodings/angle.js +9 -10
  37. package/src/actions/encodings/appearance.js +17 -51
  38. package/src/actions/encodings/density/resolve.js +3 -1
  39. package/src/actions/encodings/density.js +1 -15
  40. package/src/actions/encodings/horizon/resolve.js +13 -3
  41. package/src/actions/encodings/horizon.js +8 -7
  42. package/src/actions/encodings/index.js +9 -9
  43. package/src/actions/encodings/offset.js +8 -24
  44. package/src/actions/encodings/parallel.js +9 -10
  45. package/src/actions/encodings/pathOrder.js +6 -13
  46. package/src/actions/encodings/position/policies/index.js +4 -4
  47. package/src/actions/encodings/position/policies/line.js +47 -17
  48. package/src/actions/encodings/position/resolve.js +24 -5
  49. package/src/actions/encodings/ranged.js +18 -23
  50. package/src/actions/encodings/remove.js +15 -25
  51. package/src/actions/encodings/ruleAppearance.js +9 -24
  52. package/src/actions/encodings/shared.js +37 -0
  53. package/src/actions/encodings/strokeDash.js +8 -23
  54. package/src/actions/encodings/text.js +9 -10
  55. package/src/actions/errorBands/create.js +105 -39
  56. package/src/actions/errorBands/edit.js +89 -93
  57. package/src/actions/errorBands/index.js +1 -2
  58. package/src/actions/errorBars/create.js +78 -27
  59. package/src/actions/errorBars/edit.js +81 -48
  60. package/src/actions/errorBars/index.js +1 -2
  61. package/src/actions/facets/actions.js +45 -69
  62. package/src/actions/facets/derive.js +38 -53
  63. package/src/actions/facets/replay.js +0 -1
  64. package/src/actions/gradientPlots/components.js +59 -48
  65. package/src/actions/gradientPlots/edit.js +35 -216
  66. package/src/actions/gradientPlots/index.js +11 -10
  67. package/src/actions/gradientPlots/materialize.js +21 -35
  68. package/src/actions/gradientPlots/options.js +5 -7
  69. package/src/actions/gradientPlots/paint.js +9 -6
  70. package/src/actions/gradientPlots/resolve.js +1 -1
  71. package/src/actions/guides/axes/index.js +3 -3
  72. package/src/actions/guides/axes/labels.js +68 -26
  73. package/src/actions/guides/axes/lines.js +22 -2
  74. package/src/actions/guides/axes/policy.js +28 -8
  75. package/src/actions/guides/axes/ticks.js +27 -9
  76. package/src/actions/guides/axes/titles.js +113 -65
  77. package/src/actions/guides/grids/resolve.js +14 -0
  78. package/src/actions/guides/guides.js +2 -4
  79. package/src/actions/guides/index.js +2 -2
  80. package/src/actions/guides/legends/categorical/actions.js +44 -68
  81. package/src/actions/guides/legends/categorical/components.js +6 -1
  82. package/src/actions/guides/legends/categorical/index.js +2 -2
  83. package/src/actions/guides/legends/categorical/layout.js +148 -175
  84. package/src/actions/guides/legends/categorical/recipes.js +5 -0
  85. package/src/actions/guides/legends/categorical/resolve.js +8 -1
  86. package/src/actions/guides/legends/continuous/common.js +117 -66
  87. package/src/actions/guides/legends/continuous/gradient.js +38 -37
  88. package/src/actions/guides/legends/continuous/interval.js +97 -76
  89. package/src/actions/guides/legends/continuous/opacity.js +28 -38
  90. package/src/actions/guides/legends/edit.js +14 -1
  91. package/src/actions/guides/legends/index.js +1 -1
  92. package/src/actions/guides/legends/lane.js +2 -1
  93. package/src/actions/guides/legends/remove.js +8 -0
  94. package/src/actions/guides/legends/size.js +36 -43
  95. package/src/actions/guides/legends/strokeWidth.js +20 -26
  96. package/src/actions/guides/polar/axes/labels.js +17 -1
  97. package/src/actions/guides/polar/axes/shared.js +7 -1
  98. package/src/actions/guides/polar/axes/titles.js +19 -2
  99. package/src/actions/guides/polar/grids.js +4 -0
  100. package/src/actions/guides/polar/resolve.js +6 -0
  101. package/src/actions/index.js +13 -13
  102. package/src/actions/intervals/resolve.js +87 -117
  103. package/src/actions/marks/arc/actions.js +31 -36
  104. package/src/actions/marks/area/actions.js +23 -31
  105. package/src/actions/marks/index.js +6 -6
  106. package/src/actions/marks/line/actions.js +33 -52
  107. package/src/actions/marks/line/materialize.js +7 -5
  108. package/src/actions/marks/point/materialize.js +5 -3
  109. package/src/actions/marks/remove.js +21 -0
  110. package/src/actions/marks/rule/actions.js +53 -53
  111. package/src/actions/marks/shared.js +8 -4
  112. package/src/actions/marks/text/actions.js +14 -6
  113. package/src/actions/marks/text/layout.js +21 -45
  114. package/src/actions/marks/tick/actions.js +22 -21
  115. package/src/actions/primitives/createGraphics.js +4 -0
  116. package/src/actions/primitives/editGraphics.js +4 -0
  117. package/src/actions/primitives/index.js +3 -3
  118. package/src/actions/primitives/semantic.js +1 -1
  119. package/src/actions/primitives/semanticValidation/index.js +2 -2
  120. package/src/actions/primitives/semanticValidation/layer.js +1 -1
  121. package/src/actions/regression/edit.js +3 -43
  122. package/src/actions/scales/consumers/families.js +24 -4
  123. package/src/actions/scales/consumers/index.js +1 -1
  124. package/src/actions/scales/consumers/seriesLayout.js +17 -0
  125. package/src/actions/scales/definitions.js +100 -103
  126. package/src/actions/scales/materialize.js +5 -0
  127. package/src/actions/selection/actions.js +79 -121
  128. package/src/actions/titles/actions.js +48 -94
  129. package/src/actions/titles/resolve.js +14 -27
  130. package/src/actions/violinPlots/create.js +37 -44
  131. package/src/core/action.js +20 -5
  132. package/src/core/extensionRegistry.js +104 -0
  133. package/src/core/textMetrics.js +74 -37
  134. package/src/core/validation.js +18 -0
  135. package/src/extension.js +8 -1
  136. package/src/grammar/aggregate.js +48 -28
  137. package/src/grammar/arcs.js +58 -11
  138. package/src/grammar/areaSeries.js +14 -16
  139. package/src/grammar/bin2d.js +37 -23
  140. package/src/grammar/boxPlot.js +14 -13
  141. package/src/grammar/categoricalDensity.js +14 -14
  142. package/src/grammar/categoryOrder.js +8 -14
  143. package/src/grammar/curveCommands.js +87 -20
  144. package/src/grammar/density.js +162 -141
  145. package/src/grammar/facets/index.js +14 -0
  146. package/src/grammar/facets/scales.js +7 -4
  147. package/src/grammar/gradientProfile.js +12 -15
  148. package/src/grammar/histogram.js +145 -83
  149. package/src/grammar/horizon.js +60 -23
  150. package/src/grammar/interval.js +14 -13
  151. package/src/grammar/lineSeries.js +91 -61
  152. package/src/grammar/numeric.js +290 -0
  153. package/src/grammar/paint.js +3 -4
  154. package/src/grammar/palettes.js +21 -32
  155. package/src/grammar/pathCommands.js +6 -0
  156. package/src/grammar/polarPaths.js +5 -5
  157. package/src/grammar/regression/derive.js +48 -9
  158. package/src/grammar/regression/models.js +248 -69
  159. package/src/grammar/regression/parameters.js +8 -0
  160. package/src/grammar/scales/color.js +35 -26
  161. package/src/grammar/scales/continuous.js +71 -24
  162. package/src/grammar/scales/definition.js +1 -1
  163. package/src/grammar/scales/discretized.js +42 -12
  164. package/src/grammar/scales/fields.js +21 -4
  165. package/src/grammar/scales/ordinal.js +117 -61
  166. package/src/grammar/scales/temporal.js +40 -11
  167. package/src/grammar/scales/transformed.js +199 -52
  168. package/src/grammar/schemas/graphicBounds.js +270 -79
  169. package/src/grammar/seriesLayout.js +50 -18
  170. package/src/grammar/ticks.js +123 -53
  171. package/src/grammar/timeUnit.js +18 -8
  172. package/src/grammar/transforms.js +4 -1
  173. package/src/grammar/window.js +70 -57
  174. package/src/index.js +1 -1
  175. package/src/layout/canvas.js +4 -8
  176. package/src/layout/composition.js +39 -40
  177. package/src/layout/facets.js +10 -14
  178. package/src/layout/labels.js +91 -15
  179. package/src/layout/legend.js +22 -20
  180. package/src/layout/legendLane.js +54 -40
  181. package/src/layout/title.js +7 -7
  182. package/src/materialization/bars/aggregate.js +14 -40
  183. package/src/materialization/bars/grouped.js +7 -18
  184. package/src/materialization/bars/histogram.js +2 -19
  185. package/src/materialization/bars/ranged.js +20 -15
  186. package/src/materialization/bars/resolve.js +21 -0
  187. package/src/materialization/facetGuides/legacyCategorical.js +2 -1
  188. package/src/materialization/facetGuides/placement.js +34 -19
  189. package/src/materialization/facetGuides/preparation.js +9 -5
  190. package/src/materialization/facets.js +39 -27
  191. package/src/materialization/guides/resources.js +2 -1
  192. package/src/materialization/marks/capabilities.js +5 -2
  193. package/src/materialization/marks/index.js +24 -4
  194. package/src/materialization/scales/policies/bar.js +61 -59
  195. package/src/materialization/scales/policies/binnedPosition.js +34 -0
  196. package/src/materialization/scales/policies/series.js +13 -7
  197. package/src/materialization/scales/resolve.js +4 -5
  198. package/src/materialization/selection/items/arc.js +16 -2
  199. package/src/materialization/selection/items/bar.js +4 -2
  200. package/src/materialization/selection/items/common.js +21 -1
  201. package/src/materialization/selection/items/path.js +19 -2
  202. package/src/materialization/selection/items/point.js +4 -16
  203. package/src/materialization/selection/items/tick.js +13 -21
  204. package/src/materialization/selection/point.js +11 -4
  205. package/src/materialization/selection/styles.js +19 -27
  206. package/src/materialization/text.js +4 -1
  207. package/src/mcp/adapter.js +8 -3
  208. package/src/renderers/canvas/fill.js +2 -2
  209. package/src/renderers/canvas/index.js +35 -2
  210. package/src/renderers/canvas/native.js +160 -0
  211. package/src/renderers/pdf.js +14 -0
  212. package/src/renderers/svg.js +37 -4
  213. package/types/extension.d.ts +19 -0
  214. package/types/index.d.ts +3 -0
  215. package/types/program.d.ts +509 -131
  216. package/types/svg.d.ts +1 -0
  217. package/src/actions/errorBands/components.js +0 -81
  218. package/src/actions/errorBands/options.js +0 -39
  219. package/src/actions/errorBands/resolve.js +0 -28
  220. package/src/actions/errorBars/components.js +0 -62
  221. package/src/actions/errorBars/options.js +0 -58
  222. package/src/actions/errorBars/resolve.js +0 -25
@@ -1,95 +1 @@
1
- {
2
- "schemaVersion": 2,
3
- "overview": {
4
- "title": "ggaction compact authoring overview",
5
- "text": "Use search_ggaction once with only the exact user chart request; do not append dataset contents or code scaffolding. The result contains exact authoring imports, chart() initialization, non-duplicated createCanvas and createData prerequisites, immutable executable steps with deterministic runtime dependencies closed, ordered actionPlan entries, exactCalls, required option names, canonical routes, terminal unsupported constraints, and open unresolved decisions. Do not preload the full documentation. Read an action card when one exact action needs more detail. Read only the resource URIs attached to unresolved entries; unsupported entries are terminal and require no documentation read. The server is read-only and never executes chart code."
6
- },
7
- "recipes": [
8
- {
9
- "id": "scatter-svg",
10
- "title": "Scatterplot with a bottom color legend and SVG output",
11
- "summary": "Selects the chart facade, legend layout action, and browser-safe SVG renderer in execution order.",
12
- "query": "scatter plot with a color legend at bottom as svg"
13
- },
14
- {
15
- "id": "moving-average-line-png",
16
- "title": "Moving-average line chart as PNG",
17
- "summary": "Combines a window transform, line facade, guides, and the Node PNG renderer.",
18
- "query": "moving average line chart with axes and export png"
19
- },
20
- {
21
- "id": "binned-heatmap",
22
- "title": "Binned heatmap with guides",
23
- "summary": "Uses the heatmap facade to own 2D binning, position, color, axes, and legend requirements.",
24
- "query": "binned heatmap with color legend and axes"
25
- },
26
- {
27
- "id": "regression-scatterplot",
28
- "title": "Scatterplot with a regression layer",
29
- "summary": "Builds the scatterplot before adding the statistical regression layer.",
30
- "query": "scatter plot with a regression line"
31
- },
32
- {
33
- "id": "selection-highlight",
34
- "title": "Stored selection and highlight",
35
- "summary": "Stores a named mark selection before applying a graphical highlight to that selection.",
36
- "query": "store selection then highlight marks"
37
- },
38
- {
39
- "id": "parallel-svg",
40
- "title": "Styled parallel coordinates as SVG",
41
- "summary": "Combines parallel coordinates, color and dash encodings, guides, and SVG output.",
42
- "query": "parallel coordinates with color encoding, stroke dash encoding, axes, and legend as svg"
43
- },
44
- {
45
- "id": "facet-shared-guides",
46
- "title": "Small multiples with shared guides",
47
- "summary": "Uses the facet action as the owner of the small-multiple layout and shared guides.",
48
- "query": "small multiples with shared legend and axes"
49
- },
50
- {
51
- "id": "horizontal-composition-svg",
52
- "title": "Horizontal chart composition as SVG",
53
- "summary": "Composes complete programs horizontally before serializing the parent program to SVG.",
54
- "query": "put charts side by side and export svg"
55
- }
56
- ],
57
- "docs": [
58
- {
59
- "id": "choose-chart-type",
60
- "title": "Choose a chart or mark type",
61
- "route": "/api/basic-charts/",
62
- "text": "# Choose a chart or mark type\n\nName the intended chart or mark. Common complete chart facades are `createScatterPlot`, `createLinePlot`, `createBarPlot`, `createHistogram`, and `createHeatmap`. For lower-level authoring, choose a mark such as point, line, area, bar, rect, rule, tick, text, or arc, then add its required position encodings. Run `search_ggaction` again with the chosen chart type."
63
- },
64
- {
65
- "id": "choose-renderer",
66
- "title": "Choose an output renderer",
67
- "route": "/api/rendering/",
68
- "text": "# Choose an output renderer\n\nUse `render(program, context)` for Browser Canvas, `renderToSVG(program)` for a browser-safe SVG string, `renderToPNG(program, output)` for Node PNG output, or `renderToPDF(program, output)` for a single-page vector PDF. Run `search_ggaction` again with one explicit format. JPEG output is not currently supported."
69
- },
70
- {
71
- "id": "legend-layout",
72
- "title": "Resolve legend layout requirements",
73
- "route": "/api/legends/",
74
- "text": "# Resolve legend layout requirements\n\nA single legend resource can occupy one position at a time. Choose `top`, `bottom`, `left`, or `right`, or give distinct legends explicit IDs and edit each target separately. Run `search_ggaction` again with one position per legend."
75
- },
76
- {
77
- "id": "unsupported-capabilities",
78
- "title": "Current static-chart limitations",
79
- "route": "/supported-features/",
80
- "text": "# Current static-chart limitations\n\nThe current authoring contract does not provide geographic maps, animation, interactive event handling, 3D charts, or JPEG rendering. The compact resolver reports these requirements explicitly instead of substituting a different chart. Consult the supported-features route before redesigning the task with current static actions."
81
- },
82
- {
83
- "id": "getting-started",
84
- "title": "Clarify an unrecognized authoring request",
85
- "route": "/getting-started/",
86
- "text": "# Clarify an authoring request\n\nDescribe the chart or mark, its data/transform needs, position and appearance encodings, guides or layout, and output format in one request. Exact action names are also accepted. Example: `scatter plot with x and y, a bottom color legend, and SVG output`."
87
- },
88
- {
89
- "id": "action-reference",
90
- "title": "Resolve a current action gap",
91
- "route": "/reference/actions/",
92
- "text": "# Resolve a current action gap\n\nUse the complete action reference only for a constraint that the compact resolver recognized but could not cover. Confirm the exact action signature, required resource ID, and supported options, then rerun `search_ggaction` with the exact action name and complete task request."
93
- }
94
- ]
95
- }
1
+ {"schemaVersion":2,"packageVersion":"0.0.11","overview":{"title":"ggaction compact authoring overview","text":"Use search_ggaction once with only the exact user chart request; do not append dataset contents or code scaffolding. The result contains exact authoring imports, chart() initialization, non-duplicated createCanvas and createData prerequisites, syntax-valid immutable steps with deterministic runtime dependencies closed, ordered actionPlan entries, applied options, explicit placeholder bindings, unmatched requirements, canonical routes, terminal unsupported constraints, and open unresolved decisions. Do not treat template field names as inferred dataset facts. Do not preload the full documentation. Read an action card when one exact action needs more detail. Read only the resource URIs attached to unresolved entries; unsupported entries are terminal and require no documentation read. The server is read-only and never executes chart code."},"recipes":[{"id":"scatter-svg","title":"Scatterplot with a bottom color legend and SVG output","summary":"Selects the chart facade, legend layout action, and browser-safe SVG renderer in execution order.","query":"scatter plot with a color legend at bottom as svg"},{"id":"moving-average-line-png","title":"Moving-average line chart as PNG","summary":"Combines a window transform, line facade, guides, and the Node PNG renderer.","query":"moving average line chart with axes and export png"},{"id":"binned-heatmap","title":"Binned heatmap with guides","summary":"Uses the heatmap facade to own 2D binning, position, color, axes, and legend requirements.","query":"binned heatmap with color legend and axes"},{"id":"regression-scatterplot","title":"Scatterplot with a regression layer","summary":"Builds the scatterplot before adding the statistical regression layer.","query":"scatter plot with a regression line"},{"id":"selection-highlight","title":"Stored selection and highlight","summary":"Stores a named mark selection before applying a graphical highlight to that selection.","query":"store selection then highlight marks"},{"id":"parallel-svg","title":"Styled parallel coordinates as SVG","summary":"Combines parallel coordinates, color and dash encodings, guides, and SVG output.","query":"parallel coordinates with color encoding, stroke dash encoding, axes, and legend as svg"},{"id":"facet-shared-guides","title":"Small multiples with shared guides","summary":"Uses the facet action as the owner of the small-multiple layout and shared guides.","query":"small multiples with shared legend and axes"},{"id":"horizontal-composition-svg","title":"Horizontal chart composition as SVG","summary":"Composes complete programs horizontally before serializing the parent program to SVG.","query":"put charts side by side and export svg"}],"docs":[{"id":"choose-chart-type","title":"Choose a chart or mark type","route":"/api/basic-charts/","text":"# Choose a chart or mark type\n\nName the intended chart or mark. Common complete chart facades are `createScatterPlot`, `createLinePlot`, `createBarPlot`, `createHistogram`, and `createHeatmap`. For lower-level authoring, choose a mark such as point, line, area, bar, rect, rule, tick, text, or arc, then add its required position encodings. Run `search_ggaction` again with the chosen chart type."},{"id":"choose-renderer","title":"Choose an output renderer","route":"/api/rendering/","text":"# Choose an output renderer\n\nUse `render(program, context)` for Browser Canvas, `renderToSVG(program)` for a browser-safe SVG string, `renderToPNG(program, output)` for Node PNG output, or `renderToPDF(program, output)` for a single-page vector PDF. Run `search_ggaction` again with one explicit format. JPEG output is not currently supported."},{"id":"legend-layout","title":"Resolve legend layout requirements","route":"/api/legends/","text":"# Resolve legend layout requirements\n\nA single legend resource can occupy one position at a time. Choose `top`, `bottom`, `left`, or `right`, or give distinct legends explicit IDs and edit each target separately. Run `search_ggaction` again with one position per legend."},{"id":"unsupported-capabilities","title":"Current static-chart limitations","route":"/supported-features/","text":"# Current static-chart limitations\n\nThe current authoring contract does not provide geographic maps, animation, interactive event handling, 3D charts, or JPEG rendering. The compact resolver reports these requirements explicitly instead of substituting a different chart. Consult the supported-features route before redesigning the task with current static actions."},{"id":"getting-started","title":"Clarify an unrecognized authoring request","route":"/getting-started/","text":"# Clarify an authoring request\n\nDescribe the chart or mark, its data/transform needs, position and appearance encodings, guides or layout, and output format in one request. Exact action names are also accepted. Example: `scatter plot with x and y, a bottom color legend, and SVG output`."},{"id":"action-reference","title":"Resolve a current action gap","route":"/reference/actions/","text":"# Resolve a current action gap\n\nUse the complete action reference only for a constraint that the compact resolver recognized but could not cover. Confirm the exact action signature, required resource ID, and supported options, then rerun `search_ggaction` with the exact action name and complete task request."},{"id":"responsive-layout","title":"Resolve responsive size and pixel density","route":"/responsive-charts/","text":"# Resolve responsive layout\n\nA ggaction program is immutable and has concrete Canvas dimensions. Measure the host container, choose the intended aspect ratio and pixel ratio, rebuild with `editCanvas`, and rerender from a `ResizeObserver`. Do not rely on CSS scaling as chart layout. Run `search_ggaction` again only after concrete dimensions or a host resize policy are known."},{"id":"accessibility","title":"Resolve output accessibility requirements","route":"/accessibility/","text":"# Resolve output accessibility\n\nChoose an output-specific accessible name and description, provide a data-table or textual alternative, and avoid color-only meaning. SVG supports explicit `title` and `description` renderer options. Canvas requires host ARIA and fallback content. Static output does not add keyboard interaction or tooltips."}]}
@@ -0,0 +1 @@
1
+ {"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://ggaction.github.io/ggaction/schemas/mcp-resources.schema.json","title":"ggaction bounded MCP resource catalog","type":"object","additionalProperties":false,"required":["schemaVersion","packageVersion","overview","recipes","docs"],"properties":{"schemaVersion":{"const":2},"packageVersion":{"type":"string","pattern":"^[0-9]+\\.[0-9]+\\.[0-9]+(?:-[0-9A-Za-z.-]+)?(?:\\+[0-9A-Za-z.-]+)?$"},"overview":{"type":"object","additionalProperties":false,"required":["title","text"],"properties":{"title":{"type":"string","minLength":3,"maxLength":120},"text":{"type":"string","minLength":40,"maxLength":3000}}},"recipes":{"type":"array","minItems":1,"items":{"type":"object","additionalProperties":false,"required":["id","title","summary","query"],"properties":{"id":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"title":{"type":"string","minLength":3,"maxLength":120},"summary":{"type":"string","minLength":20,"maxLength":300},"query":{"type":"string","minLength":3,"maxLength":500}}}},"docs":{"type":"array","minItems":1,"items":{"type":"object","additionalProperties":false,"required":["id","title","route","text"],"properties":{"id":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"title":{"type":"string","minLength":3,"maxLength":120},"route":{"type":"string","pattern":"^/"},"text":{"type":"string","minLength":40,"maxLength":3000}}}}}}
@@ -1,159 +1 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://ggaction.github.io/ggaction/schemas/task-packet.schema.json",
4
- "title": "ggaction compact task packet",
5
- "type": "object",
6
- "additionalProperties": false,
7
- "required": [
8
- "schemaVersion",
9
- "query",
10
- "matchedConstraints",
11
- "actionPlan",
12
- "exactCalls",
13
- "authoring",
14
- "unsupported",
15
- "unresolved",
16
- "candidates"
17
- ],
18
- "properties": {
19
- "schemaVersion": { "const": 3 },
20
- "query": { "type": "string", "minLength": 1, "maxLength": 500 },
21
- "matchedConstraints": {
22
- "type": "array",
23
- "maxItems": 30,
24
- "uniqueItems": true,
25
- "items": { "type": "string", "minLength": 3, "maxLength": 100 }
26
- },
27
- "actionPlan": {
28
- "type": "array",
29
- "maxItems": 20,
30
- "items": {
31
- "type": "object",
32
- "additionalProperties": false,
33
- "required": [
34
- "step",
35
- "id",
36
- "kind",
37
- "name",
38
- "constraints",
39
- "requiredOptions",
40
- "signature",
41
- "route"
42
- ],
43
- "properties": {
44
- "step": { "type": "integer", "minimum": 1 },
45
- "id": { "type": "string", "minLength": 3 },
46
- "kind": { "enum": ["action", "runtime"] },
47
- "name": { "type": "string", "pattern": "^[A-Za-z][A-Za-z0-9]*$" },
48
- "constraints": {
49
- "type": "array",
50
- "minItems": 1,
51
- "uniqueItems": true,
52
- "items": { "type": "string", "minLength": 3 }
53
- },
54
- "requiredOptions": {
55
- "type": "array",
56
- "uniqueItems": true,
57
- "items": { "type": "string", "pattern": "^[A-Za-z][A-Za-z0-9]*$" }
58
- },
59
- "signature": { "type": "string", "minLength": 8 },
60
- "route": { "type": "string", "pattern": "^/reference/" }
61
- }
62
- }
63
- },
64
- "exactCalls": {
65
- "type": "array",
66
- "maxItems": 20,
67
- "items": { "type": "string", "minLength": 3, "maxLength": 700 }
68
- },
69
- "authoring": {
70
- "type": "object",
71
- "additionalProperties": false,
72
- "required": ["imports", "initialize", "prerequisites", "steps"],
73
- "properties": {
74
- "imports": {
75
- "type": "array",
76
- "minItems": 1,
77
- "maxItems": 4,
78
- "uniqueItems": true,
79
- "items": { "type": "string", "minLength": 30, "maxLength": 90 }
80
- },
81
- "initialize": { "const": "let program = chart()" },
82
- "prerequisites": {
83
- "type": "array",
84
- "minItems": 2,
85
- "maxItems": 2,
86
- "items": {
87
- "type": "object",
88
- "additionalProperties": false,
89
- "required": ["id", "signature", "call", "bindings"],
90
- "properties": {
91
- "id": { "enum": ["action.createCanvas", "action.createData"] },
92
- "signature": { "type": "string", "minLength": 8, "maxLength": 180 },
93
- "call": { "type": "string", "minLength": 12, "maxLength": 180 },
94
- "bindings": {
95
- "type": "array",
96
- "maxItems": 4,
97
- "uniqueItems": true,
98
- "items": { "type": "string", "pattern": "^[A-Za-z][A-Za-z0-9]*$" }
99
- }
100
- }
101
- }
102
- },
103
- "steps": {
104
- "type": "array",
105
- "maxItems": 20,
106
- "items": { "type": "string", "minLength": 3, "maxLength": 760 }
107
- }
108
- }
109
- },
110
- "unsupported": {
111
- "type": "array",
112
- "maxItems": 10,
113
- "items": {
114
- "type": "object",
115
- "additionalProperties": false,
116
- "required": ["constraint", "reason"],
117
- "properties": {
118
- "constraint": { "type": "string", "pattern": "^unsupported\\." },
119
- "reason": { "type": "string", "minLength": 10, "maxLength": 240 }
120
- }
121
- }
122
- },
123
- "unresolved": {
124
- "type": "array",
125
- "maxItems": 30,
126
- "items": {
127
- "type": "object",
128
- "additionalProperties": false,
129
- "required": ["constraint", "reason", "resources"],
130
- "properties": {
131
- "constraint": { "type": "string", "minLength": 3 },
132
- "reason": { "type": "string", "minLength": 10, "maxLength": 240 },
133
- "resources": {
134
- "type": "array",
135
- "minItems": 1,
136
- "maxItems": 2,
137
- "uniqueItems": true,
138
- "items": { "type": "string", "pattern": "^ggaction://docs/[a-z0-9-]+$" }
139
- }
140
- }
141
- }
142
- },
143
- "candidates": {
144
- "type": "array",
145
- "maxItems": 3,
146
- "items": {
147
- "type": "object",
148
- "additionalProperties": false,
149
- "required": ["id", "kind", "name", "route"],
150
- "properties": {
151
- "id": { "type": "string", "minLength": 3 },
152
- "kind": { "enum": ["action", "runtime"] },
153
- "name": { "type": "string", "minLength": 2 },
154
- "route": { "type": "string", "pattern": "^/reference/" }
155
- }
156
- }
157
- }
158
- }
159
- }
1
+ {"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://ggaction.github.io/ggaction/schemas/task-packet.schema.json","title":"ggaction compact task packet","type":"object","additionalProperties":false,"required":["schemaVersion","packageVersion","query","matchedConstraints","actionPlan","exactCalls","appliedOptions","placeholderBindings","unmatchedRequirements","authoring","unsupported","unresolved","candidates"],"properties":{"schemaVersion":{"const":4},"packageVersion":{"type":"string","pattern":"^[0-9]+\\.[0-9]+\\.[0-9]+(?:-[0-9A-Za-z.-]+)?(?:\\+[0-9A-Za-z.-]+)?$"},"query":{"type":"string","minLength":1,"maxLength":500},"matchedConstraints":{"type":"array","maxItems":30,"uniqueItems":true,"items":{"type":"string","minLength":3,"maxLength":100}},"actionPlan":{"type":"array","maxItems":20,"items":{"type":"object","additionalProperties":false,"required":["step","id","kind","name","constraints","requiredOptions","signature","route"],"properties":{"step":{"type":"integer","minimum":1},"id":{"type":"string","minLength":3},"kind":{"enum":["action","runtime"]},"name":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9]*$"},"constraints":{"type":"array","uniqueItems":true,"items":{"type":"string","minLength":3}},"requiredOptions":{"type":"array","uniqueItems":true,"items":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9]*$"}},"signature":{"type":"string","minLength":8},"route":{"type":"string","pattern":"^/reference/"}}}},"exactCalls":{"type":"array","maxItems":20,"items":{"type":"string","minLength":3,"maxLength":700}},"appliedOptions":{"type":"array","maxItems":30,"items":{"type":"object","additionalProperties":false,"required":["owner","option","value","source"],"properties":{"owner":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9]*$"},"option":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9]*$"},"value":{"type":"string","minLength":1,"maxLength":300},"source":{"type":"string","minLength":1,"maxLength":180}}}},"placeholderBindings":{"type":"array","maxItems":30,"items":{"type":"object","additionalProperties":false,"required":["name","kind","required","usedBy","reason"],"properties":{"name":{"type":"string","minLength":1,"maxLength":80},"kind":{"enum":["binding","field","program","resource","runtime","text"]},"required":{"type":"boolean"},"usedBy":{"type":"array","minItems":1,"maxItems":20,"uniqueItems":true,"items":{"type":"string","minLength":1,"maxLength":80}},"reason":{"type":"string","minLength":20,"maxLength":240}}}},"unmatchedRequirements":{"type":"array","maxItems":30,"uniqueItems":true,"items":{"type":"string","minLength":1,"maxLength":180}},"authoring":{"type":"object","additionalProperties":false,"required":["imports","initialize","prerequisites","steps"],"properties":{"imports":{"type":"array","minItems":1,"maxItems":4,"uniqueItems":true,"items":{"type":"string","minLength":30,"maxLength":90}},"initialize":{"const":"let program = chart()"},"prerequisites":{"type":"array","minItems":0,"maxItems":2,"items":{"type":"object","additionalProperties":false,"required":["id","signature","call","bindings"],"properties":{"id":{"enum":["action.createCanvas","action.createData"]},"signature":{"type":"string","minLength":8,"maxLength":180},"call":{"type":"string","minLength":12,"maxLength":180},"bindings":{"type":"array","maxItems":4,"uniqueItems":true,"items":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9]*$"}}}}},"steps":{"type":"array","maxItems":20,"items":{"type":"string","minLength":3,"maxLength":760}}}},"unsupported":{"type":"array","maxItems":10,"items":{"type":"object","additionalProperties":false,"required":["constraint","reason"],"properties":{"constraint":{"type":"string","pattern":"^unsupported\\."},"reason":{"type":"string","minLength":10,"maxLength":240}}}},"unresolved":{"type":"array","maxItems":30,"items":{"type":"object","additionalProperties":false,"required":["constraint","reason","resources"],"properties":{"constraint":{"type":"string","minLength":3},"reason":{"type":"string","minLength":10,"maxLength":240},"resources":{"type":"array","minItems":1,"maxItems":2,"uniqueItems":true,"items":{"type":"string","pattern":"^ggaction://docs/[a-z0-9-]+$"}}}}},"candidates":{"type":"array","maxItems":3,"items":{"type":"object","additionalProperties":false,"required":["id","kind","name","route"],"properties":{"id":{"type":"string","minLength":3},"kind":{"enum":["action","runtime"]},"name":{"type":"string","minLength":2},"route":{"type":"string","pattern":"^/reference/"}}}}}}