pi-web-ui 0.118.0 → 0.120.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/CHANGELOG.md +143 -1
- package/bin/hub-upgrade.mjs +33 -15
- package/bin/lib/atomic-file.mjs +90 -0
- package/dist/server/agent-service-daemon.js +44 -10
- package/dist/server/agent-service.js +930 -166
- package/dist/server/approval-default-rules.js +4 -4
- package/dist/server/ask-user-question-tool.js +3 -40
- package/dist/server/atomic-file.js +130 -5
- package/dist/server/background-executors.js +235 -0
- package/dist/server/bash-timeout.js +47 -0
- package/dist/server/bash-tool.js +72 -5
- package/dist/server/bg-servers.js +19 -13
- package/dist/server/browser-page-tool.js +38 -29
- package/dist/server/browser-script-tool.js +119 -0
- package/dist/server/canvas/canvas-agent-tool.js +46 -35
- package/dist/server/canvas/canvas-dispatch.js +12 -1
- package/dist/server/claim-files-tool.js +6 -7
- package/dist/server/client-state.js +457 -41
- package/dist/server/communicate-tool.js +59 -77
- package/dist/server/compact-context-tool.js +4 -13
- package/dist/server/conversation-communication.js +23 -1
- package/dist/server/conversation-read-tool.js +14 -23
- package/dist/server/conversation-rows.js +17 -0
- package/dist/server/conversation-tool-names.js +2 -2
- package/dist/server/conversation-tool.js +23 -15
- package/dist/server/conversation-touches.js +1 -1
- package/dist/server/delegate-mode.js +0 -1
- package/dist/server/delegate-task.js +18 -39
- package/dist/server/device-center/approval-summary.js +0 -1
- package/dist/server/device-center/bot-execution.js +0 -1
- package/dist/server/device-center/group-router-runtime.js +2 -0
- package/dist/server/device-center/hub-upgrade.js +5 -10
- package/dist/server/device-center/task-progress.js +2 -2
- package/dist/server/dispatch-domain-handlers.js +97 -24
- package/dist/server/dispatch-plugin-handlers.js +10 -0
- package/dist/server/dsh/dsh-agent-service.js +21 -19
- package/dist/server/durable/durable-agent-service.js +1 -1
- package/dist/server/edit-tool.js +293 -0
- package/dist/server/engine-catalog.js +8 -2
- package/dist/server/engine-cli.js +29 -7
- package/dist/server/engine-probe.js +11 -6
- package/dist/server/eval-tool.js +5 -19
- package/dist/server/files-service.js +41 -19
- package/dist/server/fs-copy.js +93 -0
- package/dist/server/goal-review-gate.js +2 -3
- package/dist/server/index.js +92 -3
- package/dist/server/job-runner.js +345 -0
- package/dist/server/lsp-tool.js +10 -28
- package/dist/server/marker-service.js +42 -30
- package/dist/server/mcp-agent-tool.js +22 -47
- package/dist/server/model-session.js +16 -0
- package/dist/server/native-cli-session-hooks.js +3 -2
- package/dist/server/native-cli-session.js +27 -2
- package/dist/server/patch-tool.js +2 -8
- package/dist/server/phone-tool.js +167 -0
- package/dist/server/plan-mode.js +7 -4
- package/dist/server/plan-update-tool.js +5 -8
- package/dist/server/plugin-api-catalog.js +13 -1
- package/dist/server/plugin-bundled.js +35 -28
- package/dist/server/plugin-catalog.js +6 -0
- package/dist/server/plugin-delivery.js +358 -0
- package/dist/server/plugin-inbox.js +152 -0
- package/dist/server/plugin-installer.js +15 -0
- package/dist/server/plugin-ledger.js +183 -0
- package/dist/server/plugin-manifest-validate.js +19 -0
- package/dist/server/plugin-materialize.js +161 -0
- package/dist/server/plugin-paths.js +60 -0
- package/dist/server/plugin-removal.js +16 -3
- package/dist/server/plugin-schedule.js +8 -7
- package/dist/server/plugin-secrets.js +7 -3
- package/dist/server/plugin-updater.js +2 -4
- package/dist/server/plugins.js +205 -48
- package/dist/server/present-files-tool.js +7 -13
- package/dist/server/preset-fields.js +23 -12
- package/dist/server/preset-share.js +1 -1
- package/dist/server/process-utils.js +11 -0
- package/dist/server/project-scripts.js +38 -0
- package/dist/server/prompt-composer.js +40 -21
- package/dist/server/protocol-version.js +1 -1
- package/dist/server/question-params.js +98 -0
- package/dist/server/quick-ask-settings.js +0 -1
- package/dist/server/quick-ask.js +3 -0
- package/dist/server/read-tool.js +10 -17
- package/dist/server/remote-ssh-service.js +40 -1
- package/dist/server/sandbox-runtime-gate.js +1 -1
- package/dist/server/sandbox-service.js +0 -1
- package/dist/server/sandbox-tool.js +25 -34
- package/dist/server/schedule-agent-tool.js +9 -19
- package/dist/server/scm-commitmsg.js +2 -1
- package/dist/server/serialize.js +8 -0
- package/dist/server/session-list-index.js +246 -0
- package/dist/server/session-list-scan.js +5 -0
- package/dist/server/session-parser.js +16 -0
- package/dist/server/settings-service.js +49 -19
- package/dist/server/skill-tool.js +4 -6
- package/dist/server/subagent-budget.js +68 -0
- package/dist/server/subagent-evidence.js +297 -0
- package/dist/server/subagent-helpers.js +12 -0
- package/dist/server/subagent-ledger.js +401 -0
- package/dist/server/subagent-notify.js +6 -2
- package/dist/server/subagent-security-gate.js +2 -3
- package/dist/server/subagent-settle.js +71 -0
- package/dist/server/subagents.js +566 -211
- package/dist/server/tabs.js +8 -1
- package/dist/server/terminals.js +34 -28
- package/dist/server/tool-approval.js +15 -1
- package/dist/server/tool-guards.js +0 -91
- package/dist/server/tool-manager.js +127 -47
- package/dist/server/tool-overrides.js +8 -1
- package/dist/server/tool-prompt-overrides.js +3 -6
- package/dist/server/tool-prompts.js +60 -17
- package/dist/server/universal/driver-base.js +2 -0
- package/dist/server/universal/drivers/claude-code.js +210 -211
- package/dist/server/universal/drivers/codex.js +29 -24
- package/dist/server/universal/engine-mcp.js +107 -0
- package/dist/server/universal/universal-attachments.js +77 -1
- package/dist/server/universal/universal-service.js +1 -1
- package/dist/server/universal/universal-session.js +106 -69
- package/dist/server/vision-bridge.js +2 -0
- package/dist/server/workspace-handle.js +119 -17
- package/dist/server/workspace-queue.js +37 -0
- package/dist/server/worktree-tool.js +13 -20
- package/docs/README.md +40 -36
- package/docs/architecture-plugins.md +64 -35
- package/docs/device-center.md +1 -1
- package/package.json +16 -4
- package/plugin-sdk/index.d.ts +102 -0
- package/plugins/catalog.json +23 -51
- package/themes/bases/flow-base.css +8 -17
- package/themes/dark-teal.css +0 -3
- package/web/dist/.build-assets.json +1 -1
- package/web/dist/assets/BgTasksModal-BdOJ19Hj.js +1 -0
- package/web/dist/assets/BgTasksModal-SAH2XCkY.js +1 -0
- package/web/dist/assets/{CanvasStudio-CAWcs9tm.js → CanvasStudio-BB_Iq7pl.js} +3 -3
- package/web/dist/assets/CanvasStudio-DU6O3N4u.js +1579 -0
- package/web/dist/assets/DeviceCenter-By1zVTSY.js +3 -0
- package/web/dist/assets/DeviceCenter-Cnm0Tjrx.js +3 -0
- package/web/dist/assets/DeviceExecutionSettings-qJzbI0Cf.js +1 -0
- package/web/dist/assets/{DeviceGroups-C_fZMNeK.js → DeviceGroups-DPrQxW6B.js} +1 -1
- package/web/dist/assets/DeviceGroups-DoucyUjI.js +1 -0
- package/web/dist/assets/{Dropdown-CTgVLUbp.js → Dropdown-kj_NIj6e.js} +1 -1
- package/web/dist/assets/FilePreview-Bub8Y9uq.js +2 -0
- package/web/dist/assets/FilePreview-CC76Z6an.js +2 -0
- package/web/dist/assets/GlobalSearchModal-01nkgw4X.js +1 -0
- package/web/dist/assets/GlobalSearchModal-CiT6wBmR.js +1 -0
- package/web/dist/assets/GroupConversation-1-lsPO1f.js +61 -0
- package/web/dist/assets/GroupConversation-HeiyW_O_.js +61 -0
- package/web/dist/assets/{GroupWorkItems-BIvZtr10.js → GroupWorkItems-BYJv2XFj.js} +1 -1
- package/web/dist/assets/{HintTip-Da6qc566.js → HintTip-DFhoclDw.js} +1 -1
- package/web/dist/assets/ModelConfigModal-D2Ro-jUZ.js +2 -0
- package/web/dist/assets/ModelConfigModal-DPc9R1pq.js +2 -0
- package/web/dist/assets/{NativeCliPanel-CU1rZmyu.js → NativeCliPanel-B108d697.js} +3 -3
- package/web/dist/assets/NativeCliPanel-DupvGwQM.js +5 -0
- package/web/dist/assets/{PiSetupModal-DZKY5Wiw.js → PiSetupModal-D0HitBfd.js} +1 -1
- package/web/dist/assets/ProviderOAuthControls-BLKUEDde.js +1 -0
- package/web/dist/assets/SCMPanel-DDbWrUHR.js +2 -0
- package/web/dist/assets/SCMPanel-DluNcd2-.js +2 -0
- package/web/dist/assets/SettingsModal-Cy5lRC97.css +1 -0
- package/web/dist/assets/SettingsModal-DQu18366.js +33 -0
- package/web/dist/assets/SettingsModal-Dm_haPme.js +33 -0
- package/web/dist/assets/{TermXterm-Bt5WKAxP.js → TermXterm-SYc-MUk2.js} +2 -2
- package/web/dist/assets/TerminalPanel-CgA_lhVT.js +1 -0
- package/web/dist/assets/TerminalPanel-vdSIOPjD.js +1 -0
- package/web/dist/assets/TuiOverlayModal-Cy1jYYIw.js +1 -0
- package/web/dist/assets/TuiOverlayModal-kXY_4hV8.js +1 -0
- package/web/dist/assets/app-globals-CBEscsYP.js +129 -0
- package/web/dist/assets/{canvas-client-WkhM55mR.js → canvas-client-Clsypfs6.js} +1 -1
- package/web/dist/assets/{desktop-B8NZ3KW-.js → desktop-C6D9a8HZ.js} +1 -1
- package/web/dist/assets/index-BD29OL9L.js +404 -0
- package/web/dist/assets/index-BlCxbqqr.js +404 -0
- package/web/dist/assets/index-DB55rbKC.css +1 -0
- package/web/dist/assets/plugin-host-VWBcq-LQ.js +1 -0
- package/web/dist/assets/remote-ssh-client-C2eab5Kw.js +1 -0
- package/web/dist/assets/theme-CpQk_Agp.js +1 -0
- package/web/dist/index.html +10 -10
- package/web/dist/sw.js +1 -1
- package/dist/server/edit-soft-tool.js +0 -297
- package/web/dist/assets/BgTasksModal-D-x7kA63.js +0 -1
- package/web/dist/assets/DeviceCenter-Dc0whRcu.js +0 -3
- package/web/dist/assets/DeviceExecutionSettings-BoX7-0h7.js +0 -1
- package/web/dist/assets/FilePreview-C6W0PvaK.js +0 -2
- package/web/dist/assets/GlobalSearchModal-HR9LSspC.js +0 -1
- package/web/dist/assets/GroupConversation-C81YjF2C.js +0 -61
- package/web/dist/assets/ModelConfigModal-DhSyuIuV.js +0 -2
- package/web/dist/assets/ProviderOAuthControls-CIL85nA7.js +0 -1
- package/web/dist/assets/SCMPanel-CuEgzAlO.js +0 -2
- package/web/dist/assets/SettingsModal-Cdu5h29p.js +0 -33
- package/web/dist/assets/TerminalPanel-BCIBV8se.js +0 -1
- package/web/dist/assets/TuiOverlayModal-3NDd9T97.js +0 -1
- package/web/dist/assets/app-globals-CZjFtI4F.js +0 -129
- package/web/dist/assets/index-CQc3VrWa.css +0 -1
- package/web/dist/assets/index-D_AGu4Zv.js +0 -404
- package/web/dist/assets/plugin-host-uqZGpvCs.js +0 -1
- package/web/dist/assets/remote-ssh-client-Cdf-cTUe.js +0 -1
- package/web/dist/assets/theme-DGL7hLUs.js +0 -1
|
@@ -1,29 +1,72 @@
|
|
|
1
1
|
import { Type } from "typebox";
|
|
2
|
-
export const BASH_DESCRIPTION = "Run
|
|
3
|
-
"When the terminal-backed bash is active (setting: default bash override) it runs in a visible terminal: " +
|
|
4
|
-
"persist=true keeps the 'ai-bash' terminal alive (cd/venv/ssh retained across calls), persist=false is one-shot; " +
|
|
5
|
-
"otherwise it runs natively (process spawn, no terminal) and persist has no effect. " +
|
|
6
|
-
"Never pipe through head/tail/more/less — use the head/tail params (pipes hide live progress).";
|
|
2
|
+
export const BASH_DESCRIPTION = "Run shell command. Do not pipe to head/tail/more/less; use head/tail params instead.";
|
|
7
3
|
export const BASH_PROMPT_SNIPPET = "run shell commands";
|
|
8
4
|
export const BASH_PROMPT_GUIDELINES = [
|
|
9
5
|
"For interactive commands (REPLs, y/n prompts) set persist=true and drive them with terminal(action='input'/'key')",
|
|
6
|
+
"Set background=true for long-lived services (dev servers, watchers) instead of raising timeout: the call returns a job id plus the log path, and the process stays listed under Background tasks until stopped",
|
|
10
7
|
"Use the dedicated worktree tool instead of running 'git worktree' in bash to prevent unsynchronized workspace state",
|
|
8
|
+
"timeout defaults to 120s: pass a larger value for long builds instead of retrying a killed command",
|
|
11
9
|
];
|
|
12
10
|
export const BASH_PARAMETERS = Type.Object({
|
|
13
|
-
command: Type.String(
|
|
14
|
-
timeout: Type.Optional(Type.Number({ description: "
|
|
11
|
+
command: Type.String(),
|
|
12
|
+
timeout: Type.Optional(Type.Number({ description: "Seconds, default 120; background jobs default to 0 (no limit)" })),
|
|
15
13
|
persist: Type.Optional(Type.Boolean({
|
|
16
|
-
description: "
|
|
17
|
-
"(shell state retained across calls), false = one-shot terminal.",
|
|
14
|
+
description: "Retain shell state (cd/venv/ssh) in ai-bash terminal",
|
|
18
15
|
})),
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
maximum: 5000,
|
|
22
|
-
description: "Only return the FIRST N lines of output (like `| head -N`).",
|
|
16
|
+
background: Type.Optional(Type.Boolean({
|
|
17
|
+
description: "Detached: call returns a job id, process keeps running",
|
|
23
18
|
})),
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
19
|
+
head: Type.Optional(Type.Integer()),
|
|
20
|
+
tail: Type.Optional(Type.Integer()),
|
|
21
|
+
});
|
|
22
|
+
export const EDIT_DESCRIPTION = "Replace unique oldText with newText in a file. Non-overlapping edits only.";
|
|
23
|
+
export const EDIT_PROMPT_SNIPPET = "Replace exact text in one file; soft=true ignores indentation drift";
|
|
24
|
+
export const EDIT_PROMPT_GUIDELINES = [
|
|
25
|
+
"oldText must match the file exactly; if a call fails with 'Could not find the text', retry the same edits with soft=true (whole-line match, leading indentation ignored)",
|
|
26
|
+
"Merge changes to several locations of one file into a single call's edits[] instead of several calls",
|
|
27
|
+
"Each oldText matches the original file, never earlier edits in the same call; never overlap or nest them",
|
|
28
|
+
"Keep oldText minimal but unique; do not pad it with large unchanged regions",
|
|
29
|
+
];
|
|
30
|
+
export const EDIT_PARAMETERS = Type.Object({
|
|
31
|
+
path: Type.String(),
|
|
32
|
+
edits: Type.Array(Type.Object({
|
|
33
|
+
oldText: Type.String(),
|
|
34
|
+
newText: Type.String(),
|
|
28
35
|
})),
|
|
36
|
+
soft: Type.Optional(Type.Boolean({
|
|
37
|
+
description: "Ignore leading whitespace/indentation per line",
|
|
38
|
+
})),
|
|
39
|
+
});
|
|
40
|
+
// 以下三件写在这里而不是 SDK 里:模型看的是一份紧凑文案,字段本身自解释。
|
|
41
|
+
// 字段名必须与 SDK 内置定义一致 —— `tests/unit/tool-schema-slim.test.ts` 会比对,SDK 增删参数时直接红。
|
|
42
|
+
export const WRITE_DESCRIPTION = "Write or overwrite file content (auto-creates parent dirs).";
|
|
43
|
+
export const WRITE_PARAMETERS = Type.Object({
|
|
44
|
+
path: Type.String(),
|
|
45
|
+
content: Type.String(),
|
|
46
|
+
});
|
|
47
|
+
export const GREP_DESCRIPTION = "Search file contents by regex or literal (respects .gitignore, max 100 matches/50KB).";
|
|
48
|
+
export const GREP_PARAMETERS = Type.Object({
|
|
49
|
+
pattern: Type.String(),
|
|
50
|
+
path: Type.Optional(Type.String()),
|
|
51
|
+
glob: Type.Optional(Type.String()),
|
|
52
|
+
ignoreCase: Type.Optional(Type.Boolean()),
|
|
53
|
+
literal: Type.Optional(Type.Boolean()),
|
|
54
|
+
context: Type.Optional(Type.Number()),
|
|
55
|
+
limit: Type.Optional(Type.Number()),
|
|
56
|
+
});
|
|
57
|
+
export const LS_DESCRIPTION = "List directory entries ('/' suffix for dirs, dotfiles included; truncated to 500 entries/50KB).";
|
|
58
|
+
export const LS_PARAMETERS = Type.Object({
|
|
59
|
+
path: Type.Optional(Type.String()),
|
|
60
|
+
limit: Type.Optional(Type.Number()),
|
|
61
|
+
});
|
|
62
|
+
export const POWERSHELL_DESCRIPTION = "Run a PowerShell command. Output is truncated to the last 2000 lines/50KB; full output goes to a temp file.";
|
|
63
|
+
export const POWERSHELL_PARAMETERS = Type.Object({
|
|
64
|
+
command: Type.String(),
|
|
65
|
+
timeout: Type.Optional(Type.Number({ description: "Seconds" })),
|
|
66
|
+
});
|
|
67
|
+
export const FIND_DESCRIPTION = "Find files by glob pattern (respects .gitignore, max 1000 results/50KB).";
|
|
68
|
+
export const FIND_PARAMETERS = Type.Object({
|
|
69
|
+
pattern: Type.String(),
|
|
70
|
+
path: Type.Optional(Type.String()),
|
|
71
|
+
limit: Type.Optional(Type.Number()),
|
|
29
72
|
});
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { DEFAULT_UNIVERSAL_CAPABILITIES } from "../engine-capabilities.js";
|
|
2
2
|
export class BaseAgentDriver {
|
|
3
|
+
/** Inline images above this size are handed to the CLI as files instead (engine API limit). */
|
|
4
|
+
maxInlineImageBytes;
|
|
3
5
|
cwd;
|
|
4
6
|
constructor(cwd) {
|
|
5
7
|
this.cwd = cwd;
|