@co0ontty/wand 1.18.12 → 1.21.4
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/dist/claude-pty-bridge.d.ts +8 -0
- package/dist/claude-pty-bridge.js +34 -11
- package/dist/cli.js +72 -5
- package/dist/ensure-node-pty-helper.d.ts +1 -0
- package/dist/ensure-node-pty-helper.js +51 -0
- package/dist/git-quick-commit.d.ts +18 -0
- package/dist/git-quick-commit.js +381 -0
- package/dist/models.d.ts +3 -1
- package/dist/models.js +45 -7
- package/dist/process-manager.d.ts +6 -8
- package/dist/process-manager.js +90 -176
- package/dist/prompt-optimizer.d.ts +5 -0
- package/dist/prompt-optimizer.js +72 -0
- package/dist/pty-text-utils.d.ts +25 -1
- package/dist/pty-text-utils.js +158 -2
- package/dist/server-session-routes.d.ts +2 -2
- package/dist/server-session-routes.js +94 -8
- package/dist/server.d.ts +22 -1
- package/dist/server.js +138 -16
- package/dist/session-logger.d.ts +15 -4
- package/dist/session-logger.js +52 -4
- package/dist/structured-session-manager.d.ts +12 -2
- package/dist/structured-session-manager.js +465 -22
- package/dist/tui/index.d.ts +24 -0
- package/dist/tui/index.js +138 -0
- package/dist/tui/layout.d.ts +25 -0
- package/dist/tui/layout.js +198 -0
- package/dist/tui/log-bus.d.ts +23 -0
- package/dist/tui/log-bus.js +111 -0
- package/dist/tui/relative-time.d.ts +4 -0
- package/dist/tui/relative-time.js +27 -0
- package/dist/tui/session-formatter.d.ts +17 -0
- package/dist/tui/session-formatter.js +111 -0
- package/dist/types.d.ts +55 -2
- package/dist/web-ui/content/scripts.js +1371 -261
- package/dist/web-ui/content/styles.css +436 -9
- package/dist/web-ui/content/vendor/wterm/wterm.bundle.js +1 -1
- package/dist/ws-broadcast.js +74 -12
- package/package.json +3 -1
package/dist/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export type SessionKind = "pty" | "structured";
|
|
2
2
|
export type SessionCreateKind = "pty" | "structured";
|
|
3
3
|
export type SessionProvider = "claude" | "codex";
|
|
4
|
-
export type SessionRunner = "claude-cli" | "claude-cli-print" | "pty";
|
|
4
|
+
export type SessionRunner = "claude-cli" | "claude-cli-print" | "codex-cli-exec" | "pty";
|
|
5
5
|
export type ExecutionMode = "assist" | "agent" | "agent-max" | "default" | "auto-edit" | "full-access" | "native" | "managed";
|
|
6
6
|
export type AutonomyPolicy = "assist" | "agent" | "agent-max";
|
|
7
7
|
export type ApprovalPolicy = "ask-every-time" | "approve-once" | "remember-this-turn";
|
|
@@ -14,6 +14,9 @@ export interface ProcessEvent {
|
|
|
14
14
|
type: "output" | "status" | "started" | "ended" | "usage" | "task" | "notification";
|
|
15
15
|
sessionId: string;
|
|
16
16
|
data?: unknown;
|
|
17
|
+
/** Monotonic per-session sequence stamped by the WS broadcast layer for
|
|
18
|
+
* output events. Lets clients spot gaps caused by backpressure drops. */
|
|
19
|
+
seq?: number;
|
|
17
20
|
}
|
|
18
21
|
export type ProcessEventHandler = (event: ProcessEvent) => void;
|
|
19
22
|
export interface EscalationRequest {
|
|
@@ -135,6 +138,48 @@ export interface WorktreeMergeResult {
|
|
|
135
138
|
errorCode?: string;
|
|
136
139
|
reason?: string;
|
|
137
140
|
}
|
|
141
|
+
export interface GitStatusFileEntry {
|
|
142
|
+
path: string;
|
|
143
|
+
/** Two-char porcelain status (e.g. " M", "MM", "??", "A ") */
|
|
144
|
+
status: string;
|
|
145
|
+
/** True 当条目是 submodule(来源于 porcelain v2 的 sub 字段第一位为 S)。 */
|
|
146
|
+
isSubmodule?: boolean;
|
|
147
|
+
/** submodule 子状态:指针是否变化 / 内部是否 dirty / 是否有未跟踪文件。 */
|
|
148
|
+
submoduleState?: {
|
|
149
|
+
commitChanged: boolean;
|
|
150
|
+
hasTrackedChanges: boolean;
|
|
151
|
+
hasUntracked: boolean;
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
export interface GitStatusResult {
|
|
155
|
+
isGit: boolean;
|
|
156
|
+
branch?: string;
|
|
157
|
+
/** Number of files with any change (modified / added / deleted / untracked). */
|
|
158
|
+
modifiedCount?: number;
|
|
159
|
+
files?: GitStatusFileEntry[];
|
|
160
|
+
head?: string;
|
|
161
|
+
repoRoot?: string;
|
|
162
|
+
/** Truthy when the repo has no commits yet (initial state). */
|
|
163
|
+
initialCommit?: boolean;
|
|
164
|
+
/** Most recent reachable tag (e.g. "v1.2.3"). */
|
|
165
|
+
latestTag?: string;
|
|
166
|
+
/** Auto-suggested next tag derived by bumping the patch segment. */
|
|
167
|
+
suggestedNextTag?: string;
|
|
168
|
+
error?: string;
|
|
169
|
+
}
|
|
170
|
+
export interface QuickCommitResult {
|
|
171
|
+
ok: boolean;
|
|
172
|
+
commit?: {
|
|
173
|
+
hash: string;
|
|
174
|
+
message: string;
|
|
175
|
+
};
|
|
176
|
+
tag?: {
|
|
177
|
+
name: string;
|
|
178
|
+
};
|
|
179
|
+
pushed?: boolean;
|
|
180
|
+
/** commit 已成功但 push 失败时填入;前端用它显示"已提交但 push 失败"。 */
|
|
181
|
+
pushError?: string;
|
|
182
|
+
}
|
|
138
183
|
export interface CommandRequest {
|
|
139
184
|
command: string;
|
|
140
185
|
provider?: SessionProvider;
|
|
@@ -144,6 +189,10 @@ export interface CommandRequest {
|
|
|
144
189
|
worktreeEnabled?: boolean;
|
|
145
190
|
/** Claude 模型(别名或完整 ID)。仅对 claude provider 生效。留空则回落到 config.defaultModel。 */
|
|
146
191
|
model?: string;
|
|
192
|
+
/** 创建会话时由前端测得的真实列数。后端用它直接 spawn PTY,避免"先 120 列再 resize"的早期错位。 */
|
|
193
|
+
cols?: number;
|
|
194
|
+
/** 创建会话时由前端测得的真实行数。 */
|
|
195
|
+
rows?: number;
|
|
147
196
|
}
|
|
148
197
|
export interface InputRequest {
|
|
149
198
|
input?: string;
|
|
@@ -242,7 +291,7 @@ export interface SessionSnapshot {
|
|
|
242
291
|
autonomyPolicy?: AutonomyPolicy;
|
|
243
292
|
approvalPolicy?: ApprovalPolicy;
|
|
244
293
|
allowedScopes?: EscalationScope[];
|
|
245
|
-
status: "running" | "exited" | "failed" | "stopped";
|
|
294
|
+
status: "idle" | "running" | "exited" | "failed" | "stopped";
|
|
246
295
|
exitCode: number | null;
|
|
247
296
|
startedAt: string;
|
|
248
297
|
endedAt: string | null;
|
|
@@ -283,6 +332,10 @@ export interface SessionSnapshot {
|
|
|
283
332
|
currentTaskTitle?: string;
|
|
284
333
|
/** 用户为此会话选定的 Claude 模型(别名或完整 ID)。结构化会话下次 spawn 时使用;PTY 会话仅用于展示。 */
|
|
285
334
|
selectedModel?: string | null;
|
|
335
|
+
/** 当前 PTY 列宽,由最近一次 resize 决定。前端用它来判断本端 fit 是否需要校准。 */
|
|
336
|
+
ptyCols?: number;
|
|
337
|
+
/** 当前 PTY 行数,由最近一次 resize 决定。 */
|
|
338
|
+
ptyRows?: number;
|
|
286
339
|
}
|
|
287
340
|
/** Unified event type emitted by ClaudePtyBridge for WebSocket broadcast */
|
|
288
341
|
export type SessionEventType = "output.raw" | "output.chat" | "chat.turn" | "permission.prompt" | "permission.resolved" | "session.id" | "task" | "ended";
|