@xingular/harness 1.2.0 → 1.3.1-unstable.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.
- package/CHANGELOG.md +63 -0
- package/README.md +26 -17
- package/builtin/skills/plugin-authoring/SKILL.md +34 -0
- package/dist/cli.js +7362 -6239
- package/dist/sdk/agents/builtin.js +3 -3
- package/dist/sdk/agents/planResearch.d.ts +23 -1
- package/dist/sdk/agents/planResearch.js +71 -8
- package/dist/sdk/agents/profiles.d.ts +16 -4
- package/dist/sdk/agents/profiles.js +75 -12
- package/dist/sdk/annotations/bridge.d.ts +2 -0
- package/dist/sdk/annotations/bridge.js +4 -0
- package/dist/sdk/annotations/capture.d.ts +44 -2
- package/dist/sdk/annotations/capture.js +104 -3
- package/dist/sdk/annotations/delivery.d.ts +24 -17
- package/dist/sdk/annotations/delivery.js +82 -49
- package/dist/sdk/annotations/inspect.js +7 -6
- package/dist/sdk/annotations/pageScript.js +4 -4
- package/dist/sdk/annotations/part.d.ts +0 -2
- package/dist/sdk/annotations/part.js +4 -33
- package/dist/sdk/annotations/queue.d.ts +2 -2
- package/dist/sdk/annotations/queue.js +12 -7
- package/dist/sdk/annotations/serverMethods.js +11 -7
- package/dist/sdk/annotations/store.d.ts +13 -21
- package/dist/sdk/annotations/store.js +47 -37
- package/dist/sdk/capabilities/runSnapshot.js +10 -4
- package/dist/sdk/commands/list.js +2 -0
- package/dist/sdk/commands/registry.d.ts +11 -3
- package/dist/sdk/commands/registry.js +3 -2
- package/dist/sdk/core/links.d.ts +51 -0
- package/dist/sdk/core/links.js +155 -0
- package/dist/sdk/core/shell.d.ts +20 -0
- package/dist/sdk/core/shell.js +73 -0
- package/dist/sdk/core/workspaceBashTool.d.ts +17 -1
- package/dist/sdk/core/workspaceBashTool.js +16 -2
- package/dist/sdk/core/workspaceSandbox.d.ts +10 -0
- package/dist/sdk/core/workspaceSandbox.js +52 -12
- package/dist/sdk/core/workspaceWriteOperations.d.ts +11 -0
- package/dist/sdk/core/workspaceWriteOperations.js +26 -8
- package/dist/sdk/doctor/checks.js +71 -12
- package/dist/sdk/harness.d.ts +5 -0
- package/dist/sdk/harness.js +11 -6
- package/dist/sdk/hub/hub.js +5 -3
- package/dist/sdk/index.d.ts +3 -2
- package/dist/sdk/index.js +2 -1
- package/dist/sdk/plugins/builtin.js +14 -9
- package/dist/sdk/plugins/builtinRegistry.d.ts +3 -1
- package/dist/sdk/plugins/builtinRegistry.js +9 -3
- package/dist/sdk/plugins/discover.d.ts +7 -1
- package/dist/sdk/plugins/discover.js +41 -2
- package/dist/sdk/plugins/identity.js +1 -1
- package/dist/sdk/plugins/install.d.ts +6 -2
- package/dist/sdk/plugins/install.js +29 -5
- package/dist/sdk/plugins/inventory.js +3 -3
- package/dist/sdk/plugins/manifest.d.ts +2 -0
- package/dist/sdk/plugins/manifest.js +21 -4
- package/dist/sdk/plugins/plugins.d.ts +2 -0
- package/dist/sdk/plugins/plugins.js +1 -0
- package/dist/sdk/plugins/proposals.d.ts +17 -0
- package/dist/sdk/plugins/proposals.js +147 -0
- package/dist/sdk/plugins/types.d.ts +1 -1
- package/dist/sdk/plugins/types.js +1 -1
- package/dist/sdk/prompt/compile.d.ts +13 -4
- package/dist/sdk/prompt/compile.js +46 -20
- package/dist/sdk/prompt/standard.d.ts +1 -1
- package/dist/sdk/prompt/standard.js +1 -1
- package/dist/sdk/server/methods.js +14 -2
- package/dist/sdk/sessions/compactionCheckpoint.d.ts +3 -3
- package/dist/sdk/sessions/compactionCheckpoint.js +12 -12
- package/dist/sdk/sessions/continuation.d.ts +4 -2
- package/dist/sdk/sessions/continuation.js +7 -6
- package/dist/sdk/sessions/contracts.d.ts +22 -4
- package/dist/sdk/sessions/contracts.js +12 -7
- package/dist/sdk/sessions/planMode.js +2 -2
- package/dist/sdk/sessions/runStore.js +3 -1
- package/dist/sdk/sessions/runner.js +2 -2
- package/dist/sdk/sessions/sessionState.d.ts +13 -0
- package/dist/sdk/sessions/sessionState.js +31 -0
- package/dist/sdk/sessions/sessions.d.ts +7 -0
- package/dist/sdk/sessions/sessions.js +73 -15
- package/dist/sdk/sessions/subagentService.d.ts +15 -0
- package/dist/sdk/sessions/subagentService.js +195 -55
- package/dist/sdk/sessions/subagents.d.ts +10 -1
- package/dist/sdk/sessions/subagents.js +4 -0
- package/dist/sdk/sessions/workSlice.d.ts +8 -5
- package/dist/sdk/sessions/workSlice.js +77 -45
- package/dist/sdk/terminal/controller.d.ts +20 -0
- package/dist/sdk/terminal/controller.js +43 -18
- package/dist/sdk/terminal/opentui/ansi.d.ts +25 -0
- package/dist/sdk/terminal/opentui/ansi.js +192 -0
- package/dist/sdk/terminal/opentui/model.d.ts +163 -0
- package/dist/sdk/terminal/opentui/model.js +482 -0
- package/dist/sdk/terminal/opentui/subagentsWidget.d.ts +3 -3
- package/dist/sdk/terminal/opentui/subagentsWidget.js +7 -5
- package/dist/sdk/terminal/opentui/theme.d.ts +2 -0
- package/dist/sdk/terminal/opentui/theme.js +2 -0
- package/dist/sdk/terminal/piExtension.js +98 -15
- package/dist/sdk/terminal/subagentMonitor.d.ts +17 -4
- package/dist/sdk/terminal/subagentMonitor.js +29 -8
- package/dist/sdk/terminal/terminals.d.ts +16 -0
- package/dist/sdk/terminal/terminals.js +130 -26
- package/dist/sdk/terminal/trajectory.d.ts +6 -1
- package/dist/sdk/terminal/trajectory.js +8 -0
- package/dist/sdk/terminal/tui/annotateCommand.d.ts +5 -1
- package/dist/sdk/terminal/tui/annotateCommand.js +21 -7
- package/dist/sdk/terminal/tui/annotateSend.d.ts +30 -0
- package/dist/sdk/terminal/tui/annotateSend.js +40 -0
- package/dist/sdk/terminal/tui/chrome.d.ts +4 -0
- package/dist/sdk/terminal/tui/chrome.js +13 -0
- package/dist/sdk/terminal/tui/commandPages.d.ts +1 -1
- package/dist/sdk/terminal/tui/commandPages.js +16 -11
- package/dist/sdk/terminal/tui/commands.d.ts +4 -0
- package/dist/sdk/terminal/tui/commands.js +12 -2
- package/dist/sdk/terminal/tui/dialogs.js +1 -0
- package/dist/sdk/terminal/tui/pageOverlay.d.ts +3 -0
- package/dist/sdk/terminal/tui/pageOverlay.js +25 -7
- package/dist/sdk/terminal/tui/pages/agentsPage.js +5 -2
- package/dist/sdk/terminal/tui/pages/annotatePage.d.ts +70 -16
- package/dist/sdk/terminal/tui/pages/annotatePage.js +349 -115
- package/dist/sdk/terminal/tui/pages/browserPage.js +5 -4
- package/dist/sdk/terminal/tui/pages/hubPage.d.ts +14 -1
- package/dist/sdk/terminal/tui/pages/hubPage.js +192 -28
- package/dist/sdk/terminal/tui/pages/pluginsPage.d.ts +14 -1
- package/dist/sdk/terminal/tui/pages/pluginsPage.js +295 -25
- package/dist/sdk/terminal/tui/pages/subagentsPage.js +8 -5
- package/dist/sdk/terminal/tui/pages/usagePage.d.ts +4 -2
- package/dist/sdk/terminal/tui/pages/usagePage.js +39 -12
- package/dist/sdk/terminal/tui/pluginCommands.d.ts +1 -1
- package/dist/sdk/terminal/tui/pluginCommands.js +13 -3
- package/dist/sdk/tools/defaultSkills.d.ts +4 -0
- package/dist/sdk/tools/defaultSkills.js +20 -0
- package/dist/sdk/tools/definitions.d.ts +3 -1
- package/dist/sdk/tools/definitions.js +17 -1
- package/dist/sdk/tools/dispatch.js +12 -0
- package/dist/sdk/tools/harnessTools.js +1 -1
- package/dist/sdk/tools/sessionName.d.ts +9 -0
- package/dist/sdk/tools/sessionName.js +58 -11
- package/dist/sdk/tools/spawnSubagent.js +9 -7
- package/dist/sdk/tools/todo.d.ts +15 -0
- package/dist/sdk/tools/todo.js +64 -0
- package/dist/sdk/world/world.d.ts +0 -2
- package/dist/terminal-opentui.js +3331 -1584
- package/dist/terminal-pi.js +421 -133
- package/docs/README.md +3 -0
- package/docs/architecture/00-overview.md +1 -1
- package/docs/architecture/01-extension-points.md +1 -1
- package/docs/architecture/02-sessions-and-runs.md +73 -36
- package/docs/architecture/03-variants.md +1 -3
- package/docs/architecture/04-prompt.md +24 -13
- package/docs/architecture/06-plugins-and-capabilities.md +46 -10
- package/docs/architecture/07-tools-and-gate.md +49 -8
- package/docs/architecture/09-accounts-and-connectors.md +8 -2
- package/docs/architecture/10-server-protocol.md +68 -16
- package/docs/architecture/11-terminal.md +94 -45
- package/docs/architecture/12-storage.md +1 -0
- package/docs/architecture/13-world-tools.md +8 -6
- package/docs/architecture/14-surfaces-and-parity.md +4 -1
- package/docs/architecture/README.md +20 -18
- package/docs/architecture/proposals/PROP-0006-run-checklist.md +2 -0
- package/docs/architecture/proposals/PROP-0018-annotation-queue-and-app-targets.md +6 -2
- package/docs/architecture/proposals/PROP-0041-bounded-work-slices.md +32 -21
- package/docs/architecture/proposals/PROP-0044-work-slice-defaults.md +93 -0
- package/docs/architecture/proposals/PROP-0045-rename-checklist-to-todo.md +132 -0
- package/docs/architecture/proposals/PROP-0046-progress-aware-stall-guards.md +82 -0
- package/docs/architecture/proposals/PROP-0047-plugins-hub-separation.md +122 -0
- package/docs/architecture/proposals/PROP-0048-simple-annotate.md +85 -0
- package/docs/architecture/proposals/README.md +11 -6
- package/docs/decisions/ADR-0039-progress-aware-stall-guards.md +39 -0
- package/docs/decisions/ADR-0040-architecture-change-workflow.md +31 -0
- package/docs/decisions/ADR-0041-plugins-hub-separation.md +41 -0
- package/docs/decisions/ADR-0042-windows-shell-without-sandbox.md +40 -0
- package/docs/decisions/ADR-0043-parents-continue-stopped-subagents.md +49 -0
- package/docs/decisions/ADR-0044-annotations-pending-or-sent.md +24 -0
- package/docs/decisions/ADR-0045-default-plugin-authoring-skill.md +9 -0
- package/docs/decisions/ADR-0046-hash-bound-plugin-proposals.md +20 -0
- package/docs/decisions/ADR-0047-links-open-with-the-os-handler.md +47 -0
- package/docs/doctor.md +14 -1
- package/docs/parity.md +16 -13
- package/docs/releases/1.3.0.md +21 -0
- package/docs/releases/1.3.1-unstable.1.md +8 -0
- package/docs/releases/README.md +9 -6
- package/docs/terminal-tui.md +127 -65
- package/package.json +1 -1
- package/dist/sdk/terminal/tui/pages/notesPage.d.ts +0 -75
- package/dist/sdk/terminal/tui/pages/notesPage.js +0 -201
- package/dist/sdk/tools/checklist.d.ts +0 -9
- package/dist/sdk/tools/checklist.js +0 -55
|
@@ -183,7 +183,7 @@ export function createTerminalCommands(host) {
|
|
|
183
183
|
const coreNames = coreCommandNames(session);
|
|
184
184
|
const aliases = new Set(LEGACY_BUILTIN_COMMAND_ALIASES.keys());
|
|
185
185
|
for (const command of pluginCommands) {
|
|
186
|
-
if (coreNames.has(command.name))
|
|
186
|
+
if (command.rootOnly || coreNames.has(command.name))
|
|
187
187
|
continue;
|
|
188
188
|
aliases.add(`plugin:${command.name}`);
|
|
189
189
|
if (command.legacyBare)
|
|
@@ -200,11 +200,13 @@ export function createTerminalCommands(host) {
|
|
|
200
200
|
const prompts = session.resourceLoader.getPrompts().prompts;
|
|
201
201
|
const commands = new Map(BUILTINS.map(command => [command.name, command]));
|
|
202
202
|
for (const command of pluginCommands) {
|
|
203
|
+
if (command.rootOnly)
|
|
204
|
+
continue;
|
|
203
205
|
const invocation = `${command.prefix}:${command.name}`;
|
|
204
206
|
commands.set(invocation, { name: invocation, description: command.description, group: 'Plugins' });
|
|
205
207
|
}
|
|
206
208
|
for (const module of BUILTIN_PLUGIN_REGISTRY.modules) {
|
|
207
|
-
const defaultCommand = module.defaultCommand && BUILTIN_PLUGIN_REGISTRY.
|
|
209
|
+
const defaultCommand = module.defaultCommand && BUILTIN_PLUGIN_REGISTRY.defaultCommand(module.commandPrefix ?? module.descriptor.id);
|
|
208
210
|
if (defaultCommand) {
|
|
209
211
|
const invocation = `${defaultCommand.prefix}:`;
|
|
210
212
|
commands.set(invocation, { name: invocation, description: defaultCommand.description, group: 'Plugins' });
|
|
@@ -399,6 +401,14 @@ export function createTerminalCommands(host) {
|
|
|
399
401
|
case 'trajectory':
|
|
400
402
|
await openPage('trajectory', { runId: argument });
|
|
401
403
|
break;
|
|
404
|
+
case 'todo': {
|
|
405
|
+
const items = await host.todo();
|
|
406
|
+
if (!items.length)
|
|
407
|
+
notify('No todo list in this reply yet. The agent writes one with todo_write for multi-step work.');
|
|
408
|
+
else
|
|
409
|
+
host.showTodo(items);
|
|
410
|
+
break;
|
|
411
|
+
}
|
|
402
412
|
case 'subagents':
|
|
403
413
|
await openPage('subagents');
|
|
404
414
|
break;
|
|
@@ -15,7 +15,10 @@ export declare class PageOverlay implements Component, Focusable {
|
|
|
15
15
|
private disposed;
|
|
16
16
|
private pointerLayout?;
|
|
17
17
|
private hoveredTab?;
|
|
18
|
+
private activated;
|
|
18
19
|
constructor(options: PageOverlayOptions);
|
|
20
|
+
/** The host shows this overlay now: the page starts. */
|
|
21
|
+
mounted(): void;
|
|
19
22
|
get page(): TerminalPage;
|
|
20
23
|
get focused(): boolean;
|
|
21
24
|
set focused(value: boolean);
|
|
@@ -7,9 +7,20 @@ export class PageOverlay {
|
|
|
7
7
|
disposed = false;
|
|
8
8
|
pointerLayout;
|
|
9
9
|
hoveredTab;
|
|
10
|
+
activated = false;
|
|
10
11
|
constructor(options) {
|
|
11
12
|
this.options = options;
|
|
12
|
-
|
|
13
|
+
// A page may open a dialog as it starts. It starts once its own overlay is showing, so the dialog
|
|
14
|
+
// lands above it; a host that never reports mounting still starts it on the next turn.
|
|
15
|
+
const fallback = setTimeout(() => this.mounted(), 0);
|
|
16
|
+
fallback.unref?.();
|
|
17
|
+
}
|
|
18
|
+
/** The host shows this overlay now: the page starts. */
|
|
19
|
+
mounted() {
|
|
20
|
+
if (this.activated || this.disposed)
|
|
21
|
+
return;
|
|
22
|
+
this.activated = true;
|
|
23
|
+
this.options.page.activate?.();
|
|
13
24
|
}
|
|
14
25
|
get page() { return this.options.page; }
|
|
15
26
|
get focused() { return this.focusedValue; }
|
|
@@ -132,20 +143,27 @@ export class PageOverlay {
|
|
|
132
143
|
contentWidth: contentWidth(width),
|
|
133
144
|
centered
|
|
134
145
|
};
|
|
135
|
-
const
|
|
136
|
-
const
|
|
137
|
-
|
|
146
|
+
const pageHint = page.hint();
|
|
147
|
+
const returnsToPage = pageHint.split(' · ').includes('Esc back');
|
|
148
|
+
const escapeHint = page.ownsNavigation ? 'Esc back/close' : returnsToPage ? 'Esc back' : 'Esc close';
|
|
149
|
+
const fullFooter = page.ownsNavigation ? `${escapeHint} · ${pageHint}` : [
|
|
150
|
+
pageHint,
|
|
138
151
|
tabs.length > 1 ? 'Tab/Shift+Tab sections' : '',
|
|
139
|
-
escapeHint
|
|
152
|
+
returnsToPage ? '' : escapeHint
|
|
140
153
|
].filter(Boolean).join(' · ');
|
|
141
154
|
const footerWidth = Math.max(0, width - CHROME_PAD * 2);
|
|
142
|
-
const primaryHint =
|
|
155
|
+
const primaryHint = pageHint.split(' · ')[0] ?? '';
|
|
143
156
|
const compactFooter = [
|
|
144
157
|
primaryHint,
|
|
145
158
|
!page.ownsNavigation && tabs.length > 1 ? 'Tab/⇧Tab' : '',
|
|
146
159
|
escapeHint
|
|
147
160
|
].filter(Boolean).join(' · ');
|
|
148
|
-
const
|
|
161
|
+
const navigationFooter = [!page.ownsNavigation && tabs.length > 1 ? 'Tab/⇧Tab' : '', escapeHint].filter(Boolean).join(' · ');
|
|
162
|
+
const footer = visibleWidth(fullFooter) <= footerWidth
|
|
163
|
+
? fullFooter
|
|
164
|
+
: visibleWidth(compactFooter) <= footerWidth
|
|
165
|
+
? compactFooter
|
|
166
|
+
: visibleWidth(navigationFooter) <= footerWidth ? navigationFooter : escapeHint;
|
|
149
167
|
return pageFrame({
|
|
150
168
|
title: '',
|
|
151
169
|
headerLine: tabStrip(tabs, page.activeTab(), inner, theme, 'top', this.hoveredTab),
|
|
@@ -12,7 +12,7 @@ export const AGENT_SCOPES = {
|
|
|
12
12
|
global: 'Global: every folder'
|
|
13
13
|
};
|
|
14
14
|
const TABS = [{ id: 'agents', title: 'Agents' }];
|
|
15
|
-
const GROUP = { builtin: 'Built-in', global: 'Global', project: 'Project', variant: 'From the variant' };
|
|
15
|
+
const GROUP = { builtin: 'Built-in', global: 'Global', project: 'Project', variant: 'From the variant', plugin: 'From a plugin' };
|
|
16
16
|
function clean(value) {
|
|
17
17
|
return stripTerminalSequences(value).replace(/[\x00-\x08\x0b-\x1f\x7f]/g, ' ').replace(/[ \t]+/g, ' ').trim();
|
|
18
18
|
}
|
|
@@ -57,7 +57,7 @@ export class AgentsPage {
|
|
|
57
57
|
if (!overview)
|
|
58
58
|
return [];
|
|
59
59
|
const rows = [{ id: 'new', label: 'New profile', group: 'Actions', detail: 'from a template, then opens in your editor', tone: 'accent', data: { kind: 'new' } }];
|
|
60
|
-
for (const source of ['builtin', 'global', 'project', 'variant']) {
|
|
60
|
+
for (const source of ['builtin', 'global', 'project', 'variant', 'plugin']) {
|
|
61
61
|
for (const profile of overview.profiles.filter(entry => entry.source === source)) {
|
|
62
62
|
rows.push({
|
|
63
63
|
id: `profile:${profile.name}`, label: profile.name, group: GROUP[source], detail: clean(profile.description), tone: 'muted',
|
|
@@ -123,6 +123,9 @@ export class AgentsPage {
|
|
|
123
123
|
}
|
|
124
124
|
const { profile } = row;
|
|
125
125
|
const own = profile.source === 'global' || profile.source === 'project' ? profile.source : null;
|
|
126
|
+
// A package's profile comes with the package: it is switched on and off on the plugins page.
|
|
127
|
+
if (profile.source === 'plugin')
|
|
128
|
+
return;
|
|
126
129
|
const choice = await this.options.ui.select(`${profile.name} · ${GROUP[profile.source]}`, [...(own ? [AGENT_ACTIONS.edit] : []), AGENT_ACTIONS.copy, ...(own ? [AGENT_ACTIONS.remove] : [])]);
|
|
127
130
|
if (choice === AGENT_ACTIONS.edit && profile.path)
|
|
128
131
|
return this.attempt(() => this.open(profile.path));
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The annotate
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
2
|
+
* The annotate page (`/annotate:` and `/annotate:notes`, PROP-0018, PROP-0048): one full page with
|
|
3
|
+
* two tabs. **Annotate** is the panel beside the window being inspected: the target and its address
|
|
4
|
+
* or app are chosen in the page itself, the inspector outlines a component, and a click opens a
|
|
5
|
+
* popover with two buttons, Annotate and Annotate & send. Every annotation is shared with this
|
|
6
|
+
* session at once; `s` sends all the unsent ones. **All annotations** is the searchable list of every
|
|
7
|
+
* saved annotation.
|
|
7
8
|
*/
|
|
8
9
|
import type { Theme } from '@earendil-works/pi-coding-agent';
|
|
9
10
|
import type { MenuCall, MenuUi } from "../../pluginMenu.js";
|
|
@@ -22,7 +23,12 @@ export type AnnotateStart = {
|
|
|
22
23
|
} | {
|
|
23
24
|
kind: 'bridge';
|
|
24
25
|
name?: string;
|
|
26
|
+
}
|
|
27
|
+
/** Opens on the list of apps with a DevTools port. */
|
|
28
|
+
| {
|
|
29
|
+
kind: 'apps';
|
|
25
30
|
};
|
|
31
|
+
export type AnnotateTab = 'annotate' | 'all';
|
|
26
32
|
export interface AnnotatePageOptions {
|
|
27
33
|
theme(): Theme;
|
|
28
34
|
call: MenuCall;
|
|
@@ -31,61 +37,109 @@ export interface AnnotatePageOptions {
|
|
|
31
37
|
};
|
|
32
38
|
changed(): void;
|
|
33
39
|
start: AnnotateStart;
|
|
40
|
+
initialTab?: AnnotateTab;
|
|
34
41
|
/** How often the inspector is asked for the person's next comment, in milliseconds. */
|
|
35
42
|
pollMs?: number;
|
|
36
43
|
}
|
|
37
|
-
|
|
44
|
+
interface DevToolsApp {
|
|
45
|
+
endpoint: string;
|
|
46
|
+
port: number;
|
|
47
|
+
name: string;
|
|
48
|
+
browser: string;
|
|
49
|
+
electron: boolean;
|
|
50
|
+
windows: number;
|
|
51
|
+
}
|
|
52
|
+
type NoteRow = {
|
|
38
53
|
kind: 'note';
|
|
39
54
|
note: Note;
|
|
40
55
|
};
|
|
56
|
+
type AppRow = {
|
|
57
|
+
kind: 'app';
|
|
58
|
+
app: DevToolsApp;
|
|
59
|
+
} | {
|
|
60
|
+
kind: 'port';
|
|
61
|
+
} | {
|
|
62
|
+
kind: 'launch';
|
|
63
|
+
} | {
|
|
64
|
+
kind: 'bridge';
|
|
65
|
+
} | {
|
|
66
|
+
kind: 'web';
|
|
67
|
+
};
|
|
41
68
|
export declare const ANNOTATE_ACTIONS: {
|
|
42
69
|
readonly reveal: "Show it in the window";
|
|
43
|
-
readonly send: "Send
|
|
44
|
-
readonly confirm: "Confirm
|
|
45
|
-
readonly queue: "Ask the agent to fix it (add to queue)";
|
|
46
|
-
readonly dequeue: "Take it out of the queue";
|
|
70
|
+
readonly send: "Send it now";
|
|
71
|
+
readonly confirm: "Confirm and send it (it came from the page)";
|
|
47
72
|
readonly edit: "Edit the comment";
|
|
48
73
|
readonly resolve: "Resolve";
|
|
74
|
+
readonly reopen: "Reopen";
|
|
75
|
+
readonly share: "Share it with this session";
|
|
76
|
+
readonly unshare: "Stop sharing it with this session";
|
|
49
77
|
readonly delete: "Delete";
|
|
50
78
|
};
|
|
51
79
|
export declare function describeTarget(target: NoteTarget): string;
|
|
52
|
-
/** Which
|
|
53
|
-
export declare function section(note: Note, sessionId: string | null): '
|
|
80
|
+
/** Which group of the Annotate tab a note belongs in, for this session; null when it is not shown there. */
|
|
81
|
+
export declare function section(note: Note, sessionId: string | null): 'Unsent' | 'Sent' | null;
|
|
54
82
|
export declare class AnnotatePage implements TerminalPage {
|
|
55
83
|
private readonly options;
|
|
56
84
|
presentation: "fullscreen";
|
|
85
|
+
private tab;
|
|
86
|
+
private view;
|
|
87
|
+
private field;
|
|
57
88
|
private notes;
|
|
58
89
|
private sessionId;
|
|
59
90
|
private target;
|
|
91
|
+
private apps;
|
|
60
92
|
private bridgeSnippet;
|
|
61
93
|
private error;
|
|
62
94
|
private busy;
|
|
63
95
|
private disposed;
|
|
64
96
|
private polling;
|
|
97
|
+
private focusedValue;
|
|
65
98
|
private timer;
|
|
66
99
|
private refreshes;
|
|
67
|
-
private
|
|
100
|
+
private listTop;
|
|
101
|
+
private readonly noteList;
|
|
102
|
+
private readonly appList;
|
|
103
|
+
private readonly allList;
|
|
68
104
|
constructor(options: AnnotatePageOptions);
|
|
69
105
|
get focused(): boolean;
|
|
70
106
|
set focused(value: boolean);
|
|
107
|
+
private syncFocus;
|
|
71
108
|
tabs(): readonly TabInfo[];
|
|
72
109
|
activeTab(): string;
|
|
110
|
+
selectTab(id: string): void;
|
|
73
111
|
hint(): string;
|
|
74
112
|
activate(): void;
|
|
75
113
|
dispose(): void;
|
|
76
114
|
private start;
|
|
115
|
+
/** Shows the target that is still open, with the inspector on again; false when no window is open. */
|
|
116
|
+
private restore;
|
|
77
117
|
private refreshTarget;
|
|
118
|
+
private openPage;
|
|
119
|
+
private attachApp;
|
|
120
|
+
private attachBridge;
|
|
121
|
+
private openField;
|
|
122
|
+
private closeField;
|
|
123
|
+
private submitField;
|
|
124
|
+
private showApps;
|
|
125
|
+
appRows(): ListRow<AppRow>[];
|
|
126
|
+
private chooseApp;
|
|
78
127
|
reload(): Promise<void>;
|
|
79
|
-
|
|
80
|
-
|
|
128
|
+
/** The Annotate tab: this session's unsent and sent annotations. */
|
|
129
|
+
rows(): ListRow<NoteRow>[];
|
|
130
|
+
private shared;
|
|
131
|
+
/** The All annotations tab: every saved annotation. */
|
|
132
|
+
allRows(): ListRow<NoteRow>[];
|
|
81
133
|
/** Polls the inspector for the person's next comment, and the notes every few seconds. */
|
|
82
134
|
private schedule;
|
|
83
135
|
private tick;
|
|
84
136
|
private toggleInspect;
|
|
137
|
+
/** Runs one action at a time; a key pressed meanwhile is answered, never dropped silently. */
|
|
85
138
|
private attempt;
|
|
86
|
-
|
|
139
|
+
sendAll(): Promise<void>;
|
|
87
140
|
private chooseWindow;
|
|
88
141
|
private noteMenu;
|
|
142
|
+
private currentList;
|
|
89
143
|
handleMouse(event: TerminalMouseInput): import("@earendil-works/pi-tui").TuiMouseEventResult | undefined;
|
|
90
144
|
handleInput(data: string): boolean;
|
|
91
145
|
private header;
|