|
@@ -11,6 +11,7 @@ import { Permission } from "@/permission"
|
|
|
import { AppFileSystem } from "@opencode-ai/core/filesystem"
|
|
import { AppFileSystem } from "@opencode-ai/core/filesystem"
|
|
|
import { Config } from "@/config/config"
|
|
import { Config } from "@/config/config"
|
|
|
import { ConfigMarkdown } from "@/config/markdown"
|
|
import { ConfigMarkdown } from "@/config/markdown"
|
|
|
|
|
+import { RuntimeFlags } from "@/effect/runtime-flags"
|
|
|
import { Glob } from "@opencode-ai/core/util/glob"
|
|
import { Glob } from "@opencode-ai/core/util/glob"
|
|
|
import * as Log from "@opencode-ai/core/util/log"
|
|
import * as Log from "@opencode-ai/core/util/log"
|
|
|
import { Discovery } from "./discovery"
|
|
import { Discovery } from "./discovery"
|
|
@@ -165,6 +166,7 @@ const discoverSkills = Effect.fnUntraced(function* (
|
|
|
discovery: Discovery.Interface,
|
|
discovery: Discovery.Interface,
|
|
|
fsys: AppFileSystem.Interface,
|
|
fsys: AppFileSystem.Interface,
|
|
|
global: Global.Interface,
|
|
global: Global.Interface,
|
|
|
|
|
+ disableClaudeCodeSkills: boolean,
|
|
|
directory: string,
|
|
directory: string,
|
|
|
worktree: string,
|
|
worktree: string,
|
|
|
) {
|
|
) {
|
|
@@ -172,7 +174,7 @@ const discoverSkills = Effect.fnUntraced(function* (
|
|
|
|
|
|
|
|
const externalDirs: string[] = []
|
|
const externalDirs: string[] = []
|
|
|
if (!Flag.OPENCODE_DISABLE_EXTERNAL_SKILLS) {
|
|
if (!Flag.OPENCODE_DISABLE_EXTERNAL_SKILLS) {
|
|
|
- if (!Flag.OPENCODE_DISABLE_CLAUDE_CODE_SKILLS) externalDirs.push(CLAUDE_EXTERNAL_DIR)
|
|
|
|
|
|
|
+ if (!disableClaudeCodeSkills) externalDirs.push(CLAUDE_EXTERNAL_DIR)
|
|
|
externalDirs.push(AGENTS_EXTERNAL_DIR)
|
|
externalDirs.push(AGENTS_EXTERNAL_DIR)
|
|
|
|
|
|
|
|
for (const dir of externalDirs) {
|
|
for (const dir of externalDirs) {
|
|
@@ -239,9 +241,18 @@ export const layer = Layer.effect(
|
|
|
const bus = yield* Bus.Service
|
|
const bus = yield* Bus.Service
|
|
|
const fsys = yield* AppFileSystem.Service
|
|
const fsys = yield* AppFileSystem.Service
|
|
|
const global = yield* Global.Service
|
|
const global = yield* Global.Service
|
|
|
|
|
+ const flags = yield* RuntimeFlags.Service
|
|
|
const discovered = yield* InstanceState.make(
|
|
const discovered = yield* InstanceState.make(
|
|
|
Effect.fn("Skill.discovery")(function* (ctx) {
|
|
Effect.fn("Skill.discovery")(function* (ctx) {
|
|
|
- return yield* discoverSkills(config, discovery, fsys, global, ctx.directory, ctx.worktree)
|
|
|
|
|
|
|
+ return yield* discoverSkills(
|
|
|
|
|
+ config,
|
|
|
|
|
+ discovery,
|
|
|
|
|
+ fsys,
|
|
|
|
|
+ global,
|
|
|
|
|
+ flags.disableClaudeCodeSkills,
|
|
|
|
|
+ ctx.directory,
|
|
|
|
|
+ ctx.worktree,
|
|
|
|
|
+ )
|
|
|
}),
|
|
}),
|
|
|
)
|
|
)
|
|
|
const state = yield* InstanceState.make(
|
|
const state = yield* InstanceState.make(
|
|
@@ -291,6 +302,7 @@ export const defaultLayer = layer.pipe(
|
|
|
Layer.provide(Bus.layer),
|
|
Layer.provide(Bus.layer),
|
|
|
Layer.provide(AppFileSystem.defaultLayer),
|
|
Layer.provide(AppFileSystem.defaultLayer),
|
|
|
Layer.provide(Global.layer),
|
|
Layer.provide(Global.layer),
|
|
|
|
|
+ Layer.provide(RuntimeFlags.defaultLayer),
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
export function fmt(list: Info[], opts: { verbose: boolean }) {
|
|
export function fmt(list: Info[], opts: { verbose: boolean }) {
|