@aibolabs/plugin-protocol 0.1.8
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/LICENSE +21 -0
- package/README.md +15 -0
- package/dist/agent-icon.d.ts +5 -0
- package/dist/agent-icon.js +10 -0
- package/dist/capability.d.ts +114 -0
- package/dist/capability.js +3 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +9 -0
- package/dist/presentation-capability.d.ts +37 -0
- package/dist/presentation-capability.js +1 -0
- package/dist/presentation-controls.d.ts +160 -0
- package/dist/presentation-controls.js +1 -0
- package/dist/presentation-conversation.d.ts +281 -0
- package/dist/presentation-conversation.js +1 -0
- package/dist/presentation-git.d.ts +148 -0
- package/dist/presentation-git.js +1 -0
- package/dist/presentation-inspector.d.ts +218 -0
- package/dist/presentation-inspector.js +1 -0
- package/dist/presentation-layout.d.ts +21 -0
- package/dist/presentation-layout.js +1 -0
- package/dist/presentation-navigation.d.ts +51 -0
- package/dist/presentation-navigation.js +1 -0
- package/dist/presentation-package.d.ts +28 -0
- package/dist/presentation-package.js +1 -0
- package/dist/presentation-runtime.d.ts +60 -0
- package/dist/presentation-runtime.js +1 -0
- package/dist/presentation.d.ts +17 -0
- package/dist/presentation.js +1 -0
- package/dist/renderer.d.ts +34 -0
- package/dist/renderer.js +4 -0
- package/dist/semantic.d.ts +85 -0
- package/dist/semantic.js +2 -0
- package/dist/session.d.ts +65 -0
- package/dist/session.js +2 -0
- package/dist/settings.d.ts +50 -0
- package/dist/settings.js +1 -0
- package/package.json +45 -0
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
interface WorkspaceFileChange {
|
|
2
|
+
stagedStats?: {
|
|
3
|
+
additions: number;
|
|
4
|
+
deletions: number;
|
|
5
|
+
} | null;
|
|
6
|
+
unstagedStats?: {
|
|
7
|
+
additions: number;
|
|
8
|
+
deletions: number;
|
|
9
|
+
} | null;
|
|
10
|
+
path: string;
|
|
11
|
+
previousPath: string | null;
|
|
12
|
+
kind: 'added' | 'modified' | 'deleted' | 'renamed';
|
|
13
|
+
staged: boolean;
|
|
14
|
+
unstaged: boolean;
|
|
15
|
+
untracked: boolean;
|
|
16
|
+
conflicted: boolean;
|
|
17
|
+
}
|
|
18
|
+
interface WorkspaceChanges {
|
|
19
|
+
workspaceId: string;
|
|
20
|
+
head: string | null;
|
|
21
|
+
branch: string | null;
|
|
22
|
+
dirty: boolean;
|
|
23
|
+
capturedAt: string;
|
|
24
|
+
files: WorkspaceFileChange[];
|
|
25
|
+
captureStatus: 'captured' | 'unsupported' | 'failed';
|
|
26
|
+
captureError: string | null;
|
|
27
|
+
}
|
|
28
|
+
interface WorkspaceFileDiff {
|
|
29
|
+
path: string;
|
|
30
|
+
staged: boolean;
|
|
31
|
+
available: boolean;
|
|
32
|
+
truncated: boolean;
|
|
33
|
+
diff: string;
|
|
34
|
+
hunks: TurnDiffHunk[];
|
|
35
|
+
reason: string | null;
|
|
36
|
+
}
|
|
37
|
+
interface TurnDiffHunk {
|
|
38
|
+
index: number;
|
|
39
|
+
header: string;
|
|
40
|
+
content: string;
|
|
41
|
+
}
|
|
42
|
+
interface GitBranch {
|
|
43
|
+
name: string;
|
|
44
|
+
current: boolean;
|
|
45
|
+
commit: string | null;
|
|
46
|
+
}
|
|
47
|
+
interface GitCommit {
|
|
48
|
+
hash: string;
|
|
49
|
+
shortHash: string;
|
|
50
|
+
subject: string;
|
|
51
|
+
author: string;
|
|
52
|
+
authoredAt: string;
|
|
53
|
+
}
|
|
54
|
+
interface GitCommitFile {
|
|
55
|
+
path: string;
|
|
56
|
+
previousPath: string | null;
|
|
57
|
+
kind: 'added' | 'modified' | 'deleted' | 'renamed';
|
|
58
|
+
}
|
|
59
|
+
interface GitCommitFileList {
|
|
60
|
+
commit: string;
|
|
61
|
+
files: GitCommitFile[];
|
|
62
|
+
total: number;
|
|
63
|
+
}
|
|
64
|
+
interface GitRemoteStatus {
|
|
65
|
+
branch: string | null;
|
|
66
|
+
upstream: string | null;
|
|
67
|
+
ahead: number;
|
|
68
|
+
behind: number;
|
|
69
|
+
}
|
|
70
|
+
interface GitStashEntry {
|
|
71
|
+
reference: string;
|
|
72
|
+
message: string;
|
|
73
|
+
}
|
|
74
|
+
export type PresentationGitDrafts = {
|
|
75
|
+
commitMessage: string;
|
|
76
|
+
branchDraft: string;
|
|
77
|
+
gitSection: 'changes' | 'history';
|
|
78
|
+
selectedCommit: string | null;
|
|
79
|
+
};
|
|
80
|
+
export type GitRepository = {
|
|
81
|
+
id: string;
|
|
82
|
+
name: string;
|
|
83
|
+
relativePath: string;
|
|
84
|
+
kind: 'repository' | 'submodule' | 'worktree';
|
|
85
|
+
externalRoot: boolean;
|
|
86
|
+
};
|
|
87
|
+
export type GitRepositoryState = GitRepository & {
|
|
88
|
+
changes: WorkspaceChanges | null;
|
|
89
|
+
error: string | null;
|
|
90
|
+
};
|
|
91
|
+
export type GitRepositoryDiscovery = {
|
|
92
|
+
repositories: GitRepository[];
|
|
93
|
+
limited: boolean;
|
|
94
|
+
warnings: string[];
|
|
95
|
+
scanBudget: number;
|
|
96
|
+
};
|
|
97
|
+
export type PresentationGit = {
|
|
98
|
+
repositories?: GitRepositoryState[];
|
|
99
|
+
repositoryId?: string | null;
|
|
100
|
+
repositorySearch?: string;
|
|
101
|
+
repositoryPickerOpen?: boolean;
|
|
102
|
+
collapsedRepositories?: string[];
|
|
103
|
+
discoveryLimited?: boolean;
|
|
104
|
+
discoveryWarnings?: string[];
|
|
105
|
+
workspace: {
|
|
106
|
+
id: string;
|
|
107
|
+
label: string;
|
|
108
|
+
path: string;
|
|
109
|
+
trust: string;
|
|
110
|
+
} | null;
|
|
111
|
+
sessionId: string | null;
|
|
112
|
+
desktop: boolean;
|
|
113
|
+
open: boolean;
|
|
114
|
+
activeView: 'context' | 'git';
|
|
115
|
+
changes: WorkspaceChanges | null;
|
|
116
|
+
loading: boolean;
|
|
117
|
+
error: string | null;
|
|
118
|
+
branches: GitBranch[];
|
|
119
|
+
history: GitCommit[];
|
|
120
|
+
historyHasMore?: boolean;
|
|
121
|
+
historyLoadingMore?: boolean;
|
|
122
|
+
historyLoadMoreError?: string | null;
|
|
123
|
+
metadataLoading: boolean;
|
|
124
|
+
metadataError: string | null;
|
|
125
|
+
commitFiles: GitCommitFileList | null;
|
|
126
|
+
commitFilesLoading: boolean;
|
|
127
|
+
remoteStatus: GitRemoteStatus | null;
|
|
128
|
+
stashes: GitStashEntry[];
|
|
129
|
+
operationBusy: boolean;
|
|
130
|
+
reviewBusy: boolean;
|
|
131
|
+
canRequestReview: boolean;
|
|
132
|
+
draft: PresentationGitDrafts;
|
|
133
|
+
preview: {
|
|
134
|
+
fileDiff: WorkspaceFileDiff | null;
|
|
135
|
+
loading: boolean;
|
|
136
|
+
error: string | null;
|
|
137
|
+
selectedPath: string | null;
|
|
138
|
+
staged: boolean;
|
|
139
|
+
contextLabel: string | null;
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
export type PresentationGitAction = {
|
|
143
|
+
token: string;
|
|
144
|
+
operation: 'togglePanel' | 'selectView' | 'selectSection' | 'refresh' | 'refreshMetadata' | 'commitMessage' | 'branchDraft' | 'commit' | 'createBranch' | 'checkoutBranch' | 'stageFile' | 'unstageFile' | 'stageAll' | 'unstageAll' | 'openDiff' | 'closeDiff' | 'selectCommit' | 'loadMoreHistory' | 'loadMoreCommitFiles' | 'openCommitDiff' | 'fetch' | 'pull' | 'push' | 'saveStash' | 'applyStash' | 'requestReview' | 'selectRepository' | 'repositorySearch' | 'toggleRepository' | 'continueDiscovery' | 'repositoryDiff' | 'repositoryStage' | 'repositoryUnstage' | 'repositoryStageAll' | 'repositoryUnstageAll';
|
|
145
|
+
event: 'click' | 'input';
|
|
146
|
+
args: readonly (string | null)[];
|
|
147
|
+
};
|
|
148
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
import type { PresentationConversation } from './presentation-conversation.js';
|
|
2
|
+
import type { PresentationGit } from './presentation-git.js';
|
|
3
|
+
type ProjectActionKind = 'test' | 'lint' | 'build' | 'custom';
|
|
4
|
+
interface CapabilityEntry {
|
|
5
|
+
name: string;
|
|
6
|
+
source: string;
|
|
7
|
+
}
|
|
8
|
+
interface WorkspaceCapabilityInventory {
|
|
9
|
+
workspaceId: string;
|
|
10
|
+
inspectedAt: string;
|
|
11
|
+
instructions: CapabilityEntry[];
|
|
12
|
+
skills: CapabilityEntry[];
|
|
13
|
+
tools: CapabilityEntry[];
|
|
14
|
+
mcpServers: CapabilityEntry[];
|
|
15
|
+
warnings: string[];
|
|
16
|
+
}
|
|
17
|
+
interface ChangeSetState {
|
|
18
|
+
head: string | null;
|
|
19
|
+
dirty: boolean | null;
|
|
20
|
+
capturedAt: string | null;
|
|
21
|
+
}
|
|
22
|
+
interface FileChange {
|
|
23
|
+
path: string;
|
|
24
|
+
previousPath: string | null;
|
|
25
|
+
kind: 'added' | 'modified' | 'deleted' | 'renamed';
|
|
26
|
+
baselineExists: boolean;
|
|
27
|
+
baselineHash: string | null;
|
|
28
|
+
baselineSize: number | null;
|
|
29
|
+
baselineDirty: boolean;
|
|
30
|
+
resultExists: boolean;
|
|
31
|
+
resultHash: string | null;
|
|
32
|
+
resultSize: number | null;
|
|
33
|
+
}
|
|
34
|
+
interface CommandRunRef {
|
|
35
|
+
id: string;
|
|
36
|
+
toolName: string | null;
|
|
37
|
+
command: string | null;
|
|
38
|
+
cwd: string | null;
|
|
39
|
+
exitCode: number | null;
|
|
40
|
+
status: 'streaming' | 'completed' | 'failed' | string;
|
|
41
|
+
output: string;
|
|
42
|
+
}
|
|
43
|
+
interface VerificationRef {
|
|
44
|
+
id: string;
|
|
45
|
+
status: 'running' | 'passed' | 'failed' | string;
|
|
46
|
+
output: string;
|
|
47
|
+
}
|
|
48
|
+
interface TurnChangeSet {
|
|
49
|
+
id: string;
|
|
50
|
+
schema: 'aibo.turn-changeset/v1';
|
|
51
|
+
workspaceId: string;
|
|
52
|
+
sessionId: string;
|
|
53
|
+
turnId: string;
|
|
54
|
+
baseline: ChangeSetState;
|
|
55
|
+
result: ChangeSetState;
|
|
56
|
+
files: FileChange[];
|
|
57
|
+
commands: CommandRunRef[];
|
|
58
|
+
verification: VerificationRef[];
|
|
59
|
+
attribution: 'agent' | 'mixed' | 'unknown';
|
|
60
|
+
captureStatus: 'captured' | 'partial' | 'failed';
|
|
61
|
+
captureError: string | null;
|
|
62
|
+
}
|
|
63
|
+
interface RestoreOperation {
|
|
64
|
+
schema: 'aibo.restore-operation/v1';
|
|
65
|
+
id: string;
|
|
66
|
+
workspaceId: string;
|
|
67
|
+
sessionId: string;
|
|
68
|
+
turnId: string;
|
|
69
|
+
status: 'completed' | 'blocked' | 'failed';
|
|
70
|
+
restored: string[];
|
|
71
|
+
conflicts: string[];
|
|
72
|
+
unsupported: string[];
|
|
73
|
+
createdAt: string;
|
|
74
|
+
}
|
|
75
|
+
interface CheckpointFile {
|
|
76
|
+
schema: 'aibo.checkpoint/v1';
|
|
77
|
+
id: string;
|
|
78
|
+
workspaceId: string;
|
|
79
|
+
sessionId: string;
|
|
80
|
+
turnId: string;
|
|
81
|
+
path: string;
|
|
82
|
+
fileExists: boolean;
|
|
83
|
+
contentHash: string | null;
|
|
84
|
+
size: number | null;
|
|
85
|
+
storagePath: string | null;
|
|
86
|
+
baselineDirty: boolean;
|
|
87
|
+
available: boolean;
|
|
88
|
+
reason: string | null;
|
|
89
|
+
createdAt: string;
|
|
90
|
+
}
|
|
91
|
+
interface Artifact {
|
|
92
|
+
schema: 'aibo.artifact/v1';
|
|
93
|
+
id: string;
|
|
94
|
+
workspaceId: string;
|
|
95
|
+
sessionId: string;
|
|
96
|
+
turnId: string | null;
|
|
97
|
+
source: string;
|
|
98
|
+
mediaType: string;
|
|
99
|
+
size: number;
|
|
100
|
+
contentHash: string;
|
|
101
|
+
storagePath: string;
|
|
102
|
+
createdAt: string;
|
|
103
|
+
}
|
|
104
|
+
interface ArtifactContent {
|
|
105
|
+
artifact: Artifact;
|
|
106
|
+
content: string;
|
|
107
|
+
truncated: boolean;
|
|
108
|
+
}
|
|
109
|
+
interface ProjectAction {
|
|
110
|
+
schema: 'aibo.project-action/v1';
|
|
111
|
+
id: string;
|
|
112
|
+
workspaceId: string;
|
|
113
|
+
name: string;
|
|
114
|
+
kind: ProjectActionKind;
|
|
115
|
+
program: string;
|
|
116
|
+
args: string[];
|
|
117
|
+
cwd: string;
|
|
118
|
+
enabled: boolean;
|
|
119
|
+
createdAt: string;
|
|
120
|
+
updatedAt: string;
|
|
121
|
+
}
|
|
122
|
+
interface ProjectActionRun {
|
|
123
|
+
schema: 'aibo.project-action-run/v1' | 'aibo.project-action-run/v2' | 'aibo.project-action-run/v3';
|
|
124
|
+
id: string;
|
|
125
|
+
actionId: string;
|
|
126
|
+
actionName?: string | null;
|
|
127
|
+
workspaceId: string;
|
|
128
|
+
sessionId: string | null;
|
|
129
|
+
status: 'completed' | 'failed' | 'timed_out' | string;
|
|
130
|
+
exitCode: number | null;
|
|
131
|
+
output: string;
|
|
132
|
+
artifactId: string | null;
|
|
133
|
+
startedAt: string;
|
|
134
|
+
completedAt: string | null;
|
|
135
|
+
}
|
|
136
|
+
interface TurnDiffHunk {
|
|
137
|
+
index: number;
|
|
138
|
+
header: string;
|
|
139
|
+
content: string;
|
|
140
|
+
}
|
|
141
|
+
interface TurnFileDiff {
|
|
142
|
+
path: string;
|
|
143
|
+
available: boolean;
|
|
144
|
+
diff: string;
|
|
145
|
+
hunks: TurnDiffHunk[];
|
|
146
|
+
reason: string | null;
|
|
147
|
+
}
|
|
148
|
+
export type PresentationArtifactPreview = {
|
|
149
|
+
sessionId: string | null;
|
|
150
|
+
artifactId: string | null;
|
|
151
|
+
content: ArtifactContent | null;
|
|
152
|
+
loading: boolean;
|
|
153
|
+
error: string | null;
|
|
154
|
+
};
|
|
155
|
+
export type PresentationInspector = {
|
|
156
|
+
workspace: PresentationGit['workspace'];
|
|
157
|
+
session: PresentationConversation['session'];
|
|
158
|
+
desktop: boolean;
|
|
159
|
+
open: boolean;
|
|
160
|
+
activeView: 'context' | 'git';
|
|
161
|
+
diagnostics: {
|
|
162
|
+
agent: string;
|
|
163
|
+
label: string;
|
|
164
|
+
status: string;
|
|
165
|
+
executable: string | null;
|
|
166
|
+
version: string | null;
|
|
167
|
+
capabilities: string[];
|
|
168
|
+
authState: string;
|
|
169
|
+
message: string | null;
|
|
170
|
+
}[];
|
|
171
|
+
workspaceCapabilities: WorkspaceCapabilityInventory | null;
|
|
172
|
+
threads: {
|
|
173
|
+
id: string;
|
|
174
|
+
title: string | null;
|
|
175
|
+
cwd: string | null;
|
|
176
|
+
status: string | null;
|
|
177
|
+
updatedAt: string | null;
|
|
178
|
+
}[];
|
|
179
|
+
executionProfile: PresentationConversation['executionProfile'];
|
|
180
|
+
attachments: PresentationConversation['attachments'];
|
|
181
|
+
artifacts: Artifact[];
|
|
182
|
+
artifactPreview: PresentationArtifactPreview;
|
|
183
|
+
projectEditor: PresentationProjectEditor;
|
|
184
|
+
runningActionId: string | null;
|
|
185
|
+
projectActions: ProjectAction[];
|
|
186
|
+
projectActionRuns: ProjectActionRun[];
|
|
187
|
+
changeSet: TurnChangeSet | null;
|
|
188
|
+
checkpoints: CheckpointFile[];
|
|
189
|
+
restoreOperations: RestoreOperation[];
|
|
190
|
+
workspaceChanges: PresentationGit['changes'];
|
|
191
|
+
fileDiff: TurnFileDiff | null;
|
|
192
|
+
fileDiffLoading: boolean;
|
|
193
|
+
fileDiffError: string | null;
|
|
194
|
+
threadBusy: boolean;
|
|
195
|
+
busy: boolean;
|
|
196
|
+
running: boolean;
|
|
197
|
+
archiving: boolean;
|
|
198
|
+
};
|
|
199
|
+
export type PresentationInspectorAction = {
|
|
200
|
+
token: string;
|
|
201
|
+
operation: 'selectView' | 'refresh' | 'syncThreads' | 'toggleArtifact' | 'closeArtifact' | 'showDiff' | 'restoreTurn' | 'fileAction' | 'hunkAction' | 'newProjectAction' | 'editProjectAction' | 'projectField' | 'projectKind' | 'saveProjectAction' | 'closeProjectEditor' | 'deleteProjectAction' | 'runProjectAction' | 'cancelProjectAction';
|
|
202
|
+
event: 'click' | 'input';
|
|
203
|
+
args: readonly (string | null)[];
|
|
204
|
+
};
|
|
205
|
+
export type PresentationProjectEditor = {
|
|
206
|
+
generation: number;
|
|
207
|
+
open: boolean;
|
|
208
|
+
actionId: string | null;
|
|
209
|
+
name: string;
|
|
210
|
+
kind: 'test' | 'lint' | 'build' | 'custom';
|
|
211
|
+
program: string;
|
|
212
|
+
args: string;
|
|
213
|
+
cwd: string;
|
|
214
|
+
enabled: boolean;
|
|
215
|
+
saving: boolean;
|
|
216
|
+
error: string | null;
|
|
217
|
+
};
|
|
218
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type PresentationLayout = {
|
|
2
|
+
navigation: {
|
|
3
|
+
width: number;
|
|
4
|
+
min: number;
|
|
5
|
+
max: number;
|
|
6
|
+
};
|
|
7
|
+
auxiliary: {
|
|
8
|
+
width: number;
|
|
9
|
+
min: number;
|
|
10
|
+
max: number;
|
|
11
|
+
};
|
|
12
|
+
auxiliaryOpen: boolean;
|
|
13
|
+
mode?: 'standard' | 'focus' | 'review';
|
|
14
|
+
switching?: boolean;
|
|
15
|
+
};
|
|
16
|
+
export type PresentationLayoutAction = {
|
|
17
|
+
token: string;
|
|
18
|
+
operation: 'resize' | 'selectMode';
|
|
19
|
+
event: 'input' | 'click';
|
|
20
|
+
args: readonly ('navigation' | 'auxiliary' | 'standard' | 'focus' | 'review')[];
|
|
21
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/** Data owned by the host; visual implementations never receive navigation callbacks. */
|
|
2
|
+
export type PresentationNavigation = {
|
|
3
|
+
agentChoices?: {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
icon?: import('./agent-icon.js').AgentIcon;
|
|
7
|
+
}[];
|
|
8
|
+
workspaces: {
|
|
9
|
+
id: string;
|
|
10
|
+
label: string;
|
|
11
|
+
path: string;
|
|
12
|
+
trust: string;
|
|
13
|
+
}[];
|
|
14
|
+
sessionsByWorkspace: Record<string, {
|
|
15
|
+
id: string;
|
|
16
|
+
workspaceId: string;
|
|
17
|
+
agent: string;
|
|
18
|
+
canSyncSnapshot?: boolean;
|
|
19
|
+
label: string;
|
|
20
|
+
state: string;
|
|
21
|
+
archived: boolean;
|
|
22
|
+
updatedAt: string;
|
|
23
|
+
}[]>;
|
|
24
|
+
selectedWorkspaceId: string | null;
|
|
25
|
+
selectedSessionId: string | null;
|
|
26
|
+
expandedWorkspaceIds: string[];
|
|
27
|
+
sessionsLoadingWorkspaceIds: string[];
|
|
28
|
+
busy: boolean;
|
|
29
|
+
threadBusy: boolean;
|
|
30
|
+
archivingWorkspaceId: string | null;
|
|
31
|
+
archivingSessionId: string | null;
|
|
32
|
+
/** Deprecated: fixed host global search owns this interaction; hosts send false. */
|
|
33
|
+
sessionSearchOpen: boolean;
|
|
34
|
+
sessionFilterOpen: boolean;
|
|
35
|
+
/** Deprecated compatibility field; hosts send an empty string. */
|
|
36
|
+
sessionSearch: string;
|
|
37
|
+
sessionFilter: string;
|
|
38
|
+
createSessionWorkspaceId: string | null;
|
|
39
|
+
renamingSessionId: string | null;
|
|
40
|
+
sessionLabelDraft: string;
|
|
41
|
+
};
|
|
42
|
+
export type PresentationNavigationOperation = 'toggleSearch' | 'toggleFilter' | 'search' | 'filter' | 'applyFilters' | 'addWorkspace' | 'selectWorkspace' | 'toggleSessionCreator' | 'toggleTrust' | 'removeWorkspace' | 'openWorkspace' | 'createAgent' | 'selectSession' | 'unarchiveSession' | 'archiveSession' | 'syncSession' | 'renameSession' | 'renameDraft' | 'saveRename' | 'cancelRename';
|
|
43
|
+
export type PresentationNavigationAction = {
|
|
44
|
+
token: string;
|
|
45
|
+
operation: PresentationNavigationOperation;
|
|
46
|
+
targetId?: string;
|
|
47
|
+
choiceId?: string;
|
|
48
|
+
event: 'click' | 'input' | 'change';
|
|
49
|
+
/** Allowed values for a change event; the host rejects other values. */
|
|
50
|
+
options?: readonly string[];
|
|
51
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/** Installable skin and full-workbench extensions share this data-only package. */
|
|
2
|
+
export type PresentationPackageManifest = {
|
|
3
|
+
schema: 'aibo.presentation-package/v1';
|
|
4
|
+
id: string;
|
|
5
|
+
version: string;
|
|
6
|
+
displayName: string;
|
|
7
|
+
/** Controls introduced in a later version are only sent to packages declaring it. */
|
|
8
|
+
hostApi: '1.0.0' | '1.1.0';
|
|
9
|
+
coreSemantics: '1.0.0';
|
|
10
|
+
snapshotSchemas: readonly ('aibo.semantic-view/experimental-v1' | 'aibo.semantic-view/v1' | 'aibo.semantic-view/v1.1')[];
|
|
11
|
+
resources: readonly PresentationResource[];
|
|
12
|
+
themes?: readonly PresentationTheme[];
|
|
13
|
+
defaultThemeId?: string;
|
|
14
|
+
entry?: string;
|
|
15
|
+
surfaces?: readonly ('controls' | 'semantic' | 'workbench')[];
|
|
16
|
+
};
|
|
17
|
+
export type PresentationResource = {
|
|
18
|
+
path: string;
|
|
19
|
+
sha256: string;
|
|
20
|
+
bytes: number;
|
|
21
|
+
mediaType: 'text/javascript' | 'text/css' | 'image/png' | 'image/webp' | 'font/woff2';
|
|
22
|
+
};
|
|
23
|
+
export type PresentationTheme = {
|
|
24
|
+
id: string;
|
|
25
|
+
label: string;
|
|
26
|
+
colorScheme: 'dark' | 'light';
|
|
27
|
+
tokens: Readonly<Record<string, string>>;
|
|
28
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { JsonValue } from './semantic.js';
|
|
2
|
+
/** Visual trees are presentation output, never capability or semantic contributions. */
|
|
3
|
+
export type PresentationNode = {
|
|
4
|
+
tag: 'div' | 'section' | 'main' | 'aside' | 'header' | 'footer' | 'nav' | 'article' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span' | 'strong' | 'em' | 'del' | 'blockquote' | 'pre' | 'code' | 'ul' | 'ol' | 'li' | 'button' | 'input' | 'textarea' | 'label' | 'select' | 'option' | 'table' | 'thead' | 'tbody' | 'tr' | 'th' | 'td' | 'details' | 'summary' | 'hr' | 'img' | 'svg' | 'path' | 'circle' | 'rect' | 'line' | 'polyline' | 'polygon' | 'g';
|
|
5
|
+
key: string;
|
|
6
|
+
text?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
/** Bounded size hint exposed to skin CSS as --presentation-inline-size. */
|
|
9
|
+
inlineSize?: number;
|
|
10
|
+
/** Button-only horizontal splitter bound to a host input token. */
|
|
11
|
+
resize?: {
|
|
12
|
+
token: string;
|
|
13
|
+
value: number;
|
|
14
|
+
min: number;
|
|
15
|
+
max: number;
|
|
16
|
+
direction: 1 | -1;
|
|
17
|
+
};
|
|
18
|
+
/** Package image path or attachment:<id> from the current conversation; arbitrary URLs are rejected. */
|
|
19
|
+
resource?: string;
|
|
20
|
+
attrs?: Readonly<Record<string, string | boolean>>;
|
|
21
|
+
/** User events become intents; only the host decides whether to execute them. */
|
|
22
|
+
events?: Partial<Record<'click' | 'input' | 'change' | 'keydown', string>>;
|
|
23
|
+
/** Presentation-owned interaction, delivered only to the package Worker. */
|
|
24
|
+
localEvents?: Partial<Record<'click' | 'input' | 'change' | 'keydown', string>>;
|
|
25
|
+
/** Textarea-only primary-modifier Enter shortcut, using an existing host click token. */
|
|
26
|
+
primaryEnter?: string;
|
|
27
|
+
/** Opt into Enter submission and Shift/Ctrl+Enter newline; legacy shortcut behavior is the default. */
|
|
28
|
+
submitOnEnter?: boolean;
|
|
29
|
+
/** Textarea suggestion list; keys reference existing host-action buttons in listKey. */
|
|
30
|
+
suggestions?: {
|
|
31
|
+
listKey: string;
|
|
32
|
+
keys: readonly string[];
|
|
33
|
+
confirmWithTab?: boolean;
|
|
34
|
+
confirmWithPrimary?: boolean;
|
|
35
|
+
categories?: readonly {
|
|
36
|
+
key: string;
|
|
37
|
+
options: readonly string[];
|
|
38
|
+
}[];
|
|
39
|
+
};
|
|
40
|
+
children?: readonly PresentationNode[];
|
|
41
|
+
};
|
|
42
|
+
export type PresentationContext = {
|
|
43
|
+
workspaceId: string | null;
|
|
44
|
+
sessionId: string | null;
|
|
45
|
+
revision: number;
|
|
46
|
+
};
|
|
47
|
+
export type PresentationInput = {
|
|
48
|
+
surface: 'controls' | 'semantic' | 'workbench';
|
|
49
|
+
context: PresentationContext;
|
|
50
|
+
data: JsonValue;
|
|
51
|
+
theme: Readonly<Record<string, string>>;
|
|
52
|
+
};
|
|
53
|
+
export type PresentationIntent = {
|
|
54
|
+
id: string;
|
|
55
|
+
event?: 'click' | 'input' | 'change' | 'keydown';
|
|
56
|
+
editSequence?: number;
|
|
57
|
+
context: PresentationContext;
|
|
58
|
+
value?: string;
|
|
59
|
+
key?: string;
|
|
60
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Snapshot, ActionMessage } from './semantic.js';
|
|
2
|
+
/** Experimental JSON messages; mounting and DOM handles belong to local adapters. */
|
|
3
|
+
export type PresentationSnapshot<View = Snapshot> = {
|
|
4
|
+
schema: 'aibo.presentation/experimental-v1';
|
|
5
|
+
generation: number;
|
|
6
|
+
view: View;
|
|
7
|
+
recovery: {
|
|
8
|
+
selection: string | null;
|
|
9
|
+
detail: string | null;
|
|
10
|
+
focus: string | null;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export type PresentationAction<Action = ActionMessage> = {
|
|
14
|
+
schema: 'aibo.presentation-action/experimental-v1';
|
|
15
|
+
generation: number;
|
|
16
|
+
action: Action;
|
|
17
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { Snapshot } from './semantic.js';
|
|
2
|
+
/** Public data only. Executable renderer implementations stay in the trusted build. */
|
|
3
|
+
export declare const CORE_SEMANTICS: readonly ["collection", "detail", "settings", "inspector"];
|
|
4
|
+
export type CoreSemantic = typeof CORE_SEMANTICS[number];
|
|
5
|
+
export declare const LEGACY_SNAPSHOT_SCHEMAS: readonly Snapshot['schema'][];
|
|
6
|
+
export declare const SUPPORTED_SNAPSHOT_SCHEMAS: readonly Snapshot['schema'][];
|
|
7
|
+
export type RendererDescriptor = {
|
|
8
|
+
id: string;
|
|
9
|
+
version: string;
|
|
10
|
+
/** Version of the required semantic vocabulary, distinct from snapshot wire versions. */
|
|
11
|
+
semanticVersion: '1.0.0';
|
|
12
|
+
/** Omission retains only the original read-only snapshot readers. */
|
|
13
|
+
snapshotSchemas?: readonly Snapshot['schema'][];
|
|
14
|
+
core: readonly CoreSemantic[];
|
|
15
|
+
optional: readonly {
|
|
16
|
+
id: string;
|
|
17
|
+
version: string;
|
|
18
|
+
semantic: CoreSemantic;
|
|
19
|
+
}[];
|
|
20
|
+
};
|
|
21
|
+
export type PresentationPreference = {
|
|
22
|
+
id: string;
|
|
23
|
+
version: string;
|
|
24
|
+
};
|
|
25
|
+
export type PresentationChoice = {
|
|
26
|
+
kind: 'specialized';
|
|
27
|
+
id: string;
|
|
28
|
+
snapshot: Snapshot;
|
|
29
|
+
} | {
|
|
30
|
+
kind: 'core';
|
|
31
|
+
semantic: CoreSemantic;
|
|
32
|
+
snapshot: Snapshot;
|
|
33
|
+
reason: string | null;
|
|
34
|
+
};
|
package/dist/renderer.js
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** Public data only. Executable renderer implementations stay in the trusted build. */
|
|
2
|
+
export const CORE_SEMANTICS = ['collection', 'detail', 'settings', 'inspector'];
|
|
3
|
+
export const LEGACY_SNAPSHOT_SCHEMAS = ['aibo.semantic-view/experimental-v1', 'aibo.semantic-view/v1'];
|
|
4
|
+
export const SUPPORTED_SNAPSHOT_SCHEMAS = [...LEGACY_SNAPSHOT_SCHEMAS, 'aibo.semantic-view/v1.1'];
|