soraacode 0.2.0 → 0.2.2
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/LICENSE +21 -0
- package/bin/soraacode.exe +10 -0
- package/package.json +17 -25
- package/{script/postinstall.mjs → postinstall.mjs} +5 -5
- package/AGENTS.md +0 -131
- package/Dockerfile +0 -18
- package/README.md +0 -15
- package/bin/opencode +0 -199
- package/bin/soraacode +0 -199
- package/bunfig.toml +0 -7
- package/git +0 -0
- package/migration/20260511173437_session-metadata/migration.sql +0 -1
- package/migration/20260511173437_session-metadata/snapshot.json +0 -1500
- package/parsers-config.ts +0 -1
- package/script/bench-search.ts +0 -94
- package/script/bench-test-suite.ts +0 -52
- package/script/build-headless.ts +0 -51
- package/script/build.ts +0 -245
- package/script/generate.ts +0 -14
- package/script/httpapi-exercise.ts +0 -1
- package/script/profile-test-files.ts +0 -42
- package/script/publish.ts +0 -213
- package/script/run-workspace-server +0 -106
- package/script/schema.ts +0 -77
- package/script/time.ts +0 -6
- package/script/trace-imports.ts +0 -153
- package/soraacode-0.1.7.tgz +0 -0
- package/specs/effect/error-boundaries-plan.md +0 -235
- package/specs/effect/errors.md +0 -207
- package/specs/effect/facades.md +0 -218
- package/specs/effect/guide.md +0 -247
- package/specs/effect/instance-context.md +0 -13
- package/specs/effect/loose-ends.md +0 -30
- package/specs/effect/migration.md +0 -62
- package/specs/effect/routes.md +0 -61
- package/specs/effect/schema.md +0 -88
- package/specs/effect/server-package.md +0 -58
- package/specs/effect/todo.md +0 -241
- package/specs/effect/tools.md +0 -88
- package/specs/openapi-translation-cleanup.md +0 -204
- package/specs/tui-plugins.md +0 -544
- package/specs/v2/api.ts +0 -67
- package/specs/v2/message-shape.md +0 -136
- package/specs/v2/notifications.md +0 -13
- package/specs/v2/tui-command-shim.md +0 -67
- package/src/account/account.ts +0 -481
- package/src/account/repo.ts +0 -171
- package/src/account/schema.ts +0 -99
- package/src/account/url.ts +0 -8
- package/src/acp/agent.ts +0 -95
- package/src/acp/config-option.ts +0 -206
- package/src/acp/content.ts +0 -269
- package/src/acp/directory.ts +0 -212
- package/src/acp/error.ts +0 -97
- package/src/acp/event.ts +0 -421
- package/src/acp/permission.ts +0 -254
- package/src/acp/profile.ts +0 -42
- package/src/acp/service.ts +0 -1226
- package/src/acp/session.ts +0 -232
- package/src/acp/tool.ts +0 -364
- package/src/acp/usage.ts +0 -243
- package/src/agent/agent.ts +0 -450
- package/src/agent/generate.txt +0 -75
- package/src/agent/prompt/compaction.txt +0 -5
- package/src/agent/prompt/explore.txt +0 -18
- package/src/agent/prompt/summary.txt +0 -11
- package/src/agent/prompt/title.txt +0 -44
- package/src/agent/subagent-permissions.ts +0 -27
- package/src/audio.d.ts +0 -14
- package/src/auth/index.ts +0 -97
- package/src/background/job.ts +0 -37
- package/src/bus/global.ts +0 -22
- package/src/cli/bootstrap.ts +0 -11
- package/src/cli/cmd/cmd.ts +0 -7
- package/src/cli/cmd/serve.ts +0 -24
- package/src/cli/effect/prompt.ts +0 -37
- package/src/cli/effect-cmd.ts +0 -96
- package/src/cli/error.ts +0 -130
- package/src/cli/heap.ts +0 -45
- package/src/cli/logo.ts +0 -2
- package/src/cli/network.ts +0 -80
- package/src/cli/ui.ts +0 -132
- package/src/command/index.ts +0 -177
- package/src/command/template/initialize.txt +0 -66
- package/src/command/template/review.txt +0 -101
- package/src/config/agent.ts +0 -59
- package/src/config/command.ts +0 -39
- package/src/config/config.ts +0 -707
- package/src/config/entry-name.ts +0 -19
- package/src/config/managed.ts +0 -69
- package/src/config/markdown.ts +0 -36
- package/src/config/parse.ts +0 -61
- package/src/config/paths.ts +0 -45
- package/src/config/plugin.ts +0 -79
- package/src/config/v2-compat.ts +0 -449
- package/src/config/variable.ts +0 -91
- package/src/control-plane/adapters/index.ts +0 -41
- package/src/control-plane/adapters/worktree.ts +0 -96
- package/src/control-plane/dev/README.md +0 -19
- package/src/control-plane/dev/debug-workspace-plugin.ts +0 -73
- package/src/control-plane/types.ts +0 -59
- package/src/control-plane/util.ts +0 -39
- package/src/control-plane/workspace-adapter-runtime.ts +0 -51
- package/src/control-plane/workspace-context.ts +0 -26
- package/src/control-plane/workspace.ts +0 -966
- package/src/effect/app-node-builder-v1.ts +0 -12
- package/src/effect/app-runtime.ts +0 -135
- package/src/effect/bootstrap-runtime.ts +0 -19
- package/src/effect/bridge.ts +0 -84
- package/src/effect/config-service.ts +0 -67
- package/src/effect/instance-ref.ts +0 -11
- package/src/effect/instance-registry.ts +0 -12
- package/src/effect/instance-state.ts +0 -69
- package/src/effect/promise.ts +0 -17
- package/src/effect/run-service.ts +0 -47
- package/src/effect/runner.ts +0 -217
- package/src/effect/runtime-flags.ts +0 -78
- package/src/env/index.ts +0 -41
- package/src/event-manifest.ts +0 -3
- package/src/event-v2-bridge.ts +0 -71
- package/src/format/formatter.ts +0 -404
- package/src/format/index.ts +0 -203
- package/src/git/index.ts +0 -348
- package/src/id/id.ts +0 -80
- package/src/ide/index.ts +0 -54
- package/src/image/image.ts +0 -172
- package/src/index-headless.ts +0 -89
- package/src/index.ts +0 -93
- package/src/installation/index.ts +0 -336
- package/src/lsp/client.ts +0 -650
- package/src/lsp/diagnostic.ts +0 -29
- package/src/lsp/language.ts +0 -121
- package/src/lsp/launch.ts +0 -21
- package/src/lsp/lsp.ts +0 -507
- package/src/lsp/server.ts +0 -1983
- package/src/markdown.d.ts +0 -4
- package/src/mcp/auth.ts +0 -163
- package/src/mcp/browser.ts +0 -37
- package/src/mcp/catalog.ts +0 -170
- package/src/mcp/index.ts +0 -1004
- package/src/mcp/oauth-callback.ts +0 -194
- package/src/mcp/oauth-provider.ts +0 -259
- package/src/node.ts +0 -4
- package/src/patch/index.ts +0 -686
- package/src/permission/arity.ts +0 -163
- package/src/permission/evaluate.ts +0 -1
- package/src/permission/index.ts +0 -223
- package/src/plugin/github-copilot/copilot.ts +0 -415
- package/src/plugin/github-copilot/models.ts +0 -261
- package/src/plugin/index.ts +0 -298
- package/src/plugin/install.ts +0 -439
- package/src/plugin/loader.ts +0 -237
- package/src/plugin/meta.ts +0 -188
- package/src/plugin/openai/README.md +0 -31
- package/src/plugin/openai/codex.ts +0 -575
- package/src/plugin/openai/ws-pool.ts +0 -271
- package/src/plugin/openai/ws.ts +0 -383
- package/src/plugin/pty-environment.ts +0 -24
- package/src/plugin/shared.ts +0 -323
- package/src/project/bootstrap-service.ts +0 -9
- package/src/project/bootstrap.ts +0 -58
- package/src/project/instance-context.ts +0 -24
- package/src/project/instance-runtime.ts +0 -16
- package/src/project/instance-store.ts +0 -213
- package/src/project/project.ts +0 -483
- package/src/project/vcs.ts +0 -423
- package/src/provider/auth.ts +0 -229
- package/src/provider/error.ts +0 -195
- package/src/provider/model-status.ts +0 -8
- package/src/provider/provider.ts +0 -1955
- package/src/provider/transform.ts +0 -1923
- package/src/question/index.ts +0 -161
- package/src/question/schema.ts +0 -4
- package/src/server/auth.ts +0 -48
- package/src/server/event.ts +0 -10
- package/src/server/global-lifecycle.ts +0 -28
- package/src/server/mdns.ts +0 -47
- package/src/server/proxy-util.ts +0 -48
- package/src/server/routes/instance/httpapi/AGENTS.md +0 -39
- package/src/server/routes/instance/httpapi/api.ts +0 -97
- package/src/server/routes/instance/httpapi/errors.ts +0 -193
- package/src/server/routes/instance/httpapi/groups/config.ts +0 -65
- package/src/server/routes/instance/httpapi/groups/control-plane.ts +0 -35
- package/src/server/routes/instance/httpapi/groups/control.ts +0 -76
- package/src/server/routes/instance/httpapi/groups/event.ts +0 -29
- package/src/server/routes/instance/httpapi/groups/experimental.ts +0 -275
- package/src/server/routes/instance/httpapi/groups/file.ts +0 -185
- package/src/server/routes/instance/httpapi/groups/global.ts +0 -139
- package/src/server/routes/instance/httpapi/groups/instance.ts +0 -206
- package/src/server/routes/instance/httpapi/groups/mcp.ts +0 -156
- package/src/server/routes/instance/httpapi/groups/metadata.ts +0 -18
- package/src/server/routes/instance/httpapi/groups/permission.ts +0 -61
- package/src/server/routes/instance/httpapi/groups/project-copy.ts +0 -32
- package/src/server/routes/instance/httpapi/groups/project.ts +0 -93
- package/src/server/routes/instance/httpapi/groups/provider.ts +0 -101
- package/src/server/routes/instance/httpapi/groups/pty.ts +0 -172
- package/src/server/routes/instance/httpapi/groups/query.ts +0 -12
- package/src/server/routes/instance/httpapi/groups/question.ts +0 -74
- package/src/server/routes/instance/httpapi/groups/session.ts +0 -462
- package/src/server/routes/instance/httpapi/groups/sync.ts +0 -113
- package/src/server/routes/instance/httpapi/groups/tui.ts +0 -208
- package/src/server/routes/instance/httpapi/groups/workspace.ts +0 -141
- package/src/server/routes/instance/httpapi/handlers/config.ts +0 -34
- package/src/server/routes/instance/httpapi/handlers/control-plane.ts +0 -37
- package/src/server/routes/instance/httpapi/handlers/control.ts +0 -43
- package/src/server/routes/instance/httpapi/handlers/event.ts +0 -99
- package/src/server/routes/instance/httpapi/handlers/experimental.ts +0 -193
- package/src/server/routes/instance/httpapi/handlers/file.ts +0 -139
- package/src/server/routes/instance/httpapi/handlers/global.ts +0 -126
- package/src/server/routes/instance/httpapi/handlers/instance.ts +0 -110
- package/src/server/routes/instance/httpapi/handlers/mcp.ts +0 -111
- package/src/server/routes/instance/httpapi/handlers/permission.ts +0 -41
- package/src/server/routes/instance/httpapi/handlers/project-copy.ts +0 -83
- package/src/server/routes/instance/httpapi/handlers/project.ts +0 -63
- package/src/server/routes/instance/httpapi/handlers/provider.ts +0 -116
- package/src/server/routes/instance/httpapi/handlers/pty.ts +0 -273
- package/src/server/routes/instance/httpapi/handlers/question.ts +0 -54
- package/src/server/routes/instance/httpapi/handlers/session-errors.ts +0 -21
- package/src/server/routes/instance/httpapi/handlers/session.ts +0 -442
- package/src/server/routes/instance/httpapi/handlers/sync.ts +0 -89
- package/src/server/routes/instance/httpapi/handlers/tui.ts +0 -131
- package/src/server/routes/instance/httpapi/handlers/workspace.ts +0 -102
- package/src/server/routes/instance/httpapi/lifecycle.ts +0 -54
- package/src/server/routes/instance/httpapi/middleware/authorization.ts +0 -150
- package/src/server/routes/instance/httpapi/middleware/compression.ts +0 -64
- package/src/server/routes/instance/httpapi/middleware/cors-vary.ts +0 -29
- package/src/server/routes/instance/httpapi/middleware/error.ts +0 -44
- package/src/server/routes/instance/httpapi/middleware/fence.ts +0 -25
- package/src/server/routes/instance/httpapi/middleware/instance-context.ts +0 -43
- package/src/server/routes/instance/httpapi/middleware/proxy.ts +0 -131
- package/src/server/routes/instance/httpapi/middleware/schema-error.ts +0 -41
- package/src/server/routes/instance/httpapi/middleware/workspace-routing.ts +0 -250
- package/src/server/routes/instance/httpapi/public.ts +0 -537
- package/src/server/routes/instance/httpapi/server.ts +0 -325
- package/src/server/routes/instance/httpapi/websocket-tracker.ts +0 -60
- package/src/server/server.ts +0 -224
- package/src/server/shared/fence.ts +0 -60
- package/src/server/shared/pty-ticket.ts +0 -15
- package/src/server/shared/public-ui.ts +0 -12
- package/src/server/shared/tui-control.ts +0 -28
- package/src/server/shared/ui.ts +0 -108
- package/src/server/shared/workspace-routing.ts +0 -45
- package/src/server/tui-event.ts +0 -1
- package/src/session/compaction.ts +0 -608
- package/src/session/instruction.ts +0 -237
- package/src/session/llm/AGENTS.md +0 -90
- package/src/session/llm/ai-sdk.ts +0 -291
- package/src/session/llm/native-request.ts +0 -196
- package/src/session/llm/native-runtime.ts +0 -195
- package/src/session/llm/request.ts +0 -226
- package/src/session/llm.ts +0 -390
- package/src/session/message-error.ts +0 -14
- package/src/session/message-v2.ts +0 -742
- package/src/session/message.ts +0 -148
- package/src/session/overflow.ts +0 -34
- package/src/session/processor.ts +0 -732
- package/src/session/prompt/build-switch.txt +0 -5
- package/src/session/prompt/default.txt +0 -35
- package/src/session/prompt/plan-mode.txt +0 -70
- package/src/session/prompt/plan.txt +0 -26
- package/src/session/prompt.ts +0 -1631
- package/src/session/reminders.ts +0 -92
- package/src/session/retry.ts +0 -209
- package/src/session/revert.ts +0 -136
- package/src/session/run-state.ts +0 -151
- package/src/session/schema.ts +0 -26
- package/src/session/session.ts +0 -1016
- package/src/session/status.ts +0 -56
- package/src/session/summary.ts +0 -160
- package/src/session/system.ts +0 -123
- package/src/session/todo.ts +0 -74
- package/src/session/tools.ts +0 -590
- package/src/share/session.ts +0 -58
- package/src/share/share-next.ts +0 -371
- package/src/skill/discovery.ts +0 -140
- package/src/skill/index.ts +0 -354
- package/src/snapshot/index.ts +0 -807
- package/src/sql.d.ts +0 -4
- package/src/storage/schema.ts +0 -5
- package/src/storage/storage.ts +0 -327
- package/src/sync/README.md +0 -179
- package/src/sync/schema.ts +0 -11
- package/src/temporary.ts +0 -31
- package/src/tool/apply_patch.ts +0 -313
- package/src/tool/apply_patch.txt +0 -14
- package/src/tool/code-mode.ts +0 -310
- package/src/tool/edit.ts +0 -737
- package/src/tool/edit.txt +0 -13
- package/src/tool/external-directory.ts +0 -49
- package/src/tool/glob.ts +0 -76
- package/src/tool/glob.txt +0 -7
- package/src/tool/grep.ts +0 -115
- package/src/tool/grep.txt +0 -7
- package/src/tool/invalid.ts +0 -21
- package/src/tool/json-schema.ts +0 -164
- package/src/tool/lsp.ts +0 -113
- package/src/tool/lsp.txt +0 -1
- package/src/tool/mcp-websearch.ts +0 -96
- package/src/tool/plan-enter.txt +0 -1
- package/src/tool/plan-exit.txt +0 -1
- package/src/tool/plan.ts +0 -79
- package/src/tool/question.ts +0 -44
- package/src/tool/question.txt +0 -1
- package/src/tool/read.ts +0 -386
- package/src/tool/read.txt +0 -13
- package/src/tool/registry.ts +0 -455
- package/src/tool/schema.ts +0 -14
- package/src/tool/shell/id.ts +0 -19
- package/src/tool/shell/prompt.ts +0 -293
- package/src/tool/shell/shell.txt +0 -21
- package/src/tool/shell.ts +0 -645
- package/src/tool/skill.ts +0 -70
- package/src/tool/skill.txt +0 -1
- package/src/tool/task.ts +0 -371
- package/src/tool/task.txt +0 -11
- package/src/tool/todo.ts +0 -46
- package/src/tool/todowrite.txt +0 -11
- package/src/tool/tool.ts +0 -183
- package/src/tool/truncate.ts +0 -156
- package/src/tool/truncation-dir.ts +0 -4
- package/src/tool/webfetch.ts +0 -192
- package/src/tool/webfetch.txt +0 -9
- package/src/tool/websearch.ts +0 -143
- package/src/tool/websearch.txt +0 -9
- package/src/tool/write.ts +0 -104
- package/src/tool/write.txt +0 -11
- package/src/util/archive.ts +0 -17
- package/src/util/bom.ts +0 -27
- package/src/util/data-url.ts +0 -9
- package/src/util/defer.ts +0 -10
- package/src/util/effect-http-client.ts +0 -11
- package/src/util/error.ts +0 -16
- package/src/util/filesystem.ts +0 -251
- package/src/util/html.ts +0 -8
- package/src/util/iife.ts +0 -3
- package/src/util/lazy.ts +0 -20
- package/src/util/local-context.ts +0 -25
- package/src/util/locale.ts +0 -4
- package/src/util/media.ts +0 -26
- package/src/util/process.ts +0 -177
- package/src/util/proxy-env.ts +0 -72
- package/src/util/queue.ts +0 -32
- package/src/util/record.ts +0 -3
- package/src/util/repository.ts +0 -232
- package/src/util/rpc.ts +0 -66
- package/src/util/signal.ts +0 -12
- package/src/util/timeout.ts +0 -13
- package/src/util/token.ts +0 -1
- package/src/util/wildcard.ts +0 -59
- package/src/worktree/index.ts +0 -623
- package/sst-env.d.ts +0 -10
- package/tsconfig.headless.json +0 -13
- package/tsconfig.json +0 -16
package/script/publish.ts
DELETED
|
@@ -1,213 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bun
|
|
2
|
-
import { $ } from "bun"
|
|
3
|
-
import pkg from "../package.json"
|
|
4
|
-
import { Script } from "@soraacode/script"
|
|
5
|
-
import { fileURLToPath } from "url"
|
|
6
|
-
|
|
7
|
-
const dir = fileURLToPath(new URL("..", import.meta.url))
|
|
8
|
-
process.chdir(dir)
|
|
9
|
-
|
|
10
|
-
async function published(name: string, version: string) {
|
|
11
|
-
return (await $`npm view ${name}@${version} version`.nothrow()).exitCode === 0
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
async function publish(dir: string, name: string, version: string) {
|
|
15
|
-
// GitHub artifact downloads can drop the executable bit, and Docker uses the
|
|
16
|
-
// unpacked dist binaries directly rather than the published tarball.
|
|
17
|
-
if (process.platform !== "win32") await $`chmod -R 755 .`.cwd(dir)
|
|
18
|
-
if (await published(name, version)) {
|
|
19
|
-
console.log(`already published ${name}@${version}`)
|
|
20
|
-
return
|
|
21
|
-
}
|
|
22
|
-
await $`bun pm pack`.cwd(dir)
|
|
23
|
-
await $`npm publish *.tgz --access public --tag ${Script.channel}`.cwd(dir)
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
const binaries: Record<string, string> = {}
|
|
27
|
-
for (const filepath of new Bun.Glob("*/package.json").scanSync({ cwd: "./dist" })) {
|
|
28
|
-
const pkg = await Bun.file(`./dist/${filepath}`).json()
|
|
29
|
-
binaries[pkg.name] = pkg.version
|
|
30
|
-
}
|
|
31
|
-
console.log("binaries", binaries)
|
|
32
|
-
const version = Object.values(binaries)[0]
|
|
33
|
-
|
|
34
|
-
await $`mkdir -p ./dist/${pkg.name}`
|
|
35
|
-
await $`mkdir -p ./dist/${pkg.name}/bin`
|
|
36
|
-
await $`cp ./script/postinstall.mjs ./dist/${pkg.name}/postinstall.mjs`
|
|
37
|
-
await Bun.file(`./dist/${pkg.name}/LICENSE`).write(await Bun.file("../../LICENSE").text())
|
|
38
|
-
await Bun.file(`./dist/${pkg.name}/bin/${pkg.name}.exe`).write(
|
|
39
|
-
[
|
|
40
|
-
`echo "Error: ${pkg.name}-ai's postinstall script was not run." >&2`,
|
|
41
|
-
'echo "" >&2',
|
|
42
|
-
'echo "This occurs when using --ignore-scripts during installation, or when using a" >&2',
|
|
43
|
-
'echo "package manager like pnpm that does not run postinstall scripts by default." >&2',
|
|
44
|
-
'echo "" >&2',
|
|
45
|
-
'echo "To fix this, run the postinstall script manually:" >&2',
|
|
46
|
-
`echo " cd node_modules/${pkg.name}-ai && node postinstall.mjs" >&2`,
|
|
47
|
-
'echo "" >&2',
|
|
48
|
-
`echo "Or reinstall ${pkg.name}-ai without the --ignore-scripts flag." >&2`,
|
|
49
|
-
"exit 1",
|
|
50
|
-
"",
|
|
51
|
-
].join("\n"),
|
|
52
|
-
)
|
|
53
|
-
|
|
54
|
-
await Bun.file(`./dist/${pkg.name}/package.json`).write(
|
|
55
|
-
JSON.stringify(
|
|
56
|
-
{
|
|
57
|
-
name: pkg.name + "-ai",
|
|
58
|
-
bin: {
|
|
59
|
-
[pkg.name]: `./bin/${pkg.name}.exe`,
|
|
60
|
-
},
|
|
61
|
-
scripts: {
|
|
62
|
-
postinstall: "node ./postinstall.mjs",
|
|
63
|
-
},
|
|
64
|
-
version: version,
|
|
65
|
-
license: pkg.license,
|
|
66
|
-
os: ["darwin", "linux", "win32"],
|
|
67
|
-
cpu: ["arm64", "x64"],
|
|
68
|
-
optionalDependencies: binaries,
|
|
69
|
-
},
|
|
70
|
-
null,
|
|
71
|
-
2,
|
|
72
|
-
),
|
|
73
|
-
)
|
|
74
|
-
|
|
75
|
-
const tasks = Object.entries(binaries).map(async ([name]) => {
|
|
76
|
-
await publish(`./dist/${name}`, name, binaries[name])
|
|
77
|
-
})
|
|
78
|
-
await Promise.all(tasks)
|
|
79
|
-
await publish(`./dist/${pkg.name}`, `${pkg.name}-ai`, version)
|
|
80
|
-
|
|
81
|
-
const image = "ghcr.io/anomalyco/opencode"
|
|
82
|
-
const platforms = "linux/amd64,linux/arm64"
|
|
83
|
-
const tags = [`${image}:${version}`, `${image}:${Script.channel}`]
|
|
84
|
-
const tagFlags = tags.flatMap((t) => ["-t", t])
|
|
85
|
-
|
|
86
|
-
// registries
|
|
87
|
-
if (!Script.preview) {
|
|
88
|
-
await $`docker buildx build --platform ${platforms} ${tagFlags} --push .`
|
|
89
|
-
// Calculate SHA values
|
|
90
|
-
const arm64Sha = await $`sha256sum ./dist/opencode-linux-arm64.tar.gz | cut -d' ' -f1`.text().then((x) => x.trim())
|
|
91
|
-
const x64Sha = await $`sha256sum ./dist/opencode-linux-x64.tar.gz | cut -d' ' -f1`.text().then((x) => x.trim())
|
|
92
|
-
const macX64Sha = await $`sha256sum ./dist/opencode-darwin-x64.zip | cut -d' ' -f1`.text().then((x) => x.trim())
|
|
93
|
-
const macArm64Sha = await $`sha256sum ./dist/opencode-darwin-arm64.zip | cut -d' ' -f1`.text().then((x) => x.trim())
|
|
94
|
-
|
|
95
|
-
const [pkgver, _subver = ""] = Script.version.split(/(-.*)/, 2)
|
|
96
|
-
|
|
97
|
-
// arch
|
|
98
|
-
const binaryPkgbuild = [
|
|
99
|
-
"# Maintainer: dax",
|
|
100
|
-
"# Maintainer: adam",
|
|
101
|
-
"",
|
|
102
|
-
"pkgname='opencode-bin'",
|
|
103
|
-
`pkgver=${pkgver}`,
|
|
104
|
-
`_subver=${_subver}`,
|
|
105
|
-
"options=('!debug' '!strip')",
|
|
106
|
-
"pkgrel=1",
|
|
107
|
-
"pkgdesc='The AI coding agent built for the terminal.'",
|
|
108
|
-
"url='https://github.com/anomalyco/opencode'",
|
|
109
|
-
"arch=('aarch64' 'x86_64')",
|
|
110
|
-
"license=('MIT')",
|
|
111
|
-
"provides=('opencode')",
|
|
112
|
-
"conflicts=('opencode')",
|
|
113
|
-
"depends=('ripgrep')",
|
|
114
|
-
"",
|
|
115
|
-
`source_aarch64=("\${pkgname}_\${pkgver}_aarch64.tar.gz::https://github.com/anomalyco/opencode/releases/download/v\${pkgver}\${_subver}/opencode-linux-arm64.tar.gz")`,
|
|
116
|
-
`sha256sums_aarch64=('${arm64Sha}')`,
|
|
117
|
-
|
|
118
|
-
`source_x86_64=("\${pkgname}_\${pkgver}_x86_64.tar.gz::https://github.com/anomalyco/opencode/releases/download/v\${pkgver}\${_subver}/opencode-linux-x64.tar.gz")`,
|
|
119
|
-
`sha256sums_x86_64=('${x64Sha}')`,
|
|
120
|
-
"",
|
|
121
|
-
"package() {",
|
|
122
|
-
' install -Dm755 ./opencode "${pkgdir}/usr/bin/opencode"',
|
|
123
|
-
"}",
|
|
124
|
-
"",
|
|
125
|
-
].join("\n")
|
|
126
|
-
|
|
127
|
-
for (const [pkg, pkgbuild] of [["opencode-bin", binaryPkgbuild]]) {
|
|
128
|
-
for (let i = 0; i < 30; i++) {
|
|
129
|
-
try {
|
|
130
|
-
await $`rm -rf ./dist/aur-${pkg}`
|
|
131
|
-
await $`git clone ssh://aur@aur.archlinux.org/${pkg}.git ./dist/aur-${pkg}`
|
|
132
|
-
await $`cd ./dist/aur-${pkg} && git checkout master`
|
|
133
|
-
await Bun.file(`./dist/aur-${pkg}/PKGBUILD`).write(pkgbuild)
|
|
134
|
-
await $`cd ./dist/aur-${pkg} && makepkg --printsrcinfo > .SRCINFO`
|
|
135
|
-
await $`cd ./dist/aur-${pkg} && git add PKGBUILD .SRCINFO`
|
|
136
|
-
if ((await $`cd ./dist/aur-${pkg} && git diff --cached --quiet`.nothrow()).exitCode === 0) break
|
|
137
|
-
await $`cd ./dist/aur-${pkg} && git commit -m "Update to v${Script.version}"`
|
|
138
|
-
await $`cd ./dist/aur-${pkg} && git push`
|
|
139
|
-
break
|
|
140
|
-
} catch {
|
|
141
|
-
continue
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
// Homebrew formula
|
|
147
|
-
const homebrewFormula = [
|
|
148
|
-
"# typed: false",
|
|
149
|
-
"# frozen_string_literal: true",
|
|
150
|
-
"",
|
|
151
|
-
"# This file was generated by GoReleaser. DO NOT EDIT.",
|
|
152
|
-
"class Opencode < Formula",
|
|
153
|
-
` desc "The AI coding agent built for the terminal."`,
|
|
154
|
-
` homepage "https://github.com/anomalyco/opencode"`,
|
|
155
|
-
` version "${Script.version.split("-")[0]}"`,
|
|
156
|
-
"",
|
|
157
|
-
` depends_on "ripgrep"`,
|
|
158
|
-
"",
|
|
159
|
-
" on_macos do",
|
|
160
|
-
" if Hardware::CPU.intel?",
|
|
161
|
-
` url "https://github.com/anomalyco/opencode/releases/download/v${Script.version}/opencode-darwin-x64.zip"`,
|
|
162
|
-
` sha256 "${macX64Sha}"`,
|
|
163
|
-
"",
|
|
164
|
-
" def install",
|
|
165
|
-
' bin.install "opencode"',
|
|
166
|
-
" end",
|
|
167
|
-
" end",
|
|
168
|
-
" if Hardware::CPU.arm?",
|
|
169
|
-
` url "https://github.com/anomalyco/opencode/releases/download/v${Script.version}/opencode-darwin-arm64.zip"`,
|
|
170
|
-
` sha256 "${macArm64Sha}"`,
|
|
171
|
-
"",
|
|
172
|
-
" def install",
|
|
173
|
-
' bin.install "opencode"',
|
|
174
|
-
" end",
|
|
175
|
-
" end",
|
|
176
|
-
" end",
|
|
177
|
-
"",
|
|
178
|
-
" on_linux do",
|
|
179
|
-
" if Hardware::CPU.intel? and Hardware::CPU.is_64_bit?",
|
|
180
|
-
` url "https://github.com/anomalyco/opencode/releases/download/v${Script.version}/opencode-linux-x64.tar.gz"`,
|
|
181
|
-
` sha256 "${x64Sha}"`,
|
|
182
|
-
" def install",
|
|
183
|
-
' bin.install "opencode"',
|
|
184
|
-
" end",
|
|
185
|
-
" end",
|
|
186
|
-
" if Hardware::CPU.arm? and Hardware::CPU.is_64_bit?",
|
|
187
|
-
` url "https://github.com/anomalyco/opencode/releases/download/v${Script.version}/opencode-linux-arm64.tar.gz"`,
|
|
188
|
-
` sha256 "${arm64Sha}"`,
|
|
189
|
-
" def install",
|
|
190
|
-
' bin.install "opencode"',
|
|
191
|
-
" end",
|
|
192
|
-
" end",
|
|
193
|
-
" end",
|
|
194
|
-
"end",
|
|
195
|
-
"",
|
|
196
|
-
"",
|
|
197
|
-
].join("\n")
|
|
198
|
-
|
|
199
|
-
const token = process.env.GITHUB_TOKEN
|
|
200
|
-
if (!token) {
|
|
201
|
-
console.error("GITHUB_TOKEN is required to update homebrew tap")
|
|
202
|
-
process.exit(1)
|
|
203
|
-
}
|
|
204
|
-
const tap = `https://x-access-token:${token}@github.com/anomalyco/homebrew-tap.git`
|
|
205
|
-
await $`rm -rf ./dist/homebrew-tap`
|
|
206
|
-
await $`git clone ${tap} ./dist/homebrew-tap`
|
|
207
|
-
await Bun.file("./dist/homebrew-tap/opencode.rb").write(homebrewFormula)
|
|
208
|
-
await $`cd ./dist/homebrew-tap && git add opencode.rb`
|
|
209
|
-
if ((await $`cd ./dist/homebrew-tap && git diff --cached --quiet`.nothrow()).exitCode !== 0) {
|
|
210
|
-
await $`cd ./dist/homebrew-tap && git commit -m "Update to v${Script.version}"`
|
|
211
|
-
await $`cd ./dist/homebrew-tap && git push`
|
|
212
|
-
}
|
|
213
|
-
}
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bun
|
|
2
|
-
|
|
3
|
-
// This script runs a separate OpenCode server to be used as a remote
|
|
4
|
-
// workspace, simulating a remote environment but all local to make
|
|
5
|
-
// debugger easier
|
|
6
|
-
//
|
|
7
|
-
// *Important*: make sure you add the debug workspace plugin first.
|
|
8
|
-
// In `.opencode/opencode.jsonc` in the root of this project add:
|
|
9
|
-
//
|
|
10
|
-
// "plugin": ["../packages/opencode/src/control-plane/dev/debug-workspace-plugin.ts"]
|
|
11
|
-
//
|
|
12
|
-
// Afterwards, run `./packages/opencode/script/run-workspace-server`
|
|
13
|
-
|
|
14
|
-
import { stat } from "node:fs/promises"
|
|
15
|
-
import { setTimeout as sleep } from "node:timers/promises"
|
|
16
|
-
|
|
17
|
-
const DEV_DATA_FILE = "/tmp/opencode-workspace-dev-data.json"
|
|
18
|
-
const RESTART_POLL_INTERVAL = 250
|
|
19
|
-
|
|
20
|
-
async function readData() {
|
|
21
|
-
return await Bun.file(DEV_DATA_FILE).json()
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
async function readDataMtime() {
|
|
25
|
-
return await stat(DEV_DATA_FILE)
|
|
26
|
-
.then((info) => info.mtimeMs)
|
|
27
|
-
.catch((error) => {
|
|
28
|
-
if (typeof error === "object" && error && "code" in error && error.code === "ENOENT") {
|
|
29
|
-
return undefined
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
throw error
|
|
33
|
-
})
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
async function readSnapshot() {
|
|
37
|
-
while (true) {
|
|
38
|
-
try {
|
|
39
|
-
const before = await readDataMtime()
|
|
40
|
-
if (before === undefined) {
|
|
41
|
-
await sleep(RESTART_POLL_INTERVAL)
|
|
42
|
-
continue
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
const data = await readData()
|
|
46
|
-
const after = await readDataMtime()
|
|
47
|
-
|
|
48
|
-
if (before === after) {
|
|
49
|
-
return { data, mtime: after }
|
|
50
|
-
}
|
|
51
|
-
} catch (error) {
|
|
52
|
-
if (typeof error === "object" && error && "code" in error && error.code === "ENOENT") {
|
|
53
|
-
await sleep(RESTART_POLL_INTERVAL)
|
|
54
|
-
continue
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
throw error
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
function startDevServer(data: any) {
|
|
63
|
-
const env = Object.fromEntries(Object.entries(data.env ?? {}).filter(([, value]) => value !== undefined))
|
|
64
|
-
|
|
65
|
-
return Bun.spawn(["bun", "run", "dev", "serve", "--port", String(data.port), "--print-logs"], {
|
|
66
|
-
env: {
|
|
67
|
-
...process.env,
|
|
68
|
-
...env,
|
|
69
|
-
XDG_DATA_HOME: "/tmp/data",
|
|
70
|
-
},
|
|
71
|
-
stdin: "inherit",
|
|
72
|
-
stdout: "inherit",
|
|
73
|
-
stderr: "inherit",
|
|
74
|
-
})
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
async function waitForRestartSignal(mtime: number, signal: AbortSignal) {
|
|
78
|
-
while (!signal.aborted) {
|
|
79
|
-
await sleep(RESTART_POLL_INTERVAL)
|
|
80
|
-
if (signal.aborted) return false
|
|
81
|
-
if ((await readDataMtime()) !== mtime) return true
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
return false
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
while (true) {
|
|
88
|
-
const { data, mtime } = await readSnapshot()
|
|
89
|
-
const proc = startDevServer(data)
|
|
90
|
-
const restartAbort = new AbortController()
|
|
91
|
-
|
|
92
|
-
const result = await Promise.race([
|
|
93
|
-
proc.exited.then((code) => ({ type: "exit" as const, code })),
|
|
94
|
-
waitForRestartSignal(mtime, restartAbort.signal).then((restart) => ({ type: "restart" as const, restart })),
|
|
95
|
-
])
|
|
96
|
-
|
|
97
|
-
restartAbort.abort()
|
|
98
|
-
|
|
99
|
-
if (result.type === "restart" && result.restart) {
|
|
100
|
-
proc.kill()
|
|
101
|
-
await proc.exited
|
|
102
|
-
continue
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
process.exit(result.code)
|
|
106
|
-
}
|
package/script/schema.ts
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bun
|
|
2
|
-
|
|
3
|
-
import { Config } from "@/config/config"
|
|
4
|
-
import { ConfigV1 } from "@soraacode/core/v1/config/config"
|
|
5
|
-
import { TuiConfig } from "@soraacode/tui/config"
|
|
6
|
-
import { Schema } from "effect"
|
|
7
|
-
|
|
8
|
-
type JsonSchema = Record<string, unknown>
|
|
9
|
-
const MODEL_REF = "https://models.dev/model-schema.json#/$defs/Model"
|
|
10
|
-
|
|
11
|
-
function generateEffect(schema: Schema.Top) {
|
|
12
|
-
const document = Schema.toJsonSchemaDocument(schema)
|
|
13
|
-
const normalized = normalize({
|
|
14
|
-
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
15
|
-
...document.schema,
|
|
16
|
-
$defs: document.definitions,
|
|
17
|
-
})
|
|
18
|
-
if (!isRecord(normalized)) throw new Error("schema generator produced a non-object schema")
|
|
19
|
-
const restored = restoreModelRefs(normalized)
|
|
20
|
-
if (!isRecord(restored)) throw new Error("schema generator produced a non-object schema")
|
|
21
|
-
restored.allowComments = true
|
|
22
|
-
restored.allowTrailingCommas = true
|
|
23
|
-
return restored
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
function normalize(value: unknown): unknown {
|
|
27
|
-
if (Array.isArray(value)) return value.map(normalize)
|
|
28
|
-
if (!isRecord(value)) return value
|
|
29
|
-
|
|
30
|
-
const schema = Object.fromEntries(Object.entries(value).map(([key, item]) => [key, normalize(item)]))
|
|
31
|
-
|
|
32
|
-
if (Array.isArray(schema.anyOf)) {
|
|
33
|
-
const anyOf = schema.anyOf.filter((item) => !isRecord(item) || item.type !== "null")
|
|
34
|
-
if (anyOf.length !== schema.anyOf.length) {
|
|
35
|
-
const { anyOf: _, ...rest } = schema
|
|
36
|
-
if (anyOf.length === 1 && isRecord(anyOf[0])) return normalize({ ...anyOf[0], ...rest })
|
|
37
|
-
return { ...rest, anyOf }
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
if (Array.isArray(schema.allOf) && schema.allOf.length === 1 && isRecord(schema.allOf[0])) {
|
|
42
|
-
const { allOf: _, ...rest } = schema
|
|
43
|
-
return normalize({ ...schema.allOf[0], ...rest })
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
if (schema.type === "integer" && schema.maximum === undefined) {
|
|
47
|
-
return { ...schema, maximum: Number.MAX_SAFE_INTEGER }
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
return schema
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
function restoreModelRefs(value: unknown, key?: string): unknown {
|
|
54
|
-
if (Array.isArray(value)) return value.map((item) => restoreModelRefs(item))
|
|
55
|
-
if (!isRecord(value)) return value
|
|
56
|
-
|
|
57
|
-
const schema = Object.fromEntries(Object.entries(value).map(([name, item]) => [name, restoreModelRefs(item, name)]))
|
|
58
|
-
if ((key === "model" || key === "small_model") && schema.type === "string") {
|
|
59
|
-
return { ...schema, $ref: MODEL_REF }
|
|
60
|
-
}
|
|
61
|
-
return schema
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
function isRecord(value: unknown): value is JsonSchema {
|
|
65
|
-
return typeof value === "object" && value !== null && !Array.isArray(value)
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
const configFile = process.argv[2]
|
|
69
|
-
const tuiFile = process.argv[3]
|
|
70
|
-
|
|
71
|
-
console.log(configFile)
|
|
72
|
-
await Bun.write(configFile, JSON.stringify(generateEffect(ConfigV1.Info), null, 2))
|
|
73
|
-
|
|
74
|
-
if (tuiFile) {
|
|
75
|
-
console.log(tuiFile)
|
|
76
|
-
await Bun.write(tuiFile, JSON.stringify(generateEffect(TuiConfig.Info), null, 2))
|
|
77
|
-
}
|
package/script/time.ts
DELETED
package/script/trace-imports.ts
DELETED
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bun
|
|
2
|
-
import * as path from "path"
|
|
3
|
-
import * as ts from "typescript"
|
|
4
|
-
|
|
5
|
-
const BASE_DIR = "/home/thdxr/dev/projects/anomalyco/opencode/packages/opencode"
|
|
6
|
-
|
|
7
|
-
// Get entry file from command line arg or use default
|
|
8
|
-
const ENTRY_FILE = process.argv[2] || "src/plugin/tui/runtime.ts"
|
|
9
|
-
|
|
10
|
-
const visited = new Set<string>()
|
|
11
|
-
|
|
12
|
-
function resolveImport(importPath: string, fromFile: string): string | null {
|
|
13
|
-
if (importPath.startsWith("@/")) {
|
|
14
|
-
return path.join(BASE_DIR, "src", importPath.slice(2))
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
if (importPath.startsWith("./") || importPath.startsWith("../")) {
|
|
18
|
-
const dir = path.dirname(fromFile)
|
|
19
|
-
return path.resolve(dir, importPath)
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
return null
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
function isInternalImport(importPath: string): boolean {
|
|
26
|
-
return importPath.startsWith("@/") || importPath.startsWith("./") || importPath.startsWith("../")
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
async function tryExtensions(filePath: string): Promise<string | null> {
|
|
30
|
-
const extensions = [".ts", ".tsx", ".js", ".jsx"]
|
|
31
|
-
|
|
32
|
-
try {
|
|
33
|
-
const file = Bun.file(filePath)
|
|
34
|
-
const stat = await file.stat()
|
|
35
|
-
|
|
36
|
-
if (stat?.isDirectory()) {
|
|
37
|
-
for (const ext of extensions) {
|
|
38
|
-
const indexPath = path.join(filePath, "index" + ext)
|
|
39
|
-
const indexFile = Bun.file(indexPath)
|
|
40
|
-
if (await indexFile.exists()) return indexPath
|
|
41
|
-
}
|
|
42
|
-
return null
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
// It's a file
|
|
46
|
-
return filePath
|
|
47
|
-
} catch {
|
|
48
|
-
// Path doesn't exist, try adding extensions
|
|
49
|
-
for (const ext of extensions) {
|
|
50
|
-
const withExt = filePath + ext
|
|
51
|
-
const extFile = Bun.file(withExt)
|
|
52
|
-
if (await extFile.exists()) return withExt
|
|
53
|
-
}
|
|
54
|
-
return null
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
function extractImports(sourceFile: ts.SourceFile): string[] {
|
|
59
|
-
const imports: string[] = []
|
|
60
|
-
|
|
61
|
-
function visit(node: ts.Node) {
|
|
62
|
-
// import x from "path" or import { x } from "path"
|
|
63
|
-
if (ts.isImportDeclaration(node)) {
|
|
64
|
-
// Skip type-only imports
|
|
65
|
-
if (node.importClause?.isTypeOnly) return
|
|
66
|
-
|
|
67
|
-
const moduleSpec = node.moduleSpecifier
|
|
68
|
-
if (ts.isStringLiteral(moduleSpec)) {
|
|
69
|
-
imports.push(moduleSpec.text)
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
// export { x } from "path"
|
|
74
|
-
if (ts.isExportDeclaration(node) && node.moduleSpecifier) {
|
|
75
|
-
if (ts.isStringLiteral(node.moduleSpecifier)) {
|
|
76
|
-
imports.push(node.moduleSpecifier.text)
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
// Dynamic import: import("path")
|
|
81
|
-
if (ts.isCallExpression(node) && node.expression.kind === ts.SyntaxKind.ImportKeyword) {
|
|
82
|
-
const arg = node.arguments[0]
|
|
83
|
-
if (arg && ts.isStringLiteral(arg)) {
|
|
84
|
-
imports.push(arg.text)
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
ts.forEachChild(node, visit)
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
visit(sourceFile)
|
|
92
|
-
return imports
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
async function traceFile(filePath: string, depth = 0): Promise<void> {
|
|
96
|
-
const normalizedPath = path.relative(BASE_DIR, filePath)
|
|
97
|
-
|
|
98
|
-
if (visited.has(filePath)) {
|
|
99
|
-
return
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
// Only trace TypeScript/JavaScript files
|
|
103
|
-
if (!filePath.match(/\.(ts|tsx|js|jsx)$/)) {
|
|
104
|
-
return
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
visited.add(filePath)
|
|
108
|
-
console.log("\t".repeat(depth) + normalizedPath)
|
|
109
|
-
|
|
110
|
-
let content: string
|
|
111
|
-
try {
|
|
112
|
-
content = await Bun.file(filePath).text()
|
|
113
|
-
} catch {
|
|
114
|
-
return
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
const sourceFile = ts.createSourceFile(filePath, content, ts.ScriptTarget.Latest, true)
|
|
118
|
-
|
|
119
|
-
const imports = extractImports(sourceFile)
|
|
120
|
-
const internalImports = imports.filter(isInternalImport)
|
|
121
|
-
const externalImports = imports.filter((imp) => !isInternalImport(imp))
|
|
122
|
-
|
|
123
|
-
// Print external imports
|
|
124
|
-
for (const imp of externalImports) {
|
|
125
|
-
console.log("\t".repeat(depth + 1) + `[ext] ${imp}`)
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
for (const imp of internalImports) {
|
|
129
|
-
const resolved = resolveImport(imp, filePath)
|
|
130
|
-
if (!resolved) continue
|
|
131
|
-
|
|
132
|
-
const actualPath = await tryExtensions(resolved)
|
|
133
|
-
if (!actualPath) continue
|
|
134
|
-
|
|
135
|
-
await traceFile(actualPath, depth + 1)
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
async function main() {
|
|
140
|
-
const entryPath = path.join(BASE_DIR, ENTRY_FILE)
|
|
141
|
-
|
|
142
|
-
// Check if file exists
|
|
143
|
-
const file = Bun.file(entryPath)
|
|
144
|
-
if (!(await file.exists())) {
|
|
145
|
-
console.error(`File not found: ${ENTRY_FILE}`)
|
|
146
|
-
console.error(`Resolved to: ${entryPath}`)
|
|
147
|
-
process.exit(1)
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
await traceFile(entryPath)
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
main().catch(console.error)
|
package/soraacode-0.1.7.tgz
DELETED
|
Binary file
|