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
4 changes: 2 additions & 2 deletions .agents/skills/coding-style/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: "TypeScript coding conventions for Busy Octopus. Use when writing,

# Busy Octopus Coding Style

These rules cover design choices that TypeScript, Biome, and Vitest do not fully express. Let repository configuration own mechanical formatting and lint rules. Read `.agents/skills/code-docs/SKILL.md` when adding or reviewing code documentation.
These rules cover design choices that TypeScript, Oxlint, Oxfmt, and Vitest do not fully express. Let repository configuration own mechanical formatting and lint rules. Read `.agents/skills/code-docs/SKILL.md` when adding or reviewing code documentation.

Do not insert line breaks solely to enforce a source width. Keep each Markdown paragraph and list item on one source line, and use line breaks in code documentation only when they express semantic structure required by the code documentation conventions.

Expand All @@ -19,7 +19,7 @@ When one style violation is found, scan every in-scope authored file for the sam

- Never use `any`. Accept uncertain values as `unknown`, narrow them, and use Zod for untrusted runtime input.
- Avoid type assertions. `as const` is allowed. Any other assertion requires a precise explanation and explicit human approval when a sound refactor, narrowing check, `satisfies`, or runtime schema cannot express the invariant.
- Do not add suppression comments such as `@ts-ignore`, `@ts-expect-error`, or Biome ignores without explicit approval. Compile-failure tests may use `@ts-expect-error` when TypeScript checks the directive itself.
- Do not add suppression comments such as `@ts-ignore`, `@ts-expect-error`, Oxlint disable comments, or Oxfmt ignore comments without explicit approval. Compile-failure tests may use `@ts-expect-error` when TypeScript checks the directive itself.
- Never change runtime behavior merely to silence static analysis.
- Prefer inference for local values. Type public APIs, parameters, generic constraints, and non-obvious return contracts explicitly.
- Derive related types with TypeScript utility types instead of duplicating shapes. Give generic parameters descriptive names.
Expand Down
1 change: 1 addition & 0 deletions .agents/skills/commit-messages/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: commit-messages
description: "Commit message and pull request description format for the Busy Octopus repository. Use when creating git commits, writing or reviewing commit messages, drafting or reviewing pull request descriptions, preparing a PR body, or publishing a pull request. Keywords: git, commit, conventional commits, pull request, PR description, PR body, GitHub, gh."
allowed-tools: Read, Shell, Grep, Glob
---

# Commit and Pull Request Message Guidelines

Commit message conventions for the Busy Octopus repository, following [Conventional Commits](https://www.conventionalcommits.org/).
Expand Down
9 changes: 4 additions & 5 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,20 @@
"vscode": {
"extensions": [
"Anthropic.claude-code",
"biomejs.biome",
"github.vscode-github-actions",
"openai.chatgpt",
"oxc.oxc-vscode",
"redhat.vscode-yaml",
"TypeScriptTeam.native-preview",
"timonwong.shellcheck"
],
"settings": {
"[javascript][javascriptreact][json][jsonc][typescript][typescriptreact]": {
"editor.defaultFormatter": "biomejs.biome",
"[javascript][javascriptreact][json][jsonc][markdown][typescript][typescriptreact][yaml]": {
"editor.defaultFormatter": "oxc.oxc-vscode",
"editor.formatOnSave": true
},
"editor.codeActionsOnSave": {
"source.fixAll.biome": "explicit",
"source.organizeImports.biome": "explicit"
"source.fixAll.oxc": "explicit"
},
"files.exclude": {
".pnpm-store": true
Expand Down
13 changes: 13 additions & 0 deletions .oxfmtrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"$schema": "./node_modules/oxfmt/configuration_schema.json",
"printWidth": 80,
"sortImports": {
"groups": [
"builtin",
"external",
["internal", "parent", "sibling", "index"],
"unknown"
],
"newlinesBetween": false
}
}
100 changes: 100 additions & 0 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"categories": {
"correctness": "error",
"pedantic": "error",
"perf": "error",
"suspicious": "error"
},
"options": {
"typeAware": true
},
"overrides": [
{
// No TypeScript project includes this JavaScript configuration, so
// type-aware rules see only error types in it.
"files": [".vscode-test.mjs"],
"rules": {
"typescript/no-unsafe-argument": "off",
"typescript/no-unsafe-assignment": "off",
"typescript/no-unsafe-call": "off",
"typescript/no-unsafe-member-access": "off"
}
}
],
"plugins": ["eslint", "oxc", "typescript", "unicorn", "vitest"],
"rules": {
"eslint/default-case-last": "error",
"eslint/max-classes-per-file": "off",
"eslint/max-lines": "off",
"eslint/max-lines-per-function": "off",
"eslint/no-await-in-loop": "off",
"eslint/no-duplicate-imports": [
"error",
{
"allowSeparateTypeImports": true
}
],
"eslint/no-extra-label": "error",
"eslint/no-inline-comments": "off",
"eslint/no-label-var": "error",
"eslint/no-labels": "error",
"eslint/no-lone-blocks": "error",
"eslint/no-redeclare": "off",
"eslint/no-sequences": "error",
"eslint/no-template-curly-in-string": "error",
"eslint/no-unused-vars": [
"error",
{
"args": "all",
"argsIgnorePattern": "^_",
"ignoreRestSiblings": true
}
],
"eslint/no-var": "error",
"eslint/object-shorthand": ["error", "always"],
"eslint/prefer-arrow-callback": "error",
"eslint/prefer-const": "error",
"eslint/prefer-exponentiation-operator": "error",
"eslint/prefer-numeric-literals": "error",
"eslint/prefer-object-has-own": "error",
"eslint/prefer-regex-literals": "error",
"eslint/prefer-rest-params": "error",
"eslint/prefer-template": "error",
"eslint/require-await": "off",
"eslint/sort-imports": [
"error",
{
"ignoreCase": true,
"ignoreDeclarationSort": true
}
],
"oxc/no-const-enum": "error",
"oxc/no-map-spread": "off",
"typescript/adjacent-overload-signatures": "error",
"typescript/consistent-return": "off",
"typescript/consistent-type-exports": "error",
"typescript/consistent-type-imports": "error",
"typescript/dot-notation": "error",
"typescript/no-confusing-void-expression": [
"error",
{
"ignoreArrowShorthand": true
}
],
"typescript/no-empty-interface": "error",
"typescript/no-empty-object-type": "error",
"typescript/no-explicit-any": "error",
"typescript/no-non-null-assertion": "error",
"typescript/prefer-function-type": "error",
"typescript/prefer-literal-enum-member": "error",
"typescript/prefer-readonly-parameter-types": "off",
"typescript/require-await": "off",
"typescript/strict-void-return": "off",
"typescript/use-unknown-in-catch-callback-variable": "error",
"unicorn/no-document-cookie": "error",
"unicorn/prefer-node-protocol": "error",
"unicorn/prefer-number-properties": "error",
"vitest/no-conditional-in-test": "off"
}
}
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ These rules apply to the entire repository.
## Project

- Build Busy Octopus as one flat pnpm package in strict TypeScript unless an independently versioned component genuinely requires a separate package.
- Use Biome for formatting and linting, Vitest for Node tests, the VS Code Test CLI with Mocha and Chai for real extension-host tests, and esbuild for the distributable CLI and VS Code extension bundles.
- Use Oxfmt for formatting, Oxlint with type-aware rules for linting, Vitest for Node tests, the VS Code Test CLI with Mocha and Chai for real extension-host tests, and esbuild for the distributable CLI and VS Code extension bundles.
- Publish `busy-octopus` with the `busy-octopus` executable and the `mindedtech.busy-octopus` VS Code extension from one synchronized version.
- Keep the public core generic. Codex, Claude Code, and future tools are integrations that adapt their events into notification requests.
- Keep the queue protocol internal until the public library contract is stable.
Expand Down
52 changes: 26 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ busy-octopus agent setup claude-code

Approve the new hooks:

| Provider | Approval |
| --- | --- |
| Codex | Open `/hooks`, review the Busy Octopus hooks, and trust them. |
| Claude Code | Accept the workspace trust prompt. |
| Provider | Approval |
| ----------- | ------------------------------------------------------------- |
| Codex | Open `/hooks`, review the Busy Octopus hooks, and trust them. |
| Claude Code | Accept the workspace trust prompt. |

Run `busy-octopus agent setup --help` for attention notifications and other options.

Expand Down Expand Up @@ -82,14 +82,14 @@ The test notification uses the normal settings. Disable `busyOctopus.focusSuppre

## Settings

| Setting | Default | Effect when enabled |
| --- | --- | --- |
| `busyOctopus.editor.enable` | `false` | Show notifications in VS Code. |
| `busyOctopus.focusSuppression.enable` | `true` | Suppress notifications while the target workspace window has focus. |
| `busyOctopus.detail.enable` | `true` | Include notification details. |
| `busyOctopus.windows.notification.enable` | `true` | Show native Windows notifications. |
| `busyOctopus.windows.notification.sound.enable` | `false` | Play the default Windows notification sound. |
| `busyOctopus.windows.taskbar.flash.enable` | `true` | Flash the workspace taskbar button on Windows. |
| Setting | Default | Effect when enabled |
| ----------------------------------------------- | ------- | ------------------------------------------------------------------- |
| `busyOctopus.editor.enable` | `false` | Show notifications in VS Code. |
| `busyOctopus.focusSuppression.enable` | `true` | Suppress notifications while the target workspace window has focus. |
| `busyOctopus.detail.enable` | `true` | Include notification details. |
| `busyOctopus.windows.notification.enable` | `true` | Show native Windows notifications. |
| `busyOctopus.windows.notification.sound.enable` | `false` | Play the default Windows notification sound. |
| `busyOctopus.windows.taskbar.flash.enable` | `true` | Flash the workspace taskbar button on Windows. |

On Windows, clicking a native notification opens its workspace, including WSL and Dev Container workspaces. Taskbar flashing can target a window after it has received focus once during the extension session.

Expand All @@ -101,20 +101,20 @@ Notifications are not consumed in Restricted Mode or virtual workspaces.

Completion notifications are configured by default:

| Provider | Event | Details |
| --- | --- | --- |
| Codex | `Stop` | Final response, when available. |
| Claude Code | `Stop` | Final response, when available. |
| Claude Code | `StopFailure` | Turn stopped with an error. |
| Provider | Event | Details |
| ----------- | ------------- | ------------------------------- |
| Codex | `Stop` | Final response, when available. |
| Claude Code | `Stop` | Final response, when available. |
| Claude Code | `StopFailure` | Turn stopped with an error. |

The `--enable-attention` setup option adds:

| Provider | Event | Message |
| --- | --- | --- |
| Codex | `PreToolUse` for `request_user_input` or `request_user_input_async` | Input required. |
| Claude Code | `PreToolUse` for `AskUserQuestion` | Input required. |
| Claude Code | `Notification` for `permission_prompt` | Approval required. |
| Claude Code | Elicitation and agent-input notifications | Input required. |
| Provider | Event | Message |
| ----------- | ------------------------------------------------------------------- | ------------------ |
| Codex | `PreToolUse` for `request_user_input` or `request_user_input_async` | Input required. |
| Claude Code | `PreToolUse` for `AskUserQuestion` | Input required. |
| Claude Code | `Notification` for `permission_prompt` | Approval required. |
| Claude Code | Elicitation and agent-input notifications | Input required. |

Setup preserves unrelated settings and hooks. Its project configuration files may be committed, but every user still needs `busy-octopus` on the agent's `PATH`.

Expand All @@ -124,10 +124,10 @@ Provider documentation: [Codex hooks](https://learn.chatgpt.com/docs/hooks) and

The wrapped command keeps its output and exit status. Notification errors do not change its result.

| Option | Notification content |
| --- | --- |
| Option | Notification content |
| ------------ | ---------------------------------------------- |
| `-H, --head` | Complete lines from the start, earliest first. |
| `-T, --tail` | Complete lines from the end, latest first. |
| `-T, --tail` | Complete lines from the end, latest first. |

Output is limited to 1,024 characters; a single long line uses its prefix or suffix. The output options are mutually exclusive. Without either option, command output is not included in the notification. Use `-s, --success-only` or `-f, --failure-only` to restrict notifications.

Expand Down
37 changes: 0 additions & 37 deletions biome.json

This file was deleted.

Loading
Loading