runpane 2.4.130 → 2.4.131
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 +13 -0
- package/dist/agentTasks.d.ts +8 -0
- package/dist/agentTasks.d.ts.map +1 -0
- package/dist/agentTasks.js +123 -0
- package/dist/agentTasks.js.map +1 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +30 -0
- package/dist/cli.js.map +1 -1
- package/dist/commands.d.ts +7 -0
- package/dist/commands.d.ts.map +1 -1
- package/dist/commands.js +73 -10
- package/dist/commands.js.map +1 -1
- package/dist/daemonActions.d.ts +16 -0
- package/dist/daemonActions.d.ts.map +1 -0
- package/dist/daemonActions.js +98 -0
- package/dist/daemonActions.js.map +1 -0
- package/dist/docs-index.json +1 -0
- package/dist/docs.d.ts +18 -0
- package/dist/docs.d.ts.map +1 -0
- package/dist/docs.js +123 -0
- package/dist/docs.js.map +1 -0
- package/dist/generated/contract.d.ts +1337 -12
- package/dist/generated/contract.d.ts.map +1 -1
- package/dist/generated/contract.js +3763 -1121
- package/dist/generated/contract.js.map +1 -1
- package/dist/links.d.ts +13 -0
- package/dist/links.d.ts.map +1 -0
- package/dist/links.js +57 -0
- package/dist/links.js.map +1 -0
- package/dist/localControl.d.ts +220 -1
- package/dist/localControl.d.ts.map +1 -1
- package/dist/localControl.js +34 -16
- package/dist/localControl.js.map +1 -1
- package/dist/mcp.d.ts +12 -0
- package/dist/mcp.d.ts.map +1 -0
- package/dist/mcp.js +189 -0
- package/dist/mcp.js.map +1 -0
- package/dist/mcpSdk.d.ts +3 -0
- package/dist/mcpSdk.d.ts.map +1 -0
- package/dist/mcpSdk.js +74 -0
- package/dist/mcpSdk.js.LEGAL.txt +8 -0
- package/dist/mcpTools.d.ts +78 -0
- package/dist/mcpTools.d.ts.map +1 -0
- package/dist/mcpTools.js +195 -0
- package/dist/mcpTools.js.map +1 -0
- package/package.json +5 -2
package/dist/links.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ParsedArgs } from './commands';
|
|
2
|
+
/** A numeric repository id, as app channels and repo links take it. */
|
|
3
|
+
export declare function parseRepoId(repo: string): number;
|
|
4
|
+
interface LinkTarget {
|
|
5
|
+
kind: 'pane' | 'repo' | 'session';
|
|
6
|
+
id: string;
|
|
7
|
+
panelId?: string;
|
|
8
|
+
}
|
|
9
|
+
/** `pane://open?pane=<id>[&panel=<id>]`, `pane://open?repo=<id>`, or `pane://open?session=<id>`. */
|
|
10
|
+
export declare function buildPaneLink(target: LinkTarget): string;
|
|
11
|
+
export declare function runLinksCreate(parsed: ParsedArgs): number;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=links.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"links.d.ts","sourceRoot":"","sources":["../src/links.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAM7C,uEAAuE;AACvE,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAGhD;AAED,UAAU,UAAU;IAClB,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,oGAAoG;AACpG,wBAAgB,aAAa,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAIxD;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CASzD"}
|
package/dist/links.js
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseRepoId = parseRepoId;
|
|
4
|
+
exports.buildPaneLink = buildPaneLink;
|
|
5
|
+
exports.runLinksCreate = runLinksCreate;
|
|
6
|
+
/** Ids that may appear in a pane:// link. Pane's URL handler applies the same rule. */
|
|
7
|
+
const LINK_ID = /^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/;
|
|
8
|
+
const REPO_ID = /^[1-9][0-9]{0,15}$/;
|
|
9
|
+
/** A numeric repository id, as app channels and repo links take it. */
|
|
10
|
+
function parseRepoId(repo) {
|
|
11
|
+
if (!REPO_ID.test(repo))
|
|
12
|
+
throw new Error('--repo must be a numeric repository id. Run `runpane repos list` to find it.');
|
|
13
|
+
return Number(repo);
|
|
14
|
+
}
|
|
15
|
+
/** `pane://open?pane=<id>[&panel=<id>]`, `pane://open?repo=<id>`, or `pane://open?session=<id>`. */
|
|
16
|
+
function buildPaneLink(target) {
|
|
17
|
+
const params = new URLSearchParams({ [target.kind]: target.id });
|
|
18
|
+
if (target.panelId)
|
|
19
|
+
params.set('panel', target.panelId);
|
|
20
|
+
return `pane://open?${params.toString()}`;
|
|
21
|
+
}
|
|
22
|
+
function runLinksCreate(parsed) {
|
|
23
|
+
const target = linkTargetFrom(parsed);
|
|
24
|
+
const url = buildPaneLink(target);
|
|
25
|
+
if (parsed.json) {
|
|
26
|
+
console.log(JSON.stringify({ ok: true, url, target }, null, 2));
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
console.log(url);
|
|
30
|
+
}
|
|
31
|
+
return 0;
|
|
32
|
+
}
|
|
33
|
+
function linkTargetFrom(parsed) {
|
|
34
|
+
const given = [parsed.paneId && 'pane', parsed.repo && 'repo', parsed.sessionId && 'session'].filter(Boolean);
|
|
35
|
+
if (given.length !== 1) {
|
|
36
|
+
throw new Error('runpane links create needs exactly one of --pane, --repo, or --session.');
|
|
37
|
+
}
|
|
38
|
+
if (parsed.panelId && !parsed.paneId) {
|
|
39
|
+
throw new Error('--panel needs --pane: a panel link opens the panel inside its Pane.');
|
|
40
|
+
}
|
|
41
|
+
if (parsed.repo) {
|
|
42
|
+
return { kind: 'repo', id: String(parseRepoId(parsed.repo)) };
|
|
43
|
+
}
|
|
44
|
+
const kind = parsed.paneId ? 'pane' : 'session';
|
|
45
|
+
const id = requireId(parsed.paneId ?? parsed.sessionId, kind === 'pane' ? '--pane' : '--session', kind === 'pane' ? 'runpane panes list' : 'runpane sessions list');
|
|
46
|
+
const target = { kind, id };
|
|
47
|
+
if (parsed.panelId)
|
|
48
|
+
target.panelId = requireId(parsed.panelId, '--panel', 'runpane panels list');
|
|
49
|
+
return target;
|
|
50
|
+
}
|
|
51
|
+
function requireId(value, flag, lister) {
|
|
52
|
+
if (value === undefined || !LINK_ID.test(value)) {
|
|
53
|
+
throw new Error(`${flag} must be an id (letters, digits, ".", "_", "-"). Run \`${lister}\` to find it.`);
|
|
54
|
+
}
|
|
55
|
+
return value;
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=links.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"links.js","sourceRoot":"","sources":["../src/links.ts"],"names":[],"mappings":";;AAOA,kCAGC;AASD,sCAIC;AAED,wCASC;AAhCD,uFAAuF;AACvF,MAAM,OAAO,GAAG,oCAAoC,CAAC;AACrD,MAAM,OAAO,GAAG,oBAAoB,CAAC;AAErC,uEAAuE;AACvE,SAAgB,WAAW,CAAC,IAAY;IACtC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,8EAA8E,CAAC,CAAC;IACzH,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC;AACtB,CAAC;AAQD,oGAAoG;AACpG,SAAgB,aAAa,CAAC,MAAkB;IAC9C,MAAM,MAAM,GAAG,IAAI,eAAe,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC;IACjE,IAAI,MAAM,CAAC,OAAO;QAAE,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IACxD,OAAO,eAAe,MAAM,CAAC,QAAQ,EAAE,EAAE,CAAC;AAC5C,CAAC;AAED,SAA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,CAAC,SAAS,EAAE,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,WAAW,EAAE,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC;IACpK,MAAM,MAAM,GAAe,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;IACxC,IAAI,MAAM,CAAC,OAAO;QAAE,MAAM,CAAC,OAAO,GAAG,SAAS,CAAC,MAAM,CAAC,OAAO,EAAE,SAAS,EAAE,qBAAqB,CAAC,CAAC;IACjG,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAS,SAAS,CAAC,KAAyB,EAAE,IAAY,EAAE,MAAc;IACxE,IAAI,KAAK,KAAK,SAAS,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QAChD,MAAM,IAAI,KAAK,CAAC,GAAG,IAAI,0DAA0D,MAAM,gBAAgB,CAAC,CAAC;IAC3G,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
package/dist/localControl.d.ts
CHANGED
|
@@ -1,4 +1,220 @@
|
|
|
1
|
-
import { type ParsedArgs } from './commands';
|
|
1
|
+
import { type ParsedArgs, type RunpaneAgent } from './commands';
|
|
2
|
+
import type { BoundarySchema } from './boundaryDecoder';
|
|
3
|
+
interface RepoSummary {
|
|
4
|
+
id: number;
|
|
5
|
+
name: string;
|
|
6
|
+
path: string;
|
|
7
|
+
active: boolean;
|
|
8
|
+
environment?: string;
|
|
9
|
+
sessionCount: number;
|
|
10
|
+
}
|
|
11
|
+
interface PaneCreateRequest {
|
|
12
|
+
repo: string | {
|
|
13
|
+
id: number;
|
|
14
|
+
} | {
|
|
15
|
+
path: string;
|
|
16
|
+
} | {
|
|
17
|
+
name: string;
|
|
18
|
+
} | {
|
|
19
|
+
active: true;
|
|
20
|
+
};
|
|
21
|
+
panes: PaneCreateItem[];
|
|
22
|
+
dryRun?: boolean;
|
|
23
|
+
timeoutMs?: number;
|
|
24
|
+
waitReady?: boolean;
|
|
25
|
+
readyTimeoutMs?: number;
|
|
26
|
+
concurrency?: number;
|
|
27
|
+
noFocus?: boolean;
|
|
28
|
+
focus?: boolean;
|
|
29
|
+
source?: 'user' | 'agent';
|
|
30
|
+
}
|
|
31
|
+
interface PaneCreateItem {
|
|
32
|
+
name: string;
|
|
33
|
+
worktreeName?: string;
|
|
34
|
+
baseBranch?: string;
|
|
35
|
+
sessionPrompt?: string;
|
|
36
|
+
pinned?: boolean;
|
|
37
|
+
tool: PaneToolSpec;
|
|
38
|
+
}
|
|
39
|
+
type PaneToolSpec = {
|
|
40
|
+
agent: RunpaneAgent;
|
|
41
|
+
title?: string;
|
|
42
|
+
initialInput?: string;
|
|
43
|
+
} | {
|
|
44
|
+
command: string;
|
|
45
|
+
title?: string;
|
|
46
|
+
initialInput?: string;
|
|
47
|
+
};
|
|
48
|
+
interface PaneCreateSuccessItem {
|
|
49
|
+
/** False when the pane was created but did not become ready or take its initial input. */
|
|
50
|
+
ok: boolean;
|
|
51
|
+
index: number;
|
|
52
|
+
name?: string;
|
|
53
|
+
pinned: boolean;
|
|
54
|
+
sessionId?: string;
|
|
55
|
+
panelId?: string;
|
|
56
|
+
worktreePath?: string;
|
|
57
|
+
nextCommand?: string;
|
|
58
|
+
readiness?: PanelReadiness;
|
|
59
|
+
initialInput?: InitialInputDeliveryResult;
|
|
60
|
+
}
|
|
61
|
+
interface PaneCreateFailureItem {
|
|
62
|
+
ok: false;
|
|
63
|
+
index: number;
|
|
64
|
+
name?: string;
|
|
65
|
+
sessionId?: string;
|
|
66
|
+
paneId?: string;
|
|
67
|
+
worktreePath?: string;
|
|
68
|
+
error: {
|
|
69
|
+
message: string;
|
|
70
|
+
code?: string;
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
interface PaneCreateResult {
|
|
74
|
+
ok: boolean;
|
|
75
|
+
generation?: number;
|
|
76
|
+
repo: RepoSummary;
|
|
77
|
+
items: Array<PaneCreateSuccessItem | PaneCreateFailureItem>;
|
|
78
|
+
}
|
|
79
|
+
interface InitialInputDeliveryResult {
|
|
80
|
+
delivered: boolean;
|
|
81
|
+
submitted: boolean;
|
|
82
|
+
inputBytes: number;
|
|
83
|
+
strategy?: 'codex-ctrl-enter' | 'enter' | 'argument';
|
|
84
|
+
sequenceName?: 'codex-ctrl-enter-cr' | 'enter-cr' | 'argument';
|
|
85
|
+
verifiedSubmitted?: boolean;
|
|
86
|
+
verification?: 'observed' | 'unverifiable';
|
|
87
|
+
staged?: boolean;
|
|
88
|
+
attempts?: number;
|
|
89
|
+
sentAt?: string;
|
|
90
|
+
blocked?: PanelBlockedState;
|
|
91
|
+
error?: {
|
|
92
|
+
message: string;
|
|
93
|
+
code?: string;
|
|
94
|
+
};
|
|
95
|
+
nextCommand?: string;
|
|
96
|
+
}
|
|
97
|
+
interface PanelSummary {
|
|
98
|
+
id: string;
|
|
99
|
+
panelId: string;
|
|
100
|
+
paneId: string;
|
|
101
|
+
type: string;
|
|
102
|
+
title: string;
|
|
103
|
+
active: boolean;
|
|
104
|
+
initialized?: boolean;
|
|
105
|
+
agentType?: string;
|
|
106
|
+
isCliPanel?: boolean;
|
|
107
|
+
position?: number;
|
|
108
|
+
createdAt?: string;
|
|
109
|
+
lastActiveAt?: string;
|
|
110
|
+
}
|
|
111
|
+
interface PanelListResult {
|
|
112
|
+
ok: true;
|
|
113
|
+
paneId: string;
|
|
114
|
+
panels: PanelSummary[];
|
|
115
|
+
}
|
|
116
|
+
interface PanelInputRequest {
|
|
117
|
+
panelId: string;
|
|
118
|
+
input: string;
|
|
119
|
+
}
|
|
120
|
+
interface PanelStateSummary {
|
|
121
|
+
initialized: boolean;
|
|
122
|
+
isAlternateScreen?: boolean;
|
|
123
|
+
activityStatus?: 'active' | 'idle';
|
|
124
|
+
isCliReady?: boolean;
|
|
125
|
+
isCliPanel?: boolean;
|
|
126
|
+
agentType?: RunpaneAgent;
|
|
127
|
+
lastActivity?: string;
|
|
128
|
+
}
|
|
129
|
+
interface PanelBlockedState {
|
|
130
|
+
kind: 'codex-update' | 'agent-prompt' | 'submission_unverified' | 'unknown';
|
|
131
|
+
message: string;
|
|
132
|
+
suggestedCommand?: string;
|
|
133
|
+
}
|
|
134
|
+
interface PanelReadiness {
|
|
135
|
+
ok: boolean;
|
|
136
|
+
condition: string;
|
|
137
|
+
matched: boolean;
|
|
138
|
+
timedOut: boolean;
|
|
139
|
+
elapsedMs: number;
|
|
140
|
+
state: PanelStateSummary;
|
|
141
|
+
blocked?: PanelBlockedState;
|
|
142
|
+
nextCommand?: string;
|
|
143
|
+
}
|
|
144
|
+
interface PanelScreenResult {
|
|
145
|
+
ok: true;
|
|
146
|
+
panelId: string;
|
|
147
|
+
paneId?: string;
|
|
148
|
+
source: 'alternateScreen' | 'scrollback' | 'persistedOutput' | 'empty';
|
|
149
|
+
limit: number;
|
|
150
|
+
returnedLineCount: number;
|
|
151
|
+
hasMore: boolean;
|
|
152
|
+
text: string;
|
|
153
|
+
state: PanelStateSummary;
|
|
154
|
+
composer: {
|
|
155
|
+
isPresent: boolean;
|
|
156
|
+
hasUndeliveredText: boolean;
|
|
157
|
+
};
|
|
158
|
+
nextCommand?: string;
|
|
159
|
+
}
|
|
160
|
+
interface PanelSubmitResult {
|
|
161
|
+
ok: boolean;
|
|
162
|
+
generation?: number;
|
|
163
|
+
panelId: string;
|
|
164
|
+
paneId?: string;
|
|
165
|
+
inputBytes: number;
|
|
166
|
+
enter: 'cr';
|
|
167
|
+
sequenceName: 'codex-ctrl-enter-cr' | 'enter-cr';
|
|
168
|
+
verifiedSubmitted: boolean;
|
|
169
|
+
verification?: 'observed' | 'unverifiable';
|
|
170
|
+
sentAt: string;
|
|
171
|
+
blocked?: PanelBlockedState;
|
|
172
|
+
nextCommand?: string;
|
|
173
|
+
}
|
|
174
|
+
type WorkspaceEntryKind = 'agent.ready' | 'agent.busy' | 'agent.blocked' | 'agent.unknown' | 'agent.idle' | 'pane.created' | 'pane.gone' | 'panel.exited';
|
|
175
|
+
interface WorkspacePanelSummary {
|
|
176
|
+
panelId: string;
|
|
177
|
+
title: string;
|
|
178
|
+
agentType?: string;
|
|
179
|
+
agentState?: 'blocked' | 'working' | 'idle' | 'unknown';
|
|
180
|
+
}
|
|
181
|
+
interface WorkspaceEntry {
|
|
182
|
+
gen: number;
|
|
183
|
+
at: string;
|
|
184
|
+
kind: WorkspaceEntryKind;
|
|
185
|
+
paneId: string;
|
|
186
|
+
paneName: string;
|
|
187
|
+
repoId?: number;
|
|
188
|
+
repoName?: string;
|
|
189
|
+
worktreePath?: string;
|
|
190
|
+
panelId?: string;
|
|
191
|
+
panelTitle?: string;
|
|
192
|
+
agentType?: string;
|
|
193
|
+
from?: 'blocked' | 'working' | 'idle' | 'unknown';
|
|
194
|
+
to?: 'blocked' | 'working' | 'idle' | 'unknown';
|
|
195
|
+
source: 'agent' | 'exit' | 'session';
|
|
196
|
+
reason?: string | null;
|
|
197
|
+
settledMs?: number;
|
|
198
|
+
idleMs?: number;
|
|
199
|
+
idleCount?: number;
|
|
200
|
+
heldInput?: string;
|
|
201
|
+
heldInputPresent?: boolean;
|
|
202
|
+
exitCode?: number;
|
|
203
|
+
baseline?: true;
|
|
204
|
+
changedWhileAway?: boolean;
|
|
205
|
+
panels?: WorkspacePanelSummary[];
|
|
206
|
+
}
|
|
207
|
+
interface WorkspaceStateResult {
|
|
208
|
+
ok: true;
|
|
209
|
+
epoch: string;
|
|
210
|
+
generation: number;
|
|
211
|
+
entries: WorkspaceEntry[];
|
|
212
|
+
}
|
|
213
|
+
export declare const paneCreateResultSchema: BoundarySchema<PaneCreateResult>;
|
|
214
|
+
export declare const panelListResultSchema: BoundarySchema<PanelListResult>;
|
|
215
|
+
export declare const panelScreenResultSchema: BoundarySchema<PanelScreenResult>;
|
|
216
|
+
export declare const panelSubmitResultSchema: BoundarySchema<PanelSubmitResult>;
|
|
217
|
+
export declare const workspaceStateResultSchema: BoundarySchema<WorkspaceStateResult>;
|
|
2
218
|
export declare function runReposList(parsed: ParsedArgs): Promise<number>;
|
|
3
219
|
export declare function runReposAdd(parsed: ParsedArgs): Promise<number>;
|
|
4
220
|
export declare function runPanesList(parsed: ParsedArgs): Promise<number>;
|
|
@@ -28,4 +244,7 @@ export declare function runPanelsSubmit(parsed: ParsedArgs): Promise<number>;
|
|
|
28
244
|
export declare function runPanelsSubmitComposer(parsed: ParsedArgs): Promise<number>;
|
|
29
245
|
export declare function runPanelsWait(parsed: ParsedArgs): Promise<number>;
|
|
30
246
|
export declare function runAgentsDoctor(parsed: ParsedArgs): Promise<number>;
|
|
247
|
+
export declare function buildPanelInputRequest(parsed: ParsedArgs, command?: 'input' | 'submit'): PanelInputRequest;
|
|
248
|
+
export declare function buildPaneCreateRequest(parsed: ParsedArgs): Promise<PaneCreateRequest>;
|
|
249
|
+
export {};
|
|
31
250
|
//# sourceMappingURL=localControl.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localControl.d.ts","sourceRoot":"","sources":["../src/localControl.ts"],"names":[],"mappings":"AAMA,OAAO,EAAuB,KAAK,UAAU,
|
|
1
|
+
{"version":3,"file":"localControl.d.ts","sourceRoot":"","sources":["../src/localControl.ts"],"names":[],"mappings":"AAMA,OAAO,EAAuB,KAAK,UAAU,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AACrF,OAAO,KAAK,EAAE,cAAc,EAAa,MAAM,mBAAmB,CAAC;AAmJnE,UAAU,WAAW;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;CACtB;AA6BD,UAAU,iBAAiB;IACzB,IAAI,EAAE,MAAM,GAAG;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE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AAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAuBzE;AAED,wBAAsB,uBAAuB,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CA2BjF;AAED,wBAAsB,aAAa,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAuBvE;AAED,wBAAsB,eAAe,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAmBzE;AAcD,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,UAAU,EAAE,OAAO,GAAE,OAAO,GAAG,QAAkB,GAAG,iBAAiB,CAmBnH;AA6CD,wBAAsB,sBAAsB,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,iBAAiB,CAAC,CA2D3F"}
|
package/dist/localControl.js
CHANGED
|
@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.workspaceStateResultSchema = exports.panelSubmitResultSchema = exports.panelScreenResultSchema = exports.panelListResultSchema = exports.paneCreateResultSchema = void 0;
|
|
6
7
|
exports.runReposList = runReposList;
|
|
7
8
|
exports.runReposAdd = runReposAdd;
|
|
8
9
|
exports.runPanesList = runPanesList;
|
|
@@ -32,6 +33,8 @@ exports.runPanelsSubmit = runPanelsSubmit;
|
|
|
32
33
|
exports.runPanelsSubmitComposer = runPanelsSubmitComposer;
|
|
33
34
|
exports.runPanelsWait = runPanelsWait;
|
|
34
35
|
exports.runAgentsDoctor = runAgentsDoctor;
|
|
36
|
+
exports.buildPanelInputRequest = buildPanelInputRequest;
|
|
37
|
+
exports.buildPaneCreateRequest = buildPaneCreateRequest;
|
|
35
38
|
const node_fs_1 = __importDefault(require("node:fs"));
|
|
36
39
|
const node_process_1 = require("node:process");
|
|
37
40
|
const promises_1 = require("node:readline/promises");
|
|
@@ -344,7 +347,7 @@ const paneCostResultSchema = boundaryDecoder_1.boundary.object({
|
|
|
344
347
|
unattributed: boundaryDecoder_1.boundary.optional(paneCostSliceResultSchema),
|
|
345
348
|
totals: boundaryDecoder_1.boundary.optional(usageTotalsResultSchema),
|
|
346
349
|
});
|
|
347
|
-
|
|
350
|
+
exports.paneCreateResultSchema = boundaryDecoder_1.boundary.object({
|
|
348
351
|
ok: boundaryDecoder_1.boundary.boolean,
|
|
349
352
|
generation: boundaryDecoder_1.boundary.optional(boundaryDecoder_1.boundary.number),
|
|
350
353
|
repo: repoSummarySchema,
|
|
@@ -424,7 +427,7 @@ const paneFocusResultSchema = boundaryDecoder_1.boundary.object({
|
|
|
424
427
|
panelId: boundaryDecoder_1.boundary.optional(boundaryDecoder_1.boundary.string),
|
|
425
428
|
focused: boundaryDecoder_1.boundary.literal(true),
|
|
426
429
|
});
|
|
427
|
-
|
|
430
|
+
exports.panelListResultSchema = boundaryDecoder_1.boundary.object({
|
|
428
431
|
ok: boundaryDecoder_1.boundary.literal(true),
|
|
429
432
|
paneId: boundaryDecoder_1.boundary.string,
|
|
430
433
|
panels: boundaryDecoder_1.boundary.array(panelSummarySchema),
|
|
@@ -469,7 +472,7 @@ const panelInputResultSchema = boundaryDecoder_1.boundary.object({
|
|
|
469
472
|
sentAt: boundaryDecoder_1.boundary.string,
|
|
470
473
|
nextCommand: boundaryDecoder_1.boundary.optional(boundaryDecoder_1.boundary.string),
|
|
471
474
|
});
|
|
472
|
-
|
|
475
|
+
exports.panelScreenResultSchema = boundaryDecoder_1.boundary.object({
|
|
473
476
|
ok: boundaryDecoder_1.boundary.literal(true),
|
|
474
477
|
panelId: boundaryDecoder_1.boundary.string,
|
|
475
478
|
paneId: boundaryDecoder_1.boundary.optional(boundaryDecoder_1.boundary.string),
|
|
@@ -485,7 +488,7 @@ const panelScreenResultSchema = boundaryDecoder_1.boundary.object({
|
|
|
485
488
|
}),
|
|
486
489
|
nextCommand: boundaryDecoder_1.boundary.optional(boundaryDecoder_1.boundary.string),
|
|
487
490
|
});
|
|
488
|
-
|
|
491
|
+
exports.panelSubmitResultSchema = boundaryDecoder_1.boundary.object({
|
|
489
492
|
ok: boundaryDecoder_1.boundary.boolean,
|
|
490
493
|
generation: boundaryDecoder_1.boundary.optional(boundaryDecoder_1.boundary.number),
|
|
491
494
|
panelId: boundaryDecoder_1.boundary.string,
|
|
@@ -580,7 +583,7 @@ const workspaceEntrySchema = boundaryDecoder_1.boundary.object({
|
|
|
580
583
|
changedWhileAway: boundaryDecoder_1.boundary.optional(boundaryDecoder_1.boundary.boolean),
|
|
581
584
|
panels: boundaryDecoder_1.boundary.optional(boundaryDecoder_1.boundary.array(workspacePanelSummarySchema)),
|
|
582
585
|
});
|
|
583
|
-
|
|
586
|
+
exports.workspaceStateResultSchema = boundaryDecoder_1.boundary.object({
|
|
584
587
|
ok: boundaryDecoder_1.boundary.literal(true),
|
|
585
588
|
epoch: boundaryDecoder_1.boundary.string,
|
|
586
589
|
generation: boundaryDecoder_1.boundary.number,
|
|
@@ -831,7 +834,7 @@ async function runPanesCost(parsed) {
|
|
|
831
834
|
return 0;
|
|
832
835
|
}
|
|
833
836
|
async function runWorkspaceState(parsed) {
|
|
834
|
-
const result = await (0, daemonClient_1.invokeDaemon)('runpane:workspace:state', [{ repo: parsed.repo }], workspaceStateResultSchema, {
|
|
837
|
+
const result = await (0, daemonClient_1.invokeDaemon)('runpane:workspace:state', [{ repo: parsed.repo }], exports.workspaceStateResultSchema, {
|
|
835
838
|
paneDir: parsed.paneDir,
|
|
836
839
|
});
|
|
837
840
|
if (parsed.json) {
|
|
@@ -969,7 +972,7 @@ function isRetryableWatchError(error) {
|
|
|
969
972
|
async function runPanesCreate(parsed) {
|
|
970
973
|
const request = await buildPaneCreateRequest(parsed);
|
|
971
974
|
await confirmPaneCreate(parsed, request);
|
|
972
|
-
const result = await (0, daemonClient_1.invokeDaemon)('runpane:panes:create', [request], paneCreateResultSchema, {
|
|
975
|
+
const result = await (0, daemonClient_1.invokeDaemon)('runpane:panes:create', [request], exports.paneCreateResultSchema, {
|
|
973
976
|
paneDir: parsed.paneDir,
|
|
974
977
|
timeoutMs: (parsed.timeoutMs ?? 120_000) + (parsed.readyTimeoutMs ?? 30_000) + 10_000,
|
|
975
978
|
});
|
|
@@ -1021,7 +1024,7 @@ async function runPanesAdopt(parsed) {
|
|
|
1021
1024
|
};
|
|
1022
1025
|
}
|
|
1023
1026
|
await confirmPaneAdopt(parsed, request);
|
|
1024
|
-
const result = await (0, daemonClient_1.invokeDaemon)('runpane:panes:adopt', [request], paneCreateResultSchema, {
|
|
1027
|
+
const result = await (0, daemonClient_1.invokeDaemon)('runpane:panes:adopt', [request], exports.paneCreateResultSchema, {
|
|
1025
1028
|
paneDir: parsed.paneDir,
|
|
1026
1029
|
timeoutMs: 120_000,
|
|
1027
1030
|
});
|
|
@@ -1133,7 +1136,7 @@ async function runPanelsList(parsed) {
|
|
|
1133
1136
|
}
|
|
1134
1137
|
const result = await (0, daemonClient_1.invokeDaemon)('runpane:panels:list', [{
|
|
1135
1138
|
paneId: parsed.paneId,
|
|
1136
|
-
}], panelListResultSchema, {
|
|
1139
|
+
}], exports.panelListResultSchema, {
|
|
1137
1140
|
paneDir: parsed.paneDir,
|
|
1138
1141
|
});
|
|
1139
1142
|
if (parsed.json) {
|
|
@@ -1199,7 +1202,7 @@ async function runPanelsScreen(parsed) {
|
|
|
1199
1202
|
const result = await (0, daemonClient_1.invokeDaemon)('runpane:panels:screen', [{
|
|
1200
1203
|
panelId: parsed.panelId,
|
|
1201
1204
|
limit: parsed.limit,
|
|
1202
|
-
}], panelScreenResultSchema, {
|
|
1205
|
+
}], exports.panelScreenResultSchema, {
|
|
1203
1206
|
paneDir: parsed.paneDir,
|
|
1204
1207
|
});
|
|
1205
1208
|
if (parsed.json) {
|
|
@@ -1215,7 +1218,7 @@ async function runPanelsScreen(parsed) {
|
|
|
1215
1218
|
async function runPanelsSubmit(parsed) {
|
|
1216
1219
|
const request = buildPanelInputRequest(parsed, 'submit');
|
|
1217
1220
|
await confirmPanelInput(parsed, request, 'submit');
|
|
1218
|
-
const result = await (0, daemonClient_1.invokeDaemon)('runpane:panels:submit', [request], panelSubmitResultSchema, {
|
|
1221
|
+
const result = await (0, daemonClient_1.invokeDaemon)('runpane:panels:submit', [request], exports.panelSubmitResultSchema, {
|
|
1219
1222
|
paneDir: parsed.paneDir,
|
|
1220
1223
|
});
|
|
1221
1224
|
if (parsed.json) {
|
|
@@ -1312,17 +1315,32 @@ function buildPanelInputRequest(parsed, command = 'input') {
|
|
|
1312
1315
|
if (!parsed.panelId) {
|
|
1313
1316
|
throw new Error(`runpane panels ${command} requires --panel.`);
|
|
1314
1317
|
}
|
|
1315
|
-
|
|
1316
|
-
|
|
1318
|
+
const sources = [parsed.panelInput !== undefined, Boolean(parsed.panelInputFile), parsed.keys !== undefined].filter(Boolean).length;
|
|
1319
|
+
if (sources > 1) {
|
|
1320
|
+
throw new Error('Use only one of --text, --keys, or --input-file.');
|
|
1317
1321
|
}
|
|
1318
|
-
if (
|
|
1319
|
-
throw new Error(`runpane panels ${command} requires --text or --input-file.`);
|
|
1322
|
+
if (sources === 0) {
|
|
1323
|
+
throw new Error(`runpane panels ${command} requires --text, --keys, or --input-file.`);
|
|
1324
|
+
}
|
|
1325
|
+
if (parsed.keys !== undefined && command !== 'input') {
|
|
1326
|
+
throw new Error('--keys is for panels input; panels submit sends text followed by Enter.');
|
|
1320
1327
|
}
|
|
1321
1328
|
return {
|
|
1322
1329
|
panelId: parsed.panelId,
|
|
1323
|
-
input: parsed.panelInputFile ? readInputSource(parsed.panelInputFile) : parsed.panelInput ?? '',
|
|
1330
|
+
input: parsed.keys ? keysToBytes(parsed.keys) : parsed.panelInputFile ? readInputSource(parsed.panelInputFile) : parsed.panelInput ?? '',
|
|
1324
1331
|
};
|
|
1325
1332
|
}
|
|
1333
|
+
/** `--keys down,enter`: named keys from the contract, or a single literal character each. */
|
|
1334
|
+
function keysToBytes(keys) {
|
|
1335
|
+
const named = new Map(Object.entries(contract_1.RUNPANE_CONTRACT.terminalKeys));
|
|
1336
|
+
return keys.map((key) => {
|
|
1337
|
+
const bytes = named.get(key.toLowerCase()) ?? ([...key].length === 1 ? key : undefined);
|
|
1338
|
+
if (bytes === undefined) {
|
|
1339
|
+
throw new Error(`Unknown key "${key}". Use ${[...named.keys()].join(', ')}, or a single character.`);
|
|
1340
|
+
}
|
|
1341
|
+
return bytes;
|
|
1342
|
+
}).join('');
|
|
1343
|
+
}
|
|
1326
1344
|
async function buildPanelCreateRequest(parsed) {
|
|
1327
1345
|
if (!parsed.paneId) {
|
|
1328
1346
|
throw new Error('runpane panels create requires --pane.');
|