-
Notifications
You must be signed in to change notification settings - Fork 15
[codex] Warp-inspired runtime extensions #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| # External Agents | ||
|
|
||
| SharpClaw can run external agent CLIs as supervised, session-aware operations. External agents do not replace SharpClaw's runtime; they are child processes that must pass permission policy before mutating runs. | ||
|
|
||
| ## Configure | ||
|
|
||
| Use `.sharpclaw/config.jsonc`: | ||
|
|
||
| ```jsonc | ||
| { | ||
| "externalAgents": { | ||
| "enabled": true, | ||
| "requireApprovalForMutatingRuns": true, | ||
| "adapters": { | ||
| "codex": { | ||
| "executablePath": "codex", | ||
| "defaultArgs": [] | ||
| } | ||
| } | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| Built-in adapters are `claude`, `opencode`, `gemini`, and `codex`. | ||
|
|
||
| ## Use | ||
|
|
||
| ```bash | ||
| sharpclaw external list | ||
| sharpclaw external status | ||
| sharpclaw external run --adapter codex --prompt "Review this repository" | ||
| ``` | ||
|
|
||
| In the REPL: | ||
|
|
||
| ```text | ||
| /agents external list | ||
| /agents external run codex Review this repository | ||
| ``` | ||
|
|
||
| MVP support is text-mode process execution. Structured streaming is deferred until external CLIs expose stable machine-readable streams. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| # Skill Packs | ||
|
|
||
| Skill packs package reusable prompts, checklists, command templates, recommended tools, and compatible modes. Legacy workspace skills under `.sharpclaw/skills` are still supported; skill packs live under `.sharpclaw/skillpacks`. | ||
|
|
||
| ## Manifest | ||
|
|
||
| `skillpack.json`: | ||
|
|
||
| ```json | ||
| { | ||
| "id": "pr-review", | ||
| "name": "PR Review", | ||
| "version": "1.0.0", | ||
| "description": "Reviews diffs for correctness, tests, security, and maintainability.", | ||
| "author": "team", | ||
| "tags": ["review"], | ||
| "commands": [ | ||
| { | ||
| "name": "run", | ||
| "description": "Run the review", | ||
| "promptTemplate": "Review this diff: {{arguments}}" | ||
| } | ||
| ], | ||
| "prompts": [], | ||
| "checklists": [], | ||
| "recommendedTools": [], | ||
| "requiredPermissions": ["toolExecution"], | ||
| "compatibleModes": ["plan", "build"], | ||
| "entryPointPrompt": "Review this diff: {{arguments}}" | ||
| } | ||
| ``` | ||
|
|
||
| ## Use | ||
|
|
||
| ```bash | ||
| sharpclaw skills list | ||
| sharpclaw skills show --id pr-review | ||
| sharpclaw skills install --path ./skillpack.json | ||
| sharpclaw skills enable --id pr-review | ||
| sharpclaw skills disable --id pr-review | ||
| sharpclaw skills run --id pr-review --args "main...feature" | ||
| ``` | ||
|
|
||
| Built-in packs include PR Review, Architecture Review, Release Notes, EFH Recovery, and Figma Handoff. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| # Work Items | ||
|
|
||
| Work-item integrations import real tasks into SharpClaw sessions and export session summaries without posting back automatically. | ||
|
|
||
| ## GitHub | ||
|
|
||
| ```bash | ||
| sharpclaw work import https://github.com/owner/repo/issues/123 | ||
| sharpclaw work import https://github.com/owner/repo/pull/123 | ||
| ``` | ||
|
|
||
| Public issues and PRs work unauthenticated. Set `GITHUB_TOKEN` for private repositories or higher rate limits. | ||
|
|
||
| ## Generic JSON | ||
|
|
||
| ```bash | ||
| sharpclaw work import ./task.json --provider generic | ||
| ``` | ||
|
|
||
| The JSON shape matches `GenericWorkItemFixture`: provider, id, title, description, url, status, labels, assignee, and metadata. | ||
|
|
||
| ## Export | ||
|
|
||
| ```bash | ||
| sharpclaw work export-summary --session session_123 | ||
| ``` | ||
|
|
||
| Export creates Markdown or JSON text in command output. It does not post comments to GitHub or Jira. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| # Workbench | ||
|
|
||
| The workbench is a static terminal status surface focused on SharpClaw runtime state. It is not a terminal emulator or live dashboard. | ||
|
|
||
| ```bash | ||
| sharpclaw workbench | ||
| ``` | ||
|
|
||
| REPL commands: | ||
|
|
||
| ```text | ||
| /workbench | ||
| /sessions | ||
| /approvals | ||
| /checkpoints | ||
| /agent-status | ||
| ``` | ||
|
|
||
| The report includes the current session, goal, primary mode, active agent, approval summary, latest checkpoint, recent runtime activity, external adapter health, and warnings from operational status checks. | ||
|
|
||
| Use `--output-format json` for stable machine-readable output. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/SharpClaw.Code.Commands/Handlers/AgentStatusSlashCommandHandler.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| using SharpClaw.Code.Commands.Models; | ||
|
|
||
| namespace SharpClaw.Code.Commands; | ||
|
|
||
| /// <summary> | ||
| /// REPL alias for external agent status. | ||
| /// </summary> | ||
| public sealed class AgentStatusSlashCommandHandler(AgentsCommandHandler agentsCommandHandler) : ISlashCommandHandler | ||
| { | ||
| /// <inheritdoc /> | ||
| public string CommandName => "agent-status"; | ||
|
|
||
| /// <inheritdoc /> | ||
| public string Description => "Shows external agent adapter status."; | ||
|
|
||
| /// <inheritdoc /> | ||
| public Task<int> ExecuteAsync(SlashCommandParseResult command, CommandExecutionContext context, CancellationToken cancellationToken) | ||
| => agentsCommandHandler.ExecuteAsync(new SlashCommandParseResult(true, "agents", ["external", "status"]), context, cancellationToken); | ||
|
|
||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.