somora 2026.930.1
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/README.md +364 -0
- package/bin/node-version.d.mts +3 -0
- package/bin/node-version.mjs +45 -0
- package/bin/somora.mjs +77 -0
- package/config.example.yaml +896 -0
- package/docs/agents.md +677 -0
- package/docs/api.md +3194 -0
- package/docs/browser.md +317 -0
- package/docs/builder.md +331 -0
- package/docs/cache-strategy.md +373 -0
- package/docs/compaction.md +253 -0
- package/docs/display.md +154 -0
- package/docs/dream-phases.md +891 -0
- package/docs/files.md +387 -0
- package/docs/imagegen.md +366 -0
- package/docs/images/somora-hero.png +0 -0
- package/docs/images/somora-mobile-2026-05-23.png +0 -0
- package/docs/images/somora-tui-2026-05-23.png +0 -0
- package/docs/images/somora-web-2026-05-23.png +0 -0
- package/docs/index.md +178 -0
- package/docs/lsp.md +93 -0
- package/docs/mcp.md +332 -0
- package/docs/memory.md +407 -0
- package/docs/mobile.md +310 -0
- package/docs/models.md +379 -0
- package/docs/projects.md +425 -0
- package/docs/realtime-voice.md +293 -0
- package/docs/resources.md +230 -0
- package/docs/sampling.md +128 -0
- package/docs/security.md +189 -0
- package/docs/sentinel.md +295 -0
- package/docs/setup.md +1217 -0
- package/docs/skills.md +501 -0
- package/docs/team.md +189 -0
- package/docs/thinking.md +463 -0
- package/docs/tmux.md +399 -0
- package/docs/tools.md +117 -0
- package/docs/videogen.md +191 -0
- package/docs/voice.md +288 -0
- package/docs/web.md +893 -0
- package/docs/wiki.md +583 -0
- package/npm-shrinkwrap.json +5670 -0
- package/package.json +116 -0
- package/src/attachments/store.ts +196 -0
- package/src/browser/change-stream.ts +31 -0
- package/src/browser/display.ts +108 -0
- package/src/browser/policy.ts +121 -0
- package/src/browser/screencast.ts +374 -0
- package/src/browser/service.ts +1337 -0
- package/src/browser/session.ts +15 -0
- package/src/browser/snapshot.ts +40 -0
- package/src/cli/auth.ts +117 -0
- package/src/cli/codex.ts +41 -0
- package/src/cli/lsp.ts +71 -0
- package/src/cli/resolvers/clawhub.ts +400 -0
- package/src/cli/setup.ts +835 -0
- package/src/cli/skill.ts +619 -0
- package/src/cli/somora.ts +548 -0
- package/src/cli/systemd-unit.ts +72 -0
- package/src/cli/team.ts +148 -0
- package/src/cli/tui/activity-stream.ts +121 -0
- package/src/cli/tui/api.ts +479 -0
- package/src/cli/tui/app.tsx +1169 -0
- package/src/cli/tui/autocomplete.tsx +55 -0
- package/src/cli/tui/commands.ts +913 -0
- package/src/cli/tui/dream-glyphs.ts +22 -0
- package/src/cli/tui/footer.tsx +15 -0
- package/src/cli/tui/format.ts +28 -0
- package/src/cli/tui/header.tsx +279 -0
- package/src/cli/tui/index.tsx +120 -0
- package/src/cli/tui/markdown.tsx +63 -0
- package/src/cli/tui/sampling.ts +162 -0
- package/src/cli/tui/separator.tsx +13 -0
- package/src/cli/tui/state.ts +42 -0
- package/src/cli/tui/stream.ts +330 -0
- package/src/cli/tui/thinking-text.ts +54 -0
- package/src/cli/tui/turn-views.tsx +499 -0
- package/src/cli/tui/types.ts +410 -0
- package/src/cli/tui/work-queue.ts +161 -0
- package/src/cli/update-args.ts +55 -0
- package/src/cli/wiki.ts +406 -0
- package/src/compaction/index.ts +28 -0
- package/src/compaction/midturn.ts +210 -0
- package/src/compaction/policy.ts +154 -0
- package/src/compaction/summarize.ts +691 -0
- package/src/compaction/template.ts +90 -0
- package/src/compaction/types.ts +148 -0
- package/src/config/loader.ts +276 -0
- package/src/config/reload.ts +43 -0
- package/src/config/types.ts +2292 -0
- package/src/dream/deep-actions.ts +324 -0
- package/src/dream/deep-dispatcher.ts +237 -0
- package/src/dream/deep-llm.ts +388 -0
- package/src/dream/deep-prompts.ts +106 -0
- package/src/dream/deep-runner.ts +757 -0
- package/src/dream/deep-skip-cache.ts +199 -0
- package/src/dream/deep-worker.ts +229 -0
- package/src/dream/json-salvage.ts +34 -0
- package/src/dream/judge.ts +188 -0
- package/src/dream/loop-state.ts +286 -0
- package/src/dream/lucid-actions.ts +303 -0
- package/src/dream/lucid-batches.ts +94 -0
- package/src/dream/lucid-prompt.ts +82 -0
- package/src/dream/lucid-runner.ts +744 -0
- package/src/dream/lucid-storage.ts +277 -0
- package/src/dream/lucid-structure.ts +102 -0
- package/src/dream/lucid-types.ts +137 -0
- package/src/dream/lucid-worker.ts +224 -0
- package/src/dream/rem-dedup.ts +502 -0
- package/src/dream/rem-extract.ts +782 -0
- package/src/dream/rem-reset-run.ts +67 -0
- package/src/dream/rem-runner.ts +696 -0
- package/src/dream/rem-worker.ts +527 -0
- package/src/dream/review-window.ts +71 -0
- package/src/dream/scheduler-state.ts +129 -0
- package/src/dream/storage.ts +497 -0
- package/src/dream/types.ts +133 -0
- package/src/dream/wiki-context.ts +133 -0
- package/src/engine/a2a.ts +33 -0
- package/src/engine/availability.ts +63 -0
- package/src/engine/claude-cli.ts +969 -0
- package/src/engine/codex-app-server-client.ts +294 -0
- package/src/engine/codex-bin.ts +49 -0
- package/src/engine/codex-cli.ts +1014 -0
- package/src/engine/codex-dynamic-tools.ts +239 -0
- package/src/engine/codex-home.ts +63 -0
- package/src/engine/codex-thread-config.ts +74 -0
- package/src/engine/context-budget.ts +257 -0
- package/src/engine/engine-meta-labels.ts +211 -0
- package/src/engine/grok-cli.ts +941 -0
- package/src/engine/inline-think.ts +59 -0
- package/src/engine/model-availability.ts +105 -0
- package/src/engine/openai-compatible.ts +2464 -0
- package/src/engine/reasoning-retry.ts +83 -0
- package/src/engine/registry.ts +13 -0
- package/src/engine/replay.ts +195 -0
- package/src/engine/sampling.ts +90 -0
- package/src/engine/thinking-params.ts +264 -0
- package/src/engine/types.ts +269 -0
- package/src/engine/user-tag.ts +24 -0
- package/src/imagegen/aspect.ts +128 -0
- package/src/imagegen/generate.ts +642 -0
- package/src/imagegen/references.ts +75 -0
- package/src/imagegen/types.ts +154 -0
- package/src/lsp/client.ts +183 -0
- package/src/lsp/fake-server.helper.mjs +42 -0
- package/src/lsp/format.ts +29 -0
- package/src/lsp/index.ts +21 -0
- package/src/lsp/manager.ts +238 -0
- package/src/lsp/registry.ts +151 -0
- package/src/mcp/config.ts +117 -0
- package/src/mcp/hub/audit.ts +55 -0
- package/src/mcp/hub/bridge.ts +115 -0
- package/src/mcp/hub/catalog.ts +69 -0
- package/src/mcp/hub/credentials.ts +406 -0
- package/src/mcp/hub/env-expand.ts +14 -0
- package/src/mcp/hub/manager.ts +770 -0
- package/src/mcp/hub/normalize.ts +213 -0
- package/src/mcp/server.ts +368 -0
- package/src/mcp/tool-schema.ts +20 -0
- package/src/media/capabilities.ts +392 -0
- package/src/media/records.ts +175 -0
- package/src/media/store.ts +217 -0
- package/src/media/types.ts +69 -0
- package/src/memory/chunking.ts +168 -0
- package/src/memory/embeddings.ts +262 -0
- package/src/memory/index.ts +15 -0
- package/src/memory/inject.ts +197 -0
- package/src/memory/manager.ts +996 -0
- package/src/memory/registry.ts +176 -0
- package/src/memory/rescan.ts +101 -0
- package/src/memory/retrieval.ts +586 -0
- package/src/memory/shared-index.ts +372 -0
- package/src/memory/slug.ts +39 -0
- package/src/memory/storage.ts +385 -0
- package/src/memory/watcher.ts +134 -0
- package/src/multimodal/blocks.ts +101 -0
- package/src/multimodal/dimensions.ts +214 -0
- package/src/multimodal/load.ts +86 -0
- package/src/multimodal/mime.ts +135 -0
- package/src/multimodal/pdf-render.ts +80 -0
- package/src/multimodal/user-content.ts +266 -0
- package/src/persona/files.ts +144 -0
- package/src/persona/loader.ts +598 -0
- package/src/persona/skill-gating-store.ts +59 -0
- package/src/persona/tool-gating-store.ts +113 -0
- package/src/projects/focus.ts +186 -0
- package/src/projects/prompt-block.ts +106 -0
- package/src/projects/scheme.ts +107 -0
- package/src/projects/store.ts +144 -0
- package/src/projects/types.ts +73 -0
- package/src/sentinel/dispatcher.ts +97 -0
- package/src/sentinel/schedule.ts +271 -0
- package/src/sentinel/scheduler.ts +840 -0
- package/src/sentinel/store.ts +259 -0
- package/src/sentinel/types.ts +221 -0
- package/src/server/activity-stream.ts +160 -0
- package/src/server/ask-calls.ts +137 -0
- package/src/server/ask-wait-graph.ts +171 -0
- package/src/server/async-tasks.ts +199 -0
- package/src/server/builder-busy.ts +86 -0
- package/src/server/builder-prompt.ts +204 -0
- package/src/server/builder-questions.ts +117 -0
- package/src/server/builder-session.ts +249 -0
- package/src/server/chat-aborts.ts +83 -0
- package/src/server/claude-config-dir.ts +71 -0
- package/src/server/claude-credential-sync.ts +454 -0
- package/src/server/env-file.ts +100 -0
- package/src/server/env.ts +115 -0
- package/src/server/heal-session.ts +151 -0
- package/src/server/history-page.ts +46 -0
- package/src/server/index.ts +7244 -0
- package/src/server/lockfile.ts +89 -0
- package/src/server/logger.ts +67 -0
- package/src/server/logs.ts +187 -0
- package/src/server/loopback-fetch.ts +130 -0
- package/src/server/openai-client.ts +89 -0
- package/src/server/prompt-assembly.ts +334 -0
- package/src/server/restart-reconcile.ts +139 -0
- package/src/server/run-turn-fallback.ts +275 -0
- package/src/server/run-turn-types.ts +91 -0
- package/src/server/run-turn.ts +1474 -0
- package/src/server/sanitize-assistant-text.ts +112 -0
- package/src/server/session-export.ts +220 -0
- package/src/server/session-queue.ts +376 -0
- package/src/server/session-workdir.ts +49 -0
- package/src/server/sse-h2-safe.ts +61 -0
- package/src/server/sse-liveness.ts +162 -0
- package/src/server/sse-serializer.ts +161 -0
- package/src/server/start-turn.ts +249 -0
- package/src/server/steer-inbox.ts +107 -0
- package/src/server/tls-keeper.ts +153 -0
- package/src/server/tool-format.ts +167 -0
- package/src/server/turn-framing.ts +52 -0
- package/src/server/turn-origin-kind.ts +74 -0
- package/src/server/turn-origin.ts +40 -0
- package/src/server/work-ledger.ts +975 -0
- package/src/server/workspace.ts +114 -0
- package/src/setup/config-edit.ts +201 -0
- package/src/setup/presets.ts +71 -0
- package/src/setup/prompt.ts +163 -0
- package/src/setup/tailscale.ts +44 -0
- package/src/skills/bin-checks.ts +227 -0
- package/src/skills/bootstrap.ts +347 -0
- package/src/skills/env-scope.ts +175 -0
- package/src/skills/gating.ts +71 -0
- package/src/skills/lint.ts +202 -0
- package/src/skills/load.ts +368 -0
- package/src/skills/path-helpers.ts +102 -0
- package/src/skills/registry.ts +178 -0
- package/src/ssh/exec.ts +142 -0
- package/src/ssh/index.ts +12 -0
- package/src/ssh/known-hosts.ts +109 -0
- package/src/ssh/pool.ts +307 -0
- package/src/storage/sessions.ts +602 -0
- package/src/team/render.ts +149 -0
- package/src/team/resolve.ts +122 -0
- package/src/team/store.ts +124 -0
- package/src/team/types.ts +111 -0
- package/src/team/write.ts +95 -0
- package/src/testing/isolated-home.mts +46 -0
- package/src/tmux/attention-watcher.ts +272 -0
- package/src/tmux/attention.ts +336 -0
- package/src/tmux/list.ts +91 -0
- package/src/tmux/origin-store.ts +102 -0
- package/src/tmux/tui-markers.ts +267 -0
- package/src/tools/agents/ask-cancel.ts +94 -0
- package/src/tools/agents/ask-result.ts +235 -0
- package/src/tools/agents/ask.ts +704 -0
- package/src/tools/agents/builder-dispatch.ts +217 -0
- package/src/tools/agents/images.ts +104 -0
- package/src/tools/agents/index.ts +42 -0
- package/src/tools/agents/long-task-timeouts.ts +39 -0
- package/src/tools/agents/session-list.ts +136 -0
- package/src/tools/agents/session-model.ts +106 -0
- package/src/tools/agents/spawn.ts +845 -0
- package/src/tools/agents/status.ts +589 -0
- package/src/tools/browser/index.ts +6 -0
- package/src/tools/browser/ops.ts +145 -0
- package/src/tools/browser/tools.ts +184 -0
- package/src/tools/builder/short-descriptions.ts +80 -0
- package/src/tools/builder/tools.ts +222 -0
- package/src/tools/docs/index.ts +1 -0
- package/src/tools/docs/tools.ts +228 -0
- package/src/tools/dream/index.ts +11 -0
- package/src/tools/dream/tools.ts +1002 -0
- package/src/tools/exec/allowlist.ts +233 -0
- package/src/tools/exec/background-detach.helper.mts +27 -0
- package/src/tools/exec/blacklist.ts +336 -0
- package/src/tools/exec/concurrency.ts +150 -0
- package/src/tools/exec/fit-output.ts +82 -0
- package/src/tools/exec/index.ts +7 -0
- package/src/tools/exec/internal-env.ts +89 -0
- package/src/tools/exec/job-store.ts +403 -0
- package/src/tools/exec/local.ts +649 -0
- package/src/tools/exec/remote.ts +399 -0
- package/src/tools/exec/tools.ts +934 -0
- package/src/tools/file/analyze.ts +378 -0
- package/src/tools/file/index.ts +2 -0
- package/src/tools/file/local.ts +707 -0
- package/src/tools/file/lsp-hook.ts +72 -0
- package/src/tools/file/persona-guard.ts +61 -0
- package/src/tools/file/policy.ts +292 -0
- package/src/tools/file/read-format.ts +129 -0
- package/src/tools/file/remote.ts +680 -0
- package/src/tools/file/replace.ts +507 -0
- package/src/tools/file/search-window.ts +224 -0
- package/src/tools/file/tools.ts +658 -0
- package/src/tools/file/write-scope.ts +182 -0
- package/src/tools/gating.ts +106 -0
- package/src/tools/image/budget.ts +82 -0
- package/src/tools/image/index.ts +7 -0
- package/src/tools/image/tools.ts +601 -0
- package/src/tools/index.ts +99 -0
- package/src/tools/memory/index.ts +12 -0
- package/src/tools/memory/tools.ts +399 -0
- package/src/tools/projects/index.ts +1 -0
- package/src/tools/projects/tools.ts +643 -0
- package/src/tools/registry.ts +427 -0
- package/src/tools/resources/index.ts +8 -0
- package/src/tools/resources/tools.ts +176 -0
- package/src/tools/resources/visibility.ts +60 -0
- package/src/tools/sentinel/index.ts +1 -0
- package/src/tools/sentinel/tools.ts +592 -0
- package/src/tools/skill/index.ts +4 -0
- package/src/tools/skill/tools.ts +285 -0
- package/src/tools/time/index.ts +5 -0
- package/src/tools/time/tools.ts +123 -0
- package/src/tools/tmux/index.ts +1 -0
- package/src/tools/tmux/local.ts +277 -0
- package/src/tools/tmux/remote.ts +168 -0
- package/src/tools/tmux/tools.ts +1064 -0
- package/src/tools/tool-output.ts +97 -0
- package/src/tools/types.ts +227 -0
- package/src/tools/video/index.ts +1 -0
- package/src/tools/video/tools.ts +425 -0
- package/src/tools/web/fetch.ts +337 -0
- package/src/tools/web/index.ts +4 -0
- package/src/tools/web/tools.ts +186 -0
- package/src/tools/wiki/index.ts +1 -0
- package/src/tools/wiki/tools.ts +445 -0
- package/src/tts/cache-gc.ts +128 -0
- package/src/tts/prepare-for-tts.ts +114 -0
- package/src/tts/service.ts +332 -0
- package/src/types/events.ts +695 -0
- package/src/types/turn-origin.ts +53 -0
- package/src/version.ts +21 -0
- package/src/videogen/dialects.ts +222 -0
- package/src/videogen/generate.ts +484 -0
- package/src/videogen/jobs.ts +178 -0
- package/src/videogen/runner.ts +125 -0
- package/src/videogen/wake.ts +119 -0
- package/src/voice/realtime/call.ts +948 -0
- package/src/voice/realtime/consult.ts +293 -0
- package/src/voice/realtime/fake-provider.ts +134 -0
- package/src/voice/realtime/manager.ts +384 -0
- package/src/voice/realtime/openai-provider.ts +471 -0
- package/src/voice/realtime/persona.ts +227 -0
- package/src/voice/realtime/session-match.ts +116 -0
- package/src/voice/realtime/types.ts +182 -0
- package/src/wiki/conflict.ts +113 -0
- package/src/wiki/explorer.ts +578 -0
- package/src/wiki/index-builder.ts +172 -0
- package/src/wiki/language.ts +134 -0
- package/src/wiki/log-builder.ts +150 -0
- package/src/wiki/map.ts +258 -0
- package/src/wiki/migration/analyze.ts +304 -0
- package/src/wiki/migration/execute.ts +689 -0
- package/src/wiki/migration/refine.ts +402 -0
- package/src/wiki/migration/store.ts +100 -0
- package/src/wiki/move-page.ts +57 -0
- package/src/wiki/structure-file.ts +192 -0
- package/src/wiki/taxonomy.ts +140 -0
- package/src/wiki/templates.ts +163 -0
- package/src/wiki/types.ts +133 -0
- package/templates/skills/README.md +24 -0
- package/templates/skills/_templates/api-wrapper/SKILL.md +26 -0
- package/templates/skills/_templates/cli-wrapper/BOOTSTRAP.md +32 -0
- package/templates/skills/_templates/cli-wrapper/SKILL.md +24 -0
- package/templates/skills/_templates/default/SKILL.md +25 -0
- package/templates/skills/builder-handover/SKILL.md +96 -0
- package/templates/skills/builder-handover/assets/ORDER.md +12 -0
- package/templates/skills/skill-author/SKILL.md +110 -0
- package/tsconfig.json +22 -0
- package/web/dist/assets/index-BaVv6pB2.js +631 -0
- package/web/dist/assets/index-BaVv6pB2.js.map +1 -0
- package/web/dist/assets/index-V3FV3Z25.css +32 -0
- package/web/dist/favicon.svg +8 -0
- package/web/dist/index.html +20 -0
- package/web/package.json +36 -0
- package/web/tsconfig.json +25 -0
- package/web-mobile/dist/apple-touch-icon.png +0 -0
- package/web-mobile/dist/assets/index-BqKt7IMx.css +1 -0
- package/web-mobile/dist/assets/index-X_vRr6cd.js +88 -0
- package/web-mobile/dist/assets/index-X_vRr6cd.js.map +1 -0
- package/web-mobile/dist/favicon.svg +8 -0
- package/web-mobile/dist/icon-192.png +0 -0
- package/web-mobile/dist/icon-512.png +0 -0
- package/web-mobile/dist/index.html +27 -0
- package/web-mobile/dist/manifest.webmanifest +32 -0
- package/web-mobile/dist/service-worker.js +90 -0
- package/web-mobile/package.json +28 -0
- package/web-mobile/tsconfig.json +25 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: __SLUG__
|
|
3
|
+
description: "__DESCRIPTION__"
|
|
4
|
+
metadata:
|
|
5
|
+
somora:
|
|
6
|
+
when_to_use: "__WHEN_TO_USE__"
|
|
7
|
+
requires:
|
|
8
|
+
env_vars: []
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# __SLUG__
|
|
12
|
+
|
|
13
|
+
This skill teaches the agent to call an HTTP API. Use somora's HTTP-capable tools (`fetch_url`, `exec` with curl, or a dedicated API tool if one exists) — never embed API keys in this body.
|
|
14
|
+
|
|
15
|
+
## Endpoints
|
|
16
|
+
|
|
17
|
+
- `GET /...` — what it does
|
|
18
|
+
- `POST /...` — what it does
|
|
19
|
+
|
|
20
|
+
## Auth
|
|
21
|
+
|
|
22
|
+
API keys live in `~/.somora/somora.env`. Declare them in `requires.env_vars` so somora reports the skill unavailable if they are missing.
|
|
23
|
+
|
|
24
|
+
## Examples
|
|
25
|
+
|
|
26
|
+
(One or two concrete request shapes.)
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# __SLUG__ — Setup
|
|
2
|
+
|
|
3
|
+
Read this once when somora reports `__SLUG__` as unavailable. Do NOT inline these steps into `SKILL.md` — that would push setup text into every agent turn.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
(Document the install command, e.g. `brew install __BIN_NAME__` or `pipx install __BIN_NAME__`.)
|
|
8
|
+
|
|
9
|
+
## Authenticate / configure
|
|
10
|
+
|
|
11
|
+
(Document required env vars and how to set them. Put secrets into `~/.somora/somora.env` — somora reads it at server start. Do NOT inject env vars per-call from inside the agent.)
|
|
12
|
+
|
|
13
|
+
Example:
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
# in ~/.somora/somora.env
|
|
17
|
+
__BIN_NAME___TOKEN=...
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
After editing `~/.somora/somora.env`, restart somora:
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
somora server restart
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Verify
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
somora skill check __SLUG__
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Should print "Skill '__SLUG__' is healthy."
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: __SLUG__
|
|
3
|
+
description: "__DESCRIPTION__"
|
|
4
|
+
metadata:
|
|
5
|
+
somora:
|
|
6
|
+
when_to_use: "__WHEN_TO_USE__"
|
|
7
|
+
requires:
|
|
8
|
+
bins: ["__BIN_NAME__"] # optional min version: "__BIN_NAME__>=1.0"
|
|
9
|
+
env_vars: [] # declared vars are auto-injected into exec
|
|
10
|
+
# commands that invoke the bins above (values
|
|
11
|
+
# from ~/.somora/somora.env)
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# __SLUG__
|
|
15
|
+
|
|
16
|
+
This skill wraps the `__BIN_NAME__` CLI. Setup details (install, auth, env-vars) live in `BOOTSTRAP.md` — read that on demand the first time the skill is reported as unavailable.
|
|
17
|
+
|
|
18
|
+
## Common operations
|
|
19
|
+
|
|
20
|
+
(Document the most useful command patterns. One line each, no `eval`/`export` in the body.)
|
|
21
|
+
|
|
22
|
+
## See also
|
|
23
|
+
|
|
24
|
+
- `BOOTSTRAP.md` — install + auth, read via `file_read` when needed.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: __SLUG__
|
|
3
|
+
description: "__DESCRIPTION__"
|
|
4
|
+
metadata:
|
|
5
|
+
somora:
|
|
6
|
+
when_to_use: "__WHEN_TO_USE__"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# __SLUG__
|
|
10
|
+
|
|
11
|
+
Describe the workflow this skill teaches. The body is loaded into agent context whenever the skill activates — keep it tight and prose-only.
|
|
12
|
+
|
|
13
|
+
## When to use
|
|
14
|
+
|
|
15
|
+
(Expanded version of `metadata.somora.when_to_use`. Mention which signals in the user request should trigger this skill.)
|
|
16
|
+
|
|
17
|
+
## Steps
|
|
18
|
+
|
|
19
|
+
1. First step
|
|
20
|
+
2. Second step
|
|
21
|
+
3. ...
|
|
22
|
+
|
|
23
|
+
## Examples
|
|
24
|
+
|
|
25
|
+
(Optional — show one or two concrete invocations.)
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: builder-handover
|
|
3
|
+
description: Hand a coding task to a builder agent (kind builder) as one complete order with builder_dispatch, let it plan or build in the project's folder, and act on its report — no terminal, no interim controls.
|
|
4
|
+
metadata:
|
|
5
|
+
somora:
|
|
6
|
+
when_to_use: When a person wants software built or changed and a builder agent exists in this somora — a new project, a feature, a fix, a refactor — and you are the agent who plans it with the person and hands the implementation over.
|
|
7
|
+
tags: [coding, builder, orchestration, projects]
|
|
8
|
+
---
|
|
9
|
+
# Handing work to a builder
|
|
10
|
+
|
|
11
|
+
A builder is a somora agent of kind `builder` (docs/builder.md): a coding
|
|
12
|
+
harness inside somora with file tools, a shell, a task list and long
|
|
13
|
+
turns. You do not drive it. You give it one complete order, it plans or
|
|
14
|
+
builds in the project's folder, and its final answer is the report that
|
|
15
|
+
wakes you. Everything between order and report is the builder's.
|
|
16
|
+
|
|
17
|
+
## 1. Agree the work with the person
|
|
18
|
+
- Say back what will be built, what "done" means in observable terms
|
|
19
|
+
(tests green, a command prints X, a page shows Y), and where.
|
|
20
|
+
- Small and clear: hand over straight away. Larger or vague: write a plan
|
|
21
|
+
file first, or let the builder plan (step 3) and show the person its plan.
|
|
22
|
+
- Do not ask the builder to decide scope for you. Scope is agreed here.
|
|
23
|
+
|
|
24
|
+
## 2. Prepare the project
|
|
25
|
+
- The project exists (`project_get`) and names its folder (`workdir`).
|
|
26
|
+
Create it with `project_create` (`workdir` = the repository folder;
|
|
27
|
+
a folder that does not exist yet is created when the project is pinned)
|
|
28
|
+
or set it with `project_update`.
|
|
29
|
+
- Decide the report path (a file inside the repository, e.g.
|
|
30
|
+
`reports/<task>.md`) and, when a plan file exists, its path.
|
|
31
|
+
|
|
32
|
+
## 3. Which builder, which phase
|
|
33
|
+
- One builder in this somora: leave `builder` out; the tool takes it.
|
|
34
|
+
- Several: choose by each builder's team description (role, model, what
|
|
35
|
+
it is for). Name it in `builder`. Never split one task between two.
|
|
36
|
+
- `phase: "plan"` when the person wants to see the plan before anything
|
|
37
|
+
changes: the builder reads the repository, writes its plan with
|
|
38
|
+
`plan_write`, answers "Plan ready" and stops. You are woken with the
|
|
39
|
+
plan; show it to the person. They press **Go** in the builder's task
|
|
40
|
+
panel (or you send the next message into that session) and the build
|
|
41
|
+
starts; you are woken again with the report.
|
|
42
|
+
- No `phase`: the builder builds straight away (the default when the
|
|
43
|
+
plan already exists as a file or the task is small).
|
|
44
|
+
- `mode` stays `unattended` unless the person will sit and answer
|
|
45
|
+
questions in the builder's window (`attended` offers it `ask_user`).
|
|
46
|
+
|
|
47
|
+
## 4. The hand-over — one call
|
|
48
|
+
```
|
|
49
|
+
builder_dispatch({
|
|
50
|
+
project: "<slug with workdir>",
|
|
51
|
+
task: "<what to build or change, which areas/files, constraints, interfaces>",
|
|
52
|
+
done_criteria: "<observable: npm test green and the CLI prints the new column>",
|
|
53
|
+
report_path: "/abs/path/to/repo/reports/<task>.md",
|
|
54
|
+
plan_path: "/abs/path/to/repo/PLAN.md", // when a plan file exists
|
|
55
|
+
phase: "plan" // when the person wants the plan first
|
|
56
|
+
})
|
|
57
|
+
```
|
|
58
|
+
Fill the order from assets/ORDER.md. The order is complete or it is not
|
|
59
|
+
an order: the builder sees nothing of this conversation — files,
|
|
60
|
+
interfaces, constraints, verification, what to return. Do not tell the
|
|
61
|
+
builder to report back to you, name your session, or "return the plan
|
|
62
|
+
via message": its final answer reaches you by itself.
|
|
63
|
+
|
|
64
|
+
The call returns at once with a `call_id`. `agent_ask_result(call_id)`
|
|
65
|
+
reads the outcome any time; the wake comes on its own.
|
|
66
|
+
|
|
67
|
+
One builder per folder at a time: `builder_dispatch` refuses a folder
|
|
68
|
+
another builder is working in ("folder busy: <who>"). Wait for that
|
|
69
|
+
report; do not retry in a loop. Orders into different folders may run
|
|
70
|
+
side by side, each wakes you separately with the builder's name.
|
|
71
|
+
|
|
72
|
+
## 5. While the builder works
|
|
73
|
+
- Do NOT check in, poll, or send "status?" messages. Do NOT set wake-up
|
|
74
|
+
triggers to look at it. The report is the only checkpoint.
|
|
75
|
+
- A correction that cannot wait is ONE message into the builder's
|
|
76
|
+
session (`agent_ask` with that session; it is steered into the running
|
|
77
|
+
turn or queued as the server decides). Everything else waits for the
|
|
78
|
+
report and becomes the next order.
|
|
79
|
+
- The builder decides routine implementation choices itself and lists
|
|
80
|
+
them in the report.
|
|
81
|
+
|
|
82
|
+
## 6. After the report
|
|
83
|
+
- Read the report file and the diff (`git status`, `git diff` in the
|
|
84
|
+
folder). Run the verification yourself where it matters (`exec` with
|
|
85
|
+
`cwd` = the folder). The builder's word is a claim, your run is the
|
|
86
|
+
proof the person gets.
|
|
87
|
+
- Tell the person in their language what was built, what you verified
|
|
88
|
+
and how, what the builder decided on its own, what is open.
|
|
89
|
+
- Accept, or send the next order: a new `builder_dispatch` for a new
|
|
90
|
+
task, or a message into the same session when its context is worth
|
|
91
|
+
keeping. Never edit the builder's work in parallel in the same folder.
|
|
92
|
+
|
|
93
|
+
## Helpers and colleagues
|
|
94
|
+
The builder may spawn helpers of its own kind for sealed sub-tasks and
|
|
95
|
+
may consult colleagues with `agent_ask`; both inherit nothing from you.
|
|
96
|
+
Do not spawn helpers for it from outside.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Order for a builder (fill every line; drop none)
|
|
2
|
+
|
|
3
|
+
Goal: <one sentence: what exists when this is done>
|
|
4
|
+
Repository: <project slug with workdir — the builder works there; no cd in the order>
|
|
5
|
+
Context: <what the code does today, the parts this touches, conventions to keep (AGENTS.md/CLAUDE.md are read by the builder itself)>
|
|
6
|
+
Change: <what to build or change: areas, files, interfaces, data, behaviour — concrete>
|
|
7
|
+
Constraints: <dependencies allowed or not, style, what must not change, no remote/push unless granted>
|
|
8
|
+
Verification: <how the builder proves it: test command, manual check, expected output>
|
|
9
|
+
Done means: <observable, one line — goes into done_criteria>
|
|
10
|
+
Report: <absolute path inside the repository — goes into report_path>
|
|
11
|
+
Plan: <absolute path when a plan file exists — goes into plan_path; or phase: "plan" when the person wants the plan first>
|
|
12
|
+
Decisions: the builder decides routine choices itself and lists them in the report.
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: skill-author
|
|
3
|
+
description: How to create, install, and fully set up a somora skill — always use the somora skill CLI, never write SKILL.md directly.
|
|
4
|
+
metadata:
|
|
5
|
+
somora:
|
|
6
|
+
when_to_use: When the user asks you to create, install, or update a somora skill (whether self-written, from a URL, or a marketplace link). Also when a skill shows as unavailable and you need to finish its setup, or when editing an existing skill.
|
|
7
|
+
tags: [meta, authoring]
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Authoring & installing somora skills
|
|
11
|
+
|
|
12
|
+
When the user asks you to create or install a skill, **always use the somora skill CLI**. Do not write SKILL.md files directly with the Write tool — the CLI pre-flights the lint that would otherwise reject your file at load time.
|
|
13
|
+
|
|
14
|
+
## Create a new skill from scratch (conversational path)
|
|
15
|
+
|
|
16
|
+
Pick a template based on what the skill does:
|
|
17
|
+
|
|
18
|
+
- `cli-wrapper` — orchestrates an installed command-line tool (e.g. wraps `gh`, `op`, `gog`)
|
|
19
|
+
- `api-wrapper` — calls an HTTP API
|
|
20
|
+
- `default` — everything else
|
|
21
|
+
|
|
22
|
+
Then run:
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
somora skill add <slug> --template <template-name> --description "<one-line>"
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Fill in the body, then **declare what the skill needs** (next section) and finish with the setup checklist below.
|
|
29
|
+
|
|
30
|
+
## Install a skill from a URL
|
|
31
|
+
|
|
32
|
+
### Direct markdown URL
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
somora skill add <slug> --from-url <https-url-to-raw-SKILL.md>
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
The CLI downloads, sniffs for HTML (rejects landing pages), lints, and only writes if everything passes.
|
|
39
|
+
|
|
40
|
+
### ClawHub marketplace
|
|
41
|
+
|
|
42
|
+
ClawHub (`https://clawhub.ai`) is OpenClaw's public skill registry. Pass the web URL directly — somora detects it, downloads the ZIP via ClawHub's public API, extracts sub-resources, and translates the frontmatter (`metadata.openclaw.*`, legacy `clawdbot`/`clawdis` too) to `metadata.somora.*` automatically.
|
|
43
|
+
|
|
44
|
+
**Prefer the owner-qualified URL** — slugs are not unique across owners:
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
somora skill add gog --from-url https://clawhub.ai/steipete/skills/gog
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
A bare-slug URL of a contested slug fails with a 409 that lists every candidate URL — re-run with the right one. Malware-blocked skills refuse to install with a precise reason; rate-limit errors (429) surface the `Retry-After` value.
|
|
51
|
+
|
|
52
|
+
## Declare what the skill needs
|
|
53
|
+
|
|
54
|
+
Requirements live in the frontmatter and are ENFORCED, not just documentation:
|
|
55
|
+
|
|
56
|
+
```yaml
|
|
57
|
+
metadata:
|
|
58
|
+
somora:
|
|
59
|
+
requires:
|
|
60
|
+
bins: ["gog>=0.30"] # binary + optional minimum version
|
|
61
|
+
env_vars: [GOG_KEYRING_PASSWORD]
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
- `bins` — somora checks existence AND the version constraint (via `--version`), and warns when the same binary exists at multiple paths (version split-brain). Declare every CLI the body invokes.
|
|
65
|
+
- `env_vars` — declare every secret/config var the CLI needs. Once the values are set in `~/.somora/somora.env`, somora injects them automatically into exec commands that invoke one of the declared `bins` — and ONLY into those. Never hardcode secrets or `export` them in the body.
|
|
66
|
+
|
|
67
|
+
## Post-install checklist (run after every install)
|
|
68
|
+
|
|
69
|
+
1. `somora skill check <slug>` — shows unavailable-reasons and warnings.
|
|
70
|
+
2. **Missing bin?** Install it (ask the user before installing system-wide; prefer the official release channel). If a version-constraint or multiple-installs warning appears, upgrade/remove the stale copy — do NOT work around it with wrapper scripts.
|
|
71
|
+
3. **Missing env vars?** Ask the user for the values and have them added to `~/.somora/somora.env` (`KEY=value` lines, one per line). The file is loaded at server start — after adding values, the user must restart somora (`systemctl --user restart somora`) before the vars are visible.
|
|
72
|
+
4. **Read `BOOTSTRAP.md`** in the skill folder if present — it holds one-time host setup (auth flows, config files) that deliberately lives outside the always-loaded body. Follow it step by step.
|
|
73
|
+
5. Re-run `somora skill check <slug>` until healthy, then run ONE real command from the skill body via exec as a smoke test before telling the user it's ready.
|
|
74
|
+
|
|
75
|
+
## Verify a skill before reload
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
somora skill check <slug>
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Exits 0 if healthy, 1 if lint errors. Run this after manual edits before relying on the skill in agent flows.
|
|
82
|
+
|
|
83
|
+
## Update a built-in skill
|
|
84
|
+
|
|
85
|
+
If somora ships a new version of a built-in (e.g. this `skill-author` skill itself), and the user's local copy is unedited, the update is applied silently on server start. If the user has edited their copy, somora preserves the edit. To force-overwrite a user copy with the bundled version:
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
somora skill update <slug>
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Remove a skill
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
somora skill remove <slug>
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
For built-ins, removal triggers a re-seed on the next server start.
|
|
98
|
+
|
|
99
|
+
## After adding or editing
|
|
100
|
+
|
|
101
|
+
The server re-reads SKILL.md at the next agent turn (no restart required). `somora skill list` reflects changes immediately. Note the asymmetry: skill FILES reload per turn, but env-var VALUES load at server start (step 3 above).
|
|
102
|
+
|
|
103
|
+
## Anti-patterns the linter rejects
|
|
104
|
+
|
|
105
|
+
- Setup instructions in the body (`Setup on this host`, `eval $(brew shellenv)`, `export X=...`) — these get loaded verbatim into agent context every turn. Use a `BOOTSTRAP.md` sibling instead (read on demand via `file_read`, not as ambient context).
|
|
106
|
+
- Inline secrets (`export TOKEN=xyz`) — declare `requires.env_vars` in frontmatter; somora reports the skill unavailable with a precise reason while they're missing and injects them into the skill's commands once set.
|
|
107
|
+
- Body > 200 lines — split into sub-resources and reference them by relative path.
|
|
108
|
+
- Full HTML documents (`<!DOCTYPE html>`, `<html>`) — happens when `--from-url` points at a marketplace landing page instead of raw markdown. Use the marketplace's canonical URL (e.g. `clawhub.ai/<owner>/skills/<slug>`) which routes through a dedicated resolver, or download SKILL.md manually and use `--from-file`.
|
|
109
|
+
|
|
110
|
+
See the `gog` skill (`~/.somora/skills/gog/`) for a clean reference implementation.
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"moduleResolution": "Bundler",
|
|
6
|
+
"lib": ["ES2022"],
|
|
7
|
+
"jsx": "react-jsx",
|
|
8
|
+
"strict": true,
|
|
9
|
+
"noUncheckedIndexedAccess": true,
|
|
10
|
+
"esModuleInterop": true,
|
|
11
|
+
"skipLibCheck": true,
|
|
12
|
+
"resolveJsonModule": true,
|
|
13
|
+
"isolatedModules": true,
|
|
14
|
+
"verbatimModuleSyntax": true,
|
|
15
|
+
"allowImportingTsExtensions": true,
|
|
16
|
+
"forceConsistentCasingInFileNames": true,
|
|
17
|
+
"rootDir": "src",
|
|
18
|
+
"outDir": "dist",
|
|
19
|
+
"noEmit": true
|
|
20
|
+
},
|
|
21
|
+
"include": ["src/**/*"]
|
|
22
|
+
}
|