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
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ Format based on [Keep a Changelog](https://keepachangelog.com/). Versioning foll

## [Unreleased]

## [0.14.3] - 2026-09-20

### Changed

- Dependency: `@voicethere/agent` **0.8.0** (runtime verify). Customer `init` workspaces pin `^0.8.0` and seed `templates/<id>/` sources (`echo/agent.ts` instead of `echo.ts`).
- **`voicethere init --template`** — add `world-sync`, `world-sync-binary`, and `spatial-showcase` (same ids as dashboard create).

## [0.14.2] - 2026-09-20

### Added
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ npm run verify

| Flag | Behavior |
| ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--template <id>` | Platform template (default: `echo`). Also: `blank`, `voice-starter`, `echo-dc`, `voice-showcase`, `game-sync`, `recording-consent`, `positional-tts` |
| `--template <id>` | Platform template (default: `echo`). Also: `blank`, `voice-starter`, `echo-dc`, `voice-showcase`, `world-sync`, `world-sync-binary`, `game-sync`, `recording-consent`, `positional-tts`, `spatial-showcase` |
| `--local-only` | Write files on disk only — no login, cloud project, or source upload |
| `--no-install` | Skip `npm install` after scaffolding |
| `--force` | Overwrite when `package.json` already exists |
Expand Down
99 changes: 54 additions & 45 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@voicethere/cli",
"version": "0.14.2",
"version": "0.14.3",
"description": "VoiceThere cloud CLI — login, projects, and agent bundle upload",
"type": "module",
"bin": {
Expand Down Expand Up @@ -38,7 +38,7 @@
},
"license": "MIT",
"dependencies": {
"@voicethere/agent": "0.5.3",
"@voicethere/agent": "0.8.0",
"commander": "13.1.0",
"ffmpeg-static": "5.3.0"
},
Expand Down
44 changes: 37 additions & 7 deletions src/commands/init.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ describe("runInit", () => {
});
putProjectSource.mockResolvedValue({
project_id: "proj-init",
entry_path: "echo.ts",
entry_path: "echo/agent.ts",
files: [],
revision: 1,
});
Expand Down Expand Up @@ -108,12 +108,12 @@ describe("runInit", () => {
dependencies: Record<string, string>;
scripts: Record<string, string>;
};
expect(packageJson.dependencies["@voicethere/agent"]).toBe("^0.7.7");
expect(packageJson.scripts.verify).toContain("echo.ts");
expect(packageJson.dependencies["@voicethere/agent"]).toBe("^0.8.0");
expect(packageJson.scripts.verify).toContain("echo/agent.ts");
expect(packageJson.scripts.upload).toBe("voicethere build upload");
expect(packageJson.scripts["source:push"]).toBe("voicethere source push");

await expect(access(join(target, "echo.ts"))).resolves.toBeUndefined();
await expect(access(join(target, "echo", "agent.ts"))).resolves.toBeUndefined();
await expect(access(join(target, ".gitignore"))).resolves.toBeUndefined();
await expect(
access(join(target, ".voicethere", "config.json")),
Expand All @@ -135,6 +135,36 @@ describe("runInit", () => {
expect(packageJson.dependencies.ioredis).toBe("^5.11.1");
});

it("writes world-sync JSON template under world-sync/agent.ts", async () => {
const target = join(tempDir, "world-sync-local");
await runInit({
dir: target,
template: "world-sync",
localOnly: true,
noInstall: true,
});

const packageJson = JSON.parse(
await readFile(join(target, "package.json"), "utf8"),
) as { dependencies: Record<string, string>; scripts: Record<string, string> };
expect(packageJson.dependencies["@voicethere/agent"]).toBe("^0.8.0");
expect(packageJson.scripts.build).toContain("world-sync/agent.ts");
await expect(
access(join(target, "world-sync", "agent.ts")),
).resolves.toBeUndefined();
});

it("rejects e2e-only redis-sync as a create template", async () => {
await expect(
runInit({
dir: join(tempDir, "redis-sync-local"),
template: "redis-sync",
localOnly: true,
noInstall: true,
}),
).rejects.toThrow(/Unknown template "redis-sync"/);
});

it("writes blank stub with agent.ts entry", async () => {
const target = join(tempDir, "blank-local");
await runInit({
Expand All @@ -157,8 +187,8 @@ describe("runInit", () => {
const target = join(tempDir, "cloud-echo");
getProjectSource.mockResolvedValueOnce({
project_id: "proj-init",
entry_path: "echo.ts",
files: [{ path: "echo.ts", content: "seed" }],
entry_path: "echo/agent.ts",
files: [{ path: "echo/agent.ts", content: "seed" }],
revision: 1,
});

Expand All @@ -185,7 +215,7 @@ describe("runInit", () => {
expect(putProjectSource).toHaveBeenCalledWith(
"proj-init",
expect.objectContaining({
entry_path: "echo.ts",
entry_path: "echo/agent.ts",
revision: 1,
files: expect.arrayContaining([
expect.objectContaining({ path: "package.json" }),
Expand Down
4 changes: 2 additions & 2 deletions src/lib/customer-package-json.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** Customer workspace pin — may differ from the CLI runtime `@voicethere/agent` dependency. */
export const CUSTOMER_AGENT_VERSION = "0.7.7";
export const CUSTOMER_AGENT_VERSION = "0.8.0";

/** Extra npm deps for platform create templates (not in every agent registry release). */
const EXTRA_TEMPLATE_NPM_DEPS: Record<string, Record<string, string>> = {
Expand All @@ -8,7 +8,7 @@ const EXTRA_TEMPLATE_NPM_DEPS: Record<string, Record<string, string>> = {

export interface BuildCustomerPackageJsonOptions {
templateId: string;
/** Agent entry relative to project root (e.g. `echo.ts`, `voice-showcase/agent.ts`). */
/** Agent entry relative to project root (e.g. `echo/agent.ts`, `voice-showcase/agent.ts`). */
entryPath: string;
/** npm package `name` field — defaults to `voicethere-<templateId>`. */
packageName?: string;
Expand Down
Loading
Loading