summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authoropencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>2026-03-30 21:49:45 +0000
committeropencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>2026-03-30 21:49:45 +0000
commitea88044f2ec39e373a03f65650b52e1ac24b34f2 (patch)
treeda639fba2b38ecf0b3a8e01a8952f19c482b0f80
parente6f6f7aff14e3d3c6950e1a0a4b8288a65d2e6b1 (diff)
downloadopencode-ea88044f2ec39e373a03f65650b52e1ac24b34f2.tar.gz
opencode-ea88044f2ec39e373a03f65650b52e1ac24b34f2.zip
chore: generate
-rw-r--r--packages/opencode/src/auth/index.ts4
-rw-r--r--packages/opencode/src/skill/index.ts78
2 files changed, 42 insertions, 40 deletions
diff --git a/packages/opencode/src/auth/index.ts b/packages/opencode/src/auth/index.ts
index 7227f1bbe..b6d340cc8 100644
--- a/packages/opencode/src/auth/index.ts
+++ b/packages/opencode/src/auth/index.ts
@@ -70,7 +70,9 @@ export namespace Auth {
const data = yield* all()
if (norm !== key) delete data[key]
delete data[norm + "/"]
- yield* fsys.writeJson(file, { ...data, [norm]: info }, 0o600).pipe(Effect.mapError(fail("Failed to write auth data")))
+ yield* fsys
+ .writeJson(file, { ...data, [norm]: info }, 0o600)
+ .pipe(Effect.mapError(fail("Failed to write auth data")))
})
const remove = Effect.fn("Auth.remove")(function* (key: string) {
diff --git a/packages/opencode/src/skill/index.ts b/packages/opencode/src/skill/index.ts
index 8145110ab..a2ac3d351 100644
--- a/packages/opencode/src/skill/index.ts
+++ b/packages/opencode/src/skill/index.ts
@@ -190,45 +190,45 @@ export namespace Skill {
export class Service extends ServiceMap.Service<Service, Interface>()("@opencode/Skill") {}
export const layer = Layer.effect(
- Service,
- Effect.gen(function* () {
- const discovery = yield* Discovery.Service
- const config = yield* Config.Service
- const bus = yield* Bus.Service
- const fsys = yield* AppFileSystem.Service
- const state = yield* InstanceState.make(
- Effect.fn("Skill.state")(function* (ctx) {
- const s: State = { skills: {}, dirs: new Set() }
- yield* loadSkills(s, config, discovery, bus, fsys, ctx.directory, ctx.worktree)
- return s
- }),
- )
-
- const get = Effect.fn("Skill.get")(function* (name: string) {
- const s = yield* InstanceState.get(state)
- return s.skills[name]
- })
-
- const all = Effect.fn("Skill.all")(function* () {
- const s = yield* InstanceState.get(state)
- return Object.values(s.skills)
- })
-
- const dirs = Effect.fn("Skill.dirs")(function* () {
- const s = yield* InstanceState.get(state)
- return Array.from(s.dirs)
- })
-
- const available = Effect.fn("Skill.available")(function* (agent?: Agent.Info) {
- const s = yield* InstanceState.get(state)
- const list = Object.values(s.skills).toSorted((a, b) => a.name.localeCompare(b.name))
- if (!agent) return list
- return list.filter((skill) => Permission.evaluate("skill", skill.name, agent.permission).action !== "deny")
- })
-
- return Service.of({ get, all, dirs, available })
- }),
- )
+ Service,
+ Effect.gen(function* () {
+ const discovery = yield* Discovery.Service
+ const config = yield* Config.Service
+ const bus = yield* Bus.Service
+ const fsys = yield* AppFileSystem.Service
+ const state = yield* InstanceState.make(
+ Effect.fn("Skill.state")(function* (ctx) {
+ const s: State = { skills: {}, dirs: new Set() }
+ yield* loadSkills(s, config, discovery, bus, fsys, ctx.directory, ctx.worktree)
+ return s
+ }),
+ )
+
+ const get = Effect.fn("Skill.get")(function* (name: string) {
+ const s = yield* InstanceState.get(state)
+ return s.skills[name]
+ })
+
+ const all = Effect.fn("Skill.all")(function* () {
+ const s = yield* InstanceState.get(state)
+ return Object.values(s.skills)
+ })
+
+ const dirs = Effect.fn("Skill.dirs")(function* () {
+ const s = yield* InstanceState.get(state)
+ return Array.from(s.dirs)
+ })
+
+ const available = Effect.fn("Skill.available")(function* (agent?: Agent.Info) {
+ const s = yield* InstanceState.get(state)
+ const list = Object.values(s.skills).toSorted((a, b) => a.name.localeCompare(b.name))
+ if (!agent) return list
+ return list.filter((skill) => Permission.evaluate("skill", skill.name, agent.permission).action !== "deny")
+ })
+
+ return Service.of({ get, all, dirs, available })
+ }),
+ )
export const defaultLayer = layer.pipe(
Layer.provide(Discovery.defaultLayer),