@jamesaphoenix/tx-cli 0.4.4 → 0.4.6

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/bin/tx ADDED
@@ -0,0 +1,41 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+
4
+ const { execFileSync } = require("child_process");
5
+ const { join } = require("path");
6
+
7
+ const PLATFORMS = {
8
+ "darwin-arm64": "@jamesaphoenix/tx-cli-darwin-arm64",
9
+ "darwin-x64": "@jamesaphoenix/tx-cli-darwin-x64",
10
+ "linux-x64": "@jamesaphoenix/tx-cli-linux-x64",
11
+ "linux-arm64": "@jamesaphoenix/tx-cli-linux-arm64",
12
+ };
13
+
14
+ const platformKey = `${process.platform}-${process.arch}`;
15
+ const pkg = PLATFORMS[platformKey];
16
+
17
+ if (!pkg) {
18
+ console.error(
19
+ `Error: Unsupported platform ${platformKey}.\n` +
20
+ `tx supports: ${Object.keys(PLATFORMS).join(", ")}`
21
+ );
22
+ process.exit(1);
23
+ }
24
+
25
+ let binPath;
26
+ try {
27
+ binPath = join(require.resolve(`${pkg}/package.json`), "..", "tx");
28
+ } catch {
29
+ console.error(
30
+ `Error: Platform package ${pkg} is not installed.\n` +
31
+ `Try reinstalling: npm install -g @jamesaphoenix/tx-cli`
32
+ );
33
+ process.exit(1);
34
+ }
35
+
36
+ try {
37
+ execFileSync(binPath, process.argv.slice(2), { stdio: "inherit" });
38
+ } catch (e) {
39
+ if (e.status !== undefined) process.exit(e.status);
40
+ throw e;
41
+ }
package/dist/cli.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env node
1
+ #!/usr/bin/env bun
2
2
  /**
3
3
  * TX CLI - Task management for AI agents and humans
4
4
  *
package/dist/cli.js CHANGED
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env node
1
+ #!/usr/bin/env bun
2
2
  /**
3
3
  * TX CLI - Task management for AI agents and humans
4
4
  *
@@ -4,6 +4,6 @@
4
4
  import { Effect } from "effect";
5
5
  import { AttemptService, TaskService } from "@jamesaphoenix/tx-core";
6
6
  import { type Flags } from "../utils/parse.js";
7
- export declare const tryAttempt: (pos: string[], flags: Flags) => Effect.Effect<void, import("@jamesaphoenix/tx-core").DatabaseError | import("@jamesaphoenix/tx-core").ValidationError | import("@jamesaphoenix/tx-core").TaskNotFoundError, AttemptService>;
7
+ export declare const tryAttempt: (pos: string[], flags: Flags) => Effect.Effect<void, import("@jamesaphoenix/tx-core").ValidationError | import("@jamesaphoenix/tx-core").DatabaseError | import("@jamesaphoenix/tx-core").TaskNotFoundError, AttemptService>;
8
8
  export declare const attempts: (pos: string[], flags: Flags) => Effect.Effect<void, import("@jamesaphoenix/tx-core").DatabaseError | import("@jamesaphoenix/tx-core").TaskNotFoundError, TaskService | AttemptService>;
9
9
  //# sourceMappingURL=attempt.d.ts.map
@@ -4,6 +4,6 @@
4
4
  import { Effect } from "effect";
5
5
  import { TaskService, DependencyService } from "@jamesaphoenix/tx-core";
6
6
  import { type Flags } from "../utils/parse.js";
7
- export declare const block: (pos: string[], flags: Flags) => Effect.Effect<void, import("@jamesaphoenix/tx-core").DatabaseError | import("@jamesaphoenix/tx-core").ValidationError | import("@jamesaphoenix/tx-core").TaskNotFoundError | import("@jamesaphoenix/tx-core").CircularDependencyError, TaskService | DependencyService>;
7
+ export declare const block: (pos: string[], flags: Flags) => Effect.Effect<void, import("@jamesaphoenix/tx-core").ValidationError | import("@jamesaphoenix/tx-core").DatabaseError | import("@jamesaphoenix/tx-core").TaskNotFoundError | import("@jamesaphoenix/tx-core").CircularDependencyError, TaskService | DependencyService>;
8
8
  export declare const unblock: (pos: string[], flags: Flags) => Effect.Effect<void, import("@jamesaphoenix/tx-core").DatabaseError | import("@jamesaphoenix/tx-core").TaskNotFoundError | import("@jamesaphoenix/tx-core").DependencyNotFoundError, TaskService | DependencyService>;
9
9
  //# sourceMappingURL=dep.d.ts.map
@@ -6,5 +6,5 @@ import { Effect } from "effect";
6
6
  import { DocService } from "@jamesaphoenix/tx-core";
7
7
  import { type Flags } from "../utils/parse.js";
8
8
  /** Dispatch doc subcommands. */
9
- export declare const doc: (pos: string[], flags: Flags) => Effect.Effect<void, import("@jamesaphoenix/tx-core").DatabaseError | import("@jamesaphoenix/tx-core").DocNotFoundError | import("@jamesaphoenix/tx-core").InvalidDocYamlError | import("@jamesaphoenix/tx-core").ValidationError, DocService>;
9
+ export declare const doc: (pos: string[], flags: Flags) => Effect.Effect<void, import("@jamesaphoenix/tx-core").ValidationError | import("@jamesaphoenix/tx-core").DatabaseError | import("@jamesaphoenix/tx-core").InvalidDocYamlError | import("@jamesaphoenix/tx-core").DocNotFoundError, DocService>;
10
10
  //# sourceMappingURL=doc.d.ts.map
@@ -4,6 +4,6 @@
4
4
  import { Effect } from "effect";
5
5
  import { SqliteClient, MigrationService } from "@jamesaphoenix/tx-core";
6
6
  type Flags = Record<string, string | boolean>;
7
- export declare const doctor: (_pos: string[], flags: Flags) => Effect.Effect<void, import("@jamesaphoenix/tx-core").DatabaseError, SqliteClient | MigrationService>;
7
+ export declare const doctor: (_pos: string[], flags: Flags) => Effect.Effect<void, import("@jamesaphoenix/tx-core").DatabaseError, MigrationService | SqliteClient>;
8
8
  export {};
9
9
  //# sourceMappingURL=doctor.d.ts.map
@@ -5,5 +5,5 @@ import { Effect } from "effect";
5
5
  import { DocService } from "@jamesaphoenix/tx-core";
6
6
  import { type Flags } from "../utils/parse.js";
7
7
  /** Dispatch invariant subcommands. */
8
- export declare const invariant: (pos: string[], flags: Flags) => Effect.Effect<void, import("@jamesaphoenix/tx-core").DatabaseError | import("@jamesaphoenix/tx-core").InvariantNotFoundError, DocService> | Effect.Effect<void, import("@jamesaphoenix/tx-core").DatabaseError | import("@jamesaphoenix/tx-core").DocNotFoundError | import("@jamesaphoenix/tx-core").InvalidDocYamlError, DocService>;
8
+ export declare const invariant: (pos: string[], flags: Flags) => Effect.Effect<void, import("@jamesaphoenix/tx-core").DatabaseError | import("@jamesaphoenix/tx-core").InvalidDocYamlError | import("@jamesaphoenix/tx-core").DocNotFoundError, DocService> | Effect.Effect<void, import("@jamesaphoenix/tx-core").DatabaseError | import("@jamesaphoenix/tx-core").InvariantNotFoundError, DocService>;
9
9
  //# sourceMappingURL=invariant.d.ts.map
@@ -4,12 +4,12 @@
4
4
  import { Effect } from "effect";
5
5
  import { LearningService, FileLearningService, TaskService, RetrievalError } from "@jamesaphoenix/tx-core";
6
6
  import { type Flags } from "../utils/parse.js";
7
- export declare const learningAdd: (pos: string[], flags: Flags) => Effect.Effect<void, import("@jamesaphoenix/tx-core").DatabaseError | import("@jamesaphoenix/tx-core").ValidationError, LearningService>;
7
+ export declare const learningAdd: (pos: string[], flags: Flags) => Effect.Effect<void, import("@jamesaphoenix/tx-core").ValidationError | import("@jamesaphoenix/tx-core").DatabaseError, LearningService>;
8
8
  export declare const learningSearch: (pos: string[], flags: Flags) => Effect.Effect<void, import("@jamesaphoenix/tx-core").DatabaseError | RetrievalError | import("@jamesaphoenix/tx-core").EmbeddingDimensionMismatchError, LearningService>;
9
9
  export declare const learningRecent: (_pos: string[], flags: Flags) => Effect.Effect<void, import("@jamesaphoenix/tx-core").DatabaseError, LearningService>;
10
- export declare const learningHelpful: (pos: string[], flags: Flags) => Effect.Effect<void, import("@jamesaphoenix/tx-core").DatabaseError | import("@jamesaphoenix/tx-core").ValidationError | import("@jamesaphoenix/tx-core").LearningNotFoundError, LearningService>;
10
+ export declare const learningHelpful: (pos: string[], flags: Flags) => Effect.Effect<void, import("@jamesaphoenix/tx-core").ValidationError | import("@jamesaphoenix/tx-core").DatabaseError | import("@jamesaphoenix/tx-core").LearningNotFoundError, LearningService>;
11
11
  export declare const context: (pos: string[], flags: Flags) => Effect.Effect<void, import("@jamesaphoenix/tx-core").DatabaseError | import("@jamesaphoenix/tx-core").TaskNotFoundError | RetrievalError | import("@jamesaphoenix/tx-core").EmbeddingDimensionMismatchError, TaskService | LearningService>;
12
- export declare const learn: (pos: string[], flags: Flags) => Effect.Effect<void, import("@jamesaphoenix/tx-core").DatabaseError | import("@jamesaphoenix/tx-core").ValidationError, FileLearningService>;
12
+ export declare const learn: (pos: string[], flags: Flags) => Effect.Effect<void, import("@jamesaphoenix/tx-core").ValidationError | import("@jamesaphoenix/tx-core").DatabaseError, FileLearningService>;
13
13
  export declare const recall: (pos: string[], flags: Flags) => Effect.Effect<void, import("@jamesaphoenix/tx-core").DatabaseError, FileLearningService>;
14
14
  export declare const learningEmbed: (_pos: string[], flags: Flags) => Effect.Effect<void, import("@jamesaphoenix/tx-core").DatabaseError, LearningService>;
15
15
  export declare const learningHelp: (subcommand: string) => Effect.Effect<void, never, never>;
@@ -4,5 +4,5 @@
4
4
  import { Effect } from "effect";
5
5
  import { SyncService } from "@jamesaphoenix/tx-core";
6
6
  import { type Flags } from "../utils/parse.js";
7
- export declare const sync: (pos: string[], flags: Flags) => Effect.Effect<void, import("@jamesaphoenix/tx-core").DatabaseError | import("@jamesaphoenix/tx-core").ValidationError | import("@jamesaphoenix/tx-core").TaskNotFoundError, import("@jamesaphoenix/tx-core").TaskService | SyncService>;
7
+ export declare const sync: (pos: string[], flags: Flags) => Effect.Effect<void, import("@jamesaphoenix/tx-core").ValidationError | import("@jamesaphoenix/tx-core").DatabaseError | import("@jamesaphoenix/tx-core").TaskNotFoundError, import("@jamesaphoenix/tx-core").TaskService | SyncService>;
8
8
  //# sourceMappingURL=sync.d.ts.map
@@ -4,12 +4,12 @@
4
4
  import { Effect } from "effect";
5
5
  import { TaskService, ReadyService, AttemptService } from "@jamesaphoenix/tx-core";
6
6
  import { type Flags } from "../utils/parse.js";
7
- export declare const add: (pos: string[], flags: Flags) => Effect.Effect<void, import("@jamesaphoenix/tx-core").DatabaseError | import("@jamesaphoenix/tx-core").ValidationError | import("@jamesaphoenix/tx-core").TaskNotFoundError, TaskService>;
7
+ export declare const add: (pos: string[], flags: Flags) => Effect.Effect<void, import("@jamesaphoenix/tx-core").ValidationError | import("@jamesaphoenix/tx-core").DatabaseError | import("@jamesaphoenix/tx-core").TaskNotFoundError, TaskService>;
8
8
  export declare const list: (_pos: string[], flags: Flags) => Effect.Effect<void, import("@jamesaphoenix/tx-core").DatabaseError, TaskService>;
9
9
  export declare const ready: (_pos: string[], flags: Flags) => Effect.Effect<void, import("@jamesaphoenix/tx-core").DatabaseError, ReadyService | AttemptService>;
10
10
  export declare const show: (pos: string[], flags: Flags) => Effect.Effect<void, import("@jamesaphoenix/tx-core").DatabaseError | import("@jamesaphoenix/tx-core").TaskNotFoundError, TaskService | AttemptService>;
11
- export declare const update: (pos: string[], flags: Flags) => Effect.Effect<void, import("@jamesaphoenix/tx-core").DatabaseError | import("@jamesaphoenix/tx-core").ValidationError | import("@jamesaphoenix/tx-core").TaskNotFoundError | import("@jamesaphoenix/tx-core").StaleDataError, TaskService>;
12
- export declare const done: (pos: string[], flags: Flags) => Effect.Effect<void, import("@jamesaphoenix/tx-core").DatabaseError | import("@jamesaphoenix/tx-core").ValidationError | import("@jamesaphoenix/tx-core").TaskNotFoundError | import("@jamesaphoenix/tx-core").StaleDataError, TaskService | ReadyService>;
11
+ export declare const update: (pos: string[], flags: Flags) => Effect.Effect<void, import("@jamesaphoenix/tx-core").ValidationError | import("@jamesaphoenix/tx-core").DatabaseError | import("@jamesaphoenix/tx-core").TaskNotFoundError | import("@jamesaphoenix/tx-core").StaleDataError, TaskService>;
12
+ export declare const done: (pos: string[], flags: Flags) => Effect.Effect<void, import("@jamesaphoenix/tx-core").ValidationError | import("@jamesaphoenix/tx-core").DatabaseError | import("@jamesaphoenix/tx-core").TaskNotFoundError | import("@jamesaphoenix/tx-core").StaleDataError, TaskService | ReadyService>;
13
13
  export declare const deleteTask: (pos: string[], flags: Flags) => Effect.Effect<void, import("@jamesaphoenix/tx-core").DatabaseError | import("@jamesaphoenix/tx-core").TaskNotFoundError | import("@jamesaphoenix/tx-core").HasChildrenError, TaskService>;
14
- export declare const reset: (pos: string[], flags: Flags) => Effect.Effect<void, import("@jamesaphoenix/tx-core").DatabaseError | import("@jamesaphoenix/tx-core").ValidationError | import("@jamesaphoenix/tx-core").TaskNotFoundError | import("@jamesaphoenix/tx-core").StaleDataError, TaskService>;
14
+ export declare const reset: (pos: string[], flags: Flags) => Effect.Effect<void, import("@jamesaphoenix/tx-core").ValidationError | import("@jamesaphoenix/tx-core").DatabaseError | import("@jamesaphoenix/tx-core").TaskNotFoundError | import("@jamesaphoenix/tx-core").StaleDataError, TaskService>;
15
15
  //# sourceMappingURL=task.d.ts.map
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@jamesaphoenix/tx-cli",
3
- "version": "0.4.4",
3
+ "version": "0.4.6",
4
4
  "description": "TX command line tool - task management for AI agents and humans",
5
5
  "type": "module",
6
6
  "main": "./dist/cli.js",
7
7
  "types": "./dist/cli.d.ts",
8
8
  "bin": {
9
- "tx": "./dist/cli.js"
9
+ "tx": "./bin/tx"
10
10
  },
11
11
  "exports": {
12
12
  ".": {
@@ -15,6 +15,7 @@
15
15
  }
16
16
  },
17
17
  "files": [
18
+ "bin",
18
19
  "dist",
19
20
  "!dist/tx",
20
21
  "!dist/tx-*",
@@ -28,11 +29,7 @@
28
29
  "scripts": {
29
30
  "build": "tsc -b",
30
31
  "build:binary": "bun build ./src/cli.ts --compile --outfile dist/tx --minify --external @anthropic-ai/sdk --external openai --external node-llama-cpp --external @node-llama-cpp/*",
31
- "build:darwin-arm64": "bun build ./src/cli.ts --compile --outfile dist/tx-darwin-arm64 --target bun-darwin-arm64 --minify --external @anthropic-ai/sdk --external openai --external node-llama-cpp --external @node-llama-cpp/*",
32
- "build:darwin-x64": "bun build ./src/cli.ts --compile --outfile dist/tx-darwin-x64 --target bun-darwin-x64 --minify --external @anthropic-ai/sdk --external openai --external node-llama-cpp --external @node-llama-cpp/*",
33
- "build:linux-x64": "bun build ./src/cli.ts --compile --outfile dist/tx-linux-x64 --target bun-linux-x64 --minify --external @anthropic-ai/sdk --external openai --external node-llama-cpp --external @node-llama-cpp/*",
34
- "build:linux-arm64": "bun build ./src/cli.ts --compile --outfile dist/tx-linux-arm64 --target bun-linux-arm64 --minify --external @anthropic-ai/sdk --external openai --external node-llama-cpp --external @node-llama-cpp/*",
35
- "build:all": "bun run build:darwin-arm64 && bun run build:darwin-x64 && bun run build:linux-x64 && bun run build:linux-arm64",
32
+ "build:platforms": "bun build ./src/cli.ts --compile --outfile npm/darwin-arm64/tx --target bun-darwin-arm64 --minify --external @anthropic-ai/sdk --external openai --external node-llama-cpp --external '@node-llama-cpp/*' && bun build ./src/cli.ts --compile --outfile npm/darwin-x64/tx --target bun-darwin-x64 --minify --external @anthropic-ai/sdk --external openai --external node-llama-cpp --external '@node-llama-cpp/*' && bun build ./src/cli.ts --compile --outfile npm/linux-x64/tx --target bun-linux-x64 --minify --external @anthropic-ai/sdk --external openai --external node-llama-cpp --external '@node-llama-cpp/*' && bun build ./src/cli.ts --compile --outfile npm/linux-arm64/tx --target bun-linux-arm64 --minify --external @anthropic-ai/sdk --external openai --external node-llama-cpp --external '@node-llama-cpp/*'",
36
33
  "typecheck": "tsc --noEmit",
37
34
  "lint": "eslint src/",
38
35
  "test": "bun vitest run --passWithNoTests"
@@ -42,6 +39,12 @@
42
39
  "@jamesaphoenix/tx-types": "*",
43
40
  "effect": "^3.19.15"
44
41
  },
42
+ "optionalDependencies": {
43
+ "@jamesaphoenix/tx-cli-darwin-arm64": "0.4.5",
44
+ "@jamesaphoenix/tx-cli-darwin-x64": "0.4.5",
45
+ "@jamesaphoenix/tx-cli-linux-x64": "0.4.5",
46
+ "@jamesaphoenix/tx-cli-linux-arm64": "0.4.5"
47
+ },
45
48
  "peerDependencies": {
46
49
  "@modelcontextprotocol/sdk": "^1.25.3"
47
50
  },