chore: generate · argszero/opencode@30ec231 · GitHub
Skip to content

Commit 30ec231

Browse files
chore: generate
1 parent 1ff1910 commit 30ec231

19 files changed

Lines changed: 3573 additions & 2863 deletions

File tree

packages/cli/bin/lildax.cjs

Lines changed: 21 additions & 7 deletions

packages/cli/script/publish.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,9 @@ await Bun.file(`./dist/${pkg.name}/package.json`).write(
4444
),
4545
)
4646

47-
await Promise.all(Object.entries(binaries).map(([name, version]) => publish(`./dist/${name.replace("@opencode-ai/", "")}`, name, version)))
47+
await Promise.all(
48+
Object.entries(binaries).map(([name, version]) =>
49+
publish(`./dist/${name.replace("@opencode-ai/", "")}`, name, version),
50+
),
51+
)
4852
await publish(`./dist/${pkg.name}`, pkg.name, version)

packages/cli/src/framework/runtime.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ export type Input<Value> =
1111
: never
1212

1313
type RuntimeHandler = (input: unknown) => Effect.Effect<void, unknown, Daemon.Service>
14-
type Loader<Node extends Spec.Any> = () => Promise<{ default: (input: Input<Node>) => Effect.Effect<void, any, Daemon.Service> }>
14+
type Loader<Node extends Spec.Any> = () => Promise<{
15+
default: (input: Input<Node>) => Effect.Effect<void, any, Daemon.Service>
16+
}>
1517
type ProvidedCommand = Command.Command<string, unknown, unknown, unknown, Daemon.Service>
1618

1719
export type Handlers<Node extends Spec.Any> = keyof Node["commands"] extends never

packages/cli/src/services/daemon.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,9 @@ export const layer = Layer.effect(
125125
const register = Effect.fn("cli.daemon.register")(function* (address: HttpServer.Address) {
126126
const temp = file + ".tmp"
127127
yield* fs.makeDirectory(directory, { recursive: true })
128-
yield* fs.writeFileString(
129-
temp,
130-
JSON.stringify({ url: HttpServer.formatAddress(address), pid: process.pid }),
131-
{ mode: 0o600 },
132-
)
128+
yield* fs.writeFileString(temp, JSON.stringify({ url: HttpServer.formatAddress(address), pid: process.pid }), {
129+
mode: 0o600,
130+
})
133131
yield* fs.rename(temp, file)
134132
// The metadata file represents this live listener, not persistent config.
135133
// Scope shutdown removes it when the server exits normally.

packages/core/src/config/plugin/command.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ export const Plugin = PluginV2.define({
2222
const documents = yield* Effect.forEach(yield* config.entries(), (entry) => {
2323
if (entry.type === "document") return Effect.succeed([{ commands: entry.info.commands }])
2424
return loadDirectory(fs, entry.path).pipe(
25-
Effect.map((commands) => [{ commands: Object.fromEntries(commands.map((command) => [command.name, command.info])) }]),
25+
Effect.map((commands) => [
26+
{ commands: Object.fromEntries(commands.map((command) => [command.name, command.info])) },
27+
]),
2628
)
2729
}).pipe(Effect.map((documents) => documents.flat()))
2830

packages/core/src/config/plugin/skill.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,12 @@ export const Plugin = PluginV2.define({
2323

2424
yield* transform((editor) => {
2525
for (const directory of directories) {
26-
editor.source(new SkillV2.DirectorySource({ type: "directory", path: AbsolutePath.make(path.join(directory, "skill")) }))
27-
editor.source(new SkillV2.DirectorySource({ type: "directory", path: AbsolutePath.make(path.join(directory, "skills")) }))
26+
editor.source(
27+
new SkillV2.DirectorySource({ type: "directory", path: AbsolutePath.make(path.join(directory, "skill")) }),
28+
)
29+
editor.source(
30+
new SkillV2.DirectorySource({ type: "directory", path: AbsolutePath.make(path.join(directory, "skills")) }),
31+
)
2832
}
2933
for (const item of items) {
3034
if (URL.canParse(item) && /^(https?:)$/.test(new URL(item).protocol)) {

packages/core/src/plugin/skill.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ export const Plugin = PluginV2.define({
1010
effect: Effect.gen(function* () {
1111
const skill = yield* SkillV2.Service
1212
const transform = yield* skill.transform()
13-
const content = yield* Effect.promise(() => Bun.file(new URL("./skill/customize-opencode.md", import.meta.url)).text())
13+
const content = yield* Effect.promise(() =>
14+
Bun.file(new URL("./skill/customize-opencode.md", import.meta.url)).text(),
15+
)
1416

1517
yield* transform((editor) => {
1618
editor.source(

packages/core/src/skill.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,11 @@ export const Source = Schema.Union([DirectorySource, UrlSource, EmbeddedSource])
3737
return false
3838
},
3939
key: (source: DirectorySource | UrlSource | EmbeddedSource) =>
40-
source.type === "directory" ? `directory:${source.path}` : source.type === "url" ? `url:${source.url}` : `embedded:${source.skill.name}`,
40+
source.type === "directory"
41+
? `directory:${source.path}`
42+
: source.type === "url"
43+
? `url:${source.url}`
44+
: `embedded:${source.skill.name}`,
4145
})),
4246
)
4347
export type Source = typeof Source.Type

packages/core/test/plugin/command.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@ const project = AbsolutePath.make("/repo")
1212
const it = testEffect(
1313
CommandV2.locationLayer.pipe(
1414
Layer.provide(
15-
Layer.succeed(
16-
Location.Service,
17-
Location.Service.of(location({ directory }, { projectDirectory: project })),
18-
),
15+
Layer.succeed(Location.Service, Location.Service.of(location({ directory }, { projectDirectory: project }))),
1916
),
2017
),
2118
)
@@ -26,7 +23,10 @@ describe("CommandPlugin.Plugin", () => {
2623
const command = yield* CommandV2.Service
2724
yield* CommandPlugin.Plugin.effect.pipe(
2825
Effect.provideService(CommandV2.Service, command),
29-
Effect.provideService(Location.Service, Location.Service.of(location({ directory }, { projectDirectory: project }))),
26+
Effect.provideService(
27+
Location.Service,
28+
Location.Service.of(location({ directory }, { projectDirectory: project })),
29+
),
3030
)
3131

3232
expect(yield* command.get("init")).toMatchObject({

packages/opencode/src/provider/provider.ts

Lines changed: 2 additions & 8 deletions

0 commit comments

Comments
 (0)