Commit Graph
51 Commits
Author SHA1 Message Date
Federico Jaramillo Martinez 7e812aa7f5 feat: support general chat file attachments 2026-06-25 21:32:07 +02:00
Federico Jaramillo Martinez e46d9ecbf8 feat: add safe manual workspace uploads 2026-06-25 15:16:44 +02:00
Federico Jaramillo Martinez a0dd9e1cd7 Merge branch 'main' into cleanup/plugin-api-scope 2026-06-24 08:49:49 +02:00
Federico Jaramillo Martinez 4f4c6fa794 fix: proxy remote session reloads 2026-06-23 14:44:24 +02:00
Federico Jaramillo Martinez 9cc20d65fb feat: add external path access allowlist 2026-06-23 12:30:30 +02:00
Federico Jaramillo Martinez 997b821717 feat: add check_subsession and an exploratory read_subsession transcript reader
Split subsession inspection into two tools: check_subsession gives a quick
glance (status + latest assistant output), while read_subsession reads through
a child's transcript with role/content filters, full-content substring search
(including tool-call args), optional per-value maxChars truncation that flags
clipped parts, includeToolArgs, and pagination.

Filtering and search run on full untruncated content; truncation is an explicit,
caller-owned final projection (no default) so a narrow read never silently hides
a match. Empty page-windows are distinguished from zero-match results.
2026-06-19 23:48:12 +02:00
Federico Jaramillo Martinez 355ebe8cf8 feat(sessions): add tracked subsessions behind a beta flag
Add spawn_subsession / list_subsessions / read_subsession tools that let an
agent start child sessions it stays attached to: the child records its parent
in the session tree, the parent is notified (as a system-authored custom
message that wakes an idle parent and queues behind in-flight work) when the
child stops working, and the parent can inspect children's status and result.

Gated behind a beta flag, off by default, mirroring spawnSessions: enable via
PI_WEB_SUBSESSIONS, the subsessions config key, or the Settings toggle. Also
requires spawnSessions.

Also fix the release skill so the version step resyncs package-lock.json
(npm install --package-lock-only) and the commit step refuses a release where
package.json and package-lock.json versions disagree.
2026-06-17 12:13:23 +02:00
Federico Jaramillo Martinez 95c151233a feat: let agents start new sessions via spawn_session tool
Add a project-scoped spawn_session tool so agents can dispatch new,
independent sessions (ralph loops, long-plan chaining). Spawned sessions
are constrained to a workspace/worktree of the same registered project,
appear in the session list immediately via a new session.created event,
and the capability is on by default with a Settings -> Session daemon
toggle (spawnSessions / PI_WEB_SPAWN_SESSIONS).

Note: adds a session daemon code path, so pi-web-sessiond.service must be
restarted manually for the server side to take effect.
2026-06-16 14:53:37 +02:00
marcus dde8675454 fix(plugin-api): federate workspace file mutations and trim PR scope 2026-06-14 15:03:23 +02:00
marcus 27a3b2b5ed feat: Plugin API Completeness — file mutations, prompt editor, and attachment APIs
- WorkspaceFiles: writeFile, deleteFile, moveFile with path safety
  - writeFile: text/binary, auto-create dirs, overwrite option
  - deleteFile: idempotent, uses lstat (removes symlinks not targets)
  - moveFile: unix mv semantics, overwrite defaults to false
  - All mutations auto-refreshFiles() in File Explorer
  - Symlink escape prevention via realpath(dirname) check

- PluginPromptEditor: insertText, getText, getSelection, onPaste, onKeyDown, focus
  - Uses CM6 EditorView.domEventHandlers() via Compartment (not raw DOM)
  - Handlers registered before mount are preserved and applied on mount
  - First-to-consume-wins ordering for multi-plugin scenarios
  - insertText replaces selection (not inserts after)

- PluginAttachments: insertFileReference, getAttachedFiles, removeFileReference
  - insertFileReference validates file exists before inserting @path
  - Does not auto-focus editor (unlike prompt.insertText)
  - @file regex requires file extension to avoid matching emails

- Server endpoints: PUT /file, DELETE /file, POST /file/move
  - All work for local and federated machines

- Tests: 31 unit tests, 9 integration tests, 5 client tests
- Docs: 3 new sections in plugins.md
2026-06-14 15:03:23 +02:00
Federico Jaramillo Martinez 82db15f894 fix(sessions): guard, gate, and test session reload
Build on the original Reload action with the fixes raised in review:

- Server reload() now refuses to run on archived (read-only) sessions
  and when the session has work in progress, mirroring archive(), so a
  reload can no longer silently abort an in-flight agent run.
- Add a sessions.reload runtime capability; the client gates both the
  reloadSession call and the Reload menu entry on it so the action only
  appears for machines whose Pi-Web runtime supports it.
- reloadSession ignores cached-new and archived sessions.
- Add server (PiSessionService + routes) and client (SessionController)
  tests covering reload success, the active-work guard, archived
  rejection, route forwarding, capability gating, and error mapping.
- Restore alphabetical parser import ordering in clients.ts.
- Add a changeset documenting the feature and the sessiond restart note.

Note: touches a session daemon code path, so pi-web-sessiond.service
must be restarted manually for the server side to take effect.
2026-06-14 14:17:51 +02:00
Federico Jaramillo Martinez ca30c970a7 refactor: source thinking levels from pi and make the gauge dynamic
Depend on @earendil-works/pi-agent-core so the ThinkingLevel union has a single source of truth (re-exported via shared/thinkingLevels). Wire/data fields use string and the parser is lenient, so an unknown level from a newer pi runtime is still listed, selectable, and rendered gracefully instead of throwing. The composer gauge now derives its bar count from the levels available for the current model and fills by rank. Adds compile-time drift guards (satisfies + Exclude check) and unit tests so a changed pi level set fails fast in development.
2026-06-14 13:47:44 +02:00
Federico Jaramillo Martinez edae57b836 Clean up remaining dead code and dependencies
- Replace unused 'codemirror' barrel dep with explicit @codemirror/{state,
  view,commands,language} sub-packages that were imported but unlisted
- Remove unused exports: writeNamespacedQuery, targetWorkspacePathForRun,
  isWorkspaceDeletionRun, piWebConfigDir, duplicate parsePiWebRuntimeResponse
- Remove unused types: WorkspacePanelFiles, WorkspacePanelHost,
  GetActiveSession, SaveAttachmentsResponse, QueryValues
- Drop now-unused re-exports/imports cascading from the above
- Add knip config + 'npm run knip' script for ongoing dead-code detection
2026-06-13 21:57:51 +02:00
Federico Jaramillo Martinez d17050e144 feat: add image attachments to the chat composer
Support pasting (Ctrl/Cmd+V), drag-and-drop, and an Attach button to add
PNG/JPEG/GIF/WebP images to a message, with thumbnail previews and
multi-image support.

Attachments are delivered to the session using pi's native ImageContent
format and are run through pi's own resizeImage so they match pi's inline
image limits exactly. Image content now renders inline in the transcript.

A per-message delivery toggle also lets users save attachments into the
workspace `.pi-web/paste` folder and reference them so the agent reads
them with its own tools.

The accepted HTTP upload size is configurable via PI_WEB_MAX_UPLOAD_BYTES
or the maxUploadBytes config value (default 64 MB).

Closes #13
2026-06-13 13:49:39 +02:00
Federico Jaramillo Martinez 71510444c4 Merge remote-tracking branch 'origin/main' into investigate/issue-12-session-dir
# Conflicts:
#	src/client/src/api.ts
#	src/client/src/api/clients.ts
#	src/client/src/api/federatedRouteContract.test.ts
#	src/server/sessions/piSessionService.ts
#	src/server/sessions/sessionRoutes.ts
2026-06-10 20:43:10 +02:00
Federico Jaramillo Martinez 06052ea5ec fix: respect Pi session directories by cwd 2026-06-10 20:26:51 +02:00
Federico Jaramillo Martinez c57f24dfa5 feat: support machine-specific plugins 2026-06-09 15:10:32 +02:00
Federico Jaramillo Martinez fc20b95fed feat: gate session cleanup by runtime capabilities 2026-06-09 11:40:17 +02:00
Federico Jaramillo Martinez a3b5b722c9 feat: add safe session bulk cleanup actions 2026-06-08 17:20:00 +02:00
Federico Jaramillo Martinez b9be7de206 feat: load machine-scoped remote plugins 2026-06-05 09:29:48 +02:00
Federico Jaramillo Martinez 9c3dafc4d4 fix: close workspace terminals before deletion 2026-06-04 21:31:39 +02:00
Federico Jaramillo Martinez 4eb95fec7f Merge remote-tracking branch 'origin/main' into review/pr-5-machine-federation-fixes
# Conflicts:
#	src/client/src/api.ts
#	src/client/src/api/clients.ts
#	src/client/src/api/parsers.ts
#	src/client/src/components/PiWebApp.ts
#	src/server/app.ts
#	src/shared/apiTypes.ts
2026-06-04 10:31:23 +02:00
Federico Jaramillo Martinez 08f69d09c0 feat: bundle workspace tasks plugin 2026-06-03 22:31:36 +02:00
Federico Jaramillo Martinez a58c2113f4 feat: add shortcut config foundation 2026-06-03 20:41:16 +02:00
Federico Jaramillo Martinez 4495a26ffd feat: add settings config UI 2026-06-03 20:20:54 +02:00
Federico Jaramillo Martinez 753b8bbc8a Merge remote-tracking branch 'origin/main' into review/pr-5-machine-federation-fixes
# Conflicts:
#	src/client/src/api/clients.ts
#	src/client/src/components/PiWebApp.ts
#	src/client/src/components/PromptEditor.ts
#	src/server/app.ts
#	src/server/terminalProxyRoutes.ts
#	src/server/workspaces/fileSuggestions.ts
2026-06-02 17:42:16 +02:00
Federico Jaramillo Martinez 9c80eb0a92 fix: improve PI WEB updates panel commands 2026-06-01 17:46:23 +02:00
Federico Jaramillo Martinez 50906617a0 feat: add pi-web version reporting 2026-05-28 21:33:14 +02:00
Federico Jaramillo Martinez 5e2afc1ffa fix: harden machine federation boundaries 2026-05-28 20:49:25 +02:00
Marc Kassubeck 0405b384b1 feat: add local machine registry foundation 2026-05-26 13:04:00 +02:00
Federico Jaramillo Martinez 50f1ddc9c5 fix: refresh session message counts live 2026-05-26 08:52:43 +02:00
Federico Jaramillo Martinez 711c4f3d98 feat: run workspace operations in terminals 2026-05-25 15:01:56 +02:00
Federico Jaramillo Martinez 428f7bb8c2 feat: archive session descendants 2026-05-23 00:05:03 +02:00
Federico Jaramillo Martinez a1e903f8f9 feat: add file browser image previews 2026-05-22 15:36:24 +02:00
Federico Jaramillo Martinez 9e3d272731 feat: prefill forked session prompt draft 2026-05-21 22:56:03 +02:00
Federico Jaramillo Martinez ebe5639399 feat: show project and workspace activity indicators 2026-05-19 13:24:02 +02:00
Federico Jaramillo Martinez babb802912 feat: add Pi Web status panel 2026-05-19 09:27:10 +02:00
Federico Jaramillo Martinez ee6f60fea1 feat: improve edit tool display in web UI 2026-05-18 23:05:19 +02:00
Federico Jaramillo Martinez 6a8f8b6ccf Add global web auth flows 2026-05-16 22:44:24 +02:00
Federico Jaramillo Martinez 80cf879e0f Add realtime terminal tab badges 2026-05-11 10:45:56 +02:00
Federico Jaramillo Martinez 6a201cab02 Add model and thinking controls 2026-05-10 20:53:30 +02:00
Federico Jaramillo Martinez 63ef03f8f6 Improve queued message handling 2026-05-10 00:46:47 +02:00
Federico Jaramillo Martinez 39ea4bfc15 Show session lineage and support detaching forks 2026-05-10 00:28:08 +02:00
Federico Jaramillo Martinez 8eb4dba7cd Align live assistant transcript with history 2026-05-09 21:23:12 +02:00
Federico Jaramillo Martinez 258d109adc Show Pi message metadata in chat 2026-05-09 14:06:09 +02:00
Federico Jaramillo Martinez a0338ab6a7 Broadcast submitted user prompts 2026-05-08 16:17:22 +02:00
Federico Jaramillo Martinez a647f255a2 Add workspace terminal panel 2026-05-08 15:58:02 +02:00
Federico Jaramillo Martinez 8b355f414b Hide Git panel outside repositories 2026-05-08 15:39:37 +02:00
Federico Jaramillo Martinez 1bbad2e89f Add session activity dock and auto naming 2026-05-08 14:53:06 +02:00
Federico Jaramillo Martinez 91957b0fe0 refactor: type session event protocol 2026-05-07 23:51:26 +02:00