@jay-framework/aiditor 0.16.2
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 +58 -0
- package/dist/actions/get-aiditor-bootstrap.jay-action +9 -0
- package/dist/actions/get-aiditor-bootstrap.jay-action.d.ts +8 -0
- package/dist/actions/get-page-params.jay-action +9 -0
- package/dist/actions/get-page-params.jay-action.d.ts +5 -0
- package/dist/actions/get-project-info.jay-action +12 -0
- package/dist/actions/get-project-info.jay-action.d.ts +12 -0
- package/dist/actions/list-freezes.jay-action +12 -0
- package/dist/actions/list-freezes.jay-action.d.ts +12 -0
- package/dist/actions/read-file.jay-action +11 -0
- package/dist/actions/read-file.jay-action.d.ts +10 -0
- package/dist/actions/submit-task.jay-action +24 -0
- package/dist/actions/submit-task.jay-action.d.ts +24 -0
- package/dist/aiditor-shell.jay-contract +8 -0
- package/dist/aiditor-shell.jay-contract.d.ts +18 -0
- package/dist/index.d.ts +445 -0
- package/dist/index.js +464 -0
- package/dist/pages/aiditor/page.css +1 -0
- package/dist/pages/aiditor/page.jay-contract +12 -0
- package/dist/pages/aiditor/page.jay-contract.d.ts +24 -0
- package/dist/pages/aiditor/page.jay-html +759 -0
- package/package.json +56 -0
- package/plugin.yaml +28 -0
package/README.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# @jay-framework/aiditor
|
|
2
|
+
|
|
3
|
+
A visual AI-driven code editor plugin for Jay Framework. Annotate live page previews with visual markers, attach short instructions, and let an AI agent edit your source files directly.
|
|
4
|
+
|
|
5
|
+
## How it works
|
|
6
|
+
|
|
7
|
+
1. **Preview** — The AIditor loads your project's pages in an iframe
|
|
8
|
+
2. **Annotate** — Place visual markers (points, areas, arrows) on elements you want changed
|
|
9
|
+
3. **Instruct** — Type a short instruction per marker (e.g. "make this blue", "add a close button")
|
|
10
|
+
4. **Run** — The AIditor captures annotated screenshots, sends them to a Claude agent, and streams the agent's file edits back in real-time
|
|
11
|
+
|
|
12
|
+
The agent receives a triple screenshot (annotated, markers-only, clean) for maximum context, and can also process video recordings of interactions.
|
|
13
|
+
|
|
14
|
+
## Installation
|
|
15
|
+
|
|
16
|
+
Add the plugin to your Jay project:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
yarn add @jay-framework/aiditor
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
The plugin auto-registers with the Jay dev server — no additional configuration needed. The `/aiditor` route becomes available when you run `yarn dev`.
|
|
23
|
+
|
|
24
|
+
## Requirements
|
|
25
|
+
|
|
26
|
+
The AI agent runs server-side via the Claude Agent SDK. Set your API key as an environment variable:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
export ANTHROPIC_API_KEY=sk-ant-...
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Usage
|
|
33
|
+
|
|
34
|
+
1. Start your dev server (`yarn dev`)
|
|
35
|
+
2. Navigate to `/aiditor`
|
|
36
|
+
3. Select a page route from the dropdown
|
|
37
|
+
4. Choose an annotation tool (point, area, or arrow)
|
|
38
|
+
5. Click on the preview to place a marker
|
|
39
|
+
6. Type your instruction in the popover (Cmd+Enter to run, Escape to cancel)
|
|
40
|
+
7. Watch the agent's output in the bottom panel
|
|
41
|
+
|
|
42
|
+
## Features
|
|
43
|
+
|
|
44
|
+
- **Point, area, and arrow annotations** with per-marker instructions
|
|
45
|
+
- **Video recording mode** — record interactions and pin annotations at specific moments
|
|
46
|
+
- **File attachments** — attach reference images or assets to annotations
|
|
47
|
+
- **Page freeze support** — annotate saved page snapshots
|
|
48
|
+
- **Dynamic route params** — automatically discovers and lists route parameter combinations
|
|
49
|
+
- **Streaming output** — real-time agent output with clickable file paths
|
|
50
|
+
- **Keyboard shortcuts** — Cmd+Enter to run, Escape to cancel annotations
|
|
51
|
+
|
|
52
|
+
## Plugin structure
|
|
53
|
+
|
|
54
|
+
The plugin provides:
|
|
55
|
+
|
|
56
|
+
- **Route** `/aiditor` — the editor UI
|
|
57
|
+
- **Actions** — server-side actions for bootstrapping, route discovery, param loading, task submission, and file reading
|
|
58
|
+
- **Contract** `aiditor-shell` — an optional editor chrome banner component
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
name: submitTaskAction
|
|
2
|
+
description: Submit a visual annotation task to the AI agent (Agent SDK) with file uploads
|
|
3
|
+
streaming: true
|
|
4
|
+
|
|
5
|
+
inputSchema:
|
|
6
|
+
notes: string
|
|
7
|
+
pageRoute?: string
|
|
8
|
+
renderedUrl?: string
|
|
9
|
+
visualTask?: string
|
|
10
|
+
videoFramesOnly?: string
|
|
11
|
+
screenshot_full?: file
|
|
12
|
+
screenshot_markers_only?: file
|
|
13
|
+
screenshot_clean?: file
|
|
14
|
+
video?: file
|
|
15
|
+
extraFiles?: record(file)
|
|
16
|
+
|
|
17
|
+
outputSchema:
|
|
18
|
+
type: string
|
|
19
|
+
message?: string
|
|
20
|
+
text?: string
|
|
21
|
+
name?: string
|
|
22
|
+
result?: string
|
|
23
|
+
cost?: number
|
|
24
|
+
duration?: number
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { JayFile } from '@jay-framework/fullstack-component';
|
|
2
|
+
|
|
3
|
+
export interface SubmitTaskActionInput {
|
|
4
|
+
notes: string;
|
|
5
|
+
pageRoute?: string;
|
|
6
|
+
renderedUrl?: string;
|
|
7
|
+
visualTask?: string;
|
|
8
|
+
videoFramesOnly?: string;
|
|
9
|
+
screenshot_full?: JayFile;
|
|
10
|
+
screenshot_markers_only?: JayFile;
|
|
11
|
+
screenshot_clean?: JayFile;
|
|
12
|
+
video?: JayFile;
|
|
13
|
+
extraFiles?: Record<string, JayFile>;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface SubmitTaskActionOutput {
|
|
17
|
+
type: string;
|
|
18
|
+
message?: string;
|
|
19
|
+
text?: string;
|
|
20
|
+
name?: string;
|
|
21
|
+
result?: string;
|
|
22
|
+
cost?: number;
|
|
23
|
+
duration?: number;
|
|
24
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {JayContract} from "@jay-framework/runtime";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
export interface AiditorShellViewState {
|
|
5
|
+
headline: string
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export type AiditorShellSlowViewState = {};
|
|
9
|
+
|
|
10
|
+
export type AiditorShellFastViewState = Pick<AiditorShellViewState, 'headline'>;
|
|
11
|
+
|
|
12
|
+
export type AiditorShellInteractiveViewState = {};
|
|
13
|
+
|
|
14
|
+
export interface AiditorShellRefs {}
|
|
15
|
+
|
|
16
|
+
export interface AiditorShellRepeatedRefs {}
|
|
17
|
+
|
|
18
|
+
export type AiditorShellContract = JayContract<AiditorShellViewState, AiditorShellRefs, AiditorShellSlowViewState, AiditorShellFastViewState, AiditorShellInteractiveViewState>
|