@c3-oss/prosa 0.10.1 → 0.11.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/README.md ADDED
@@ -0,0 +1,22 @@
1
+ # @c3-oss/prosa
2
+
3
+ Unified history of AI agent sessions across devices.
4
+
5
+ ```sh
6
+ npm install -g @c3-oss/prosa
7
+ prosa setup
8
+ ```
9
+
10
+ `prosa` is a small JavaScript shim that delegates to the prebuilt
11
+ Go binary matching your platform, distributed through npm
12
+ `optionalDependencies`. There is no `postinstall` download — npm
13
+ filters by `os` and `cpu` and only installs the sub-package your
14
+ machine needs.
15
+
16
+ Supported platforms:
17
+
18
+ - macOS arm64 / amd64
19
+ - Linux amd64 / arm64
20
+
21
+ Source code, documentation, and issue tracker:
22
+ <https://github.com/c3-oss/prosa>
package/bin/prosa.js ADDED
@@ -0,0 +1,45 @@
1
+ #!/usr/bin/env node
2
+ // @c3-oss/prosa CLI shim.
3
+ //
4
+ // At install time npm picks the @c3-oss/prosa-<platform>-<arch>
5
+ // optionalDependency that matches the user's machine and skips
6
+ // the others. This script resolves whichever sub-package landed
7
+ // and runs its binary as a child process with the same argv.
8
+ //
9
+ // Signals (SIGINT/SIGTERM/SIGHUP) are explicitly forwarded so a
10
+ // Ctrl+C at the npm wrapper level reaches the Go binary instead of
11
+ // leaving an orphan; the exit code or terminating signal is then
12
+ // re-raised on this process so the parent shell still sees a
13
+ // faithful exit status.
14
+
15
+ import { spawn } from "node:child_process";
16
+ import { createRequire } from "node:module";
17
+
18
+ const require = createRequire(import.meta.url);
19
+ const subpkg = `@c3-oss/prosa-${process.platform}-${process.arch}`;
20
+
21
+ let binary;
22
+ try {
23
+ binary = require.resolve(`${subpkg}/bin/prosa`);
24
+ } catch {
25
+ console.error(
26
+ `prosa: no binary for ${process.platform}/${process.arch}.\n` +
27
+ `Expected optionalDependency ${subpkg} to be installed.\n` +
28
+ `Supported platforms: darwin-arm64, darwin-amd64, linux-amd64, linux-arm64.`,
29
+ );
30
+ process.exit(1);
31
+ }
32
+
33
+ const child = spawn(binary, process.argv.slice(2), { stdio: "inherit" });
34
+
35
+ for (const sig of ["SIGINT", "SIGTERM", "SIGHUP"]) {
36
+ process.on(sig, () => child.kill(sig));
37
+ }
38
+
39
+ child.on("exit", (code, signal) => {
40
+ if (signal) {
41
+ process.kill(process.pid, signal);
42
+ } else {
43
+ process.exit(code ?? 1);
44
+ }
45
+ });
package/package.json CHANGED
@@ -1,90 +1,37 @@
1
1
  {
2
2
  "name": "@c3-oss/prosa",
3
- "version": "0.10.1",
4
- "description": "Compile, search, and export local agent session histories (Cursor, Codex, Claude Code, Gemini CLI, Hermes) into a single canonical store.",
5
- "author": "Caian Ertl <hi@caian.org>",
6
- "license": "MIT",
3
+ "version": "0.11.0",
7
4
  "type": "module",
8
- "homepage": "https://github.com/c3-oss/prosa#readme",
9
- "bugs": {
10
- "url": "https://github.com/c3-oss/prosa/issues"
11
- },
5
+ "description": "Unified history of AI agent sessions across devices",
6
+ "homepage": "https://github.com/c3-oss/prosa",
12
7
  "repository": {
13
8
  "type": "git",
14
- "url": "git+https://github.com/c3-oss/prosa.git",
15
- "directory": "apps/cli"
16
- },
17
- "files": [
18
- "dist"
19
- ],
20
- "main": "./dist/index.js",
21
- "types": "./dist/index.d.ts",
22
- "exports": {
23
- ".": {
24
- "import": "./dist/index.js",
25
- "types": "./dist/index.d.ts"
26
- }
9
+ "url": "git+https://github.com/c3-oss/prosa.git"
27
10
  },
11
+ "license": "CC0-1.0",
28
12
  "bin": {
29
- "prosa": "./dist/bin/prosa.js"
30
- },
31
- "typedocOptions": {
32
- "entryPoints": [
33
- "src/index.ts"
34
- ],
35
- "tsconfig": "tsconfig.json"
13
+ "prosa": "bin/prosa.js"
36
14
  },
37
- "publishConfig": {
38
- "access": "public",
39
- "registry": "https://registry.npmjs.org/"
40
- },
41
- "dependencies": {
42
- "@duckdb/node-api": "1.5.2-r.1",
43
- "@inkjs/ui": "^2.0.0",
44
- "@modelcontextprotocol/sdk": "^1.29.0",
45
- "@noble/hashes": "^1.7.0",
46
- "@oxdev03/node-tantivy-binding": "0.2.0",
47
- "better-sqlite3": "^12.10.0",
48
- "commander": "^12.1.0",
49
- "ink": "^7.0.1",
50
- "pino": "^10.3.1",
51
- "pino-pretty": "^13.1.3",
52
- "react": "^19.2.5",
53
- "zod": "^3.23.8",
54
- "zstd-napi": "^0.0.10",
55
- "@c3-oss/prosa-core": "^0.10.1"
56
- },
57
- "devDependencies": {
58
- "@aws-sdk/client-s3": "^3.700.0",
59
- "@c3-oss/config-biome": "^0.3.1",
60
- "@c3-oss/config-tsup": "^0.2.0",
61
- "@c3-oss/config-typescript": "^0.1.0",
62
- "@c3-oss/config-vitest": "^0.3.0",
63
- "@electric-sql/pglite": "^0.4.5",
64
- "@types/better-sqlite3": "^7.6.12",
65
- "@types/react": "^19.2.14",
66
- "fastify": "^5.0.0",
67
- "postgres": "^3.4.9",
68
- "@c3-oss/prosa-bundle-v2": "^0.2.1",
69
- "@c3-oss/prosa-api": "^0.2.1",
70
- "@c3-oss/prosa-db": "^0.2.1",
71
- "@c3-oss/prosa-db-v2": "0.2.1",
72
- "@c3-oss/prosa-sync": "^0.2.1",
73
- "@c3-oss/prosa-derived-v2": "^0.2.1",
74
- "@c3-oss/prosa-importers-v2": "^0.2.1",
75
- "@c3-oss/prosa-storage": "^0.2.1",
76
- "@c3-oss/prosa-types-v2": "0.2.1",
77
- "@c3-oss/prosa-wire-v2": "0.2.1"
78
- },
79
- "scripts": {
80
- "dev": "node --max-old-space-size=8192 --conditions=prosa-dev --import @swc-node/register/esm-register src/bin/prosa.ts",
81
- "build": "tsup",
82
- "typecheck": "tsc --noEmit",
83
- "test": "vitest run",
84
- "test:watch": "vitest",
85
- "test:coverage": "vitest run --coverage",
86
- "lint": "biome check .",
87
- "lint:fix": "biome check --fix .",
88
- "clean": "rm -rf dist coverage .turbo"
89
- }
90
- }
15
+ "files": [
16
+ "bin/prosa.js",
17
+ "README.md",
18
+ "LICENSE"
19
+ ],
20
+ "optionalDependencies": {
21
+ "@c3-oss/prosa-darwin-arm64": "0.11.0",
22
+ "@c3-oss/prosa-darwin-amd64": "0.11.0",
23
+ "@c3-oss/prosa-linux-amd64": "0.11.0",
24
+ "@c3-oss/prosa-linux-arm64": "0.11.0"
25
+ },
26
+ "engines": {
27
+ "node": ">=22"
28
+ },
29
+ "keywords": [
30
+ "ai",
31
+ "claude-code",
32
+ "codex",
33
+ "cli",
34
+ "history",
35
+ "agent"
36
+ ]
37
+ }
@@ -1 +0,0 @@
1
- #!/usr/bin/env node