pi-agent-rb 1.0.0 → 1.2.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +93 -0
- data/README.md +4 -2
- data/lib/pi_agent/event.rb +6 -0
- data/lib/pi_agent/version.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 15a2c10917105c868be22e6fd6a58a25004ba410e884aa8e8a5c88d809cc5d5c
|
|
4
|
+
data.tar.gz: 8e7307ce37246f30549f6dbc9f2dcdf4f5b58ea586b958a17646767df5e36b34
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '0129e65e14b5b8579a3a7179b00c8180d48b59ff993af99b4948bbc31470633a31d9cbb84a6a9ac2006eea0192b5abb2253e571dc54100edcc6fc7c22cb6950f'
|
|
7
|
+
data.tar.gz: 5fa478564b8345ba6e3bbf0976d7f68badce5a3e54f23803413facf4628c0dc7e874626afd1182daf87f12e25f1aac5c31618221b32b08773b95a687e299a60b
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,99 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.2.0] - 2026-10-10
|
|
11
|
+
|
|
12
|
+
Tracks pi 1.1.0 (rolls up `1.0.1`, `1.0.2`, `1.0.3`, `1.0.4`, and `1.1.0`).
|
|
13
|
+
Verified against a real `pi --mode rpc` 1.1.0 (live specs green).
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
- `Event#aborted?` — true for an `agent_settled` event whose run was aborted
|
|
17
|
+
(pi >= 1.1.0), so callers can tell a cancelled run from a finished one.
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
- Bumped pinned upstream `pi-coding-agent` version to `1.1.0` (from `1.0.0`).
|
|
21
|
+
None of the intermediate releases alter the JSONL RPC command/response
|
|
22
|
+
shapes this gem drives, so no gem API change is required.
|
|
23
|
+
- `1.0.1` — CLI/TUI/MCP/provider/packaging batch: Nix flake install path;
|
|
24
|
+
project-level overrides for user MCP servers; MCP Client ID Metadata
|
|
25
|
+
Documents (`oauth.clientRegistration: "cimd"`); `pi.registerToolRenderer()`;
|
|
26
|
+
Cloudflare Clef classifier models. Packaging: `brace-expansion` pinned to
|
|
27
|
+
5.0.12 (security advisory) and `npm-shrinkwrap.json` removed from the
|
|
28
|
+
published package. All CLI/TUI, MCP, codemode, or provider concerns.
|
|
29
|
+
- `1.0.2` — adds `samplingParamsByThinkingLevel` to `models.json` for
|
|
30
|
+
per-thinking-level sampling overrides on OpenAI-compatible APIs.
|
|
31
|
+
Provider/config concern only.
|
|
32
|
+
- `1.0.3` — renames the Azure provider `azure-openai-responses` → `azure`
|
|
33
|
+
(breaking for `auth.json`/`models.json`/`settings.json` provider keys) and
|
|
34
|
+
adds Azure Foundry Chat Completions deployments; codemode `image()`
|
|
35
|
+
temp-file behavior; editor `Home`/`End` key changes. Provider/config,
|
|
36
|
+
CLI/TUI, and codemode-local concerns, outside the RPC surface.
|
|
37
|
+
- `1.0.4` — `--tools`/`--exclude-tools` accept `*` patterns and keep MCP
|
|
38
|
+
tools unless an entry starts with `mcp__`; `--no-mcp` flag; codemode
|
|
39
|
+
`tools.read()` returns an image block for image files. All CLI/TUI,
|
|
40
|
+
codemode, MCP, or provider concerns.
|
|
41
|
+
- `1.1.0` — adds program status reporting over OSC 7501, Claude Haiku 5.5
|
|
42
|
+
(`anthropic/claude-haiku-5-5`), `+name`/`-name` entries for `--tools`,
|
|
43
|
+
GPT-6 Luna image classification, and native llama.cpp decision models.
|
|
44
|
+
The one RPC-adjacent change is additive: `aborted` is added to
|
|
45
|
+
`agent_settled` session, extension, and JSON events so integrations can
|
|
46
|
+
tell a cancelled run from a finished one; surfaced as `Event#aborted?`.
|
|
47
|
+
`tool_execution_end` also gains `durationMs` (reachable via
|
|
48
|
+
`event[:durationMs]`). All other changes are CLI/TUI, codemode, or
|
|
49
|
+
provider concerns.
|
|
50
|
+
|
|
51
|
+
## [1.1.0] - 2026-10-01
|
|
52
|
+
|
|
53
|
+
Tracks pi 1.0.0. No gem API change; verified against a real `pi --mode rpc`
|
|
54
|
+
1.0.0 (live specs).
|
|
55
|
+
|
|
56
|
+
### Changed
|
|
57
|
+
- Bumped pinned upstream `pi-coding-agent` version to `1.0.0` (from
|
|
58
|
+
`0.87.1`). Upstream jumped its numbering from the `0.87.x` line straight
|
|
59
|
+
to the `0.99.x` line and then to the `1.0.0` milestone; there are no
|
|
60
|
+
intermediate `0.88`–`0.98` releases.
|
|
61
|
+
None of the changes alter the JSONL RPC command/response shapes this gem
|
|
62
|
+
drives, so no gem API change is required.
|
|
63
|
+
- `0.99.0` is a large feature batch centered on the CLI/TUI and the
|
|
64
|
+
TypeScript SDK/extension layer: built-in codemode, tool-search, and MCP
|
|
65
|
+
extensions (QuickJS sandbox, `mcp.json`, `/mcp`, `pi mcp ...`); a new
|
|
66
|
+
`system` theme that derives colors from the terminal palette (now the
|
|
67
|
+
default); Sign in with ChatGPT for the OpenAI provider; experimental
|
|
68
|
+
virtual models and llama.cpp/Jev classifier models; and image
|
|
69
|
+
generation on `ModelRuntime`. These are CLI/TUI or TypeScript
|
|
70
|
+
SDK/provider concerns, outside the JSONL RPC surface this gem speaks.
|
|
71
|
+
- The one RPC-adjacent change is additive: successful `prompt`, `steer`,
|
|
72
|
+
and `follow_up` responses now carry a per-input disposition, and
|
|
73
|
+
`RpcClient.prompt()` also accepts `streamingBehavior`. This gem treats
|
|
74
|
+
those responses as acks and does not read the new fields, and it does
|
|
75
|
+
not send `streamingBehavior`, so the existing behavior is unchanged.
|
|
76
|
+
- Built-in extensions/tools are now named `builtin:<name>` in RPC source
|
|
77
|
+
info, diagnostics, and bug reports (was `<inline:name>`/`<builtin:name>`).
|
|
78
|
+
This gem does not parse those identifier strings, so it is unaffected.
|
|
79
|
+
- `0.99.1` is a provider maintenance patch: adds GPT-6.1 Sol
|
|
80
|
+
(`gpt-6.1-sol`) to the OpenAI, Azure OpenAI, and OpenAI Codex providers
|
|
81
|
+
(now the default OpenAI Codex model) and fixes `/login` with OpenAI in
|
|
82
|
+
the bundled release. No RPC surface change.
|
|
83
|
+
- `0.99.2` is an MCP/codemode and provider batch: MCP servers with the
|
|
84
|
+
default codemode exposure stay out of the codemode description and no
|
|
85
|
+
longer block the first prompt; adds `oauth.clientName` and an
|
|
86
|
+
`auth: { provider }` option for HTTP MCP servers, a `describeNamespace()`
|
|
87
|
+
codemode helper, Anthropic workload identity federation, and `/reload`
|
|
88
|
+
enabling newly added `defaultTools`. All changes are CLI/TUI, codemode,
|
|
89
|
+
or TypeScript SDK/provider concerns, outside the JSONL RPC surface this
|
|
90
|
+
gem speaks, so no gem API change is required.
|
|
91
|
+
- `1.0.0` is the stable milestone release and, despite the major version
|
|
92
|
+
bump, carries no breaking change to the JSONL RPC command/response
|
|
93
|
+
shapes this gem drives. It makes the TUI fullscreen by default
|
|
94
|
+
(`tuiMode: "regular"` restores scrollback), shrinks codemode prompt
|
|
95
|
+
tokens (~40%) with recovery-oriented errors, adds image generation in
|
|
96
|
+
codemode (`models.generateImages()`), Radius `/login` + MCP setup,
|
|
97
|
+
Anthropic copy-code login for headless setups, MCP OAuth hardening
|
|
98
|
+
(`oauth.authServerMetadataUrl`, RFC 9207 `iss` checks, per-server
|
|
99
|
+
credentials, scope-preserving step-up), and `quietStartup: "header"`.
|
|
100
|
+
All are CLI/TUI, codemode, MCP, or provider concerns outside the RPC
|
|
101
|
+
surface this gem speaks.
|
|
102
|
+
|
|
10
103
|
## [1.0.0] - 2026-09-23
|
|
11
104
|
|
|
12
105
|
First stable release. The public API (`PiAgent.session` / `PiAgent.open`,
|
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` 0.80.4+ on `PATH` (install via `npm i -g @earendil-works/pi-coding-agent`)
|
|
17
|
-
- This gem is pinned against pi `
|
|
17
|
+
- This gem is pinned against pi `1.1.0`; other versions may work but are not verified.
|
|
18
18
|
|
|
19
19
|
## Installation
|
|
20
20
|
|
|
@@ -105,7 +105,7 @@ Pi emits `agent_end` after each low-level agent run, but may then retry,
|
|
|
105
105
|
compact and retry, or process queued continuations. It emits
|
|
106
106
|
`agent_settled` only when no automatic work remains, so high-level streams
|
|
107
107
|
use that as their completion boundary. Upstream added the RPC event in pi
|
|
108
|
-
0.80.4; it is available in this gem's pinned pi
|
|
108
|
+
0.80.4; it is available in this gem's pinned pi 1.1.0.
|
|
109
109
|
|
|
110
110
|
`events` is a lower-level, prompt-less drain of the same stream. Because it
|
|
111
111
|
subscribes lazily when iteration begins, it only works when you subscribe
|
|
@@ -279,6 +279,8 @@ timeouts then remain the only backstop when pi dies.
|
|
|
279
279
|
(`"aborted"` vs `"error"`). This covers `extension_error` events and
|
|
280
280
|
errored assistant turns. The gem does not abort your iteration on
|
|
281
281
|
agent errors; you decide how to react.
|
|
282
|
+
- To tell a cancelled run from a finished one, check `Event#aborted?` on
|
|
283
|
+
the terminal `agent_settled` event (pi >= 1.1.0).
|
|
282
284
|
|
|
283
285
|
## Protocol reference
|
|
284
286
|
|
data/lib/pi_agent/event.rb
CHANGED
|
@@ -57,6 +57,12 @@ module PiAgent
|
|
|
57
57
|
assistant_event["reason"]
|
|
58
58
|
end
|
|
59
59
|
|
|
60
|
+
# True for an `agent_settled` event whose run ended because it was
|
|
61
|
+
# aborted (pi >= 1.1.0). Distinguishes a cancelled run from a finished one.
|
|
62
|
+
def aborted?
|
|
63
|
+
@type == :agent_settled && @raw["aborted"] == true
|
|
64
|
+
end
|
|
65
|
+
|
|
60
66
|
def to_h
|
|
61
67
|
@raw
|
|
62
68
|
end
|
data/lib/pi_agent/version.rb
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
module PiAgent
|
|
4
|
-
VERSION = "1.
|
|
4
|
+
VERSION = "1.2.0"
|
|
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 = "
|
|
8
|
+
SUPPORTED_PI_VERSION = "1.1.0"
|
|
9
9
|
end
|