wakespace 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,25 @@
1
+ # Changelog
2
+
3
+ All notable changes to `wakespace` are documented here. This project adheres to
4
+ [Semantic Versioning](https://semver.org/).
5
+
6
+ ## 0.1.0 — 2026-06-01
7
+
8
+ Initial dogfood release. Published as a CLI-only package: a tiny cross-platform
9
+ launcher (`wakespace`) plus per-platform binary packages (`wakespace-<platform>`)
10
+ installed automatically as optional dependencies, with the `agent-loop` execution
11
+ layer compiled into each binary. Supported platforms: `darwin-arm64`,
12
+ `darwin-x64`, `linux-x64`, `linux-arm64`, `linux-x64-musl`, `linux-arm64-musl`,
13
+ `windows-x64`.
14
+
15
+ ### Added
16
+
17
+ - Workflow definitions with staged state machines and schema-validated fields.
18
+ - Append-only JSONL event storage with projections and chronicle inspection.
19
+ - Project/worktree isolation and worker permission modes.
20
+ - Wake execution over `agent-loop` workers, including AI SDK project tools
21
+ (`rg`, `readFile`, `writeFile`).
22
+ - Bun CLI for creating tasks, waking workers, and inspecting state
23
+ (`help`, `overview`, `status`, `task`, `project`, `worker`, …).
24
+ - `WAKESPACE_DIR` / `--dir` override for the workspace directory (default
25
+ `.wakespace`).
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 lidessen
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,80 @@
1
+ # wakespace
2
+
3
+ Durable workspace layer over [`agent-loop`](../agent-loop) for agent-driven
4
+ project development.
5
+
6
+ `wakespace` is published as a CLI-only package. The `agent-loop` execution layer
7
+ is compiled into a single self-contained binary per platform. The published
8
+ `wakespace` package is a tiny cross-platform launcher; the actual binary ships in
9
+ a per-platform package (`wakespace-<platform>`) installed automatically as an
10
+ optional dependency gated by `os`/`cpu`/`libc`, so `npm install` pulls only the
11
+ one that matches your machine.
12
+
13
+ Supported platforms: `darwin-arm64`, `darwin-x64`, `linux-x64`, `linux-arm64`,
14
+ `linux-x64-musl`, `linux-arm64-musl`, `windows-x64`.
15
+
16
+ The CLI provides a headless workflow engine with:
17
+
18
+ - workflow definitions with staged state machines and schema-validated fields
19
+ - append-only JSONL event storage plus projections and chronicle inspection
20
+ - project/worktree isolation and worker permission modes
21
+ - wake execution over `agent-loop` workers, including AI SDK project tools
22
+ - a Bun CLI for creating tasks, waking workers, and inspecting state
23
+
24
+ ## CLI
25
+
26
+ ```sh
27
+ bun run --filter wakespace build:cli
28
+ packages/wakespace/dist/wakespace help
29
+ ```
30
+
31
+ After install:
32
+
33
+ ```sh
34
+ wakespace help
35
+ ```
36
+
37
+ The default workspace directory is `.wakespace`. Override it with
38
+ `WAKESPACE_DIR` or the CLI `--dir` flag.
39
+
40
+ Agent-facing commands default to JSON. Use `--text` for ad-hoc human text on
41
+ commands such as `status`, `task`, `project list`, and `worker list`.
42
+
43
+ For a human-readable snapshot of projects, workers, tasks, and recent activity:
44
+
45
+ ```sh
46
+ wakespace overview
47
+ ```
48
+
49
+ ## Live Smoke
50
+
51
+ ```sh
52
+ cd packages/wakespace
53
+ DEEPSEEK_API_KEY=... bun run smoke:deepseek-tools
54
+ ```
55
+
56
+ The smoke asks a real DeepSeek-backed AI SDK worker to use project tools
57
+ (`rg`, `readFile`, and `writeFile`) and then asserts both normalized tool events
58
+ and the filesystem side effect.
59
+
60
+ ## Release
61
+
62
+ Releasing builds every platform binary, publishes each `wakespace-<platform>`
63
+ package, then publishes the `wakespace` launcher last (so its optional
64
+ dependencies already resolve). From `packages/wakespace`:
65
+
66
+ ```sh
67
+ bun run release:dry # build all platforms + npm publish --dry-run everywhere
68
+ bun run release # build all platforms + publish for real (needs npm auth)
69
+ ```
70
+
71
+ The platform matrix lives in `scripts/build-platforms.ts`; it stamps each
72
+ platform package with the launcher's version and fails if
73
+ `optionalDependencies` drift out of sync. Bump the version in both
74
+ `package.json` (version + each `optionalDependencies` entry) when cutting a
75
+ release. The root `bun run release:check` still runs the typecheck/test/build
76
+ gate plus a launcher dry-run.
77
+
78
+ ## License
79
+
80
+ MIT
package/bin/wakespace ADDED
@@ -0,0 +1,76 @@
1
+ #!/usr/bin/env node
2
+ // Cross-platform launcher. npm installs exactly one matching `wakespace-<platform>`
3
+ // package (gated by os/cpu/libc); this shim resolves its prebuilt binary and execs
4
+ // it. Falls back to a locally built `dist/wakespace` for the dev workflow.
5
+ import { spawnSync } from "node:child_process";
6
+ import { existsSync } from "node:fs";
7
+ import { dirname, join } from "node:path";
8
+ import { fileURLToPath } from "node:url";
9
+
10
+ function detectLibc() {
11
+ if (process.platform !== "linux") return null;
12
+ // glibc exposes glibcVersionRuntime in the process report header; musl does not.
13
+ try {
14
+ return process.report?.getReport?.()?.header?.glibcVersionRuntime ? "glibc" : "musl";
15
+ } catch {
16
+ return "glibc";
17
+ }
18
+ }
19
+
20
+ function platformKey() {
21
+ const { platform, arch } = process;
22
+ if (platform === "win32" && arch === "x64") return "windows-x64";
23
+ if (platform === "darwin" && arch === "arm64") return "darwin-arm64";
24
+ if (platform === "darwin" && arch === "x64") return "darwin-x64";
25
+ if (platform === "linux" && (arch === "x64" || arch === "arm64")) {
26
+ const suffix = detectLibc() === "musl" ? "-musl" : "";
27
+ return `linux-${arch}${suffix}`;
28
+ }
29
+ return null;
30
+ }
31
+
32
+ const here = dirname(fileURLToPath(import.meta.url)); // node_modules/wakespace/bin
33
+ const key = platformKey();
34
+ const binName = process.platform === "win32" ? "wakespace.exe" : "wakespace";
35
+
36
+ function resolveBinary() {
37
+ if (key) {
38
+ const spec = `wakespace-${key}/bin/${binName}`;
39
+ // Preferred: ESM resolution honours hoisting and pnpm layouts (Node >= 20.6).
40
+ if (typeof import.meta.resolve === "function") {
41
+ try {
42
+ const path = fileURLToPath(import.meta.resolve(spec));
43
+ if (existsSync(path)) return path;
44
+ } catch {
45
+ // platform package not installed — try filesystem siblings, then dev build
46
+ }
47
+ }
48
+ // Fallback for older Node: look beside / under this package in node_modules.
49
+ const candidates = [
50
+ join(here, "..", "..", `wakespace-${key}`, "bin", binName),
51
+ join(here, "..", "node_modules", `wakespace-${key}`, "bin", binName),
52
+ ];
53
+ for (const path of candidates) if (existsSync(path)) return path;
54
+ }
55
+ const local = join(here, "..", "dist", "wakespace");
56
+ return existsSync(local) ? local : null;
57
+ }
58
+
59
+ const binary = resolveBinary();
60
+ if (!binary) {
61
+ const supported =
62
+ "darwin-arm64, darwin-x64, linux-x64[-musl], linux-arm64[-musl], windows-x64";
63
+ console.error(
64
+ `wakespace: no prebuilt binary for ${process.platform}/${process.arch}` +
65
+ (key ? ` (expected package wakespace-${key})` : " (unsupported platform)") +
66
+ `.\nSupported platforms: ${supported}.`,
67
+ );
68
+ process.exit(1);
69
+ }
70
+
71
+ const result = spawnSync(binary, process.argv.slice(2), { stdio: "inherit" });
72
+ if (result.error) {
73
+ console.error(result.error.message);
74
+ process.exit(1);
75
+ }
76
+ process.exit(result.status ?? 0);
package/package.json ADDED
@@ -0,0 +1,63 @@
1
+ {
2
+ "name": "wakespace",
3
+ "version": "0.1.0",
4
+ "description": "Durable wake-loop workspace for agent-driven project development.",
5
+ "type": "module",
6
+ "bin": {
7
+ "wakespace": "bin/wakespace"
8
+ },
9
+ "files": [
10
+ "bin/wakespace",
11
+ "README.md",
12
+ "CHANGELOG.md"
13
+ ],
14
+ "scripts": {
15
+ "build": "bun run build:cli",
16
+ "build:cli": "bun build src/cli.ts --compile --outfile dist/wakespace",
17
+ "build:platforms": "bun scripts/build-platforms.ts",
18
+ "release": "bun scripts/release.ts",
19
+ "release:dry": "bun scripts/release.ts --dry-run",
20
+ "prepublishOnly": "bun run typecheck && bun run test",
21
+ "smoke:deepseek-tools": "bun smokes/smoke-deepseek-project-tools.ts",
22
+ "typecheck": "tsc -p tsconfig.json --noEmit",
23
+ "test": "bunx --bun vitest run",
24
+ "test:watch": "bunx --bun vitest"
25
+ },
26
+ "keywords": [
27
+ "agent",
28
+ "ai-agent",
29
+ "cli",
30
+ "workflow",
31
+ "workspace",
32
+ "automation"
33
+ ],
34
+ "license": "MIT",
35
+ "repository": {
36
+ "type": "git",
37
+ "url": "git+https://github.com/lidessen/wakespace.git",
38
+ "directory": "packages/wakespace"
39
+ },
40
+ "bugs": {
41
+ "url": "https://github.com/lidessen/wakespace/issues"
42
+ },
43
+ "homepage": "https://github.com/lidessen/wakespace/tree/main/packages/wakespace#readme",
44
+ "optionalDependencies": {
45
+ "wakespace-darwin-arm64": "0.1.0",
46
+ "wakespace-darwin-x64": "0.1.0",
47
+ "wakespace-linux-x64": "0.1.0",
48
+ "wakespace-linux-arm64": "0.1.0",
49
+ "wakespace-linux-x64-musl": "0.1.0",
50
+ "wakespace-linux-arm64-musl": "0.1.0",
51
+ "wakespace-windows-x64": "0.1.0"
52
+ },
53
+ "devDependencies": {
54
+ "@types/bun": "latest",
55
+ "@types/node": "^25.9.1",
56
+ "agent-loop": "workspace:*",
57
+ "typescript": "^6.0.3",
58
+ "vitest": "^4.1.7"
59
+ },
60
+ "engines": {
61
+ "node": ">=18"
62
+ }
63
+ }