Skip to content

Commit 46cf2b1

Browse files
authored
Merge pull request #1046 from coleam00/dev
Release 0.3.4
2 parents 029fb60 + e2a6654 commit 46cf2b1

25 files changed

Lines changed: 177 additions & 98 deletions

File tree

.claude/rules/cli.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,9 @@ bun run cli version
2929

3030
## Startup Behavior
3131

32-
1. Deletes `process.env.DATABASE_URL` (prevent target repo's DB from leaking in)
33-
2. Loads `~/.archon/.env` with `override: true`
34-
3. Smart Claude auth default: if no `CLAUDE_API_KEY` or `CLAUDE_CODE_OAUTH_TOKEN`, sets `CLAUDE_USE_GLOBAL_AUTH=true`
35-
4. Imports all commands AFTER dotenv setup
32+
1. Loads `~/.archon/.env` with `override: true` (Archon's config wins over any Bun-auto-loaded CWD vars)
33+
2. Smart Claude auth default: if no `CLAUDE_API_KEY` or `CLAUDE_CODE_OAUTH_TOKEN`, sets `CLAUDE_USE_GLOBAL_AUTH=true`
34+
3. Imports all commands AFTER dotenv setup
3635

3736
## WorkflowRunOptions Interface
3837

.claude/skills/release/SKILL.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,16 @@ Read the commit messages and the actual diffs (`git diff main..dev`) to understa
9797
- `pyproject.toml`: update `version = "x.y.z"`
9898
- `Cargo.toml`: update `version = "x.y.z"`
9999

100-
2. **Lockfile refresh** (stack-dependent):
100+
2. **Workspace version sync** (monorepo only):
101+
- If `scripts/sync-versions.sh` exists, run `bash scripts/sync-versions.sh` to sync all `packages/*/package.json` versions to match the root version.
102+
103+
3. **Lockfile refresh** (stack-dependent):
101104
- `package.json` + `bun.lock`: run `bun install`
102105
- `package.json` + `package-lock.json`: run `npm install --package-lock-only`
103106
- `pyproject.toml` + `uv.lock`: run `uv lock --quiet`
104107
- `Cargo.toml`: run `cargo update --workspace`
105108

106-
3. **`CHANGELOG.md`** — prepend new version section:
109+
4. **`CHANGELOG.md`** — prepend new version section:
107110

108111
```markdown
109112
## [x.y.z] - YYYY-MM-DD
@@ -141,8 +144,8 @@ Ask: "Does this look good? I'll commit and create the PR."
141144
Only after user approval:
142145

143146
```bash
144-
# Stage version file, lockfile, and changelog
145-
git add <version-file> <lockfile> CHANGELOG.md
147+
# Stage version file, workspace packages, lockfile, and changelog
148+
git add <version-file> packages/*/package.json <lockfile> CHANGELOG.md
146149
git commit -m "Release x.y.z"
147150

148151
# Push dev

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.3.4] - 2026-04-10
11+
12+
Binary env loading fix and release infrastructure improvements.
13+
14+
### Added
15+
16+
- **Docs site redesign**: logo, dark theme, feature cards, and enhanced CSS (#1022)
17+
18+
### Changed
19+
20+
- **Server env loading for binary support**: removed redundant CWD `.env` stripping — `SUBPROCESS_ENV_ALLOWLIST` and the env-leak gate already prevent target repo credentials from reaching AI subprocesses. Server now loads `~/.archon/.env` with `override: true` for all keys (not just `DATABASE_URL`), skips the `import.meta.dir` `.env` path in binary mode, and defaults `CLAUDE_USE_GLOBAL_AUTH=true` when no explicit credentials are set (#1045)
21+
- **Workspace version sync**: all `packages/*/package.json` versions now sync from the root `package.json` during releases via `scripts/sync-versions.sh`
22+
23+
### Fixed
24+
25+
- **`archon serve` crash in compiled binaries**: the CWD env stripping + baked `import.meta.dir` path caused all credentials to be lost, triggering `no_ai_credentials` exit on every startup
26+
- **CLI `version` command reading stale version**: dev mode now reads from the monorepo root `package.json` instead of the CLI package's own version field
27+
- **Release CI web build**: fixed `bun --filter` syntax and added missing `remark-gfm` transitive dependencies for Bun hoisting
28+
1029
## [0.3.3] - 2026-04-10
1130

1231
Binary distribution improvements, new workflow node type, and a batch of bug fixes.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "archon",
3-
"version": "0.3.3",
3+
"version": "0.3.4",
44
"private": true,
55
"workspaces": [
66
"packages/*"

packages/adapters/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@archon/adapters",
3-
"version": "0.1.0",
3+
"version": "0.3.4",
44
"type": "module",
55
"main": "./src/index.ts",
66
"types": "./src/index.ts",

packages/cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@archon/cli",
3-
"version": "0.2.13",
3+
"version": "0.3.4",
44
"type": "module",
55
"main": "./src/cli.ts",
66
"bin": {

packages/cli/src/cli.ts

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,13 @@ import { config } from 'dotenv';
1212
import { resolve } from 'path';
1313
import { existsSync } from 'fs';
1414

15-
// Strip all vars that Bun may have auto-loaded from CWD's .env.
16-
// Bun auto-loads .env relative to CWD before any user code runs. The CLI
17-
// runs from target repos whose .env contains keys for that app (ANTHROPIC_API_KEY,
18-
// DATABASE_URL, OPENAI_API_KEY, etc.) — none of which should affect Archon.
19-
// Strategy: parse the CWD .env without applying it, then delete those keys.
20-
const cwdEnvPath = resolve(process.cwd(), '.env');
21-
if (existsSync(cwdEnvPath)) {
22-
const cwdEnvResult = config({ path: cwdEnvPath, processEnv: {} });
23-
// If parse fails, cwdEnvResult.parsed is undefined — safe to skip:
24-
// Bun uses the same RFC-style parser, so a file dotenv cannot parse
25-
// was also unparseable by Bun and contributed no keys to process.env.
26-
if (cwdEnvResult.parsed) {
27-
for (const key of Object.keys(cwdEnvResult.parsed)) {
28-
Reflect.deleteProperty(process.env, key);
29-
}
30-
}
31-
}
32-
33-
// Load .env from global Archon config only (override: true so ~/.archon/.env
34-
// always wins over any remaining Bun-auto-loaded vars)
15+
// Load .env from global Archon config (override: true so ~/.archon/.env
16+
// always wins over any Bun-auto-loaded CWD vars).
17+
//
18+
// Credential safety: target repo .env keys that Bun auto-loads from CWD
19+
// cannot leak into AI subprocesses — SUBPROCESS_ENV_ALLOWLIST blocks them.
20+
// The env-leak gate provides a second layer by scanning target repos before
21+
// spawning. No CWD stripping needed.
3522
const globalEnvPath = resolve(process.env.HOME ?? '~', '.archon', '.env');
3623
if (existsSync(globalEnvPath)) {
3724
const result = config({ path: globalEnvPath, override: true });

packages/cli/src/commands/version.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ interface PackageJson {
3030
* Get version for development mode (reads package.json)
3131
*/
3232
async function getDevVersion(): Promise<{ name: string; version: string }> {
33-
const pkgPath = join(SCRIPT_DIR, '../../package.json');
33+
// Read root package.json (monorepo version), not the CLI package's own
34+
const pkgPath = join(SCRIPT_DIR, '../../../../package.json');
3435

3536
let content: string;
3637
try {

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@archon/core",
3-
"version": "0.2.0",
3+
"version": "0.3.4",
44
"type": "module",
55
"main": "./src/index.ts",
66
"types": "./src/index.ts",

packages/docs-web/astro.config.mjs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,17 @@ export default defineConfig({
77
starlight({
88
title: 'Archon',
99
favicon: '/favicon.png',
10+
logo: {
11+
src: './src/assets/logo.png',
12+
alt: 'Archon',
13+
},
1014
description: 'AI workflow engine — package your coding workflows as YAML, run them anywhere.',
15+
head: [
16+
{
17+
tag: 'script',
18+
content: `if(!localStorage.getItem('starlight-theme')){localStorage.setItem('starlight-theme','dark');document.documentElement.dataset.theme='dark';}`,
19+
},
20+
],
1121
social: [{ icon: 'github', label: 'GitHub', href: 'https://github.com/coleam00/Archon' }],
1222
editLink: {
1323
baseUrl: 'https://github.com/coleam00/Archon/edit/main/packages/docs-web/',

0 commit comments

Comments
 (0)