@parallelworks/code 0.4.0 → 0.6.0
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 +92 -24
- package/dist/agentSwitcher.d.ts +13 -2
- package/dist/agentSwitcher.js +28 -6
- package/dist/ago.d.ts +1 -3
- package/dist/ago.js +1 -3
- package/dist/api.d.ts +267 -5
- package/dist/chatStrings.d.ts +4 -0
- package/dist/chatStrings.js +5 -1
- package/dist/claudeAccounts.d.ts +20 -2
- package/dist/claudeAccounts.js +51 -7
- package/dist/claudeApi.d.ts +2 -1
- package/dist/claudeApi.js +49 -3
- package/dist/command.d.ts +7 -1
- package/dist/command.js +11 -2
- package/dist/commandsApi.d.ts +8 -3
- package/dist/commandsApi.js +25 -4
- package/dist/createPwCodeApi.d.ts +92 -58
- package/dist/createPwCodeApi.js +4 -2
- package/dist/index.d.ts +11 -9
- package/dist/index.js +7 -5
- package/dist/locales/en/agentTranscript.js +6 -2
- package/dist/locales/en/agents.js +50 -6
- package/dist/locales/en.d.ts +46 -0
- package/dist/locales/es/agentTranscript.js +6 -2
- package/dist/locales/es/agents.js +50 -6
- package/dist/locales/ja/agentTranscript.js +6 -2
- package/dist/locales/ja/agents.js +45 -6
- package/dist/locales/ko/agentTranscript.js +6 -2
- package/dist/locales/ko/agents.js +50 -6
- package/dist/locales/zh/agentTranscript.js +6 -2
- package/dist/locales/zh/agents.js +50 -6
- package/dist/machine.d.ts +27 -2
- package/dist/machine.js +23 -2
- package/dist/notices.d.ts +2 -0
- package/dist/notices.js +29 -14
- package/dist/pwUpdate.d.ts +52 -0
- package/dist/pwUpdate.js +115 -0
- package/dist/query.d.ts +4 -1
- package/dist/query.js +9 -3
- package/dist/session.d.ts +7 -1
- package/dist/session.js +6 -2
- package/dist/sessionActions.js +5 -2
- package/dist/sessionEvents.d.ts +39 -5
- package/dist/sessionEvents.js +213 -83
- package/dist/sessionGroups.d.ts +3 -3
- package/dist/sessionGroups.js +3 -3
- package/dist/sessionHeader.js +6 -2
- package/dist/sessionList.d.ts +13 -8
- package/dist/sessionList.js +20 -10
- package/dist/sessionScreen.d.ts +8 -3
- package/dist/sessionScreen.js +20 -9
- package/dist/sessionsApi.d.ts +27 -5
- package/dist/sessionsApi.js +128 -17
- package/dist/sessionsFeed.d.ts +22 -0
- package/dist/sessionsFeed.js +125 -0
- package/dist/startPage.d.ts +6 -3
- package/dist/startPage.js +34 -12
- package/dist/startSession.d.ts +31 -11
- package/dist/startSession.js +126 -44
- package/dist/terminalHandoffPanel.js +8 -1
- package/dist/todos.d.ts +42 -0
- package/dist/todos.js +104 -0
- package/dist/transcript.d.ts +27 -5
- package/dist/transcript.js +148 -112
- package/dist/transcriptRead.d.ts +57 -0
- package/dist/transcriptRead.js +122 -0
- package/dist/types.d.ts +13 -1
- package/dist/useComposer.d.ts +36 -15
- package/dist/useComposer.js +94 -31
- package/dist/useComposerImages.d.ts +38 -1
- package/dist/useComposerImages.js +62 -8
- package/dist/useComposerPastes.js +3 -8
- package/dist/useConversation.d.ts +16 -0
- package/dist/useConversation.js +78 -8
- package/dist/useMounted.d.ts +3 -0
- package/dist/useMounted.js +14 -0
- package/dist/useSubagent.d.ts +22 -5
- package/dist/useSubagent.js +41 -17
- package/dist/useTranscript.d.ts +27 -1
- package/dist/useTranscript.js +217 -45
- package/dist/wording.d.ts +6 -3
- package/dist/wording.js +20 -6
- package/locales/en/agentTranscript.json +6 -2
- package/locales/en/agents.json +46 -4
- package/locales/es/agentTranscript.json +6 -2
- package/locales/es/agents.json +46 -4
- package/locales/ja/agentTranscript.json +6 -2
- package/locales/ja/agents.json +46 -4
- package/locales/ko/agentTranscript.json +6 -2
- package/locales/ko/agents.json +46 -4
- package/locales/zh/agentTranscript.json +6 -2
- package/locales/zh/agents.json +46 -4
- package/package.json +3 -3
package/dist/claudeApi.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export declare function claudeApi(client: PwCodeClient): {
|
|
|
10
10
|
useClaudeModels: (machine: string, sessionId: string | undefined, account: string | undefined, enabled: boolean, refresh?: boolean) => PwCodeQuery<ClaudeModels>;
|
|
11
11
|
useRefreshClaudeModels: (machine: string, sessionId: string | undefined) => (account: string | undefined) => Promise<void>;
|
|
12
12
|
useClaudeAccountNames: (machine: string, enabled: boolean) => PwCodeQuery<ClaudeAccounts>;
|
|
13
|
-
useClaudeAccounts: (machine: string, sessionId: string | undefined, enabled: boolean) => {
|
|
13
|
+
useClaudeAccounts: (machine: string, sessionId: string | undefined, enabled: boolean, fresh?: boolean) => {
|
|
14
14
|
accounts: ClaudeAccount[];
|
|
15
15
|
loadedUsage: boolean;
|
|
16
16
|
loading: boolean;
|
|
@@ -19,6 +19,7 @@ export declare function claudeApi(client: PwCodeClient): {
|
|
|
19
19
|
refresh: () => Promise<void>;
|
|
20
20
|
};
|
|
21
21
|
useRemoveClaudeAccount: (machine: string, sessionId: string | undefined) => (name: string) => Promise<void>;
|
|
22
|
+
useMoveClaudeAccountSessions: (machine: string, sessionId: string | undefined) => (from: string, to: string) => Promise<string[]>;
|
|
22
23
|
startClaudeLogin: (machine: string, account: string, sessionId: string | undefined, columns: number, rows: number) => Promise<ClaudeLoginEvent>;
|
|
23
24
|
writeClaudeLogin: (machine: string, loginId: string, input: ClaudeLoginInput) => Promise<void>;
|
|
24
25
|
cancelClaudeLogin: (machine: string, loginId: string) => Promise<void>;
|
package/dist/claudeApi.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./apiClient.js";
|
|
2
2
|
import { createQuery } from "./query.js";
|
|
3
|
-
import { useState } from "react";
|
|
3
|
+
import { useEffect, useRef, useState } from "react";
|
|
4
4
|
import { useSWRConfig } from "swr";
|
|
5
5
|
// src/claudeApi.ts
|
|
6
6
|
var cache = {
|
|
@@ -55,6 +55,15 @@ function sessionAccountOptions(machine, id, namesOnly, refresh = false) {
|
|
|
55
55
|
}
|
|
56
56
|
} };
|
|
57
57
|
}
|
|
58
|
+
/** An account's usage with the sessions its names read gave, as that read is repeated more often. */
|
|
59
|
+
function withNamedSessions(named, usage) {
|
|
60
|
+
if (!usage) return named;
|
|
61
|
+
const { sessions: _stale, ...rest } = usage;
|
|
62
|
+
return named.sessions ? {
|
|
63
|
+
...rest,
|
|
64
|
+
sessions: named.sessions
|
|
65
|
+
} : rest;
|
|
66
|
+
}
|
|
58
67
|
function claudeLoginFinished(status) {
|
|
59
68
|
return status !== "running" && status !== "checking";
|
|
60
69
|
}
|
|
@@ -107,12 +116,19 @@ function claudeApi(client) {
|
|
|
107
116
|
function useClaudeAccountNames(machine, enabled) {
|
|
108
117
|
return useQuery(hostAccountsPath, enabled && machine ? hostAccountOptions(machine, true) : null, cache);
|
|
109
118
|
}
|
|
110
|
-
|
|
119
|
+
/** With `fresh`, the names, which say what sessions each account runs, are read again on mount. */
|
|
120
|
+
function useClaudeAccounts(machine, sessionId, enabled, fresh) {
|
|
111
121
|
const { mutate } = useSWRConfig();
|
|
112
122
|
const [refreshing, setRefreshing] = useState(false);
|
|
113
123
|
const hostNames = useClaudeAccountNames(machine, enabled && !sessionId);
|
|
114
124
|
const sessionNames = useQuery(sessionAccountsPath, enabled && machine && sessionId ? sessionAccountOptions(machine, sessionId, true) : null, cache);
|
|
115
125
|
const names = sessionId ? sessionNames : hostNames;
|
|
126
|
+
const reloadNames = names.mutate;
|
|
127
|
+
const cachedNames = useRef(false);
|
|
128
|
+
cachedNames.current = names.data !== void 0;
|
|
129
|
+
useEffect(() => {
|
|
130
|
+
if (fresh && cachedNames.current) reloadNames();
|
|
131
|
+
}, [fresh, reloadNames]);
|
|
116
132
|
const hostUsage = useQuery(hostAccountsPath, enabled && machine && !sessionId && names.data ? hostAccountOptions(machine, false) : null, cache);
|
|
117
133
|
const sessionUsage = useQuery(sessionAccountsPath, enabled && machine && sessionId && names.data ? sessionAccountOptions(machine, sessionId, false) : null, cache);
|
|
118
134
|
const usage = sessionId ? sessionUsage : hostUsage;
|
|
@@ -135,7 +151,7 @@ function claudeApi(client) {
|
|
|
135
151
|
}
|
|
136
152
|
};
|
|
137
153
|
return {
|
|
138
|
-
accounts: (names.data ?? []).map((a) => metadata.get(a.name)
|
|
154
|
+
accounts: (names.data ?? []).map((a) => withNamedSessions(a, metadata.get(a.name))),
|
|
139
155
|
loadedUsage: !!usage.data,
|
|
140
156
|
loading: names.isLoading,
|
|
141
157
|
error: names.error ?? usage.error,
|
|
@@ -167,6 +183,35 @@ function claudeApi(client) {
|
|
|
167
183
|
], drop, { revalidate: namesOnly })] : []]));
|
|
168
184
|
};
|
|
169
185
|
}
|
|
186
|
+
/** Moves the live sessions on one account but this one to another,
|
|
187
|
+
* answering with those moved; the account lists read again. */
|
|
188
|
+
function useMoveClaudeAccountSessions(machine, sessionId) {
|
|
189
|
+
const { mutate } = useSWRConfig();
|
|
190
|
+
return async (from, to) => {
|
|
191
|
+
const { data, error } = await client.POST("/api/code/machines/{machine}/claude-code/accounts/{name}/move", {
|
|
192
|
+
params: { path: {
|
|
193
|
+
machine,
|
|
194
|
+
name: from
|
|
195
|
+
} },
|
|
196
|
+
body: {
|
|
197
|
+
to,
|
|
198
|
+
...sessionId ? { except: sessionId } : {}
|
|
199
|
+
},
|
|
200
|
+
signal: deadline(6e4)
|
|
201
|
+
});
|
|
202
|
+
if (error) throw error;
|
|
203
|
+
await Promise.all([mutate([
|
|
204
|
+
"api",
|
|
205
|
+
hostAccountsPath,
|
|
206
|
+
hostAccountOptions(machine, true)
|
|
207
|
+
]), sessionId && mutate([
|
|
208
|
+
"api",
|
|
209
|
+
sessionAccountsPath,
|
|
210
|
+
sessionAccountOptions(machine, sessionId, true)
|
|
211
|
+
])]);
|
|
212
|
+
return data?.moved ?? [];
|
|
213
|
+
};
|
|
214
|
+
}
|
|
170
215
|
async function startClaudeLogin(machine, account, sessionId, columns, rows) {
|
|
171
216
|
const { data, error } = await client.POST(loginsPath, {
|
|
172
217
|
params: { path: { machine } },
|
|
@@ -241,6 +286,7 @@ function claudeApi(client) {
|
|
|
241
286
|
useClaudeAccountNames,
|
|
242
287
|
useClaudeAccounts,
|
|
243
288
|
useRemoveClaudeAccount,
|
|
289
|
+
useMoveClaudeAccountSessions,
|
|
244
290
|
startClaudeLogin,
|
|
245
291
|
writeClaudeLogin,
|
|
246
292
|
cancelClaudeLogin,
|
package/dist/command.d.ts
CHANGED
|
@@ -4,6 +4,10 @@ export interface PwCodeSlashCommand {
|
|
|
4
4
|
description?: string | undefined;
|
|
5
5
|
usage?: string | undefined;
|
|
6
6
|
}
|
|
7
|
+
/** A palette entry with what it takes after its name, for the composer to show. */
|
|
8
|
+
export interface PwCodePaletteOption extends PwCodeSlashCommand {
|
|
9
|
+
argumentHint?: string | undefined;
|
|
10
|
+
}
|
|
7
11
|
/** What a session can run from a slash, as far as typed text is dispatched by
|
|
8
12
|
* it. A host that types its API from a spec asserts its type extends this. */
|
|
9
13
|
export interface PwCodePalette {
|
|
@@ -31,11 +35,13 @@ export type SlashAction = {
|
|
|
31
35
|
name: string;
|
|
32
36
|
args: string;
|
|
33
37
|
};
|
|
38
|
+
/** The command typed text runs, without its slash; undefined for prose. */
|
|
39
|
+
export declare function invocationName(text: string): string | undefined;
|
|
34
40
|
/** Where typed text goes, in the order the terminal dispatches it: skills,
|
|
35
41
|
* custom commands, and MCP prompts expand into a turn, so they are messages;
|
|
36
42
|
* built-ins run as commands, five of them on routes of their own. */
|
|
37
43
|
export declare function slashAction(text: string, palette: PwCodePalette | null): SlashAction;
|
|
38
|
-
export declare function paletteOptions(palette: PwCodePalette | null, claudeAccountDescription?: string, archiveDescription?: string):
|
|
44
|
+
export declare function paletteOptions(palette: PwCodePalette | null, claudeAccountDescription?: string, archiveDescription?: string): PwCodePaletteOption[];
|
|
39
45
|
/** The command a `!` line runs, read as the terminal reads it: empty for a bare
|
|
40
46
|
* `!`, which runs nothing, and null for text that is not a shell escape. */
|
|
41
47
|
export declare function shellCommand(text: string): string | null;
|
package/dist/command.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
// src/command.ts
|
|
2
2
|
var INVOCATION = /^\/([A-Za-z0-9_:-]+)(?:\s+([\s\S]*))?$/;
|
|
3
|
+
/** The command typed text runs, without its slash; undefined for prose. */
|
|
4
|
+
function invocationName(text) {
|
|
5
|
+
return INVOCATION.exec(text.trim())?.[1];
|
|
6
|
+
}
|
|
3
7
|
/** Where typed text goes, in the order the terminal dispatches it: skills,
|
|
4
8
|
* custom commands, and MCP prompts expand into a turn, so they are messages;
|
|
5
9
|
* built-ins run as commands, five of them on routes of their own. */
|
|
@@ -36,7 +40,8 @@ function paletteOptions(palette, claudeAccountDescription, archiveDescription) {
|
|
|
36
40
|
const commands = [...palette?.commands ?? [], ...palette?.mcpPrompts ?? []].filter((c) => c.name !== "claude-code").map((c) => ({
|
|
37
41
|
name: c.name,
|
|
38
42
|
description: c.description,
|
|
39
|
-
usage: c.usage
|
|
43
|
+
usage: c.usage,
|
|
44
|
+
argumentHint: argumentHint(c)
|
|
40
45
|
}));
|
|
41
46
|
if (archiveDescription !== void 0 && !commands.some((c) => c.name === "archive")) {
|
|
42
47
|
const at = commands.findIndex((c) => c.name > "archive");
|
|
@@ -51,6 +56,10 @@ function paletteOptions(palette, claudeAccountDescription, archiveDescription) {
|
|
|
51
56
|
description: claudeAccountDescription
|
|
52
57
|
}, ...commands];
|
|
53
58
|
}
|
|
59
|
+
function argumentHint(c) {
|
|
60
|
+
const name = `/${c.name} `;
|
|
61
|
+
return c.usage?.startsWith(name) ? c.usage.slice(name.length).trim() || void 0 : void 0;
|
|
62
|
+
}
|
|
54
63
|
/** The command a `!` line runs, read as the terminal reads it: empty for a bare
|
|
55
64
|
* `!`, which runs nothing, and null for text that is not a shell escape. */
|
|
56
65
|
function shellCommand(text) {
|
|
@@ -61,4 +70,4 @@ function shellCommand(text) {
|
|
|
61
70
|
function steerMayHaveLanded(error) {
|
|
62
71
|
return error.code === "upstream_no_answer" || !error.code && !error.type && (error.status === 502 || error.status === 504);
|
|
63
72
|
}
|
|
64
|
-
export { paletteOptions, shellCommand, slashAction, steerMayHaveLanded };
|
|
73
|
+
export { invocationName, paletteOptions, shellCommand, slashAction, steerMayHaveLanded };
|
package/dist/commandsApi.d.ts
CHANGED
|
@@ -2,6 +2,9 @@ import type { ToolCallPart } from '@parallelworks/ui/ai/headless';
|
|
|
2
2
|
import type { PwCodeClient, PwCodeResult, Schemas } from './apiClient.js';
|
|
3
3
|
import { type SlashAction } from './command.js';
|
|
4
4
|
type Palette = Schemas['AgentPalette'];
|
|
5
|
+
type RoutedAction = Exclude<SlashAction, {
|
|
6
|
+
kind: 'message' | 'archive';
|
|
7
|
+
}>;
|
|
5
8
|
export type CommandOutcome = {
|
|
6
9
|
kind: 'output';
|
|
7
10
|
text: string;
|
|
@@ -29,6 +32,10 @@ export interface SlashDeps {
|
|
|
29
32
|
/** stop is why the owner's hook asked that the model not react to the run. */
|
|
30
33
|
onShellRun: (command: string, output: string, stop: string | undefined) => Promise<void> | void;
|
|
31
34
|
onCompacted: () => void;
|
|
35
|
+
/** A command starts on the machine. The call it may return ends it once the
|
|
36
|
+
* command settles: `filed`, the machine filed its record for the next read.
|
|
37
|
+
* The feed's `command_started` names the request by `requestId`. */
|
|
38
|
+
onRunning?: (command: string, kind: RoutedAction['kind'], requestId: string) => ((filed: boolean) => void) | undefined;
|
|
32
39
|
onCleared: (newId: string) => void;
|
|
33
40
|
/** Archives the open session the way the host's own archive action does, keeping its lists in step. */
|
|
34
41
|
onArchive: () => Promise<void> | void;
|
|
@@ -45,9 +52,7 @@ export declare function offersBackground(part: Pick<ToolCallPart, 'name' | 'stat
|
|
|
45
52
|
} | null | undefined): boolean;
|
|
46
53
|
export declare function commandsApi(client: PwCodeClient): {
|
|
47
54
|
runGoal: (machine: string, id: string, args: string) => Promise<PwCodeResult<Schemas['AgentGoalResult']>>;
|
|
48
|
-
runSlashAction: (machine: string, id: string, action:
|
|
49
|
-
kind: 'message' | 'archive';
|
|
50
|
-
}>, planOnMachine: (path: string) => string) => Promise<CommandOutcome>;
|
|
55
|
+
runSlashAction: (machine: string, id: string, action: RoutedAction, planOnMachine: (path: string) => string, requestId?: string) => Promise<CommandOutcome>;
|
|
51
56
|
resolveTyped: (text: string, deps: SlashDeps) => Promise<string | null>;
|
|
52
57
|
usePalette: (machine: string, sessionId: string) => {
|
|
53
58
|
palette: Palette | null;
|
package/dist/commandsApi.js
CHANGED
|
@@ -34,11 +34,20 @@ function planOutcome(plan, args, planOnMachine) {
|
|
|
34
34
|
default: return { kind: "none" };
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
+
/** Unique across windows, which may each run commands on one session. `crypto` is not on Hermes. */
|
|
38
|
+
function newRequestId() {
|
|
39
|
+
return `${Date.now()}-${Math.random()}`;
|
|
40
|
+
}
|
|
41
|
+
/** The daemon files the command into the transcript itself: /compact with its
|
|
42
|
+
* summary, /goal with its answer. */
|
|
43
|
+
function filedByMachine(outcome, kind) {
|
|
44
|
+
return outcome.kind === "compacted" || outcome.kind === "output" && kind === "goal";
|
|
45
|
+
}
|
|
37
46
|
function settle(outcome, command, kind, deps) {
|
|
38
47
|
switch (outcome.kind) {
|
|
39
48
|
case "send": return outcome.text;
|
|
40
49
|
case "output":
|
|
41
|
-
if (outcome.text && kind
|
|
50
|
+
if (outcome.text && !filedByMachine(outcome, kind)) deps.onOutput(command, outcome.text);
|
|
42
51
|
return null;
|
|
43
52
|
case "compacted":
|
|
44
53
|
deps.onCompacted();
|
|
@@ -69,7 +78,7 @@ function commandsApi(client) {
|
|
|
69
78
|
/** Runs a command against the session's daemon, answering with what the
|
|
70
79
|
* host owes next. /plan's actions follow the terminal's, except that opening
|
|
71
80
|
* the plan file needs the machine's own editor. */
|
|
72
|
-
async function runSlashAction(machine, id, action, planOnMachine) {
|
|
81
|
+
async function runSlashAction(machine, id, action, planOnMachine, requestId) {
|
|
73
82
|
const path = { params: { path: {
|
|
74
83
|
machine,
|
|
75
84
|
id
|
|
@@ -88,7 +97,10 @@ function commandsApi(client) {
|
|
|
88
97
|
case "compact": {
|
|
89
98
|
const { data, error } = await client.POST("/api/code/machines/{machine}/sessions/{id}/compact", {
|
|
90
99
|
...path,
|
|
91
|
-
body: {
|
|
100
|
+
body: {
|
|
101
|
+
focus: action.focus,
|
|
102
|
+
...requestId ? { client: requestId } : {}
|
|
103
|
+
}
|
|
92
104
|
});
|
|
93
105
|
if (error) return {
|
|
94
106
|
kind: "refused",
|
|
@@ -166,7 +178,16 @@ function commandsApi(client) {
|
|
|
166
178
|
await deps.onArchive();
|
|
167
179
|
return null;
|
|
168
180
|
}
|
|
169
|
-
|
|
181
|
+
const typed = text.trim();
|
|
182
|
+
const requestId = newRequestId();
|
|
183
|
+
const end = deps.onRunning?.(typed, action.kind, requestId);
|
|
184
|
+
let outcome = { kind: "none" };
|
|
185
|
+
try {
|
|
186
|
+
outcome = await runSlashAction(deps.machine, deps.sessionId, action, deps.planOnMachine, requestId);
|
|
187
|
+
} finally {
|
|
188
|
+
end?.(filedByMachine(outcome, action.kind));
|
|
189
|
+
}
|
|
190
|
+
return settle(outcome, typed, action.kind, deps);
|
|
170
191
|
}
|
|
171
192
|
/** The session's palette, loaded the first time the composer reads as a
|
|
172
193
|
* command: loading attaches a saved session, which viewing must not do. */
|
|
@@ -29,12 +29,13 @@ export declare function createPwCodeApi<P extends {}>(client: Client<P> & Covers
|
|
|
29
29
|
name: string;
|
|
30
30
|
plan?: string;
|
|
31
31
|
refreshing?: boolean;
|
|
32
|
+
sessions?: string[] | null;
|
|
32
33
|
signInRequired?: boolean;
|
|
33
34
|
usage?: string;
|
|
34
35
|
weeklyResetsAt?: string;
|
|
35
36
|
weeklyUsedPercent?: number;
|
|
36
37
|
}[] | null>;
|
|
37
|
-
useClaudeAccounts: (machine: string, sessionId: string | undefined, enabled: boolean) => {
|
|
38
|
+
useClaudeAccounts: (machine: string, sessionId: string | undefined, enabled: boolean, fresh?: boolean) => {
|
|
38
39
|
accounts: {
|
|
39
40
|
email?: string;
|
|
40
41
|
error?: string;
|
|
@@ -45,6 +46,7 @@ export declare function createPwCodeApi<P extends {}>(client: Client<P> & Covers
|
|
|
45
46
|
name: string;
|
|
46
47
|
plan?: string;
|
|
47
48
|
refreshing?: boolean;
|
|
49
|
+
sessions?: string[] | null;
|
|
48
50
|
signInRequired?: boolean;
|
|
49
51
|
usage?: string;
|
|
50
52
|
weeklyResetsAt?: string;
|
|
@@ -57,14 +59,28 @@ export declare function createPwCodeApi<P extends {}>(client: Client<P> & Covers
|
|
|
57
59
|
refresh: () => Promise<void>;
|
|
58
60
|
};
|
|
59
61
|
useRemoveClaudeAccount: (machine: string, sessionId: string | undefined) => (name: string) => Promise<void>;
|
|
62
|
+
useMoveClaudeAccountSessions: (machine: string, sessionId: string | undefined) => (from: string, to: string) => Promise<string[]>;
|
|
60
63
|
startClaudeLogin: (machine: string, account: string, sessionId: string | undefined, columns: number, rows: number) => Promise<import("./claudeApi.js").ClaudeLoginEvent>;
|
|
61
64
|
writeClaudeLogin: (machine: string, loginId: string, input: import("./claudeApi.js").ClaudeLoginInput) => Promise<void>;
|
|
62
65
|
cancelClaudeLogin: (machine: string, loginId: string) => Promise<void>;
|
|
63
66
|
followClaudeLogin: (machine: string, login: import("./claudeApi.js").ClaudeLogin, after: number, signal: AbortSignal, receive: (event: import("./claudeApi.js").ClaudeLoginEvent) => void) => Promise<void>;
|
|
64
67
|
runGoal: (machine: string, id: string, args: string) => Promise<import("./apiClient.js").PwCodeResult<Schemas['AgentGoalResult']>>;
|
|
65
|
-
runSlashAction: (machine: string, id: string, action:
|
|
66
|
-
kind: '
|
|
67
|
-
}
|
|
68
|
+
runSlashAction: (machine: string, id: string, action: {
|
|
69
|
+
kind: 'clear';
|
|
70
|
+
} | {
|
|
71
|
+
kind: 'compact';
|
|
72
|
+
focus: string;
|
|
73
|
+
} | {
|
|
74
|
+
kind: 'goal';
|
|
75
|
+
args: string;
|
|
76
|
+
} | {
|
|
77
|
+
kind: 'plan';
|
|
78
|
+
args: string;
|
|
79
|
+
} | {
|
|
80
|
+
kind: 'command';
|
|
81
|
+
name: string;
|
|
82
|
+
args: string;
|
|
83
|
+
}, planOnMachine: (path: string) => string, requestId?: string) => Promise<import("./commandsApi.js").CommandOutcome>;
|
|
68
84
|
resolveTyped: (text: string, deps: import("./commandsApi.js").SlashDeps) => Promise<string | null>;
|
|
69
85
|
usePalette: (machine: string, sessionId: string) => {
|
|
70
86
|
palette: {
|
|
@@ -159,6 +175,8 @@ export declare function createPwCodeApi<P extends {}>(client: Client<P> & Covers
|
|
|
159
175
|
status: "idle" | "running" | "awaiting_approval" | "live_elsewhere";
|
|
160
176
|
turnStartedAt?: string;
|
|
161
177
|
updatedAt: string;
|
|
178
|
+
usageLimitResumeAt?: string;
|
|
179
|
+
waitingForUsageLimit?: boolean;
|
|
162
180
|
workspace: string;
|
|
163
181
|
} | undefined) => {
|
|
164
182
|
data: {
|
|
@@ -175,6 +193,49 @@ export declare function createPwCodeApi<P extends {}>(client: Client<P> & Covers
|
|
|
175
193
|
goal?: import("./api.js").components["schemas"]["GoalStatus"];
|
|
176
194
|
group?: string;
|
|
177
195
|
history: import("./api.js").components["schemas"]["HistoryItem"][] | null;
|
|
196
|
+
historyStart?: number;
|
|
197
|
+
id: string;
|
|
198
|
+
inputTokens?: number;
|
|
199
|
+
lastError?: string;
|
|
200
|
+
lastSeq?: number;
|
|
201
|
+
liveHost?: string;
|
|
202
|
+
machineId: string;
|
|
203
|
+
messages: number;
|
|
204
|
+
model: string;
|
|
205
|
+
name?: string;
|
|
206
|
+
outputTokens?: number;
|
|
207
|
+
permissionMode?: string;
|
|
208
|
+
pinnedAt?: string;
|
|
209
|
+
preview: string;
|
|
210
|
+
pullRequestStates?: {
|
|
211
|
+
[key: string]: string;
|
|
212
|
+
};
|
|
213
|
+
pullRequests?: string[] | null;
|
|
214
|
+
remoteControl?: boolean;
|
|
215
|
+
status: "idle" | "running" | "awaiting_approval" | "live_elsewhere";
|
|
216
|
+
turnId?: string;
|
|
217
|
+
turnStartedAt?: string;
|
|
218
|
+
updatedAt: string;
|
|
219
|
+
usageLimitResumeAt?: string;
|
|
220
|
+
waitingForUsageLimit?: boolean;
|
|
221
|
+
workspace: string;
|
|
222
|
+
workspaceUntrusted?: boolean;
|
|
223
|
+
} | undefined;
|
|
224
|
+
preview: {
|
|
225
|
+
addDirs?: import("./api.js").components["schemas"]["AddedDirectory"][] | null;
|
|
226
|
+
allocation?: string;
|
|
227
|
+
allowedDirs?: import("./api.js").components["schemas"]["AllowedDirectory"][] | null;
|
|
228
|
+
approvals?: import("./api.js").components["schemas"]["ApprovalRequest"][] | null;
|
|
229
|
+
archivedAt?: string;
|
|
230
|
+
autoName?: string;
|
|
231
|
+
branch?: string;
|
|
232
|
+
claudeAccount?: string;
|
|
233
|
+
createdAt: string;
|
|
234
|
+
effort?: string;
|
|
235
|
+
goal?: import("./api.js").components["schemas"]["GoalStatus"];
|
|
236
|
+
group?: string;
|
|
237
|
+
history: import("./api.js").components["schemas"]["HistoryItem"][] | null;
|
|
238
|
+
historyStart?: number;
|
|
178
239
|
id: string;
|
|
179
240
|
inputTokens?: number;
|
|
180
241
|
lastError?: string;
|
|
@@ -218,6 +279,7 @@ export declare function createPwCodeApi<P extends {}>(client: Client<P> & Covers
|
|
|
218
279
|
goal?: import("./api.js").components["schemas"]["GoalStatus"];
|
|
219
280
|
group?: string;
|
|
220
281
|
history: import("./api.js").components["schemas"]["HistoryItem"][] | null;
|
|
282
|
+
historyStart?: number;
|
|
221
283
|
id: string;
|
|
222
284
|
inputTokens?: number;
|
|
223
285
|
lastError?: string;
|
|
@@ -270,6 +332,7 @@ export declare function createPwCodeApi<P extends {}>(client: Client<P> & Covers
|
|
|
270
332
|
};
|
|
271
333
|
stopSubagent: (machine: string, id: string, subId: string) => Promise<unknown>;
|
|
272
334
|
stopAllSubagents: (machine: string, id: string) => Promise<unknown>;
|
|
335
|
+
dismissSubagent: (machine: string, id: string, subId: string) => Promise<unknown>;
|
|
273
336
|
useSessionWorktree: (s: {
|
|
274
337
|
allocation?: string;
|
|
275
338
|
approvals?: import("./api.js").components["schemas"]["ApprovalRequest"][] | null;
|
|
@@ -299,6 +362,8 @@ export declare function createPwCodeApi<P extends {}>(client: Client<P> & Covers
|
|
|
299
362
|
status: "idle" | "running" | "awaiting_approval" | "live_elsewhere";
|
|
300
363
|
turnStartedAt?: string;
|
|
301
364
|
updatedAt: string;
|
|
365
|
+
usageLimitResumeAt?: string;
|
|
366
|
+
waitingForUsageLimit?: boolean;
|
|
302
367
|
workspace: string;
|
|
303
368
|
} | undefined) => import("./apiClient.js").PwCodeQuery<Schemas['AgentSessionWorktree']>;
|
|
304
369
|
leaveWorktree: (s: {
|
|
@@ -330,6 +395,8 @@ export declare function createPwCodeApi<P extends {}>(client: Client<P> & Covers
|
|
|
330
395
|
status: "idle" | "running" | "awaiting_approval" | "live_elsewhere";
|
|
331
396
|
turnStartedAt?: string;
|
|
332
397
|
updatedAt: string;
|
|
398
|
+
usageLimitResumeAt?: string;
|
|
399
|
+
waitingForUsageLimit?: boolean;
|
|
333
400
|
workspace: string;
|
|
334
401
|
}, removeRoot?: string) => Promise<{
|
|
335
402
|
left?: Schemas['AgentWorktreeLeft'];
|
|
@@ -337,35 +404,8 @@ export declare function createPwCodeApi<P extends {}>(client: Client<P> & Covers
|
|
|
337
404
|
}>;
|
|
338
405
|
useSessionMutations: () => {
|
|
339
406
|
deleteSession: (s: {
|
|
340
|
-
allocation?: string;
|
|
341
|
-
approvals?: import("./api.js").components["schemas"]["ApprovalRequest"][] | null;
|
|
342
|
-
archivedAt?: string;
|
|
343
|
-
autoName?: string;
|
|
344
|
-
branch?: string;
|
|
345
|
-
createdAt: string;
|
|
346
|
-
effort?: string;
|
|
347
|
-
group?: string;
|
|
348
407
|
id: string;
|
|
349
|
-
inputTokens?: number;
|
|
350
|
-
lastError?: string;
|
|
351
|
-
liveHost?: string;
|
|
352
408
|
machineId: string;
|
|
353
|
-
messages: number;
|
|
354
|
-
model: string;
|
|
355
|
-
name?: string;
|
|
356
|
-
outputTokens?: number;
|
|
357
|
-
permissionMode?: string;
|
|
358
|
-
pinnedAt?: string;
|
|
359
|
-
preview: string;
|
|
360
|
-
pullRequestStates?: {
|
|
361
|
-
[key: string]: string;
|
|
362
|
-
};
|
|
363
|
-
pullRequests?: string[] | null;
|
|
364
|
-
remoteControl?: boolean;
|
|
365
|
-
status: "idle" | "running" | "awaiting_approval" | "live_elsewhere";
|
|
366
|
-
turnStartedAt?: string;
|
|
367
|
-
updatedAt: string;
|
|
368
|
-
workspace: string;
|
|
369
409
|
}, removeWorktree?: string) => Promise<unknown>;
|
|
370
410
|
renameSession: (s: {
|
|
371
411
|
allocation?: string;
|
|
@@ -396,6 +436,8 @@ export declare function createPwCodeApi<P extends {}>(client: Client<P> & Covers
|
|
|
396
436
|
status: "idle" | "running" | "awaiting_approval" | "live_elsewhere";
|
|
397
437
|
turnStartedAt?: string;
|
|
398
438
|
updatedAt: string;
|
|
439
|
+
usageLimitResumeAt?: string;
|
|
440
|
+
waitingForUsageLimit?: boolean;
|
|
399
441
|
workspace: string;
|
|
400
442
|
}, name: string) => Promise<unknown>;
|
|
401
443
|
archiveSession: (s: {
|
|
@@ -427,6 +469,8 @@ export declare function createPwCodeApi<P extends {}>(client: Client<P> & Covers
|
|
|
427
469
|
status: "idle" | "running" | "awaiting_approval" | "live_elsewhere";
|
|
428
470
|
turnStartedAt?: string;
|
|
429
471
|
updatedAt: string;
|
|
472
|
+
usageLimitResumeAt?: string;
|
|
473
|
+
waitingForUsageLimit?: boolean;
|
|
430
474
|
workspace: string;
|
|
431
475
|
}) => Promise<unknown>;
|
|
432
476
|
archiveAfterTurn: (s: {
|
|
@@ -458,6 +502,8 @@ export declare function createPwCodeApi<P extends {}>(client: Client<P> & Covers
|
|
|
458
502
|
status: "idle" | "running" | "awaiting_approval" | "live_elsewhere";
|
|
459
503
|
turnStartedAt?: string;
|
|
460
504
|
updatedAt: string;
|
|
505
|
+
usageLimitResumeAt?: string;
|
|
506
|
+
waitingForUsageLimit?: boolean;
|
|
461
507
|
workspace: string;
|
|
462
508
|
}) => Promise<{
|
|
463
509
|
refusal: unknown;
|
|
@@ -492,6 +538,8 @@ export declare function createPwCodeApi<P extends {}>(client: Client<P> & Covers
|
|
|
492
538
|
status: "idle" | "running" | "awaiting_approval" | "live_elsewhere";
|
|
493
539
|
turnStartedAt?: string;
|
|
494
540
|
updatedAt: string;
|
|
541
|
+
usageLimitResumeAt?: string;
|
|
542
|
+
waitingForUsageLimit?: boolean;
|
|
495
543
|
workspace: string;
|
|
496
544
|
}) => Promise<unknown>;
|
|
497
545
|
pinSession: (s: {
|
|
@@ -523,38 +571,13 @@ export declare function createPwCodeApi<P extends {}>(client: Client<P> & Covers
|
|
|
523
571
|
status: "idle" | "running" | "awaiting_approval" | "live_elsewhere";
|
|
524
572
|
turnStartedAt?: string;
|
|
525
573
|
updatedAt: string;
|
|
574
|
+
usageLimitResumeAt?: string;
|
|
575
|
+
waitingForUsageLimit?: boolean;
|
|
526
576
|
workspace: string;
|
|
527
577
|
}, pinned: boolean) => Promise<unknown>;
|
|
528
578
|
groupSession: (s: {
|
|
529
|
-
allocation?: string;
|
|
530
|
-
approvals?: import("./api.js").components["schemas"]["ApprovalRequest"][] | null;
|
|
531
|
-
archivedAt?: string;
|
|
532
|
-
autoName?: string;
|
|
533
|
-
branch?: string;
|
|
534
|
-
createdAt: string;
|
|
535
|
-
effort?: string;
|
|
536
|
-
group?: string;
|
|
537
579
|
id: string;
|
|
538
|
-
inputTokens?: number;
|
|
539
|
-
lastError?: string;
|
|
540
|
-
liveHost?: string;
|
|
541
580
|
machineId: string;
|
|
542
|
-
messages: number;
|
|
543
|
-
model: string;
|
|
544
|
-
name?: string;
|
|
545
|
-
outputTokens?: number;
|
|
546
|
-
permissionMode?: string;
|
|
547
|
-
pinnedAt?: string;
|
|
548
|
-
preview: string;
|
|
549
|
-
pullRequestStates?: {
|
|
550
|
-
[key: string]: string;
|
|
551
|
-
};
|
|
552
|
-
pullRequests?: string[] | null;
|
|
553
|
-
remoteControl?: boolean;
|
|
554
|
-
status: "idle" | "running" | "awaiting_approval" | "live_elsewhere";
|
|
555
|
-
turnStartedAt?: string;
|
|
556
|
-
updatedAt: string;
|
|
557
|
-
workspace: string;
|
|
558
581
|
}, group: string | null) => Promise<unknown>;
|
|
559
582
|
stopSession: (s: {
|
|
560
583
|
allocation?: string;
|
|
@@ -585,6 +608,8 @@ export declare function createPwCodeApi<P extends {}>(client: Client<P> & Covers
|
|
|
585
608
|
status: "idle" | "running" | "awaiting_approval" | "live_elsewhere";
|
|
586
609
|
turnStartedAt?: string;
|
|
587
610
|
updatedAt: string;
|
|
611
|
+
usageLimitResumeAt?: string;
|
|
612
|
+
waitingForUsageLimit?: boolean;
|
|
588
613
|
workspace: string;
|
|
589
614
|
}) => Promise<unknown>;
|
|
590
615
|
forkSession: (s: {
|
|
@@ -616,6 +641,8 @@ export declare function createPwCodeApi<P extends {}>(client: Client<P> & Covers
|
|
|
616
641
|
status: "idle" | "running" | "awaiting_approval" | "live_elsewhere";
|
|
617
642
|
turnStartedAt?: string;
|
|
618
643
|
updatedAt: string;
|
|
644
|
+
usageLimitResumeAt?: string;
|
|
645
|
+
waitingForUsageLimit?: boolean;
|
|
619
646
|
workspace: string;
|
|
620
647
|
}) => Promise<{
|
|
621
648
|
forked?: Schemas['AgentSessionForked'];
|
|
@@ -636,6 +663,7 @@ export declare function createPwCodeApi<P extends {}>(client: Client<P> & Covers
|
|
|
636
663
|
goal?: import("./api.js").components["schemas"]["GoalStatus"];
|
|
637
664
|
group?: string;
|
|
638
665
|
history: import("./api.js").components["schemas"]["HistoryItem"][] | null;
|
|
666
|
+
historyStart?: number;
|
|
639
667
|
id: string;
|
|
640
668
|
inputTokens?: number;
|
|
641
669
|
lastError?: string;
|
|
@@ -673,6 +701,11 @@ export declare function createPwCodeApi<P extends {}>(client: Client<P> & Covers
|
|
|
673
701
|
saveImage: (machine: string, id: string, body: Schemas['AgentImageBody']) => Promise<import("./apiClient.js").PwCodeResult<Schemas['AgentImageSaved']>>;
|
|
674
702
|
answerApproval: (machine: string, sessionId: string, approvalId: string, answer: import("@parallelworks/ui/ai/headless").ApprovalAnswerValue) => Promise<unknown>;
|
|
675
703
|
removeSessionDirectory: (machine: string, sessionId: string, path: string) => Promise<unknown>;
|
|
704
|
+
upgradePw: (machine: string, sessionId: string) => Promise<{
|
|
705
|
+
answer: string;
|
|
706
|
+
} | {
|
|
707
|
+
error: unknown;
|
|
708
|
+
}>;
|
|
676
709
|
uploadPaste: (machine: string, sessionId: string, text: string, describe: (error: unknown) => string) => Promise<import("./sessionsApi.js").PwCodePasteUpload>;
|
|
677
710
|
updateSessionSettings: (machine: string, id: string, body: {
|
|
678
711
|
allocation?: string;
|
|
@@ -710,6 +743,7 @@ export declare function createPwCodeApi<P extends {}>(client: Client<P> & Covers
|
|
|
710
743
|
recorded?: boolean;
|
|
711
744
|
result?: string;
|
|
712
745
|
resumeAt?: string;
|
|
746
|
+
scheduled?: import("./api.js").components["schemas"]["ScheduledRun"];
|
|
713
747
|
seq: number;
|
|
714
748
|
shellProgress?: import("./api.js").components["schemas"]["ShellProgress"];
|
|
715
749
|
startLine?: number;
|
package/dist/createPwCodeApi.js
CHANGED
|
@@ -5,6 +5,7 @@ import { directoriesApi } from "./directories.js";
|
|
|
5
5
|
import { createQuery } from "./query.js";
|
|
6
6
|
import { reachedByFeed, sessionEvents } from "./sessionEvents.js";
|
|
7
7
|
import { sessionsApi } from "./sessionsApi.js";
|
|
8
|
+
import { sessionsFeed } from "./sessionsFeed.js";
|
|
8
9
|
import { settingsApi } from "./settingsApi.js";
|
|
9
10
|
import { useMemo } from "react";
|
|
10
11
|
// src/createPwCodeApi.ts
|
|
@@ -15,8 +16,9 @@ import { useMemo } from "react";
|
|
|
15
16
|
function createPwCodeApi(client, options = {}) {
|
|
16
17
|
const routes = client;
|
|
17
18
|
const useQuery = createQuery(routes);
|
|
18
|
-
const
|
|
19
|
-
const
|
|
19
|
+
const { useSessionEvents, useFedMachines, listed } = sessionEvents(options);
|
|
20
|
+
const feed = sessionsFeed(options, (listing) => listed(listing.machines ?? []));
|
|
21
|
+
const sessions = sessionsApi(routes, options, listed, feed);
|
|
20
22
|
/** The AI chat a new session is to carry on, for `chatHandoffStart`;
|
|
21
23
|
* undefined without one. */
|
|
22
24
|
function useChatHandoff(chat) {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { PwCodeAddedDirectory, PwCodeAllowedDirectory, PwCodeApprovalAnswer, PwCodeApprovalRequest, PwCodeAskOption, PwCodeGoalStatus, PwCodeHistoryItem, PwCodeHistoryKind, PwCodeImage, PwCodeImageRef, PwCodePasteView, PwCodeSessionDetail, PwCodeSessionState, PwCodeSessionStatus, PwCodeStreamEvent, PwCodeSubagentDetail, PwCodeSubagentUsage, } from './types.js';
|
|
1
|
+
export type { PwCodeAddedDirectory, PwCodeAllowedDirectory, PwCodeApprovalAnswer, PwCodeApprovalRequest, PwCodeAskOption, PwCodeGoalStatus, PwCodeHistoryItem, PwCodeHistoryKind, PwCodeImage, PwCodeImageRef, PwCodePasteView, PwCodeScheduledRun, PwCodeSessionDetail, PwCodeSessionState, PwCodeSessionStatus, PwCodeStreamEvent, PwCodeSubagentDetail, PwCodeSubagentUsage, } from './types.js';
|
|
2
2
|
export { type PwCodeClient, type PwCodeComponents, type PwCodePaths, QUERY_KEY_PREFIX, } from './apiClient.js';
|
|
3
3
|
export { createPwCodeApi, type PwCodeApi, type PwCodeApiOptions, } from './createPwCodeApi.js';
|
|
4
4
|
export { cachedCopyCurrent, pasteRefs, patchPullRequestStates, patchSessionNames, pullRequestsRefreshMs, type PwCodePasteUpload, SESSIONS_REFRESH_MS, useLastReadAt, } from './sessionsApi.js';
|
|
@@ -22,11 +22,11 @@ export { type ClaudeSignInCalls, type ClaudeSignInState, type ClaudeSignInTermin
|
|
|
22
22
|
export { type ClaudeAccount, type ClaudeAccountAction, type ClaudeAccountCalls, type ClaudeAccountDetail, type ClaudeAccountPanelState, type ClaudeAccountUsage, type ClaudeAccountView, type ClaudeUsageLimit, type ClaudeUsageReset, claudeAccountName, claudeSignInRequired, useClaudeAccountName, useClaudeAccountPanel, useClaudeAccountRemoval, useClaudeAccountStartRow, useClaudeAccountUsage, } from './claudeAccounts.js';
|
|
23
23
|
export { changesSubagents, reachedByFeed, sessionEventsPath, } from './sessionEvents.js';
|
|
24
24
|
export { githubAttachmentAsset, isSessionImageUrl, sessionGitHubImageUrl, sessionImageUrl, } from './images.js';
|
|
25
|
-
export { type PwCodePalette, type PwCodeSlashCommand, paletteOptions, type SlashAction, shellCommand, slashAction, steerMayHaveLanded, } from './command.js';
|
|
26
|
-
export { canStartHere, isComputer, isConnected, isMachineDown, isUnreachableError, machinesById, type PwCodeMachine, splitMachines, type TerminalHandoff, terminalHandoff, } from './machine.js';
|
|
25
|
+
export { type PwCodePalette, type PwCodePaletteOption, type PwCodeSlashCommand, paletteOptions, type SlashAction, shellCommand, slashAction, steerMayHaveLanded, } from './command.js';
|
|
26
|
+
export { canStartHere, isComputer, isConnected, isMachineDown, isStarting, isUnreachableError, isWorkspace, machinesById, type PwCodeMachine, splitMachines, type TerminalHandoff, terminalHandoff, } from './machine.js';
|
|
27
27
|
export { isPwCodeLocale, loadPwCodeMessages, type PwCodeLocale, type PwCodeMessages, type PwCodeNamespace, type PwCodeTranslator, pwCodeLocales, pwCodeNamespaces, usePwCodeTranslations, } from './messages.js';
|
|
28
28
|
export { type PwCodeChatStrings, usePwCodeChatStrings } from './chatStrings.js';
|
|
29
|
-
export { turnDuration, useCompactionNotice, useGoalNotice, useRecapNotice, useResumeTime, useTranscriptWords, } from './notices.js';
|
|
29
|
+
export { turnDuration, useCompactionNotice, useGoalNotice, useRecapNotice, useResumeClock, useResumeTime, useTranscriptWords, } from './notices.js';
|
|
30
30
|
export { useCompactAgo } from './ago.js';
|
|
31
31
|
export { pastedPullRequestLabel, pullRequestKind, pullRequestLabel, pullRequestShortLabel, } from './pullRequest.js';
|
|
32
32
|
export { donePullRequestsToFold, FOLD_DONE_PULL_REQUESTS_FROM, foldPullRequests, isPullRequestState, type LabeledPullRequest, labeledPullRequests, orderPullRequests, type PullRequestFold, type PullRequestFoldGroup, type PullRequestState, type PullRequestStateOf, type PullRequestTone, type PullRequestWords, pullRequestFoldGroups, pullRequestGroupState, pullRequestStateBreaks, pullRequestStateOf, pullRequestTone, pullRequestWords, } from './pullRequestList.js';
|
|
@@ -35,22 +35,24 @@ export { handoffCommandParts, type TerminalHandoffPanel, terminalHandoffPanel, }
|
|
|
35
35
|
export { type UsageLimitWait, useUsageLimitWait } from './usageLimit.js';
|
|
36
36
|
export { type PwCodeWorktreeRef, useFollowedWorktree } from './sessionHeader.js';
|
|
37
37
|
export { type HowSessionsAppearStep, howSessionsAppear, } from './howSessionsAppear.js';
|
|
38
|
-
export { isActiveSession, isArchived, isMidTurn, isSession, needsYou, newestFirst, pathBasename, type PwCodePendingApprovals, type PwCodeSession, type RecentDirectory, recentDirectories, sessionClock, sessionKey, sessionStatusVariant, sessionVariant, sharedStoreCopy, spansMachines, triageSessions, waitsOnAnswer, } from './session.js';
|
|
38
|
+
export { isActiveSession, isArchived, isMidTurn, isSession, needsYou, newestFirst, pathBasename, type PwCodePendingApprovals, type PwCodeSession, type RecentDirectory, recentDirectories, sessionClock, sessionKey, sessionStatusVariant, sessionVariant, sharedStoreCopy, spansMachines, triageSessions, waitsOnAnswer, waitsOnUsageLimit, } from './session.js';
|
|
39
39
|
export { groupOf, inFlightFirst, isWorking, type ListedGroup, listGroups, patchGroup, type SessionGroup, type SessionGroups, useSessionGroups, } from './sessionGroups.js';
|
|
40
40
|
export { type GroupDeleteWords, groupSectionKey, isUngroupedTarget, type PwCodeSearchScorer, searchedSessions, type SessionDropTarget, type SessionGroupKey, type SessionList, type SessionListOptions, type SessionSection, type SessionSectionKind, sessionMark, sessionRailLabel, sessionRowState, sessionSearchScore, sessionSearchStatus, sessionSearchText, sessionSections, showsPinMark, useRetainedSessions, useSessionList, withArchiveSection, } from './sessionList.js';
|
|
41
41
|
export { type NamePromptWords, nameToSave, type OpenSessionRef, type SessionActions, type SessionActionsOptions, type SessionConfirmation, type SessionMenuAction, type SessionMenuCommand, type SessionMenuItem, type SessionRename, type SessionRowKey, type SessionSubmenu, useSessionActions, } from './sessionActions.js';
|
|
42
|
-
export { appendOwnMessage, appendSteeredMessage, applyStreamEvent, approvalAnswerBody, approvalToPart, bashRunning, type CompactionNotice, dropMessage, type GoalNotice, historyToMessages, type ImageUrl, initialTranscript, liveSessionStatus, pendingApprovals, pendingMessages, type RecapNotice, resolveApprovalEverywhere, reviewingCount, resumeCursor, type StreamEffect, subagentFrame, subagentSessionDetail, type TranscriptState, type TranscriptWords, turnRunning, type TurnVerb, } from './transcript.js';
|
|
42
|
+
export { appendOwnMessage, appendSteeredMessage, applyStreamEvent, approvalAnswerBody, approvalToPart, bashRunning, type CompactionNotice, dropMessage, type GoalNotice, historyToMessages, type ImageUrl, initialTranscript, liveSessionStatus, pendingApprovals, pendingMessages, type RecapNotice, resolveApprovalEverywhere, reviewingCount, resumeCursor, type SkillActivation, type StreamEffect, subagentFrame, subagentSessionDetail, type TranscriptState, type TranscriptWords, turnRunning, type TurnVerb, } from './transcript.js';
|
|
43
|
+
export { type PwCodeTodoPanel, type PwCodeTodoRow, todoLabel, todoWindow, useTodoPanel, } from './todos.js';
|
|
43
44
|
export { useToolStrings } from './toolStrings.js';
|
|
44
45
|
export { type PwCodeSendResult, type PwCodeSteerResult, type PwCodeTakenBack, type PwCodeWithdrawResult, usePwCodeTranscript, } from './useTranscript.js';
|
|
45
46
|
export { type PwCodeConversation, type PwCodeConversationState, type PwCodeNotice, transcriptMessages, usePwCodeConversation, } from './useConversation.js';
|
|
46
|
-
export { promptHistory, type PwCodeCommandOutput, type PwCodeComposer, type PwCodeComposerHistory, stopTurn, useCommandOutputs, usePwCodeComposer, } from './useComposer.js';
|
|
47
|
+
export { promptHistory, type PwCodeCommandOutput, type PwCodeComposer, type PwCodeComposerHistory, type PwCodeRunningCommand, stopTurn, useCommandOutputs, usePwCodeComposer, } from './useComposer.js';
|
|
47
48
|
export { pasteCardText, type PwCodePasteCards, type PwCodePasteSend, useComposerPastes, usePasteCards, } from './useComposerPastes.js';
|
|
48
49
|
export { claudeAccountChip, claudeOnMachine, goalLabel, newSessionDraftKey, type PwCodeAccountChip, type PwCodeGoalLabel, type PwCodeSessionActivity, type PwCodeSessionBanner, type PwCodeSessionScreen, sessionActivity, sessionBanner, sessionDraftKey, sessionModel, sessionSettingsOptions, usePwCodeSessionScreen, useSessionPicker, useStaleFor, } from './sessionScreen.js';
|
|
50
|
+
export { type PwCodeUpdateNotice, pwUpdateNotice, usePwUpdate, } from './pwUpdate.js';
|
|
49
51
|
export { fitImageWith, type PwCodeImageFit } from './imageFit.js';
|
|
50
52
|
export { loadErrorMessage } from './loadError.js';
|
|
51
53
|
export { markdownImageLink, markdownImageSources, type PwCodeMarkdownImage, } from './images.js';
|
|
52
54
|
export { type PwCodeSubagent, usePwCodeSubagent } from './useSubagent.js';
|
|
53
|
-
export { agentMark, type PwCodeAgentLine, type PwCodeAgentState, type PwCodeAgentSwitcher, type PwCodeStateTone, type PwCodeSwitcherAgent, type PwCodeSwitcherCount, type PwCodeSwitcherRow, switcherAgent, useAgentTypeLabel, usePwCodeAgentLine, usePwCodeAgentSwitcher, } from './agentSwitcher.js';
|
|
54
|
-
export { IMAGE_MAX_BYTES, IMAGE_MAX_SIDE, IMAGE_READ_MAX_BYTES, IMAGE_TYPES, nextImageSeq, type PwCodeComposerImage, type PwCodeImageFile, PwCodeImageTooLarge, type PwCodeImageType, type PwCodeSavedImage, type PwCodeTakenImages, useComposerImages, withoutAppendedImages, } from './useComposerImages.js';
|
|
55
|
+
export { agentMark, type PwCodeAgentLine, type PwCodeAgentState, type PwCodeAgentSwitcher, type PwCodeStateTone, type PwCodeSwitcherAgent, type PwCodeSwitcherCount, type PwCodeSwitcherRow, switcherAgent, useAgentTypeLabel, useDismissSubagent, usePwCodeAgentLine, usePwCodeAgentSwitcher, } from './agentSwitcher.js';
|
|
56
|
+
export { IMAGE_MAX_BYTES, IMAGE_MAX_SIDE, IMAGE_READ_MAX_BYTES, IMAGE_TYPES, nextImageSeq, type PwCodeComposerImage, type PwCodeImageFile, PwCodeImageTooLarge, type PwCodeImageType, type PwCodeMessageImages, type PwCodeSavedImage, type PwCodeTakenImages, useComposerImages, withoutAppendedImages, } from './useComposerImages.js';
|
|
55
57
|
export { type PwCodePresence, recapAfterLeavingMs, recapAfterTurnMs, useAwayRecap, } from './useAwayRecap.js';
|
|
56
58
|
export { composerState, IMAGE_PLACEHOLDER, machineHint, rememberSentPrompt, sessionLabel, sessionStateText, sessionStatusText, } from './wording.js';
|