Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
All notable changes to **basou** are recorded here. The project follows
[Semantic Versioning](https://semver.org/spec/v2.0.0.html) starting with v0.1.0.

## Unreleased
## 0.7.0 — 2026-06-08

### Added

Expand Down Expand Up @@ -44,6 +44,16 @@ All notable changes to **basou** are recorded here. The project follows
- `basou init --source-root <path>` (repeatable) seeds `import.source_roots`
for a new workspace, normalizing each value to a repo-root-relative path.

### Fixed

- `basou import claude-code` and `basou import codex` now reject `--session`
and `--all` together instead of silently honouring `--session` and ignoring
`--all`. The selector must be unambiguous: import exactly one transcript or
every one, never both at once.
- The published `session-import` JSON Schema description no longer mentions a
`basou session export` command, which does not exist. It now documents only
`basou session import` as the consumer of the payload.

## 0.6.0 — 2026-06-05

### Added
Expand Down
2 changes: 1 addition & 1 deletion packages/basou/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "basou",
"version": "0.6.0",
"version": "0.7.0",
"type": "module",
"license": "Apache-2.0",
"description": "Convenience installer for the @basou/cli command. `npm install -g basou` exposes the same `basou` binary as `npm install -g @basou/cli`.",
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@basou/cli",
"version": "0.6.0",
"version": "0.7.0",
"type": "module",
"license": "Apache-2.0",
"description": "basou command-line tool",
Expand Down
20 changes: 20 additions & 0 deletions packages/cli/src/commands/import.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,16 @@ describe("basou import claude-code", () => {
).rejects.toThrow("Specify --session <id> or --all");
});

it("rejects --session combined with --all", async () => {
const repo = await setupInitedRepo();
await expect(
doRunImportClaudeCode(
{ session: "any-id", all: true },
{ cwd: repo, claudeProjectsDir: getProjectsRoot() },
),
).rejects.toThrow("Specify either --session <id> or --all, not both");
});

it("errors when the project's transcript directory is absent", async () => {
const repo = await setupInitedRepo();
await expect(
Expand Down Expand Up @@ -452,6 +462,16 @@ describe("basou import codex", () => {
).rejects.toThrow("Specify --session <id> or --all");
});

it("rejects --session combined with --all", async () => {
const repo = await setupInitedRepo();
await expect(
doRunImportCodex(
{ session: "any-id", all: true },
{ cwd: repo, codexSessionsDir: getCodexRoot() },
),
).rejects.toThrow("Specify either --session <id> or --all, not both");
});

it("errors when the Codex sessions directory is absent", async () => {
const repo = await setupInitedRepo();
await expect(
Expand Down
3 changes: 3 additions & 0 deletions packages/cli/src/commands/import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,9 @@ export async function doRunImportCodex(
}

function assertSelector(options: ImportOptions): void {
if (options.session !== undefined && options.all === true) {
throw new Error("Specify either --session <id> or --all, not both");
}
if (options.session === undefined && options.all !== true) {
throw new Error("Specify --session <id> or --all");
}
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@basou/core",
"version": "0.6.0",
"version": "0.7.0",
"type": "module",
"license": "Apache-2.0",
"description": "Core primitives for Basou: sessions, events, approvals, git capability",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/schemas/session-import.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://basou.dev/schemas/0.1.0/session-import.schema.json",
"title": "Basou Session Import Payload",
"description": "The portable session payload consumed by `basou session import` (and produced by `basou session export`).",
"description": "The portable session payload consumed by `basou session import`.",
"type": "object",
"properties": {
"schema_version": {
Expand Down
3 changes: 1 addition & 2 deletions packages/core/src/schemas/json-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@ const DOCUMENTS: ReadonlyArray<{
name: "session-import",
schema: SessionImportPayloadSchema,
title: "Basou Session Import Payload",
description:
"The portable session payload consumed by `basou session import` (and produced by `basou session export`).",
description: "The portable session payload consumed by `basou session import`.",
},
];

Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@basou/sdk",
"version": "0.6.0",
"version": "0.7.0",
"type": "module",
"license": "Apache-2.0",
"description": "Read-only SDK for Basou: a stable, ergonomic API to read a workspace's provenance (sessions, events, tasks, approvals, stats).",
Expand Down