Skip to content

Commit 88f28c7

Browse files
v0.4.6
# v0.4.6 — HTML/PDF Previews, Event Adapters & OSS Bug Fixes Major feature release adding inline HTML and PDF preview rendering, a new unified event adapter architecture for multi-backend support, batch session operations, and fixes for several community-reported issues. --- ## Features - **HTML & PDF inline previews** — New `html-preview` and `pdf-preview` code blocks render rich HTML content and PDF documents directly in chat, with multi-item tab support and fullscreen overlay viewing (0d22069b) - **Batch session context menu** — Right-clicking during multi-select now shows batch operations (status, labels, flag, archive, delete) instead of single-session actions (61759915) - **Dynamic Codex model discovery** — Fetch available models from Codex app-server with 30-min periodic refresh, falling back to hardcoded registry on failure. Support for multiple connections of the same provider type with unique slug generation (1bcb1083) - **Mustache template engine** — New template system for dynamic content rendering with `{{variable}}` syntax, partials, conditionals, and loops (a779bf83) - **Source templates** — Sources can now ship HTML templates for branded, consistent rendering of their data via the new `render_template` tool. Templates use Mustache syntax with self-describing metadata headers (992a1a50) - **Fast mode feature flag** — Moved to shared package for cross-package availability (e8295580) ## Bug Fixes - **Chat history empty on macOS login launch** — Added Promise-based initialization gate to SessionManager; `GET_SESSIONS` handler now awaits init completion to prevent returning empty results during startup race. Fixes [#254](#254) (9ed91fbf) - **Window not draggable across all panel headers** — App menu, session list panel, and panel headers now have consistent drag regions so the window can be moved from any header area. Fixes [#255](#255) (e1ed6619) - **Skills can't auto-activate required sources** — Added `requiredSources` field to SKILL.md frontmatter; skills now declare source dependencies that are auto-enabled before the agent's first turn. Fixes [#249](#249) (9ed91fbf) - **File links in chat not clickable** — csv, pdf, png, and other file types were not matched by the link click handler. Extension list is now derived from `file-classification.ts` to stay in sync automatically (a3fa35e4) - **source_test reports expired for valid OAuth tokens** — Now attempts token refresh before reporting expired, matching the actual connection pipeline behavior (7a9bc9d9) - **Interrupted responses cause LLM confusion** — Partial content from stopped/redirected responses now gets a context note injected so the model doesn't misinterpret follow-up messages (8fd1eb7d) - **Oversize icons in workflow selectors and dropdowns** — Fixed icon sizing in StyledDropdown and workflow selector components (2c917b88, aef87854) - **Windows Git Bash path not persisted** — Detected `CLAUDE_CODE_GIT_BASH_PATH` is now saved to config and restored on startup (9ed91fbf) - **Per-session env override race condition** — Replaced global mutable `optionsEnv` with per-session `envOverrides` to fix `ANTHROPIC_BASE_URL` race across concurrent sessions (1bcb1083) ## Improvements - **Unified event adapter architecture** — Extracted common streaming/event logic into `BaseEventAdapter` with backend-specific adapters for Claude, Codex, and Copilot. Includes new `EventQueue` for ordered event delivery (multiple commits) - **TodoState → SessionStatus rename** — Consistent naming across 54+ files with backward compatibility for existing hook configs and session file migration (e5987124) - **Block spacing improvements** — Better visual spacing between content blocks in chat (a0402076) - **Transform tool timeout improvements** — More robust timeout handling for data transformation scripts (c03011b6)
1 parent c91ce59 commit 88f28c7

File tree

142 files changed

+10225
-1811
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

142 files changed

+10225
-1811
lines changed
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
name: Bug Report
2+
description: Report a bug or unexpected behavior in Craft Agents
3+
labels: ["bug"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Thanks for taking the time to report a bug! Please fill out the sections below so we can reproduce and fix the issue.
9+
10+
- type: input
11+
id: version
12+
attributes:
13+
label: Craft Agents Version
14+
description: "Found in Settings or the title bar (e.g. 0.4.6)"
15+
placeholder: "0.4.6"
16+
validations:
17+
required: true
18+
19+
- type: dropdown
20+
id: os
21+
attributes:
22+
label: Operating System
23+
options:
24+
- macOS (Apple Silicon)
25+
- macOS (Intel)
26+
- Windows 11
27+
- Windows 10
28+
- Linux (Ubuntu/Debian)
29+
- Linux (Fedora/RHEL)
30+
- Linux (Arch)
31+
- Linux (Other)
32+
validations:
33+
required: true
34+
35+
- type: input
36+
id: os_version
37+
attributes:
38+
label: OS Version
39+
description: "e.g. macOS 15.3, Windows 11 24H2, Ubuntu 24.04"
40+
placeholder: "macOS 15.3"
41+
validations:
42+
required: true
43+
44+
- type: dropdown
45+
id: ai_provider
46+
attributes:
47+
label: AI Provider
48+
description: Which AI provider/connection are you using?
49+
options:
50+
- Anthropic API (direct)
51+
- Anthropic API (custom endpoint)
52+
- OpenAI / Codex
53+
- Copilot (GitHub)
54+
- Other
55+
validations:
56+
required: true
57+
58+
- type: input
59+
id: model
60+
attributes:
61+
label: Model
62+
description: "Which model are you using? (e.g. Claude Opus 4.6, GPT-4.1)"
63+
placeholder: "Claude Opus 4.6"
64+
65+
- type: textarea
66+
id: description
67+
attributes:
68+
label: Description
69+
description: A clear description of what the bug is.
70+
validations:
71+
required: true
72+
73+
- type: textarea
74+
id: steps
75+
attributes:
76+
label: Steps to Reproduce
77+
description: Step-by-step instructions to reproduce the behavior.
78+
value: |
79+
1.
80+
2.
81+
3.
82+
validations:
83+
required: true
84+
85+
- type: textarea
86+
id: expected
87+
attributes:
88+
label: Expected Behavior
89+
description: What did you expect to happen?
90+
validations:
91+
required: true
92+
93+
- type: textarea
94+
id: actual
95+
attributes:
96+
label: Actual Behavior
97+
description: What actually happened?
98+
validations:
99+
required: true
100+
101+
- type: textarea
102+
id: screenshots
103+
attributes:
104+
label: Screenshots / Screen Recordings
105+
description: |
106+
For **UI issues**, please attach screenshots or screen recordings showing the problem.
107+
You can drag and drop images/videos directly into this field.
108+
109+
- type: textarea
110+
id: logs
111+
attributes:
112+
label: Debug Logs
113+
description: |
114+
For **non-UI issues** (crashes, errors, connection problems), please attach relevant logs from a debug session.
115+
116+
Launch the app with `-- --debug` and reproduce the issue. See the [Troubleshooting section in the README](https://github.com/lukilabs/craft-agents-oss#troubleshooting) for platform-specific commands and log file locations.
117+
render: shell
118+
119+
- type: textarea
120+
id: additional
121+
attributes:
122+
label: Additional Context
123+
description: Any other context about the problem (MCP sources used, workspace config, etc.)
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Feature Request
2+
description: Suggest a new feature or enhancement
3+
labels: ["enhancement"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Have an idea for Craft Agents? We'd love to hear it!
9+
10+
- type: textarea
11+
id: problem
12+
attributes:
13+
label: Problem or Motivation
14+
description: What problem does this feature solve, or what workflow does it improve?
15+
validations:
16+
required: true
17+
18+
- type: textarea
19+
id: solution
20+
attributes:
21+
label: Proposed Solution
22+
description: Describe the feature or change you'd like to see.
23+
validations:
24+
required: true
25+
26+
- type: textarea
27+
id: alternatives
28+
attributes:
29+
label: Alternatives Considered
30+
description: Any workarounds or alternative approaches you've tried.
31+
32+
- type: textarea
33+
id: additional
34+
attributes:
35+
label: Additional Context
36+
description: Screenshots, mockups, links, or any other context.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ Or configure manually in `~/.craft-agent/workspaces/{id}/hooks.json`:
342342
- **Command hooks** — run shell commands with event data as environment variables (`$CRAFT_LABEL`, `$CRAFT_SESSION_ID`, etc.)
343343
- **Prompt hooks** — create a new agent session with a prompt (supports `@mentions` for sources and skills)
344344

345-
**Supported events:** `LabelAdd`, `LabelRemove`, `PermissionModeChange`, `FlagChange`, `TodoStateChange`, `SchedulerTick`, `PreToolUse`, `PostToolUse`, `SessionStart`, `SessionEnd`, and more.
345+
**Supported events:** `LabelAdd`, `LabelRemove`, `PermissionModeChange`, `FlagChange`, `SessionStatusChange`, `SchedulerTick`, `PreToolUse`, `PostToolUse`, `SessionStart`, `SessionEnd`, and more.
346346

347347
See the [Hooks documentation](https://agents.craft.do/docs/hooks/overview) for the full reference.
348348

apps/electron/electron-builder.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ files:
2424
# Include network interceptor for API error capture and MCP schema injection
2525
- packages/shared/src/network-interceptor.ts
2626
- packages/shared/src/interceptor-common.ts
27+
- packages/shared/src/feature-flags.ts
2728
# Include bundled Bun runtime (platform-specific, set by build script)
2829
- vendor/bun/**/*
2930
# Include bundled Codex binary (platform-specific, downloaded by build script)

apps/electron/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@craft-agent/electron",
3-
"version": "0.4.5",
3+
"version": "0.4.6",
44
"description": "Electron desktop app for Craft Agents",
55
"main": "dist/main.cjs",
66
"private": true,

apps/electron/resources/docs/hooks.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This guide explains how to configure hooks in Craft Agent to automate workflows
77
Hooks allow you to trigger actions automatically when specific events occur in Craft Agent. You can:
88
- Run shell commands when labels are added/removed
99
- Execute prompts on a schedule using cron expressions
10-
- Automate workflows based on permission mode changes, flags, or todo state changes
10+
- Automate workflows based on permission mode changes, flags, or session status changes
1111

1212
## hooks.json Location
1313

@@ -46,9 +46,11 @@ Hooks are configured in `hooks.json` at the root of your workspace:
4646
| `LabelConfigChange` | Label configuration changed | Always matches |
4747
| `PermissionModeChange` | Permission mode changed | New mode name |
4848
| `FlagChange` | Session flagged/unflagged | `true` or `false` |
49-
| `TodoStateChange` | Todo status changed | New status (e.g., `done`, `in_progress`) |
49+
| `SessionStatusChange` | Session status changed | New status (e.g., `done`, `in_progress`) |
5050
| `SchedulerTick` | Runs every minute | Uses cron matching |
5151

52+
> **Note:** `TodoStateChange` is a deprecated alias for `SessionStatusChange`. Existing configs using the old name will continue to work but will show a deprecation warning during validation.
53+
5254
### Agent Events (passed to Claude SDK)
5355

5456
| Event | Trigger | Match Value |

0 commit comments

Comments
 (0)