@jmanuelcorral/openteam 0.1.29 → 0.1.30
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/dist/cli.js +118 -159
- package/dist/config/load.d.ts +2 -1
- package/dist/config/load.d.ts.map +1 -1
- package/dist/config/persist.d.ts +2 -6
- package/dist/config/persist.d.ts.map +1 -1
- package/dist/index.d.ts +0 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +142 -185
- package/dist/telemetry/read.d.ts +2 -5
- package/dist/telemetry/read.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
// src/cli.ts
|
|
4
4
|
import { execFile, spawn } from "node:child_process";
|
|
5
|
-
import {
|
|
6
|
-
import { dirname as dirname3, join as join3 } from "node:path";
|
|
5
|
+
import { dirname as dirname2 } from "node:path";
|
|
7
6
|
import { promisify } from "node:util";
|
|
8
7
|
|
|
9
8
|
// src/cli/consoleServe.ts
|
|
@@ -1439,6 +1438,101 @@ var OpenTeamEventSchema = z4.discriminatedUnion("type", [
|
|
|
1439
1438
|
SessionEndpointEventSchema
|
|
1440
1439
|
]);
|
|
1441
1440
|
|
|
1441
|
+
// src/storage/fsStorageProvider.ts
|
|
1442
|
+
import {
|
|
1443
|
+
appendFile,
|
|
1444
|
+
mkdir,
|
|
1445
|
+
readdir,
|
|
1446
|
+
readFile,
|
|
1447
|
+
rm,
|
|
1448
|
+
stat,
|
|
1449
|
+
writeFile
|
|
1450
|
+
} from "node:fs/promises";
|
|
1451
|
+
import { dirname, join } from "node:path";
|
|
1452
|
+
function isMissing(error) {
|
|
1453
|
+
return typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT";
|
|
1454
|
+
}
|
|
1455
|
+
function createFsStorageProvider(root) {
|
|
1456
|
+
function toDisk(path) {
|
|
1457
|
+
return join(root, ...splitVirtualPath(path));
|
|
1458
|
+
}
|
|
1459
|
+
return {
|
|
1460
|
+
async read(path) {
|
|
1461
|
+
try {
|
|
1462
|
+
return await readFile(toDisk(path), "utf8");
|
|
1463
|
+
} catch (error) {
|
|
1464
|
+
if (isMissing(error)) {
|
|
1465
|
+
return;
|
|
1466
|
+
}
|
|
1467
|
+
throw error;
|
|
1468
|
+
}
|
|
1469
|
+
},
|
|
1470
|
+
async write(path, content) {
|
|
1471
|
+
const disk = toDisk(path);
|
|
1472
|
+
await mkdir(dirname(disk), { recursive: true });
|
|
1473
|
+
await writeFile(disk, content, "utf8");
|
|
1474
|
+
},
|
|
1475
|
+
async append(path, content) {
|
|
1476
|
+
const disk = toDisk(path);
|
|
1477
|
+
await mkdir(dirname(disk), { recursive: true });
|
|
1478
|
+
await appendFile(disk, content, "utf8");
|
|
1479
|
+
},
|
|
1480
|
+
async exists(path) {
|
|
1481
|
+
try {
|
|
1482
|
+
await stat(toDisk(path));
|
|
1483
|
+
return true;
|
|
1484
|
+
} catch (error) {
|
|
1485
|
+
if (isMissing(error)) {
|
|
1486
|
+
return false;
|
|
1487
|
+
}
|
|
1488
|
+
throw error;
|
|
1489
|
+
}
|
|
1490
|
+
},
|
|
1491
|
+
async list(dir) {
|
|
1492
|
+
try {
|
|
1493
|
+
const names = await readdir(toDisk(dir));
|
|
1494
|
+
return names.sort();
|
|
1495
|
+
} catch (error) {
|
|
1496
|
+
if (isMissing(error)) {
|
|
1497
|
+
return [];
|
|
1498
|
+
}
|
|
1499
|
+
throw error;
|
|
1500
|
+
}
|
|
1501
|
+
},
|
|
1502
|
+
async isDirectory(path) {
|
|
1503
|
+
try {
|
|
1504
|
+
return (await stat(toDisk(path))).isDirectory();
|
|
1505
|
+
} catch (error) {
|
|
1506
|
+
if (isMissing(error)) {
|
|
1507
|
+
return false;
|
|
1508
|
+
}
|
|
1509
|
+
throw error;
|
|
1510
|
+
}
|
|
1511
|
+
},
|
|
1512
|
+
async mkdir(dir) {
|
|
1513
|
+
await mkdir(toDisk(dir), { recursive: true });
|
|
1514
|
+
},
|
|
1515
|
+
async delete(path) {
|
|
1516
|
+
await rm(toDisk(path), { force: true });
|
|
1517
|
+
},
|
|
1518
|
+
async stat(path) {
|
|
1519
|
+
try {
|
|
1520
|
+
const stats = await stat(toDisk(path));
|
|
1521
|
+
return {
|
|
1522
|
+
size: stats.size,
|
|
1523
|
+
mtimeMs: stats.mtimeMs,
|
|
1524
|
+
isDirectory: stats.isDirectory()
|
|
1525
|
+
};
|
|
1526
|
+
} catch (error) {
|
|
1527
|
+
if (isMissing(error)) {
|
|
1528
|
+
return;
|
|
1529
|
+
}
|
|
1530
|
+
throw error;
|
|
1531
|
+
}
|
|
1532
|
+
}
|
|
1533
|
+
};
|
|
1534
|
+
}
|
|
1535
|
+
|
|
1442
1536
|
// src/telemetry/types.ts
|
|
1443
1537
|
import { z as z5 } from "zod";
|
|
1444
1538
|
var CostRecordSchema = z5.object({
|
|
@@ -3972,22 +4066,17 @@ ${HELP}`
|
|
|
3972
4066
|
}
|
|
3973
4067
|
|
|
3974
4068
|
// src/commands/setup.ts
|
|
3975
|
-
import { join } from "node:path";
|
|
4069
|
+
import { join as join2 } from "node:path";
|
|
3976
4070
|
|
|
3977
4071
|
// src/config/persist.ts
|
|
3978
|
-
import { mkdir, writeFile } from "node:fs/promises";
|
|
3979
|
-
import { dirname } from "node:path";
|
|
3980
4072
|
var DEFAULT_CONFIG_PATH = ".opencode/openteam.json";
|
|
3981
4073
|
function serializeOpenTeamConfig(config) {
|
|
3982
4074
|
const validated = OpenTeamConfigSchema.parse(config);
|
|
3983
4075
|
return `${JSON.stringify(validated, null, 2)}
|
|
3984
4076
|
`;
|
|
3985
4077
|
}
|
|
3986
|
-
async function writeOpenTeamConfigFile(config, path = DEFAULT_CONFIG_PATH,
|
|
3987
|
-
|
|
3988
|
-
const writeFileFn = deps.writeFile ?? writeFile;
|
|
3989
|
-
await mkdirFn(dirname(path), { recursive: true });
|
|
3990
|
-
await writeFileFn(path, serializeOpenTeamConfig(config), "utf8");
|
|
4078
|
+
async function writeOpenTeamConfigFile(config, path = DEFAULT_CONFIG_PATH, storage = createFsStorageProvider(process.cwd())) {
|
|
4079
|
+
await storage.write(path, serializeOpenTeamConfig(config));
|
|
3991
4080
|
}
|
|
3992
4081
|
|
|
3993
4082
|
// src/commands/slashCommand.ts
|
|
@@ -4461,9 +4550,9 @@ async function runSetup(deps) {
|
|
|
4461
4550
|
const opencodeConfig = buildOpencodeConfig(answers);
|
|
4462
4551
|
const orchestratorAgent = buildOrchestratorAgent(frontier, { yolo });
|
|
4463
4552
|
const slashCommands = buildOpenteamCommands();
|
|
4464
|
-
const openTeamPath =
|
|
4465
|
-
const opencodePath =
|
|
4466
|
-
const agentPath =
|
|
4553
|
+
const openTeamPath = join2(deps.cwd, DEFAULT_CONFIG_PATH);
|
|
4554
|
+
const opencodePath = join2(deps.cwd, OPENCODE_CONFIG_PATH);
|
|
4555
|
+
const agentPath = join2(deps.cwd, ORCHESTRATOR_AGENT_PATH);
|
|
4467
4556
|
const existing = [];
|
|
4468
4557
|
if (await deps.fileExists(openTeamPath)) {
|
|
4469
4558
|
existing.push(DEFAULT_CONFIG_PATH);
|
|
@@ -4475,7 +4564,7 @@ async function runSetup(deps) {
|
|
|
4475
4564
|
existing.push(ORCHESTRATOR_AGENT_PATH);
|
|
4476
4565
|
}
|
|
4477
4566
|
for (const command of slashCommands) {
|
|
4478
|
-
if (await deps.fileExists(
|
|
4567
|
+
if (await deps.fileExists(join2(deps.cwd, command.path))) {
|
|
4479
4568
|
existing.push(command.path);
|
|
4480
4569
|
}
|
|
4481
4570
|
}
|
|
@@ -4493,7 +4582,7 @@ async function runSetup(deps) {
|
|
|
4493
4582
|
await deps.writeFile(opencodePath, serializeOpencodeConfig(opencodeConfig));
|
|
4494
4583
|
await deps.writeFile(agentPath, orchestratorAgent);
|
|
4495
4584
|
for (const command of slashCommands) {
|
|
4496
|
-
await deps.writeFile(
|
|
4585
|
+
await deps.writeFile(join2(deps.cwd, command.path), command.contents);
|
|
4497
4586
|
}
|
|
4498
4587
|
const enabledSummary = runtimes.filter((runtime) => runtime.enabled).map((runtime) => {
|
|
4499
4588
|
const remote = runtime.baseURL !== undefined && !runtime.baseURL.includes("localhost") && !runtime.baseURL.includes("127.0.0.1") ? ` @ ${runtime.baseURL}` : "";
|
|
@@ -4528,101 +4617,6 @@ function loadOpenTeamConfig(raw) {
|
|
|
4528
4617
|
return OpenTeamConfigSchema.parse(raw ?? {});
|
|
4529
4618
|
}
|
|
4530
4619
|
|
|
4531
|
-
// src/storage/fsStorageProvider.ts
|
|
4532
|
-
import {
|
|
4533
|
-
appendFile,
|
|
4534
|
-
mkdir as mkdir2,
|
|
4535
|
-
readdir,
|
|
4536
|
-
readFile,
|
|
4537
|
-
rm,
|
|
4538
|
-
stat,
|
|
4539
|
-
writeFile as writeFile2
|
|
4540
|
-
} from "node:fs/promises";
|
|
4541
|
-
import { dirname as dirname2, join as join2 } from "node:path";
|
|
4542
|
-
function isMissing(error) {
|
|
4543
|
-
return typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT";
|
|
4544
|
-
}
|
|
4545
|
-
function createFsStorageProvider(root) {
|
|
4546
|
-
function toDisk(path) {
|
|
4547
|
-
return join2(root, ...splitVirtualPath(path));
|
|
4548
|
-
}
|
|
4549
|
-
return {
|
|
4550
|
-
async read(path) {
|
|
4551
|
-
try {
|
|
4552
|
-
return await readFile(toDisk(path), "utf8");
|
|
4553
|
-
} catch (error) {
|
|
4554
|
-
if (isMissing(error)) {
|
|
4555
|
-
return;
|
|
4556
|
-
}
|
|
4557
|
-
throw error;
|
|
4558
|
-
}
|
|
4559
|
-
},
|
|
4560
|
-
async write(path, content) {
|
|
4561
|
-
const disk = toDisk(path);
|
|
4562
|
-
await mkdir2(dirname2(disk), { recursive: true });
|
|
4563
|
-
await writeFile2(disk, content, "utf8");
|
|
4564
|
-
},
|
|
4565
|
-
async append(path, content) {
|
|
4566
|
-
const disk = toDisk(path);
|
|
4567
|
-
await mkdir2(dirname2(disk), { recursive: true });
|
|
4568
|
-
await appendFile(disk, content, "utf8");
|
|
4569
|
-
},
|
|
4570
|
-
async exists(path) {
|
|
4571
|
-
try {
|
|
4572
|
-
await stat(toDisk(path));
|
|
4573
|
-
return true;
|
|
4574
|
-
} catch (error) {
|
|
4575
|
-
if (isMissing(error)) {
|
|
4576
|
-
return false;
|
|
4577
|
-
}
|
|
4578
|
-
throw error;
|
|
4579
|
-
}
|
|
4580
|
-
},
|
|
4581
|
-
async list(dir) {
|
|
4582
|
-
try {
|
|
4583
|
-
const names = await readdir(toDisk(dir));
|
|
4584
|
-
return names.sort();
|
|
4585
|
-
} catch (error) {
|
|
4586
|
-
if (isMissing(error)) {
|
|
4587
|
-
return [];
|
|
4588
|
-
}
|
|
4589
|
-
throw error;
|
|
4590
|
-
}
|
|
4591
|
-
},
|
|
4592
|
-
async isDirectory(path) {
|
|
4593
|
-
try {
|
|
4594
|
-
return (await stat(toDisk(path))).isDirectory();
|
|
4595
|
-
} catch (error) {
|
|
4596
|
-
if (isMissing(error)) {
|
|
4597
|
-
return false;
|
|
4598
|
-
}
|
|
4599
|
-
throw error;
|
|
4600
|
-
}
|
|
4601
|
-
},
|
|
4602
|
-
async mkdir(dir) {
|
|
4603
|
-
await mkdir2(toDisk(dir), { recursive: true });
|
|
4604
|
-
},
|
|
4605
|
-
async delete(path) {
|
|
4606
|
-
await rm(toDisk(path), { force: true });
|
|
4607
|
-
},
|
|
4608
|
-
async stat(path) {
|
|
4609
|
-
try {
|
|
4610
|
-
const stats = await stat(toDisk(path));
|
|
4611
|
-
return {
|
|
4612
|
-
size: stats.size,
|
|
4613
|
-
mtimeMs: stats.mtimeMs,
|
|
4614
|
-
isDirectory: stats.isDirectory()
|
|
4615
|
-
};
|
|
4616
|
-
} catch (error) {
|
|
4617
|
-
if (isMissing(error)) {
|
|
4618
|
-
return;
|
|
4619
|
-
}
|
|
4620
|
-
throw error;
|
|
4621
|
-
}
|
|
4622
|
-
}
|
|
4623
|
-
};
|
|
4624
|
-
}
|
|
4625
|
-
|
|
4626
4620
|
// src/web/git.ts
|
|
4627
4621
|
function createGitLastCommit(exec) {
|
|
4628
4622
|
return async () => {
|
|
@@ -4644,10 +4638,8 @@ function createGitLastCommit(exec) {
|
|
|
4644
4638
|
|
|
4645
4639
|
// src/cli.ts
|
|
4646
4640
|
var execFileAsync = promisify(execFile);
|
|
4647
|
-
var AGENT_DIR =
|
|
4648
|
-
|
|
4649
|
-
return typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT";
|
|
4650
|
-
}
|
|
4641
|
+
var AGENT_DIR = dirname2(ORCHESTRATOR_AGENT_PATH);
|
|
4642
|
+
var storage = createFsStorageProvider(process.cwd());
|
|
4651
4643
|
var nodeExec = async (command, args) => {
|
|
4652
4644
|
try {
|
|
4653
4645
|
const { stdout, stderr } = await execFileAsync(command, [...args]);
|
|
@@ -4662,17 +4654,9 @@ var nodeExec = async (command, args) => {
|
|
|
4662
4654
|
}
|
|
4663
4655
|
};
|
|
4664
4656
|
async function loadConfig(path) {
|
|
4665
|
-
|
|
4666
|
-
|
|
4667
|
-
return loadOpenTeamConfig(JSON.parse(content));
|
|
4668
|
-
} catch (error) {
|
|
4669
|
-
if (isMissingFile(error)) {
|
|
4670
|
-
return loadOpenTeamConfig({});
|
|
4671
|
-
}
|
|
4672
|
-
throw error;
|
|
4673
|
-
}
|
|
4657
|
+
const content = await storage.read(path);
|
|
4658
|
+
return content === undefined ? loadOpenTeamConfig({}) : loadOpenTeamConfig(JSON.parse(content));
|
|
4674
4659
|
}
|
|
4675
|
-
var storage = createFsStorageProvider(process.cwd());
|
|
4676
4660
|
async function openBrowser(url) {
|
|
4677
4661
|
if (process.platform === "win32") {
|
|
4678
4662
|
await nodeExec("cmd", ["/c", "start", "", url]);
|
|
@@ -4691,41 +4675,24 @@ function waitForSignal() {
|
|
|
4691
4675
|
}
|
|
4692
4676
|
var deps = {
|
|
4693
4677
|
loadConfig,
|
|
4694
|
-
saveConfig: (config, path) => writeOpenTeamConfigFile(config, path),
|
|
4678
|
+
saveConfig: (config, path) => writeOpenTeamConfigFile(config, path, storage),
|
|
4695
4679
|
readOpencodeConfig: async (path) => {
|
|
4696
|
-
|
|
4697
|
-
|
|
4698
|
-
return JSON.parse(content);
|
|
4699
|
-
} catch (error) {
|
|
4700
|
-
if (isMissingFile(error)) {
|
|
4701
|
-
return;
|
|
4702
|
-
}
|
|
4703
|
-
throw error;
|
|
4704
|
-
}
|
|
4680
|
+
const content = await storage.read(path);
|
|
4681
|
+
return content === undefined ? undefined : JSON.parse(content);
|
|
4705
4682
|
},
|
|
4706
4683
|
writeOpencodeConfig: async (config, path) => {
|
|
4707
|
-
await
|
|
4708
|
-
|
|
4709
|
-
`, "utf8");
|
|
4684
|
+
await storage.write(path, `${JSON.stringify(config, null, 2)}
|
|
4685
|
+
`);
|
|
4710
4686
|
},
|
|
4711
4687
|
writeOrchestratorAgent: async (contents, path) => {
|
|
4712
|
-
await
|
|
4713
|
-
await writeFile3(path, contents, "utf8");
|
|
4688
|
+
await storage.write(path, contents);
|
|
4714
4689
|
},
|
|
4715
4690
|
listAgentFiles: async (dir) => {
|
|
4716
|
-
|
|
4717
|
-
try {
|
|
4718
|
-
entries = await readdir2(dir);
|
|
4719
|
-
} catch (error) {
|
|
4720
|
-
if (isMissingFile(error)) {
|
|
4721
|
-
return [];
|
|
4722
|
-
}
|
|
4723
|
-
throw error;
|
|
4724
|
-
}
|
|
4691
|
+
const entries = await storage.list(dir);
|
|
4725
4692
|
const mdFiles = entries.filter((entry) => entry.endsWith(".md"));
|
|
4726
4693
|
return Promise.all(mdFiles.map(async (entry) => ({
|
|
4727
4694
|
name: entry.replace(/\.md$/, ""),
|
|
4728
|
-
contents: await
|
|
4695
|
+
contents: await storage.read(joinVirtualPath(dir, entry)) ?? ""
|
|
4729
4696
|
})));
|
|
4730
4697
|
},
|
|
4731
4698
|
probe: (config) => {
|
|
@@ -4754,17 +4721,9 @@ function createSetupDeps() {
|
|
|
4754
4721
|
loadFrontierProfiles: createLoadFrontierProfiles(),
|
|
4755
4722
|
prompt: clackPrompter,
|
|
4756
4723
|
writeFile: async (path, contents) => {
|
|
4757
|
-
await
|
|
4758
|
-
await writeFile3(path, contents, "utf8");
|
|
4724
|
+
await storage.write(path, contents);
|
|
4759
4725
|
},
|
|
4760
|
-
fileExists:
|
|
4761
|
-
try {
|
|
4762
|
-
await access(path);
|
|
4763
|
-
return true;
|
|
4764
|
-
} catch {
|
|
4765
|
-
return false;
|
|
4766
|
-
}
|
|
4767
|
-
}
|
|
4726
|
+
fileExists: (path) => storage.exists(path)
|
|
4768
4727
|
};
|
|
4769
4728
|
}
|
|
4770
4729
|
async function main() {
|
package/dist/config/load.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import type { StorageProvider } from "../storage/provider";
|
|
1
2
|
import { type OpenTeamConfig } from "./schema";
|
|
2
3
|
export declare function loadOpenTeamConfig(raw: unknown): OpenTeamConfig;
|
|
3
|
-
export declare function readOpenTeamConfigFile(path?: string): Promise<OpenTeamConfig>;
|
|
4
|
+
export declare function readOpenTeamConfigFile(path?: string, storage?: StorageProvider): Promise<OpenTeamConfig>;
|
|
4
5
|
//# sourceMappingURL=load.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load.d.ts","sourceRoot":"","sources":["../../src/config/load.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"load.d.ts","sourceRoot":"","sources":["../../src/config/load.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,KAAK,cAAc,EAAwB,MAAM,UAAU,CAAC;AAErE,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,OAAO,GAAG,cAAc,CAE/D;AAED,wBAAsB,sBAAsB,CAC1C,IAAI,SAA4B,EAChC,OAAO,GAAE,eAAwD,GAChE,OAAO,CAAC,cAAc,CAAC,CAMzB"}
|
package/dist/config/persist.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { StorageProvider } from "../storage/provider";
|
|
2
2
|
import { type OpenTeamConfig } from "./schema";
|
|
3
3
|
export declare const DEFAULT_CONFIG_PATH = ".opencode/openteam.json";
|
|
4
4
|
/**
|
|
@@ -6,9 +6,5 @@ export declare const DEFAULT_CONFIG_PATH = ".opencode/openteam.json";
|
|
|
6
6
|
* Pure: no filesystem access.
|
|
7
7
|
*/
|
|
8
8
|
export declare function serializeOpenTeamConfig(config: OpenTeamConfig): string;
|
|
9
|
-
export
|
|
10
|
-
mkdir?: typeof mkdir;
|
|
11
|
-
writeFile?: typeof writeFile;
|
|
12
|
-
};
|
|
13
|
-
export declare function writeOpenTeamConfigFile(config: OpenTeamConfig, path?: string, deps?: WriteConfigDeps): Promise<void>;
|
|
9
|
+
export declare function writeOpenTeamConfigFile(config: OpenTeamConfig, path?: string, storage?: StorageProvider): Promise<void>;
|
|
14
10
|
//# sourceMappingURL=persist.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"persist.d.ts","sourceRoot":"","sources":["../../src/config/persist.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"persist.d.ts","sourceRoot":"","sources":["../../src/config/persist.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,KAAK,cAAc,EAAwB,MAAM,UAAU,CAAC;AAErE,eAAO,MAAM,mBAAmB,4BAA4B,CAAC;AAE7D;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM,CAGtE;AAED,wBAAsB,uBAAuB,CAC3C,MAAM,EAAE,cAAc,EACtB,IAAI,SAAsB,EAC1B,OAAO,GAAE,eAAwD,GAChE,OAAO,CAAC,IAAI,CAAC,CAEf"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,21 +1,11 @@
|
|
|
1
|
-
import { appendFile, mkdir } from "node:fs/promises";
|
|
2
1
|
import type { Plugin, PluginModule } from "@opencode-ai/plugin";
|
|
3
2
|
import type { CliDeps } from "./commands/dispatch";
|
|
4
3
|
import type { OpenTeamConfig } from "./config/schema";
|
|
5
4
|
import { RuntimeRegistry } from "./local/registry";
|
|
6
5
|
import type { StorageProvider } from "./storage/provider";
|
|
7
6
|
import { type EventSink } from "./telemetry/eventLog";
|
|
8
|
-
type FileAppenderDeps = {
|
|
9
|
-
mkdir?: typeof mkdir;
|
|
10
|
-
appendFile?: typeof appendFile;
|
|
11
|
-
};
|
|
12
7
|
export declare function logAvailabilityRefreshError(error: unknown): void;
|
|
13
8
|
export declare function logTelemetryError(error: unknown): void;
|
|
14
|
-
export declare function createFileAppender(filePath: string, deps?: FileAppenderDeps): (line: string) => Promise<void>;
|
|
15
|
-
/**
|
|
16
|
-
* Crea el sink de eventos por sesión (`<sessionsDir>/<sessionID>.jsonl`). Si la
|
|
17
|
-
* telemetría está desactivada devuelve un sink no-op.
|
|
18
|
-
*/
|
|
19
9
|
export declare function createEventSink(rawOptions: unknown, storage?: StorageProvider): EventSink;
|
|
20
10
|
export declare function isMissingFile(error: unknown): boolean;
|
|
21
11
|
export declare function createCliDeps(config: OpenTeamConfig, registry: RuntimeRegistry, telemetryPath: string, sessionsDir?: string, storage?: StorageProvider): CliDeps;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAe,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAE7E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAKnD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAYnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAIL,KAAK,SAAS,EAEf,MAAM,sBAAsB,CAAC;AAqB9B,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAGhE;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAGtD;AAgCD,wBAAgB,eAAe,CAC7B,UAAU,EAAE,OAAO,EACnB,OAAO,GAAE,eAAwD,GAChE,SAAS,CAYX;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAOrD;AAED,wBAAgB,aAAa,CAC3B,MAAM,EAAE,cAAc,EACtB,QAAQ,EAAE,eAAe,EACzB,aAAa,EAAE,MAAM,EACrB,WAAW,GAAE,MAA6B,EAC1C,OAAO,GAAE,eAAwD,GAChE,OAAO,CA4CT;AAED,eAAO,MAAM,MAAM,EAAE,MA0EpB,CAAC;AAEF,QAAA,MAAM,MAAM,EAAE,YAGb,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
// src/index.ts
|
|
2
|
-
import {
|
|
3
|
-
appendFile as appendFile2,
|
|
4
|
-
mkdir as mkdir3,
|
|
5
|
-
readdir as readdir2,
|
|
6
|
-
readFile as readFile2,
|
|
7
|
-
writeFile as writeFile3
|
|
8
|
-
} from "node:fs/promises";
|
|
9
|
-
import { dirname as dirname3, join as join2 } from "node:path";
|
|
2
|
+
import { dirname as dirname2 } from "node:path";
|
|
10
3
|
|
|
11
4
|
// src/commands/orchestratorAgent.ts
|
|
12
5
|
var ORCHESTRATOR_AGENT_PATH = ".opencode/agent/openteam.md";
|
|
@@ -198,9 +191,134 @@ function buildOrchestratorAgent(frontier, options = {}) {
|
|
|
198
191
|
${body}`;
|
|
199
192
|
}
|
|
200
193
|
|
|
201
|
-
// src/
|
|
202
|
-
import {
|
|
203
|
-
|
|
194
|
+
// src/storage/fsStorageProvider.ts
|
|
195
|
+
import {
|
|
196
|
+
appendFile,
|
|
197
|
+
mkdir,
|
|
198
|
+
readdir,
|
|
199
|
+
readFile,
|
|
200
|
+
rm,
|
|
201
|
+
stat,
|
|
202
|
+
writeFile
|
|
203
|
+
} from "node:fs/promises";
|
|
204
|
+
import { dirname, join } from "node:path";
|
|
205
|
+
|
|
206
|
+
// src/storage/path.ts
|
|
207
|
+
class StoragePathError extends Error {
|
|
208
|
+
constructor(message) {
|
|
209
|
+
super(message);
|
|
210
|
+
this.name = "StoragePathError";
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
function normalizeVirtualPath(input) {
|
|
214
|
+
const segments = [];
|
|
215
|
+
for (const rawSegment of input.split(/[\\/]+/)) {
|
|
216
|
+
if (rawSegment === "" || rawSegment === ".") {
|
|
217
|
+
continue;
|
|
218
|
+
}
|
|
219
|
+
if (rawSegment === "..") {
|
|
220
|
+
if (segments.length === 0) {
|
|
221
|
+
throw new StoragePathError(`la ruta "${input}" escapa por encima de la raíz`);
|
|
222
|
+
}
|
|
223
|
+
segments.pop();
|
|
224
|
+
continue;
|
|
225
|
+
}
|
|
226
|
+
segments.push(rawSegment);
|
|
227
|
+
}
|
|
228
|
+
return segments.join("/");
|
|
229
|
+
}
|
|
230
|
+
function joinVirtualPath(...segments) {
|
|
231
|
+
return normalizeVirtualPath(segments.join("/"));
|
|
232
|
+
}
|
|
233
|
+
function splitVirtualPath(path) {
|
|
234
|
+
const normalized = normalizeVirtualPath(path);
|
|
235
|
+
return normalized === "" ? [] : normalized.split("/");
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
// src/storage/fsStorageProvider.ts
|
|
239
|
+
function isMissing(error) {
|
|
240
|
+
return typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT";
|
|
241
|
+
}
|
|
242
|
+
function createFsStorageProvider(root) {
|
|
243
|
+
function toDisk(path) {
|
|
244
|
+
return join(root, ...splitVirtualPath(path));
|
|
245
|
+
}
|
|
246
|
+
return {
|
|
247
|
+
async read(path) {
|
|
248
|
+
try {
|
|
249
|
+
return await readFile(toDisk(path), "utf8");
|
|
250
|
+
} catch (error) {
|
|
251
|
+
if (isMissing(error)) {
|
|
252
|
+
return;
|
|
253
|
+
}
|
|
254
|
+
throw error;
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
async write(path, content) {
|
|
258
|
+
const disk = toDisk(path);
|
|
259
|
+
await mkdir(dirname(disk), { recursive: true });
|
|
260
|
+
await writeFile(disk, content, "utf8");
|
|
261
|
+
},
|
|
262
|
+
async append(path, content) {
|
|
263
|
+
const disk = toDisk(path);
|
|
264
|
+
await mkdir(dirname(disk), { recursive: true });
|
|
265
|
+
await appendFile(disk, content, "utf8");
|
|
266
|
+
},
|
|
267
|
+
async exists(path) {
|
|
268
|
+
try {
|
|
269
|
+
await stat(toDisk(path));
|
|
270
|
+
return true;
|
|
271
|
+
} catch (error) {
|
|
272
|
+
if (isMissing(error)) {
|
|
273
|
+
return false;
|
|
274
|
+
}
|
|
275
|
+
throw error;
|
|
276
|
+
}
|
|
277
|
+
},
|
|
278
|
+
async list(dir) {
|
|
279
|
+
try {
|
|
280
|
+
const names = await readdir(toDisk(dir));
|
|
281
|
+
return names.sort();
|
|
282
|
+
} catch (error) {
|
|
283
|
+
if (isMissing(error)) {
|
|
284
|
+
return [];
|
|
285
|
+
}
|
|
286
|
+
throw error;
|
|
287
|
+
}
|
|
288
|
+
},
|
|
289
|
+
async isDirectory(path) {
|
|
290
|
+
try {
|
|
291
|
+
return (await stat(toDisk(path))).isDirectory();
|
|
292
|
+
} catch (error) {
|
|
293
|
+
if (isMissing(error)) {
|
|
294
|
+
return false;
|
|
295
|
+
}
|
|
296
|
+
throw error;
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
async mkdir(dir) {
|
|
300
|
+
await mkdir(toDisk(dir), { recursive: true });
|
|
301
|
+
},
|
|
302
|
+
async delete(path) {
|
|
303
|
+
await rm(toDisk(path), { force: true });
|
|
304
|
+
},
|
|
305
|
+
async stat(path) {
|
|
306
|
+
try {
|
|
307
|
+
const stats = await stat(toDisk(path));
|
|
308
|
+
return {
|
|
309
|
+
size: stats.size,
|
|
310
|
+
mtimeMs: stats.mtimeMs,
|
|
311
|
+
isDirectory: stats.isDirectory()
|
|
312
|
+
};
|
|
313
|
+
} catch (error) {
|
|
314
|
+
if (isMissing(error)) {
|
|
315
|
+
return;
|
|
316
|
+
}
|
|
317
|
+
throw error;
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
};
|
|
321
|
+
}
|
|
204
322
|
|
|
205
323
|
// src/config/schema.ts
|
|
206
324
|
import { z } from "zod";
|
|
@@ -309,11 +427,8 @@ function serializeOpenTeamConfig(config) {
|
|
|
309
427
|
return `${JSON.stringify(validated, null, 2)}
|
|
310
428
|
`;
|
|
311
429
|
}
|
|
312
|
-
async function writeOpenTeamConfigFile(config, path = DEFAULT_CONFIG_PATH,
|
|
313
|
-
|
|
314
|
-
const writeFileFn = deps.writeFile ?? writeFile;
|
|
315
|
-
await mkdirFn(dirname(path), { recursive: true });
|
|
316
|
-
await writeFileFn(path, serializeOpenTeamConfig(config), "utf8");
|
|
430
|
+
async function writeOpenTeamConfigFile(config, path = DEFAULT_CONFIG_PATH, storage = createFsStorageProvider(process.cwd())) {
|
|
431
|
+
await storage.write(path, serializeOpenTeamConfig(config));
|
|
317
432
|
}
|
|
318
433
|
|
|
319
434
|
// src/commands/setup.ts
|
|
@@ -2042,38 +2157,6 @@ function toCostRecord(decision2, context) {
|
|
|
2042
2157
|
return record;
|
|
2043
2158
|
}
|
|
2044
2159
|
|
|
2045
|
-
// src/storage/path.ts
|
|
2046
|
-
class StoragePathError extends Error {
|
|
2047
|
-
constructor(message) {
|
|
2048
|
-
super(message);
|
|
2049
|
-
this.name = "StoragePathError";
|
|
2050
|
-
}
|
|
2051
|
-
}
|
|
2052
|
-
function normalizeVirtualPath(input) {
|
|
2053
|
-
const segments = [];
|
|
2054
|
-
for (const rawSegment of input.split(/[\\/]+/)) {
|
|
2055
|
-
if (rawSegment === "" || rawSegment === ".") {
|
|
2056
|
-
continue;
|
|
2057
|
-
}
|
|
2058
|
-
if (rawSegment === "..") {
|
|
2059
|
-
if (segments.length === 0) {
|
|
2060
|
-
throw new StoragePathError(`la ruta "${input}" escapa por encima de la raíz`);
|
|
2061
|
-
}
|
|
2062
|
-
segments.pop();
|
|
2063
|
-
continue;
|
|
2064
|
-
}
|
|
2065
|
-
segments.push(rawSegment);
|
|
2066
|
-
}
|
|
2067
|
-
return segments.join("/");
|
|
2068
|
-
}
|
|
2069
|
-
function joinVirtualPath(...segments) {
|
|
2070
|
-
return normalizeVirtualPath(segments.join("/"));
|
|
2071
|
-
}
|
|
2072
|
-
function splitVirtualPath(path) {
|
|
2073
|
-
const normalized = normalizeVirtualPath(path);
|
|
2074
|
-
return normalized === "" ? [] : normalized.split("/");
|
|
2075
|
-
}
|
|
2076
|
-
|
|
2077
2160
|
// src/telemetry/types.ts
|
|
2078
2161
|
import { z as z4 } from "zod";
|
|
2079
2162
|
var CostRecordSchema = z4.object({
|
|
@@ -2365,101 +2448,6 @@ function createToolcallTracker(deps) {
|
|
|
2365
2448
|
};
|
|
2366
2449
|
}
|
|
2367
2450
|
|
|
2368
|
-
// src/storage/fsStorageProvider.ts
|
|
2369
|
-
import {
|
|
2370
|
-
appendFile,
|
|
2371
|
-
mkdir as mkdir2,
|
|
2372
|
-
readdir,
|
|
2373
|
-
readFile,
|
|
2374
|
-
rm,
|
|
2375
|
-
stat,
|
|
2376
|
-
writeFile as writeFile2
|
|
2377
|
-
} from "node:fs/promises";
|
|
2378
|
-
import { dirname as dirname2, join } from "node:path";
|
|
2379
|
-
function isMissing(error) {
|
|
2380
|
-
return typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT";
|
|
2381
|
-
}
|
|
2382
|
-
function createFsStorageProvider(root) {
|
|
2383
|
-
function toDisk(path) {
|
|
2384
|
-
return join(root, ...splitVirtualPath(path));
|
|
2385
|
-
}
|
|
2386
|
-
return {
|
|
2387
|
-
async read(path) {
|
|
2388
|
-
try {
|
|
2389
|
-
return await readFile(toDisk(path), "utf8");
|
|
2390
|
-
} catch (error) {
|
|
2391
|
-
if (isMissing(error)) {
|
|
2392
|
-
return;
|
|
2393
|
-
}
|
|
2394
|
-
throw error;
|
|
2395
|
-
}
|
|
2396
|
-
},
|
|
2397
|
-
async write(path, content) {
|
|
2398
|
-
const disk = toDisk(path);
|
|
2399
|
-
await mkdir2(dirname2(disk), { recursive: true });
|
|
2400
|
-
await writeFile2(disk, content, "utf8");
|
|
2401
|
-
},
|
|
2402
|
-
async append(path, content) {
|
|
2403
|
-
const disk = toDisk(path);
|
|
2404
|
-
await mkdir2(dirname2(disk), { recursive: true });
|
|
2405
|
-
await appendFile(disk, content, "utf8");
|
|
2406
|
-
},
|
|
2407
|
-
async exists(path) {
|
|
2408
|
-
try {
|
|
2409
|
-
await stat(toDisk(path));
|
|
2410
|
-
return true;
|
|
2411
|
-
} catch (error) {
|
|
2412
|
-
if (isMissing(error)) {
|
|
2413
|
-
return false;
|
|
2414
|
-
}
|
|
2415
|
-
throw error;
|
|
2416
|
-
}
|
|
2417
|
-
},
|
|
2418
|
-
async list(dir) {
|
|
2419
|
-
try {
|
|
2420
|
-
const names = await readdir(toDisk(dir));
|
|
2421
|
-
return names.sort();
|
|
2422
|
-
} catch (error) {
|
|
2423
|
-
if (isMissing(error)) {
|
|
2424
|
-
return [];
|
|
2425
|
-
}
|
|
2426
|
-
throw error;
|
|
2427
|
-
}
|
|
2428
|
-
},
|
|
2429
|
-
async isDirectory(path) {
|
|
2430
|
-
try {
|
|
2431
|
-
return (await stat(toDisk(path))).isDirectory();
|
|
2432
|
-
} catch (error) {
|
|
2433
|
-
if (isMissing(error)) {
|
|
2434
|
-
return false;
|
|
2435
|
-
}
|
|
2436
|
-
throw error;
|
|
2437
|
-
}
|
|
2438
|
-
},
|
|
2439
|
-
async mkdir(dir) {
|
|
2440
|
-
await mkdir2(toDisk(dir), { recursive: true });
|
|
2441
|
-
},
|
|
2442
|
-
async delete(path) {
|
|
2443
|
-
await rm(toDisk(path), { force: true });
|
|
2444
|
-
},
|
|
2445
|
-
async stat(path) {
|
|
2446
|
-
try {
|
|
2447
|
-
const stats = await stat(toDisk(path));
|
|
2448
|
-
return {
|
|
2449
|
-
size: stats.size,
|
|
2450
|
-
mtimeMs: stats.mtimeMs,
|
|
2451
|
-
isDirectory: stats.isDirectory()
|
|
2452
|
-
};
|
|
2453
|
-
} catch (error) {
|
|
2454
|
-
if (isMissing(error)) {
|
|
2455
|
-
return;
|
|
2456
|
-
}
|
|
2457
|
-
throw error;
|
|
2458
|
-
}
|
|
2459
|
-
}
|
|
2460
|
-
};
|
|
2461
|
-
}
|
|
2462
|
-
|
|
2463
2451
|
// src/index.ts
|
|
2464
2452
|
function createShellExec($) {
|
|
2465
2453
|
return async (command, args) => {
|
|
@@ -2490,14 +2478,6 @@ function telemetryOptions(rawOptions) {
|
|
|
2490
2478
|
sessionsDir: configuredSessionsDir
|
|
2491
2479
|
};
|
|
2492
2480
|
}
|
|
2493
|
-
function createFileAppender(filePath, deps = {}) {
|
|
2494
|
-
const mkdirFn = deps.mkdir ?? mkdir3;
|
|
2495
|
-
const appendFileFn = deps.appendFile ?? appendFile2;
|
|
2496
|
-
return async (line) => {
|
|
2497
|
-
await mkdirFn(dirname3(filePath), { recursive: true });
|
|
2498
|
-
await appendFileFn(filePath, line, "utf8");
|
|
2499
|
-
};
|
|
2500
|
-
}
|
|
2501
2481
|
function createEventSink(rawOptions, storage = createFsStorageProvider(process.cwd())) {
|
|
2502
2482
|
const options = telemetryOptions(rawOptions);
|
|
2503
2483
|
if (!options.enabled) {
|
|
@@ -2515,49 +2495,27 @@ function isMissingFile(error) {
|
|
|
2515
2495
|
function createCliDeps(config, registry, telemetryPath, sessionsDir = DEFAULT_SESSIONS_DIR, storage = createFsStorageProvider(process.cwd())) {
|
|
2516
2496
|
return {
|
|
2517
2497
|
loadConfig: async (path) => {
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
} catch (error) {
|
|
2521
|
-
if (isMissingFile(error)) {
|
|
2522
|
-
return config;
|
|
2523
|
-
}
|
|
2524
|
-
throw error;
|
|
2525
|
-
}
|
|
2498
|
+
const content = await storage.read(path);
|
|
2499
|
+
return content === undefined ? config : loadOpenTeamConfig(JSON.parse(content));
|
|
2526
2500
|
},
|
|
2527
|
-
saveConfig: (nextConfig, path) => writeOpenTeamConfigFile(nextConfig, path),
|
|
2501
|
+
saveConfig: (nextConfig, path) => writeOpenTeamConfigFile(nextConfig, path, storage),
|
|
2528
2502
|
readOpencodeConfig: async (path) => {
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
} catch (error) {
|
|
2532
|
-
if (isMissingFile(error)) {
|
|
2533
|
-
return;
|
|
2534
|
-
}
|
|
2535
|
-
throw error;
|
|
2536
|
-
}
|
|
2503
|
+
const content = await storage.read(path);
|
|
2504
|
+
return content === undefined ? undefined : JSON.parse(content);
|
|
2537
2505
|
},
|
|
2538
2506
|
writeOpencodeConfig: async (nextConfig, path) => {
|
|
2539
|
-
await
|
|
2540
|
-
|
|
2541
|
-
`, "utf8");
|
|
2507
|
+
await storage.write(path, `${JSON.stringify(nextConfig, null, 2)}
|
|
2508
|
+
`);
|
|
2542
2509
|
},
|
|
2543
2510
|
writeOrchestratorAgent: async (contents, path) => {
|
|
2544
|
-
await
|
|
2545
|
-
await writeFile3(path, contents, "utf8");
|
|
2511
|
+
await storage.write(path, contents);
|
|
2546
2512
|
},
|
|
2547
2513
|
listAgentFiles: async (dir) => {
|
|
2548
|
-
|
|
2549
|
-
try {
|
|
2550
|
-
entries = await readdir2(dir);
|
|
2551
|
-
} catch (error) {
|
|
2552
|
-
if (isMissingFile(error)) {
|
|
2553
|
-
return [];
|
|
2554
|
-
}
|
|
2555
|
-
throw error;
|
|
2556
|
-
}
|
|
2514
|
+
const entries = await storage.list(dir);
|
|
2557
2515
|
const mdFiles = entries.filter((entry) => entry.endsWith(".md"));
|
|
2558
2516
|
return Promise.all(mdFiles.map(async (entry) => ({
|
|
2559
2517
|
name: entry.replace(/\.md$/, ""),
|
|
2560
|
-
contents: await
|
|
2518
|
+
contents: await storage.read(joinVirtualPath(dir, entry)) ?? ""
|
|
2561
2519
|
})));
|
|
2562
2520
|
},
|
|
2563
2521
|
probe: (nextConfig) => registry.probe(nextConfig.local.runtimes),
|
|
@@ -2569,7 +2527,7 @@ function createCliDeps(config, registry, telemetryPath, sessionsDir = DEFAULT_SE
|
|
|
2569
2527
|
telemetryPath,
|
|
2570
2528
|
opencodeConfigPath: OPENCODE_CONFIG_PATH,
|
|
2571
2529
|
orchestratorAgentPath: ORCHESTRATOR_AGENT_PATH,
|
|
2572
|
-
agentDir:
|
|
2530
|
+
agentDir: dirname2(ORCHESTRATOR_AGENT_PATH)
|
|
2573
2531
|
};
|
|
2574
2532
|
}
|
|
2575
2533
|
var server = async (ctx, rawOptions) => {
|
|
@@ -2649,7 +2607,6 @@ export {
|
|
|
2649
2607
|
logAvailabilityRefreshError,
|
|
2650
2608
|
isMissingFile,
|
|
2651
2609
|
src_default as default,
|
|
2652
|
-
createFileAppender,
|
|
2653
2610
|
createEventSink,
|
|
2654
2611
|
createCliDeps
|
|
2655
2612
|
};
|
package/dist/telemetry/read.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { StorageProvider } from "../storage/provider";
|
|
2
2
|
import { type CostRecord } from "./types";
|
|
3
3
|
export declare const DEFAULT_TELEMETRY_PATH = ".opencode/openteam-telemetry.jsonl";
|
|
4
4
|
/**
|
|
@@ -7,8 +7,5 @@ export declare const DEFAULT_TELEMETRY_PATH = ".opencode/openteam-telemetry.json
|
|
|
7
7
|
* so a partially corrupted telemetry file never throws.
|
|
8
8
|
*/
|
|
9
9
|
export declare function parseCostRecordsJsonl(text: string): CostRecord[];
|
|
10
|
-
export
|
|
11
|
-
readFile?: typeof readFile;
|
|
12
|
-
};
|
|
13
|
-
export declare function readCostRecords(path: string, deps?: ReadCostRecordsDeps): Promise<CostRecord[]>;
|
|
10
|
+
export declare function readCostRecords(path: string, storage?: StorageProvider): Promise<CostRecord[]>;
|
|
14
11
|
//# sourceMappingURL=read.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read.d.ts","sourceRoot":"","sources":["../../src/telemetry/read.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"read.d.ts","sourceRoot":"","sources":["../../src/telemetry/read.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,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,wBAAsB,eAAe,CACnC,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,eAAwD,GAChE,OAAO,CAAC,UAAU,EAAE,CAAC,CAGvB"}
|