@jmanuelcorral/openteam 0.1.1 → 0.1.3

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,10 @@
1
+ import { type ToolDefinition } from "@opencode-ai/plugin";
2
+ import { type CliDeps } from "../commands/dispatch";
3
+ export type CommandAction = "show" | "set" | "auto" | "doctor" | "report";
4
+ /**
5
+ * Map a tool action (+ optional model) to the argv understood by {@link runCli}.
6
+ * Pure so it can be unit-tested without the opencode runtime.
7
+ */
8
+ export declare function commandArgv(action: CommandAction, model?: string): string[];
9
+ export declare function createCommandTool(deps: CliDeps): ToolDefinition;
10
+ //# sourceMappingURL=commandTool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commandTool.d.ts","sourceRoot":"","sources":["../../src/plugin/commandTool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAQ,MAAM,qBAAqB,CAAC;AAEhE,OAAO,EAAE,KAAK,OAAO,EAAU,MAAM,sBAAsB,CAAC;AAE5D,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE1E;;;GAGG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,aAAa,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAe3E;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,OAAO,GAAG,cAAc,CAkB/D"}
@@ -0,0 +1,14 @@
1
+ import { readFile } from "node:fs/promises";
2
+ import { type CostRecord } from "./types";
3
+ export declare const DEFAULT_TELEMETRY_PATH = ".opencode/openteam-telemetry.jsonl";
4
+ /**
5
+ * Parse newline-delimited JSON cost records.
6
+ * Pure: silently skips blank lines and lines that fail schema validation,
7
+ * so a partially corrupted telemetry file never throws.
8
+ */
9
+ export declare function parseCostRecordsJsonl(text: string): CostRecord[];
10
+ export type ReadCostRecordsDeps = {
11
+ readFile?: typeof readFile;
12
+ };
13
+ export declare function readCostRecords(path: string, deps?: ReadCostRecordsDeps): Promise<CostRecord[]>;
14
+ //# sourceMappingURL=read.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"read.d.ts","sourceRoot":"","sources":["../../src/telemetry/read.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,EAAE,KAAK,UAAU,EAAoB,MAAM,SAAS,CAAC;AAE5D,eAAO,MAAM,sBAAsB,uCAAuC,CAAC;AAE3E;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,EAAE,CAuBhE;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,CAAC,EAAE,OAAO,QAAQ,CAAC;CAC5B,CAAC;AAWF,wBAAsB,eAAe,CACnC,IAAI,EAAE,MAAM,EACZ,IAAI,GAAE,mBAAwB,GAC7B,OAAO,CAAC,UAAU,EAAE,CAAC,CAYvB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jmanuelcorral/openteam",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "Plugin opencode de routing coste-consciente local-first con orquestación Squad.",
5
5
  "license": "MIT",
6
6
  "author": "Jose Manuel Corral",
@@ -32,6 +32,9 @@
32
32
  "main": "./dist/index.js",
33
33
  "module": "./dist/index.js",
34
34
  "types": "./dist/index.d.ts",
35
+ "bin": {
36
+ "openteam": "./dist/cli.js"
37
+ },
35
38
  "exports": {
36
39
  ".": {
37
40
  "types": "./dist/index.d.ts",
@@ -44,7 +47,8 @@
44
47
  "README.md",
45
48
  "LICENSE",
46
49
  "AGENTS.md",
47
- ".opencode/openteam.example.json"
50
+ ".opencode/openteam.example.json",
51
+ ".opencode/command/openteam.md"
48
52
  ],
49
53
  "publishConfig": {
50
54
  "access": "public"
@@ -52,8 +56,9 @@
52
56
  "sideEffects": false,
53
57
  "scripts": {
54
58
  "prebuild": "bun run clean",
55
- "build": "bun run build:js && bun run build:types",
59
+ "build": "bun run build:js && bun run build:cli && bun run build:types",
56
60
  "build:js": "bun build ./src/index.ts --target=node --format=esm --outfile=dist/index.js --external @opencode-ai/plugin --external @opencode-ai/sdk --external zod",
61
+ "build:cli": "bun build ./src/cli.ts --target=node --format=esm --outfile=dist/cli.js --banner \"#!/usr/bin/env node\" --external @opencode-ai/plugin --external @opencode-ai/sdk --external zod",
57
62
  "build:types": "tsc -p tsconfig.build.json",
58
63
  "clean": "node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\"",
59
64
  "test": "bun test",