@pilllesss/yorn 1.0.0
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/README.md +84 -0
- package/dist/modes/interactive/theme/dark.json +90 -0
- package/dist/modes/interactive/theme/light.json +89 -0
- package/dist/modes/interactive/theme/theme-schema.json +352 -0
- package/dist/providers/data/.manifest.json +1 -0
- package/dist/providers/data/amazon-bedrock.json +1 -0
- package/dist/providers/data/ant-ling.json +1 -0
- package/dist/providers/data/anthropic.json +1 -0
- package/dist/providers/data/azure-openai-responses.json +1 -0
- package/dist/providers/data/baseten.json +1 -0
- package/dist/providers/data/cerebras.json +1 -0
- package/dist/providers/data/cloudflare-ai-gateway.json +1 -0
- package/dist/providers/data/cloudflare-workers-ai.json +1 -0
- package/dist/providers/data/deepseek.json +1 -0
- package/dist/providers/data/fireworks.json +1 -0
- package/dist/providers/data/github-copilot.json +1 -0
- package/dist/providers/data/google-vertex.json +1 -0
- package/dist/providers/data/google.json +1 -0
- package/dist/providers/data/groq.json +1 -0
- package/dist/providers/data/huggingface.json +1 -0
- package/dist/providers/data/kimi-coding.json +1 -0
- package/dist/providers/data/minimax-cn.json +1 -0
- package/dist/providers/data/minimax.json +1 -0
- package/dist/providers/data/mistral.json +1 -0
- package/dist/providers/data/moonshotai-cn.json +1 -0
- package/dist/providers/data/moonshotai.json +1 -0
- package/dist/providers/data/nvidia.json +1 -0
- package/dist/providers/data/openai-codex.json +1 -0
- package/dist/providers/data/openai.json +1 -0
- package/dist/providers/data/opencode-go.json +1 -0
- package/dist/providers/data/opencode.json +1 -0
- package/dist/providers/data/openrouter.json +1 -0
- package/dist/providers/data/qwen-token-plan-cn.json +1 -0
- package/dist/providers/data/qwen-token-plan-individual.json +1 -0
- package/dist/providers/data/qwen-token-plan.json +1 -0
- package/dist/providers/data/together.json +1 -0
- package/dist/providers/data/vercel-ai-gateway.json +1 -0
- package/dist/providers/data/xai.json +1 -0
- package/dist/providers/data/xiaomi-token-plan-ams.json +1 -0
- package/dist/providers/data/xiaomi-token-plan-cn.json +1 -0
- package/dist/providers/data/xiaomi-token-plan-sgp.json +1 -0
- package/dist/providers/data/xiaomi.json +1 -0
- package/dist/providers/data/zai-coding-cn.json +1 -0
- package/dist/providers/data/zai.json +1 -0
- package/dist/skills/add-provider/SKILL.md +151 -0
- package/dist/skills/agent-browser/SKILL.md +51 -0
- package/dist/skills/frontend-design/LICENSE.txt +177 -0
- package/dist/skills/frontend-design/SKILL.md +55 -0
- package/dist/skills/goal/SKILL.md +44 -0
- package/dist/skills/goal/pyproject.toml +17 -0
- package/dist/skills/goal/src/goal/__init__.py +52 -0
- package/dist/skills/graphify/SKILL.md +710 -0
- package/dist/skills/graphify/references/add-watch.md +56 -0
- package/dist/skills/graphify/references/exports.md +87 -0
- package/dist/skills/graphify/references/extraction-spec.md +70 -0
- package/dist/skills/graphify/references/github-and-merge.md +46 -0
- package/dist/skills/graphify/references/hooks.md +33 -0
- package/dist/skills/graphify/references/query.md +311 -0
- package/dist/skills/graphify/references/transcribe.md +52 -0
- package/dist/skills/graphify/references/update.md +210 -0
- package/dist/skills/screenshot/SKILL.md +267 -0
- package/dist/skills/screenshot/scripts/ensure_macos_permissions.sh +54 -0
- package/dist/skills/screenshot/scripts/macos_display_info.swift +22 -0
- package/dist/skills/screenshot/scripts/macos_permissions.swift +40 -0
- package/dist/skills/screenshot/scripts/macos_window_info.swift +126 -0
- package/dist/skills/screenshot/scripts/take_screenshot.ps1 +163 -0
- package/dist/skills/screenshot/scripts/take_screenshot.py +585 -0
- package/dist/skills/security-best-practices/LICENSE.txt +201 -0
- package/dist/skills/security-best-practices/SKILL.md +86 -0
- package/dist/skills/security-best-practices/agents/openai.yaml +4 -0
- package/dist/skills/security-best-practices/references/golang-general-backend-security.md +826 -0
- package/dist/skills/security-best-practices/references/javascript-express-web-server-security.md +1158 -0
- package/dist/skills/security-best-practices/references/javascript-general-web-frontend-security.md +747 -0
- package/dist/skills/security-best-practices/references/javascript-jquery-web-frontend-security.md +678 -0
- package/dist/skills/security-best-practices/references/javascript-typescript-nextjs-web-server-security.md +1144 -0
- package/dist/skills/security-best-practices/references/javascript-typescript-react-web-frontend-security.md +990 -0
- package/dist/skills/security-best-practices/references/javascript-typescript-vue-web-frontend-security.md +791 -0
- package/dist/skills/security-best-practices/references/python-django-web-server-security.md +882 -0
- package/dist/skills/security-best-practices/references/python-fastapi-web-server-security.md +1036 -0
- package/dist/skills/security-best-practices/references/python-flask-web-server-security.md +705 -0
- package/dist/skills/theme-factory/LICENSE.txt +202 -0
- package/dist/skills/theme-factory/SKILL.md +59 -0
- package/dist/skills/theme-factory/theme-showcase.pdf +0 -0
- package/dist/skills/theme-factory/themes/arctic-frost.md +19 -0
- package/dist/skills/theme-factory/themes/botanical-garden.md +19 -0
- package/dist/skills/theme-factory/themes/desert-rose.md +19 -0
- package/dist/skills/theme-factory/themes/forest-canopy.md +19 -0
- package/dist/skills/theme-factory/themes/golden-hour.md +19 -0
- package/dist/skills/theme-factory/themes/midnight-galaxy.md +19 -0
- package/dist/skills/theme-factory/themes/modern-minimalist.md +19 -0
- package/dist/skills/theme-factory/themes/ocean-depths.md +19 -0
- package/dist/skills/theme-factory/themes/sunset-boulevard.md +19 -0
- package/dist/skills/theme-factory/themes/tech-innovation.md +19 -0
- package/dist/yorn.cjs +1773 -0
- package/package.json +86 -0
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "add-provider"
|
|
3
|
+
description: "Add or update a custom model provider in yorn (any OpenAI/Anthropic-compatible endpoint, gateway, or self-hosted server) by writing the user's models.json. Covers the complete field reference (api, models, thinkingLevelMap, cost, compat flags), per-endpoint recipes, and troubleshooting. Use when the user wants to connect a new API endpoint/model server to yorn, edit an existing custom provider, or fix one that errors."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Add a custom provider (complete guide)
|
|
7
|
+
|
|
8
|
+
Custom providers are plain JSON — a file edit, no code, no rebuild. This guide covers every field, what each is for, and how to choose values.
|
|
9
|
+
|
|
10
|
+
## Step 1 — Locate the config file
|
|
11
|
+
|
|
12
|
+
- Default: `~/.yorn/agent/models.json`
|
|
13
|
+
- If the `YORN_CODING_AGENT_DIR` environment variable is set, use `<that-dir>/models.json` instead.
|
|
14
|
+
- Check with bash (`echo $YORN_CODING_AGENT_DIR`, `ls ~/.yorn/agent/`) before writing. On Windows the home dir is `%USERPROFILE%` (in Git Bash: `~`).
|
|
15
|
+
|
|
16
|
+
## Step 2 — Read and merge, never replace
|
|
17
|
+
|
|
18
|
+
Read the existing file first. If missing, start from `{"providers": {}}`. Preserve every provider already present, their order, and their fields — modify only the target provider. Invalid JSON breaks ALL custom providers, so after writing: re-read the file and verify it parses.
|
|
19
|
+
|
|
20
|
+
## Step 3 — Choose the right `api` (wire protocol)
|
|
21
|
+
|
|
22
|
+
| Endpoint type | `api` value | Typical `baseUrl` |
|
|
23
|
+
|---|---|---|
|
|
24
|
+
| OpenAI-compatible (most gateways, vLLM, LM Studio, Together, Groq, DeepSeek, OpenRouter) | `openai-completions` | `https://host/v1` |
|
|
25
|
+
| OpenAI Responses API | `openai-responses` | `https://host/v1` |
|
|
26
|
+
| Azure OpenAI (Responses) | `azure-openai-responses` | per-deployment URL |
|
|
27
|
+
| OpenAI Codex | `openai-codex-responses` | `https://api.openai.com/v1` |
|
|
28
|
+
| Anthropic Messages (Claude or compatible proxy) | `anthropic-messages` | `https://host` (NO `/v1`) |
|
|
29
|
+
| Google AI Studio / Gemini | `google-generative-ai` | `https://generativelanguage.googleapis.com` |
|
|
30
|
+
| Google Vertex AI | `google-vertex` | per-project endpoint |
|
|
31
|
+
| AWS Bedrock | `bedrock-converse-stream` | regional endpoint |
|
|
32
|
+
| Mistral Conversations | `mistral-conversations` | `https://api.mistral.ai/v1` |
|
|
33
|
+
| yorn-messages gateway (Radius-style single-POST SSE) | `yorn-messages` | gateway URL |
|
|
34
|
+
|
|
35
|
+
Rules of thumb: if the docs say "OpenAI-compatible" use `openai-completions`. If curl to `<baseUrl>/chat/completions` works, it's `openai-completions`. Anthropic endpoints use path `/v1/messages` but `baseUrl` still omits `/v1`.
|
|
36
|
+
|
|
37
|
+
## Step 4 — Provider fields reference
|
|
38
|
+
|
|
39
|
+
```json
|
|
40
|
+
"my-provider": {
|
|
41
|
+
"name": "Human-readable name", // shown in picker. Default: the key.
|
|
42
|
+
"baseUrl": "https://host/v1", // required in practice; include path prefix the API expects
|
|
43
|
+
"apiKey": "sk-...", // plain text; optional if env var provides it (file wins if both)
|
|
44
|
+
"api": "openai-completions", // default wire protocol for all models in this provider
|
|
45
|
+
"headers": { "X-Custom": "value" }, // extra HTTP headers on every request
|
|
46
|
+
"authHeader": false, // true = ALSO send "Authorization: Bearer <apiKey>" header
|
|
47
|
+
// (for gateways that ignore the API-native auth field)
|
|
48
|
+
"oauth": "radius", // only for Radius-style OAuth gateways; mutually exclusive with apiKey
|
|
49
|
+
"compat": { ... }, // protocol quirk flags, see Step 6 — set only to fix a real problem
|
|
50
|
+
"models": [ ... ], // model list, see Step 5
|
|
51
|
+
"modelOverrides": { // tweak models of a BUILT-IN provider (context window, cost, ...)
|
|
52
|
+
"existing-model-id": { "contextWindow": 128000 }
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Decide first: **new provider** vs `modelOverrides` on an existing built-in id. Only define a new provider when connecting a new endpoint.
|
|
58
|
+
|
|
59
|
+
## Step 5 — Model fields reference (complete)
|
|
60
|
+
|
|
61
|
+
```json
|
|
62
|
+
{
|
|
63
|
+
"id": "my-model", // REQUIRED — the model id sent to the API; shown as "my-provider/my-model"
|
|
64
|
+
"name": "My Model", // display name; default: id
|
|
65
|
+
"api": "openai-completions", // per-model override of the provider's api (rare)
|
|
66
|
+
"baseUrl": "https://other-host/v1", // per-model override (rare)
|
|
67
|
+
"reasoning": true, // REQUIRED in practice — enables thinking controls in the UI.
|
|
68
|
+
// true for reasoning models (o3, R1, thinking Claude/Gemini),
|
|
69
|
+
// false for plain chat models
|
|
70
|
+
"contextWindow": 200000, // tokens — controls auto-compaction threshold. Look it up; wrong
|
|
71
|
+
// values cause truncation errors or wasted context
|
|
72
|
+
"maxTokens": 8192, // max OUTPUT tokens per response
|
|
73
|
+
"input": ["text", "image"], // modalities accepted. Omit image if not multimodal
|
|
74
|
+
"cost": { // USD per 1M tokens — drives cost display/estimates
|
|
75
|
+
"input": 3,
|
|
76
|
+
"output": 15,
|
|
77
|
+
"cacheRead": 0.3, // optional
|
|
78
|
+
"cacheWrite": 3.75, // optional
|
|
79
|
+
"tiers": [ // optional tiered pricing (batch >128K etc.)
|
|
80
|
+
{ "inputTokensAbove": 128000, "input": 6, "output": 30 }
|
|
81
|
+
]
|
|
82
|
+
},
|
|
83
|
+
"thinkingLevelMap": { // maps yorn's thinking levels to provider values
|
|
84
|
+
"off": null, // null = that level is unsupported (button hidden)
|
|
85
|
+
"low": "low", "medium": "medium", "high": "high", "max": "max"
|
|
86
|
+
},
|
|
87
|
+
"samplingParams": { "temperature": 0.7 }, // extra request body params passed through verbatim
|
|
88
|
+
"headers": { "X-Model-Specific": "v" }, // per-model extra headers (rare)
|
|
89
|
+
"compat": { ... } // per-model compat flags (see Step 6)
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
`thinkingLevelMap` keys: `off`, `minimal`, `low`, `medium`, `high`, `xhigh`, `max`. Values are strings exactly as the provider expects them (e.g. OpenAI-style `"low"/"medium"/"high"`, numeric strings, or provider-specific tokens). Include only supported levels; `off: null` hides the off switch only when a model can't run without thinking.
|
|
94
|
+
|
|
95
|
+
Minimal viable model: `id` + `contextWindow` + `maxTokens` + `reasoning`. Everything else improves fidelity.
|
|
96
|
+
|
|
97
|
+
## Step 6 — `compat` flags (only when something breaks)
|
|
98
|
+
|
|
99
|
+
Grouped by `api`. Do NOT set these preemptively — each works around a specific provider quirk.
|
|
100
|
+
|
|
101
|
+
**openai-completions**: `supportsStore`, `supportsDeveloperRole`, `supportsReasoningEffort`, `supportsUsageInStreaming`, `maxTokensField` (`"max_completion_tokens"` vs `"max_tokens"`), `requiresToolResultName`, `requiresAssistantAfterToolResult`, `requiresThinkingAsText`, `requiresReasoningContentOnAssistantMessages`, `thinkingFormat` (one of `openai`, `openrouter`, `together`, `baseten`, `deepseek`, `zai`, `qwen`, `chat-template`, `qwen-chat-template`, `string-thinking`, `ant-ling` — how reasoning is surfaced in the response), `chatTemplateKwargs`/`chatTemplateArgs` (with `{"$var": "thinking.enabled" | "thinking.effort"}`), `cacheControlFormat: "anthropic"`, `supportsOpenAIGrammarTools`, `supportsStrictMode`, `sendSessionAffinityHeaders`, `sessionAffinityFormat`, `supportsLongCacheRetention`, `deferredToolsMode: "kimi"`.
|
|
102
|
+
|
|
103
|
+
**openai-responses**: `supportsDeveloperRole`, `supportsAdditionalTools`, `supportsToolSearch`, `supportsStrictMode`, `sessionAffinityFormat`, `supportsLongCacheRetention`, `supportsOpenAIGrammarTools`.
|
|
104
|
+
|
|
105
|
+
**anthropic-messages**: `supportsTemperature`, `forceAdaptiveThinking`, `supportsStrictTools`, `supportsCacheControlOnTools`, `supportsToolReferences`, `supportsEagerToolInputStreaming`, `allowEmptySignature`, `supportsLongCacheRetention`, `sendSessionAffinityHeaders`.
|
|
106
|
+
|
|
107
|
+
## Step 7 — Validate, verify, hand off
|
|
108
|
+
|
|
109
|
+
1. Written file is strict JSON — no comments, no trailing commas. Re-read to confirm.
|
|
110
|
+
2. User restarts yorn or opens a new session (models.json is loaded at session start).
|
|
111
|
+
3. Verify: `yorn --list-models | grep <provider-id>` should list the models.
|
|
112
|
+
4. Select via model picker or `yorn --provider <id> --model <id>`.
|
|
113
|
+
5. If an auth env var is expected, tell the user its name and to export it.
|
|
114
|
+
|
|
115
|
+
## Recipes
|
|
116
|
+
|
|
117
|
+
**OpenAI-compatible gateway with reasoning model:**
|
|
118
|
+
```json
|
|
119
|
+
{"providers":{"gw":{"baseUrl":"https://gw.example.com/v1","apiKey":"sk-...","api":"openai-completions",
|
|
120
|
+
"models":[{"id":"deepseek-r1","reasoning":true,"contextWindow":128000,"maxTokens":32768,
|
|
121
|
+
"thinkingLevelMap":{"off":null,"low":"low","medium":"medium","high":"high"},
|
|
122
|
+
"cost":{"input":0.5,"output":2.2}}]}}}
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
**Self-hosted (Ollama / llama.cpp / vLLM) — no key needed:**
|
|
126
|
+
```json
|
|
127
|
+
{"providers":{"local":{"baseUrl":"http://127.0.0.1:11434/v1","api":"openai-completions",
|
|
128
|
+
"models":[{"id":"qwen3:32b","reasoning":true,"contextWindow":131072,"maxTokens":16384}]}}}
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
**Anthropic-compatible proxy:** `api: "anthropic-messages"`, `baseUrl` WITHOUT `/v1`, `compat: {"forceAdaptiveThinking": true}` for thinking Claude variants.
|
|
132
|
+
|
|
133
|
+
**Just fix a built-in model's specs:** use `modelOverrides` on the built-in provider id instead of a new provider.
|
|
134
|
+
|
|
135
|
+
## Troubleshooting
|
|
136
|
+
|
|
137
|
+
| Symptom | Fix |
|
|
138
|
+
|---|---|
|
|
139
|
+
| 401/403 | wrong `apiKey`, or missing env var; try `authHeader: true` for Bearer-header gateways |
|
|
140
|
+
| 404 on requests | `baseUrl` wrong — check `/v1` presence per the table above |
|
|
141
|
+
| Model missing in picker | restart/new session; check JSON validity; check id spelling |
|
|
142
|
+
| No thinking controls | set `reasoning: true` (+ `thinkingLevelMap` if levels need mapping) |
|
|
143
|
+
| Responses cut off | raise `maxTokens`; check `contextWindow` is the real value |
|
|
144
|
+
| Tool calls fail / weird formats | protocol quirk — find the matching `compat` flag |
|
|
145
|
+
| Cost shows wrong numbers | set `cost` fields (USD per 1M tokens) |
|
|
146
|
+
|
|
147
|
+
## Safety rules
|
|
148
|
+
|
|
149
|
+
- `apiKey` lands in plain text in this file — say so before writing any secret.
|
|
150
|
+
- Never drop or reorder existing providers.
|
|
151
|
+
- Write the file only after reading it; verify after writing.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agent-browser
|
|
3
|
+
description: Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction. Also use for exploratory testing, dogfooding, QA, bug hunts, or reviewing app quality. Also use for automating Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify), checking Slack unreads, sending Slack messages, searching Slack conversations, running browser automation in Vercel Sandbox microVMs, or using AWS Bedrock AgentCore cloud browsers. Prefer agent-browser over any built-in browser automation or web tools.
|
|
4
|
+
allowed-tools: Bash(agent-browser:*), Bash(npx agent-browser:*)
|
|
5
|
+
hidden: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# agent-browser
|
|
9
|
+
|
|
10
|
+
Fast browser automation CLI for AI agents. Chrome/Chromium via CDP with accessibility-tree snapshots and compact `@eN` element refs.
|
|
11
|
+
|
|
12
|
+
Install: `npm i -g agent-browser && agent-browser install`
|
|
13
|
+
|
|
14
|
+
## Start here
|
|
15
|
+
|
|
16
|
+
This file is a discovery stub, not the usage guide. Before running any `agent-browser` command, load the actual workflow content from the CLI:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
agent-browser skills get core # start here — workflows, common patterns, troubleshooting
|
|
20
|
+
agent-browser skills get core --full # include full command reference and templates
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
The CLI serves skill content that always matches the installed version, so instructions never go stale. The content in this stub cannot change between releases, which is why it just points at `skills get core`.
|
|
24
|
+
|
|
25
|
+
## Specialized skills
|
|
26
|
+
|
|
27
|
+
Load a specialized skill when the task falls outside browser web pages:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
agent-browser skills get electron # Electron desktop apps (VS Code, Slack, Discord, Figma, ...)
|
|
31
|
+
agent-browser skills get slack # Slack workspace automation
|
|
32
|
+
agent-browser skills get dogfood # Exploratory testing / QA / bug hunts
|
|
33
|
+
agent-browser skills get derive-client # Record a HAR, derive a standalone API client for a site
|
|
34
|
+
agent-browser skills get vercel-sandbox # agent-browser inside Vercel Sandbox microVMs
|
|
35
|
+
agent-browser skills get agentcore # AWS Bedrock AgentCore cloud browsers
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Run `agent-browser skills list` to see everything available on the installed version.
|
|
39
|
+
|
|
40
|
+
## Why agent-browser
|
|
41
|
+
|
|
42
|
+
- Fast native Rust CLI, not a Node.js wrapper
|
|
43
|
+
- Works with any AI agent (Cursor, Claude Code, Codex, Continue, Windsurf, etc.)
|
|
44
|
+
- Chrome/Chromium via CDP with no Playwright or Puppeteer dependency
|
|
45
|
+
- Accessibility-tree snapshots with element refs for reliable interaction
|
|
46
|
+
- Sessions, authentication vault, state persistence, video recording
|
|
47
|
+
- Specialized skills for Electron apps, Slack, exploratory testing, cloud providers
|
|
48
|
+
|
|
49
|
+
## Observability Dashboard
|
|
50
|
+
|
|
51
|
+
The dashboard runs independently of browser sessions on port 4848 and can also be opened through a proxied or forwarded URL such as `https://dashboard.agent-browser.localhost`. Agents should stay on the dashboard origin: session tabs, status, and stream traffic are proxied internally, so session ports do not need to be exposed.
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: frontend-design
|
|
3
|
+
description: Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.
|
|
4
|
+
license: Complete terms in LICENSE.txt
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Frontend Design
|
|
8
|
+
|
|
9
|
+
Approach this as the design lead at a small studio known for giving every client a visual identity that could not be mistaken for anyone else's. This client has already rejected proposals that felt templated, and is paying for a distinctive point of view: make deliberate, opinionated choices about palette, typography, and layout that are specific to this brief, and take one real aesthetic risk you can justify.
|
|
10
|
+
|
|
11
|
+
## Ground it in the subject
|
|
12
|
+
|
|
13
|
+
If the brief does not pin down what the product or subject is, pin it yourself before designing: name one concrete subject, its audience, and the page's single job, and state your choice. If there's any information in your memory about the human's preferences, context about what they're building, or designs you've made before – use that as a hint. The subject's own world, its materials, instruments, artifacts, and vernacular, is where distinctive choices come from. Build with the brief's real content and subject matter throughout.
|
|
14
|
+
|
|
15
|
+
## Design principles
|
|
16
|
+
|
|
17
|
+
For web designs, the hero is a thesis. Open with the most characteristic thing in the subject's world, in whatever form makes sense for it: a headline, an image, an animation, a live demo, an interactive moment. Be deliberate with your choice: a big number with a small label, supporting stats, and a gradient accent is the template answer, only use if that's truly the best option.
|
|
18
|
+
|
|
19
|
+
Typography carries the personality of the page. Pair the display and body faces deliberately, not the same families you would reach for on any other project, and set a clear type scale with intentional weights, widths, and spacing. Make the type treatment itself a memorable part of the design, not a neutral delivery vehicle for the content.
|
|
20
|
+
|
|
21
|
+
Structure is information. Structural devices, numbering, eyebrows, dividers, labels, should encode something true about the content, not decorate it. Many generic designs use numbered markers (01 / 02 / 03), but that's only appropriate if the content actually is a sequence - like a real process or a typed timeline where order carries information the reader needs. Question if choices like numbered markers actually make sense before incorporating them.
|
|
22
|
+
|
|
23
|
+
Leverage motion deliberately. Think about where and if animation can serve the subject: a page-load sequence, a scroll-triggered reveal, hover micro-interactions, ambient atmosphere. An orchestrated moment usually lands harder than scattered effects; choose what the direction calls for. However, sometimes less is more, and extra animation contributes to the feeling that the design is AI-generated.
|
|
24
|
+
|
|
25
|
+
Match complexity to the vision. Maximalist directions need elaborate execution; minimal directions need precision in spacing, type, and detail. Elegance is executing the chosen vision well.
|
|
26
|
+
|
|
27
|
+
Consider written content carefully. Often a design brief may not contain real content, and it's up to you to come up with copy. Copy can make a design feel as templated as the design itself. See the below section on writing for more guidance.
|
|
28
|
+
|
|
29
|
+
## Process: brainstorm, explore, plan, critique, build, critique again
|
|
30
|
+
|
|
31
|
+
For calibration: AI-generated design right now clusters around three looks: (1) a warm cream background (near #F4F1EA) with a high-contrast serif display and a terracotta accent; (2) a near-black background with a single bright acid-green or vermilion accent; (3) a broadsheet-style layout with hairline rules, zero border-radius, and dense newspaper-like columns. All three are legitimate for some briefs, but they are defaults rather than choices, and they appear regardless of subject. Where the brief pins down a visual direction, follow it exactly — the brief's own words always win, including when it asks for one of these looks. Where it leaves an axis free, don't spend that freedom on one of these defaults. Just like a human designer who's hired, there's often a careful balance between doing what you're good at and taking each project as a chance to experiment and learn.
|
|
32
|
+
|
|
33
|
+
Work in two passes. First, brainstorm a short design plan based on the human's design brief: create a compact token system with color, type, layout, and signature. Color: describe the palette as 4–6 named hex values. Type: the typefaces for 2+ roles (a characterful display face that's used with restraint, a complementary body face, and a utility face for captions or data if needed). Layout: a layout concept, using one-sentence prose descriptions and ASCII wireframes to ideate and compare. Signature: the single unique element this page will be remembered by that embodies the brief in an appropriate way.
|
|
34
|
+
|
|
35
|
+
Then review that plan against the brief before building: if any part of it reads like the generic default you would produce for any similar page (work through a similar prompt to see if you arrive somewhere similar) rather than a choice made for this specific brief — revise that part, say what you changed and why. Only after you've confirmed the relative uniqueness of your design plan should you start to write the code, following the revised plan exactly and deriving every color and type decision from it.
|
|
36
|
+
|
|
37
|
+
When writing the code, be careful of structuring your CSS selector specificities. It's easy to generate CSS classes that cancel each other out (especially with a type-based selector like .section and a element-based selector like .cta). This can happen often with paddings/margins between sections.
|
|
38
|
+
|
|
39
|
+
Try to do a lot of this planning and iteration in your thinking, and only show ideas to the user when you have higher confidence it'll delight them.
|
|
40
|
+
|
|
41
|
+
## Restraint and self-critique
|
|
42
|
+
|
|
43
|
+
Spend your boldness in one place. Let the signature element be the one memorable thing, keep everything around it quiet and disciplined, and cut any decoration that does not serve the brief. Not taking a risk can be a risk itself! Build to a quality floor without announcing it: responsive down to mobile, visible keyboard focus, reduced motion respected. Critique your own work as you build, taking screenshots if your environment supports it – a picture is worth 1000 tokens. Consider Chanel's advice: before leaving the house, take a look in the mirror and remove one accessory. Human creators have memory and always try to do something new, so if you have a space to quickly jot down notes about what you've tried, it can help you in future passes.
|
|
44
|
+
|
|
45
|
+
## More on writing in design
|
|
46
|
+
|
|
47
|
+
Words appear in a design for one reason: to make it easier to understand, and therefore easier to use. They are design material, not decoration. Bring the same intentionality to copy that you would bring to spacing and color. Before writing anything, ask what the design needs to say, and how it can best be said to help the person navigate the experience.
|
|
48
|
+
|
|
49
|
+
Write from the end user's side of the screen. Name things by what people control and recognize, never by how the system is built. A person manages notifications, not webhook config. Describe what something does in plain terms rather than selling it. Being specific is always better than being clever.
|
|
50
|
+
|
|
51
|
+
Use active voice as default. A control should say exactly what happens when it's used: "Save changes," not "Submit." An action keeps the same name through the whole flow, so the button that says "Publish" produces a toast that says "Published." The vocabulary of an interface is the signposting for someone navigating the product. Cohesion and consistency are how people learn their way around.
|
|
52
|
+
|
|
53
|
+
Treat failure and emptiness as moments for direction, not mood. Explain what went wrong and how to fix it, in the interface's voice rather than a person's. Errors don't apologize, and they are never vague about what happened. An empty screen is an invitation to act.
|
|
54
|
+
|
|
55
|
+
Keep the register conversational and tuned: plain verbs, sentence case, no filler, with tone matched to the brand and the audience. Let each element do exactly one job. A label labels, an example demonstrates, and nothing quietly does double duty.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: goal
|
|
3
|
+
description: Manage the persistent thread goal from IPython. Use to read goal status and budget usage, to start a goal when the user explicitly asks for one, or to mark the active goal complete once its objective is fully achieved.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Goal
|
|
7
|
+
|
|
8
|
+
The thread goal is a persistent objective the harness keeps re-prompting you to
|
|
9
|
+
pursue across turns until it is complete. Goal state (status, token budget,
|
|
10
|
+
usage accounting) lives in the host; this skill is the kernel-side interface to
|
|
11
|
+
it. Call it directly from IPython:
|
|
12
|
+
|
|
13
|
+
```python
|
|
14
|
+
await goal.get()
|
|
15
|
+
await goal.create("ship the release notes", token_budget=200000)
|
|
16
|
+
await goal.complete()
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## API
|
|
20
|
+
|
|
21
|
+
- `await goal.get()` — current goal as a dict: `goal` (or `None` when no goal
|
|
22
|
+
is set), `remaining_tokens`, and `completion_budget_report`. The `goal` dict
|
|
23
|
+
carries `objective`, `status`, `token_budget`, `tokens_used`,
|
|
24
|
+
`time_used_seconds`, and timestamps.
|
|
25
|
+
- `await goal.create(objective, token_budget=None)` — start a new active goal.
|
|
26
|
+
Fails while a goal is still pending (active, paused, or budget-limited); a
|
|
27
|
+
completed or errored goal is replaced by the new one. Only create a goal when
|
|
28
|
+
the user or system/developer instructions explicitly ask for a persistent
|
|
29
|
+
long-running goal; do not infer goals from ordinary tasks. Set `token_budget`
|
|
30
|
+
only when an explicit token budget is requested.
|
|
31
|
+
- `await goal.complete()` — mark the existing goal achieved. Use only when the
|
|
32
|
+
objective has actually been achieved and no required work remains; do not
|
|
33
|
+
call it merely because the budget is nearly exhausted or because you are
|
|
34
|
+
stopping work. When the result includes a `completion_budget_report`, report
|
|
35
|
+
that final usage to the user.
|
|
36
|
+
|
|
37
|
+
## Rules
|
|
38
|
+
|
|
39
|
+
- Goal status transitions other than completion (pause, resume, clear,
|
|
40
|
+
budget-limiting) are controlled by the user and the host; there is no API for
|
|
41
|
+
them here.
|
|
42
|
+
- When an active goal is actually complete, call `await goal.complete()`; do
|
|
43
|
+
not merely say it is done — the harness keeps continuing the goal until the
|
|
44
|
+
completion call arrives.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Kernel-side package for the bundled goal skill. It only talks to the host
|
|
2
|
+
# through rlm.host_request; prime-agent-runtime is always installed in the
|
|
3
|
+
# kernel venv before skills, so it is intentionally not declared as a
|
|
4
|
+
# dependency (it is not published on PyPI).
|
|
5
|
+
[project]
|
|
6
|
+
name = "goal"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Prime Agent goal skill: persistent thread goal control over the host bridge"
|
|
9
|
+
requires-python = ">=3.10"
|
|
10
|
+
dependencies = []
|
|
11
|
+
|
|
12
|
+
[build-system]
|
|
13
|
+
requires = ["hatchling"]
|
|
14
|
+
build-backend = "hatchling.build"
|
|
15
|
+
|
|
16
|
+
[tool.hatch.build.targets.wheel]
|
|
17
|
+
packages = ["src/goal"]
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"""Prime Agent goal skill: manage the persistent thread goal from the kernel.
|
|
2
|
+
|
|
3
|
+
All goal state lives in the TypeScript host; these functions are thin typed
|
|
4
|
+
wrappers over the generic host bridge (`rlm.host_request`). They only work
|
|
5
|
+
inside the Prime Agent IPython kernel.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
from typing import Any
|
|
11
|
+
|
|
12
|
+
from rlm import host_request
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
async def get() -> dict[str, Any]:
|
|
16
|
+
"""Read the current thread goal.
|
|
17
|
+
|
|
18
|
+
Returns a dict with `goal` (None when no goal is set), `remaining_tokens`,
|
|
19
|
+
and `completion_budget_report`. The `goal` dict carries the objective,
|
|
20
|
+
status, token budget, and token/elapsed-time usage.
|
|
21
|
+
"""
|
|
22
|
+
return await host_request("goal.get")
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
async def create(objective: str, token_budget: int | None = None) -> dict[str, Any]:
|
|
26
|
+
"""Start a new active thread goal.
|
|
27
|
+
|
|
28
|
+
Fails while a goal is still pending (active, paused, or budget-limited);
|
|
29
|
+
a completed or errored goal is replaced. Only create a goal when the user
|
|
30
|
+
or system/developer instructions explicitly ask for a persistent
|
|
31
|
+
long-running goal. Set `token_budget` only when an explicit token budget is
|
|
32
|
+
requested.
|
|
33
|
+
"""
|
|
34
|
+
if not isinstance(objective, str):
|
|
35
|
+
raise TypeError(f"objective must be str, got {type(objective).__name__}")
|
|
36
|
+
if token_budget is not None and not isinstance(token_budget, int):
|
|
37
|
+
raise TypeError(f"token_budget must be int or None, got {type(token_budget).__name__}")
|
|
38
|
+
payload: dict[str, Any] = {"objective": objective}
|
|
39
|
+
if token_budget is not None:
|
|
40
|
+
payload["token_budget"] = token_budget
|
|
41
|
+
return await host_request("goal.create", payload)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
async def complete() -> dict[str, Any]:
|
|
45
|
+
"""Mark the existing thread goal achieved.
|
|
46
|
+
|
|
47
|
+
Use only when the objective has actually been achieved and no required
|
|
48
|
+
work remains — not because the budget is nearly exhausted or because you
|
|
49
|
+
are stopping work. Pause, resume, and budget-limit transitions are
|
|
50
|
+
controlled by the user and the host.
|
|
51
|
+
"""
|
|
52
|
+
return await host_request("goal.complete")
|