neurocode-ai 1.18.5 → 1.18.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
- "version": "1.18.5",
3
+ "version": "1.18.6",
4
4
  "name": "neurocode-ai",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -767,7 +767,7 @@ async function loadDirectorySnapshot(sdk: NeurocodeClient, directory: string) {
767
767
  directory,
768
768
  providers,
769
769
  modes,
770
- defaultModeID: agents.find((agent) => agent.mode === "primary" && agent.hidden !== true)?.name ?? "build",
770
+ defaultModeID: agents.find((agent) => agent.mode === "primary" && agent.hidden !== true)?.name ?? "neuro",
771
771
  commands: commands.toSorted((a, b) => a.name.localeCompare(b.name)),
772
772
  ...(defaultModel ? { defaultModel } : {}),
773
773
  })
@@ -187,7 +187,6 @@ const layer = Layer.effect(
187
187
  description:
188
188
  "Senior software architect agent. Emphasizes clean design, modular code, and technical pragmatism.",
189
189
  prompt: PROMPT_NEURO,
190
- color: "#6c5ce7",
191
190
  options: {},
192
191
  permission: Permission.merge(
193
192
  defaults,
@@ -203,7 +202,6 @@ const layer = Layer.effect(
203
202
  plan: {
204
203
  name: "plan",
205
204
  description: "Plan mode. Disallows all edit tools.",
206
- color: "#f59e0b",
207
205
  options: {},
208
206
  permission: Permission.merge(
209
207
  defaults,
@@ -367,7 +365,7 @@ const layer = Layer.effect(
367
365
  agents,
368
366
  values(),
369
367
  sortBy(
370
- [(x) => (cfg.default_agent ? x.name === cfg.default_agent : x.name === "build"), "desc"],
368
+ [(x) => (cfg.default_agent ? x.name === cfg.default_agent : x.name === "neuro"), "desc"],
371
369
  [(x) => x.name, "asc"],
372
370
  ),
373
371
  )
@@ -6,7 +6,7 @@ import { ServerAuth } from "@/server/auth"
6
6
 
7
7
  export const AttachCommand = cmd({
8
8
  command: "attach <url>",
9
- describe: "attach to a running opencode server",
9
+ describe: "attach to a running neurocode server",
10
10
  builder: (yargs) =>
11
11
  yargs
12
12
  .positional("url", {
@@ -40,7 +40,7 @@ export const AttachCommand = cmd({
40
40
  .option("username", {
41
41
  alias: ["u"],
42
42
  type: "string",
43
- describe: "basic auth username (defaults to NEUROCODE_SERVER_USERNAME or 'opencode')",
43
+ describe: "basic auth username (defaults to NEUROCODE_SERVER_USERNAME or 'neurocode')",
44
44
  })
45
45
  .option("mini", {
46
46
  type: "boolean",
@@ -138,9 +138,9 @@ type IssueQueryResponse = {
138
138
  }
139
139
  }
140
140
 
141
- const AGENT_USERNAME = "opencode-agent[bot]"
141
+ const AGENT_USERNAME = "neurocode-agent[bot]"
142
142
  const AGENT_REACTION = "eyes"
143
- const WORKFLOW_FILE = ".github/workflows/opencode.yml"
143
+ const WORKFLOW_FILE = ".github/workflows/neurocode.yml"
144
144
 
145
145
  // Event categories for routing
146
146
  // USER_EVENTS: triggered by user actions, have actor/issueId, support reactions/comments
@@ -200,7 +200,7 @@ export const githubInstall = Effect.fn("Cli.github.install")(function* () {
200
200
  "",
201
201
  " 3. Go to a GitHub issue and comment `/oc summarize` to see the agent in action",
202
202
  "",
203
- " Learn more about the GitHub agent - https://opencode.ai/docs/github/#usage-examples",
203
+ " Learn more about the GitHub agent - https://neurocode.ai/docs/github/#usage-examples",
204
204
  ].join("\n"),
205
205
  )
206
206
  }
@@ -284,7 +284,7 @@ export const githubInstall = Effect.fn("Cli.github.install")(function* () {
284
284
  if (installation) return s.stop("GitHub app already installed")
285
285
 
286
286
  // Open browser
287
- const url = "https://github.com/apps/opencode-agent"
287
+ const url = "https://github.com/apps/neurocode-agent"
288
288
  const command =
289
289
  process.platform === "darwin"
290
290
  ? `open "${url}"`
@@ -320,7 +320,7 @@ export const githubInstall = Effect.fn("Cli.github.install")(function* () {
320
320
  s.stop("Installed GitHub app")
321
321
 
322
322
  async function getInstallation() {
323
- return await fetch(`https://api.opencode.ai/get_github_app_installation?owner=${app.owner}&repo=${app.repo}`)
323
+ return await fetch(`https://api.neurocode.ai/get_github_app_installation?owner=${app.owner}&repo=${app.repo}`)
324
324
  .then((res) => res.json())
325
325
  .then((data) => data.installation)
326
326
  }
@@ -347,8 +347,8 @@ jobs:
347
347
  if: |
348
348
  contains(github.event.comment.body, ' /oc') ||
349
349
  startsWith(github.event.comment.body, '/oc') ||
350
- contains(github.event.comment.body, ' /opencode') ||
351
- startsWith(github.event.comment.body, '/opencode')
350
+ contains(github.event.comment.body, ' /neurocode') ||
351
+ startsWith(github.event.comment.body, '/neurocode')
352
352
  runs-on: ubuntu-latest
353
353
  permissions:
354
354
  id-token: write
@@ -362,7 +362,7 @@ jobs:
362
362
  persist-credentials: false
363
363
 
364
364
  - name: Run opencode
365
- uses: anomalyco/opencode/github@latest${envStr}
365
+ uses: anomalyco/neurocode/github@latest${envStr}
366
366
  with:
367
367
  model: ${provider}/${model}`,
368
368
  )
@@ -426,7 +426,7 @@ export const githubRun = Effect.fn("Cli.github.run")(function* (args: { event?:
426
426
  ? (payload as IssueCommentEvent | IssuesEvent).issue.number
427
427
  : (payload as PullRequestEvent | PullRequestReviewCommentEvent).pull_request.number
428
428
  const runUrl = `/${owner}/${repo}/actions/runs/${runId}`
429
- const shareBaseUrl = isMock ? "https://dev.opencode.ai" : "https://opencode.ai"
429
+ const shareBaseUrl = isMock ? "https://dev.neurocode.ai" : "https://neurocode.ai"
430
430
 
431
431
  let appToken: string
432
432
  let octoRest: Octokit
@@ -494,7 +494,7 @@ export const githubRun = Effect.fn("Cli.github.run")(function* (args: { event?:
494
494
  await addReaction(commentType)
495
495
  }
496
496
 
497
- // Setup opencode session
497
+ // Setup neurocode session
498
498
  const repoData = await fetchRepo()
499
499
  session = await runLocalEffect(
500
500
  sessionSvc.create({
@@ -514,7 +514,7 @@ export const githubRun = Effect.fn("Cli.github.run")(function* (args: { event?:
514
514
  await runLocalEffect(sessionShare.share(session.id))
515
515
  return session.id.slice(-8)
516
516
  })()
517
- console.log("opencode session", session.id)
517
+ console.log("neurocode session", session.id)
518
518
 
519
519
  // Handle event types:
520
520
  // REPO_EVENTS (schedule, workflow_dispatch): no issue/PR context, output to logs/PR only
@@ -687,7 +687,7 @@ export const githubRun = Effect.fn("Cli.github.run")(function* (args: { event?:
687
687
 
688
688
  function normalizeOidcBaseUrl(): string {
689
689
  const value = process.env["OIDC_BASE_URL"]
690
- if (!value) return "https://api.opencode.ai"
690
+ if (!value) return "https://api.neurocode.ai"
691
691
  return value.replace(/\/+$/, "")
692
692
  }
693
693
 
@@ -736,7 +736,7 @@ export const githubRun = Effect.fn("Cli.github.run")(function* (args: { event?:
736
736
  }
737
737
 
738
738
  const reviewContext = getReviewCommentContext()
739
- const mentions = (process.env["MENTIONS"] || "/opencode,/oc")
739
+ const mentions = (process.env["MENTIONS"] || "/neurocode,/oc")
740
740
  .split(",")
741
741
  .map((m) => m.trim().toLowerCase())
742
742
  .filter(Boolean)
@@ -887,7 +887,7 @@ export const githubRun = Effect.fn("Cli.github.run")(function* (args: { event?:
887
887
  }
888
888
 
889
889
  async function chat(message: string, files: PromptFiles = []) {
890
- console.log("Sending message to opencode...")
890
+ console.log("Sending message to neurocode...")
891
891
 
892
892
  return runLocalEffect(
893
893
  Effect.gen(function* () {
@@ -975,7 +975,7 @@ export const githubRun = Effect.fn("Cli.github.run")(function* (args: { event?:
975
975
 
976
976
  async function getOidcToken() {
977
977
  try {
978
- return await core.getIDToken("opencode-github-action")
978
+ return await core.getIDToken("neurocode-github-action")
979
979
  } catch (error) {
980
980
  console.error("Failed to get OIDC token:", error instanceof Error ? error.message : error)
981
981
  throw new Error(
@@ -1350,9 +1350,9 @@ export const githubRun = Effect.fn("Cli.github.run")(function* (args: { event?:
1350
1350
  const titleAlt = encodeURIComponent(session.title.substring(0, 50))
1351
1351
  const title64 = Buffer.from(session.title.substring(0, 700), "utf8").toString("base64")
1352
1352
 
1353
- return `<a href="${shareBaseUrl}/s/${shareId}"><img width="200" alt="${titleAlt}" src="https://social-cards.sst.dev/opencode-share/${title64}.png?model=${providerID}/${modelID}&version=${session.version}&id=${shareId}" /></a>\n`
1353
+ return `<a href="${shareBaseUrl}/s/${shareId}"><img width="200" alt="${titleAlt}" src="https://social-cards.sst.dev/neurocode-share/${title64}.png?model=${providerID}/${modelID}&version=${session.version}&id=${shareId}" /></a>\n`
1354
1354
  })()
1355
- const shareUrl = shareId ? `[opencode session](${shareBaseUrl}/s/${shareId})&nbsp;&nbsp;|&nbsp;&nbsp;` : ""
1355
+ const shareUrl = shareId ? `[neurocode session](${shareBaseUrl}/s/${shareId})&nbsp;&nbsp;|&nbsp;&nbsp;` : ""
1356
1356
  return `\n\n${image}${shareUrl}[github run](${runUrl})`
1357
1357
  }
1358
1358
 
@@ -187,7 +187,7 @@ export const McpAuthCommand = effectCmd({
187
187
 
188
188
  if (servers.length === 0) {
189
189
  prompts.log.warn("No OAuth-capable MCP servers configured")
190
- prompts.log.info("Remote MCP servers support OAuth by default. Add a remote server in opencode.json:")
190
+ prompts.log.info("Remote MCP servers support OAuth by default. Add a remote server in neurocode.json:")
191
191
  prompts.log.info(`
192
192
  "mcp": {
193
193
  "my-server": {
@@ -393,10 +393,10 @@ export const McpLogoutCommand = effectCmd({
393
393
 
394
394
  async function resolveConfigPath(baseDir: string, global = false) {
395
395
  // Check for existing config files (prefer .jsonc over .json, check .opencode/ subdirectory too)
396
- const candidates = [path.join(baseDir, "opencode.json"), path.join(baseDir, "opencode.jsonc")]
396
+ const candidates = [path.join(baseDir, "neurocode.json"), path.join(baseDir, "neurocode.jsonc")]
397
397
 
398
398
  if (!global) {
399
- candidates.push(path.join(baseDir, ".opencode", "opencode.json"), path.join(baseDir, ".opencode", "opencode.jsonc"))
399
+ candidates.push(path.join(baseDir, ".opencode", "neurocode.json"), path.join(baseDir, ".opencode", "neurocode.jsonc"))
400
400
  }
401
401
 
402
402
  for (const candidate of candidates) {
@@ -405,7 +405,7 @@ async function resolveConfigPath(baseDir: string, global = false) {
405
405
  }
406
406
  }
407
407
 
408
- // Default to opencode.json if none exist
408
+ // Default to neurocode.json if none exist
409
409
  return candidates[0]
410
410
  }
411
411
 
@@ -449,7 +449,7 @@ export const ProvidersLoginCommand = effectCmd({
449
449
  }
450
450
 
451
451
  yield* Prompt.log.warn(
452
- `This only stores a credential for ${provider} - you will need configure it in opencode.json, check the docs for examples.`,
452
+ `This only stores a credential for ${provider} - you will need configure it in neurocode.json, check the docs for examples.`,
453
453
  )
454
454
  }
455
455
 
@@ -458,7 +458,7 @@ export const ProvidersLoginCommand = effectCmd({
458
458
  "Amazon Bedrock authentication priority:\n" +
459
459
  " 1. Bearer token (AWS_BEARER_TOKEN_BEDROCK or /connect)\n" +
460
460
  " 2. AWS credential chain (profile, access keys, IAM roles, EKS IRSA)\n\n" +
461
- "Configure via opencode.json options (profile, region, endpoint) or\n" +
461
+ "Configure via neurocode.json options (profile, region, endpoint) or\n" +
462
462
  "AWS environment variables (AWS_PROFILE, AWS_REGION, AWS_ACCESS_KEY_ID, AWS_WEB_IDENTITY_TOKEN_FILE).",
463
463
  )
464
464
  }
@@ -1,14 +1,14 @@
1
1
  /** @jsxImportSource @opentui/solid */
2
2
  import type { ScrollBoxRenderable } from "@opentui/core"
3
3
  import { useKeyboard } from "@opentui/solid"
4
- import { registerOpencodeSpinner } from "@neurocode-ai/tui/component/register-spinner"
4
+ import { registerNeurocodeSpinner } from "@neurocode-ai/tui/component/register-spinner"
5
5
  import { Show, createMemo, indexArray } from "solid-js"
6
6
  import { SPINNER_FRAMES } from "@neurocode-ai/tui/component/spinner"
7
7
  import { RunEntryContent, separatorRows } from "./scrollback.writer"
8
8
  import type { FooterSubagentDetail, FooterSubagentTab, RunDiffStyle } from "./types"
9
9
  import type { RunFooterTheme, RunTheme } from "./theme"
10
10
 
11
- registerOpencodeSpinner()
11
+ registerNeurocodeSpinner()
12
12
 
13
13
  export const SUBAGENT_INSPECTOR_ROWS = 14
14
14
 
@@ -29,7 +29,7 @@ import type { Keymap } from "@opentui/keymap"
29
29
  import { render } from "@opentui/solid"
30
30
  import { createComponent, createSignal, type Accessor, type Setter } from "solid-js"
31
31
  import { createStore, reconcile } from "solid-js/store"
32
- import { OpencodeKeymapProvider } from "@neurocode-ai/tui/keymap"
32
+ import { NeurocodeKeymapProvider } from "@neurocode-ai/tui/keymap"
33
33
  import { RUN_COMMAND_PANEL_ROWS, RUN_SUBAGENT_PANEL_ROWS } from "./footer.command"
34
34
  import { SUBAGENT_INSPECTOR_ROWS } from "./footer.subagent"
35
35
  import { PROMPT_MAX_ROWS, TEXTAREA_MIN_ROWS } from "./footer.prompt"
@@ -300,7 +300,7 @@ export class RunFooter implements FooterApi {
300
300
  const footer = this
301
301
  void render(
302
302
  () =>
303
- createComponent(OpencodeKeymapProvider, {
303
+ createComponent(NeurocodeKeymapProvider, {
304
304
  keymap: options.keymap,
305
305
  get children() {
306
306
  return createComponent(RunFooterView, {
@@ -10,7 +10,7 @@
10
10
  /** @jsxImportSource @opentui/solid */
11
11
  import { useTerminalDimensions } from "@opentui/solid"
12
12
  import { For, Match, Show, Switch, createEffect, createMemo, createSignal, onCleanup } from "solid-js"
13
- import { registerOpencodeSpinner } from "@neurocode-ai/tui/component/register-spinner"
13
+ import { registerNeurocodeSpinner } from "@neurocode-ai/tui/component/register-spinner"
14
14
  import { createColors, createFrames } from "@neurocode-ai/tui/ui/spinner"
15
15
  import {
16
16
  RUN_SUBAGENT_PANEL_ROWS,
@@ -56,7 +56,7 @@ import type {
56
56
  import type { RunTheme } from "./theme"
57
57
  import { modelInfo } from "./variant.shared"
58
58
 
59
- registerOpencodeSpinner()
59
+ registerNeurocodeSpinner()
60
60
 
61
61
  const EMPTY_BORDER = {
62
62
  topLeft: "",
@@ -125,11 +125,11 @@ export function permissionInfo(request: PermissionRequest): PermissionInfo {
125
125
 
126
126
  export function permissionAlwaysLines(request: PermissionRequest): string[] {
127
127
  if (request.always.length === 1 && request.always[0] === "*") {
128
- return [`This will allow ${request.permission} until OpenCode is restarted.`]
128
+ return [`This will allow ${request.permission} until NeuroCode is restarted.`]
129
129
  }
130
130
 
131
131
  return [
132
- "This will allow the following patterns until OpenCode is restarted.",
132
+ "This will allow the following patterns until NeuroCode is restarted.",
133
133
  ...request.always.map((item) => `- ${item}`),
134
134
  ]
135
135
  }
@@ -13,7 +13,7 @@ import { CliRenderEvents, createCliRenderer, type CliRenderer, type ScrollbackWr
13
13
  import { createDefaultOpenTuiKeymap } from "@opentui/keymap/opentui"
14
14
  import { Global } from "@neurocode-ai/core/global"
15
15
  import { openEditor } from "@neurocode-ai/tui/editor"
16
- import { registerOpencodeKeymap } from "@neurocode-ai/tui/keymap"
16
+ import { registerNeurocodeKeymap } from "@neurocode-ai/tui/keymap"
17
17
  import { Session as SessionApi } from "@/session/session"
18
18
  import * as Locale from "@/util/locale"
19
19
  import { resolveInteractiveStdin } from "./runtime.stdin"
@@ -122,7 +122,7 @@ function splashInfo(title: string | undefined, history: RunPrompt[]) {
122
122
  }
123
123
 
124
124
  function footerLabels(input: Pick<RunInput, "agent" | "model" | "variant">): FooterLabels {
125
- const agentLabel = Locale.titlecase(input.agent ?? "build")
125
+ const agentLabel = Locale.titlecase(input.agent ?? "neuro")
126
126
 
127
127
  if (!input.model) {
128
128
  return {
@@ -196,7 +196,7 @@ export async function createRuntimeLifecycle(input: LifecycleInput): Promise<Lif
196
196
  const theme = await resolveRunTheme(renderer)
197
197
  renderer.setBackgroundColor(theme.background)
198
198
  const keymap = createDefaultOpenTuiKeymap(renderer)
199
- unregisterKeymap = registerOpencodeKeymap(keymap, renderer, input.tuiConfig)
199
+ unregisterKeymap = registerNeurocodeKeymap(keymap, renderer, input.tuiConfig)
200
200
  const state: SplashState = {
201
201
  entry: false,
202
202
  exit: false,
@@ -1,6 +1,6 @@
1
1
  // Entry and exit splash banners for direct interactive mode scrollback.
2
2
  //
3
- // Renders the full opencode entry logo and a compact [O] exit badge, plus
3
+ // Renders the full neurocode entry logo and a compact [O] exit badge, plus
4
4
  // session metadata and the resume command. These are scrollback snapshots, so
5
5
  // they become immutable terminal history once committed.
6
6
  //
@@ -194,7 +194,7 @@ function build(input: SplashWriterInput, kind: "entry" | "exit", ctx: Scrollback
194
194
  })
195
195
  }
196
196
 
197
- push(lines, body_left, top, "OpenCode", right, undefined, TextAttributes.BOLD)
197
+ push(lines, body_left, top, "NeuroCode", right, undefined, TextAttributes.BOLD)
198
198
  if (input.detail) {
199
199
  push(
200
200
  lines,
@@ -234,7 +234,7 @@ function build(input: SplashWriterInput, kind: "entry" | "exit", ctx: Scrollback
234
234
  lines,
235
235
  body_left + label.length,
236
236
  top + 1,
237
- `opencode --mini -s ${meta.session_id}`,
237
+ `neurocode --mini -s ${meta.session_id}`,
238
238
  right,
239
239
  undefined,
240
240
  TextAttributes.BOLD,
@@ -125,7 +125,7 @@ async function toolError(part: ToolPart) {
125
125
 
126
126
  export const RunCommand = effectCmd({
127
127
  command: "run [message..]",
128
- describe: "run opencode with a message",
128
+ describe: "run neurocode with a message",
129
129
  // --attach connects to a remote server (no local instance needed); the
130
130
  // default path runs an in-process server and needs the project instance.
131
131
  instance: (args) => !args.attach,
@@ -199,7 +199,7 @@ export const RunCommand = effectCmd({
199
199
  .option("username", {
200
200
  alias: ["u"],
201
201
  type: "string",
202
- describe: "basic auth username (defaults to NEUROCODE_SERVER_USERNAME or 'opencode')",
202
+ describe: "basic auth username (defaults to NEUROCODE_SERVER_USERNAME or 'neurocode')",
203
203
  })
204
204
  .option("dir", {
205
205
  type: "string",
@@ -977,7 +977,7 @@ type MiniCommandInput = {
977
977
  export async function runMini(input: MiniCommandInput) {
978
978
  if (!RunCommand.handler) throw new Error("Mini command handler is unavailable")
979
979
  await RunCommand.handler({
980
- $0: "opencode",
980
+ $0: "neurocode",
981
981
  _: ["mini"],
982
982
  message: input.prompt ? [input.prompt] : [],
983
983
  command: undefined,
@@ -6,7 +6,7 @@ import { Flag } from "@neurocode-ai/core/flag/flag"
6
6
  export const ServeCommand = effectCmd({
7
7
  command: "serve",
8
8
  builder: (yargs) => withNetworkOptions(yargs),
9
- describe: "starts a headless opencode server",
9
+ describe: "starts a headless neurocode server",
10
10
  // Server loads instances per-request via x-opencode-directory header — no
11
11
  // need for an ambient project InstanceContext at startup.
12
12
  instance: false,
@@ -17,7 +17,7 @@ export const ServeCommand = effectCmd({
17
17
  }
18
18
  const opts = yield* resolveNetworkOptions(args)
19
19
  const server = yield* Effect.promise(() => Server.listen(opts))
20
- console.log(`opencode server listening on http://${server.hostname}:${server.port}`)
20
+ console.log(`neurocode server listening on http://${server.hostname}:${server.port}`)
21
21
 
22
22
  yield* Effect.never
23
23
  }),
@@ -71,12 +71,12 @@ export function resolveThreadDirectory(project?: string, envPWD = process.env.PW
71
71
 
72
72
  export const TuiThreadCommand = cmd({
73
73
  command: "$0 [project]",
74
- describe: "start opencode tui",
74
+ describe: "start neurocode tui",
75
75
  builder: (yargs) =>
76
76
  withNetworkOptions(yargs)
77
77
  .positional("project", {
78
78
  type: "string",
79
- describe: "path to start opencode in",
79
+ describe: "path to start neurocode in",
80
80
  })
81
81
  .option("model", {
82
82
  type: "string",
@@ -24,7 +24,7 @@ interface RemovalTargets {
24
24
 
25
25
  export const UninstallCommand = {
26
26
  command: "uninstall",
27
- describe: "uninstall opencode and remove all related files",
27
+ describe: "uninstall neurocode and remove all related files",
28
28
  builder: (yargs: Argv) =>
29
29
  yargs
30
30
  .option("keep-config", {
@@ -6,7 +6,7 @@ import { InstallationVersion } from "@neurocode-ai/core/installation/version"
6
6
 
7
7
  export const UpgradeCommand = {
8
8
  command: "upgrade [target]",
9
- describe: "upgrade opencode to the latest or a specific version",
9
+ describe: "upgrade neurocode to the latest or a specific version",
10
10
  builder: (yargs: Argv) => {
11
11
  return yargs
12
12
  .positional("target", {
@@ -31,7 +31,7 @@ function getNetworkIPs() {
31
31
  export const WebCommand = effectCmd({
32
32
  command: "web",
33
33
  builder: (yargs) => withNetworkOptions(yargs),
34
- describe: "start opencode server and open web interface",
34
+ describe: "start neurocode server and open web interface",
35
35
  // Server loads instances per-request via x-opencode-directory header — no
36
36
  // ambient project InstanceContext needed at startup.
37
37
  instance: false,
package/src/cli/error.ts CHANGED
@@ -47,7 +47,7 @@ export function FormatError(input: unknown): string | undefined {
47
47
  // MCPFailed: { name: string }
48
48
  if (NamedError.hasName(input, "MCPFailed")) {
49
49
  const data = isRecord(input) && isRecord(input.data) ? stringField(input.data, "name") : undefined
50
- return `MCP server "${data}" failed. Note, opencode does not support MCP authentication yet.`
50
+ return `MCP server "${data}" failed. Note, neurocode does not support MCP authentication yet.`
51
51
  }
52
52
 
53
53
  // AccountServiceError, AccountTransportError: TaggedErrorClass
@@ -65,7 +65,7 @@ export function FormatError(input: unknown): string | undefined {
65
65
  `Model not found: ${stringField(providerModelNotFound, "providerID")}/${stringField(providerModelNotFound, "modelID")}`,
66
66
  ...(suggestions.length ? ["Did you mean: " + suggestions.join(", ")] : []),
67
67
  `Try: \`opencode models\` to list available models`,
68
- `Or check your config (opencode.json) provider/model names`,
68
+ `Or check your config (neurocode.json) provider/model names`,
69
69
  ].join("\n")
70
70
  }
71
71
 
@@ -21,8 +21,8 @@ const options = {
21
21
  },
22
22
  "mdns-domain": {
23
23
  type: "string" as const,
24
- describe: "custom domain name for mDNS service (default: opencode.local)",
25
- default: "opencode.local",
24
+ describe: "custom domain name for mDNS service (default: neurocode.local)",
25
+ default: "neurocode.local",
26
26
  },
27
27
  cors: {
28
28
  type: "string" as const,
@@ -137,7 +137,7 @@ export class Service extends Context.Service<Service, Interface>()("@neurocode/C
137
137
  export const use = serviceUse(Service)
138
138
 
139
139
  function globalConfigFile() {
140
- const candidates = ["opencode.jsonc", "opencode.json", "config.json"].map((file) =>
140
+ const candidates = ["neurocode.jsonc", "neurocode.json", "config.json"].map((file) =>
141
141
  path.join(Global.Path.config, file),
142
142
  )
143
143
  for (const file of candidates) {
@@ -256,8 +256,8 @@ const layer = Layer.effect(
256
256
  }
257
257
  }
258
258
  result = mergeConfig(result, yield* loadFile(path.join(Global.Path.config, "config.json"), env))
259
- result = mergeConfig(result, yield* loadFile(path.join(Global.Path.config, "opencode.json"), env))
260
- result = mergeConfig(result, yield* loadFile(path.join(Global.Path.config, "opencode.jsonc"), env))
259
+ result = mergeConfig(result, yield* loadFile(path.join(Global.Path.config, "neurocode.json"), env))
260
+ result = mergeConfig(result, yield* loadFile(path.join(Global.Path.config, "neurocode.jsonc"), env))
261
261
 
262
262
  const legacy = path.join(Global.Path.config, "config")
263
263
  if (existsSync(legacy)) {
@@ -423,7 +423,7 @@ const layer = Layer.effect(
423
423
 
424
424
  for (const dir of directories) {
425
425
  if (dir.endsWith(".opencode") || dir === Flag.NEUROCODE_CONFIG_DIR) {
426
- for (const file of ["opencode.json", "opencode.jsonc"]) {
426
+ for (const file of ["neurocode.json", "neurocode.jsonc"]) {
427
427
  const source = path.join(dir, file)
428
428
  yield* Effect.logDebug(`loading config from ${source}`)
429
429
  yield* merge(source, yield* loadFile(source, authEnv))
@@ -515,7 +515,7 @@ const layer = Layer.effect(
515
515
 
516
516
  const managedDir = ConfigManaged.managedConfigDir()
517
517
  if (existsSync(managedDir)) {
518
- for (const file of ["opencode.json", "opencode.jsonc"]) {
518
+ for (const file of ["neurocode.json", "neurocode.jsonc"]) {
519
519
  const source = path.join(managedDir, file)
520
520
  yield* merge(source, yield* loadFile(source), "global")
521
521
  }
@@ -22,7 +22,7 @@ interface MigrateInput {
22
22
  }
23
23
 
24
24
  /**
25
- * Migrates tui-specific keys (theme, keybinds, tui) from opencode.json files
25
+ * Migrates tui-specific keys (theme, keybinds, tui) from neurocode.json files
26
26
  * into dedicated tui.json files. Migration is performed per-directory and
27
27
  * skips only locations where a tui.json already exists.
28
28
  */
@@ -115,7 +115,7 @@ async function backupAndStripLegacy(file: string, source: string) {
115
115
  async function opencodeFiles(input: { directories: string[]; cwd: string }) {
116
116
  const files = [
117
117
  ...ConfigPaths.fileInDirectory(Global.Path.config, "opencode"),
118
- ...(await Filesystem.findUp(["opencode.json", "opencode.jsonc"], input.cwd, undefined, { rootFirst: true })),
118
+ ...(await Filesystem.findUp(["neurocode.json", "neurocode.jsonc"], input.cwd, undefined, { rootFirst: true })),
119
119
  ]
120
120
  for (const dir of unique(input.directories)) {
121
121
  files.push(...ConfigPaths.fileInDirectory(dir, "opencode"))
package/src/config/tui.ts CHANGED
@@ -104,7 +104,7 @@ const loadState = Effect.fn("TuiConfig.loadState")(function* (ctx: { directory:
104
104
  const data = ConfigParse.jsonc(expanded, configFilepath)
105
105
  if (!isRecord(data)) return {} as Info
106
106
  // Flatten a nested "tui" key so users who wrote `{ "tui": { ... } }` inside tui.json
107
- // (mirroring the old opencode.json shape) still get their settings applied.
107
+ // (mirroring the old neurocode.json shape) still get their settings applied.
108
108
  const normalized = dropUnknownKeybinds(normalize(data))
109
109
  const parsed = ConfigParse.schema(Info, normalized, configFilepath)
110
110
  const validated = parsed.attention?.sounds
package/src/index.ts CHANGED
@@ -44,7 +44,7 @@ function show(out: string) {
44
44
 
45
45
  const cli = yargs(args)
46
46
  .parserConfiguration({ "populate--": true })
47
- .scriptName("opencode")
47
+ .scriptName("neurocode")
48
48
  .wrap(100)
49
49
  .help("help", "show help")
50
50
  .alias("help", "h")
@@ -216,7 +216,7 @@ const layer: Layer.Layer<Service, never, HttpClient.HttpClient | AppProcess.Serv
216
216
  return info.formulae[0].versions.stable
217
217
  }
218
218
  const response = yield* httpOk.execute(
219
- HttpClientRequest.get("https://formulae.brew.sh/api/formula/opencode.json").pipe(
219
+ HttpClientRequest.get("https://formulae.brew.sh/api/formula/neurocode.json").pipe(
220
220
  HttpClientRequest.acceptJson,
221
221
  ),
222
222
  )
@@ -247,7 +247,7 @@ const layer: Layer.Layer<Service, never, HttpClient.HttpClient | AppProcess.Serv
247
247
  if (detectedMethod === "scoop") {
248
248
  const response = yield* httpOk.execute(
249
249
  HttpClientRequest.get(
250
- "https://raw.githubusercontent.com/ScoopInstaller/Main/master/bucket/opencode.json",
250
+ "https://raw.githubusercontent.com/ScoopInstaller/Main/master/bucket/neurocode.json",
251
251
  ).pipe(HttpClientRequest.setHeaders({ Accept: "application/json" })),
252
252
  )
253
253
  const data = yield* HttpClientResponse.schemaBodyJson(ScoopManifest)(response)
@@ -375,7 +375,7 @@ function custom(dep: CustomDep): Record<string, CustomLoader> {
375
375
  }
376
376
 
377
377
  // Region resolution precedence (highest to lowest):
378
- // 1. options.region from opencode.json provider config
378
+ // 1. options.region from neurocode.json provider config
379
379
  // 2. defaultRegion from AWS_REGION environment variable
380
380
  // 3. Default "us-east-1" (baked into defaultRegion)
381
381
  const region = options?.region ?? defaultRegion
@@ -5,7 +5,7 @@ import { testRender, useRenderer } from "@opentui/solid"
5
5
  import { createSignal } from "solid-js"
6
6
  import { createDefaultOpenTuiKeymap } from "@opentui/keymap/opentui"
7
7
  import type { QuestionRequest } from "@neurocode-ai/sdk/v2"
8
- import { OpencodeKeymapProvider, registerOpencodeKeymap } from "@neurocode-ai/tui/keymap"
8
+ import { NeurocodeKeymapProvider, registerNeurocodeKeymap } from "@neurocode-ai/tui/keymap"
9
9
  import {
10
10
  RUN_COMMAND_PANEL_ROWS,
11
11
  RUN_SUBAGENT_PANEL_ROWS,
@@ -179,10 +179,10 @@ async function renderFooter(
179
179
  function Harness() {
180
180
  const renderer = useRenderer()
181
181
  const keymap = createDefaultOpenTuiKeymap(renderer)
182
- offKeymap = registerOpencodeKeymap(keymap, renderer, config)
182
+ offKeymap = registerNeurocodeKeymap(keymap, renderer, config)
183
183
 
184
184
  return (
185
- <OpencodeKeymapProvider keymap={keymap}>
185
+ <NeurocodeKeymapProvider keymap={keymap}>
186
186
  <RunFooterView
187
187
  directory="/tmp"
188
188
  findFiles={async () => []}
@@ -216,7 +216,7 @@ async function renderFooter(
216
216
  onStatus={() => {}}
217
217
  onQueuedRemove={async () => true}
218
218
  />
219
- </OpencodeKeymapProvider>
219
+ </NeurocodeKeymapProvider>
220
220
  )
221
221
  }
222
222
 
@@ -962,10 +962,10 @@ test("direct footer shows editable prompts and additional queued work while runn
962
962
  function Harness() {
963
963
  const renderer = useRenderer()
964
964
  const keymap = createDefaultOpenTuiKeymap(renderer)
965
- offKeymap = registerOpencodeKeymap(keymap, renderer, tuiConfig)
965
+ offKeymap = registerNeurocodeKeymap(keymap, renderer, tuiConfig)
966
966
 
967
967
  return (
968
- <OpencodeKeymapProvider keymap={keymap}>
968
+ <NeurocodeKeymapProvider keymap={keymap}>
969
969
  <RunFooterView
970
970
  directory="/tmp"
971
971
  findFiles={async () => []}
@@ -1005,7 +1005,7 @@ test("direct footer shows editable prompts and additional queued work while runn
1005
1005
  onStatus={() => {}}
1006
1006
  onQueuedRemove={async () => true}
1007
1007
  />
1008
- </OpencodeKeymapProvider>
1008
+ </NeurocodeKeymapProvider>
1009
1009
  )
1010
1010
  }
1011
1011
 
@@ -1232,10 +1232,10 @@ test.skip("direct custom answer submits through keymap return binding", async ()
1232
1232
  function Harness() {
1233
1233
  const renderer = useRenderer()
1234
1234
  const keymap = createDefaultOpenTuiKeymap(renderer)
1235
- off = registerOpencodeKeymap(keymap, renderer, tuiConfig)
1235
+ off = registerNeurocodeKeymap(keymap, renderer, tuiConfig)
1236
1236
 
1237
1237
  return (
1238
- <OpencodeKeymapProvider keymap={keymap}>
1238
+ <NeurocodeKeymapProvider keymap={keymap}>
1239
1239
  <RunQuestionBody
1240
1240
  request={question}
1241
1241
  theme={RUN_THEME_FALLBACK.footer}
@@ -1244,7 +1244,7 @@ test.skip("direct custom answer submits through keymap return binding", async ()
1244
1244
  }}
1245
1245
  onReject={() => {}}
1246
1246
  />
1247
- </OpencodeKeymapProvider>
1247
+ </NeurocodeKeymapProvider>
1248
1248
  )
1249
1249
  }
1250
1250
 
@@ -1282,10 +1282,10 @@ test("direct permission rejection submits through keymap return binding", async
1282
1282
  function Harness() {
1283
1283
  const renderer = useRenderer()
1284
1284
  const keymap = createDefaultOpenTuiKeymap(renderer)
1285
- off = registerOpencodeKeymap(keymap, renderer, tuiConfig)
1285
+ off = registerNeurocodeKeymap(keymap, renderer, tuiConfig)
1286
1286
 
1287
1287
  return (
1288
- <OpencodeKeymapProvider keymap={keymap}>
1288
+ <NeurocodeKeymapProvider keymap={keymap}>
1289
1289
  <RejectField
1290
1290
  theme={RUN_THEME_FALLBACK.footer}
1291
1291
  text=""
@@ -1298,7 +1298,7 @@ test("direct permission rejection submits through keymap return binding", async
1298
1298
  }}
1299
1299
  onCancel={() => {}}
1300
1300
  />
1301
- </OpencodeKeymapProvider>
1301
+ </NeurocodeKeymapProvider>
1302
1302
  )
1303
1303
  }
1304
1304