Commit Graph

21 Commits

Author SHA1 Message Date
Adrià Arrufat
bd861f5ac0 mcp: rename tools to camelCase 2026-05-24 11:13:56 +02:00
Adrià Arrufat
fec1909aa1 script: strip backendNodeId and fix error line reporting
- Allow recording commands with backendNodeId if they also have a
  selector, stripping backendNodeId during formatting.
- Point UnterminatedQuote errors to the opening line instead of EOF.
- Fix buildHints allocation when fields is empty but required is not.
- Update docs to clarify positional argument rules.
2026-05-22 09:18:32 +02:00
Adrià Arrufat
459893f414 script: unify PandaScript to slash commands
Unifies PandaScript syntax by replacing uppercase keywords with slash
commands (e.g., `/goto`, `/click`, `/fill`). Refactors the `Command`
representation to use a generic tool call structure backed by schemas.

BREAKING CHANGE: Uppercase PandaScript keywords (GOTO, CLICK, TYPE, etc.)
are no longer supported. All scripts must use slash commands.
2026-05-21 20:38:21 +02:00
Adrià Arrufat
8d250ac7b0 agent: rename --task-attachment to --attach
Adds the `-a` short flag, improves CLI validation for one-shot mode,
and ensures `--model` takes precedence over `--pick-model`.

BREAKING CHANGE: `--task-attachment` has been renamed to `--attach`.
2026-05-19 11:02:46 +02:00
Adrià Arrufat
303c5eefce agent: document schema-based EXTRACT command 2026-05-13 09:30:32 +02:00
Adrià Arrufat
0bbb77f292 agent.tutorial: document structured EXTRACT schema
Updates the agent tutorial to explain the JSON schema grammar for the
EXTRACT command, including selectors, attributes, and nested fields.
Adds examples for multi-line input and clarifies recording behavior.
2026-05-13 09:20:27 +02:00
Adrià Arrufat
cd830a7152 agent: add end-to-end tutorial 2026-05-12 10:20:50 +02:00
Adrià Arrufat
1a84f56160 refactor: relocate PandaScript and improve agent reliability
Moves script logic to `browser/script/` for shared use. Implements
message rollback on API failure, caches environment variables, and
fixes a potential panic in the spinner.

- Relocate Command, Recorder, and Verifier to `src/browser/script/`
- Implement message rollback on API and synthesis failures in Agent
- Cache `LP_*` environment variables process-wide with mutex protection
- Fix potential panic in Spinner during backward clock jumps
- Improve Recorder to handle write failures and multi-line comments
- Update documentation regarding attachments and path safety
2026-05-11 19:49:15 +02:00
Adrià Arrufat
b5777ce35c agent: support listing LP_* variables in getEnv 2026-05-11 12:34:36 +02:00
Adrià Arrufat
ecfb404af4 agent: require ALL CAPS for commands 2026-05-11 11:41:04 +02:00
Adrià Arrufat
16b83f5093 agent: add provider auto-detection and --no-llm flag 2026-05-09 19:52:42 +02:00
Adrià Arrufat
c6ccd83ac4 mcp: add pandascript recording and self-healing tools
Adds tools to record sessions and heal scripts over MCP. Refactors
shared logic to `script.zig` and adds a TTY spinner for the agent.
2026-05-07 20:11:40 +02:00
Adrià Arrufat
7bf69a9a34 agent: remove integrated mcp server
Removes the `--mcp` flag and the internal `task` tool from the agent.
Users should use `lightpanda mcp` for external agent integrations.
2026-05-07 17:12:46 +02:00
Adrià Arrufat
a9b3b66802 agent.mcp: prevent path traversal in task attachments 2026-05-04 10:33:46 +02:00
Adrià Arrufat
2ca7550947 agent: restrict getEnv tool to LP_ namespace
Limits the getEnv tool to variables starting with LP_ to prevent the
model from probing sensitive system environment variables or API keys.
2026-05-04 09:54:13 +02:00
Adrià Arrufat
8ce0624f0d agent: clarify that WAIT waits for DOM presence 2026-05-04 07:23:06 +02:00
Adrià Arrufat
eb14783af7 agent: rename Pandascript to PandaScript and .panda to .lp 2026-04-30 17:29:36 +02:00
Adrià Arrufat
300fdfb34c agent: add MCP server mode with task tool 2026-04-30 17:11:48 +02:00
Adrià Arrufat
85f2a08128 agent: update docs 2026-04-30 16:29:52 +02:00
Adrià Arrufat
7aef08f28b agent: replace QUIT command with /quit slash command 2026-04-30 16:22:19 +02:00
Adrià Arrufat
5b66a4f227 agent: add agent mode and pandascript documentation 2026-04-30 16:06:47 +02:00