@jay-framework/aiditor 0.18.4 → 0.19.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,9 @@
1
+ name: listAddMenuItemsAction
2
+ description: List Add Menu catalog items from agent-kit/aiditor/add-menu/
3
+
4
+ inputSchema: {}
5
+
6
+ outputSchema:
7
+ items: array
8
+ categories: array
9
+ warnings: array
@@ -0,0 +1,3 @@
1
+ export interface ListAddMenuItemsActionInput {}
2
+
3
+ export type ListAddMenuItemsActionOutput = Record<string, unknown>;
@@ -0,0 +1,12 @@
1
+ name: resolveAddMenuContractParamsAction
2
+ description: Resolve URL params from a materialized contract for Add Menu Q8 helpers
3
+
4
+ inputSchema:
5
+ itemId: string
6
+ pluginName: string?
7
+
8
+ outputSchema:
9
+ contractName: string?
10
+ pluginName: string?
11
+ requiredParams: array?
12
+ allParams: array?
@@ -0,0 +1,5 @@
1
+ export interface ResolveAddMenuContractParamsActionInput {
2
+ itemId: string;
3
+ }
4
+
5
+ export type ResolveAddMenuContractParamsActionOutput = Record<string, unknown>;
@@ -0,0 +1,13 @@
1
+ name: syncAddMenuAttachmentsAction
2
+ description: Persist Add Menu attachments to request.json (content.md unchanged unless contentMd is passed)
3
+
4
+ inputSchema:
5
+ requestId: string
6
+ addMenuAttachments: array
7
+ routeMigration?: object
8
+ contentMd?: string
9
+
10
+ outputSchema:
11
+ ok: boolean
12
+ contentMd?: string
13
+ error?: string
@@ -0,0 +1,10 @@
1
+ export interface SyncAddMenuAttachmentsActionInput {
2
+ requestId: string;
3
+ contentMd?: string;
4
+ }
5
+
6
+ export interface SyncAddMenuAttachmentsActionOutput {
7
+ ok: boolean;
8
+ contentMd?: string;
9
+ error?: string;
10
+ }
@@ -0,0 +1,106 @@
1
+ # AIditor Add Menu — plugin contributor guide
2
+
3
+ Design Log #19. This document is installed by `jay-stack setup aiditor` into `agent-kit/plugin/aiditor-add-menu.md`.
4
+
5
+ ## 1. Meaning
6
+
7
+ Add Menu items are **user-selectable prompt fragments**. When a user picks an item in AIditor, it becomes a **chip** on the request. On submit, AIditor injects the item's **`prompt` verbatim** into the agent task — no mini-forms, no parameter substitution.
8
+
9
+ - **Q3:** One attachment = one resource in scope. The user may describe multiple uses in prose; the agent may implement 0, 1, or N instances.
10
+ - **Q8:** Dynamic route segments (`[slug]`, `[prefix]`, …) are edited in the **page route** / **planned route** field — not on catalog items.
11
+
12
+ ## 2. Paths
13
+
14
+ Write catalog files under:
15
+
16
+ ```
17
+ <project>/agent-kit/aiditor/add-menu/
18
+ <pluginName>.yaml # static items — setup
19
+ <pluginName>.generated.yaml # optional dynamic items — rebuild command
20
+ ```
21
+
22
+ AIditor merges all `*.yaml` at read time (lexicographic order; later file wins on duplicate `id`).
23
+
24
+ ## 3. Schema
25
+
26
+ Each file:
27
+
28
+ ```yaml
29
+ items:
30
+ - id: <pluginName>:<slug>
31
+ title: User-facing label
32
+ category: Store | Media | Effects | …
33
+ prompt: |
34
+ Complete agent instructions (markdown)
35
+ pluginName: wix-stores # recommended
36
+ packageName: "@jay-framework/wix-stores"
37
+ subCategory: Components # optional navigation
38
+ thumbnail: thumbnails/... # optional UI hint
39
+ ```
40
+
41
+ **Required:** `id`, `title`, `category`, `prompt`
42
+
43
+ **Rejected (anti-patterns):** `kind`, `parameters`, `component`, `allowedScopes`, `{{parameters.*}}`
44
+
45
+ Canonical fixture: `@jay-framework/aiditor` test fixture `test/fixtures/add-menu/valid-item.yaml`
46
+
47
+ ## 4. Materialization
48
+
49
+ | Source | When | Example |
50
+ | --------------- | -------------------------------- | ------------------------------ |
51
+ | Static template | `jay-stack setup <plugin>` | One item per headless contract |
52
+ | Generated file | setup `--force`, rebuild command | One item per Wix media file |
53
+
54
+ All URLs, IDs, contract keys, and instructions must be **complete in `prompt` at pick time**.
55
+
56
+ ## 5. Setup handler pattern
57
+
58
+ In your plugin `setup.ts`:
59
+
60
+ 1. Ensure `<project>/agent-kit/aiditor/add-menu/` exists
61
+ 2. Copy or generate `<pluginName>.yaml` from package template
62
+ 3. Idempotent — skip if file exists unless `ctx.force`
63
+ 4. Share generator with optional `rebuild-add-menu` command for `.generated.yaml`
64
+
65
+ Example (wix-stores): see `packages/wix-stores/lib/setup.ts` → `writeAddMenuCatalog`.
66
+
67
+ ## 6. Examples
68
+
69
+ **Headless contract (static):**
70
+
71
+ ```yaml
72
+ - id: wix-stores:product-page
73
+ title: Product page
74
+ category: Store
75
+ subCategory: Components
76
+ pluginName: wix-stores
77
+ packageName: "@jay-framework/wix-stores"
78
+ prompt: |
79
+ Use headless @jay-framework/wix-stores / product-page (key: p).
80
+ Read agent-kit/materialized-contracts/wix-stores/product-page.jay-contract.
81
+ ```
82
+
83
+ **Generated media item (future wix-media):**
84
+
85
+ ```yaml
86
+ - id: wix-media:hero-summer-2026
87
+ title: Hero — summer 2026
88
+ category: Media
89
+ pluginName: wix-media
90
+ prompt: |
91
+ URL: https://static.wixstatic.com/media/abc123~mv2.jpg
92
+ Media id: abc123-def-456-789
93
+ ```
94
+
95
+ ## 7. Q8 contract lookup hint
96
+
97
+ Use **`id` convention** `<pluginName>:<contractName>` (e.g. `wix-stores:product-page`) so AIditor can resolve `agent-kit/materialized-contracts/<plugin>/<contract>.jay-contract` for route param buttons and collision warnings.
98
+
99
+ ## 8. Verification
100
+
101
+ 1. Run `jay-stack setup <your-plugin>` — yaml appears under `agent-kit/aiditor/add-menu/`
102
+ 2. Ensure plugin is in `package.json`
103
+ 3. Open AIditor → Add Page → **+ Add** — items appear under your `category`
104
+ 4. Run `jay-stack validate` on pages the agent creates
105
+
106
+ For Add Menu schema questions, read this file. For generic plugin development, read `agent-kit/plugin/INSTRUCTIONS.md`.