@rynx-ai/cli 0.1.11-beta.5 → 0.1.11-beta.50

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.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: browser
3
- description: Use the bundled Rynx CLI to inspect and automate the Browser owned by the active Rynx Session with snapshots, accessibility refs, navigation, clicks, typing, screenshots, page inspection, and safe failure handling.
3
+ description: Use the bundled Rynx CLI to inspect and automate the Browser owned by the active Rynx Session, and to read or update the Session-wide Browser request-header policy, with safe failure handling.
4
4
  ---
5
5
 
6
6
  # Rynx Browser
@@ -24,48 +24,127 @@ installation, App, browser, or service. Do not scan `/Applications`, use `find`
24
24
  or `mdfind`, run `open`, `open -a`, or `osascript`, inspect Preview/dev builds,
25
25
  or launch/relaunch a Rynx App or daemon.
26
26
 
27
- ## Core loop
27
+ ## Core loop: upstream argv, not Rynx action aliases
28
28
 
29
- Open or navigate the Session Browser when needed:
29
+ Rynx owns Session/Browser/Page resources. All page operations use one general
30
+ entry point; the retired snapshot/click/type/navigate/screenshot aliases are
31
+ not accepted.
30
32
 
31
33
  ```sh
32
34
  rynx browser open https://example.com --json
33
- rynx browser navigate https://example.com/next --json
35
+ rynx browser pages --json
36
+ rynx browser exec -- --help
37
+ rynx browser exec --page <pageId> --json -- snapshot -i
38
+ rynx browser exec --page <pageId> --json -- click @<ref>
39
+ rynx browser exec --page <pageId> --json -- fill @<ref> "带空格的中文"
40
+ rynx browser exec --page <pageId> --json -- screenshot /absolute/path/page.png
34
41
  ```
35
42
 
36
- Inspect before acting:
43
+ Everything after the separator is an argv array sent to the selected native
44
+ agent-browser CLI, without a shell or a second string parser. New upstream
45
+ page commands/options do not require a Rynx command mapping. Command-first
46
+ syntax is required. Use upstream help from this exact engine for frame, wait,
47
+ find, get, scroll, keyboard and other operations; do not copy a command table
48
+ from a different installed version. The outer --json controls Rynx output;
49
+ do not pass an inner --json or override --session, --cdp, configuration,
50
+ provider, namespace, Browser lifecycle or helper settings.
51
+
52
+ JSON is schemaVersion 2 with sessionId, browserGeneration, pageId, driverVersion
53
+ and upstream data. A snapshot has data.snapshot (text) and data.refs (map).
54
+ Upstream data and native refs are returned unchanged. Use the native refs from
55
+ the latest response (for example @e1); do not invent them. Rynx does not wrap,
56
+ translate or track refs. Ref validity belongs to agent-browser, not Rynx.
57
+ For multi-page tasks, keep --page fixed for the snapshot and subsequent actions:
58
+ refs do not identify their originating Page. Without --page, the command targets
59
+ the Session's current Page when admitted. A missing explicit Page never falls
60
+ back to a neighbor, and switching tabs cannot redirect an already queued command.
61
+
62
+ Frame selection is also upstream state for this Page helper:
37
63
 
38
64
  ```sh
39
- rynx browser snapshot --json
65
+ rynx browser exec --page <pageId> -- frame @<iframe-ref>
66
+ rynx browser exec --page <pageId> --json -- snapshot -i
67
+ rynx browser exec --page <pageId> -- frame main
40
68
  ```
41
69
 
42
- Use a returned accessibility `ref` for the next action:
70
+ Use the latest native references after snapshot, annotated screenshot or diff;
71
+ these commands may replace the engine's reference map. Take a fresh snapshot
72
+ after switching frames, navigation, substantial DOM replacement or helper/engine
73
+ restart. Old native ref numbers may be reused; Rynx adds no stale-ref protection.
74
+ type inserts; fill replaces, exactly as documented by the selected engine.
75
+ Screenshot formats/options also follow that engine; Rynx does not implement
76
+ a parallel image encoder. Use absolute output paths; default helper artifacts
77
+ are temporary and may disappear on helper cleanup.
78
+
79
+ Commands serialize per Page. Different Pages progress independently. An active
80
+ human Control lease rejects Agent writes until released. An outcome_unknown
81
+ error means a write may already have happened: inspect, never blindly replay.
82
+ A complete upstream command error is returned without destroying the helper.
83
+
84
+ Do not request raw CDP, change the engine, start/replace a Browser outside Rynx,
85
+ or close a Browser generation the user still needs. Resource creation/close,
86
+ request-header policy and the human 9333 inspection gateway stay Rynx-owned.
87
+
88
+ ## Engine upgrades (operators only)
89
+
90
+ The default engine is bundled and pinned. An operator may set the absolute
91
+ native executable path in the Runtime's config.json using
92
+ RYNX_AGENT_BROWSER_EXECUTABLE. This is a daemon-owner setting, not an Agent
93
+ argument and not a PATH fallback. Select a versioned agent-browser native
94
+ binary for the Runtime OS/architecture, then restart the Runtime after changing
95
+ the setting. Upgrading compatible engine versions requires no Rynx CLI build
96
+ or new page-command mappings. Re-run real backend conformance before promoting
97
+ an engine; an upstream CDP/lifecycle/transport breaking change can still require
98
+ an adapter update. Ref names and command-result fields need no Rynx mapping.
99
+ Never upgrade silently in the middle of an Agent action.
100
+
101
+ ## Session-wide request headers
102
+
103
+ Inspect the current policy when needed. Header values are redacted in the
104
+ managed Session CLI so secrets do not enter the Agent transcript:
43
105
 
44
106
  ```sh
45
- rynx browser click --ref <ref> --json
46
- rynx browser type --ref <ref> --text "hello" --json
107
+ rynx browser headers get --json
47
108
  ```
48
109
 
49
- Take a fresh snapshot after navigation or substantial DOM replacement because
50
- old refs become stale. Use `--selector` only when no useful accessibility ref
51
- exists. Use coordinate clicks only as a final fallback after a screenshot.
52
-
53
- Inspect pages and save visual evidence with:
110
+ Set headers for every current and future Browser page in this Rynx Session.
111
+ The policy covers document and subresource requests to every origin:
54
112
 
55
113
  ```sh
56
- rynx browser status --json
57
- rynx browser pages --json
58
- rynx browser screenshot --output /absolute/path/page.png --json
114
+ rynx browser headers set \
115
+ --enable \
116
+ --header 'X-Environment: staging' \
117
+ --header 'X-Request-Source: rynx' \
118
+ --json
59
119
  ```
60
120
 
61
- Do not request or connect to the raw CDP endpoint unless diagnosing Rynx itself.
62
- Do not close a Browser generation the user still needs.
121
+ Changes take effect immediately. Existing pages use the new values on their
122
+ next request or refresh; requests already in flight are unchanged. Closing and
123
+ reopening the Session Browser keeps the policy. Deleting the Session or
124
+ restarting the resident daemon removes it, and a forked Session starts with no
125
+ header policy.
126
+
127
+ `set` reads the current policy internally, so `--disable` without `--header`
128
+ stops sending headers while retaining configured rows without exposing their
129
+ values. Use `--clear` to remove all rows. When an earlier `get` is the basis for
130
+ an edited update, pass its opaque revision with
131
+ `--expected-revision <revision>`; a conflict means another actor changed the
132
+ policy, so fetch it again instead of retrying stale values.
133
+
134
+ Header names are case-insensitively unique. Browser-controlled or unsafe names
135
+ such as `Authorization`, `Cookie`, `Host`, `Origin`, `Referer`, `User-Agent`,
136
+ `Content-Length`, `Proxy-*`, and `Sec-*` are rejected. Do not put header values
137
+ in logs, chat messages, or error reports. Both text and JSON CLI output use
138
+ `[redacted]`; use the Session settings UI when a human must inspect or edit a
139
+ sensitive value. Do not attempt to bypass this boundary from an active Session.
63
140
 
64
141
  ## Failure handling
65
142
 
66
143
  - On endpoint access failure, follow **Sandbox boundary** and make no fallback
67
144
  attempt.
68
- - On `stale reference`, take a new snapshot and retry once.
145
+ - On an upstream ref error or `driver_restarted`, take a new snapshot on the same
146
+ --page and re-evaluate the intended action. Do not replay an action whose
147
+ outcome was reported as unknown.
69
148
  - On `busy`, preserve the current Turn or Terminal for the user to resolve.
70
149
  - On an unavailable capability, report the missing App integration or macOS
71
150
  permission; do not install an unpinned replacement.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: rynx-cli
3
- description: Use the bundled `rynx` CLI when a task needs to inspect or automate the Browser or Emulator owned by the active Rynx Session. Load the version-matched Browser or Emulator guide from the CLI before operating it. Prefer this over direct CDP, browser drivers, `serve-sim`, `simctl`, adb, guessed ports, or guessed App installations.
3
+ description: Use the bundled `rynx` CLI when a task needs to inspect or automate the Browser or Emulator owned by the active Rynx Session, or configure Session-wide Browser request headers. Load the version-matched Browser or Emulator guide from the CLI before operating it. Prefer this over direct CDP, browser drivers, Header-modifying extensions, `serve-sim`, `simctl`, adb, guessed ports, or guessed App installations.
4
4
  ---
5
5
 
6
6
  # Rynx CLI
@@ -21,9 +21,14 @@ rynx skills get browser
21
21
  rynx skills get emulator
22
22
  ```
23
23
 
24
- Use `browser` for Browser inspection/automation and `emulator` for mobile device
25
- inspection/control. Do not load an unrelated guide. These commands read guides
26
- shipped in the exact CLI npm package and do not contact the daemon or network.
24
+ Use `browser` for Browser inspection/automation and Session-wide Browser request
25
+ headers, and `emulator` for mobile device inspection/control. Do not load an
26
+ unrelated guide. These commands read guides shipped in the exact CLI npm
27
+ package and do not contact the daemon or network.
28
+
29
+ The managed Session CLI redacts configured Browser Header values. Do not try to
30
+ recover them through alternate endpoints or tools; a human can inspect or edit
31
+ sensitive values in Session settings.
27
32
 
28
33
  If `rynx skills get <topic>` itself cannot execute, report its exact error and
29
34
  stop. Do not scan `/Applications`, use `find` or `mdfind`, run `open`, `open -a`,