pi-agent-rb 0.1.3 → 0.1.5

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: abfc75fe529cc2c11a5d43ec6175f8cba76fb4ecbe78102ae8d46b2b47f53614
4
- data.tar.gz: 30be51d153fb6eff05d6a02870d6bb57b50c2be844df92eaa7941029a6ce0d80
3
+ metadata.gz: 770001d67bb88e7dd06c7a39fef8e45941d1ebf22c6b3e5d81b0244c2e074940
4
+ data.tar.gz: 228fb48b0685a8d18fb240a10646c19c71595e3d873aa48a91fb7243824e607d
5
5
  SHA512:
6
- metadata.gz: 49e4b69ea520dd6c15287f13a48146f23e5b539ca0eb9fe4d845916985f484ab22ee14995d2fd8495cf85c63837163a09d857a80acd3e2c4276f0e56a30bf767
7
- data.tar.gz: 2d5301302865ba492a62ac85da8b63b12b5ba68a3c9afe32f7705f81bc7d12f4c0114c4e82c197afa4ce831b30d9d632efde933fedf1a714ca3e5a9ea9f0e24a
6
+ metadata.gz: 40f2df16097904797bfb3720d0664dfd86cf13a3b9f80655920f97a1a280124e3349c6e957cc02259a5fdc4973c5a25991d52c370ba5a434317ff3aca5f93e06
7
+ data.tar.gz: b806c204a0a32c0634677f79a95358b03d1faff8efde6eca7bf3a88eeabcdbaa3c036ccf2e85fc8dd50989483794b7aecfb08bd601d7fd81d3538248e8038b90
data/CHANGELOG.md CHANGED
@@ -7,6 +7,32 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.1.5] - 2026-06-09
11
+
12
+ ### Changed
13
+ - Bumped pinned upstream `pi-coding-agent` version to `0.79.1` (adds Claude
14
+ Fable 5 model support, a global `defaultProjectTrust` setting to configure
15
+ unresolved-trust behavior, prompt template argument defaults, extension
16
+ autocomplete trigger characters, and assorted fixes; no changes to the RPC
17
+ protocol surface or the `--approve`/`--no-approve` flags this gem drives).
18
+
19
+ ## [0.1.4] - 2026-06-09
20
+
21
+ ### Changed
22
+ - Bumped pinned upstream `pi-coding-agent` version to `0.79.0` (cache-hit
23
+ visibility in footer, richer SDK exports, and assorted fixes; the RPC wire
24
+ protocol this gem drives is unchanged).
25
+ - **Behavior change in pi 0.79.0:** project-local inputs (`.pi/settings.json`,
26
+ project extensions, resources, packages) are now trust-gated. In RPC mode pi
27
+ does not prompt — without a saved trust decision it silently ignores them.
28
+ Pass the new `approve: true` option to keep loading them (see Added).
29
+
30
+ ### Added
31
+ - `approve:` option on `Client.new` / `PiAgent.session` / `PiAgent.open`:
32
+ `true` appends `--approve` to the pi spawn args (trust the project),
33
+ `false` appends `--no-approve` (explicitly ignore project inputs); the
34
+ default `nil` leaves pi's own behavior untouched.
35
+
10
36
  ## [0.1.3] - 2026-05-29
11
37
 
12
38
  ### Changed
data/README.md CHANGED
@@ -14,7 +14,7 @@ building interactive agent UIs (web, TUI) on top of pi.
14
14
 
15
15
  - Ruby 3.3+
16
16
  - `pi` on `PATH` (install via `npm i -g @earendil-works/pi-coding-agent`)
17
- - This gem is pinned against pi `0.77.0`; other versions may work but are not verified.
17
+ - This gem is pinned against pi `0.79.1`; other versions may work but are not verified.
18
18
 
19
19
  ## Installation
20
20
 
@@ -100,6 +100,20 @@ Supported formats: png, jpeg, gif, webp.
100
100
  For low-level RPC access (raw `request`/`notify`/`subscribe`), use
101
101
  `PiAgent.open`, which yields a `PiAgent::Client`.
102
102
 
103
+ ## Project trust
104
+
105
+ Since pi `0.79.0`, project-local inputs (`.pi/settings.json`, project
106
+ extensions, resources, and packages) are trust-gated. In RPC mode pi never
107
+ prompts: unless the project was already trusted (e.g. interactively on the
108
+ same machine), it **silently ignores them**. Pass `approve: true` to trust
109
+ the project, or `approve: false` to explicitly ignore project inputs:
110
+
111
+ ```ruby
112
+ PiAgent.session(cwd: "/path/to/project", approve: true) do |session|
113
+ # project .pi extensions and settings are loaded
114
+ end
115
+ ```
116
+
103
117
  ## Extension UI
104
118
 
105
119
  pi extensions can request user interaction (confirm, select, input,
@@ -15,6 +15,12 @@ module PiAgent
15
15
  # Pass `transport_factory:` — a callable `(on_message:, on_stderr:) ->
16
16
  # transport` — to run pi somewhere else (e.g. inside a remote sandbox).
17
17
  # See Transport for the transport contract.
18
+ #
19
+ # Since pi 0.79.0 project-local inputs (.pi/settings.json, project
20
+ # extensions, resources, packages) are trust-gated, and in RPC mode pi
21
+ # silently ignores them unless the project was already trusted. Pass
22
+ # `approve: true` to trust the project (`--approve`), or `approve: false`
23
+ # to explicitly ignore project inputs (`--no-approve`).
18
24
  class Client
19
25
  DEFAULT_BIN = "pi"
20
26
  DEFAULT_ARGS = ["--mode", "rpc"].freeze
@@ -45,8 +51,10 @@ module PiAgent
45
51
  nil
46
52
  end
47
53
 
48
- def initialize(bin: nil, args: DEFAULT_ARGS, env: {}, cwd: nil, extension_ui: nil, transport_factory: nil)
54
+ def initialize(bin: nil, args: DEFAULT_ARGS, env: {}, cwd: nil, approve: nil,
55
+ extension_ui: nil, transport_factory: nil)
49
56
  @extension_ui_handler = extension_ui
57
+ args = [*args, approve ? "--approve" : "--no-approve"] unless approve.nil?
50
58
  @transport_factory = transport_factory || build_subprocess_factory(bin, args, env, cwd)
51
59
  @pending = {}
52
60
  @pending_mutex = Mutex.new
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PiAgent
4
- VERSION = "0.1.3"
4
+ VERSION = "0.1.5"
5
5
 
6
6
  # Pinned upstream pi-coding-agent version this gem is verified against.
7
7
  # See: https://www.npmjs.com/package/@earendil-works/pi-coding-agent
8
- SUPPORTED_PI_VERSION = "0.77.0"
8
+ SUPPORTED_PI_VERSION = "0.79.1"
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pi-agent-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - chagel