Skip to content

Comments

merge beta into dev#331

Merged
Tarquinen merged 37 commits intodevfrom
beta
Jan 31, 2026
Merged

merge beta into dev#331
Tarquinen merged 37 commits intodevfrom
beta

Conversation

@Tarquinen
Copy link
Collaborator

@Tarquinen Tarquinen commented Jan 30, 2026

  • NEW TOOL: Compress!! This tool is a much smarter version of opencode built in compression. Compress triggers on only the portions that deserve to be compressed, and only at a good time to do so (not on your entire session and at arbitrary moments)
  • change tool names to Discard, Compress, Prune (DCP)
  • fix secure mode auth, DCP should now work in all clients OTHER THAN desktop, which has rendering issues
  • fix /dcp context command to accurately show remaining tool count in session and now shows how many messages were pruned by the compress tool
  • ko-fi button for better provider testing if anyone wants to donate some tokens

Recover squash-related files from dangling stash commit:
- squash tool implementation and utils
- squash, discard-extract, discard-squash, extract-squash, all prompt variants
- system and nudge prompts for all tool combinations
- Add ulid dependency for generating unique IDs
- Replace timestamp-based ID counter with ulid
- Ensures unique IDs across parallel operations
- Move squashSummaries out of prune object to top-level state
- Add resetOnCompaction utility to clear stale state after compaction
- Move findLastCompactionTimestamp and countTurns to state/utils.ts
- Update isMessageCompacted to also check prune.messageIds
- Update persistence to save/load squashSummaries at top level
- Move findStringInMessages, collectToolIdsInRange, collectMessageIdsInRange
  from squash.ts to tools/utils.ts for reusability
- Keep squash.ts focused on tool definition and execution logic
- Follows existing pattern where collectContentInRange lives in utils.ts
When opencode runs with OPENCODE_SERVER_PASSWORD set, the server
requires HTTP Basic Auth. This adds auth utilities to detect secure
mode and configure the SDK client with an interceptor that injects
the Authorization header on all requests.

Fixes #304
- revert terse PR 313 style back to verbose prose format from dev branch
- clarify tool triggers: discard/extract for individual outputs, squash for phases
- remove 'task complete' trigger from discard/extract (exclusive to squash)
- add instruction to not use discard/extract without prunable-tools list
- replace 'task/sub-task' terminology with 'phase' to avoid conflict with Task tool
- Use tool part injection for DeepSeek/Kimi (requires reasoning_content in assistant messages)
- Use text part injection for other models (cleaner approach)
- Add prunedMessageCount to context breakdown display
@Tarquinen Tarquinen changed the title Beta merge beta into master Jan 30, 2026
Fixes issue where readFileSync with __dirname fails when bundled by Bun
(same issue as #222, reintroduced by #327).

- Add scripts/generate-prompts.ts prebuild script
- Import generated .ts files instead of runtime readFileSync
- Remove postbuild .md copy (no longer needed)
…essages are pruned

Previously the output would show "0 tools, 3 messages" if only messages
were pruned. Now it conditionally shows both parts properly, omitting
the 0-count category.
Reverts the change that only showed cooldown on completed tools.
Errored tools were getting stuck in loops because they would see
prunable context and try to prune again. Now they see the cooldown
message instead, which prevents immediate re-pruning.
Update all documentation and source files to consistently order the DCP tools
as DCP (Distill, Compress, Prune) rather than various inconsistent orderings.

Files updated:
- README.md: Tools section and protected tools list
- dcp.schema.json: Tool configuration properties
- lib/prompts/index.ts: ToolFlags interface and tools array
- lib/state/tool-cache.ts: Tool name checks
- scripts/README.md: Tool flags table
@Tarquinen Tarquinen changed the base branch from master to dev January 31, 2026 00:53
@Tarquinen Tarquinen merged commit fbf3bd8 into dev Jan 31, 2026
1 check passed
@Tarquinen Tarquinen deleted the beta branch January 31, 2026 00:53
@Tarquinen Tarquinen changed the title merge beta into master merge beta into dev Feb 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants