Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,5 @@ test("skills link to Console only for virtual skills while signed in, except the
expect(consoleSkillLink(deploy, workspace, false)).toBeUndefined()
expect(consoleSkillLink({ id: "deploy", path: "/home/me/.skills/deploy/SKILL.md" }, workspace, true)).toBeUndefined()
expect(consoleSkillLink({ id: "report", path: "skill://report/SKILL.md" }, workspace, true)).toBeUndefined()
expect(consoleSkillLink({ id: "shuvcode", path: "skill://shuvcode/SKILL.md" }, workspace, true)).toBeUndefined()
})
2 changes: 1 addition & 1 deletion packages/app/src/settings/providers/console-extensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export function consoleSkillLink(

const slug = /^skill:\/\/([^/]+)\//.exec(skill.path)?.[1]

if (!slug || ["opencode", "report", "browser"].includes(skill.id)) return
if (!slug || ["shuvcode", "opencode", "report", "browser"].includes(skill.id)) return

if (!workspace) return CONSOLE_URL

Expand Down
4 changes: 2 additions & 2 deletions packages/app/src/voice/spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// (VoiceTranscript.swift) and docs/voice-gpt-live.md; no runtime Swift dependency.
export const version = 1

export const liveInstructions = `You are OpenCode's voice assistant, GPT-Live. Speak naturally and briefly.
export const liveInstructions = `You are Shuvcode's voice assistant, GPT-Live. Speak naturally and briefly.
Delegate requests about coding, sessions, navigation, models, or work to your Responses backend. It has the tools; you do not.
Nothing happens unless you delegate. If you say you're doing something, delegate it in that same turn; if you won't delegate, ask or answer instead.
"It didn't work" or "nothing happened" is a request to check: delegate it. Always delegate status checks.
Expand All @@ -13,7 +13,7 @@ Do not read IDs, code blocks, or long paths aloud. Summarize results in one to t
Background speech and remarks to other people are not requests. Ask once if a request is unintelligible.
Do not speak until the user speaks.`

const instructions = `You are the delegator behind OpenCode's Desktop voice assistant. The user talks to a voice agent while Desktop shows one session at a time; it hands you what they asked, you act with tools and reply with what it should say.
const instructions = `You are the delegator behind Shuvcode's Desktop voice assistant. The user talks to a voice agent while Desktop shows one session at a time; it hands you what they asked, you act with tools and reply with what it should say.
You manage sessions; you never write code yourself. Coding work happens by sending a message to a session, whose own agent does the work.
- "This session", "here", "it" mean the viewed session below.
- To switch what the user sees, call open_session. Do NOT call open_session just to message, read, or check another session: pass session_id to send_message or read_session so the user's view stays put unless they asked to switch. The screen moved only if open_session returned opened.
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/artifact.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ const layer = Layer.effect(
name: "Local",
capabilities: ["static"],
prompt:
"Artifacts are served as HTML by this OpenCode server. Only people who can reach this server can open them.",
"Artifacts are served as HTML by this Shuvcode server. Only people who can reach this server can open them.",
create: (input) =>
replaceDirectoryFiles(itemDir(input.id), input.files).pipe(Effect.as({ url: viewURL(input.id) })),
read: (id) => readDirectoryFiles(itemDir(id)),
Expand Down
16 changes: 8 additions & 8 deletions packages/core/src/automation/code.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ export function handoffOutput(delivery: string, logs?: string) {
const FORBIDDEN_TOOLS = new Set([
// Approving the shell tool unattended would approve every command, not a particular command.
"shell",
"opencode.automation_create",
"opencode.automation_pause",
"opencode.automation_resume",
"opencode.automation_delete",
"opencode.session_move",
"opencode.session_rename",
"opencode.worktree_create",
"opencode.worktree_remove",
"shuvcode.automation_create",
"shuvcode.automation_pause",
"shuvcode.automation_resume",
"shuvcode.automation_delete",
"shuvcode.session_move",
"shuvcode.session_rename",
"shuvcode.worktree_create",
"shuvcode.worktree_remove",
])

export interface RunInput {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ function resolutionError(ref: Model.Ref, type: string, error: ModelResolver.Erro
providerID: ref.providerID,
modelID: ref.id,
capability: type,
message: `${ref.providerID}/${ref.id} has no ${type} API opencode can call (package ${error.package})`,
message: `${ref.providerID}/${ref.id} has no ${type} API shuvcode can call (package ${error.package})`,
})
return new InvalidRequestError({ message: error.message, field: "model" })
}
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/plugin/command/automation.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ Manage this project's automations.

Request: $ARGUMENTS

Use the automation tools in the `opencode` namespace. They see every automation in this session's project.
Use the automation tools in the `shuvcode` namespace. They see every automation in this session's project.

- To create one, call `automation_create` with a short `name`, a `trigger` and an `action`.
- `trigger`: `{ type: "at", at: "in 20 minutes" }` or `{ type: "at", at: "2026-10-27T09:00" }` (runs once), `{ type: "every", every: "1 hour" }` or `{ type: "cron", cron: "0 9 * * 1-5" }`, each with an optional `tz`.
- For a connected MCP server advertising push delivery, use `{ type: "event", server, event, args? }` instead of a timer. With `mcp_events` enabled, list event types with `watch_mcp_event` **without** an event name; do not open a separate wake-up watch. `args` must match `inputSchema`. A code action receives `input.event = { id, timestamp, data }`; `data` is checked against `payloadSchema`. A plain prompt includes the event as untrusted data.
- A watch starts when its stream opens. After interruption it requests replay from the saved cursor. The server controls retention: a gap, missing replay cursor on reconnect, invalid payload or rejected handoff pauses the automation. Inspect `lastOutput`. When replay is unavailable, reconcile the source before creating a new watch from now. Delivery is not exactly once; earlier tool side effects are not rolled back.
- `action`: `{ type: "prompt", prompt }` sends `prompt` to this session; add `to: { subagent: "<agent>" }` to start a new child of this session with that agent each run (it finishes without reporting back), or `to: { session: "ses_..." }` for another session. Write `prompt` as the instruction the session will receive, with enough context to act on it without this conversation.
- Or `{ type: "code", code, args? }` runs a JavaScript string with no model, calling `tools.<path>(...)` statically (no `fetch`; 30s / 20 calls / 32 KB caps). It receives `input = { state, now, runs, args }`, where `state` starts as `null` and `now` is epoch milliseconds. For local working hours, set `tz` on a cron trigger. Return nothing or any combination of `state` (JSON for next time), `done: true` (stop), and at most one `send` per run. Omit `send` to stay quiet. `{ send: { prompt } }` steers this session; `{ send: { prompt, to: { subagent: "<agent>" } } }` starts a permitted child that won't report back. No session IDs in code results. `lastOutput` shows the delivery target and any logs.
Example: `await tools.opencode.automation_create({ name: "Third check", trigger: { type: "every", every: "1 minute" }, action: { type: "code", code: 'if (runs < 2) return; return { done: true, send: { prompt: "Three checks elapsed. Review the build." } }' } })`.
Example: `await tools.shuvcode.automation_create({ name: "Third check", trigger: { type: "every", every: "1 minute" }, action: { type: "code", code: 'if (runs < 2) return; return { done: true, send: { prompt: "Three checks elapsed. Review the build." } }' } })`.
- To stop a repeating automation at a time, add `expires`: an instant, a wall-clock time, or `"in 8 hours"`.
- To pause, resume or delete one, find its id with `automation_list`, then call `automation_pause`, `automation_resume` or `automation_delete`.
- If the request is empty, call `automation_list` and show the automations: name, trigger, status and next scheduled time (timers only).
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/plugin/command/initialize.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Create or update `AGENTS.md` for this repository.

The goal is a compact instruction file that helps future OpenCode sessions avoid mistakes and ramp up quickly. Every line should answer: "Would an agent likely miss this without help?" If not, leave it out.
The goal is a compact instruction file that helps future Shuvcode sessions avoid mistakes and ramp up quickly. Every line should answer: "Would an agent likely miss this without help?" If not, leave it out.

User-provided focus or constraints (honor these):
$ARGUMENTS
Expand All @@ -12,7 +12,7 @@ Read the highest-value sources first:
- build, test, lint, formatter, typecheck, and codegen config
- CI workflows and pre-commit / task runner config
- existing instruction files (`AGENTS.md`, `CLAUDE.md`, `.cursor/rules/`, `.cursorrules`, `.github/copilot-instructions.md`)
- repo-local OpenCode config such as `opencode.json`
- repo-local Shuvcode config such as `opencode.json`

If architecture is still unclear after reading config and docs, inspect a small number of representative code files to find the real entrypoints, package boundaries, and execution flow. Prefer reading the files that explain how the system is wired together over random leaf files.

Expand Down
12 changes: 6 additions & 6 deletions packages/core/src/plugin/skill.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ export const OpencodeContent = opencodeContent
export const ReportContent = reportContent

export const OpencodeDescription =
"Use this skill for any question about OpenCode itself, including how OpenCode works, using or configuring it, migrating from V1 to V2, troubleshooting it, developing plugins or integrations, using the OpenCode SDK, clients, server, or API, and contributing to the OpenCode codebase. Also use it for OpenCode agents, commands, skills, tools, permissions, MCP servers, providers, models, themes, keybinds, formatters, the CLI, TUI, desktop app, and web app."
"Use this skill for any question about Shuvcode (a fork of OpenCode) itself, including how Shuvcode works, using or configuring it, migrating from V1 to V2, troubleshooting it, developing plugins or integrations, using the OpenCode SDK, clients, server, or API, and contributing to the Shuvcode codebase. Also use it for Shuvcode agents, commands, skills, tools, permissions, MCP servers, providers, models, themes, keybinds, formatters, the CLI, TUI, desktop app, and web app."
const REPORT_DESCRIPTION =
"Use when the user wants to report an opencode issue or bug. Collect standard diagnostics, add user-specific reproduction context, and publish the issue with GitHub CLI."
"Use when the user wants to report a shuvcode issue or bug. Collect standard diagnostics, add user-specific reproduction context, and publish the issue with GitHub CLI."

export const Plugin = define({
id: "opencode.skill",
Expand All @@ -27,10 +27,10 @@ export const Plugin = define({
yield* ctx.skill.transform((editor) => {
editor.add(
Skill.Info.make({
id: Skill.ID.make("opencode"),
name: Skill.Name.make("OpenCode"),
id: Skill.ID.make("shuvcode"),
name: Skill.Name.make("Shuvcode"),
description: OpencodeDescription,
path: AbsolutePath.make("skill://opencode/SKILL.md"),
path: AbsolutePath.make("skill://shuvcode/SKILL.md"),
content: OpencodeContent,
}),
)
Expand Down Expand Up @@ -61,7 +61,7 @@ const reportContentWithDiagnostics = Effect.fn("SkillPlugin.reportContentWithDia
"",
"These values were captured when the built-in report skill was registered. Verify them before publishing.",
"",
`- opencode version: ${app.version}`,
`- shuvcode version: ${app.version}`,
`- install/channel: ${app.channel}`,
`- OS: ${os.type()} ${os.release()} (${os.platform()} ${os.arch()}${emulated ? ", emulated on ARM64" : ""})`,
`- Terminal: ${terminal()}`,
Expand Down
Loading
Loading