@jslee124/forge 0.3.1 → 0.3.3

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jslee124/forge",
3
- "version": "0.3.1",
3
+ "version": "0.3.3",
4
4
  "description": "A safe, observable, and evaluable coding agent",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -35,9 +35,9 @@
35
35
  "access": "public"
36
36
  },
37
37
  "dependencies": {
38
- "@ai-sdk/deepseek": "^3.0.28",
39
- "@ai-sdk/openai": "^4.0.43",
40
- "ai": "^7.0.66",
38
+ "@ai-sdk/deepseek": "3.0.28",
39
+ "@ai-sdk/openai": "4.0.43",
40
+ "ai": "7.0.66",
41
41
  "commander": "^15.0.0",
42
42
  "ink": "^7.1.1",
43
43
  "react": "^19.2.8",
@@ -129,10 +129,11 @@ the model; they do not bypass `read_file`, workspace validation, policy, or
129
129
  trace events by injecting file contents automatically.
130
130
 
131
131
  Each interactive prompt starts a fresh bounded run and approval-policy instance.
132
- Only completed user and assistant text is carried into the next prompt. That
133
- conversation is persisted as a session and can be restored after restart, while
134
- tool continuation metadata and approvals remain scoped to the run that produced
135
- them. See Persistent Sessions and Run Traces.
132
+ Only completed canonical user, assistant, tool-call, and paired tool-result
133
+ blocks are carried into the next prompt. That provider-neutral conversation is
134
+ persisted as session schema v3 and can be restored after restart. Unfinished
135
+ calls, provider continuation metadata, and approvals remain run-scoped. See
136
+ Persistent Sessions and Run Traces.
136
137
 
137
138
  ### Agent runtime
138
139
 
@@ -88,6 +88,26 @@ session-exit behavior when Forge is otherwise idle.
88
88
  later be used for prompt history; history is not required for Milestone 4.6.
89
89
  - Shift+Tab cycles through the active model's supported thinking-effort levels.
90
90
 
91
+ ## Context pressure and controls
92
+
93
+ The editor footer uses two rows. The first keeps model/effort and a projected
94
+ context indicator visible; the second preserves the existing keyboard
95
+ shortcuts. The indicator uses `○`, `◔`, `◑`, `◕`, or `●` plus a percentage and
96
+ semantic text. Estimated values carry `~`; responsive rendering drops labels
97
+ before it drops the number or ring.
98
+
99
+ `/context` opens a keyboard-owned panel backed by the same pressure snapshot.
100
+ It shows instructions, tool schemas, active history, draft/image estimates,
101
+ the effective reserve, checkpoint provenance, threshold, strategy, and last
102
+ compaction. Press `p` to preview, `c` to compact once, `a` to enable automatic
103
+ compaction for this process, `s` to explicitly save it as the user default, or
104
+ Escape to close. A first `warn`-mode threshold crossing offers compact once,
105
+ session auto, or dismiss without stealing an active run or approval prompt.
106
+
107
+ The default remains `warn`. Automatic compaction uses projected pressure, not
108
+ message count, and pauses after cancellation, invalid projection, or low
109
+ reclamation. The canonical transcript remains lossless.
110
+
91
111
  ## Slash-command completion
92
112
 
93
113
  Typing `/` as the first non-whitespace character opens a list of available
@@ -203,9 +223,11 @@ visual truncation must not silently turn partial content into approval for an
203
223
  unseen patch.
204
224
 
205
225
  The approval controls are visible next to the diff and describe their scope.
206
- For example, approving the first workspace write covers later workspace writes
207
- only in the current run, while process commands continue to require separate
208
- approval.
226
+ `1` allows the displayed action once, `2` allows exactly the displayed scope
227
+ for the current in-memory session, and `3` opens an optional denial-feedback
228
+ field. High-risk actions omit the session option. `/permissions` shows the
229
+ effective profile, active scope identifiers, use counts, and revoke controls;
230
+ grants disappear on `/new`, `/resume`, and process exit.
209
231
 
210
232
  Process-command approval uses the same dedicated panel. It renders a
211
233
  shell-readable `$ command` line followed by clearly labelled working-directory
@@ -218,6 +240,12 @@ approval preview.
218
240
 
219
241
  ## Sign-in panel
220
242
 
243
+ The update checker also renders inside the Ink tree. A late result can add a
244
+ compact current/latest banner without creating transcript text or taking input
245
+ ownership from the editor, stream, or approval panel. Wide terminals include
246
+ the release-notes destination and restart wording; narrow terminals retain the
247
+ versions, `forge update`, restart, and `/update-dismiss` controls.
248
+
221
249
  A pending browser sign-in is a dedicated panel, not transcript text. The Codex
222
250
  auth surface reports the URL as a structured `login` output event carrying the
223
251
  address as its own field, so the UI never re-parses it out of a text chunk.
@@ -118,6 +118,11 @@ effort.
118
118
  Forge does not implement a `full-access` profile. An approved child process is
119
119
  still not OS-sandboxed; see Security.
120
120
 
121
+ Permission grants are not configuration. Choosing the numbered session option
122
+ stores a normalized scope only in the active process. Project configuration,
123
+ instructions, Skills, checkpoints, tool results, and plugin hooks cannot persist
124
+ or widen it. `/permissions` shows and revokes the current in-memory grants.
125
+
121
126
  ### Traces and plugins
122
127
 
123
128
  | Field | Default | Notes |
@@ -138,12 +143,17 @@ toggle. See Plugin authoring and trust.
138
143
  | `context.bufferTokens` | `8192` | 1–2,000,000 | A project may increase the safety buffer. |
139
144
  | `context.recentTailTokens` | `12000` | 0–2,000,000 | A project may reduce the verbatim recent-history budget. |
140
145
  | `context.summaryTargetTokens` | `1200` | 64–2,000,000 | A project may reduce the checkpoint target. |
141
-
142
- `warn` measures pressure and reports it without automatically generating a
143
- checkpoint. `compact` enables automatic checkpoint behavior when required by
144
- the implemented budget rules. `/compact` remains available as an explicit
145
- interactive action. The canonical session transcript is retained separately in
146
- all modes. See Context management.
146
+ | `context.activationThreshold` | `0.78` | 0.5–0.95 | A project may lower the pressure threshold, never raise it. |
147
+ | `context.minimumReclaimTokens` | `8000` | 0–2,000,000 | A project may lower the no-progress floor, never raise it. |
148
+ | `context.minimumReclaimRatio` | `0.2` | 0–0.9 | A project may lower the no-progress ratio, never raise it. |
149
+
150
+ `warn` measures projected next-request pressure and offers non-blocking TUI
151
+ controls at the activation threshold. `compact` permits pressure-driven
152
+ checkpoint generation. `/context` can enable automatic compaction for only the
153
+ current process, or explicitly save `compact` to user configuration;
154
+ session-only state is never restored. `/compact` remains available in every
155
+ mode. The canonical session transcript is retained separately. See
156
+ Context management.
147
157
 
148
158
  ## Safe project configuration
149
159
 
@@ -4,10 +4,11 @@
4
4
 
5
5
  ## Status
6
6
 
7
- Roadmap Milestone 10 is implemented. This document records the design,
8
- invariants, rollout decision, and follow-up live-evaluation gates. The default
9
- remains `warn`; automatic checkpoint generation is opt-in until the published
10
- provider-quality gates pass.
7
+ Roadmap Milestone 10 and Milestone 13.0-13.5 are implemented. The default
8
+ remains `warn`; automatic checkpoint generation is opt-in until published
9
+ provider-quality gates pass. The TUI now projects the complete next-request
10
+ input, keeps a segmented pressure indicator visible, and exposes session-only
11
+ or explicitly persisted automatic mode through `/context`.
11
12
 
12
13
  The first shipped Forge checkpoint uses a deterministic, redacted extractive
13
14
  summarizer so default tests and manual `/compact` make no paid model call. It
@@ -18,15 +19,21 @@ provider-native state, but the current OpenAI AI SDK and DeepSeek adapters
18
19
  advertise native compaction as unsupported because their active transports do
19
20
  not yet expose a safe compact-item round trip.
20
21
 
22
+ The initial activation threshold is `0.78`. Input capacity subtracts
23
+ `max(output reserve, safety buffer)` exactly once. Auto mode pauses when a
24
+ compaction is cancelled, invalid, or reclaims less than the larger of 8,000
25
+ tokens or 20% of projected input. Stable-prefix and cache observations are
26
+ hash-only trace metadata; missing provider cache usage remains unavailable.
27
+
21
28
  ## Why this work is next
22
29
 
23
- Forge already separates project instructions, completed conversation turns,
30
+ Forge already separates project instructions, canonical conversation turns,
24
31
  the current user request, and provider continuation data. It also bounds
25
32
  instruction files, tool output, model steps, tool calls, and persisted session
26
33
  size. These controls make execution inspectable, but they do not manage a
27
34
  model's token window.
28
35
 
29
- Today, every completed user/assistant turn is sent again on the next native
36
+ Today, every canonical user/assistant turn is sent again on the next native
30
37
  Forge request. A long session can therefore fail at the provider boundary even
31
38
  when its persisted JSON remains within the session size limit. During a run,
32
39
  assistant tool calls and tool results also accumulate through provider
@@ -111,7 +118,7 @@ Milestone 10 should:
111
118
  2. Make every context-selection decision visible in structured events and
112
119
  `forge inspect`.
113
120
  3. Preserve recent conversational continuity while compacting only older,
114
- completed turns.
121
+ canonical historical turns.
115
122
  4. Keep the canonical transcript lossless and separate from the smaller active
116
123
  model context.
117
124
  5. Preserve Forge's security boundary: old text and summaries cannot restore
@@ -321,12 +328,13 @@ from unexplained holes in the conversation.
321
328
 
322
329
  ### Checkpoint schema
323
330
 
324
- Session schema version 2 should retain `messages` as the canonical transcript
325
- and add an optional derived checkpoint:
331
+ Session schema version 3 retains structured `history` as the canonical
332
+ transcript and uses an optional checkpoint v2. Selection and hashing operate on
333
+ complete user/assistant/tool exchanges and never split a call from its result:
326
334
 
327
335
  ```ts
328
336
  interface ContextCheckpoint {
329
- schemaVersion: 1;
337
+ schemaVersion: 2;
330
338
  strategy: "forge-summary" | "provider-native";
331
339
  summarizedThroughMessageIndex: number;
332
340
  sourceHash: string;
@@ -491,7 +499,8 @@ The implementation must preserve these invariants:
491
499
  permission profiles.
492
500
  3. A summary cannot mark a previously failing verification as currently
493
501
  passing.
494
- 4. Only completed conversation turns are eligible for cross-run compaction.
502
+ 4. Only canonical historical conversation messages are eligible for cross-run
503
+ compaction; pending executable state is never included.
495
504
  5. Pending tool calls and results remain paired according to adapter rules.
496
505
  6. The canonical transcript is not mutated or deleted by compaction.
497
506
  7. Configured secrets are redacted before checkpoint generation and persistence.
@@ -27,10 +27,10 @@ a provider.
27
27
 
28
28
  Forge's development workspace remains private. Release automation produces one
29
29
  public CLI package, `@jslee124/forge`, while internal packages and the plugin
30
- SDK remain private. Until the first npm release is visible, run from source or
31
- link the current checkout globally.
30
+ SDK remain private. Install the published CLI for normal use; run from source
31
+ or link the current checkout globally when contributing to Forge.
32
32
 
33
- For a published build:
33
+ For the current stable build:
34
34
 
35
35
  ```bash
36
36
  npm install --global @jslee124/forge
@@ -47,7 +47,7 @@ pnpm build
47
47
  pnpm forge --version
48
48
  ```
49
49
 
50
- The final command builds the workspace and should print `0.3.1` for the current
50
+ The final command builds the workspace and should print `0.3.3` for the current
51
51
  source release. It does not contact a model provider.
52
52
 
53
53
  During development you can keep using `pnpm forge`. To expose the same checkout
@@ -223,10 +223,11 @@ pnpm forge resume --last
223
223
  pnpm forge inspect <run-id>
224
224
  ```
225
225
 
226
- A session stores completed user/assistant turns. A run is one bounded agent-loop
227
- execution with its own ID and JSONL event trace. Resume restores completed
228
- conversation text, not old approvals, pending tool calls, child processes, or
229
- provider continuation state. See Sessions and traces.
226
+ A session stores canonical conversation context. A run is one bounded
227
+ agent-loop execution with its own ID and JSONL event trace. Interactive resume
228
+ replays available historical model and tool events, but it does not reactivate
229
+ old approvals, pending tool calls, child processes, or provider continuation
230
+ state. See Sessions and traces.
230
231
 
231
232
  ## Next steps
232
233
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  简体中文 · Documentation index
7
7
 
8
- Forge 0.3.1 works without plugins. A plugin is an optional in-process JavaScript
8
+ Forge 0.3.3 works without plugins. A plugin is an optional in-process JavaScript
9
9
  module that can register model-callable tools and explicit local commands,
10
10
  contribute instructions, observe immutable run events, or make policy stricter.
11
11
 
@@ -608,7 +608,7 @@ would require a restricted process or OS sandbox.
608
608
 
609
609
  ## Deliberate limitations
610
610
 
611
- Forge 0.3.1 has no plugin installer, dependency resolver, package registry, hot
611
+ Forge 0.3.3 has no plugin installer, dependency resolver, package registry, hot
612
612
  reload, TypeScript entry compilation, custom interactive UI, provider
613
613
  registration, isolated plugin process, or enforceable filesystem/network
614
614
  capabilities. Plugin commands run only through `forge plugins run`; they do not
@@ -143,7 +143,7 @@ starting an Agent run.
143
143
  ## Project-level `.forge/`
144
144
 
145
145
  The selected workspace root's `.forge/` is reserved for Forge-specific project
146
- customization. The current 0.3.1 layout is:
146
+ customization. The current 0.3.3 layout is:
147
147
 
148
148
  ```text
149
149
  .forge/
@@ -23,17 +23,18 @@ development-only files cannot enter the registry by accident.
23
23
 
24
24
  ## Prepare a release
25
25
 
26
- Start from a clean checkout and choose a semantic version:
26
+ Start from a clean checkout and choose a semantic version. Replace `0.3.1`
27
+ below with the release being prepared:
27
28
 
28
29
  ```bash
29
- pnpm version:set 0.3.0
30
+ pnpm version:set 0.3.1
30
31
  pnpm install --frozen-lockfile
31
32
  pnpm check
32
33
  pnpm check:docs
33
34
  pnpm test
34
35
  pnpm eval:deterministic
35
36
  pnpm package:verify
36
- pnpm release:verify-tag v0.3.0
37
+ pnpm release:verify-tag v0.3.1
37
38
  ```
38
39
 
39
40
  `package:verify` builds the public artifact, inspects the tarball, installs it
@@ -45,18 +46,19 @@ Review `npm pack --dry-run` output and release notes before tagging. Never
45
46
  include API keys, auth files, local traces, `.env` files, or evaluation
46
47
  artifacts that were not explicitly reviewed for publication.
47
48
 
48
- ## First npm publication
49
+ ## One-time npm setup (completed)
49
50
 
50
- The npm account or organization must control the `@jslee124` scope and have 2FA
51
- enabled. npm requires a package to exist before a trusted publisher can be
52
- attached. Bootstrap the package with a reviewed prerelease such as
53
- `0.3.0-bootstrap.0` under a non-stable dist-tag, then configure the repository's
54
- `publish.yml` as the package's GitHub Actions trusted publisher. Do not assign
55
- the bootstrap build to `latest`.
51
+ The first publication was completed for v0.3.0. The `@jslee124` scope is
52
+ controlled by the maintainer, and `.github/workflows/publish.yml` is registered
53
+ as the package's GitHub Actions trusted publisher. The one-time bootstrap used
54
+ `0.3.0-bootstrap.0` under the `bootstrap` dist-tag; `latest` now points to the
55
+ stable `0.3.0` release. Do not repeat the bootstrap procedure for later
56
+ releases.
56
57
 
57
- After trusted publishing is configured, stable releases should come only from
58
- the tag workflow. It uses OIDC instead of a long-lived npm token and publishes
59
- the generated package after all release gates pass.
58
+ Stable releases must come only from the tag workflow. It uses OIDC instead of a
59
+ long-lived npm token and publishes the generated package after all release
60
+ gates pass. If the trusted-publisher configuration is ever replaced, review the
61
+ npm package settings and workflow identity together before creating a tag.
60
62
 
61
63
  ## Publish a stable release
62
64
 
@@ -64,17 +66,17 @@ Commit the version, release notes, and generated-input changes, then create an
64
66
  annotated immutable tag:
65
67
 
66
68
  ```bash
67
- git tag -a v0.3.0 -m "Forge v0.3.0"
68
- git push origin v0.3.0
69
+ git tag -a v0.3.1 -m "Forge v0.3.1"
70
+ git push origin v0.3.1
69
71
  ```
70
72
 
71
73
  The `Publish npm package` workflow verifies that the Git tag, root version,
72
74
  private workspace versions, runtime version, and generated npm package all
73
- match before it runs `npm publish --access public`.
75
+ match before it publishes with an explicit dist-tag. Stable semantic versions
76
+ route to `latest`; versions with a prerelease component route to `next`.
74
77
 
75
- Use `npm publish --tag next` only for deliberate prereleases. Do not move a
76
- published Git tag or reuse an npm version. Fix a bad release with a new patch
77
- version and leave the prior artifact available for rollback.
78
+ Do not move a published Git tag or reuse an npm version. Fix a bad release with
79
+ a new patch version and leave the prior artifact available for rollback.
78
80
 
79
81
  ## User updates
80
82
 
@@ -83,12 +85,15 @@ Installed users can check or update explicitly:
83
85
  ```bash
84
86
  forge update check
85
87
  forge update
86
- forge update 0.3.1
88
+ forge update 0.3.3
87
89
  ```
88
90
 
89
- Interactive startup refreshes an advisory npm check in the background at most
90
- once per 24 hours and displays cached results on a later launch. It never
91
- installs an update automatically. Set
91
+ Interactive startup publishes cached, refreshing, available, current, failed,
92
+ or disabled state inside Ink and refreshes npm metadata at most once per 24
93
+ hours. A late result updates the banner without entering conversation history.
94
+ It never installs automatically; `/update-dismiss` dismisses that version. Set
92
95
  `FORGE_DISABLE_UPDATE_CHECK=1` to disable startup checks. The explicit update
93
- command resolves npm metadata to an exact semantic version before invoking
94
- `npm install --global --ignore-scripts`.
96
+ command remains repeatable and resolves an exact semantic version. It invokes
97
+ npm or pnpm with an argument array and `--ignore-scripts` only when installation
98
+ provenance is recognized; otherwise it reports the version and release notes
99
+ without guessing. A successful install still requires restarting Forge.
@@ -105,6 +105,20 @@ child process that has already been approved.
105
105
 
106
106
  ## Process boundary
107
107
 
108
+ Interactive approval is structured: `1` allows once, `2` creates only the
109
+ displayed in-memory session scope, and `3` denies with optional bounded
110
+ feedback. Command scopes bind the exact program and argument array, canonical
111
+ workspace and cwd, and a timeout ceiling. Workspace-write, network
112
+ tool/destination, and delegated-model scopes use similarly normalized host
113
+ fields rather than model-authored text. `/permissions` lists use counts and can
114
+ revoke one or all grants.
115
+
116
+ Session grants are never serialized or restored. Changed arguments, cwd,
117
+ destination, workspace, or a timeout above the ceiling re-prompts. Destructive,
118
+ credential-sensitive, install, publish, and broad external-effect commands are
119
+ not eligible for reuse. Plugin policy hooks can still change `allow` to
120
+ `confirm`/`deny` or `confirm` to `deny`; they cannot create or widen a grant.
121
+
108
122
  The v0.1 `run_command` tool accepts a program and an argument array and starts it
109
123
  with Node.js `spawn` using `shell: false`. Shell syntax such as pipelines,
110
124
  redirection, command substitution, and compound commands is not accepted.
@@ -212,11 +226,13 @@ tool events.
212
226
 
213
227
  ## Persistent sessions
214
228
 
215
- Resuming a session restores completed conversation messages, not executable
216
- authority. Forge creates a new policy instance for every resumed run and never
217
- restores prior approvals, pending tool calls, child processes, or provider
218
- continuation metadata. Current user configuration and project instructions are
219
- loaded again before the next prompt.
229
+ Resuming a session restores completed canonical conversation blocks, including
230
+ closed tool-call/result pairs, but never executable authority. Historical tool
231
+ output is untrusted context rather than current verification. Forge creates a
232
+ new policy instance for every resumed run and never restores prior approvals,
233
+ pending tool calls, child processes, or provider continuation metadata. Current
234
+ user configuration and project instructions are loaded again before the next
235
+ prompt.
220
236
 
221
237
  Session snapshots and traces are stored outside the repository under
222
238
  `FORGE_HOME`. They may contain repository text, diffs, commands, and model
@@ -4,15 +4,17 @@
4
4
 
5
5
  ## Goal
6
6
 
7
- Forge persists enough trusted metadata and completed conversation history to
8
- continue an interactive chat after the process exits. This is deliberately
9
- separate from replaying an in-progress tool call.
7
+ Forge persists enough trusted metadata, completed conversation history, and
8
+ bounded outcomes from incomplete runs to continue an interactive chat after
9
+ the process exits. This is deliberately separate from replaying an in-progress
10
+ tool call.
10
11
 
11
12
  The core relationship is:
12
13
 
13
14
  ```text
14
15
  Session
15
- |-- completed user/assistant turns
16
+ |-- canonical user/assistant/tool-call/tool-result history
17
+ |-- bounded failed/denied/cancelled run outcomes
16
18
  |-- provider-exposed reasoning summaries for completed assistant turns
17
19
  |-- optional derived context checkpoint
18
20
  |-- workspace and working-directory metadata
@@ -37,16 +39,28 @@ $FORGE_HOME/
37
39
  `-- <run-id>.jsonl
38
40
  ```
39
41
 
40
- Session snapshots use `schemaVersion: 2`; v1 snapshots migrate on load. Trace
42
+ Session snapshots use `schemaVersion: 3`; v1/v2 snapshots migrate on load. The
43
+ v3 snapshot stores provider-neutral content blocks and a fidelity marker. Trace
41
44
  envelopes retain `schemaVersion: 1`. Files are written only under the resolved
42
45
  Forge home. Session snapshots are replaced atomically. Run traces are append-only
43
46
  while their run is active.
44
47
 
48
+ A durable session snapshot is limited to 4 MiB after redaction and final JSON
49
+ serialization. Forge checks the same byte limit on save and load. An oversized
50
+ save fails before the atomic replacement, so the previous resumable snapshot is
51
+ preserved. Because canonical history is intentionally lossless and checkpoints
52
+ do not delete it, the current retention strategy is to start a new session as
53
+ the limit approaches and archive the old JSON file outside the active
54
+ `sessions/` directory if it no longer needs to appear in resume listings.
55
+
45
56
  Each session stores:
46
57
 
47
58
  - Session ID, creation time, and last-updated time
48
59
  - Canonical workspace root and the saved working directory
49
- - Completed user and assistant messages
60
+ - Completed user and assistant messages, assistant tool calls, and exactly
61
+ paired model-visible tool results or failures
62
+ - User requests and bounded, authority-free outcome summaries for incomplete
63
+ runs or completed runs that encountered tool failures
50
64
  - Provider-exposed reasoning text associated with completed assistant messages
51
65
  - The ordered run IDs belonging to the session
52
66
  - An optional versioned checkpoint with source/tail hashes and provenance
@@ -67,23 +81,41 @@ forge resume --last
67
81
 
68
82
  The interactive `/resume` command opens a bounded list of saved sessions for
69
83
  the current canonical workspace. Selecting one replaces the empty/current
70
- conversation with its completed history and continues in that saved session.
84
+ conversation with its canonical history and continues in that saved session.
85
+ When every referenced trace is available, the interactive transcript is rebuilt
86
+ from the same ordered `RunEvent` stream used during the original run. This
87
+ restores reasoning summaries, intermediate model text, tool proposals,
88
+ decisions, completions, and failures instead of displaying the bounded model
89
+ context summary as assistant prose.
71
90
 
72
91
  Resume follows these rules:
73
92
 
74
- 1. Only completed user/assistant turns and their provider-exposed reasoning are
75
- restored for display.
93
+ 1. Completed user/assistant/tool turns are restored. Failed, denied, cancelled, and
94
+ limit-reached runs restore the original request plus a bounded outcome
95
+ summary. A completed run that encountered tool failures retains a bounded
96
+ tool-outcome suffix as well.
76
97
  2. A new prompt always starts a new bounded run with a new run ID.
77
98
  3. Current configuration and `AGENTS.md` instructions are loaded again.
78
- 4. Approval state is new for every resumed run.
99
+ 4. Approval state is new for every resumed run; memory-only session grants are
100
+ cleared before the saved conversation is loaded.
79
101
  5. Provider continuation records and partially completed tool calls are never
80
- resumed.
102
+ resumed. Closed historical tool exchanges are model-visible context, but
103
+ remain untrusted historical observations: the next run must re-inspect the
104
+ workspace and obtain fresh approval before acting.
81
105
  6. A saved session from another workspace is rejected unless the user starts
82
106
  from that workspace explicitly.
83
107
  7. Missing or invalid session files produce an actionable configuration-style
84
108
  error without starting a model request.
85
109
  8. A valid checkpoint restores the same bounded active view; a stale or invalid
86
110
  checkpoint is ignored without changing the canonical transcript.
111
+ 9. Legacy snapshots are always migrated losslessly as text. Structured tool
112
+ history is backfilled only when every
113
+ referenced run trace is readable and the existing canonical messages form
114
+ an exact ordered subsequence of the reconstruction. Otherwise the snapshot
115
+ remains unchanged.
116
+ 10. If any referenced trace is missing or invalid, Forge renders the canonical
117
+ structured fallback instead of a misleading partial event timeline. Tool
118
+ calls/results remain available and the final answer is not duplicated.
87
119
 
88
120
  This means Forge restores conversation context, not authority or executable
89
121
  state. Saved reasoning remains display-only and is not added to the model's
@@ -107,8 +139,10 @@ assembled from terminal strings.
107
139
  ## Redaction and safety
108
140
 
109
141
  Before persistence, Forge redacts configured credential values and recognized
110
- secret-bearing fields. In particular, `DEEPSEEK_API_KEY` must never appear in a
111
- session snapshot or run trace.
142
+ secret-bearing fields. Bounded run-outcome summaries omit tool output, file
143
+ content, command arguments, and raw error messages; they retain only safe tool
144
+ identifiers, file paths or command programs, and error codes. In particular,
145
+ `DEEPSEEK_API_KEY` must never appear in a session snapshot or run trace.
112
146
 
113
147
  Run traces may still contain repository contents, diffs, commands, model text,
114
148
  and provider-returned reasoning. Files under `sessions/` and `runs/` are local
@@ -117,6 +151,8 @@ sensitive data and must not be committed to a repository.
117
151
  Session resume does not weaken the existing security model:
118
152
 
119
153
  - Previous approvals are not restored.
154
+ - `/permissions` grants, scope identifiers, and use counts are runtime-only and
155
+ are not written to the session snapshot or derived checkpoint.
120
156
  - A previous permission profile is not trusted as a grant; current user
121
157
  configuration and explicit CLI choices determine the next run.
122
158
  - Project files cannot edit session metadata under `FORGE_HOME` through
@@ -148,6 +148,22 @@ behavior. Run in a terminal, narrow the task to read-only behavior, or use a
148
148
  purpose-built automation/evaluation approval channel. Do not switch profiles
149
149
  expecting OS isolation: neither profile sandboxes an approved process.
150
150
 
151
+ In the interactive Forge Engine, choose `1` for one action or `2` only when the
152
+ displayed session scope is appropriate. Use `/permissions` to inspect and
153
+ revoke grants. Changed command arguments, cwd, network destination, workspace,
154
+ timeout above the ceiling, or high-risk install/publish/destructive commands
155
+ correctly prompt again. Choose `3`, optionally type guidance, and press Enter to
156
+ return a denial result to the active run without granting authority.
157
+
158
+ ## An update is shown but `forge update` will not install it
159
+
160
+ Forge installs only when it recognizes npm or pnpm global-install provenance.
161
+ For an unknown or copied executable it reports the exact new version and
162
+ release-notes URL without guessing a package manager. Use the installer that
163
+ originally installed Forge. After a successful explicit update, restart the
164
+ running process. `FORGE_DISABLE_UPDATE_CHECK=1` disables only the startup check;
165
+ `forge update check` remains explicit and authoritative.
166
+
151
167
  ## A project plugin is listed but skipped
152
168
 
153
169
  Project plugins are discovered from the canonical workspace root's
@@ -220,8 +236,9 @@ pnpm forge resume --last
220
236
 
221
237
  Session snapshots live under `$FORGE_HOME/sessions`. Changing `FORGE_HOME`,
222
238
  moving the checkout, deleting a snapshot, or corrupting its JSON changes what
223
- is available. Resume restores only completed turns; it cannot continue an
224
- interrupted stream or pending tool call.
239
+ is available. Resume restores completed turns plus bounded outcomes from
240
+ failed, denied, cancelled, or limit-reached runs. It cannot continue an
241
+ interrupted stream or pending tool call; the next run re-inspects current state.
225
242
 
226
243
  ## Terminal input or rendering looks wrong
227
244