@kl-c/matrixos 0.2.9 → 0.2.10
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/index.js +146 -96
- package/dist/cli/slash-commands/adopt.md +11 -0
- package/dist/cli/slash-commands/features.md +12 -0
- package/dist/cli/slash-commands/matrix-gateway-adopt-telegram.md +10 -0
- package/dist/cli/slash-commands/matrix.md +10 -0
- package/dist/cli/slash-commands/readopt.md +8 -0
- package/dist/cli-node/index.js +146 -96
- package/dist/index.js +3 -2
- package/package.json +3 -2
package/dist/cli/index.js
CHANGED
|
@@ -2163,7 +2163,7 @@ var package_default;
|
|
|
2163
2163
|
var init_package = __esm(() => {
|
|
2164
2164
|
package_default = {
|
|
2165
2165
|
name: "@kl-c/matrixos",
|
|
2166
|
-
version: "0.2.
|
|
2166
|
+
version: "0.2.10",
|
|
2167
2167
|
description: "MaTrixOS \u2014 Agentic OS for OpenCode. Personalizable, communicating, self-improving, resilient.",
|
|
2168
2168
|
main: "./dist/index.js",
|
|
2169
2169
|
types: "dist/index.d.ts",
|
|
@@ -2265,7 +2265,8 @@ var init_package = __esm(() => {
|
|
|
2265
2265
|
"typecheck:packages": "tsgo --noEmit -p packages/rules-engine/tsconfig.json && tsgo --noEmit -p packages/delegate-core/tsconfig.json && tsgo --noEmit -p packages/mcp-stdio-core/tsconfig.json && tsgo --noEmit -p packages/mcp-client-core/tsconfig.json && tsgo --noEmit -p packages/git-bash-mcp/tsconfig.json && tsgo --noEmit -p packages/lsp-core/tsconfig.json && tsgo --noEmit -p packages/utils/tsconfig.json && tsgo --noEmit -p packages/model-core/tsconfig.json && tsgo --noEmit -p packages/omo-config-core/tsconfig.json && tsgo --noEmit -p packages/prompts-core/tsconfig.json && tsgo --noEmit -p packages/comment-checker-core/tsconfig.json && tsgo --noEmit -p packages/hashline-core/tsconfig.json && tsgo --noEmit -p packages/tmux-core/tsconfig.json && tsgo --noEmit -p packages/team-core/tsconfig.json && tsgo --noEmit -p packages/matrix-gateway-core/tsconfig.json && tsgo --noEmit -p packages/boulder-state/tsconfig.json && tsgo --noEmit -p packages/learning-loop/tsconfig.json && tsgo --noEmit -p packages/telemetry-core/tsconfig.json && tsgo --noEmit -p packages/claude-code-compat-core/tsconfig.json && tsgo --noEmit -p packages/skills-loader-core/tsconfig.json && tsgo --noEmit -p packages/agents-md-core/tsconfig.json && tsgo --noEmit -p packages/task-ledger-core/tsconfig.json && tsgo --noEmit -p packages/egress-core/tsconfig.json && tsgo --noEmit -p packages/http-server-core/tsconfig.json && tsgo --noEmit -p packages/webhook-core/tsconfig.json && tsgo --noEmit -p packages/daily-brief-core/tsconfig.json && tsgo --noEmit -p packages/omo-opencode/tsconfig.json",
|
|
2266
2266
|
"typecheck:script": "tsgo --noEmit -p script/tsconfig.json",
|
|
2267
2267
|
test: "bun test",
|
|
2268
|
-
"build:git-bash-mcp": "bun run --cwd packages/git-bash-mcp build"
|
|
2268
|
+
"build:git-bash-mcp": "bun run --cwd packages/git-bash-mcp build",
|
|
2269
|
+
"build:slash-commands": "rm -rf dist/cli/slash-commands && mkdir -p dist/cli/slash-commands && cp packages/omo-opencode/src/cli/slash-commands/*.md dist/cli/slash-commands/"
|
|
2269
2270
|
},
|
|
2270
2271
|
keywords: [
|
|
2271
2272
|
"opencode",
|
|
@@ -67683,16 +67684,39 @@ var init_add_tui_plugin_to_tui_config = __esm(() => {
|
|
|
67683
67684
|
});
|
|
67684
67685
|
|
|
67685
67686
|
// packages/omo-opencode/src/cli/slash-command-installer.ts
|
|
67686
|
-
import {
|
|
67687
|
-
|
|
67687
|
+
import {
|
|
67688
|
+
existsSync as existsSync26,
|
|
67689
|
+
mkdirSync as mkdirSync9,
|
|
67690
|
+
copyFileSync as copyFileSync3,
|
|
67691
|
+
symlinkSync,
|
|
67692
|
+
readlinkSync,
|
|
67693
|
+
readdirSync as readdirSync4,
|
|
67694
|
+
unlinkSync as unlinkSync5
|
|
67695
|
+
} from "fs";
|
|
67696
|
+
import { dirname as dirname9, join as join25 } from "path";
|
|
67688
67697
|
import { homedir as homedir6 } from "os";
|
|
67698
|
+
function findSlashCommandSource() {
|
|
67699
|
+
const candidates = [
|
|
67700
|
+
join25(import.meta.dir, "slash-commands"),
|
|
67701
|
+
join25(import.meta.dir, "..", "slash-commands"),
|
|
67702
|
+
join25(import.meta.dir, "..", "..", "src", "cli", "slash-commands")
|
|
67703
|
+
];
|
|
67704
|
+
for (const c of candidates) {
|
|
67705
|
+
if (existsSync26(c) && existsSync26(join25(c, "adopt.md")))
|
|
67706
|
+
return c;
|
|
67707
|
+
}
|
|
67708
|
+
return null;
|
|
67709
|
+
}
|
|
67689
67710
|
function copySlashCommandsTo(dir) {
|
|
67690
67711
|
try {
|
|
67691
67712
|
if (!existsSync26(dir))
|
|
67692
67713
|
mkdirSync9(dir, { recursive: true });
|
|
67714
|
+
const srcDir = findSlashCommandSource();
|
|
67715
|
+
if (!srcDir)
|
|
67716
|
+
return 0;
|
|
67693
67717
|
let copied = 0;
|
|
67694
67718
|
for (const name2 of SLASH_COMMAND_NAMES) {
|
|
67695
|
-
const src = join25(
|
|
67719
|
+
const src = join25(srcDir, name2);
|
|
67696
67720
|
if (!existsSync26(src))
|
|
67697
67721
|
continue;
|
|
67698
67722
|
copyFileSync3(src, join25(dir, name2));
|
|
@@ -67714,6 +67738,30 @@ function resolveMatrixosBin() {
|
|
|
67714
67738
|
}
|
|
67715
67739
|
return null;
|
|
67716
67740
|
}
|
|
67741
|
+
function copyRecursive(from, to) {
|
|
67742
|
+
if (!existsSync26(to))
|
|
67743
|
+
mkdirSync9(to, { recursive: true });
|
|
67744
|
+
for (const entry of readdirSync4(from, { withFileTypes: true })) {
|
|
67745
|
+
const src = join25(from, entry.name);
|
|
67746
|
+
const dst = join25(to, entry.name);
|
|
67747
|
+
if (entry.isDirectory()) {
|
|
67748
|
+
copyRecursive(src, dst);
|
|
67749
|
+
} else {
|
|
67750
|
+
copyFileSync3(src, dst);
|
|
67751
|
+
}
|
|
67752
|
+
}
|
|
67753
|
+
}
|
|
67754
|
+
function installPackageTo(path7, bin) {
|
|
67755
|
+
const srcDir = dirname9(dirname9(bin));
|
|
67756
|
+
if (!existsSync26(srcDir))
|
|
67757
|
+
return null;
|
|
67758
|
+
try {
|
|
67759
|
+
copyRecursive(srcDir, path7);
|
|
67760
|
+
return join25(path7, "bin", "matrixos.js");
|
|
67761
|
+
} catch {
|
|
67762
|
+
return null;
|
|
67763
|
+
}
|
|
67764
|
+
}
|
|
67717
67765
|
function installSlashCommandsAndPath() {
|
|
67718
67766
|
const home = homedir6();
|
|
67719
67767
|
const targets = [
|
|
@@ -67724,23 +67772,25 @@ function installSlashCommandsAndPath() {
|
|
|
67724
67772
|
for (const t of targets)
|
|
67725
67773
|
total += copySlashCommandsTo(t);
|
|
67726
67774
|
let pathLinked = false;
|
|
67727
|
-
const
|
|
67775
|
+
const liveBin = resolveMatrixosBin();
|
|
67728
67776
|
const linkPath = "/usr/local/bin/matrixos";
|
|
67729
|
-
|
|
67777
|
+
const persistentDir = "/usr/local/lib/matrixos";
|
|
67778
|
+
if (liveBin) {
|
|
67730
67779
|
try {
|
|
67780
|
+
const target = installPackageTo(persistentDir, liveBin) ?? liveBin;
|
|
67731
67781
|
if (existsSync26(linkPath)) {
|
|
67732
67782
|
try {
|
|
67733
67783
|
const cur = readlinkSync(linkPath);
|
|
67734
|
-
if (cur
|
|
67735
|
-
|
|
67736
|
-
|
|
67784
|
+
if (cur === target) {
|
|
67785
|
+
pathLinked = true;
|
|
67786
|
+
return { commands: total, pathLinked };
|
|
67737
67787
|
}
|
|
67738
|
-
} catch {
|
|
67739
|
-
|
|
67740
|
-
|
|
67741
|
-
|
|
67742
|
-
symlinkSync(bin, linkPath);
|
|
67788
|
+
} catch {}
|
|
67789
|
+
try {
|
|
67790
|
+
unlinkSync5(linkPath);
|
|
67791
|
+
} catch {}
|
|
67743
67792
|
}
|
|
67793
|
+
symlinkSync(target, linkPath);
|
|
67744
67794
|
pathLinked = true;
|
|
67745
67795
|
} catch {
|
|
67746
67796
|
pathLinked = false;
|
|
@@ -102636,7 +102686,7 @@ var require_Util = __commonJS((exports, module2) => {
|
|
|
102636
102686
|
await client3.rest.patch(route, { body: updatedItems, reason });
|
|
102637
102687
|
return updatedItems;
|
|
102638
102688
|
}
|
|
102639
|
-
function
|
|
102689
|
+
function basename6(path7, ext) {
|
|
102640
102690
|
const res = parse7(path7);
|
|
102641
102691
|
return ext && res.ext.startsWith(ext) ? res.name : res.base.split("?")[0];
|
|
102642
102692
|
}
|
|
@@ -102759,7 +102809,7 @@ var require_Util = __commonJS((exports, module2) => {
|
|
|
102759
102809
|
resolveColor,
|
|
102760
102810
|
discordSort,
|
|
102761
102811
|
setPosition,
|
|
102762
|
-
basename:
|
|
102812
|
+
basename: basename6,
|
|
102763
102813
|
cleanContent,
|
|
102764
102814
|
cleanCodeBlockContent,
|
|
102765
102815
|
parseWebhookURL,
|
|
@@ -115580,7 +115630,7 @@ var require_MessagePayload = __commonJS((exports, module2) => {
|
|
|
115580
115630
|
var { DiscordjsError, DiscordjsRangeError, ErrorCodes } = require_errors();
|
|
115581
115631
|
var { resolveFile } = require_DataResolver();
|
|
115582
115632
|
var MessageFlagsBitField = require_MessageFlagsBitField();
|
|
115583
|
-
var { basename:
|
|
115633
|
+
var { basename: basename6, verifyString, resolvePartialEmoji } = require_Util();
|
|
115584
115634
|
var getBaseInteraction = lazy2(() => require_BaseInteraction());
|
|
115585
115635
|
|
|
115586
115636
|
class MessagePayload {
|
|
@@ -115765,10 +115815,10 @@ var require_MessagePayload = __commonJS((exports, module2) => {
|
|
|
115765
115815
|
let name2;
|
|
115766
115816
|
const findName = (thing) => {
|
|
115767
115817
|
if (typeof thing === "string") {
|
|
115768
|
-
return
|
|
115818
|
+
return basename6(thing);
|
|
115769
115819
|
}
|
|
115770
115820
|
if (thing.path) {
|
|
115771
|
-
return
|
|
115821
|
+
return basename6(thing.path);
|
|
115772
115822
|
}
|
|
115773
115823
|
return "file.jpg";
|
|
115774
115824
|
};
|
|
@@ -128146,7 +128196,7 @@ var require_EmbedBuilder = __commonJS((exports, module2) => {
|
|
|
128146
128196
|
|
|
128147
128197
|
// node_modules/.bun/discord.js@14.27.0/node_modules/discord.js/src/structures/AttachmentBuilder.js
|
|
128148
128198
|
var require_AttachmentBuilder = __commonJS((exports, module2) => {
|
|
128149
|
-
var { basename:
|
|
128199
|
+
var { basename: basename6, flatten } = require_Util();
|
|
128150
128200
|
|
|
128151
128201
|
class AttachmentBuilder {
|
|
128152
128202
|
constructor(attachment, data = {}) {
|
|
@@ -128194,7 +128244,7 @@ var require_AttachmentBuilder = __commonJS((exports, module2) => {
|
|
|
128194
128244
|
return this;
|
|
128195
128245
|
}
|
|
128196
128246
|
get spoiler() {
|
|
128197
|
-
return
|
|
128247
|
+
return basename6(this.name).startsWith("SPOILER_");
|
|
128198
128248
|
}
|
|
128199
128249
|
toJSON() {
|
|
128200
128250
|
return flatten(this);
|
|
@@ -128963,7 +129013,7 @@ var init_writer2 = __esm(() => {
|
|
|
128963
129013
|
|
|
128964
129014
|
// packages/omo-config-core/src/generator/mini-os-generator.ts
|
|
128965
129015
|
import { existsSync as existsSync29, mkdirSync as mkdirSync11, writeFileSync as writeFileSync8 } from "fs";
|
|
128966
|
-
import { dirname as
|
|
129016
|
+
import { dirname as dirname10, join as join28 } from "path";
|
|
128967
129017
|
function generateMiniOS(options) {
|
|
128968
129018
|
const fs6 = options.fs ?? defaultFS;
|
|
128969
129019
|
const profile2 = options.profile;
|
|
@@ -129031,7 +129081,7 @@ _Skill required by the ${displayName} profile. Implementation goes here._
|
|
|
129031
129081
|
function writeIfMissing(fs6, path7, content) {
|
|
129032
129082
|
if (fs6.existsSync(path7))
|
|
129033
129083
|
return;
|
|
129034
|
-
const dir =
|
|
129084
|
+
const dir = dirname10(path7);
|
|
129035
129085
|
if (!fs6.existsSync(dir)) {
|
|
129036
129086
|
fs6.mkdirSync(dir, { recursive: true });
|
|
129037
129087
|
}
|
|
@@ -129885,19 +129935,19 @@ var init_update_toasts = __esm(() => {
|
|
|
129885
129935
|
|
|
129886
129936
|
// packages/omo-opencode/src/hooks/auto-update-checker/hook/background-update-check.ts
|
|
129887
129937
|
import { existsSync as existsSync45 } from "fs";
|
|
129888
|
-
import { dirname as
|
|
129938
|
+
import { dirname as dirname18, join as join40 } from "path";
|
|
129889
129939
|
import { fileURLToPath as fileURLToPath4 } from "url";
|
|
129890
129940
|
function defaultGetModuleHostingWorkspace() {
|
|
129891
129941
|
try {
|
|
129892
|
-
const currentDir =
|
|
129942
|
+
const currentDir = dirname18(fileURLToPath4(import.meta.url));
|
|
129893
129943
|
const pkgJsonPath = findPackageJsonUp(currentDir);
|
|
129894
129944
|
if (!pkgJsonPath)
|
|
129895
129945
|
return null;
|
|
129896
|
-
const pkgDir =
|
|
129897
|
-
const nodeModulesDir =
|
|
129946
|
+
const pkgDir = dirname18(pkgJsonPath);
|
|
129947
|
+
const nodeModulesDir = dirname18(pkgDir);
|
|
129898
129948
|
if (nodeModulesDir.split(/[\\/]/).pop() !== "node_modules")
|
|
129899
129949
|
return null;
|
|
129900
|
-
return
|
|
129950
|
+
return dirname18(nodeModulesDir);
|
|
129901
129951
|
} catch (error51) {
|
|
129902
129952
|
if (error51 instanceof Error) {
|
|
129903
129953
|
return null;
|
|
@@ -164870,7 +164920,7 @@ __export(exports_generate, {
|
|
|
164870
164920
|
ProfileNotFoundError: () => ProfileNotFoundError
|
|
164871
164921
|
});
|
|
164872
164922
|
import { existsSync as existsSync72, readFileSync as readFileSync57, realpathSync as realpathSync10 } from "fs";
|
|
164873
|
-
import { dirname as
|
|
164923
|
+
import { dirname as dirname29, isAbsolute as isAbsolute6, join as join77, resolve as resolve16 } from "path";
|
|
164874
164924
|
function profilesDirFor(opts) {
|
|
164875
164925
|
if (opts.profilesDir)
|
|
164876
164926
|
return opts.profilesDir;
|
|
@@ -164966,7 +165016,7 @@ var REPO_ROOT, defaultFS2, PROFILES_RELATIVE = "assets/profiles", ProfileNotFoun
|
|
|
164966
165016
|
var init_generate = __esm(() => {
|
|
164967
165017
|
init_src5();
|
|
164968
165018
|
init_src5();
|
|
164969
|
-
REPO_ROOT = resolve16(
|
|
165019
|
+
REPO_ROOT = resolve16(dirname29(new URL(import.meta.url).pathname), "..", "..", "..", "..", "..");
|
|
164970
165020
|
defaultFS2 = { existsSync: existsSync72, readFileSync: readFileSync57, realpathSync: realpathSync10 };
|
|
164971
165021
|
ProfileNotFoundError = class ProfileNotFoundError extends Error {
|
|
164972
165022
|
profileName;
|
|
@@ -165221,8 +165271,8 @@ var exports_profile_resolve = {};
|
|
|
165221
165271
|
__export(exports_profile_resolve, {
|
|
165222
165272
|
executeProfileResolveCommand: () => executeProfileResolveCommand
|
|
165223
165273
|
});
|
|
165224
|
-
import { existsSync as existsSync74, readdirSync as
|
|
165225
|
-
import { join as join80, resolve as resolve17, dirname as
|
|
165274
|
+
import { existsSync as existsSync74, readdirSync as readdirSync16, readFileSync as readFileSync58 } from "fs";
|
|
165275
|
+
import { join as join80, resolve as resolve17, dirname as dirname30 } from "path";
|
|
165226
165276
|
function executeProfileResolveCommand(args) {
|
|
165227
165277
|
if (args.options.help) {
|
|
165228
165278
|
return {
|
|
@@ -165254,7 +165304,7 @@ function executeProfileResolveCommand(args) {
|
|
|
165254
165304
|
}
|
|
165255
165305
|
let profileFiles;
|
|
165256
165306
|
try {
|
|
165257
|
-
profileFiles =
|
|
165307
|
+
profileFiles = readdirSync16(profilesDir).filter((f2) => f2.endsWith(".json"));
|
|
165258
165308
|
} catch (err) {
|
|
165259
165309
|
const message = err instanceof Error ? err.message : String(err);
|
|
165260
165310
|
return { exitCode: 1, stdout: `error: failed to read profiles directory: ${message}
|
|
@@ -165320,7 +165370,7 @@ function executeProfileResolveCommand(args) {
|
|
|
165320
165370
|
var REPO_ROOT2, PROFILES_RELATIVE2 = "assets/profiles";
|
|
165321
165371
|
var init_profile_resolve = __esm(() => {
|
|
165322
165372
|
init_src5();
|
|
165323
|
-
REPO_ROOT2 = resolve17(
|
|
165373
|
+
REPO_ROOT2 = resolve17(dirname30(new URL(import.meta.url).pathname), "..", "..", "..", "..");
|
|
165324
165374
|
});
|
|
165325
165375
|
|
|
165326
165376
|
// packages/omo-opencode/src/cli/export.ts
|
|
@@ -165331,7 +165381,7 @@ __export(exports_export, {
|
|
|
165331
165381
|
executeExportCommand: () => executeExportCommand
|
|
165332
165382
|
});
|
|
165333
165383
|
import { existsSync as existsSync75, readFileSync as readFileSync59, writeFileSync as writeFileSync26, copyFileSync as copyFileSync8, realpathSync as realpathSync11, mkdirSync as mkdirSync27 } from "fs";
|
|
165334
|
-
import { isAbsolute as isAbsolute7, join as join81, resolve as resolve18, dirname as
|
|
165384
|
+
import { isAbsolute as isAbsolute7, join as join81, resolve as resolve18, dirname as dirname31 } from "path";
|
|
165335
165385
|
import { spawnSync as spawnSync3 } from "child_process";
|
|
165336
165386
|
function setShell(shell) {
|
|
165337
165387
|
activeShell = shell;
|
|
@@ -165416,7 +165466,7 @@ ${packResult.stdout}
|
|
|
165416
165466
|
if (args.options.output) {
|
|
165417
165467
|
const outputPath = args.options.output;
|
|
165418
165468
|
const absoluteOutput = isAbsolute7(outputPath) ? outputPath : resolve18(process.cwd(), outputPath);
|
|
165419
|
-
const outputDir =
|
|
165469
|
+
const outputDir = dirname31(absoluteOutput);
|
|
165420
165470
|
if (!fs24.existsSync(outputDir)) {
|
|
165421
165471
|
fs24.mkdirSync(outputDir, { recursive: true });
|
|
165422
165472
|
}
|
|
@@ -165643,7 +165693,7 @@ __export(exports_project_memory, {
|
|
|
165643
165693
|
isProjectEpisode: () => isProjectEpisode,
|
|
165644
165694
|
addKbDocument: () => addKbDocument
|
|
165645
165695
|
});
|
|
165646
|
-
import { existsSync as existsSync77, mkdirSync as mkdirSync29, readFileSync as readFileSync61, readdirSync as
|
|
165696
|
+
import { existsSync as existsSync77, mkdirSync as mkdirSync29, readFileSync as readFileSync61, readdirSync as readdirSync17, writeFileSync as writeFileSync28 } from "fs";
|
|
165647
165697
|
import { join as join83 } from "path";
|
|
165648
165698
|
function tagWithProject(metadata = {}, projectSlug, cwd) {
|
|
165649
165699
|
const active = projectSlug ?? getActiveProject(cwd)?.slug;
|
|
@@ -165662,7 +165712,7 @@ function listKbDocuments(projectSlug, cwd) {
|
|
|
165662
165712
|
if (!existsSync77(kbDir))
|
|
165663
165713
|
return [];
|
|
165664
165714
|
const docs = [];
|
|
165665
|
-
for (const entry of
|
|
165715
|
+
for (const entry of readdirSync17(kbDir, { withFileTypes: true })) {
|
|
165666
165716
|
if (!entry.isFile())
|
|
165667
165717
|
continue;
|
|
165668
165718
|
const path29 = join83(kbDir, entry.name);
|
|
@@ -166564,7 +166614,7 @@ var init_deployment = __esm(() => {
|
|
|
166564
166614
|
});
|
|
166565
166615
|
|
|
166566
166616
|
// packages/omo-opencode/src/audit/self-audit.ts
|
|
166567
|
-
import { existsSync as existsSync80, mkdirSync as mkdirSync30, readdirSync as
|
|
166617
|
+
import { existsSync as existsSync80, mkdirSync as mkdirSync30, readdirSync as readdirSync18, readFileSync as readFileSync63, writeFileSync as writeFileSync29 } from "fs";
|
|
166568
166618
|
import { join as join84 } from "path";
|
|
166569
166619
|
function getAuditDir(cwd = process.cwd()) {
|
|
166570
166620
|
return join84(cwd, ".matrixos", "audits");
|
|
@@ -168767,7 +168817,7 @@ var import_picocolors11 = __toESM(require_picocolors(), 1);
|
|
|
168767
168817
|
// packages/omo-opencode/src/cli/run/opencode-binary-resolver.ts
|
|
168768
168818
|
init_bun_which_shim();
|
|
168769
168819
|
init_spawn_with_windows_hide();
|
|
168770
|
-
import { delimiter as delimiter2, dirname as
|
|
168820
|
+
import { delimiter as delimiter2, dirname as dirname12, posix as posix3, win32 as win324 } from "path";
|
|
168771
168821
|
var OPENCODE_COMMANDS = ["opencode", "opencode-desktop"];
|
|
168772
168822
|
var WINDOWS_SUFFIXES = ["", ".exe", ".cmd", ".bat", ".ps1"];
|
|
168773
168823
|
function getCommandCandidates(platform) {
|
|
@@ -168825,7 +168875,7 @@ async function findWorkingOpencodeBinary(pathEnv = process.env.PATH, probe2 = ca
|
|
|
168825
168875
|
return null;
|
|
168826
168876
|
}
|
|
168827
168877
|
function buildPathWithBinaryFirst(pathEnv, binaryPath) {
|
|
168828
|
-
const preferredDir =
|
|
168878
|
+
const preferredDir = dirname12(binaryPath);
|
|
168829
168879
|
const existing = (pathEnv ?? "").split(delimiter2).filter((entry) => entry.length > 0 && entry !== preferredDir);
|
|
168830
168880
|
return [preferredDir, ...existing].join(delimiter2);
|
|
168831
168881
|
}
|
|
@@ -169297,7 +169347,7 @@ function resolveBoulderPlanPathForWork(directory, work) {
|
|
|
169297
169347
|
return resolveBoulderPlanPath(directory, work);
|
|
169298
169348
|
}
|
|
169299
169349
|
// packages/boulder-state/src/storage/plan-progress.ts
|
|
169300
|
-
import { existsSync as existsSync34, readFileSync as readFileSync19, readdirSync as
|
|
169350
|
+
import { existsSync as existsSync34, readFileSync as readFileSync19, readdirSync as readdirSync5, statSync as statSync5 } from "fs";
|
|
169301
169351
|
var TODO_HEADING_PATTERN2 = /^##\s+TODOs\b/i;
|
|
169302
169352
|
var FINAL_VERIFICATION_HEADING_PATTERN2 = /^##\s+Final Verification Wave\b/i;
|
|
169303
169353
|
var SECOND_LEVEL_HEADING_PATTERN2 = /^##\s+/;
|
|
@@ -169574,7 +169624,7 @@ async function isSessionInBoulderLineage(input) {
|
|
|
169574
169624
|
// packages/omo-opencode/src/hooks/the-operator/session-last-agent.ts
|
|
169575
169625
|
init_shared();
|
|
169576
169626
|
init_compaction_marker();
|
|
169577
|
-
import { readFileSync as readFileSync22, readdirSync as
|
|
169627
|
+
import { readFileSync as readFileSync22, readdirSync as readdirSync6 } from "fs";
|
|
169578
169628
|
import { join as join32 } from "path";
|
|
169579
169629
|
var defaultSessionLastAgentDeps = {
|
|
169580
169630
|
getMessageDir,
|
|
@@ -169633,7 +169683,7 @@ async function getLastAgentFromSession(sessionID, client3, deps = {}) {
|
|
|
169633
169683
|
if (!messageDir)
|
|
169634
169684
|
return null;
|
|
169635
169685
|
try {
|
|
169636
|
-
const messages =
|
|
169686
|
+
const messages = readdirSync6(messageDir).filter((fileName) => fileName.endsWith(".json")).map((fileName) => {
|
|
169637
169687
|
try {
|
|
169638
169688
|
const content = readFileSync22(join32(messageDir, fileName), "utf-8");
|
|
169639
169689
|
const parsed = JSON.parse(content);
|
|
@@ -169678,8 +169728,8 @@ init_agent_display_names();
|
|
|
169678
169728
|
|
|
169679
169729
|
// packages/omo-opencode/src/hooks/ralph-loop/storage.ts
|
|
169680
169730
|
init_frontmatter2();
|
|
169681
|
-
import { existsSync as existsSync37, readFileSync as readFileSync23, writeFileSync as writeFileSync10, unlinkSync as
|
|
169682
|
-
import { dirname as
|
|
169731
|
+
import { existsSync as existsSync37, readFileSync as readFileSync23, writeFileSync as writeFileSync10, unlinkSync as unlinkSync6, mkdirSync as mkdirSync13 } from "fs";
|
|
169732
|
+
import { dirname as dirname13, join as join33 } from "path";
|
|
169683
169733
|
|
|
169684
169734
|
// packages/omo-opencode/src/hooks/ralph-loop/constants.ts
|
|
169685
169735
|
var DEFAULT_STATE_FILE = ".omo/ralph-loop.local.md";
|
|
@@ -170272,7 +170322,7 @@ function createTimestampedStdoutController(stdout2 = process.stdout) {
|
|
|
170272
170322
|
init_atomic_write();
|
|
170273
170323
|
init_xdg_data_dir();
|
|
170274
170324
|
import { existsSync as existsSync38, mkdirSync as mkdirSync14, readFileSync as readFileSync24 } from "fs";
|
|
170275
|
-
import { basename as
|
|
170325
|
+
import { basename as basename7, join as join34 } from "path";
|
|
170276
170326
|
var POSTHOG_ACTIVITY_STATE_FILE = "posthog-activity.json";
|
|
170277
170327
|
function resolveTelemetryStateDir(product, options = {}) {
|
|
170278
170328
|
const dataDir = resolveXdgDataDir(product.cacheDirName, {
|
|
@@ -170280,7 +170330,7 @@ function resolveTelemetryStateDir(product, options = {}) {
|
|
|
170280
170330
|
osProvider: options.osProvider
|
|
170281
170331
|
});
|
|
170282
170332
|
const xdgStateDir = options.env?.XDG_DATA_HOME === undefined ? undefined : join34(options.env.XDG_DATA_HOME, product.cacheDirName);
|
|
170283
|
-
if (dataDir === xdgStateDir || xdgStateDir === undefined &&
|
|
170333
|
+
if (dataDir === xdgStateDir || xdgStateDir === undefined && basename7(dataDir) === product.cacheDirName) {
|
|
170284
170334
|
return dataDir;
|
|
170285
170335
|
}
|
|
170286
170336
|
return join34(dataDir, product.cacheDirName);
|
|
@@ -170399,7 +170449,7 @@ function getTelemetryDistinctId(machineIdPrefix, osProvider = getDefaultTelemetr
|
|
|
170399
170449
|
}
|
|
170400
170450
|
|
|
170401
170451
|
// node_modules/.bun/posthog-node@5.45.2/node_modules/posthog-node/dist/extensions/error-tracking/modifiers/module.node.mjs
|
|
170402
|
-
import { dirname as
|
|
170452
|
+
import { dirname as dirname14, posix as posix4, sep } from "path";
|
|
170403
170453
|
function createModulerModifier() {
|
|
170404
170454
|
const getModuleFromFileName = createGetModuleFromFilename();
|
|
170405
170455
|
return async (frames) => {
|
|
@@ -170408,7 +170458,7 @@ function createModulerModifier() {
|
|
|
170408
170458
|
return frames;
|
|
170409
170459
|
};
|
|
170410
170460
|
}
|
|
170411
|
-
function createGetModuleFromFilename(basePath = process.argv[1] ?
|
|
170461
|
+
function createGetModuleFromFilename(basePath = process.argv[1] ? dirname14(process.argv[1]) : process.cwd(), isWindows = sep === "\\") {
|
|
170412
170462
|
const normalizedBase = isWindows ? normalizeWindowsPath(basePath) : basePath;
|
|
170413
170463
|
return (filename) => {
|
|
170414
170464
|
if (!filename)
|
|
@@ -177730,7 +177780,7 @@ init_auto_update_checker();
|
|
|
177730
177780
|
init_package_json_locator();
|
|
177731
177781
|
init_constants5();
|
|
177732
177782
|
init_shared();
|
|
177733
|
-
import { existsSync as existsSync48, readFileSync as readFileSync33, readdirSync as
|
|
177783
|
+
import { existsSync as existsSync48, readFileSync as readFileSync33, readdirSync as readdirSync8 } from "fs";
|
|
177734
177784
|
import { createRequire as createRequire2 } from "module";
|
|
177735
177785
|
import { homedir as homedir13 } from "os";
|
|
177736
177786
|
import { join as join42 } from "path";
|
|
@@ -177787,7 +177837,7 @@ function createTaggedInstallCandidates(rootDir) {
|
|
|
177787
177837
|
if (!existsSync48(packagesDir))
|
|
177788
177838
|
return [];
|
|
177789
177839
|
const candidates = [];
|
|
177790
|
-
for (const entryName of
|
|
177840
|
+
for (const entryName of readdirSync8(packagesDir).sort()) {
|
|
177791
177841
|
const packageName = ACCEPTED_PACKAGE_NAMES.find((name2) => entryName.startsWith(`${name2}@`));
|
|
177792
177842
|
if (packageName === undefined)
|
|
177793
177843
|
continue;
|
|
@@ -178042,7 +178092,7 @@ async function checkSystem(deps = defaultDeps6) {
|
|
|
178042
178092
|
init_src();
|
|
178043
178093
|
import { readFileSync as readFileSync35 } from "fs";
|
|
178044
178094
|
import { homedir as homedir14 } from "os";
|
|
178045
|
-
import { dirname as
|
|
178095
|
+
import { dirname as dirname19, relative as relative5 } from "path";
|
|
178046
178096
|
init_shared();
|
|
178047
178097
|
init_plugin_identity();
|
|
178048
178098
|
function resolveHomeDirectory2() {
|
|
@@ -178066,7 +178116,7 @@ function discoverProjectLayersNearestFirst(directory) {
|
|
|
178066
178116
|
const stopDirectory = containsPath(homeDirectory, directory) ? homeDirectory : directory;
|
|
178067
178117
|
return findProjectOpencodePluginConfigFiles(directory, stopDirectory).map((configPath) => ({
|
|
178068
178118
|
path: configPath,
|
|
178069
|
-
configDir:
|
|
178119
|
+
configDir: dirname19(configPath)
|
|
178070
178120
|
}));
|
|
178071
178121
|
}
|
|
178072
178122
|
function shortPath(configPath) {
|
|
@@ -178090,7 +178140,7 @@ function parseLayerConfig(configPath) {
|
|
|
178090
178140
|
if (!isPlainRecord(rawConfig)) {
|
|
178091
178141
|
return {
|
|
178092
178142
|
path: configPath,
|
|
178093
|
-
configDir:
|
|
178143
|
+
configDir: dirname19(configPath),
|
|
178094
178144
|
config: null,
|
|
178095
178145
|
messages: [`${shortPath(configPath)}: <root>: Expected object`]
|
|
178096
178146
|
};
|
|
@@ -178098,7 +178148,7 @@ function parseLayerConfig(configPath) {
|
|
|
178098
178148
|
const result = OhMyOpenCodeConfigSchema.safeParse(rawConfig);
|
|
178099
178149
|
return {
|
|
178100
178150
|
path: configPath,
|
|
178101
|
-
configDir:
|
|
178151
|
+
configDir: dirname19(configPath),
|
|
178102
178152
|
config: result.success ? result.data : parseConfigPartially(rawConfig),
|
|
178103
178153
|
messages: schemaMessages(configPath, rawConfig)
|
|
178104
178154
|
};
|
|
@@ -178108,7 +178158,7 @@ function parseLayerConfig(configPath) {
|
|
|
178108
178158
|
}
|
|
178109
178159
|
return {
|
|
178110
178160
|
path: configPath,
|
|
178111
|
-
configDir:
|
|
178161
|
+
configDir: dirname19(configPath),
|
|
178112
178162
|
config: null,
|
|
178113
178163
|
messages: [`${shortPath(configPath)}: ${error51.message}`]
|
|
178114
178164
|
};
|
|
@@ -178589,7 +178639,7 @@ init_src();
|
|
|
178589
178639
|
import { existsSync as existsSync51 } from "fs";
|
|
178590
178640
|
import { createRequire as createRequire3 } from "module";
|
|
178591
178641
|
import { homedir as homedir17 } from "os";
|
|
178592
|
-
import { dirname as
|
|
178642
|
+
import { dirname as dirname20, join as join47 } from "path";
|
|
178593
178643
|
|
|
178594
178644
|
// packages/omo-opencode/src/hooks/comment-checker/downloader.ts
|
|
178595
178645
|
import { join as join46 } from "path";
|
|
@@ -178686,7 +178736,7 @@ function findCommentCheckerPackageBinary(baseDirOverride, resolvePackageJsonPath
|
|
|
178686
178736
|
const binaryName = process.platform === "win32" ? "comment-checker.exe" : "comment-checker";
|
|
178687
178737
|
const platformKey = `${process.platform}-${process.arch === "x64" ? "x64" : process.arch}`;
|
|
178688
178738
|
try {
|
|
178689
|
-
const packageDir = baseDirOverride ??
|
|
178739
|
+
const packageDir = baseDirOverride ?? dirname20(resolvePackageJsonPath());
|
|
178690
178740
|
const vendorPath = join47(packageDir, "vendor", platformKey, binaryName);
|
|
178691
178741
|
if (existsSync51(vendorPath))
|
|
178692
178742
|
return vendorPath;
|
|
@@ -178842,7 +178892,7 @@ import { join as join48 } from "path";
|
|
|
178842
178892
|
init_zod();
|
|
178843
178893
|
init_opencode_config_dir();
|
|
178844
178894
|
import { existsSync as existsSync52, readFileSync as readFileSync38 } from "fs";
|
|
178845
|
-
import { delimiter as delimiter3, dirname as
|
|
178895
|
+
import { delimiter as delimiter3, dirname as dirname21, resolve as resolve10 } from "path";
|
|
178846
178896
|
import { fileURLToPath as fileURLToPath6 } from "url";
|
|
178847
178897
|
|
|
178848
178898
|
// packages/omo-opencode/src/mcp/cli-suffix.ts
|
|
@@ -178855,7 +178905,7 @@ function hasCliSuffix(candidatePath, suffix) {
|
|
|
178855
178905
|
|
|
178856
178906
|
// packages/omo-opencode/src/mcp/runtime-executable.ts
|
|
178857
178907
|
init_bun_which_shim();
|
|
178858
|
-
import { basename as
|
|
178908
|
+
import { basename as basename8 } from "path";
|
|
178859
178909
|
var NODE_EXECUTABLE_NAMES = new Set(["node", "node.exe"]);
|
|
178860
178910
|
function isUnsafeCommandName2(commandName) {
|
|
178861
178911
|
if (commandName.length === 0)
|
|
@@ -178871,7 +178921,7 @@ function isUnsafeCommandName2(commandName) {
|
|
|
178871
178921
|
return false;
|
|
178872
178922
|
}
|
|
178873
178923
|
function isNodeExecPath(execPath) {
|
|
178874
|
-
return NODE_EXECUTABLE_NAMES.has(
|
|
178924
|
+
return NODE_EXECUTABLE_NAMES.has(basename8(execPath).toLowerCase());
|
|
178875
178925
|
}
|
|
178876
178926
|
function resolveRuntimeExecutable(commandName, options = {}) {
|
|
178877
178927
|
if (isUnsafeCommandName2(commandName)) {
|
|
@@ -178973,7 +179023,7 @@ var LSP_BOOTSTRAP_SCRIPT = [
|
|
|
178973
179023
|
].join(";");
|
|
178974
179024
|
function getModuleDirectory(moduleUrl) {
|
|
178975
179025
|
try {
|
|
178976
|
-
return
|
|
179026
|
+
return dirname21(fileURLToPath6(moduleUrl));
|
|
178977
179027
|
} catch (error51) {
|
|
178978
179028
|
if (!(error51 instanceof Error))
|
|
178979
179029
|
throw error51;
|
|
@@ -179808,13 +179858,13 @@ import {
|
|
|
179808
179858
|
chmodSync as chmodSync6,
|
|
179809
179859
|
existsSync as existsSync57,
|
|
179810
179860
|
mkdirSync as mkdirSync16,
|
|
179811
|
-
readdirSync as
|
|
179861
|
+
readdirSync as readdirSync9,
|
|
179812
179862
|
readFileSync as readFileSync44,
|
|
179813
179863
|
renameSync as renameSync7,
|
|
179814
|
-
unlinkSync as
|
|
179864
|
+
unlinkSync as unlinkSync9,
|
|
179815
179865
|
writeFileSync as writeFileSync14
|
|
179816
179866
|
} from "fs";
|
|
179817
|
-
import { basename as
|
|
179867
|
+
import { basename as basename9, dirname as dirname22, join as join52 } from "path";
|
|
179818
179868
|
|
|
179819
179869
|
// packages/mcp-client-core/src/config-dir.ts
|
|
179820
179870
|
import { existsSync as existsSync55, realpathSync as realpathSync7 } from "fs";
|
|
@@ -179998,7 +180048,7 @@ function readLegacyStore() {
|
|
|
179998
180048
|
}
|
|
179999
180049
|
function writeTokenFile(filePath, token) {
|
|
180000
180050
|
try {
|
|
180001
|
-
const dir =
|
|
180051
|
+
const dir = dirname22(filePath);
|
|
180002
180052
|
if (!existsSync57(dir)) {
|
|
180003
180053
|
mkdirSync16(dir, { recursive: true });
|
|
180004
180054
|
}
|
|
@@ -180026,7 +180076,7 @@ function deleteToken(serverHost, resource) {
|
|
|
180026
180076
|
if (!existsSync57(filePath))
|
|
180027
180077
|
return deleteLegacyToken(serverHost, resource);
|
|
180028
180078
|
try {
|
|
180029
|
-
|
|
180079
|
+
unlinkSync9(filePath);
|
|
180030
180080
|
return deleteTokenIndexEntry(getMcpOauthStorageDir(), getMcpOauthServerHash(serverHost, resource));
|
|
180031
180081
|
} catch (deleteError) {
|
|
180032
180082
|
if (!(deleteError instanceof Error))
|
|
@@ -180046,7 +180096,7 @@ function deleteLegacyToken(serverHost, resource) {
|
|
|
180046
180096
|
try {
|
|
180047
180097
|
const filePath = getLegacyStoragePath();
|
|
180048
180098
|
if (existsSync57(filePath))
|
|
180049
|
-
|
|
180099
|
+
unlinkSync9(filePath);
|
|
180050
180100
|
return true;
|
|
180051
180101
|
} catch (deleteError) {
|
|
180052
180102
|
if (!(deleteError instanceof Error))
|
|
@@ -180095,11 +180145,11 @@ function listAllTokens() {
|
|
|
180095
180145
|
if (!existsSync57(dir))
|
|
180096
180146
|
return result;
|
|
180097
180147
|
const index = readTokenIndex(dir);
|
|
180098
|
-
for (const entry of
|
|
180148
|
+
for (const entry of readdirSync9(dir, { withFileTypes: true })) {
|
|
180099
180149
|
if (!entry.isFile() || !entry.name.endsWith(".json") || entry.name === "index.json")
|
|
180100
180150
|
continue;
|
|
180101
180151
|
const token = readTokenFile(join52(dir, entry.name));
|
|
180102
|
-
const hash2 =
|
|
180152
|
+
const hash2 = basename9(entry.name, ".json");
|
|
180103
180153
|
if (token)
|
|
180104
180154
|
result[index[hash2] ?? hash2] = token;
|
|
180105
180155
|
}
|
|
@@ -180794,7 +180844,7 @@ function createEmbeddingPort() {
|
|
|
180794
180844
|
// packages/learning-loop/src/codebase-scanner.ts
|
|
180795
180845
|
var import_picomatch = __toESM(require_picomatch2(), 1);
|
|
180796
180846
|
import { createHash as createHash5 } from "crypto";
|
|
180797
|
-
import { readdirSync as
|
|
180847
|
+
import { readdirSync as readdirSync10, readFileSync as readFileSync46, statSync as statSync7, existsSync as existsSync59 } from "fs";
|
|
180798
180848
|
import { join as join53, relative as relative6, extname as extname3 } from "path";
|
|
180799
180849
|
var EXT_TO_LANG = {
|
|
180800
180850
|
ts: "typescript",
|
|
@@ -180859,7 +180909,7 @@ function loadGitignore(rootDir, fs18) {
|
|
|
180859
180909
|
function defaultFs() {
|
|
180860
180910
|
return {
|
|
180861
180911
|
readdir(path18) {
|
|
180862
|
-
return
|
|
180912
|
+
return readdirSync10(path18);
|
|
180863
180913
|
},
|
|
180864
180914
|
readFile(path18) {
|
|
180865
180915
|
return readFileSync46(path18, "utf-8");
|
|
@@ -181216,7 +181266,7 @@ function formatSearchResults(result) {
|
|
|
181216
181266
|
|
|
181217
181267
|
// packages/learning-loop/src/improvement.ts
|
|
181218
181268
|
import { existsSync as existsSync60, mkdirSync as mkdirSync18, readFileSync as readFileSync47, writeFileSync as writeFileSync16 } from "fs";
|
|
181219
|
-
import { join as join54, basename as
|
|
181269
|
+
import { join as join54, basename as basename11 } from "path";
|
|
181220
181270
|
function createImprovementStore(improvementsDir) {
|
|
181221
181271
|
if (!existsSync60(improvementsDir)) {
|
|
181222
181272
|
mkdirSync18(improvementsDir, { recursive: true });
|
|
@@ -181237,7 +181287,7 @@ function createImprovementStore(improvementsDir) {
|
|
|
181237
181287
|
return [];
|
|
181238
181288
|
}
|
|
181239
181289
|
files.sort().reverse();
|
|
181240
|
-
return files.map((f2) => get(
|
|
181290
|
+
return files.map((f2) => get(basename11(f2, ".json"))).filter((i3) => i3 !== null);
|
|
181241
181291
|
}
|
|
181242
181292
|
function get(id) {
|
|
181243
181293
|
const filePath = join54(improvementsDir, `${id}.json`);
|
|
@@ -181264,8 +181314,8 @@ function createImprovementStore(improvementsDir) {
|
|
|
181264
181314
|
}
|
|
181265
181315
|
function readdirSyncSafe(dir) {
|
|
181266
181316
|
try {
|
|
181267
|
-
const { readdirSync:
|
|
181268
|
-
return
|
|
181317
|
+
const { readdirSync: readdirSync11 } = __require("fs");
|
|
181318
|
+
return readdirSync11(dir);
|
|
181269
181319
|
} catch {
|
|
181270
181320
|
return;
|
|
181271
181321
|
}
|
|
@@ -182061,7 +182111,7 @@ function getClaudeConfigDir() {
|
|
|
182061
182111
|
return join57(getHomeDirectory(), ".claude");
|
|
182062
182112
|
}
|
|
182063
182113
|
// packages/skills-loader-core/src/shared/opencode-command-dirs.ts
|
|
182064
|
-
import { basename as
|
|
182114
|
+
import { basename as basename12, dirname as dirname23, join as join59 } from "path";
|
|
182065
182115
|
|
|
182066
182116
|
// packages/skills-loader-core/src/shared/opencode-config-dir.ts
|
|
182067
182117
|
import { existsSync as existsSync64, realpathSync as realpathSync8 } from "fs";
|
|
@@ -182195,11 +182245,11 @@ function getOpenCodeConfigDir2(options) {
|
|
|
182195
182245
|
|
|
182196
182246
|
// packages/skills-loader-core/src/shared/opencode-command-dirs.ts
|
|
182197
182247
|
function getParentOpencodeConfigDir(configDir) {
|
|
182198
|
-
const parentDir =
|
|
182199
|
-
if (
|
|
182248
|
+
const parentDir = dirname23(configDir);
|
|
182249
|
+
if (basename12(parentDir) !== "profiles") {
|
|
182200
182250
|
return null;
|
|
182201
182251
|
}
|
|
182202
|
-
return
|
|
182252
|
+
return dirname23(parentDir);
|
|
182203
182253
|
}
|
|
182204
182254
|
function getOpenCodeSkillDirs(options) {
|
|
182205
182255
|
const configDirs = getOpenCodeConfigDirs2(options);
|
|
@@ -182217,7 +182267,7 @@ function getOpenCodeSkillDirs(options) {
|
|
|
182217
182267
|
// packages/skills-loader-core/src/shared/project-discovery-dirs.ts
|
|
182218
182268
|
import { execFileSync as execFileSync2 } from "child_process";
|
|
182219
182269
|
import { existsSync as existsSync65, realpathSync as realpathSync9 } from "fs";
|
|
182220
|
-
import { dirname as
|
|
182270
|
+
import { dirname as dirname24, join as join60, resolve as resolve13, win32 as win326 } from "path";
|
|
182221
182271
|
var worktreePathCache2 = new Map;
|
|
182222
182272
|
function normalizePath2(path18) {
|
|
182223
182273
|
const resolvedPath = process.platform !== "win32" && win326.isAbsolute(path18) ? path18 : resolve13(path18);
|
|
@@ -182267,7 +182317,7 @@ function findAncestorDirectories(startDirectory, targetPaths, stopDirectory) {
|
|
|
182267
182317
|
if (stopDirectoryKey === pathKey2(currentDirectory)) {
|
|
182268
182318
|
return directories;
|
|
182269
182319
|
}
|
|
182270
|
-
const parentDirectory =
|
|
182320
|
+
const parentDirectory = dirname24(currentDirectory);
|
|
182271
182321
|
if (parentDirectory === currentDirectory) {
|
|
182272
182322
|
return directories;
|
|
182273
182323
|
}
|
|
@@ -182341,7 +182391,7 @@ import { join as join62 } from "path";
|
|
|
182341
182391
|
init_src();
|
|
182342
182392
|
init_src2();
|
|
182343
182393
|
import * as fs19 from "fs/promises";
|
|
182344
|
-
import { basename as
|
|
182394
|
+
import { basename as basename13 } from "path";
|
|
182345
182395
|
|
|
182346
182396
|
// packages/skills-loader-core/src/features/opencode-skill-loader/allowed-tools-parser.ts
|
|
182347
182397
|
function parseAllowedTools(allowedTools) {
|
|
@@ -182457,7 +182507,7 @@ $ARGUMENTS
|
|
|
182457
182507
|
}
|
|
182458
182508
|
}
|
|
182459
182509
|
function inferSkillNameFromFileName(filePath) {
|
|
182460
|
-
return
|
|
182510
|
+
return basename13(filePath, ".md");
|
|
182461
182511
|
}
|
|
182462
182512
|
|
|
182463
182513
|
// packages/skills-loader-core/src/features/opencode-skill-loader/skill-directory-loader.ts
|
|
@@ -184515,9 +184565,9 @@ var gitMasterSkill = {
|
|
|
184515
184565
|
template: GIT_MASTER_TEMPLATE
|
|
184516
184566
|
};
|
|
184517
184567
|
// packages/skills-loader-core/src/features/builtin-skills/skills/dev-browser.ts
|
|
184518
|
-
import { dirname as
|
|
184568
|
+
import { dirname as dirname25, join as join65 } from "path";
|
|
184519
184569
|
import { fileURLToPath as fileURLToPath8 } from "url";
|
|
184520
|
-
var CURRENT_DIR =
|
|
184570
|
+
var CURRENT_DIR = dirname25(fileURLToPath8(import.meta.url));
|
|
184521
184571
|
var devBrowserSkill = {
|
|
184522
184572
|
name: "dev-browser",
|
|
184523
184573
|
description: "Browser automation with persistent page state. Use when users ask to navigate websites, fill forms, take screenshots, extract web data, test web apps, or automate browser workflows. Trigger phrases include 'go to [url]', 'click on', 'fill out the form', 'take a screenshot', 'scrape', 'automate', 'test the website', 'log into', or any browser interaction request.",
|
|
@@ -185733,7 +185783,7 @@ import {
|
|
|
185733
185783
|
copyFileSync as copyFileSync4,
|
|
185734
185784
|
readFileSync as readFileSync51,
|
|
185735
185785
|
writeFileSync as writeFileSync19,
|
|
185736
|
-
readdirSync as
|
|
185786
|
+
readdirSync as readdirSync11,
|
|
185737
185787
|
statSync as statSync8,
|
|
185738
185788
|
rmSync as rmSync4
|
|
185739
185789
|
} from "fs";
|
|
@@ -185751,7 +185801,7 @@ async function snapshotCli(options = {}) {
|
|
|
185751
185801
|
readFileSync: readFileSync51,
|
|
185752
185802
|
writeFileSync: writeFileSync19,
|
|
185753
185803
|
copyFileSync: copyFileSync4,
|
|
185754
|
-
readdirSync:
|
|
185804
|
+
readdirSync: readdirSync11,
|
|
185755
185805
|
statSync: statSync8,
|
|
185756
185806
|
rmSync: rmSync4
|
|
185757
185807
|
};
|
|
@@ -185816,7 +185866,7 @@ import {
|
|
|
185816
185866
|
copyFileSync as copyFileSync5,
|
|
185817
185867
|
readFileSync as readFileSync52,
|
|
185818
185868
|
writeFileSync as writeFileSync20,
|
|
185819
|
-
readdirSync as
|
|
185869
|
+
readdirSync as readdirSync12,
|
|
185820
185870
|
statSync as statSync9,
|
|
185821
185871
|
rmSync as rmSync5
|
|
185822
185872
|
} from "fs";
|
|
@@ -185830,7 +185880,7 @@ async function restoreCli(options) {
|
|
|
185830
185880
|
readFileSync: readFileSync52,
|
|
185831
185881
|
writeFileSync: writeFileSync20,
|
|
185832
185882
|
copyFileSync: copyFileSync5,
|
|
185833
|
-
readdirSync:
|
|
185883
|
+
readdirSync: readdirSync12,
|
|
185834
185884
|
statSync: statSync9,
|
|
185835
185885
|
rmSync: rmSync5
|
|
185836
185886
|
};
|
|
@@ -185868,7 +185918,7 @@ import {
|
|
|
185868
185918
|
copyFileSync as copyFileSync6,
|
|
185869
185919
|
readFileSync as readFileSync53,
|
|
185870
185920
|
writeFileSync as writeFileSync21,
|
|
185871
|
-
readdirSync as
|
|
185921
|
+
readdirSync as readdirSync13,
|
|
185872
185922
|
statSync as statSync10,
|
|
185873
185923
|
rmSync as rmSync6
|
|
185874
185924
|
} from "fs";
|
|
@@ -185892,7 +185942,7 @@ async function snapshotListCli(options) {
|
|
|
185892
185942
|
readFileSync: readFileSync53,
|
|
185893
185943
|
writeFileSync: writeFileSync21,
|
|
185894
185944
|
copyFileSync: copyFileSync6,
|
|
185895
|
-
readdirSync:
|
|
185945
|
+
readdirSync: readdirSync13,
|
|
185896
185946
|
statSync: statSync10,
|
|
185897
185947
|
rmSync: rmSync6
|
|
185898
185948
|
};
|
|
@@ -185922,7 +185972,7 @@ import {
|
|
|
185922
185972
|
copyFileSync as copyFileSync7,
|
|
185923
185973
|
readFileSync as readFileSync54,
|
|
185924
185974
|
writeFileSync as writeFileSync22,
|
|
185925
|
-
readdirSync as
|
|
185975
|
+
readdirSync as readdirSync14,
|
|
185926
185976
|
statSync as statSync11,
|
|
185927
185977
|
rmSync as rmSync7
|
|
185928
185978
|
} from "fs";
|
|
@@ -185936,7 +185986,7 @@ async function snapshotPruneCli(options = {}) {
|
|
|
185936
185986
|
readFileSync: readFileSync54,
|
|
185937
185987
|
writeFileSync: writeFileSync22,
|
|
185938
185988
|
copyFileSync: copyFileSync7,
|
|
185939
|
-
readdirSync:
|
|
185989
|
+
readdirSync: readdirSync14,
|
|
185940
185990
|
statSync: statSync11,
|
|
185941
185991
|
rmSync: rmSync7
|
|
185942
185992
|
};
|