opcrew 0.1.0 → 0.1.2

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.
@@ -0,0 +1,32 @@
1
+ export declare const editLogbookTool: {
2
+ description: string;
3
+ args: {
4
+ action: import("zod").ZodEnum<{
5
+ add: "add";
6
+ update: "update";
7
+ remove: "remove";
8
+ set_voyage: "set_voyage";
9
+ }>;
10
+ section: import("zod").ZodOptional<import("zod").ZodEnum<{
11
+ missions: "missions";
12
+ decisions: "decisions";
13
+ blockers: "blockers";
14
+ notes: "notes";
15
+ }>>;
16
+ id: import("zod").ZodOptional<import("zod").ZodString>;
17
+ data: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
18
+ voyage_status: import("zod").ZodOptional<import("zod").ZodEnum<{
19
+ idle: "idle";
20
+ active: "active";
21
+ blocked: "blocked";
22
+ completed: "completed";
23
+ }>>;
24
+ };
25
+ execute(args: {
26
+ action: "add" | "update" | "remove" | "set_voyage";
27
+ section?: "missions" | "decisions" | "blockers" | "notes" | undefined;
28
+ id?: string | undefined;
29
+ data?: Record<string, unknown> | undefined;
30
+ voyage_status?: "idle" | "active" | "blocked" | "completed" | undefined;
31
+ }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
32
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "opcrew",
3
3
  "description": "OpenCrew agents and OpenCode plugin",
4
- "version": "0.1.0",
4
+ "version": "0.1.2",
5
5
  "main": "./dist/opencode-plugin.js",
6
6
  "module": "./dist/opencode-plugin.js",
7
7
  "type": "module",
@@ -26,11 +26,14 @@
26
26
  },
27
27
  "types": "./dist/opencode-plugin.d.ts",
28
28
  "bin": {
29
- "opcrew": "src/cli/index.ts"
29
+ "opcrew": "./dist/cli.js"
30
30
  },
31
31
  "scripts": {
32
+ "build": "bun run build:plugin && bun run build:cli",
33
+ "build:plugin": "bun build src/opencode-plugin.ts --outdir dist --target bun",
34
+ "build:cli": "bun build src/cli/index.ts --outfile dist/cli.js --target bun",
35
+ "prepack": "bun run build",
32
36
  "test": "bun test",
33
- "build": "bun build src/opencode-plugin.ts --outdir dist --target bun",
34
37
  "build:types": "bunx tsc -p tsconfig.build.json"
35
38
  },
36
39
  "devDependencies": {
package/src/cli/index.ts DELETED
@@ -1,70 +0,0 @@
1
- #!/usr/bin/env bun
2
-
3
- import process from "node:process";
4
-
5
- import { installToTool } from "./install";
6
-
7
- const usage = `Usage:
8
- bunx opcrew install [--claude] [--opencode] [--codex]
9
-
10
- At least one flag is required.
11
- `;
12
-
13
- const FLAG_TO_TOOL = {
14
- "--claude": "claude",
15
- "--opencode": "opencode",
16
- "--codex": "codex",
17
- } as const;
18
-
19
- type SupportedFlag = keyof typeof FLAG_TO_TOOL;
20
-
21
- function showUsage(message?: string): never {
22
- if (message) {
23
- console.error(message);
24
- }
25
- console.error(usage.trimEnd());
26
- process.exit(1);
27
- }
28
-
29
- async function main() {
30
- const [subcommand, ...flags] = process.argv.slice(2);
31
-
32
- if (subcommand !== "install") {
33
- showUsage("Missing or invalid subcommand. Use 'install'.");
34
- }
35
-
36
- if (flags.length === 0) {
37
- showUsage("No install target provided.");
38
- }
39
-
40
- const selectedTools: string[] = [];
41
- const seen = new Set<string>();
42
-
43
- for (const flag of flags) {
44
- const tool = FLAG_TO_TOOL[flag as SupportedFlag];
45
-
46
- if (!tool) {
47
- showUsage(`Unknown flag: ${flag}`);
48
- }
49
-
50
- if (seen.has(tool)) {
51
- continue;
52
- }
53
-
54
- seen.add(tool);
55
- selectedTools.push(tool);
56
- }
57
-
58
- if (selectedTools.length === 0) {
59
- showUsage("No valid flags provided.");
60
- }
61
-
62
- for (const tool of selectedTools) {
63
- await installToTool(tool as "claude" | "opencode" | "codex");
64
- }
65
- }
66
-
67
- await main().catch((error) => {
68
- console.error("Installation failed:", error);
69
- process.exit(1);
70
- });