Compare commits
355 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e211b5c3e3 | |||
| e34a804255 | |||
| 6120b3f705 | |||
| f175261e32 | |||
| fd9f66cad7 | |||
| d928ebc92e | |||
| 9fca9f478a | |||
| 7106632b51 | |||
| b834278754 | |||
| 186f6d9797 | |||
| 6cdc92a256 | |||
| 02599dcd3c | |||
| fe64d7ef7e | |||
| 45f953be6d | |||
| 82f29bbcb1 | |||
| 93b5a0b824 | |||
| 08a67c4a2d | |||
| c86a0673ba | |||
| cabf99ba07 | |||
| 2d978a6b64 | |||
| 4dbc9266c1 | |||
| ea0b3c8c8c | |||
| 0c56834385 | |||
| caccf0035e | |||
| 627b160f55 | |||
| 6463bc84b0 | |||
| f84f1229af | |||
| f85d21097b | |||
| 306821d6a2 | |||
| 06f9424274 | |||
| fa14ab4ab2 | |||
| 36a0c8eba9 | |||
| f4c82d5797 | |||
| 5edebf4869 | |||
| 613fa79444 | |||
| 44c8e1eaac | |||
| 414b1fa8dd | |||
| 913d5ee851 | |||
| 5a4332d0e4 | |||
| 970c80d278 | |||
| 9514c20038 | |||
| 9cf31a732c | |||
| 7f0ddf06a9 | |||
| b79e88662e | |||
| b71b69fa6e | |||
| 8b961b7bd9 | |||
| 3b67d8a797 | |||
| f0e111bf7b | |||
| b3071f622a | |||
| 8dbf142c7b | |||
| 2b3603bacf | |||
| 02369d892d | |||
| b38db505ff | |||
| 06b9525263 | |||
| 8fe573330c | |||
| dc61f08f60 | |||
| f7c8a3b8be | |||
| 6cd8749eb4 | |||
| c54f374c7e | |||
| dd00b57f6f | |||
| c8db32389d | |||
| 611e4702c2 | |||
| 99cfae1f00 | |||
| 1c624f0c51 | |||
| 8a8f946269 | |||
| 17469945f7 | |||
| 6dcd7b7222 | |||
| 342f743720 | |||
| e05fd75763 | |||
| 4daeb380a0 | |||
| ddacb2a917 | |||
| 77ca576be6 | |||
| 5a4f69e71f | |||
| e952838eef | |||
| 3fc4e66fb6 | |||
| 0a331a1440 | |||
| 5919becab9 | |||
| 287d9bdc17 | |||
| f900d7079e | |||
| 5a5b5a4402 | |||
| 06f65fb711 | |||
| 46d4b13c22 | |||
| 8fcbb6eb2d | |||
| ce22eba7d0 | |||
| 7ba4d06e78 | |||
| dc12d03876 | |||
| 3151604b04 | |||
| c5fcda06ad | |||
| 51a52dcadb | |||
| dd9e26eac6 | |||
| c4b2a21c61 | |||
| d6170ab49b | |||
| 399c896c3b | |||
| 71d32c3b04 | |||
| 27936b051d | |||
| 39d788a95f | |||
| 5d921bd37d | |||
| d17f0a946c | |||
| 2710ce65cc | |||
| 51e8fc8423 | |||
| ecf9d477bd | |||
| 625784c25f | |||
| 348c0c37b7 | |||
| 11a1dae55b | |||
| dd1681be44 | |||
| cabd3de3cb | |||
| 87cf6b0e93 | |||
| 2e2c1da4fa | |||
| 736347c71b | |||
| c384c34c31 | |||
| 4ca5fa500b | |||
| 1a0441a006 | |||
| ef770f15b9 | |||
| 05a0cdf6f4 | |||
| fc1b555b31 | |||
| b8ebe7bcd3 | |||
| 049edf4eec | |||
| 856a651dd1 | |||
| fd3b17edc1 | |||
| a9c7697c6b | |||
| 939edf5e86 | |||
| bbc82fd4f9 | |||
| a606f308f5 | |||
| 1162e3adc2 | |||
| bd75799644 | |||
| 35217bf457 | |||
| e5e3761020 | |||
| a52446c637 | |||
| 292952e563 | |||
| d115b28a1f | |||
| b563f5954e | |||
| e3e711073a | |||
| 1033287f38 | |||
| 6a4ccaeb73 | |||
| 4aead04916 | |||
| 7b23c8934c | |||
| 5d1543100d | |||
| e3a91bc805 | |||
| 833fdefbe5 | |||
| 13f74f0ecc | |||
| 9ff045d2e9 | |||
| 6fe8e3a5bb | |||
| 5dc1750df7 | |||
| b40c9e77af | |||
| 34cac3d9dd | |||
| badf96dcab | |||
| c1e1228fb0 | |||
| d2b923ae07 | |||
| 21fdef95f4 | |||
| d02fbf2d76 | |||
| 05cede29a8 | |||
| d34a2e6d3f | |||
| 576d22fedd | |||
| d5455c694c | |||
| 90275b057e | |||
| d46b4f29d2 | |||
| f25835f98c | |||
| 376579f9fa | |||
| b620fd6bba | |||
| 98d6c5af9e | |||
| c51ca19dc1 | |||
| ea6abc9f42 | |||
| e2f6f20bfb | |||
| 88df3d4b2e | |||
| 0dba55959d | |||
| 893788f04d | |||
| 0fea62d114 | |||
| cca3cf8f84 | |||
| 7170810e98 | |||
| 816fa87d60 | |||
| dcffa4d7fb | |||
| e03dc4bfce | |||
| 2cb57e6b2d | |||
| 079e972c81 | |||
| 448682c440 | |||
| 3fe3fe23b1 | |||
| 9e9052634d | |||
| b227b1abc3 | |||
| fb9501afd5 | |||
| 9df0a76f4a | |||
| 9501555448 | |||
| 138ada0fd6 | |||
| 3c2c5aa78c | |||
| 273bd00d08 | |||
| 546873e2bb | |||
| bf7f568eef | |||
| d33b73974b | |||
| a99ec631aa | |||
| ab6846cb9f | |||
| ca683816a7 | |||
| 59014641bf | |||
| 8d7abb73e7 | |||
| 7ddf10f86d | |||
| 6352f024b2 | |||
| ef2f8e9808 | |||
| 6f482051ec | |||
| 8bed9c5485 | |||
| 6861664258 | |||
| 5cf1c77531 | |||
| 483d3c0853 | |||
| f5cd6baec3 | |||
| dfe0221e49 | |||
| 12cfe48047 | |||
| 0479bfca36 | |||
| 67e581d8ae | |||
| 195c7ba919 | |||
| bb66df5276 | |||
| d47f6703d8 | |||
| 74fe29d772 | |||
| 86ca34ac1f | |||
| f0f0f80895 | |||
| 01bcba83ad | |||
| 4da85cee6e | |||
| bdc0f325bf | |||
| 248348bd80 | |||
| bd70c0f45b | |||
| d0edcec1f9 | |||
| 9423b9c94e | |||
| 95da0062de | |||
| 7634d8d1f8 | |||
| 744620bc34 | |||
| f67abd9fc8 | |||
| 94a4d72e71 | |||
| 39353748fa | |||
| 71f013af49 | |||
| 74f411bd2b | |||
| 50a65ea0e5 | |||
| 655e5fd56a | |||
| 072a10eff4 | |||
| 9baa02a40b | |||
| 0af0f0344e | |||
| 9cfc88c38c | |||
| 87127e2a08 | |||
| 7cacdef2d1 | |||
| 9469b5bdbe | |||
| ecbe5e2c68 | |||
| 86a2fc2594 | |||
| 1c2a49459e | |||
| e1f37a307e | |||
| fd40eeb408 | |||
| 0ee3b6d617 | |||
| d0781f31a5 | |||
| a3bc7a04dd | |||
| 5901f70dc0 | |||
| 026158557c | |||
| 162a2b65a5 | |||
| e6bfb1ebee | |||
| 9a6de3b204 | |||
| f894bc4140 | |||
| a1c65558d8 | |||
| ed7c191fcd | |||
| 69abd217d7 | |||
| f2035819c2 | |||
| 46d68fc8ba | |||
| 06926a189d | |||
| 8f68afb70c | |||
| 6016491985 | |||
| bf11b7b1a0 | |||
| 436619b015 | |||
| c6233b066c | |||
| b33af6894e | |||
| f98a18502f | |||
| 14de5e527e | |||
| 7b7e08dc21 | |||
| 526d63fd75 | |||
| e20e0f7cb0 | |||
| e3cc40c64c | |||
| 9d182c6dd8 | |||
| d7d114eae7 | |||
| b1dfa192b8 | |||
| 7ed1bdc104 | |||
| 7f6bd651f7 | |||
| 491ac601e6 | |||
| b4da085f0c | |||
| 0829bb92df | |||
| 7950f51bb9 | |||
| 79cff39aa5 | |||
| e94dafbbfb | |||
| 99460c3fff | |||
| 8e3775362e | |||
| 1ef1b5d02d | |||
| e2a3907d35 | |||
| 980ad7ebc9 | |||
| da0a592163 | |||
| a6cd877ac8 | |||
| 138ff4249c | |||
| ff2da533a5 | |||
| 86ca1ba2b6 | |||
| f16a71826c | |||
| 0c5b41b288 | |||
| f127ca8c93 | |||
| 2e86d83ed7 | |||
| 9b9b85217c | |||
| 0e006b91e4 | |||
| d93d7dab84 | |||
| ee7048502c | |||
| 2c203571d0 | |||
| 9781f07a98 | |||
| 4600469717 | |||
| b2857cb836 | |||
| 76d54193f1 | |||
| 046040d535 | |||
| 283385624e | |||
| f73f39d33d | |||
| d07d314fd0 | |||
| f7b057a743 | |||
| 276e3f67ca | |||
| 0a9acf8150 | |||
| 535995f2ab | |||
| 863d731b92 | |||
| f19d4951b6 | |||
| 7399894cc8 | |||
| 6e7c13a864 | |||
| 7ef9d8a7b5 | |||
| 8d48472c9e | |||
| d1fffc3b74 | |||
| 8538c4105a | |||
| 08d6959e0d | |||
| ad8e1e65e0 | |||
| c204d72cc4 | |||
| 852b67fff3 | |||
| df4e11bd1d | |||
| 991a1ea9cc | |||
| 97ebfe0549 | |||
| ea61491f2a | |||
| 1a78dcf447 | |||
| 620e4adee5 | |||
| 631e7f61b5 | |||
| 36bc6c4aee | |||
| 67b0ff0ee9 | |||
| c99a046b1f | |||
| d17e9586ae | |||
| 9f2655dc4d | |||
| 0b9a975da5 | |||
| 507c93fcf5 | |||
| a6e5a6ffda | |||
| cf21cf093a | |||
| b454a9d301 | |||
| c8df83dd17 | |||
| 225edecc3d | |||
| 465b2ea6af | |||
| e70ca52dc4 | |||
| 45d2368730 | |||
| 026f2609f9 | |||
| a6cf7d4015 | |||
| 48c7414bb3 | |||
| f7fefd4b6c | |||
| 2d359c1f74 | |||
| 8439b40145 | |||
| 57065b07a3 | |||
| a7e295c966 | |||
| d4caba0967 | |||
| 8c0375a9ba | |||
| fa2faf408d | |||
| e098c6d242 |
@@ -0,0 +1,133 @@
|
||||
# Skill: github-issue
|
||||
|
||||
File a structured GitHub issue (bug report or feature request) for ZeroClaw interactively from Claude Code.
|
||||
|
||||
## When to Use
|
||||
|
||||
Trigger when the user wants to file a GitHub issue, report a bug, or request a feature for ZeroClaw. Keywords: "file issue", "report bug", "feature request", "open issue", "create issue", "github issue".
|
||||
|
||||
## Instructions
|
||||
|
||||
You are filing a GitHub issue against the ZeroClaw repository using structured issue forms. Follow this workflow exactly.
|
||||
|
||||
### Step 1: Detect Issue Type and Read the Template
|
||||
|
||||
Determine from the user's message whether this is a **bug report** or **feature request**.
|
||||
- If unclear, use AskUserQuestion to ask: "Is this a bug report or a feature request?"
|
||||
|
||||
Then read the corresponding issue template to understand the required fields:
|
||||
|
||||
- Bug report: `.github/ISSUE_TEMPLATE/bug_report.yml`
|
||||
- Feature request: `.github/ISSUE_TEMPLATE/feature_request.yml`
|
||||
|
||||
Parse the YAML to extract:
|
||||
- The `title` prefix (e.g. `[Bug]: `, `[Feature]: `)
|
||||
- The `labels` array
|
||||
- Each field in the `body` array: its `type` (dropdown, textarea, input, checkboxes, markdown), `id`, `attributes.label`, `attributes.options` (for dropdowns), `attributes.description`, `attributes.placeholder`, and `validations.required`
|
||||
|
||||
This is the source of truth for what fields exist, what they're called, what options are available, and which are required. Do not assume or hardcode any field names or options — always derive them from the template file.
|
||||
|
||||
### Step 2: Auto-Gather Context
|
||||
|
||||
Before asking the user anything, silently gather environment and repo context:
|
||||
|
||||
```bash
|
||||
# Git context
|
||||
git log --oneline -5
|
||||
git status --short
|
||||
git diff --stat HEAD~1 2>/dev/null
|
||||
|
||||
# For bug reports — environment detection
|
||||
uname -s -r -m # OS info
|
||||
sw_vers 2>/dev/null # macOS version
|
||||
rustc --version 2>/dev/null # Rust version
|
||||
cargo metadata --format-version=1 --no-deps 2>/dev/null | jq -r '.packages[] | select(.name=="zeroclaw") | .version' 2>/dev/null # ZeroClaw version
|
||||
git rev-parse --short HEAD # commit SHA fallback
|
||||
```
|
||||
|
||||
Also read recently changed files to infer the affected component and architecture impact.
|
||||
|
||||
### Step 3: Pre-Fill and Present the Form
|
||||
|
||||
Using the parsed template fields and gathered context, draft values for ALL fields from the template:
|
||||
|
||||
- **dropdown** fields: select the most likely option from `attributes.options` based on context. For dropdowns where you're uncertain, note your best guess and flag it for the user.
|
||||
- **textarea** fields: draft content based on the user's description, git context, and the field's `attributes.description`/`attributes.placeholder` for guidance on what's expected.
|
||||
- **input** fields: fill with auto-detected values (versions, OS) or draft from user context.
|
||||
- **checkboxes** fields: auto-check all items (the skill itself ensures compliance with the stated checks).
|
||||
- **markdown** fields: skip these — they're informational headers, not form inputs.
|
||||
- **optional fields** (where `validations.required` is false): fill if there's enough context, otherwise note "(optional — not enough context to fill)".
|
||||
|
||||
Present the complete draft to the user in a clean readable format:
|
||||
|
||||
```
|
||||
## Issue Draft: [Bug]: <title> / [Feature]: <title>
|
||||
**Labels**: <from template>
|
||||
|
||||
### <Field Label>
|
||||
<proposed value or selection>
|
||||
|
||||
### <Field Label>
|
||||
<proposed value>
|
||||
...
|
||||
```
|
||||
|
||||
Use AskUserQuestion to ask the user to review:
|
||||
- "Here's the pre-filled issue. Please review and let me know what to change, or say 'submit' to file it."
|
||||
|
||||
If the user requests changes, update the draft and re-present. Iterate until the user approves.
|
||||
|
||||
### Step 4: Scope Guard
|
||||
|
||||
Before final submission, analyze the collected content for scope creep:
|
||||
- Does the bug report describe multiple independent defects?
|
||||
- Does the feature request bundle unrelated changes?
|
||||
|
||||
If multi-concept issues are detected:
|
||||
1. Inform the user: "This issue appears to cover multiple distinct topics. Focused, single-concept issues are strongly preferred and more likely to be accepted."
|
||||
2. Break down the distinct groups found.
|
||||
3. Offer to file separate issues for each group, reusing shared context (environment, etc.).
|
||||
4. Let the user decide: proceed as-is or split.
|
||||
|
||||
### Step 5: Construct Issue Body
|
||||
|
||||
Build the issue body as markdown sections matching GitHub's form-field rendering format. GitHub renders form-submitted issues with `### <Field Label>` sections, so use that exact structure.
|
||||
|
||||
For each non-markdown field from the template, in order:
|
||||
|
||||
```markdown
|
||||
### <attributes.label>
|
||||
|
||||
<value>
|
||||
```
|
||||
|
||||
For optional fields with no content, use `_No response_` as the value (this matches GitHub's native rendering for empty optional fields).
|
||||
|
||||
For checkbox fields, render each option as:
|
||||
```markdown
|
||||
- [X] <option label text>
|
||||
```
|
||||
|
||||
### Step 6: Final Preview and Submit
|
||||
|
||||
Show the final constructed issue (title + labels + full body) for one last confirmation.
|
||||
|
||||
Then submit using a HEREDOC for the body to preserve formatting:
|
||||
|
||||
```bash
|
||||
gh issue create --title "<title prefix><user title>" --label "<label1>,<label2>" --body "$(cat <<'ISSUE_EOF'
|
||||
<body content>
|
||||
ISSUE_EOF
|
||||
)"
|
||||
```
|
||||
|
||||
Return the resulting issue URL to the user.
|
||||
|
||||
### Important Rules
|
||||
|
||||
- **Always read the template file** — never assume field names, options, or structure. The templates are the source of truth and may change over time.
|
||||
- **Never include personal/sensitive data** in the issue. Redact secrets, tokens, emails, real names.
|
||||
- **Use neutral project-scoped placeholders** per ZeroClaw's privacy contract.
|
||||
- **One concept per issue** — enforce the scope guard.
|
||||
- **Auto-detect, don't guess** — use real command output for environment fields.
|
||||
- **Match GitHub's rendering** — use `### Field Label` sections so issues look consistent whether filed via web UI or this skill.
|
||||
@@ -0,0 +1,209 @@
|
||||
# Skill: github-pr
|
||||
|
||||
Open or update a GitHub Pull Request for ZeroClaw. Handles creating new PRs with a fully filled-out template body, and updating existing PRs (title, body sections, labels, comments). Use this skill whenever the user wants to open a PR, create a pull request, update a PR, edit PR description, add labels to a PR, or sync a PR after new commits — even if they don't say "PR" explicitly (e.g., "submit this for review", "push and open for merge").
|
||||
|
||||
## Instructions
|
||||
|
||||
This skill supports two modes: **Open** (create a new PR) and **Update** (edit an existing PR). Detect the mode from context — if there's already an open PR for the current branch and the user didn't say "open a new PR", default to update mode.
|
||||
|
||||
The PR template at `.github/pull_request_template.md` is the source of truth for the PR body structure. Read it every time — never assume or hardcode section names, fields, or their order. The template may change over time and the skill should always reflect its current state.
|
||||
|
||||
---
|
||||
|
||||
## Shared: Read the PR Template
|
||||
|
||||
Before opening or updating a PR body, read `.github/pull_request_template.md` and parse it to understand:
|
||||
|
||||
- The `## ` section headers (these are the top-level sections of the PR body)
|
||||
- The bullet points, fields, and prompts within each section
|
||||
- Which sections are marked `(required)` vs optional/recommended
|
||||
- Any inline formatting conventions (backtick options, Yes/No fields, etc.)
|
||||
|
||||
This parsed structure drives how you fill, present, and edit the PR body.
|
||||
|
||||
---
|
||||
|
||||
## Mode: Open a New PR
|
||||
|
||||
### Step 1: Gather Context
|
||||
|
||||
Collect information to pre-fill the PR body. Run these in parallel:
|
||||
|
||||
```bash
|
||||
# Branch and commit context
|
||||
git branch --show-current
|
||||
git log master..HEAD --oneline
|
||||
git diff master...HEAD --stat
|
||||
|
||||
# Check if branch is pushed
|
||||
git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null
|
||||
|
||||
# Environment (for validation evidence)
|
||||
rustc --version 2>/dev/null
|
||||
```
|
||||
|
||||
Also review the changed files and commit messages to understand the nature of the change (bug fix, feature, refactor, docs, chore, etc.) and which subsystems are affected.
|
||||
|
||||
### Step 2: Pre-Fill the Template
|
||||
|
||||
Using the parsed template structure and gathered context, draft a complete PR body:
|
||||
|
||||
- For each `## ` section from the template, fill in the bullet points and fields based on context from the commits, diff, and changed files.
|
||||
- Use the field descriptions and placeholder text in the template as guidance for what each field expects.
|
||||
- For Yes/No fields, infer from the diff (e.g., if no files in `src/security/` changed, security impact is likely all No).
|
||||
- For required sections, always provide a substantive answer. For optional sections, fill if there's enough context, otherwise leave the template prompts in place.
|
||||
- Draft a conventional commit-style PR title based on the changes (e.g., `feat(provider): add retry budget override`, `fix(channel): handle disconnect gracefully`, `chore(ci): update workflow targets`).
|
||||
|
||||
### Step 3: Present Draft for Review
|
||||
|
||||
Show the user the complete draft:
|
||||
|
||||
```
|
||||
## PR Draft: <title>
|
||||
**Branch**: <head> -> master
|
||||
**Labels**: <suggested labels>
|
||||
|
||||
<full body with all sections filled>
|
||||
```
|
||||
|
||||
Ask the user to review: "Here's the pre-filled PR. Review and let me know what to change, or say 'submit' to open it."
|
||||
|
||||
Iterate on changes until the user approves.
|
||||
|
||||
### Step 4: Push and Create
|
||||
|
||||
1. If the branch isn't pushed yet, push it:
|
||||
```bash
|
||||
git push -u origin <branch>
|
||||
```
|
||||
|
||||
2. Create the PR using a HEREDOC for the body:
|
||||
```bash
|
||||
gh pr create --title "<title>" --base master --body "$(cat <<'PR_BODY_EOF'
|
||||
<full body>
|
||||
PR_BODY_EOF
|
||||
)"
|
||||
```
|
||||
|
||||
3. If labels were agreed on, add them:
|
||||
```bash
|
||||
gh pr edit <number> --add-label "<label1>,<label2>"
|
||||
```
|
||||
|
||||
4. Return the PR URL to the user.
|
||||
|
||||
---
|
||||
|
||||
## Mode: Update an Existing PR
|
||||
|
||||
### Step 1: Identify the PR
|
||||
|
||||
1. **If a PR number or URL is given**: use that directly.
|
||||
2. **If on a branch with an open PR**: auto-detect:
|
||||
```bash
|
||||
gh pr view --json number,title,body,labels,state,author,url,headRefName 2>/dev/null
|
||||
```
|
||||
3. **If neither**: ask the user for the PR number.
|
||||
|
||||
Verify the current user is the PR author:
|
||||
```bash
|
||||
CURRENT_USER=$(gh api user --jq '.login')
|
||||
PR_AUTHOR=$(gh pr view <number> --json author --jq '.author.login')
|
||||
```
|
||||
If not the author, stop and inform the user.
|
||||
|
||||
### Step 2: Fetch Current State
|
||||
|
||||
```bash
|
||||
gh pr view <number> --json number,title,body,labels,state,baseRefName,headRefName,url,author,reviewDecision,statusCheckRollup,commits
|
||||
```
|
||||
|
||||
Display a summary:
|
||||
```
|
||||
## PR #<number>: <title>
|
||||
**State**: <open/closed/merged>
|
||||
**Branch**: <head> -> <base>
|
||||
**Labels**: <label list>
|
||||
**Checks**: <pass/fail/pending>
|
||||
**URL**: <url>
|
||||
```
|
||||
|
||||
### Step 3: Determine What to Update
|
||||
|
||||
Support these operations:
|
||||
|
||||
| Operation | How |
|
||||
|---|---|
|
||||
| **Edit title** | `gh pr edit <number> --title "<new title>"` |
|
||||
| **Edit full body** | `gh pr edit <number> --body "<new body>"` |
|
||||
| **Add labels** | `gh pr edit <number> --add-label "<label1>,<label2>"` |
|
||||
| **Remove labels** | `gh pr edit <number> --remove-label "<label1>"` |
|
||||
| **Edit specific section** | Parse body by `## ` headers, modify target section, re-submit full body |
|
||||
| **Add a comment** | `gh pr comment <number> --body "<comment>"` |
|
||||
| **Link an issue** | Edit the linked-issue section in the body |
|
||||
| **Smart update after new commits** | Re-analyze and suggest section updates |
|
||||
|
||||
### Step 4: Handle Body Section Edits
|
||||
|
||||
When editing a specific section:
|
||||
|
||||
1. Parse the current PR body into sections by `## ` headers
|
||||
2. Match the user's request to the corresponding section from the template
|
||||
3. Show the current content of that section and the proposed replacement
|
||||
4. On confirmation, modify only that section, reconstruct the full body, and submit
|
||||
|
||||
### Step 5: Smart Update After New Commits
|
||||
|
||||
When the user wants to sync the PR description after pushing new changes:
|
||||
|
||||
1. Identify new commits:
|
||||
```bash
|
||||
gh pr view <number> --json commits --jq '.commits[].messageHeadline'
|
||||
git log <base>..<head> --oneline
|
||||
git diff <base>...<head> --stat
|
||||
```
|
||||
|
||||
2. Re-read the PR template. Analyze which sections are now stale based on the new changes — use the template's section names and field descriptions to identify what needs updating rather than relying on hardcoded assumptions.
|
||||
|
||||
3. Present proposed updates section-by-section and confirm before applying.
|
||||
|
||||
### Step 6: Apply Updates
|
||||
|
||||
For title/label changes, use direct `gh pr edit` flags.
|
||||
|
||||
For body edits, use a HEREDOC:
|
||||
```bash
|
||||
gh pr edit <number> --body "$(cat <<'PR_BODY_EOF'
|
||||
<full updated body>
|
||||
PR_BODY_EOF
|
||||
)"
|
||||
```
|
||||
|
||||
For comments:
|
||||
```bash
|
||||
gh pr comment <number> --body "$(cat <<'COMMENT_EOF'
|
||||
<comment text>
|
||||
COMMENT_EOF
|
||||
)"
|
||||
```
|
||||
|
||||
### Step 7: Confirm
|
||||
|
||||
Fetch and display the updated state:
|
||||
```bash
|
||||
gh pr view <number> --json number,title,labels,url
|
||||
```
|
||||
|
||||
Return the PR URL.
|
||||
|
||||
---
|
||||
|
||||
## Important Rules
|
||||
|
||||
- **Always read `.github/pull_request_template.md`** before filling or editing a PR body. Never assume section names, fields, or structure — derive everything from the template. It's the source of truth and may change.
|
||||
- **For updates, only modify requested sections.** Preserve everything else exactly as-is.
|
||||
- **Always show diffs before applying body edits.** Present current vs proposed for each changed section.
|
||||
- **Never include personal/sensitive data** in PR content per ZeroClaw's privacy contract.
|
||||
- **For label changes**, only use labels that exist in the repository. Check with `gh label list` if unsure.
|
||||
- **Fetch the latest body before editing** to avoid clobbering concurrent changes.
|
||||
- **For new PRs**, push the branch before creating (with `-u` to set upstream tracking).
|
||||
@@ -0,0 +1,202 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -0,0 +1,485 @@
|
||||
---
|
||||
name: skill-creator
|
||||
description: Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.
|
||||
---
|
||||
|
||||
# Skill Creator
|
||||
|
||||
A skill for creating new skills and iteratively improving them.
|
||||
|
||||
At a high level, the process of creating a skill goes like this:
|
||||
|
||||
- Decide what you want the skill to do and roughly how it should do it
|
||||
- Write a draft of the skill
|
||||
- Create a few test prompts and run claude-with-access-to-the-skill on them
|
||||
- Help the user evaluate the results both qualitatively and quantitatively
|
||||
- While the runs happen in the background, draft some quantitative evals if there aren't any (if there are some, you can either use as is or modify if you feel something needs to change about them). Then explain them to the user (or if they already existed, explain the ones that already exist)
|
||||
- Use the `eval-viewer/generate_review.py` script to show the user the results for them to look at, and also let them look at the quantitative metrics
|
||||
- Rewrite the skill based on feedback from the user's evaluation of the results (and also if there are any glaring flaws that become apparent from the quantitative benchmarks)
|
||||
- Repeat until you're satisfied
|
||||
- Expand the test set and try again at larger scale
|
||||
|
||||
Your job when using this skill is to figure out where the user is in this process and then jump in and help them progress through these stages. So for instance, maybe they're like "I want to make a skill for X". You can help narrow down what they mean, write a draft, write the test cases, figure out how they want to evaluate, run all the prompts, and repeat.
|
||||
|
||||
On the other hand, maybe they already have a draft of the skill. In this case you can go straight to the eval/iterate part of the loop.
|
||||
|
||||
Of course, you should always be flexible and if the user is like "I don't need to run a bunch of evaluations, just vibe with me", you can do that instead.
|
||||
|
||||
Then after the skill is done (but again, the order is flexible), you can also run the skill description improver, which we have a whole separate script for, to optimize the triggering of the skill.
|
||||
|
||||
Cool? Cool.
|
||||
|
||||
## Communicating with the user
|
||||
|
||||
The skill creator is liable to be used by people across a wide range of familiarity with coding jargon. If you haven't heard (and how could you, it's only very recently that it started), there's a trend now where the power of Claude is inspiring plumbers to open up their terminals, parents and grandparents to google "how to install npm". On the other hand, the bulk of users are probably fairly computer-literate.
|
||||
|
||||
So please pay attention to context cues to understand how to phrase your communication! In the default case, just to give you some idea:
|
||||
|
||||
- "evaluation" and "benchmark" are borderline, but OK
|
||||
- for "JSON" and "assertion" you want to see serious cues from the user that they know what those things are before using them without explaining them
|
||||
|
||||
It's OK to briefly explain terms if you're in doubt, and feel free to clarify terms with a short definition if you're unsure if the user will get it.
|
||||
|
||||
---
|
||||
|
||||
## Creating a skill
|
||||
|
||||
### Capture Intent
|
||||
|
||||
Start by understanding the user's intent. The current conversation might already contain a workflow the user wants to capture (e.g., they say "turn this into a skill"). If so, extract answers from the conversation history first — the tools used, the sequence of steps, corrections the user made, input/output formats observed. The user may need to fill the gaps, and should confirm before proceeding to the next step.
|
||||
|
||||
1. What should this skill enable Claude to do?
|
||||
2. When should this skill trigger? (what user phrases/contexts)
|
||||
3. What's the expected output format?
|
||||
4. Should we set up test cases to verify the skill works? Skills with objectively verifiable outputs (file transforms, data extraction, code generation, fixed workflow steps) benefit from test cases. Skills with subjective outputs (writing style, art) often don't need them. Suggest the appropriate default based on the skill type, but let the user decide.
|
||||
|
||||
### Interview and Research
|
||||
|
||||
Proactively ask questions about edge cases, input/output formats, example files, success criteria, and dependencies. Wait to write test prompts until you've got this part ironed out.
|
||||
|
||||
Check available MCPs - if useful for research (searching docs, finding similar skills, looking up best practices), research in parallel via subagents if available, otherwise inline. Come prepared with context to reduce burden on the user.
|
||||
|
||||
### Write the SKILL.md
|
||||
|
||||
Based on the user interview, fill in these components:
|
||||
|
||||
- **name**: Skill identifier
|
||||
- **description**: When to trigger, what it does. This is the primary triggering mechanism - include both what the skill does AND specific contexts for when to use it. All "when to use" info goes here, not in the body. Note: currently Claude has a tendency to "undertrigger" skills -- to not use them when they'd be useful. To combat this, please make the skill descriptions a little bit "pushy". So for instance, instead of "How to build a simple fast dashboard to display internal Anthropic data.", you might write "How to build a simple fast dashboard to display internal Anthropic data. Make sure to use this skill whenever the user mentions dashboards, data visualization, internal metrics, or wants to display any kind of company data, even if they don't explicitly ask for a 'dashboard.'"
|
||||
- **compatibility**: Required tools, dependencies (optional, rarely needed)
|
||||
- **the rest of the skill :)**
|
||||
|
||||
### Skill Writing Guide
|
||||
|
||||
#### Anatomy of a Skill
|
||||
|
||||
```
|
||||
skill-name/
|
||||
├── SKILL.md (required)
|
||||
│ ├── YAML frontmatter (name, description required)
|
||||
│ └── Markdown instructions
|
||||
└── Bundled Resources (optional)
|
||||
├── scripts/ - Executable code for deterministic/repetitive tasks
|
||||
├── references/ - Docs loaded into context as needed
|
||||
└── assets/ - Files used in output (templates, icons, fonts)
|
||||
```
|
||||
|
||||
#### Progressive Disclosure
|
||||
|
||||
Skills use a three-level loading system:
|
||||
1. **Metadata** (name + description) - Always in context (~100 words)
|
||||
2. **SKILL.md body** - In context whenever skill triggers (<500 lines ideal)
|
||||
3. **Bundled resources** - As needed (unlimited, scripts can execute without loading)
|
||||
|
||||
These word counts are approximate and you can feel free to go longer if needed.
|
||||
|
||||
**Key patterns:**
|
||||
- Keep SKILL.md under 500 lines; if you're approaching this limit, add an additional layer of hierarchy along with clear pointers about where the model using the skill should go next to follow up.
|
||||
- Reference files clearly from SKILL.md with guidance on when to read them
|
||||
- For large reference files (>300 lines), include a table of contents
|
||||
|
||||
**Domain organization**: When a skill supports multiple domains/frameworks, organize by variant:
|
||||
```
|
||||
cloud-deploy/
|
||||
├── SKILL.md (workflow + selection)
|
||||
└── references/
|
||||
├── aws.md
|
||||
├── gcp.md
|
||||
└── azure.md
|
||||
```
|
||||
Claude reads only the relevant reference file.
|
||||
|
||||
#### Principle of Lack of Surprise
|
||||
|
||||
This goes without saying, but skills must not contain malware, exploit code, or any content that could compromise system security. A skill's contents should not surprise the user in their intent if described. Don't go along with requests to create misleading skills or skills designed to facilitate unauthorized access, data exfiltration, or other malicious activities. Things like a "roleplay as an XYZ" are OK though.
|
||||
|
||||
#### Writing Patterns
|
||||
|
||||
Prefer using the imperative form in instructions.
|
||||
|
||||
**Defining output formats** - You can do it like this:
|
||||
```markdown
|
||||
## Report structure
|
||||
ALWAYS use this exact template:
|
||||
# [Title]
|
||||
## Executive summary
|
||||
## Key findings
|
||||
## Recommendations
|
||||
```
|
||||
|
||||
**Examples pattern** - It's useful to include examples. You can format them like this (but if "Input" and "Output" are in the examples you might want to deviate a little):
|
||||
```markdown
|
||||
## Commit message format
|
||||
**Example 1:**
|
||||
Input: Added user authentication with JWT tokens
|
||||
Output: feat(auth): implement JWT-based authentication
|
||||
```
|
||||
|
||||
### Writing Style
|
||||
|
||||
Try to explain to the model why things are important in lieu of heavy-handed musty MUSTs. Use theory of mind and try to make the skill general and not super-narrow to specific examples. Start by writing a draft and then look at it with fresh eyes and improve it.
|
||||
|
||||
### Test Cases
|
||||
|
||||
After writing the skill draft, come up with 2-3 realistic test prompts — the kind of thing a real user would actually say. Share them with the user: [you don't have to use this exact language] "Here are a few test cases I'd like to try. Do these look right, or do you want to add more?" Then run them.
|
||||
|
||||
Save test cases to `evals/evals.json`. Don't write assertions yet — just the prompts. You'll draft assertions in the next step while the runs are in progress.
|
||||
|
||||
```json
|
||||
{
|
||||
"skill_name": "example-skill",
|
||||
"evals": [
|
||||
{
|
||||
"id": 1,
|
||||
"prompt": "User's task prompt",
|
||||
"expected_output": "Description of expected result",
|
||||
"files": []
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
See `references/schemas.md` for the full schema (including the `assertions` field, which you'll add later).
|
||||
|
||||
## Running and evaluating test cases
|
||||
|
||||
This section is one continuous sequence — don't stop partway through. Do NOT use `/skill-test` or any other testing skill.
|
||||
|
||||
Put results in `<skill-name>-workspace/` as a sibling to the skill directory. Within the workspace, organize results by iteration (`iteration-1/`, `iteration-2/`, etc.) and within that, each test case gets a directory (`eval-0/`, `eval-1/`, etc.). Don't create all of this upfront — just create directories as you go.
|
||||
|
||||
### Step 1: Spawn all runs (with-skill AND baseline) in the same turn
|
||||
|
||||
For each test case, spawn two subagents in the same turn — one with the skill, one without. This is important: don't spawn the with-skill runs first and then come back for baselines later. Launch everything at once so it all finishes around the same time.
|
||||
|
||||
**With-skill run:**
|
||||
|
||||
```
|
||||
Execute this task:
|
||||
- Skill path: <path-to-skill>
|
||||
- Task: <eval prompt>
|
||||
- Input files: <eval files if any, or "none">
|
||||
- Save outputs to: <workspace>/iteration-<N>/eval-<ID>/with_skill/outputs/
|
||||
- Outputs to save: <what the user cares about — e.g., "the .docx file", "the final CSV">
|
||||
```
|
||||
|
||||
**Baseline run** (same prompt, but the baseline depends on context):
|
||||
- **Creating a new skill**: no skill at all. Same prompt, no skill path, save to `without_skill/outputs/`.
|
||||
- **Improving an existing skill**: the old version. Before editing, snapshot the skill (`cp -r <skill-path> <workspace>/skill-snapshot/`), then point the baseline subagent at the snapshot. Save to `old_skill/outputs/`.
|
||||
|
||||
Write an `eval_metadata.json` for each test case (assertions can be empty for now). Give each eval a descriptive name based on what it's testing — not just "eval-0". Use this name for the directory too. If this iteration uses new or modified eval prompts, create these files for each new eval directory — don't assume they carry over from previous iterations.
|
||||
|
||||
```json
|
||||
{
|
||||
"eval_id": 0,
|
||||
"eval_name": "descriptive-name-here",
|
||||
"prompt": "The user's task prompt",
|
||||
"assertions": []
|
||||
}
|
||||
```
|
||||
|
||||
### Step 2: While runs are in progress, draft assertions
|
||||
|
||||
Don't just wait for the runs to finish — you can use this time productively. Draft quantitative assertions for each test case and explain them to the user. If assertions already exist in `evals/evals.json`, review them and explain what they check.
|
||||
|
||||
Good assertions are objectively verifiable and have descriptive names — they should read clearly in the benchmark viewer so someone glancing at the results immediately understands what each one checks. Subjective skills (writing style, design quality) are better evaluated qualitatively — don't force assertions onto things that need human judgment.
|
||||
|
||||
Update the `eval_metadata.json` files and `evals/evals.json` with the assertions once drafted. Also explain to the user what they'll see in the viewer — both the qualitative outputs and the quantitative benchmark.
|
||||
|
||||
### Step 3: As runs complete, capture timing data
|
||||
|
||||
When each subagent task completes, you receive a notification containing `total_tokens` and `duration_ms`. Save this data immediately to `timing.json` in the run directory:
|
||||
|
||||
```json
|
||||
{
|
||||
"total_tokens": 84852,
|
||||
"duration_ms": 23332,
|
||||
"total_duration_seconds": 23.3
|
||||
}
|
||||
```
|
||||
|
||||
This is the only opportunity to capture this data — it comes through the task notification and isn't persisted elsewhere. Process each notification as it arrives rather than trying to batch them.
|
||||
|
||||
### Step 4: Grade, aggregate, and launch the viewer
|
||||
|
||||
Once all runs are done:
|
||||
|
||||
1. **Grade each run** — spawn a grader subagent (or grade inline) that reads `agents/grader.md` and evaluates each assertion against the outputs. Save results to `grading.json` in each run directory. The grading.json expectations array must use the fields `text`, `passed`, and `evidence` (not `name`/`met`/`details` or other variants) — the viewer depends on these exact field names. For assertions that can be checked programmatically, write and run a script rather than eyeballing it — scripts are faster, more reliable, and can be reused across iterations.
|
||||
|
||||
2. **Aggregate into benchmark** — run the aggregation script from the skill-creator directory:
|
||||
```bash
|
||||
python -m scripts.aggregate_benchmark <workspace>/iteration-N --skill-name <name>
|
||||
```
|
||||
This produces `benchmark.json` and `benchmark.md` with pass_rate, time, and tokens for each configuration, with mean ± stddev and the delta. If generating benchmark.json manually, see `references/schemas.md` for the exact schema the viewer expects.
|
||||
Put each with_skill version before its baseline counterpart.
|
||||
|
||||
3. **Do an analyst pass** — read the benchmark data and surface patterns the aggregate stats might hide. See `agents/analyzer.md` (the "Analyzing Benchmark Results" section) for what to look for — things like assertions that always pass regardless of skill (non-discriminating), high-variance evals (possibly flaky), and time/token tradeoffs.
|
||||
|
||||
4. **Launch the viewer** with both qualitative outputs and quantitative data:
|
||||
```bash
|
||||
nohup python <skill-creator-path>/eval-viewer/generate_review.py \
|
||||
<workspace>/iteration-N \
|
||||
--skill-name "my-skill" \
|
||||
--benchmark <workspace>/iteration-N/benchmark.json \
|
||||
> /dev/null 2>&1 &
|
||||
VIEWER_PID=$!
|
||||
```
|
||||
For iteration 2+, also pass `--previous-workspace <workspace>/iteration-<N-1>`.
|
||||
|
||||
**Cowork / headless environments:** If `webbrowser.open()` is not available or the environment has no display, use `--static <output_path>` to write a standalone HTML file instead of starting a server. Feedback will be downloaded as a `feedback.json` file when the user clicks "Submit All Reviews". After download, copy `feedback.json` into the workspace directory for the next iteration to pick up.
|
||||
|
||||
Note: please use generate_review.py to create the viewer; there's no need to write custom HTML.
|
||||
|
||||
5. **Tell the user** something like: "I've opened the results in your browser. There are two tabs — 'Outputs' lets you click through each test case and leave feedback, 'Benchmark' shows the quantitative comparison. When you're done, come back here and let me know."
|
||||
|
||||
### What the user sees in the viewer
|
||||
|
||||
The "Outputs" tab shows one test case at a time:
|
||||
- **Prompt**: the task that was given
|
||||
- **Output**: the files the skill produced, rendered inline where possible
|
||||
- **Previous Output** (iteration 2+): collapsed section showing last iteration's output
|
||||
- **Formal Grades** (if grading was run): collapsed section showing assertion pass/fail
|
||||
- **Feedback**: a textbox that auto-saves as they type
|
||||
- **Previous Feedback** (iteration 2+): their comments from last time, shown below the textbox
|
||||
|
||||
The "Benchmark" tab shows the stats summary: pass rates, timing, and token usage for each configuration, with per-eval breakdowns and analyst observations.
|
||||
|
||||
Navigation is via prev/next buttons or arrow keys. When done, they click "Submit All Reviews" which saves all feedback to `feedback.json`.
|
||||
|
||||
### Step 5: Read the feedback
|
||||
|
||||
When the user tells you they're done, read `feedback.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"reviews": [
|
||||
{"run_id": "eval-0-with_skill", "feedback": "the chart is missing axis labels", "timestamp": "..."},
|
||||
{"run_id": "eval-1-with_skill", "feedback": "", "timestamp": "..."},
|
||||
{"run_id": "eval-2-with_skill", "feedback": "perfect, love this", "timestamp": "..."}
|
||||
],
|
||||
"status": "complete"
|
||||
}
|
||||
```
|
||||
|
||||
Empty feedback means the user thought it was fine. Focus your improvements on the test cases where the user had specific complaints.
|
||||
|
||||
Kill the viewer server when you're done with it:
|
||||
|
||||
```bash
|
||||
kill $VIEWER_PID 2>/dev/null
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Improving the skill
|
||||
|
||||
This is the heart of the loop. You've run the test cases, the user has reviewed the results, and now you need to make the skill better based on their feedback.
|
||||
|
||||
### How to think about improvements
|
||||
|
||||
1. **Generalize from the feedback.** The big picture thing that's happening here is that we're trying to create skills that can be used a million times (maybe literally, maybe even more who knows) across many different prompts. Here you and the user are iterating on only a few examples over and over again because it helps move faster. The user knows these examples in and out and it's quick for them to assess new outputs. But if the skill you and the user are codeveloping works only for those examples, it's useless. Rather than put in fiddly overfitty changes, or oppressively constrictive MUSTs, if there's some stubborn issue, you might try branching out and using different metaphors, or recommending different patterns of working. It's relatively cheap to try and maybe you'll land on something great.
|
||||
|
||||
2. **Keep the prompt lean.** Remove things that aren't pulling their weight. Make sure to read the transcripts, not just the final outputs — if it looks like the skill is making the model waste a bunch of time doing things that are unproductive, you can try getting rid of the parts of the skill that are making it do that and seeing what happens.
|
||||
|
||||
3. **Explain the why.** Try hard to explain the **why** behind everything you're asking the model to do. Today's LLMs are *smart*. They have good theory of mind and when given a good harness can go beyond rote instructions and really make things happen. Even if the feedback from the user is terse or frustrated, try to actually understand the task and why the user is writing what they wrote, and what they actually wrote, and then transmit this understanding into the instructions. If you find yourself writing ALWAYS or NEVER in all caps, or using super rigid structures, that's a yellow flag — if possible, reframe and explain the reasoning so that the model understands why the thing you're asking for is important. That's a more humane, powerful, and effective approach.
|
||||
|
||||
4. **Look for repeated work across test cases.** Read the transcripts from the test runs and notice if the subagents all independently wrote similar helper scripts or took the same multi-step approach to something. If all 3 test cases resulted in the subagent writing a `create_docx.py` or a `build_chart.py`, that's a strong signal the skill should bundle that script. Write it once, put it in `scripts/`, and tell the skill to use it. This saves every future invocation from reinventing the wheel.
|
||||
|
||||
This task is pretty important (we are trying to create billions a year in economic value here!) and your thinking time is not the blocker; take your time and really mull things over. I'd suggest writing a draft revision and then looking at it anew and making improvements. Really do your best to get into the head of the user and understand what they want and need.
|
||||
|
||||
### The iteration loop
|
||||
|
||||
After improving the skill:
|
||||
|
||||
1. Apply your improvements to the skill
|
||||
2. Rerun all test cases into a new `iteration-<N+1>/` directory, including baseline runs. If you're creating a new skill, the baseline is always `without_skill` (no skill) — that stays the same across iterations. If you're improving an existing skill, use your judgment on what makes sense as the baseline: the original version the user came in with, or the previous iteration.
|
||||
3. Launch the reviewer with `--previous-workspace` pointing at the previous iteration
|
||||
4. Wait for the user to review and tell you they're done
|
||||
5. Read the new feedback, improve again, repeat
|
||||
|
||||
Keep going until:
|
||||
- The user says they're happy
|
||||
- The feedback is all empty (everything looks good)
|
||||
- You're not making meaningful progress
|
||||
|
||||
---
|
||||
|
||||
## Advanced: Blind comparison
|
||||
|
||||
For situations where you want a more rigorous comparison between two versions of a skill (e.g., the user asks "is the new version actually better?"), there's a blind comparison system. Read `agents/comparator.md` and `agents/analyzer.md` for the details. The basic idea is: give two outputs to an independent agent without telling it which is which, and let it judge quality. Then analyze why the winner won.
|
||||
|
||||
This is optional, requires subagents, and most users won't need it. The human review loop is usually sufficient.
|
||||
|
||||
---
|
||||
|
||||
## Description Optimization
|
||||
|
||||
The description field in SKILL.md frontmatter is the primary mechanism that determines whether Claude invokes a skill. After creating or improving a skill, offer to optimize the description for better triggering accuracy.
|
||||
|
||||
### Step 1: Generate trigger eval queries
|
||||
|
||||
Create 20 eval queries — a mix of should-trigger and should-not-trigger. Save as JSON:
|
||||
|
||||
```json
|
||||
[
|
||||
{"query": "the user prompt", "should_trigger": true},
|
||||
{"query": "another prompt", "should_trigger": false}
|
||||
]
|
||||
```
|
||||
|
||||
The queries must be realistic and something a Claude Code or Claude.ai user would actually type. Not abstract requests, but requests that are concrete and specific and have a good amount of detail. For instance, file paths, personal context about the user's job or situation, column names and values, company names, URLs. A little bit of backstory. Some might be in lowercase or contain abbreviations or typos or casual speech. Use a mix of different lengths, and focus on edge cases rather than making them clear-cut (the user will get a chance to sign off on them).
|
||||
|
||||
Bad: `"Format this data"`, `"Extract text from PDF"`, `"Create a chart"`
|
||||
|
||||
Good: `"ok so my boss just sent me this xlsx file (its in my downloads, called something like 'Q4 sales final FINAL v2.xlsx') and she wants me to add a column that shows the profit margin as a percentage. The revenue is in column C and costs are in column D i think"`
|
||||
|
||||
For the **should-trigger** queries (8-10), think about coverage. You want different phrasings of the same intent — some formal, some casual. Include cases where the user doesn't explicitly name the skill or file type but clearly needs it. Throw in some uncommon use cases and cases where this skill competes with another but should win.
|
||||
|
||||
For the **should-not-trigger** queries (8-10), the most valuable ones are the near-misses — queries that share keywords or concepts with the skill but actually need something different. Think adjacent domains, ambiguous phrasing where a naive keyword match would trigger but shouldn't, and cases where the query touches on something the skill does but in a context where another tool is more appropriate.
|
||||
|
||||
The key thing to avoid: don't make should-not-trigger queries obviously irrelevant. "Write a fibonacci function" as a negative test for a PDF skill is too easy — it doesn't test anything. The negative cases should be genuinely tricky.
|
||||
|
||||
### Step 2: Review with user
|
||||
|
||||
Present the eval set to the user for review using the HTML template:
|
||||
|
||||
1. Read the template from `assets/eval_review.html`
|
||||
2. Replace the placeholders:
|
||||
- `__EVAL_DATA_PLACEHOLDER__` → the JSON array of eval items (no quotes around it — it's a JS variable assignment)
|
||||
- `__SKILL_NAME_PLACEHOLDER__` → the skill's name
|
||||
- `__SKILL_DESCRIPTION_PLACEHOLDER__` → the skill's current description
|
||||
3. Write to a temp file (e.g., `/tmp/eval_review_<skill-name>.html`) and open it: `open /tmp/eval_review_<skill-name>.html`
|
||||
4. The user can edit queries, toggle should-trigger, add/remove entries, then click "Export Eval Set"
|
||||
5. The file downloads to `~/Downloads/eval_set.json` — check the Downloads folder for the most recent version in case there are multiple (e.g., `eval_set (1).json`)
|
||||
|
||||
This step matters — bad eval queries lead to bad descriptions.
|
||||
|
||||
### Step 3: Run the optimization loop
|
||||
|
||||
Tell the user: "This will take some time — I'll run the optimization loop in the background and check on it periodically."
|
||||
|
||||
Save the eval set to the workspace, then run in the background:
|
||||
|
||||
```bash
|
||||
python -m scripts.run_loop \
|
||||
--eval-set <path-to-trigger-eval.json> \
|
||||
--skill-path <path-to-skill> \
|
||||
--model <model-id-powering-this-session> \
|
||||
--max-iterations 5 \
|
||||
--verbose
|
||||
```
|
||||
|
||||
Use the model ID from your system prompt (the one powering the current session) so the triggering test matches what the user actually experiences.
|
||||
|
||||
While it runs, periodically tail the output to give the user updates on which iteration it's on and what the scores look like.
|
||||
|
||||
This handles the full optimization loop automatically. It splits the eval set into 60% train and 40% held-out test, evaluates the current description (running each query 3 times to get a reliable trigger rate), then calls Claude to propose improvements based on what failed. It re-evaluates each new description on both train and test, iterating up to 5 times. When it's done, it opens an HTML report in the browser showing the results per iteration and returns JSON with `best_description` — selected by test score rather than train score to avoid overfitting.
|
||||
|
||||
### How skill triggering works
|
||||
|
||||
Understanding the triggering mechanism helps design better eval queries. Skills appear in Claude's `available_skills` list with their name + description, and Claude decides whether to consult a skill based on that description. The important thing to know is that Claude only consults skills for tasks it can't easily handle on its own — simple, one-step queries like "read this PDF" may not trigger a skill even if the description matches perfectly, because Claude can handle them directly with basic tools. Complex, multi-step, or specialized queries reliably trigger skills when the description matches.
|
||||
|
||||
This means your eval queries should be substantive enough that Claude would actually benefit from consulting a skill. Simple queries like "read file X" are poor test cases — they won't trigger skills regardless of description quality.
|
||||
|
||||
### Step 4: Apply the result
|
||||
|
||||
Take `best_description` from the JSON output and update the skill's SKILL.md frontmatter. Show the user before/after and report the scores.
|
||||
|
||||
---
|
||||
|
||||
### Package and Present (only if `present_files` tool is available)
|
||||
|
||||
Check whether you have access to the `present_files` tool. If you don't, skip this step. If you do, package the skill and present the .skill file to the user:
|
||||
|
||||
```bash
|
||||
python -m scripts.package_skill <path/to/skill-folder>
|
||||
```
|
||||
|
||||
After packaging, direct the user to the resulting `.skill` file path so they can install it.
|
||||
|
||||
---
|
||||
|
||||
## Claude.ai-specific instructions
|
||||
|
||||
In Claude.ai, the core workflow is the same (draft → test → review → improve → repeat), but because Claude.ai doesn't have subagents, some mechanics change. Here's what to adapt:
|
||||
|
||||
**Running test cases**: No subagents means no parallel execution. For each test case, read the skill's SKILL.md, then follow its instructions to accomplish the test prompt yourself. Do them one at a time. This is less rigorous than independent subagents (you wrote the skill and you're also running it, so you have full context), but it's a useful sanity check — and the human review step compensates. Skip the baseline runs — just use the skill to complete the task as requested.
|
||||
|
||||
**Reviewing results**: If you can't open a browser (e.g., Claude.ai's VM has no display, or you're on a remote server), skip the browser reviewer entirely. Instead, present results directly in the conversation. For each test case, show the prompt and the output. If the output is a file the user needs to see (like a .docx or .xlsx), save it to the filesystem and tell them where it is so they can download and inspect it. Ask for feedback inline: "How does this look? Anything you'd change?"
|
||||
|
||||
**Benchmarking**: Skip the quantitative benchmarking — it relies on baseline comparisons which aren't meaningful without subagents. Focus on qualitative feedback from the user.
|
||||
|
||||
**The iteration loop**: Same as before — improve the skill, rerun the test cases, ask for feedback — just without the browser reviewer in the middle. You can still organize results into iteration directories on the filesystem if you have one.
|
||||
|
||||
**Description optimization**: This section requires the `claude` CLI tool (specifically `claude -p`) which is only available in Claude Code. Skip it if you're on Claude.ai.
|
||||
|
||||
**Blind comparison**: Requires subagents. Skip it.
|
||||
|
||||
**Packaging**: The `package_skill.py` script works anywhere with Python and a filesystem. On Claude.ai, you can run it and the user can download the resulting `.skill` file.
|
||||
|
||||
**Updating an existing skill**: The user might be asking you to update an existing skill, not create a new one. In this case:
|
||||
- **Preserve the original name.** Note the skill's directory name and `name` frontmatter field -- use them unchanged. E.g., if the installed skill is `research-helper`, output `research-helper.skill` (not `research-helper-v2`).
|
||||
- **Copy to a writeable location before editing.** The installed skill path may be read-only. Copy to `/tmp/skill-name/`, edit there, and package from the copy.
|
||||
- **If packaging manually, stage in `/tmp/` first**, then copy to the output directory -- direct writes may fail due to permissions.
|
||||
|
||||
---
|
||||
|
||||
## Cowork-Specific Instructions
|
||||
|
||||
If you're in Cowork, the main things to know are:
|
||||
|
||||
- You have subagents, so the main workflow (spawn test cases in parallel, run baselines, grade, etc.) all works. (However, if you run into severe problems with timeouts, it's OK to run the test prompts in series rather than parallel.)
|
||||
- You don't have a browser or display, so when generating the eval viewer, use `--static <output_path>` to write a standalone HTML file instead of starting a server. Then proffer a link that the user can click to open the HTML in their browser.
|
||||
- For whatever reason, the Cowork setup seems to disincline Claude from generating the eval viewer after running the tests, so just to reiterate: whether you're in Cowork or in Claude Code, after running tests, you should always generate the eval viewer for the human to look at examples before revising the skill yourself and trying to make corrections, using `generate_review.py` (not writing your own boutique html code). Sorry in advance but I'm gonna go all caps here: GENERATE THE EVAL VIEWER *BEFORE* evaluating inputs yourself. You want to get them in front of the human ASAP!
|
||||
- Feedback works differently: since there's no running server, the viewer's "Submit All Reviews" button will download `feedback.json` as a file. You can then read it from there (you may have to request access first).
|
||||
- Packaging works — `package_skill.py` just needs Python and a filesystem.
|
||||
- Description optimization (`run_loop.py` / `run_eval.py`) should work in Cowork just fine since it uses `claude -p` via subprocess, not a browser, but please save it until you've fully finished making the skill and the user agrees it's in good shape.
|
||||
- **Updating an existing skill**: The user might be asking you to update an existing skill, not create a new one. Follow the update guidance in the claude.ai section above.
|
||||
|
||||
---
|
||||
|
||||
## Reference files
|
||||
|
||||
The agents/ directory contains instructions for specialized subagents. Read them when you need to spawn the relevant subagent.
|
||||
|
||||
- `agents/grader.md` — How to evaluate assertions against outputs
|
||||
- `agents/comparator.md` — How to do blind A/B comparison between two outputs
|
||||
- `agents/analyzer.md` — How to analyze why one version beat another
|
||||
|
||||
The references/ directory has additional documentation:
|
||||
- `references/schemas.md` — JSON structures for evals.json, grading.json, etc.
|
||||
|
||||
---
|
||||
|
||||
Repeating one more time the core loop here for emphasis:
|
||||
|
||||
- Figure out what the skill is about
|
||||
- Draft or edit the skill
|
||||
- Run claude-with-access-to-the-skill on test prompts
|
||||
- With the user, evaluate the outputs:
|
||||
- Create benchmark.json and run `eval-viewer/generate_review.py` to help the user review them
|
||||
- Run quantitative evals
|
||||
- Repeat until you and the user are satisfied
|
||||
- Package the final skill and return it to the user.
|
||||
|
||||
Please add steps to your TodoList, if you have such a thing, to make sure you don't forget. If you're in Cowork, please specifically put "Create evals JSON and run `eval-viewer/generate_review.py` so human can review test cases" in your TodoList to make sure it happens.
|
||||
|
||||
Good luck!
|
||||
@@ -0,0 +1,274 @@
|
||||
# Post-hoc Analyzer Agent
|
||||
|
||||
Analyze blind comparison results to understand WHY the winner won and generate improvement suggestions.
|
||||
|
||||
## Role
|
||||
|
||||
After the blind comparator determines a winner, the Post-hoc Analyzer "unblids" the results by examining the skills and transcripts. The goal is to extract actionable insights: what made the winner better, and how can the loser be improved?
|
||||
|
||||
## Inputs
|
||||
|
||||
You receive these parameters in your prompt:
|
||||
|
||||
- **winner**: "A" or "B" (from blind comparison)
|
||||
- **winner_skill_path**: Path to the skill that produced the winning output
|
||||
- **winner_transcript_path**: Path to the execution transcript for the winner
|
||||
- **loser_skill_path**: Path to the skill that produced the losing output
|
||||
- **loser_transcript_path**: Path to the execution transcript for the loser
|
||||
- **comparison_result_path**: Path to the blind comparator's output JSON
|
||||
- **output_path**: Where to save the analysis results
|
||||
|
||||
## Process
|
||||
|
||||
### Step 1: Read Comparison Result
|
||||
|
||||
1. Read the blind comparator's output at comparison_result_path
|
||||
2. Note the winning side (A or B), the reasoning, and any scores
|
||||
3. Understand what the comparator valued in the winning output
|
||||
|
||||
### Step 2: Read Both Skills
|
||||
|
||||
1. Read the winner skill's SKILL.md and key referenced files
|
||||
2. Read the loser skill's SKILL.md and key referenced files
|
||||
3. Identify structural differences:
|
||||
- Instructions clarity and specificity
|
||||
- Script/tool usage patterns
|
||||
- Example coverage
|
||||
- Edge case handling
|
||||
|
||||
### Step 3: Read Both Transcripts
|
||||
|
||||
1. Read the winner's transcript
|
||||
2. Read the loser's transcript
|
||||
3. Compare execution patterns:
|
||||
- How closely did each follow their skill's instructions?
|
||||
- What tools were used differently?
|
||||
- Where did the loser diverge from optimal behavior?
|
||||
- Did either encounter errors or make recovery attempts?
|
||||
|
||||
### Step 4: Analyze Instruction Following
|
||||
|
||||
For each transcript, evaluate:
|
||||
- Did the agent follow the skill's explicit instructions?
|
||||
- Did the agent use the skill's provided tools/scripts?
|
||||
- Were there missed opportunities to leverage skill content?
|
||||
- Did the agent add unnecessary steps not in the skill?
|
||||
|
||||
Score instruction following 1-10 and note specific issues.
|
||||
|
||||
### Step 5: Identify Winner Strengths
|
||||
|
||||
Determine what made the winner better:
|
||||
- Clearer instructions that led to better behavior?
|
||||
- Better scripts/tools that produced better output?
|
||||
- More comprehensive examples that guided edge cases?
|
||||
- Better error handling guidance?
|
||||
|
||||
Be specific. Quote from skills/transcripts where relevant.
|
||||
|
||||
### Step 6: Identify Loser Weaknesses
|
||||
|
||||
Determine what held the loser back:
|
||||
- Ambiguous instructions that led to suboptimal choices?
|
||||
- Missing tools/scripts that forced workarounds?
|
||||
- Gaps in edge case coverage?
|
||||
- Poor error handling that caused failures?
|
||||
|
||||
### Step 7: Generate Improvement Suggestions
|
||||
|
||||
Based on the analysis, produce actionable suggestions for improving the loser skill:
|
||||
- Specific instruction changes to make
|
||||
- Tools/scripts to add or modify
|
||||
- Examples to include
|
||||
- Edge cases to address
|
||||
|
||||
Prioritize by impact. Focus on changes that would have changed the outcome.
|
||||
|
||||
### Step 8: Write Analysis Results
|
||||
|
||||
Save structured analysis to `{output_path}`.
|
||||
|
||||
## Output Format
|
||||
|
||||
Write a JSON file with this structure:
|
||||
|
||||
```json
|
||||
{
|
||||
"comparison_summary": {
|
||||
"winner": "A",
|
||||
"winner_skill": "path/to/winner/skill",
|
||||
"loser_skill": "path/to/loser/skill",
|
||||
"comparator_reasoning": "Brief summary of why comparator chose winner"
|
||||
},
|
||||
"winner_strengths": [
|
||||
"Clear step-by-step instructions for handling multi-page documents",
|
||||
"Included validation script that caught formatting errors",
|
||||
"Explicit guidance on fallback behavior when OCR fails"
|
||||
],
|
||||
"loser_weaknesses": [
|
||||
"Vague instruction 'process the document appropriately' led to inconsistent behavior",
|
||||
"No script for validation, agent had to improvise and made errors",
|
||||
"No guidance on OCR failure, agent gave up instead of trying alternatives"
|
||||
],
|
||||
"instruction_following": {
|
||||
"winner": {
|
||||
"score": 9,
|
||||
"issues": [
|
||||
"Minor: skipped optional logging step"
|
||||
]
|
||||
},
|
||||
"loser": {
|
||||
"score": 6,
|
||||
"issues": [
|
||||
"Did not use the skill's formatting template",
|
||||
"Invented own approach instead of following step 3",
|
||||
"Missed the 'always validate output' instruction"
|
||||
]
|
||||
}
|
||||
},
|
||||
"improvement_suggestions": [
|
||||
{
|
||||
"priority": "high",
|
||||
"category": "instructions",
|
||||
"suggestion": "Replace 'process the document appropriately' with explicit steps: 1) Extract text, 2) Identify sections, 3) Format per template",
|
||||
"expected_impact": "Would eliminate ambiguity that caused inconsistent behavior"
|
||||
},
|
||||
{
|
||||
"priority": "high",
|
||||
"category": "tools",
|
||||
"suggestion": "Add validate_output.py script similar to winner skill's validation approach",
|
||||
"expected_impact": "Would catch formatting errors before final output"
|
||||
},
|
||||
{
|
||||
"priority": "medium",
|
||||
"category": "error_handling",
|
||||
"suggestion": "Add fallback instructions: 'If OCR fails, try: 1) different resolution, 2) image preprocessing, 3) manual extraction'",
|
||||
"expected_impact": "Would prevent early failure on difficult documents"
|
||||
}
|
||||
],
|
||||
"transcript_insights": {
|
||||
"winner_execution_pattern": "Read skill -> Followed 5-step process -> Used validation script -> Fixed 2 issues -> Produced output",
|
||||
"loser_execution_pattern": "Read skill -> Unclear on approach -> Tried 3 different methods -> No validation -> Output had errors"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Guidelines
|
||||
|
||||
- **Be specific**: Quote from skills and transcripts, don't just say "instructions were unclear"
|
||||
- **Be actionable**: Suggestions should be concrete changes, not vague advice
|
||||
- **Focus on skill improvements**: The goal is to improve the losing skill, not critique the agent
|
||||
- **Prioritize by impact**: Which changes would most likely have changed the outcome?
|
||||
- **Consider causation**: Did the skill weakness actually cause the worse output, or is it incidental?
|
||||
- **Stay objective**: Analyze what happened, don't editorialize
|
||||
- **Think about generalization**: Would this improvement help on other evals too?
|
||||
|
||||
## Categories for Suggestions
|
||||
|
||||
Use these categories to organize improvement suggestions:
|
||||
|
||||
| Category | Description |
|
||||
|----------|-------------|
|
||||
| `instructions` | Changes to the skill's prose instructions |
|
||||
| `tools` | Scripts, templates, or utilities to add/modify |
|
||||
| `examples` | Example inputs/outputs to include |
|
||||
| `error_handling` | Guidance for handling failures |
|
||||
| `structure` | Reorganization of skill content |
|
||||
| `references` | External docs or resources to add |
|
||||
|
||||
## Priority Levels
|
||||
|
||||
- **high**: Would likely change the outcome of this comparison
|
||||
- **medium**: Would improve quality but may not change win/loss
|
||||
- **low**: Nice to have, marginal improvement
|
||||
|
||||
---
|
||||
|
||||
# Analyzing Benchmark Results
|
||||
|
||||
When analyzing benchmark results, the analyzer's purpose is to **surface patterns and anomalies** across multiple runs, not suggest skill improvements.
|
||||
|
||||
## Role
|
||||
|
||||
Review all benchmark run results and generate freeform notes that help the user understand skill performance. Focus on patterns that wouldn't be visible from aggregate metrics alone.
|
||||
|
||||
## Inputs
|
||||
|
||||
You receive these parameters in your prompt:
|
||||
|
||||
- **benchmark_data_path**: Path to the in-progress benchmark.json with all run results
|
||||
- **skill_path**: Path to the skill being benchmarked
|
||||
- **output_path**: Where to save the notes (as JSON array of strings)
|
||||
|
||||
## Process
|
||||
|
||||
### Step 1: Read Benchmark Data
|
||||
|
||||
1. Read the benchmark.json containing all run results
|
||||
2. Note the configurations tested (with_skill, without_skill)
|
||||
3. Understand the run_summary aggregates already calculated
|
||||
|
||||
### Step 2: Analyze Per-Assertion Patterns
|
||||
|
||||
For each expectation across all runs:
|
||||
- Does it **always pass** in both configurations? (may not differentiate skill value)
|
||||
- Does it **always fail** in both configurations? (may be broken or beyond capability)
|
||||
- Does it **always pass with skill but fail without**? (skill clearly adds value here)
|
||||
- Does it **always fail with skill but pass without**? (skill may be hurting)
|
||||
- Is it **highly variable**? (flaky expectation or non-deterministic behavior)
|
||||
|
||||
### Step 3: Analyze Cross-Eval Patterns
|
||||
|
||||
Look for patterns across evals:
|
||||
- Are certain eval types consistently harder/easier?
|
||||
- Do some evals show high variance while others are stable?
|
||||
- Are there surprising results that contradict expectations?
|
||||
|
||||
### Step 4: Analyze Metrics Patterns
|
||||
|
||||
Look at time_seconds, tokens, tool_calls:
|
||||
- Does the skill significantly increase execution time?
|
||||
- Is there high variance in resource usage?
|
||||
- Are there outlier runs that skew the aggregates?
|
||||
|
||||
### Step 5: Generate Notes
|
||||
|
||||
Write freeform observations as a list of strings. Each note should:
|
||||
- State a specific observation
|
||||
- Be grounded in the data (not speculation)
|
||||
- Help the user understand something the aggregate metrics don't show
|
||||
|
||||
Examples:
|
||||
- "Assertion 'Output is a PDF file' passes 100% in both configurations - may not differentiate skill value"
|
||||
- "Eval 3 shows high variance (50% ± 40%) - run 2 had an unusual failure that may be flaky"
|
||||
- "Without-skill runs consistently fail on table extraction expectations (0% pass rate)"
|
||||
- "Skill adds 13s average execution time but improves pass rate by 50%"
|
||||
- "Token usage is 80% higher with skill, primarily due to script output parsing"
|
||||
- "All 3 without-skill runs for eval 1 produced empty output"
|
||||
|
||||
### Step 6: Write Notes
|
||||
|
||||
Save notes to `{output_path}` as a JSON array of strings:
|
||||
|
||||
```json
|
||||
[
|
||||
"Assertion 'Output is a PDF file' passes 100% in both configurations - may not differentiate skill value",
|
||||
"Eval 3 shows high variance (50% ± 40%) - run 2 had an unusual failure",
|
||||
"Without-skill runs consistently fail on table extraction expectations",
|
||||
"Skill adds 13s average execution time but improves pass rate by 50%"
|
||||
]
|
||||
```
|
||||
|
||||
## Guidelines
|
||||
|
||||
**DO:**
|
||||
- Report what you observe in the data
|
||||
- Be specific about which evals, expectations, or runs you're referring to
|
||||
- Note patterns that aggregate metrics would hide
|
||||
- Provide context that helps interpret the numbers
|
||||
|
||||
**DO NOT:**
|
||||
- Suggest improvements to the skill (that's for the improvement step, not benchmarking)
|
||||
- Make subjective quality judgments ("the output was good/bad")
|
||||
- Speculate about causes without evidence
|
||||
- Repeat information already in the run_summary aggregates
|
||||
@@ -0,0 +1,202 @@
|
||||
# Blind Comparator Agent
|
||||
|
||||
Compare two outputs WITHOUT knowing which skill produced them.
|
||||
|
||||
## Role
|
||||
|
||||
The Blind Comparator judges which output better accomplishes the eval task. You receive two outputs labeled A and B, but you do NOT know which skill produced which. This prevents bias toward a particular skill or approach.
|
||||
|
||||
Your judgment is based purely on output quality and task completion.
|
||||
|
||||
## Inputs
|
||||
|
||||
You receive these parameters in your prompt:
|
||||
|
||||
- **output_a_path**: Path to the first output file or directory
|
||||
- **output_b_path**: Path to the second output file or directory
|
||||
- **eval_prompt**: The original task/prompt that was executed
|
||||
- **expectations**: List of expectations to check (optional - may be empty)
|
||||
|
||||
## Process
|
||||
|
||||
### Step 1: Read Both Outputs
|
||||
|
||||
1. Examine output A (file or directory)
|
||||
2. Examine output B (file or directory)
|
||||
3. Note the type, structure, and content of each
|
||||
4. If outputs are directories, examine all relevant files inside
|
||||
|
||||
### Step 2: Understand the Task
|
||||
|
||||
1. Read the eval_prompt carefully
|
||||
2. Identify what the task requires:
|
||||
- What should be produced?
|
||||
- What qualities matter (accuracy, completeness, format)?
|
||||
- What would distinguish a good output from a poor one?
|
||||
|
||||
### Step 3: Generate Evaluation Rubric
|
||||
|
||||
Based on the task, generate a rubric with two dimensions:
|
||||
|
||||
**Content Rubric** (what the output contains):
|
||||
| Criterion | 1 (Poor) | 3 (Acceptable) | 5 (Excellent) |
|
||||
|-----------|----------|----------------|---------------|
|
||||
| Correctness | Major errors | Minor errors | Fully correct |
|
||||
| Completeness | Missing key elements | Mostly complete | All elements present |
|
||||
| Accuracy | Significant inaccuracies | Minor inaccuracies | Accurate throughout |
|
||||
|
||||
**Structure Rubric** (how the output is organized):
|
||||
| Criterion | 1 (Poor) | 3 (Acceptable) | 5 (Excellent) |
|
||||
|-----------|----------|----------------|---------------|
|
||||
| Organization | Disorganized | Reasonably organized | Clear, logical structure |
|
||||
| Formatting | Inconsistent/broken | Mostly consistent | Professional, polished |
|
||||
| Usability | Difficult to use | Usable with effort | Easy to use |
|
||||
|
||||
Adapt criteria to the specific task. For example:
|
||||
- PDF form → "Field alignment", "Text readability", "Data placement"
|
||||
- Document → "Section structure", "Heading hierarchy", "Paragraph flow"
|
||||
- Data output → "Schema correctness", "Data types", "Completeness"
|
||||
|
||||
### Step 4: Evaluate Each Output Against the Rubric
|
||||
|
||||
For each output (A and B):
|
||||
|
||||
1. **Score each criterion** on the rubric (1-5 scale)
|
||||
2. **Calculate dimension totals**: Content score, Structure score
|
||||
3. **Calculate overall score**: Average of dimension scores, scaled to 1-10
|
||||
|
||||
### Step 5: Check Assertions (if provided)
|
||||
|
||||
If expectations are provided:
|
||||
|
||||
1. Check each expectation against output A
|
||||
2. Check each expectation against output B
|
||||
3. Count pass rates for each output
|
||||
4. Use expectation scores as secondary evidence (not the primary decision factor)
|
||||
|
||||
### Step 6: Determine the Winner
|
||||
|
||||
Compare A and B based on (in priority order):
|
||||
|
||||
1. **Primary**: Overall rubric score (content + structure)
|
||||
2. **Secondary**: Assertion pass rates (if applicable)
|
||||
3. **Tiebreaker**: If truly equal, declare a TIE
|
||||
|
||||
Be decisive - ties should be rare. One output is usually better, even if marginally.
|
||||
|
||||
### Step 7: Write Comparison Results
|
||||
|
||||
Save results to a JSON file at the path specified (or `comparison.json` if not specified).
|
||||
|
||||
## Output Format
|
||||
|
||||
Write a JSON file with this structure:
|
||||
|
||||
```json
|
||||
{
|
||||
"winner": "A",
|
||||
"reasoning": "Output A provides a complete solution with proper formatting and all required fields. Output B is missing the date field and has formatting inconsistencies.",
|
||||
"rubric": {
|
||||
"A": {
|
||||
"content": {
|
||||
"correctness": 5,
|
||||
"completeness": 5,
|
||||
"accuracy": 4
|
||||
},
|
||||
"structure": {
|
||||
"organization": 4,
|
||||
"formatting": 5,
|
||||
"usability": 4
|
||||
},
|
||||
"content_score": 4.7,
|
||||
"structure_score": 4.3,
|
||||
"overall_score": 9.0
|
||||
},
|
||||
"B": {
|
||||
"content": {
|
||||
"correctness": 3,
|
||||
"completeness": 2,
|
||||
"accuracy": 3
|
||||
},
|
||||
"structure": {
|
||||
"organization": 3,
|
||||
"formatting": 2,
|
||||
"usability": 3
|
||||
},
|
||||
"content_score": 2.7,
|
||||
"structure_score": 2.7,
|
||||
"overall_score": 5.4
|
||||
}
|
||||
},
|
||||
"output_quality": {
|
||||
"A": {
|
||||
"score": 9,
|
||||
"strengths": ["Complete solution", "Well-formatted", "All fields present"],
|
||||
"weaknesses": ["Minor style inconsistency in header"]
|
||||
},
|
||||
"B": {
|
||||
"score": 5,
|
||||
"strengths": ["Readable output", "Correct basic structure"],
|
||||
"weaknesses": ["Missing date field", "Formatting inconsistencies", "Partial data extraction"]
|
||||
}
|
||||
},
|
||||
"expectation_results": {
|
||||
"A": {
|
||||
"passed": 4,
|
||||
"total": 5,
|
||||
"pass_rate": 0.80,
|
||||
"details": [
|
||||
{"text": "Output includes name", "passed": true},
|
||||
{"text": "Output includes date", "passed": true},
|
||||
{"text": "Format is PDF", "passed": true},
|
||||
{"text": "Contains signature", "passed": false},
|
||||
{"text": "Readable text", "passed": true}
|
||||
]
|
||||
},
|
||||
"B": {
|
||||
"passed": 3,
|
||||
"total": 5,
|
||||
"pass_rate": 0.60,
|
||||
"details": [
|
||||
{"text": "Output includes name", "passed": true},
|
||||
{"text": "Output includes date", "passed": false},
|
||||
{"text": "Format is PDF", "passed": true},
|
||||
{"text": "Contains signature", "passed": false},
|
||||
{"text": "Readable text", "passed": true}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
If no expectations were provided, omit the `expectation_results` field entirely.
|
||||
|
||||
## Field Descriptions
|
||||
|
||||
- **winner**: "A", "B", or "TIE"
|
||||
- **reasoning**: Clear explanation of why the winner was chosen (or why it's a tie)
|
||||
- **rubric**: Structured rubric evaluation for each output
|
||||
- **content**: Scores for content criteria (correctness, completeness, accuracy)
|
||||
- **structure**: Scores for structure criteria (organization, formatting, usability)
|
||||
- **content_score**: Average of content criteria (1-5)
|
||||
- **structure_score**: Average of structure criteria (1-5)
|
||||
- **overall_score**: Combined score scaled to 1-10
|
||||
- **output_quality**: Summary quality assessment
|
||||
- **score**: 1-10 rating (should match rubric overall_score)
|
||||
- **strengths**: List of positive aspects
|
||||
- **weaknesses**: List of issues or shortcomings
|
||||
- **expectation_results**: (Only if expectations provided)
|
||||
- **passed**: Number of expectations that passed
|
||||
- **total**: Total number of expectations
|
||||
- **pass_rate**: Fraction passed (0.0 to 1.0)
|
||||
- **details**: Individual expectation results
|
||||
|
||||
## Guidelines
|
||||
|
||||
- **Stay blind**: DO NOT try to infer which skill produced which output. Judge purely on output quality.
|
||||
- **Be specific**: Cite specific examples when explaining strengths and weaknesses.
|
||||
- **Be decisive**: Choose a winner unless outputs are genuinely equivalent.
|
||||
- **Output quality first**: Assertion scores are secondary to overall task completion.
|
||||
- **Be objective**: Don't favor outputs based on style preferences; focus on correctness and completeness.
|
||||
- **Explain your reasoning**: The reasoning field should make it clear why you chose the winner.
|
||||
- **Handle edge cases**: If both outputs fail, pick the one that fails less badly. If both are excellent, pick the one that's marginally better.
|
||||
@@ -0,0 +1,223 @@
|
||||
# Grader Agent
|
||||
|
||||
Evaluate expectations against an execution transcript and outputs.
|
||||
|
||||
## Role
|
||||
|
||||
The Grader reviews a transcript and output files, then determines whether each expectation passes or fails. Provide clear evidence for each judgment.
|
||||
|
||||
You have two jobs: grade the outputs, and critique the evals themselves. A passing grade on a weak assertion is worse than useless — it creates false confidence. When you notice an assertion that's trivially satisfied, or an important outcome that no assertion checks, say so.
|
||||
|
||||
## Inputs
|
||||
|
||||
You receive these parameters in your prompt:
|
||||
|
||||
- **expectations**: List of expectations to evaluate (strings)
|
||||
- **transcript_path**: Path to the execution transcript (markdown file)
|
||||
- **outputs_dir**: Directory containing output files from execution
|
||||
|
||||
## Process
|
||||
|
||||
### Step 1: Read the Transcript
|
||||
|
||||
1. Read the transcript file completely
|
||||
2. Note the eval prompt, execution steps, and final result
|
||||
3. Identify any issues or errors documented
|
||||
|
||||
### Step 2: Examine Output Files
|
||||
|
||||
1. List files in outputs_dir
|
||||
2. Read/examine each file relevant to the expectations. If outputs aren't plain text, use the inspection tools provided in your prompt — don't rely solely on what the transcript says the executor produced.
|
||||
3. Note contents, structure, and quality
|
||||
|
||||
### Step 3: Evaluate Each Assertion
|
||||
|
||||
For each expectation:
|
||||
|
||||
1. **Search for evidence** in the transcript and outputs
|
||||
2. **Determine verdict**:
|
||||
- **PASS**: Clear evidence the expectation is true AND the evidence reflects genuine task completion, not just surface-level compliance
|
||||
- **FAIL**: No evidence, or evidence contradicts the expectation, or the evidence is superficial (e.g., correct filename but empty/wrong content)
|
||||
3. **Cite the evidence**: Quote the specific text or describe what you found
|
||||
|
||||
### Step 4: Extract and Verify Claims
|
||||
|
||||
Beyond the predefined expectations, extract implicit claims from the outputs and verify them:
|
||||
|
||||
1. **Extract claims** from the transcript and outputs:
|
||||
- Factual statements ("The form has 12 fields")
|
||||
- Process claims ("Used pypdf to fill the form")
|
||||
- Quality claims ("All fields were filled correctly")
|
||||
|
||||
2. **Verify each claim**:
|
||||
- **Factual claims**: Can be checked against the outputs or external sources
|
||||
- **Process claims**: Can be verified from the transcript
|
||||
- **Quality claims**: Evaluate whether the claim is justified
|
||||
|
||||
3. **Flag unverifiable claims**: Note claims that cannot be verified with available information
|
||||
|
||||
This catches issues that predefined expectations might miss.
|
||||
|
||||
### Step 5: Read User Notes
|
||||
|
||||
If `{outputs_dir}/user_notes.md` exists:
|
||||
1. Read it and note any uncertainties or issues flagged by the executor
|
||||
2. Include relevant concerns in the grading output
|
||||
3. These may reveal problems even when expectations pass
|
||||
|
||||
### Step 6: Critique the Evals
|
||||
|
||||
After grading, consider whether the evals themselves could be improved. Only surface suggestions when there's a clear gap.
|
||||
|
||||
Good suggestions test meaningful outcomes — assertions that are hard to satisfy without actually doing the work correctly. Think about what makes an assertion *discriminating*: it passes when the skill genuinely succeeds and fails when it doesn't.
|
||||
|
||||
Suggestions worth raising:
|
||||
- An assertion that passed but would also pass for a clearly wrong output (e.g., checking filename existence but not file content)
|
||||
- An important outcome you observed — good or bad — that no assertion covers at all
|
||||
- An assertion that can't actually be verified from the available outputs
|
||||
|
||||
Keep the bar high. The goal is to flag things the eval author would say "good catch" about, not to nitpick every assertion.
|
||||
|
||||
### Step 7: Write Grading Results
|
||||
|
||||
Save results to `{outputs_dir}/../grading.json` (sibling to outputs_dir).
|
||||
|
||||
## Grading Criteria
|
||||
|
||||
**PASS when**:
|
||||
- The transcript or outputs clearly demonstrate the expectation is true
|
||||
- Specific evidence can be cited
|
||||
- The evidence reflects genuine substance, not just surface compliance (e.g., a file exists AND contains correct content, not just the right filename)
|
||||
|
||||
**FAIL when**:
|
||||
- No evidence found for the expectation
|
||||
- Evidence contradicts the expectation
|
||||
- The expectation cannot be verified from available information
|
||||
- The evidence is superficial — the assertion is technically satisfied but the underlying task outcome is wrong or incomplete
|
||||
- The output appears to meet the assertion by coincidence rather than by actually doing the work
|
||||
|
||||
**When uncertain**: The burden of proof to pass is on the expectation.
|
||||
|
||||
### Step 8: Read Executor Metrics and Timing
|
||||
|
||||
1. If `{outputs_dir}/metrics.json` exists, read it and include in grading output
|
||||
2. If `{outputs_dir}/../timing.json` exists, read it and include timing data
|
||||
|
||||
## Output Format
|
||||
|
||||
Write a JSON file with this structure:
|
||||
|
||||
```json
|
||||
{
|
||||
"expectations": [
|
||||
{
|
||||
"text": "The output includes the name 'John Smith'",
|
||||
"passed": true,
|
||||
"evidence": "Found in transcript Step 3: 'Extracted names: John Smith, Sarah Johnson'"
|
||||
},
|
||||
{
|
||||
"text": "The spreadsheet has a SUM formula in cell B10",
|
||||
"passed": false,
|
||||
"evidence": "No spreadsheet was created. The output was a text file."
|
||||
},
|
||||
{
|
||||
"text": "The assistant used the skill's OCR script",
|
||||
"passed": true,
|
||||
"evidence": "Transcript Step 2 shows: 'Tool: Bash - python ocr_script.py image.png'"
|
||||
}
|
||||
],
|
||||
"summary": {
|
||||
"passed": 2,
|
||||
"failed": 1,
|
||||
"total": 3,
|
||||
"pass_rate": 0.67
|
||||
},
|
||||
"execution_metrics": {
|
||||
"tool_calls": {
|
||||
"Read": 5,
|
||||
"Write": 2,
|
||||
"Bash": 8
|
||||
},
|
||||
"total_tool_calls": 15,
|
||||
"total_steps": 6,
|
||||
"errors_encountered": 0,
|
||||
"output_chars": 12450,
|
||||
"transcript_chars": 3200
|
||||
},
|
||||
"timing": {
|
||||
"executor_duration_seconds": 165.0,
|
||||
"grader_duration_seconds": 26.0,
|
||||
"total_duration_seconds": 191.0
|
||||
},
|
||||
"claims": [
|
||||
{
|
||||
"claim": "The form has 12 fillable fields",
|
||||
"type": "factual",
|
||||
"verified": true,
|
||||
"evidence": "Counted 12 fields in field_info.json"
|
||||
},
|
||||
{
|
||||
"claim": "All required fields were populated",
|
||||
"type": "quality",
|
||||
"verified": false,
|
||||
"evidence": "Reference section was left blank despite data being available"
|
||||
}
|
||||
],
|
||||
"user_notes_summary": {
|
||||
"uncertainties": ["Used 2023 data, may be stale"],
|
||||
"needs_review": [],
|
||||
"workarounds": ["Fell back to text overlay for non-fillable fields"]
|
||||
},
|
||||
"eval_feedback": {
|
||||
"suggestions": [
|
||||
{
|
||||
"assertion": "The output includes the name 'John Smith'",
|
||||
"reason": "A hallucinated document that mentions the name would also pass — consider checking it appears as the primary contact with matching phone and email from the input"
|
||||
},
|
||||
{
|
||||
"reason": "No assertion checks whether the extracted phone numbers match the input — I observed incorrect numbers in the output that went uncaught"
|
||||
}
|
||||
],
|
||||
"overall": "Assertions check presence but not correctness. Consider adding content verification."
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Field Descriptions
|
||||
|
||||
- **expectations**: Array of graded expectations
|
||||
- **text**: The original expectation text
|
||||
- **passed**: Boolean - true if expectation passes
|
||||
- **evidence**: Specific quote or description supporting the verdict
|
||||
- **summary**: Aggregate statistics
|
||||
- **passed**: Count of passed expectations
|
||||
- **failed**: Count of failed expectations
|
||||
- **total**: Total expectations evaluated
|
||||
- **pass_rate**: Fraction passed (0.0 to 1.0)
|
||||
- **execution_metrics**: Copied from executor's metrics.json (if available)
|
||||
- **output_chars**: Total character count of output files (proxy for tokens)
|
||||
- **transcript_chars**: Character count of transcript
|
||||
- **timing**: Wall clock timing from timing.json (if available)
|
||||
- **executor_duration_seconds**: Time spent in executor subagent
|
||||
- **total_duration_seconds**: Total elapsed time for the run
|
||||
- **claims**: Extracted and verified claims from the output
|
||||
- **claim**: The statement being verified
|
||||
- **type**: "factual", "process", or "quality"
|
||||
- **verified**: Boolean - whether the claim holds
|
||||
- **evidence**: Supporting or contradicting evidence
|
||||
- **user_notes_summary**: Issues flagged by the executor
|
||||
- **uncertainties**: Things the executor wasn't sure about
|
||||
- **needs_review**: Items requiring human attention
|
||||
- **workarounds**: Places where the skill didn't work as expected
|
||||
- **eval_feedback**: Improvement suggestions for the evals (only when warranted)
|
||||
- **suggestions**: List of concrete suggestions, each with a `reason` and optionally an `assertion` it relates to
|
||||
- **overall**: Brief assessment — can be "No suggestions, evals look solid" if nothing to flag
|
||||
|
||||
## Guidelines
|
||||
|
||||
- **Be objective**: Base verdicts on evidence, not assumptions
|
||||
- **Be specific**: Quote the exact text that supports your verdict
|
||||
- **Be thorough**: Check both transcript and output files
|
||||
- **Be consistent**: Apply the same standard to each expectation
|
||||
- **Explain failures**: Make it clear why evidence was insufficient
|
||||
- **No partial credit**: Each expectation is pass or fail, not partial
|
||||
@@ -0,0 +1,146 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Eval Set Review - __SKILL_NAME_PLACEHOLDER__</title>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@500;600&family=Lora:wght@400;500&display=swap" rel="stylesheet">
|
||||
<style>
|
||||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
body { font-family: 'Lora', Georgia, serif; background: #faf9f5; padding: 2rem; color: #141413; }
|
||||
h1 { font-family: 'Poppins', sans-serif; margin-bottom: 0.5rem; font-size: 1.5rem; }
|
||||
.description { color: #b0aea5; margin-bottom: 1.5rem; font-style: italic; max-width: 900px; }
|
||||
.controls { margin-bottom: 1rem; display: flex; gap: 0.5rem; }
|
||||
.btn { font-family: 'Poppins', sans-serif; padding: 0.5rem 1rem; border: none; border-radius: 6px; cursor: pointer; font-size: 0.875rem; font-weight: 500; }
|
||||
.btn-add { background: #6a9bcc; color: white; }
|
||||
.btn-add:hover { background: #5889b8; }
|
||||
.btn-export { background: #d97757; color: white; }
|
||||
.btn-export:hover { background: #c4613f; }
|
||||
table { width: 100%; max-width: 1100px; border-collapse: collapse; background: white; border-radius: 6px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
|
||||
th { font-family: 'Poppins', sans-serif; background: #141413; color: #faf9f5; padding: 0.75rem 1rem; text-align: left; font-size: 0.875rem; }
|
||||
td { padding: 0.75rem 1rem; border-bottom: 1px solid #e8e6dc; vertical-align: top; }
|
||||
tr:nth-child(even) td { background: #faf9f5; }
|
||||
tr:hover td { background: #f3f1ea; }
|
||||
.section-header td { background: #e8e6dc; font-family: 'Poppins', sans-serif; font-weight: 500; font-size: 0.8rem; color: #141413; text-transform: uppercase; letter-spacing: 0.05em; }
|
||||
.query-input { width: 100%; padding: 0.4rem; border: 1px solid #e8e6dc; border-radius: 4px; font-size: 0.875rem; font-family: 'Lora', Georgia, serif; resize: vertical; min-height: 60px; }
|
||||
.query-input:focus { outline: none; border-color: #d97757; box-shadow: 0 0 0 2px rgba(217,119,87,0.15); }
|
||||
.toggle { position: relative; display: inline-block; width: 44px; height: 24px; }
|
||||
.toggle input { opacity: 0; width: 0; height: 0; }
|
||||
.toggle .slider { position: absolute; inset: 0; background: #b0aea5; border-radius: 24px; cursor: pointer; transition: 0.2s; }
|
||||
.toggle .slider::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: 0.2s; }
|
||||
.toggle input:checked + .slider { background: #d97757; }
|
||||
.toggle input:checked + .slider::before { transform: translateX(20px); }
|
||||
.btn-delete { background: #c44; color: white; padding: 0.3rem 0.6rem; border: none; border-radius: 4px; cursor: pointer; font-size: 0.75rem; font-family: 'Poppins', sans-serif; }
|
||||
.btn-delete:hover { background: #a33; }
|
||||
.summary { margin-top: 1rem; color: #b0aea5; font-size: 0.875rem; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Eval Set Review: <span id="skill-name">__SKILL_NAME_PLACEHOLDER__</span></h1>
|
||||
<p class="description">Current description: <span id="skill-desc">__SKILL_DESCRIPTION_PLACEHOLDER__</span></p>
|
||||
|
||||
<div class="controls">
|
||||
<button class="btn btn-add" onclick="addRow()">+ Add Query</button>
|
||||
<button class="btn btn-export" onclick="exportEvalSet()">Export Eval Set</button>
|
||||
</div>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width:65%">Query</th>
|
||||
<th style="width:18%">Should Trigger</th>
|
||||
<th style="width:10%">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="eval-body"></tbody>
|
||||
</table>
|
||||
|
||||
<p class="summary" id="summary"></p>
|
||||
|
||||
<script>
|
||||
const EVAL_DATA = __EVAL_DATA_PLACEHOLDER__;
|
||||
|
||||
let evalItems = [...EVAL_DATA];
|
||||
|
||||
function render() {
|
||||
const tbody = document.getElementById('eval-body');
|
||||
tbody.innerHTML = '';
|
||||
|
||||
// Sort: should-trigger first, then should-not-trigger
|
||||
const sorted = evalItems
|
||||
.map((item, origIdx) => ({ ...item, origIdx }))
|
||||
.sort((a, b) => (b.should_trigger ? 1 : 0) - (a.should_trigger ? 1 : 0));
|
||||
|
||||
let lastGroup = null;
|
||||
sorted.forEach(item => {
|
||||
const group = item.should_trigger ? 'trigger' : 'no-trigger';
|
||||
if (group !== lastGroup) {
|
||||
const headerRow = document.createElement('tr');
|
||||
headerRow.className = 'section-header';
|
||||
headerRow.innerHTML = `<td colspan="3">${item.should_trigger ? 'Should Trigger' : 'Should NOT Trigger'}</td>`;
|
||||
tbody.appendChild(headerRow);
|
||||
lastGroup = group;
|
||||
}
|
||||
|
||||
const idx = item.origIdx;
|
||||
const tr = document.createElement('tr');
|
||||
tr.innerHTML = `
|
||||
<td><textarea class="query-input" onchange="updateQuery(${idx}, this.value)">${escapeHtml(item.query)}</textarea></td>
|
||||
<td>
|
||||
<label class="toggle">
|
||||
<input type="checkbox" ${item.should_trigger ? 'checked' : ''} onchange="updateTrigger(${idx}, this.checked)">
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
<span style="margin-left:8px;font-size:0.8rem;color:#b0aea5">${item.should_trigger ? 'Yes' : 'No'}</span>
|
||||
</td>
|
||||
<td><button class="btn-delete" onclick="deleteRow(${idx})">Delete</button></td>
|
||||
`;
|
||||
tbody.appendChild(tr);
|
||||
});
|
||||
updateSummary();
|
||||
}
|
||||
|
||||
function escapeHtml(text) {
|
||||
const div = document.createElement('div');
|
||||
div.textContent = text;
|
||||
return div.innerHTML;
|
||||
}
|
||||
|
||||
function updateQuery(idx, value) { evalItems[idx].query = value; updateSummary(); }
|
||||
function updateTrigger(idx, value) { evalItems[idx].should_trigger = value; render(); }
|
||||
function deleteRow(idx) { evalItems.splice(idx, 1); render(); }
|
||||
|
||||
function addRow() {
|
||||
evalItems.push({ query: '', should_trigger: true });
|
||||
render();
|
||||
const inputs = document.querySelectorAll('.query-input');
|
||||
inputs[inputs.length - 1].focus();
|
||||
}
|
||||
|
||||
function updateSummary() {
|
||||
const trigger = evalItems.filter(i => i.should_trigger).length;
|
||||
const noTrigger = evalItems.filter(i => !i.should_trigger).length;
|
||||
document.getElementById('summary').textContent =
|
||||
`${evalItems.length} queries total: ${trigger} should trigger, ${noTrigger} should not trigger`;
|
||||
}
|
||||
|
||||
function exportEvalSet() {
|
||||
const valid = evalItems.filter(i => i.query.trim() !== '');
|
||||
const data = valid.map(i => ({ query: i.query.trim(), should_trigger: i.should_trigger }));
|
||||
const blob = new Blob([JSON.stringify(data, null, 2)], { type: 'application/json' });
|
||||
const url = URL.createObjectURL(blob);
|
||||
const a = document.createElement('a');
|
||||
a.href = url;
|
||||
a.download = 'eval_set.json';
|
||||
document.body.appendChild(a);
|
||||
a.click();
|
||||
document.body.removeChild(a);
|
||||
URL.revokeObjectURL(url);
|
||||
}
|
||||
|
||||
render();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,471 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Generate and serve a review page for eval results.
|
||||
|
||||
Reads the workspace directory, discovers runs (directories with outputs/),
|
||||
embeds all output data into a self-contained HTML page, and serves it via
|
||||
a tiny HTTP server. Feedback auto-saves to feedback.json in the workspace.
|
||||
|
||||
Usage:
|
||||
python generate_review.py <workspace-path> [--port PORT] [--skill-name NAME]
|
||||
python generate_review.py <workspace-path> --previous-feedback /path/to/old/feedback.json
|
||||
|
||||
No dependencies beyond the Python stdlib are required.
|
||||
"""
|
||||
|
||||
import argparse
|
||||
import base64
|
||||
import json
|
||||
import mimetypes
|
||||
import os
|
||||
import re
|
||||
import signal
|
||||
import subprocess
|
||||
import sys
|
||||
import time
|
||||
import webbrowser
|
||||
from functools import partial
|
||||
from http.server import HTTPServer, BaseHTTPRequestHandler
|
||||
from pathlib import Path
|
||||
|
||||
# Files to exclude from output listings
|
||||
METADATA_FILES = {"transcript.md", "user_notes.md", "metrics.json"}
|
||||
|
||||
# Extensions we render as inline text
|
||||
TEXT_EXTENSIONS = {
|
||||
".txt", ".md", ".json", ".csv", ".py", ".js", ".ts", ".tsx", ".jsx",
|
||||
".yaml", ".yml", ".xml", ".html", ".css", ".sh", ".rb", ".go", ".rs",
|
||||
".java", ".c", ".cpp", ".h", ".hpp", ".sql", ".r", ".toml",
|
||||
}
|
||||
|
||||
# Extensions we render as inline images
|
||||
IMAGE_EXTENSIONS = {".png", ".jpg", ".jpeg", ".gif", ".svg", ".webp"}
|
||||
|
||||
# MIME type overrides for common types
|
||||
MIME_OVERRIDES = {
|
||||
".svg": "image/svg+xml",
|
||||
".xlsx": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
||||
".docx": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
||||
".pptx": "application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
||||
}
|
||||
|
||||
|
||||
def get_mime_type(path: Path) -> str:
|
||||
ext = path.suffix.lower()
|
||||
if ext in MIME_OVERRIDES:
|
||||
return MIME_OVERRIDES[ext]
|
||||
mime, _ = mimetypes.guess_type(str(path))
|
||||
return mime or "application/octet-stream"
|
||||
|
||||
|
||||
def find_runs(workspace: Path) -> list[dict]:
|
||||
"""Recursively find directories that contain an outputs/ subdirectory."""
|
||||
runs: list[dict] = []
|
||||
_find_runs_recursive(workspace, workspace, runs)
|
||||
runs.sort(key=lambda r: (r.get("eval_id", float("inf")), r["id"]))
|
||||
return runs
|
||||
|
||||
|
||||
def _find_runs_recursive(root: Path, current: Path, runs: list[dict]) -> None:
|
||||
if not current.is_dir():
|
||||
return
|
||||
|
||||
outputs_dir = current / "outputs"
|
||||
if outputs_dir.is_dir():
|
||||
run = build_run(root, current)
|
||||
if run:
|
||||
runs.append(run)
|
||||
return
|
||||
|
||||
skip = {"node_modules", ".git", "__pycache__", "skill", "inputs"}
|
||||
for child in sorted(current.iterdir()):
|
||||
if child.is_dir() and child.name not in skip:
|
||||
_find_runs_recursive(root, child, runs)
|
||||
|
||||
|
||||
def build_run(root: Path, run_dir: Path) -> dict | None:
|
||||
"""Build a run dict with prompt, outputs, and grading data."""
|
||||
prompt = ""
|
||||
eval_id = None
|
||||
|
||||
# Try eval_metadata.json
|
||||
for candidate in [run_dir / "eval_metadata.json", run_dir.parent / "eval_metadata.json"]:
|
||||
if candidate.exists():
|
||||
try:
|
||||
metadata = json.loads(candidate.read_text())
|
||||
prompt = metadata.get("prompt", "")
|
||||
eval_id = metadata.get("eval_id")
|
||||
except (json.JSONDecodeError, OSError):
|
||||
pass
|
||||
if prompt:
|
||||
break
|
||||
|
||||
# Fall back to transcript.md
|
||||
if not prompt:
|
||||
for candidate in [run_dir / "transcript.md", run_dir / "outputs" / "transcript.md"]:
|
||||
if candidate.exists():
|
||||
try:
|
||||
text = candidate.read_text()
|
||||
match = re.search(r"## Eval Prompt\n\n([\s\S]*?)(?=\n##|$)", text)
|
||||
if match:
|
||||
prompt = match.group(1).strip()
|
||||
except OSError:
|
||||
pass
|
||||
if prompt:
|
||||
break
|
||||
|
||||
if not prompt:
|
||||
prompt = "(No prompt found)"
|
||||
|
||||
run_id = str(run_dir.relative_to(root)).replace("/", "-").replace("\\", "-")
|
||||
|
||||
# Collect output files
|
||||
outputs_dir = run_dir / "outputs"
|
||||
output_files: list[dict] = []
|
||||
if outputs_dir.is_dir():
|
||||
for f in sorted(outputs_dir.iterdir()):
|
||||
if f.is_file() and f.name not in METADATA_FILES:
|
||||
output_files.append(embed_file(f))
|
||||
|
||||
# Load grading if present
|
||||
grading = None
|
||||
for candidate in [run_dir / "grading.json", run_dir.parent / "grading.json"]:
|
||||
if candidate.exists():
|
||||
try:
|
||||
grading = json.loads(candidate.read_text())
|
||||
except (json.JSONDecodeError, OSError):
|
||||
pass
|
||||
if grading:
|
||||
break
|
||||
|
||||
return {
|
||||
"id": run_id,
|
||||
"prompt": prompt,
|
||||
"eval_id": eval_id,
|
||||
"outputs": output_files,
|
||||
"grading": grading,
|
||||
}
|
||||
|
||||
|
||||
def embed_file(path: Path) -> dict:
|
||||
"""Read a file and return an embedded representation."""
|
||||
ext = path.suffix.lower()
|
||||
mime = get_mime_type(path)
|
||||
|
||||
if ext in TEXT_EXTENSIONS:
|
||||
try:
|
||||
content = path.read_text(errors="replace")
|
||||
except OSError:
|
||||
content = "(Error reading file)"
|
||||
return {
|
||||
"name": path.name,
|
||||
"type": "text",
|
||||
"content": content,
|
||||
}
|
||||
elif ext in IMAGE_EXTENSIONS:
|
||||
try:
|
||||
raw = path.read_bytes()
|
||||
b64 = base64.b64encode(raw).decode("ascii")
|
||||
except OSError:
|
||||
return {"name": path.name, "type": "error", "content": "(Error reading file)"}
|
||||
return {
|
||||
"name": path.name,
|
||||
"type": "image",
|
||||
"mime": mime,
|
||||
"data_uri": f"data:{mime};base64,{b64}",
|
||||
}
|
||||
elif ext == ".pdf":
|
||||
try:
|
||||
raw = path.read_bytes()
|
||||
b64 = base64.b64encode(raw).decode("ascii")
|
||||
except OSError:
|
||||
return {"name": path.name, "type": "error", "content": "(Error reading file)"}
|
||||
return {
|
||||
"name": path.name,
|
||||
"type": "pdf",
|
||||
"data_uri": f"data:{mime};base64,{b64}",
|
||||
}
|
||||
elif ext == ".xlsx":
|
||||
try:
|
||||
raw = path.read_bytes()
|
||||
b64 = base64.b64encode(raw).decode("ascii")
|
||||
except OSError:
|
||||
return {"name": path.name, "type": "error", "content": "(Error reading file)"}
|
||||
return {
|
||||
"name": path.name,
|
||||
"type": "xlsx",
|
||||
"data_b64": b64,
|
||||
}
|
||||
else:
|
||||
# Binary / unknown — base64 download link
|
||||
try:
|
||||
raw = path.read_bytes()
|
||||
b64 = base64.b64encode(raw).decode("ascii")
|
||||
except OSError:
|
||||
return {"name": path.name, "type": "error", "content": "(Error reading file)"}
|
||||
return {
|
||||
"name": path.name,
|
||||
"type": "binary",
|
||||
"mime": mime,
|
||||
"data_uri": f"data:{mime};base64,{b64}",
|
||||
}
|
||||
|
||||
|
||||
def load_previous_iteration(workspace: Path) -> dict[str, dict]:
|
||||
"""Load previous iteration's feedback and outputs.
|
||||
|
||||
Returns a map of run_id -> {"feedback": str, "outputs": list[dict]}.
|
||||
"""
|
||||
result: dict[str, dict] = {}
|
||||
|
||||
# Load feedback
|
||||
feedback_map: dict[str, str] = {}
|
||||
feedback_path = workspace / "feedback.json"
|
||||
if feedback_path.exists():
|
||||
try:
|
||||
data = json.loads(feedback_path.read_text())
|
||||
feedback_map = {
|
||||
r["run_id"]: r["feedback"]
|
||||
for r in data.get("reviews", [])
|
||||
if r.get("feedback", "").strip()
|
||||
}
|
||||
except (json.JSONDecodeError, OSError, KeyError):
|
||||
pass
|
||||
|
||||
# Load runs (to get outputs)
|
||||
prev_runs = find_runs(workspace)
|
||||
for run in prev_runs:
|
||||
result[run["id"]] = {
|
||||
"feedback": feedback_map.get(run["id"], ""),
|
||||
"outputs": run.get("outputs", []),
|
||||
}
|
||||
|
||||
# Also add feedback for run_ids that had feedback but no matching run
|
||||
for run_id, fb in feedback_map.items():
|
||||
if run_id not in result:
|
||||
result[run_id] = {"feedback": fb, "outputs": []}
|
||||
|
||||
return result
|
||||
|
||||
|
||||
def generate_html(
|
||||
runs: list[dict],
|
||||
skill_name: str,
|
||||
previous: dict[str, dict] | None = None,
|
||||
benchmark: dict | None = None,
|
||||
) -> str:
|
||||
"""Generate the complete standalone HTML page with embedded data."""
|
||||
template_path = Path(__file__).parent / "viewer.html"
|
||||
template = template_path.read_text()
|
||||
|
||||
# Build previous_feedback and previous_outputs maps for the template
|
||||
previous_feedback: dict[str, str] = {}
|
||||
previous_outputs: dict[str, list[dict]] = {}
|
||||
if previous:
|
||||
for run_id, data in previous.items():
|
||||
if data.get("feedback"):
|
||||
previous_feedback[run_id] = data["feedback"]
|
||||
if data.get("outputs"):
|
||||
previous_outputs[run_id] = data["outputs"]
|
||||
|
||||
embedded = {
|
||||
"skill_name": skill_name,
|
||||
"runs": runs,
|
||||
"previous_feedback": previous_feedback,
|
||||
"previous_outputs": previous_outputs,
|
||||
}
|
||||
if benchmark:
|
||||
embedded["benchmark"] = benchmark
|
||||
|
||||
data_json = json.dumps(embedded)
|
||||
|
||||
return template.replace("/*__EMBEDDED_DATA__*/", f"const EMBEDDED_DATA = {data_json};")
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# HTTP server (stdlib only, zero dependencies)
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
def _kill_port(port: int) -> None:
|
||||
"""Kill any process listening on the given port."""
|
||||
try:
|
||||
result = subprocess.run(
|
||||
["lsof", "-ti", f":{port}"],
|
||||
capture_output=True, text=True, timeout=5,
|
||||
)
|
||||
for pid_str in result.stdout.strip().split("\n"):
|
||||
if pid_str.strip():
|
||||
try:
|
||||
os.kill(int(pid_str.strip()), signal.SIGTERM)
|
||||
except (ProcessLookupError, ValueError):
|
||||
pass
|
||||
if result.stdout.strip():
|
||||
time.sleep(0.5)
|
||||
except subprocess.TimeoutExpired:
|
||||
pass
|
||||
except FileNotFoundError:
|
||||
print("Note: lsof not found, cannot check if port is in use", file=sys.stderr)
|
||||
|
||||
class ReviewHandler(BaseHTTPRequestHandler):
|
||||
"""Serves the review HTML and handles feedback saves.
|
||||
|
||||
Regenerates the HTML on each page load so that refreshing the browser
|
||||
picks up new eval outputs without restarting the server.
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
workspace: Path,
|
||||
skill_name: str,
|
||||
feedback_path: Path,
|
||||
previous: dict[str, dict],
|
||||
benchmark_path: Path | None,
|
||||
*args,
|
||||
**kwargs,
|
||||
):
|
||||
self.workspace = workspace
|
||||
self.skill_name = skill_name
|
||||
self.feedback_path = feedback_path
|
||||
self.previous = previous
|
||||
self.benchmark_path = benchmark_path
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
def do_GET(self) -> None:
|
||||
if self.path == "/" or self.path == "/index.html":
|
||||
# Regenerate HTML on each request (re-scans workspace for new outputs)
|
||||
runs = find_runs(self.workspace)
|
||||
benchmark = None
|
||||
if self.benchmark_path and self.benchmark_path.exists():
|
||||
try:
|
||||
benchmark = json.loads(self.benchmark_path.read_text())
|
||||
except (json.JSONDecodeError, OSError):
|
||||
pass
|
||||
html = generate_html(runs, self.skill_name, self.previous, benchmark)
|
||||
content = html.encode("utf-8")
|
||||
self.send_response(200)
|
||||
self.send_header("Content-Type", "text/html; charset=utf-8")
|
||||
self.send_header("Content-Length", str(len(content)))
|
||||
self.end_headers()
|
||||
self.wfile.write(content)
|
||||
elif self.path == "/api/feedback":
|
||||
data = b"{}"
|
||||
if self.feedback_path.exists():
|
||||
data = self.feedback_path.read_bytes()
|
||||
self.send_response(200)
|
||||
self.send_header("Content-Type", "application/json")
|
||||
self.send_header("Content-Length", str(len(data)))
|
||||
self.end_headers()
|
||||
self.wfile.write(data)
|
||||
else:
|
||||
self.send_error(404)
|
||||
|
||||
def do_POST(self) -> None:
|
||||
if self.path == "/api/feedback":
|
||||
length = int(self.headers.get("Content-Length", 0))
|
||||
body = self.rfile.read(length)
|
||||
try:
|
||||
data = json.loads(body)
|
||||
if not isinstance(data, dict) or "reviews" not in data:
|
||||
raise ValueError("Expected JSON object with 'reviews' key")
|
||||
self.feedback_path.write_text(json.dumps(data, indent=2) + "\n")
|
||||
resp = b'{"ok":true}'
|
||||
self.send_response(200)
|
||||
except (json.JSONDecodeError, OSError, ValueError) as e:
|
||||
resp = json.dumps({"error": str(e)}).encode()
|
||||
self.send_response(500)
|
||||
self.send_header("Content-Type", "application/json")
|
||||
self.send_header("Content-Length", str(len(resp)))
|
||||
self.end_headers()
|
||||
self.wfile.write(resp)
|
||||
else:
|
||||
self.send_error(404)
|
||||
|
||||
def log_message(self, format: str, *args: object) -> None:
|
||||
# Suppress request logging to keep terminal clean
|
||||
pass
|
||||
|
||||
|
||||
def main() -> None:
|
||||
parser = argparse.ArgumentParser(description="Generate and serve eval review")
|
||||
parser.add_argument("workspace", type=Path, help="Path to workspace directory")
|
||||
parser.add_argument("--port", "-p", type=int, default=3117, help="Server port (default: 3117)")
|
||||
parser.add_argument("--skill-name", "-n", type=str, default=None, help="Skill name for header")
|
||||
parser.add_argument(
|
||||
"--previous-workspace", type=Path, default=None,
|
||||
help="Path to previous iteration's workspace (shows old outputs and feedback as context)",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--benchmark", type=Path, default=None,
|
||||
help="Path to benchmark.json to show in the Benchmark tab",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--static", "-s", type=Path, default=None,
|
||||
help="Write standalone HTML to this path instead of starting a server",
|
||||
)
|
||||
args = parser.parse_args()
|
||||
|
||||
workspace = args.workspace.resolve()
|
||||
if not workspace.is_dir():
|
||||
print(f"Error: {workspace} is not a directory", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
runs = find_runs(workspace)
|
||||
if not runs:
|
||||
print(f"No runs found in {workspace}", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
skill_name = args.skill_name or workspace.name.replace("-workspace", "")
|
||||
feedback_path = workspace / "feedback.json"
|
||||
|
||||
previous: dict[str, dict] = {}
|
||||
if args.previous_workspace:
|
||||
previous = load_previous_iteration(args.previous_workspace.resolve())
|
||||
|
||||
benchmark_path = args.benchmark.resolve() if args.benchmark else None
|
||||
benchmark = None
|
||||
if benchmark_path and benchmark_path.exists():
|
||||
try:
|
||||
benchmark = json.loads(benchmark_path.read_text())
|
||||
except (json.JSONDecodeError, OSError):
|
||||
pass
|
||||
|
||||
if args.static:
|
||||
html = generate_html(runs, skill_name, previous, benchmark)
|
||||
args.static.parent.mkdir(parents=True, exist_ok=True)
|
||||
args.static.write_text(html)
|
||||
print(f"\n Static viewer written to: {args.static}\n")
|
||||
sys.exit(0)
|
||||
|
||||
# Kill any existing process on the target port
|
||||
port = args.port
|
||||
_kill_port(port)
|
||||
handler = partial(ReviewHandler, workspace, skill_name, feedback_path, previous, benchmark_path)
|
||||
try:
|
||||
server = HTTPServer(("127.0.0.1", port), handler)
|
||||
except OSError:
|
||||
# Port still in use after kill attempt — find a free one
|
||||
server = HTTPServer(("127.0.0.1", 0), handler)
|
||||
port = server.server_address[1]
|
||||
|
||||
url = f"http://localhost:{port}"
|
||||
print(f"\n Eval Viewer")
|
||||
print(f" ─────────────────────────────────")
|
||||
print(f" URL: {url}")
|
||||
print(f" Workspace: {workspace}")
|
||||
print(f" Feedback: {feedback_path}")
|
||||
if previous:
|
||||
print(f" Previous: {args.previous_workspace} ({len(previous)} runs)")
|
||||
if benchmark_path:
|
||||
print(f" Benchmark: {benchmark_path}")
|
||||
print(f"\n Press Ctrl+C to stop.\n")
|
||||
|
||||
webbrowser.open(url)
|
||||
|
||||
try:
|
||||
server.serve_forever()
|
||||
except KeyboardInterrupt:
|
||||
print("\nStopped.")
|
||||
server.server_close()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,430 @@
|
||||
# JSON Schemas
|
||||
|
||||
This document defines the JSON schemas used by skill-creator.
|
||||
|
||||
---
|
||||
|
||||
## evals.json
|
||||
|
||||
Defines the evals for a skill. Located at `evals/evals.json` within the skill directory.
|
||||
|
||||
```json
|
||||
{
|
||||
"skill_name": "example-skill",
|
||||
"evals": [
|
||||
{
|
||||
"id": 1,
|
||||
"prompt": "User's example prompt",
|
||||
"expected_output": "Description of expected result",
|
||||
"files": ["evals/files/sample1.pdf"],
|
||||
"expectations": [
|
||||
"The output includes X",
|
||||
"The skill used script Y"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
**Fields:**
|
||||
- `skill_name`: Name matching the skill's frontmatter
|
||||
- `evals[].id`: Unique integer identifier
|
||||
- `evals[].prompt`: The task to execute
|
||||
- `evals[].expected_output`: Human-readable description of success
|
||||
- `evals[].files`: Optional list of input file paths (relative to skill root)
|
||||
- `evals[].expectations`: List of verifiable statements
|
||||
|
||||
---
|
||||
|
||||
## history.json
|
||||
|
||||
Tracks version progression in Improve mode. Located at workspace root.
|
||||
|
||||
```json
|
||||
{
|
||||
"started_at": "2026-01-15T10:30:00Z",
|
||||
"skill_name": "pdf",
|
||||
"current_best": "v2",
|
||||
"iterations": [
|
||||
{
|
||||
"version": "v0",
|
||||
"parent": null,
|
||||
"expectation_pass_rate": 0.65,
|
||||
"grading_result": "baseline",
|
||||
"is_current_best": false
|
||||
},
|
||||
{
|
||||
"version": "v1",
|
||||
"parent": "v0",
|
||||
"expectation_pass_rate": 0.75,
|
||||
"grading_result": "won",
|
||||
"is_current_best": false
|
||||
},
|
||||
{
|
||||
"version": "v2",
|
||||
"parent": "v1",
|
||||
"expectation_pass_rate": 0.85,
|
||||
"grading_result": "won",
|
||||
"is_current_best": true
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
**Fields:**
|
||||
- `started_at`: ISO timestamp of when improvement started
|
||||
- `skill_name`: Name of the skill being improved
|
||||
- `current_best`: Version identifier of the best performer
|
||||
- `iterations[].version`: Version identifier (v0, v1, ...)
|
||||
- `iterations[].parent`: Parent version this was derived from
|
||||
- `iterations[].expectation_pass_rate`: Pass rate from grading
|
||||
- `iterations[].grading_result`: "baseline", "won", "lost", or "tie"
|
||||
- `iterations[].is_current_best`: Whether this is the current best version
|
||||
|
||||
---
|
||||
|
||||
## grading.json
|
||||
|
||||
Output from the grader agent. Located at `<run-dir>/grading.json`.
|
||||
|
||||
```json
|
||||
{
|
||||
"expectations": [
|
||||
{
|
||||
"text": "The output includes the name 'John Smith'",
|
||||
"passed": true,
|
||||
"evidence": "Found in transcript Step 3: 'Extracted names: John Smith, Sarah Johnson'"
|
||||
},
|
||||
{
|
||||
"text": "The spreadsheet has a SUM formula in cell B10",
|
||||
"passed": false,
|
||||
"evidence": "No spreadsheet was created. The output was a text file."
|
||||
}
|
||||
],
|
||||
"summary": {
|
||||
"passed": 2,
|
||||
"failed": 1,
|
||||
"total": 3,
|
||||
"pass_rate": 0.67
|
||||
},
|
||||
"execution_metrics": {
|
||||
"tool_calls": {
|
||||
"Read": 5,
|
||||
"Write": 2,
|
||||
"Bash": 8
|
||||
},
|
||||
"total_tool_calls": 15,
|
||||
"total_steps": 6,
|
||||
"errors_encountered": 0,
|
||||
"output_chars": 12450,
|
||||
"transcript_chars": 3200
|
||||
},
|
||||
"timing": {
|
||||
"executor_duration_seconds": 165.0,
|
||||
"grader_duration_seconds": 26.0,
|
||||
"total_duration_seconds": 191.0
|
||||
},
|
||||
"claims": [
|
||||
{
|
||||
"claim": "The form has 12 fillable fields",
|
||||
"type": "factual",
|
||||
"verified": true,
|
||||
"evidence": "Counted 12 fields in field_info.json"
|
||||
}
|
||||
],
|
||||
"user_notes_summary": {
|
||||
"uncertainties": ["Used 2023 data, may be stale"],
|
||||
"needs_review": [],
|
||||
"workarounds": ["Fell back to text overlay for non-fillable fields"]
|
||||
},
|
||||
"eval_feedback": {
|
||||
"suggestions": [
|
||||
{
|
||||
"assertion": "The output includes the name 'John Smith'",
|
||||
"reason": "A hallucinated document that mentions the name would also pass"
|
||||
}
|
||||
],
|
||||
"overall": "Assertions check presence but not correctness."
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**Fields:**
|
||||
- `expectations[]`: Graded expectations with evidence
|
||||
- `summary`: Aggregate pass/fail counts
|
||||
- `execution_metrics`: Tool usage and output size (from executor's metrics.json)
|
||||
- `timing`: Wall clock timing (from timing.json)
|
||||
- `claims`: Extracted and verified claims from the output
|
||||
- `user_notes_summary`: Issues flagged by the executor
|
||||
- `eval_feedback`: (optional) Improvement suggestions for the evals, only present when the grader identifies issues worth raising
|
||||
|
||||
---
|
||||
|
||||
## metrics.json
|
||||
|
||||
Output from the executor agent. Located at `<run-dir>/outputs/metrics.json`.
|
||||
|
||||
```json
|
||||
{
|
||||
"tool_calls": {
|
||||
"Read": 5,
|
||||
"Write": 2,
|
||||
"Bash": 8,
|
||||
"Edit": 1,
|
||||
"Glob": 2,
|
||||
"Grep": 0
|
||||
},
|
||||
"total_tool_calls": 18,
|
||||
"total_steps": 6,
|
||||
"files_created": ["filled_form.pdf", "field_values.json"],
|
||||
"errors_encountered": 0,
|
||||
"output_chars": 12450,
|
||||
"transcript_chars": 3200
|
||||
}
|
||||
```
|
||||
|
||||
**Fields:**
|
||||
- `tool_calls`: Count per tool type
|
||||
- `total_tool_calls`: Sum of all tool calls
|
||||
- `total_steps`: Number of major execution steps
|
||||
- `files_created`: List of output files created
|
||||
- `errors_encountered`: Number of errors during execution
|
||||
- `output_chars`: Total character count of output files
|
||||
- `transcript_chars`: Character count of transcript
|
||||
|
||||
---
|
||||
|
||||
## timing.json
|
||||
|
||||
Wall clock timing for a run. Located at `<run-dir>/timing.json`.
|
||||
|
||||
**How to capture:** When a subagent task completes, the task notification includes `total_tokens` and `duration_ms`. Save these immediately — they are not persisted anywhere else and cannot be recovered after the fact.
|
||||
|
||||
```json
|
||||
{
|
||||
"total_tokens": 84852,
|
||||
"duration_ms": 23332,
|
||||
"total_duration_seconds": 23.3,
|
||||
"executor_start": "2026-01-15T10:30:00Z",
|
||||
"executor_end": "2026-01-15T10:32:45Z",
|
||||
"executor_duration_seconds": 165.0,
|
||||
"grader_start": "2026-01-15T10:32:46Z",
|
||||
"grader_end": "2026-01-15T10:33:12Z",
|
||||
"grader_duration_seconds": 26.0
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## benchmark.json
|
||||
|
||||
Output from Benchmark mode. Located at `benchmarks/<timestamp>/benchmark.json`.
|
||||
|
||||
```json
|
||||
{
|
||||
"metadata": {
|
||||
"skill_name": "pdf",
|
||||
"skill_path": "/path/to/pdf",
|
||||
"executor_model": "claude-sonnet-4-20250514",
|
||||
"analyzer_model": "most-capable-model",
|
||||
"timestamp": "2026-01-15T10:30:00Z",
|
||||
"evals_run": [1, 2, 3],
|
||||
"runs_per_configuration": 3
|
||||
},
|
||||
|
||||
"runs": [
|
||||
{
|
||||
"eval_id": 1,
|
||||
"eval_name": "Ocean",
|
||||
"configuration": "with_skill",
|
||||
"run_number": 1,
|
||||
"result": {
|
||||
"pass_rate": 0.85,
|
||||
"passed": 6,
|
||||
"failed": 1,
|
||||
"total": 7,
|
||||
"time_seconds": 42.5,
|
||||
"tokens": 3800,
|
||||
"tool_calls": 18,
|
||||
"errors": 0
|
||||
},
|
||||
"expectations": [
|
||||
{"text": "...", "passed": true, "evidence": "..."}
|
||||
],
|
||||
"notes": [
|
||||
"Used 2023 data, may be stale",
|
||||
"Fell back to text overlay for non-fillable fields"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
"run_summary": {
|
||||
"with_skill": {
|
||||
"pass_rate": {"mean": 0.85, "stddev": 0.05, "min": 0.80, "max": 0.90},
|
||||
"time_seconds": {"mean": 45.0, "stddev": 12.0, "min": 32.0, "max": 58.0},
|
||||
"tokens": {"mean": 3800, "stddev": 400, "min": 3200, "max": 4100}
|
||||
},
|
||||
"without_skill": {
|
||||
"pass_rate": {"mean": 0.35, "stddev": 0.08, "min": 0.28, "max": 0.45},
|
||||
"time_seconds": {"mean": 32.0, "stddev": 8.0, "min": 24.0, "max": 42.0},
|
||||
"tokens": {"mean": 2100, "stddev": 300, "min": 1800, "max": 2500}
|
||||
},
|
||||
"delta": {
|
||||
"pass_rate": "+0.50",
|
||||
"time_seconds": "+13.0",
|
||||
"tokens": "+1700"
|
||||
}
|
||||
},
|
||||
|
||||
"notes": [
|
||||
"Assertion 'Output is a PDF file' passes 100% in both configurations - may not differentiate skill value",
|
||||
"Eval 3 shows high variance (50% ± 40%) - may be flaky or model-dependent",
|
||||
"Without-skill runs consistently fail on table extraction expectations",
|
||||
"Skill adds 13s average execution time but improves pass rate by 50%"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
**Fields:**
|
||||
- `metadata`: Information about the benchmark run
|
||||
- `skill_name`: Name of the skill
|
||||
- `timestamp`: When the benchmark was run
|
||||
- `evals_run`: List of eval names or IDs
|
||||
- `runs_per_configuration`: Number of runs per config (e.g. 3)
|
||||
- `runs[]`: Individual run results
|
||||
- `eval_id`: Numeric eval identifier
|
||||
- `eval_name`: Human-readable eval name (used as section header in the viewer)
|
||||
- `configuration`: Must be `"with_skill"` or `"without_skill"` (the viewer uses this exact string for grouping and color coding)
|
||||
- `run_number`: Integer run number (1, 2, 3...)
|
||||
- `result`: Nested object with `pass_rate`, `passed`, `total`, `time_seconds`, `tokens`, `errors`
|
||||
- `run_summary`: Statistical aggregates per configuration
|
||||
- `with_skill` / `without_skill`: Each contains `pass_rate`, `time_seconds`, `tokens` objects with `mean` and `stddev` fields
|
||||
- `delta`: Difference strings like `"+0.50"`, `"+13.0"`, `"+1700"`
|
||||
- `notes`: Freeform observations from the analyzer
|
||||
|
||||
**Important:** The viewer reads these field names exactly. Using `config` instead of `configuration`, or putting `pass_rate` at the top level of a run instead of nested under `result`, will cause the viewer to show empty/zero values. Always reference this schema when generating benchmark.json manually.
|
||||
|
||||
---
|
||||
|
||||
## comparison.json
|
||||
|
||||
Output from blind comparator. Located at `<grading-dir>/comparison-N.json`.
|
||||
|
||||
```json
|
||||
{
|
||||
"winner": "A",
|
||||
"reasoning": "Output A provides a complete solution with proper formatting and all required fields. Output B is missing the date field and has formatting inconsistencies.",
|
||||
"rubric": {
|
||||
"A": {
|
||||
"content": {
|
||||
"correctness": 5,
|
||||
"completeness": 5,
|
||||
"accuracy": 4
|
||||
},
|
||||
"structure": {
|
||||
"organization": 4,
|
||||
"formatting": 5,
|
||||
"usability": 4
|
||||
},
|
||||
"content_score": 4.7,
|
||||
"structure_score": 4.3,
|
||||
"overall_score": 9.0
|
||||
},
|
||||
"B": {
|
||||
"content": {
|
||||
"correctness": 3,
|
||||
"completeness": 2,
|
||||
"accuracy": 3
|
||||
},
|
||||
"structure": {
|
||||
"organization": 3,
|
||||
"formatting": 2,
|
||||
"usability": 3
|
||||
},
|
||||
"content_score": 2.7,
|
||||
"structure_score": 2.7,
|
||||
"overall_score": 5.4
|
||||
}
|
||||
},
|
||||
"output_quality": {
|
||||
"A": {
|
||||
"score": 9,
|
||||
"strengths": ["Complete solution", "Well-formatted", "All fields present"],
|
||||
"weaknesses": ["Minor style inconsistency in header"]
|
||||
},
|
||||
"B": {
|
||||
"score": 5,
|
||||
"strengths": ["Readable output", "Correct basic structure"],
|
||||
"weaknesses": ["Missing date field", "Formatting inconsistencies", "Partial data extraction"]
|
||||
}
|
||||
},
|
||||
"expectation_results": {
|
||||
"A": {
|
||||
"passed": 4,
|
||||
"total": 5,
|
||||
"pass_rate": 0.80,
|
||||
"details": [
|
||||
{"text": "Output includes name", "passed": true}
|
||||
]
|
||||
},
|
||||
"B": {
|
||||
"passed": 3,
|
||||
"total": 5,
|
||||
"pass_rate": 0.60,
|
||||
"details": [
|
||||
{"text": "Output includes name", "passed": true}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## analysis.json
|
||||
|
||||
Output from post-hoc analyzer. Located at `<grading-dir>/analysis.json`.
|
||||
|
||||
```json
|
||||
{
|
||||
"comparison_summary": {
|
||||
"winner": "A",
|
||||
"winner_skill": "path/to/winner/skill",
|
||||
"loser_skill": "path/to/loser/skill",
|
||||
"comparator_reasoning": "Brief summary of why comparator chose winner"
|
||||
},
|
||||
"winner_strengths": [
|
||||
"Clear step-by-step instructions for handling multi-page documents",
|
||||
"Included validation script that caught formatting errors"
|
||||
],
|
||||
"loser_weaknesses": [
|
||||
"Vague instruction 'process the document appropriately' led to inconsistent behavior",
|
||||
"No script for validation, agent had to improvise"
|
||||
],
|
||||
"instruction_following": {
|
||||
"winner": {
|
||||
"score": 9,
|
||||
"issues": ["Minor: skipped optional logging step"]
|
||||
},
|
||||
"loser": {
|
||||
"score": 6,
|
||||
"issues": [
|
||||
"Did not use the skill's formatting template",
|
||||
"Invented own approach instead of following step 3"
|
||||
]
|
||||
}
|
||||
},
|
||||
"improvement_suggestions": [
|
||||
{
|
||||
"priority": "high",
|
||||
"category": "instructions",
|
||||
"suggestion": "Replace 'process the document appropriately' with explicit steps",
|
||||
"expected_impact": "Would eliminate ambiguity that caused inconsistent behavior"
|
||||
}
|
||||
],
|
||||
"transcript_insights": {
|
||||
"winner_execution_pattern": "Read skill -> Followed 5-step process -> Used validation script",
|
||||
"loser_execution_pattern": "Read skill -> Unclear on approach -> Tried 3 different methods"
|
||||
}
|
||||
}
|
||||
```
|
||||
+401
@@ -0,0 +1,401 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Aggregate individual run results into benchmark summary statistics.
|
||||
|
||||
Reads grading.json files from run directories and produces:
|
||||
- run_summary with mean, stddev, min, max for each metric
|
||||
- delta between with_skill and without_skill configurations
|
||||
|
||||
Usage:
|
||||
python aggregate_benchmark.py <benchmark_dir>
|
||||
|
||||
Example:
|
||||
python aggregate_benchmark.py benchmarks/2026-01-15T10-30-00/
|
||||
|
||||
The script supports two directory layouts:
|
||||
|
||||
Workspace layout (from skill-creator iterations):
|
||||
<benchmark_dir>/
|
||||
└── eval-N/
|
||||
├── with_skill/
|
||||
│ ├── run-1/grading.json
|
||||
│ └── run-2/grading.json
|
||||
└── without_skill/
|
||||
├── run-1/grading.json
|
||||
└── run-2/grading.json
|
||||
|
||||
Legacy layout (with runs/ subdirectory):
|
||||
<benchmark_dir>/
|
||||
└── runs/
|
||||
└── eval-N/
|
||||
├── with_skill/
|
||||
│ └── run-1/grading.json
|
||||
└── without_skill/
|
||||
└── run-1/grading.json
|
||||
"""
|
||||
|
||||
import argparse
|
||||
import json
|
||||
import math
|
||||
import sys
|
||||
from datetime import datetime, timezone
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def calculate_stats(values: list[float]) -> dict:
|
||||
"""Calculate mean, stddev, min, max for a list of values."""
|
||||
if not values:
|
||||
return {"mean": 0.0, "stddev": 0.0, "min": 0.0, "max": 0.0}
|
||||
|
||||
n = len(values)
|
||||
mean = sum(values) / n
|
||||
|
||||
if n > 1:
|
||||
variance = sum((x - mean) ** 2 for x in values) / (n - 1)
|
||||
stddev = math.sqrt(variance)
|
||||
else:
|
||||
stddev = 0.0
|
||||
|
||||
return {
|
||||
"mean": round(mean, 4),
|
||||
"stddev": round(stddev, 4),
|
||||
"min": round(min(values), 4),
|
||||
"max": round(max(values), 4)
|
||||
}
|
||||
|
||||
|
||||
def load_run_results(benchmark_dir: Path) -> dict:
|
||||
"""
|
||||
Load all run results from a benchmark directory.
|
||||
|
||||
Returns dict keyed by config name (e.g. "with_skill"/"without_skill",
|
||||
or "new_skill"/"old_skill"), each containing a list of run results.
|
||||
"""
|
||||
# Support both layouts: eval dirs directly under benchmark_dir, or under runs/
|
||||
runs_dir = benchmark_dir / "runs"
|
||||
if runs_dir.exists():
|
||||
search_dir = runs_dir
|
||||
elif list(benchmark_dir.glob("eval-*")):
|
||||
search_dir = benchmark_dir
|
||||
else:
|
||||
print(f"No eval directories found in {benchmark_dir} or {benchmark_dir / 'runs'}")
|
||||
return {}
|
||||
|
||||
results: dict[str, list] = {}
|
||||
|
||||
for eval_idx, eval_dir in enumerate(sorted(search_dir.glob("eval-*"))):
|
||||
metadata_path = eval_dir / "eval_metadata.json"
|
||||
if metadata_path.exists():
|
||||
try:
|
||||
with open(metadata_path) as mf:
|
||||
eval_id = json.load(mf).get("eval_id", eval_idx)
|
||||
except (json.JSONDecodeError, OSError):
|
||||
eval_id = eval_idx
|
||||
else:
|
||||
try:
|
||||
eval_id = int(eval_dir.name.split("-")[1])
|
||||
except ValueError:
|
||||
eval_id = eval_idx
|
||||
|
||||
# Discover config directories dynamically rather than hardcoding names
|
||||
for config_dir in sorted(eval_dir.iterdir()):
|
||||
if not config_dir.is_dir():
|
||||
continue
|
||||
# Skip non-config directories (inputs, outputs, etc.)
|
||||
if not list(config_dir.glob("run-*")):
|
||||
continue
|
||||
config = config_dir.name
|
||||
if config not in results:
|
||||
results[config] = []
|
||||
|
||||
for run_dir in sorted(config_dir.glob("run-*")):
|
||||
run_number = int(run_dir.name.split("-")[1])
|
||||
grading_file = run_dir / "grading.json"
|
||||
|
||||
if not grading_file.exists():
|
||||
print(f"Warning: grading.json not found in {run_dir}")
|
||||
continue
|
||||
|
||||
try:
|
||||
with open(grading_file) as f:
|
||||
grading = json.load(f)
|
||||
except json.JSONDecodeError as e:
|
||||
print(f"Warning: Invalid JSON in {grading_file}: {e}")
|
||||
continue
|
||||
|
||||
# Extract metrics
|
||||
result = {
|
||||
"eval_id": eval_id,
|
||||
"run_number": run_number,
|
||||
"pass_rate": grading.get("summary", {}).get("pass_rate", 0.0),
|
||||
"passed": grading.get("summary", {}).get("passed", 0),
|
||||
"failed": grading.get("summary", {}).get("failed", 0),
|
||||
"total": grading.get("summary", {}).get("total", 0),
|
||||
}
|
||||
|
||||
# Extract timing — check grading.json first, then sibling timing.json
|
||||
timing = grading.get("timing", {})
|
||||
result["time_seconds"] = timing.get("total_duration_seconds", 0.0)
|
||||
timing_file = run_dir / "timing.json"
|
||||
if result["time_seconds"] == 0.0 and timing_file.exists():
|
||||
try:
|
||||
with open(timing_file) as tf:
|
||||
timing_data = json.load(tf)
|
||||
result["time_seconds"] = timing_data.get("total_duration_seconds", 0.0)
|
||||
result["tokens"] = timing_data.get("total_tokens", 0)
|
||||
except json.JSONDecodeError:
|
||||
pass
|
||||
|
||||
# Extract metrics if available
|
||||
metrics = grading.get("execution_metrics", {})
|
||||
result["tool_calls"] = metrics.get("total_tool_calls", 0)
|
||||
if not result.get("tokens"):
|
||||
result["tokens"] = metrics.get("output_chars", 0)
|
||||
result["errors"] = metrics.get("errors_encountered", 0)
|
||||
|
||||
# Extract expectations — viewer requires fields: text, passed, evidence
|
||||
raw_expectations = grading.get("expectations", [])
|
||||
for exp in raw_expectations:
|
||||
if "text" not in exp or "passed" not in exp:
|
||||
print(f"Warning: expectation in {grading_file} missing required fields (text, passed, evidence): {exp}")
|
||||
result["expectations"] = raw_expectations
|
||||
|
||||
# Extract notes from user_notes_summary
|
||||
notes_summary = grading.get("user_notes_summary", {})
|
||||
notes = []
|
||||
notes.extend(notes_summary.get("uncertainties", []))
|
||||
notes.extend(notes_summary.get("needs_review", []))
|
||||
notes.extend(notes_summary.get("workarounds", []))
|
||||
result["notes"] = notes
|
||||
|
||||
results[config].append(result)
|
||||
|
||||
return results
|
||||
|
||||
|
||||
def aggregate_results(results: dict) -> dict:
|
||||
"""
|
||||
Aggregate run results into summary statistics.
|
||||
|
||||
Returns run_summary with stats for each configuration and delta.
|
||||
"""
|
||||
run_summary = {}
|
||||
configs = list(results.keys())
|
||||
|
||||
for config in configs:
|
||||
runs = results.get(config, [])
|
||||
|
||||
if not runs:
|
||||
run_summary[config] = {
|
||||
"pass_rate": {"mean": 0.0, "stddev": 0.0, "min": 0.0, "max": 0.0},
|
||||
"time_seconds": {"mean": 0.0, "stddev": 0.0, "min": 0.0, "max": 0.0},
|
||||
"tokens": {"mean": 0, "stddev": 0, "min": 0, "max": 0}
|
||||
}
|
||||
continue
|
||||
|
||||
pass_rates = [r["pass_rate"] for r in runs]
|
||||
times = [r["time_seconds"] for r in runs]
|
||||
tokens = [r.get("tokens", 0) for r in runs]
|
||||
|
||||
run_summary[config] = {
|
||||
"pass_rate": calculate_stats(pass_rates),
|
||||
"time_seconds": calculate_stats(times),
|
||||
"tokens": calculate_stats(tokens)
|
||||
}
|
||||
|
||||
# Calculate delta between the first two configs (if two exist)
|
||||
if len(configs) >= 2:
|
||||
primary = run_summary.get(configs[0], {})
|
||||
baseline = run_summary.get(configs[1], {})
|
||||
else:
|
||||
primary = run_summary.get(configs[0], {}) if configs else {}
|
||||
baseline = {}
|
||||
|
||||
delta_pass_rate = primary.get("pass_rate", {}).get("mean", 0) - baseline.get("pass_rate", {}).get("mean", 0)
|
||||
delta_time = primary.get("time_seconds", {}).get("mean", 0) - baseline.get("time_seconds", {}).get("mean", 0)
|
||||
delta_tokens = primary.get("tokens", {}).get("mean", 0) - baseline.get("tokens", {}).get("mean", 0)
|
||||
|
||||
run_summary["delta"] = {
|
||||
"pass_rate": f"{delta_pass_rate:+.2f}",
|
||||
"time_seconds": f"{delta_time:+.1f}",
|
||||
"tokens": f"{delta_tokens:+.0f}"
|
||||
}
|
||||
|
||||
return run_summary
|
||||
|
||||
|
||||
def generate_benchmark(benchmark_dir: Path, skill_name: str = "", skill_path: str = "") -> dict:
|
||||
"""
|
||||
Generate complete benchmark.json from run results.
|
||||
"""
|
||||
results = load_run_results(benchmark_dir)
|
||||
run_summary = aggregate_results(results)
|
||||
|
||||
# Build runs array for benchmark.json
|
||||
runs = []
|
||||
for config in results:
|
||||
for result in results[config]:
|
||||
runs.append({
|
||||
"eval_id": result["eval_id"],
|
||||
"configuration": config,
|
||||
"run_number": result["run_number"],
|
||||
"result": {
|
||||
"pass_rate": result["pass_rate"],
|
||||
"passed": result["passed"],
|
||||
"failed": result["failed"],
|
||||
"total": result["total"],
|
||||
"time_seconds": result["time_seconds"],
|
||||
"tokens": result.get("tokens", 0),
|
||||
"tool_calls": result.get("tool_calls", 0),
|
||||
"errors": result.get("errors", 0)
|
||||
},
|
||||
"expectations": result["expectations"],
|
||||
"notes": result["notes"]
|
||||
})
|
||||
|
||||
# Determine eval IDs from results
|
||||
eval_ids = sorted(set(
|
||||
r["eval_id"]
|
||||
for config in results.values()
|
||||
for r in config
|
||||
))
|
||||
|
||||
benchmark = {
|
||||
"metadata": {
|
||||
"skill_name": skill_name or "<skill-name>",
|
||||
"skill_path": skill_path or "<path/to/skill>",
|
||||
"executor_model": "<model-name>",
|
||||
"analyzer_model": "<model-name>",
|
||||
"timestamp": datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ"),
|
||||
"evals_run": eval_ids,
|
||||
"runs_per_configuration": 3
|
||||
},
|
||||
"runs": runs,
|
||||
"run_summary": run_summary,
|
||||
"notes": [] # To be filled by analyzer
|
||||
}
|
||||
|
||||
return benchmark
|
||||
|
||||
|
||||
def generate_markdown(benchmark: dict) -> str:
|
||||
"""Generate human-readable benchmark.md from benchmark data."""
|
||||
metadata = benchmark["metadata"]
|
||||
run_summary = benchmark["run_summary"]
|
||||
|
||||
# Determine config names (excluding "delta")
|
||||
configs = [k for k in run_summary if k != "delta"]
|
||||
config_a = configs[0] if len(configs) >= 1 else "config_a"
|
||||
config_b = configs[1] if len(configs) >= 2 else "config_b"
|
||||
label_a = config_a.replace("_", " ").title()
|
||||
label_b = config_b.replace("_", " ").title()
|
||||
|
||||
lines = [
|
||||
f"# Skill Benchmark: {metadata['skill_name']}",
|
||||
"",
|
||||
f"**Model**: {metadata['executor_model']}",
|
||||
f"**Date**: {metadata['timestamp']}",
|
||||
f"**Evals**: {', '.join(map(str, metadata['evals_run']))} ({metadata['runs_per_configuration']} runs each per configuration)",
|
||||
"",
|
||||
"## Summary",
|
||||
"",
|
||||
f"| Metric | {label_a} | {label_b} | Delta |",
|
||||
"|--------|------------|---------------|-------|",
|
||||
]
|
||||
|
||||
a_summary = run_summary.get(config_a, {})
|
||||
b_summary = run_summary.get(config_b, {})
|
||||
delta = run_summary.get("delta", {})
|
||||
|
||||
# Format pass rate
|
||||
a_pr = a_summary.get("pass_rate", {})
|
||||
b_pr = b_summary.get("pass_rate", {})
|
||||
lines.append(f"| Pass Rate | {a_pr.get('mean', 0)*100:.0f}% ± {a_pr.get('stddev', 0)*100:.0f}% | {b_pr.get('mean', 0)*100:.0f}% ± {b_pr.get('stddev', 0)*100:.0f}% | {delta.get('pass_rate', '—')} |")
|
||||
|
||||
# Format time
|
||||
a_time = a_summary.get("time_seconds", {})
|
||||
b_time = b_summary.get("time_seconds", {})
|
||||
lines.append(f"| Time | {a_time.get('mean', 0):.1f}s ± {a_time.get('stddev', 0):.1f}s | {b_time.get('mean', 0):.1f}s ± {b_time.get('stddev', 0):.1f}s | {delta.get('time_seconds', '—')}s |")
|
||||
|
||||
# Format tokens
|
||||
a_tokens = a_summary.get("tokens", {})
|
||||
b_tokens = b_summary.get("tokens", {})
|
||||
lines.append(f"| Tokens | {a_tokens.get('mean', 0):.0f} ± {a_tokens.get('stddev', 0):.0f} | {b_tokens.get('mean', 0):.0f} ± {b_tokens.get('stddev', 0):.0f} | {delta.get('tokens', '—')} |")
|
||||
|
||||
# Notes section
|
||||
if benchmark.get("notes"):
|
||||
lines.extend([
|
||||
"",
|
||||
"## Notes",
|
||||
""
|
||||
])
|
||||
for note in benchmark["notes"]:
|
||||
lines.append(f"- {note}")
|
||||
|
||||
return "\n".join(lines)
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(
|
||||
description="Aggregate benchmark run results into summary statistics"
|
||||
)
|
||||
parser.add_argument(
|
||||
"benchmark_dir",
|
||||
type=Path,
|
||||
help="Path to the benchmark directory"
|
||||
)
|
||||
parser.add_argument(
|
||||
"--skill-name",
|
||||
default="",
|
||||
help="Name of the skill being benchmarked"
|
||||
)
|
||||
parser.add_argument(
|
||||
"--skill-path",
|
||||
default="",
|
||||
help="Path to the skill being benchmarked"
|
||||
)
|
||||
parser.add_argument(
|
||||
"--output", "-o",
|
||||
type=Path,
|
||||
help="Output path for benchmark.json (default: <benchmark_dir>/benchmark.json)"
|
||||
)
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
if not args.benchmark_dir.exists():
|
||||
print(f"Directory not found: {args.benchmark_dir}")
|
||||
sys.exit(1)
|
||||
|
||||
# Generate benchmark
|
||||
benchmark = generate_benchmark(args.benchmark_dir, args.skill_name, args.skill_path)
|
||||
|
||||
# Determine output paths
|
||||
output_json = args.output or (args.benchmark_dir / "benchmark.json")
|
||||
output_md = output_json.with_suffix(".md")
|
||||
|
||||
# Write benchmark.json
|
||||
with open(output_json, "w") as f:
|
||||
json.dump(benchmark, f, indent=2)
|
||||
print(f"Generated: {output_json}")
|
||||
|
||||
# Write benchmark.md
|
||||
markdown = generate_markdown(benchmark)
|
||||
with open(output_md, "w") as f:
|
||||
f.write(markdown)
|
||||
print(f"Generated: {output_md}")
|
||||
|
||||
# Print summary
|
||||
run_summary = benchmark["run_summary"]
|
||||
configs = [k for k in run_summary if k != "delta"]
|
||||
delta = run_summary.get("delta", {})
|
||||
|
||||
print(f"\nSummary:")
|
||||
for config in configs:
|
||||
pr = run_summary[config]["pass_rate"]["mean"]
|
||||
label = config.replace("_", " ").title()
|
||||
print(f" {label}: {pr*100:.1f}% pass rate")
|
||||
print(f" Delta: {delta.get('pass_rate', '—')}")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
+326
@@ -0,0 +1,326 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Generate an HTML report from run_loop.py output.
|
||||
|
||||
Takes the JSON output from run_loop.py and generates a visual HTML report
|
||||
showing each description attempt with check/x for each test case.
|
||||
Distinguishes between train and test queries.
|
||||
"""
|
||||
|
||||
import argparse
|
||||
import html
|
||||
import json
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def generate_html(data: dict, auto_refresh: bool = False, skill_name: str = "") -> str:
|
||||
"""Generate HTML report from loop output data. If auto_refresh is True, adds a meta refresh tag."""
|
||||
history = data.get("history", [])
|
||||
holdout = data.get("holdout", 0)
|
||||
title_prefix = html.escape(skill_name + " \u2014 ") if skill_name else ""
|
||||
|
||||
# Get all unique queries from train and test sets, with should_trigger info
|
||||
train_queries: list[dict] = []
|
||||
test_queries: list[dict] = []
|
||||
if history:
|
||||
for r in history[0].get("train_results", history[0].get("results", [])):
|
||||
train_queries.append({"query": r["query"], "should_trigger": r.get("should_trigger", True)})
|
||||
if history[0].get("test_results"):
|
||||
for r in history[0].get("test_results", []):
|
||||
test_queries.append({"query": r["query"], "should_trigger": r.get("should_trigger", True)})
|
||||
|
||||
refresh_tag = ' <meta http-equiv="refresh" content="5">\n' if auto_refresh else ""
|
||||
|
||||
html_parts = ["""<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
""" + refresh_tag + """ <title>""" + title_prefix + """Skill Description Optimization</title>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@500;600&family=Lora:wght@400;500&display=swap" rel="stylesheet">
|
||||
<style>
|
||||
body {
|
||||
font-family: 'Lora', Georgia, serif;
|
||||
max-width: 100%;
|
||||
margin: 0 auto;
|
||||
padding: 20px;
|
||||
background: #faf9f5;
|
||||
color: #141413;
|
||||
}
|
||||
h1 { font-family: 'Poppins', sans-serif; color: #141413; }
|
||||
.explainer {
|
||||
background: white;
|
||||
padding: 15px;
|
||||
border-radius: 6px;
|
||||
margin-bottom: 20px;
|
||||
border: 1px solid #e8e6dc;
|
||||
color: #b0aea5;
|
||||
font-size: 0.875rem;
|
||||
line-height: 1.6;
|
||||
}
|
||||
.summary {
|
||||
background: white;
|
||||
padding: 15px;
|
||||
border-radius: 6px;
|
||||
margin-bottom: 20px;
|
||||
border: 1px solid #e8e6dc;
|
||||
}
|
||||
.summary p { margin: 5px 0; }
|
||||
.best { color: #788c5d; font-weight: bold; }
|
||||
.table-container {
|
||||
overflow-x: auto;
|
||||
width: 100%;
|
||||
}
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
background: white;
|
||||
border: 1px solid #e8e6dc;
|
||||
border-radius: 6px;
|
||||
font-size: 12px;
|
||||
min-width: 100%;
|
||||
}
|
||||
th, td {
|
||||
padding: 8px;
|
||||
text-align: left;
|
||||
border: 1px solid #e8e6dc;
|
||||
white-space: normal;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
th {
|
||||
font-family: 'Poppins', sans-serif;
|
||||
background: #141413;
|
||||
color: #faf9f5;
|
||||
font-weight: 500;
|
||||
}
|
||||
th.test-col {
|
||||
background: #6a9bcc;
|
||||
}
|
||||
th.query-col { min-width: 200px; }
|
||||
td.description {
|
||||
font-family: monospace;
|
||||
font-size: 11px;
|
||||
word-wrap: break-word;
|
||||
max-width: 400px;
|
||||
}
|
||||
td.result {
|
||||
text-align: center;
|
||||
font-size: 16px;
|
||||
min-width: 40px;
|
||||
}
|
||||
td.test-result {
|
||||
background: #f0f6fc;
|
||||
}
|
||||
.pass { color: #788c5d; }
|
||||
.fail { color: #c44; }
|
||||
.rate {
|
||||
font-size: 9px;
|
||||
color: #b0aea5;
|
||||
display: block;
|
||||
}
|
||||
tr:hover { background: #faf9f5; }
|
||||
.score {
|
||||
display: inline-block;
|
||||
padding: 2px 6px;
|
||||
border-radius: 4px;
|
||||
font-weight: bold;
|
||||
font-size: 11px;
|
||||
}
|
||||
.score-good { background: #eef2e8; color: #788c5d; }
|
||||
.score-ok { background: #fef3c7; color: #d97706; }
|
||||
.score-bad { background: #fceaea; color: #c44; }
|
||||
.train-label { color: #b0aea5; font-size: 10px; }
|
||||
.test-label { color: #6a9bcc; font-size: 10px; font-weight: bold; }
|
||||
.best-row { background: #f5f8f2; }
|
||||
th.positive-col { border-bottom: 3px solid #788c5d; }
|
||||
th.negative-col { border-bottom: 3px solid #c44; }
|
||||
th.test-col.positive-col { border-bottom: 3px solid #788c5d; }
|
||||
th.test-col.negative-col { border-bottom: 3px solid #c44; }
|
||||
.legend { font-family: 'Poppins', sans-serif; display: flex; gap: 20px; margin-bottom: 10px; font-size: 13px; align-items: center; }
|
||||
.legend-item { display: flex; align-items: center; gap: 6px; }
|
||||
.legend-swatch { width: 16px; height: 16px; border-radius: 3px; display: inline-block; }
|
||||
.swatch-positive { background: #141413; border-bottom: 3px solid #788c5d; }
|
||||
.swatch-negative { background: #141413; border-bottom: 3px solid #c44; }
|
||||
.swatch-test { background: #6a9bcc; }
|
||||
.swatch-train { background: #141413; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>""" + title_prefix + """Skill Description Optimization</h1>
|
||||
<div class="explainer">
|
||||
<strong>Optimizing your skill's description.</strong> This page updates automatically as Claude tests different versions of your skill's description. Each row is an iteration — a new description attempt. The columns show test queries: green checkmarks mean the skill triggered correctly (or correctly didn't trigger), red crosses mean it got it wrong. The "Train" score shows performance on queries used to improve the description; the "Test" score shows performance on held-out queries the optimizer hasn't seen. When it's done, Claude will apply the best-performing description to your skill.
|
||||
</div>
|
||||
"""]
|
||||
|
||||
# Summary section
|
||||
best_test_score = data.get('best_test_score')
|
||||
best_train_score = data.get('best_train_score')
|
||||
html_parts.append(f"""
|
||||
<div class="summary">
|
||||
<p><strong>Original:</strong> {html.escape(data.get('original_description', 'N/A'))}</p>
|
||||
<p class="best"><strong>Best:</strong> {html.escape(data.get('best_description', 'N/A'))}</p>
|
||||
<p><strong>Best Score:</strong> {data.get('best_score', 'N/A')} {'(test)' if best_test_score else '(train)'}</p>
|
||||
<p><strong>Iterations:</strong> {data.get('iterations_run', 0)} | <strong>Train:</strong> {data.get('train_size', '?')} | <strong>Test:</strong> {data.get('test_size', '?')}</p>
|
||||
</div>
|
||||
""")
|
||||
|
||||
# Legend
|
||||
html_parts.append("""
|
||||
<div class="legend">
|
||||
<span style="font-weight:600">Query columns:</span>
|
||||
<span class="legend-item"><span class="legend-swatch swatch-positive"></span> Should trigger</span>
|
||||
<span class="legend-item"><span class="legend-swatch swatch-negative"></span> Should NOT trigger</span>
|
||||
<span class="legend-item"><span class="legend-swatch swatch-train"></span> Train</span>
|
||||
<span class="legend-item"><span class="legend-swatch swatch-test"></span> Test</span>
|
||||
</div>
|
||||
""")
|
||||
|
||||
# Table header
|
||||
html_parts.append("""
|
||||
<div class="table-container">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Iter</th>
|
||||
<th>Train</th>
|
||||
<th>Test</th>
|
||||
<th class="query-col">Description</th>
|
||||
""")
|
||||
|
||||
# Add column headers for train queries
|
||||
for qinfo in train_queries:
|
||||
polarity = "positive-col" if qinfo["should_trigger"] else "negative-col"
|
||||
html_parts.append(f' <th class="{polarity}">{html.escape(qinfo["query"])}</th>\n')
|
||||
|
||||
# Add column headers for test queries (different color)
|
||||
for qinfo in test_queries:
|
||||
polarity = "positive-col" if qinfo["should_trigger"] else "negative-col"
|
||||
html_parts.append(f' <th class="test-col {polarity}">{html.escape(qinfo["query"])}</th>\n')
|
||||
|
||||
html_parts.append(""" </tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
""")
|
||||
|
||||
# Find best iteration for highlighting
|
||||
if test_queries:
|
||||
best_iter = max(history, key=lambda h: h.get("test_passed") or 0).get("iteration")
|
||||
else:
|
||||
best_iter = max(history, key=lambda h: h.get("train_passed", h.get("passed", 0))).get("iteration")
|
||||
|
||||
# Add rows for each iteration
|
||||
for h in history:
|
||||
iteration = h.get("iteration", "?")
|
||||
train_passed = h.get("train_passed", h.get("passed", 0))
|
||||
train_total = h.get("train_total", h.get("total", 0))
|
||||
test_passed = h.get("test_passed")
|
||||
test_total = h.get("test_total")
|
||||
description = h.get("description", "")
|
||||
train_results = h.get("train_results", h.get("results", []))
|
||||
test_results = h.get("test_results", [])
|
||||
|
||||
# Create lookups for results by query
|
||||
train_by_query = {r["query"]: r for r in train_results}
|
||||
test_by_query = {r["query"]: r for r in test_results} if test_results else {}
|
||||
|
||||
# Compute aggregate correct/total runs across all retries
|
||||
def aggregate_runs(results: list[dict]) -> tuple[int, int]:
|
||||
correct = 0
|
||||
total = 0
|
||||
for r in results:
|
||||
runs = r.get("runs", 0)
|
||||
triggers = r.get("triggers", 0)
|
||||
total += runs
|
||||
if r.get("should_trigger", True):
|
||||
correct += triggers
|
||||
else:
|
||||
correct += runs - triggers
|
||||
return correct, total
|
||||
|
||||
train_correct, train_runs = aggregate_runs(train_results)
|
||||
test_correct, test_runs = aggregate_runs(test_results)
|
||||
|
||||
# Determine score classes
|
||||
def score_class(correct: int, total: int) -> str:
|
||||
if total > 0:
|
||||
ratio = correct / total
|
||||
if ratio >= 0.8:
|
||||
return "score-good"
|
||||
elif ratio >= 0.5:
|
||||
return "score-ok"
|
||||
return "score-bad"
|
||||
|
||||
train_class = score_class(train_correct, train_runs)
|
||||
test_class = score_class(test_correct, test_runs)
|
||||
|
||||
row_class = "best-row" if iteration == best_iter else ""
|
||||
|
||||
html_parts.append(f""" <tr class="{row_class}">
|
||||
<td>{iteration}</td>
|
||||
<td><span class="score {train_class}">{train_correct}/{train_runs}</span></td>
|
||||
<td><span class="score {test_class}">{test_correct}/{test_runs}</span></td>
|
||||
<td class="description">{html.escape(description)}</td>
|
||||
""")
|
||||
|
||||
# Add result for each train query
|
||||
for qinfo in train_queries:
|
||||
r = train_by_query.get(qinfo["query"], {})
|
||||
did_pass = r.get("pass", False)
|
||||
triggers = r.get("triggers", 0)
|
||||
runs = r.get("runs", 0)
|
||||
|
||||
icon = "✓" if did_pass else "✗"
|
||||
css_class = "pass" if did_pass else "fail"
|
||||
|
||||
html_parts.append(f' <td class="result {css_class}">{icon}<span class="rate">{triggers}/{runs}</span></td>\n')
|
||||
|
||||
# Add result for each test query (with different background)
|
||||
for qinfo in test_queries:
|
||||
r = test_by_query.get(qinfo["query"], {})
|
||||
did_pass = r.get("pass", False)
|
||||
triggers = r.get("triggers", 0)
|
||||
runs = r.get("runs", 0)
|
||||
|
||||
icon = "✓" if did_pass else "✗"
|
||||
css_class = "pass" if did_pass else "fail"
|
||||
|
||||
html_parts.append(f' <td class="result test-result {css_class}">{icon}<span class="rate">{triggers}/{runs}</span></td>\n')
|
||||
|
||||
html_parts.append(" </tr>\n")
|
||||
|
||||
html_parts.append(""" </tbody>
|
||||
</table>
|
||||
</div>
|
||||
""")
|
||||
|
||||
html_parts.append("""
|
||||
</body>
|
||||
</html>
|
||||
""")
|
||||
|
||||
return "".join(html_parts)
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description="Generate HTML report from run_loop output")
|
||||
parser.add_argument("input", help="Path to JSON output from run_loop.py (or - for stdin)")
|
||||
parser.add_argument("-o", "--output", default=None, help="Output HTML file (default: stdout)")
|
||||
parser.add_argument("--skill-name", default="", help="Skill name to include in the report title")
|
||||
args = parser.parse_args()
|
||||
|
||||
if args.input == "-":
|
||||
data = json.load(sys.stdin)
|
||||
else:
|
||||
data = json.loads(Path(args.input).read_text())
|
||||
|
||||
html_output = generate_html(data, skill_name=args.skill_name)
|
||||
|
||||
if args.output:
|
||||
Path(args.output).write_text(html_output)
|
||||
print(f"Report written to {args.output}", file=sys.stderr)
|
||||
else:
|
||||
print(html_output)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
+247
@@ -0,0 +1,247 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Improve a skill description based on eval results.
|
||||
|
||||
Takes eval results (from run_eval.py) and generates an improved description
|
||||
by calling `claude -p` as a subprocess (same auth pattern as run_eval.py —
|
||||
uses the session's Claude Code auth, no separate ANTHROPIC_API_KEY needed).
|
||||
"""
|
||||
|
||||
import argparse
|
||||
import json
|
||||
import os
|
||||
import re
|
||||
import subprocess
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
from scripts.utils import parse_skill_md
|
||||
|
||||
|
||||
def _call_claude(prompt: str, model: str | None, timeout: int = 300) -> str:
|
||||
"""Run `claude -p` with the prompt on stdin and return the text response.
|
||||
|
||||
Prompt goes over stdin (not argv) because it embeds the full SKILL.md
|
||||
body and can easily exceed comfortable argv length.
|
||||
"""
|
||||
cmd = ["claude", "-p", "--output-format", "text"]
|
||||
if model:
|
||||
cmd.extend(["--model", model])
|
||||
|
||||
# Remove CLAUDECODE env var to allow nesting claude -p inside a
|
||||
# Claude Code session. The guard is for interactive terminal conflicts;
|
||||
# programmatic subprocess usage is safe. Same pattern as run_eval.py.
|
||||
env = {k: v for k, v in os.environ.items() if k != "CLAUDECODE"}
|
||||
|
||||
result = subprocess.run(
|
||||
cmd,
|
||||
input=prompt,
|
||||
capture_output=True,
|
||||
text=True,
|
||||
env=env,
|
||||
timeout=timeout,
|
||||
)
|
||||
if result.returncode != 0:
|
||||
raise RuntimeError(
|
||||
f"claude -p exited {result.returncode}\nstderr: {result.stderr}"
|
||||
)
|
||||
return result.stdout
|
||||
|
||||
|
||||
def improve_description(
|
||||
skill_name: str,
|
||||
skill_content: str,
|
||||
current_description: str,
|
||||
eval_results: dict,
|
||||
history: list[dict],
|
||||
model: str,
|
||||
test_results: dict | None = None,
|
||||
log_dir: Path | None = None,
|
||||
iteration: int | None = None,
|
||||
) -> str:
|
||||
"""Call Claude to improve the description based on eval results."""
|
||||
failed_triggers = [
|
||||
r for r in eval_results["results"]
|
||||
if r["should_trigger"] and not r["pass"]
|
||||
]
|
||||
false_triggers = [
|
||||
r for r in eval_results["results"]
|
||||
if not r["should_trigger"] and not r["pass"]
|
||||
]
|
||||
|
||||
# Build scores summary
|
||||
train_score = f"{eval_results['summary']['passed']}/{eval_results['summary']['total']}"
|
||||
if test_results:
|
||||
test_score = f"{test_results['summary']['passed']}/{test_results['summary']['total']}"
|
||||
scores_summary = f"Train: {train_score}, Test: {test_score}"
|
||||
else:
|
||||
scores_summary = f"Train: {train_score}"
|
||||
|
||||
prompt = f"""You are optimizing a skill description for a Claude Code skill called "{skill_name}". A "skill" is sort of like a prompt, but with progressive disclosure -- there's a title and description that Claude sees when deciding whether to use the skill, and then if it does use the skill, it reads the .md file which has lots more details and potentially links to other resources in the skill folder like helper files and scripts and additional documentation or examples.
|
||||
|
||||
The description appears in Claude's "available_skills" list. When a user sends a query, Claude decides whether to invoke the skill based solely on the title and on this description. Your goal is to write a description that triggers for relevant queries, and doesn't trigger for irrelevant ones.
|
||||
|
||||
Here's the current description:
|
||||
<current_description>
|
||||
"{current_description}"
|
||||
</current_description>
|
||||
|
||||
Current scores ({scores_summary}):
|
||||
<scores_summary>
|
||||
"""
|
||||
if failed_triggers:
|
||||
prompt += "FAILED TO TRIGGER (should have triggered but didn't):\n"
|
||||
for r in failed_triggers:
|
||||
prompt += f' - "{r["query"]}" (triggered {r["triggers"]}/{r["runs"]} times)\n'
|
||||
prompt += "\n"
|
||||
|
||||
if false_triggers:
|
||||
prompt += "FALSE TRIGGERS (triggered but shouldn't have):\n"
|
||||
for r in false_triggers:
|
||||
prompt += f' - "{r["query"]}" (triggered {r["triggers"]}/{r["runs"]} times)\n'
|
||||
prompt += "\n"
|
||||
|
||||
if history:
|
||||
prompt += "PREVIOUS ATTEMPTS (do NOT repeat these — try something structurally different):\n\n"
|
||||
for h in history:
|
||||
train_s = f"{h.get('train_passed', h.get('passed', 0))}/{h.get('train_total', h.get('total', 0))}"
|
||||
test_s = f"{h.get('test_passed', '?')}/{h.get('test_total', '?')}" if h.get('test_passed') is not None else None
|
||||
score_str = f"train={train_s}" + (f", test={test_s}" if test_s else "")
|
||||
prompt += f'<attempt {score_str}>\n'
|
||||
prompt += f'Description: "{h["description"]}"\n'
|
||||
if "results" in h:
|
||||
prompt += "Train results:\n"
|
||||
for r in h["results"]:
|
||||
status = "PASS" if r["pass"] else "FAIL"
|
||||
prompt += f' [{status}] "{r["query"][:80]}" (triggered {r["triggers"]}/{r["runs"]})\n'
|
||||
if h.get("note"):
|
||||
prompt += f'Note: {h["note"]}\n'
|
||||
prompt += "</attempt>\n\n"
|
||||
|
||||
prompt += f"""</scores_summary>
|
||||
|
||||
Skill content (for context on what the skill does):
|
||||
<skill_content>
|
||||
{skill_content}
|
||||
</skill_content>
|
||||
|
||||
Based on the failures, write a new and improved description that is more likely to trigger correctly. When I say "based on the failures", it's a bit of a tricky line to walk because we don't want to overfit to the specific cases you're seeing. So what I DON'T want you to do is produce an ever-expanding list of specific queries that this skill should or shouldn't trigger for. Instead, try to generalize from the failures to broader categories of user intent and situations where this skill would be useful or not useful. The reason for this is twofold:
|
||||
|
||||
1. Avoid overfitting
|
||||
2. The list might get loooong and it's injected into ALL queries and there might be a lot of skills, so we don't want to blow too much space on any given description.
|
||||
|
||||
Concretely, your description should not be more than about 100-200 words, even if that comes at the cost of accuracy. There is a hard limit of 1024 characters — descriptions over that will be truncated, so stay comfortably under it.
|
||||
|
||||
Here are some tips that we've found to work well in writing these descriptions:
|
||||
- The skill should be phrased in the imperative -- "Use this skill for" rather than "this skill does"
|
||||
- The skill description should focus on the user's intent, what they are trying to achieve, vs. the implementation details of how the skill works.
|
||||
- The description competes with other skills for Claude's attention — make it distinctive and immediately recognizable.
|
||||
- If you're getting lots of failures after repeated attempts, change things up. Try different sentence structures or wordings.
|
||||
|
||||
I'd encourage you to be creative and mix up the style in different iterations since you'll have multiple opportunities to try different approaches and we'll just grab the highest-scoring one at the end.
|
||||
|
||||
Please respond with only the new description text in <new_description> tags, nothing else."""
|
||||
|
||||
text = _call_claude(prompt, model)
|
||||
|
||||
match = re.search(r"<new_description>(.*?)</new_description>", text, re.DOTALL)
|
||||
description = match.group(1).strip().strip('"') if match else text.strip().strip('"')
|
||||
|
||||
transcript: dict = {
|
||||
"iteration": iteration,
|
||||
"prompt": prompt,
|
||||
"response": text,
|
||||
"parsed_description": description,
|
||||
"char_count": len(description),
|
||||
"over_limit": len(description) > 1024,
|
||||
}
|
||||
|
||||
# Safety net: the prompt already states the 1024-char hard limit, but if
|
||||
# the model blew past it anyway, make one fresh single-turn call that
|
||||
# quotes the too-long version and asks for a shorter rewrite. (The old
|
||||
# SDK path did this as a true multi-turn; `claude -p` is one-shot, so we
|
||||
# inline the prior output into the new prompt instead.)
|
||||
if len(description) > 1024:
|
||||
shorten_prompt = (
|
||||
f"{prompt}\n\n"
|
||||
f"---\n\n"
|
||||
f"A previous attempt produced this description, which at "
|
||||
f"{len(description)} characters is over the 1024-character hard limit:\n\n"
|
||||
f'"{description}"\n\n'
|
||||
f"Rewrite it to be under 1024 characters while keeping the most "
|
||||
f"important trigger words and intent coverage. Respond with only "
|
||||
f"the new description in <new_description> tags."
|
||||
)
|
||||
shorten_text = _call_claude(shorten_prompt, model)
|
||||
match = re.search(r"<new_description>(.*?)</new_description>", shorten_text, re.DOTALL)
|
||||
shortened = match.group(1).strip().strip('"') if match else shorten_text.strip().strip('"')
|
||||
|
||||
transcript["rewrite_prompt"] = shorten_prompt
|
||||
transcript["rewrite_response"] = shorten_text
|
||||
transcript["rewrite_description"] = shortened
|
||||
transcript["rewrite_char_count"] = len(shortened)
|
||||
description = shortened
|
||||
|
||||
transcript["final_description"] = description
|
||||
|
||||
if log_dir:
|
||||
log_dir.mkdir(parents=True, exist_ok=True)
|
||||
log_file = log_dir / f"improve_iter_{iteration or 'unknown'}.json"
|
||||
log_file.write_text(json.dumps(transcript, indent=2))
|
||||
|
||||
return description
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description="Improve a skill description based on eval results")
|
||||
parser.add_argument("--eval-results", required=True, help="Path to eval results JSON (from run_eval.py)")
|
||||
parser.add_argument("--skill-path", required=True, help="Path to skill directory")
|
||||
parser.add_argument("--history", default=None, help="Path to history JSON (previous attempts)")
|
||||
parser.add_argument("--model", required=True, help="Model for improvement")
|
||||
parser.add_argument("--verbose", action="store_true", help="Print thinking to stderr")
|
||||
args = parser.parse_args()
|
||||
|
||||
skill_path = Path(args.skill_path)
|
||||
if not (skill_path / "SKILL.md").exists():
|
||||
print(f"Error: No SKILL.md found at {skill_path}", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
eval_results = json.loads(Path(args.eval_results).read_text())
|
||||
history = []
|
||||
if args.history:
|
||||
history = json.loads(Path(args.history).read_text())
|
||||
|
||||
name, _, content = parse_skill_md(skill_path)
|
||||
current_description = eval_results["description"]
|
||||
|
||||
if args.verbose:
|
||||
print(f"Current: {current_description}", file=sys.stderr)
|
||||
print(f"Score: {eval_results['summary']['passed']}/{eval_results['summary']['total']}", file=sys.stderr)
|
||||
|
||||
new_description = improve_description(
|
||||
skill_name=name,
|
||||
skill_content=content,
|
||||
current_description=current_description,
|
||||
eval_results=eval_results,
|
||||
history=history,
|
||||
model=args.model,
|
||||
)
|
||||
|
||||
if args.verbose:
|
||||
print(f"Improved: {new_description}", file=sys.stderr)
|
||||
|
||||
# Output as JSON with both the new description and updated history
|
||||
output = {
|
||||
"description": new_description,
|
||||
"history": history + [{
|
||||
"description": current_description,
|
||||
"passed": eval_results["summary"]["passed"],
|
||||
"failed": eval_results["summary"]["failed"],
|
||||
"total": eval_results["summary"]["total"],
|
||||
"results": eval_results["results"],
|
||||
}],
|
||||
}
|
||||
print(json.dumps(output, indent=2))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
+136
@@ -0,0 +1,136 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Skill Packager - Creates a distributable .skill file of a skill folder
|
||||
|
||||
Usage:
|
||||
python utils/package_skill.py <path/to/skill-folder> [output-directory]
|
||||
|
||||
Example:
|
||||
python utils/package_skill.py skills/public/my-skill
|
||||
python utils/package_skill.py skills/public/my-skill ./dist
|
||||
"""
|
||||
|
||||
import fnmatch
|
||||
import sys
|
||||
import zipfile
|
||||
from pathlib import Path
|
||||
from scripts.quick_validate import validate_skill
|
||||
|
||||
# Patterns to exclude when packaging skills.
|
||||
EXCLUDE_DIRS = {"__pycache__", "node_modules"}
|
||||
EXCLUDE_GLOBS = {"*.pyc"}
|
||||
EXCLUDE_FILES = {".DS_Store"}
|
||||
# Directories excluded only at the skill root (not when nested deeper).
|
||||
ROOT_EXCLUDE_DIRS = {"evals"}
|
||||
|
||||
|
||||
def should_exclude(rel_path: Path) -> bool:
|
||||
"""Check if a path should be excluded from packaging."""
|
||||
parts = rel_path.parts
|
||||
if any(part in EXCLUDE_DIRS for part in parts):
|
||||
return True
|
||||
# rel_path is relative to skill_path.parent, so parts[0] is the skill
|
||||
# folder name and parts[1] (if present) is the first subdir.
|
||||
if len(parts) > 1 and parts[1] in ROOT_EXCLUDE_DIRS:
|
||||
return True
|
||||
name = rel_path.name
|
||||
if name in EXCLUDE_FILES:
|
||||
return True
|
||||
return any(fnmatch.fnmatch(name, pat) for pat in EXCLUDE_GLOBS)
|
||||
|
||||
|
||||
def package_skill(skill_path, output_dir=None):
|
||||
"""
|
||||
Package a skill folder into a .skill file.
|
||||
|
||||
Args:
|
||||
skill_path: Path to the skill folder
|
||||
output_dir: Optional output directory for the .skill file (defaults to current directory)
|
||||
|
||||
Returns:
|
||||
Path to the created .skill file, or None if error
|
||||
"""
|
||||
skill_path = Path(skill_path).resolve()
|
||||
|
||||
# Validate skill folder exists
|
||||
if not skill_path.exists():
|
||||
print(f"❌ Error: Skill folder not found: {skill_path}")
|
||||
return None
|
||||
|
||||
if not skill_path.is_dir():
|
||||
print(f"❌ Error: Path is not a directory: {skill_path}")
|
||||
return None
|
||||
|
||||
# Validate SKILL.md exists
|
||||
skill_md = skill_path / "SKILL.md"
|
||||
if not skill_md.exists():
|
||||
print(f"❌ Error: SKILL.md not found in {skill_path}")
|
||||
return None
|
||||
|
||||
# Run validation before packaging
|
||||
print("🔍 Validating skill...")
|
||||
valid, message = validate_skill(skill_path)
|
||||
if not valid:
|
||||
print(f"❌ Validation failed: {message}")
|
||||
print(" Please fix the validation errors before packaging.")
|
||||
return None
|
||||
print(f"✅ {message}\n")
|
||||
|
||||
# Determine output location
|
||||
skill_name = skill_path.name
|
||||
if output_dir:
|
||||
output_path = Path(output_dir).resolve()
|
||||
output_path.mkdir(parents=True, exist_ok=True)
|
||||
else:
|
||||
output_path = Path.cwd()
|
||||
|
||||
skill_filename = output_path / f"{skill_name}.skill"
|
||||
|
||||
# Create the .skill file (zip format)
|
||||
try:
|
||||
with zipfile.ZipFile(skill_filename, 'w', zipfile.ZIP_DEFLATED) as zipf:
|
||||
# Walk through the skill directory, excluding build artifacts
|
||||
for file_path in skill_path.rglob('*'):
|
||||
if not file_path.is_file():
|
||||
continue
|
||||
arcname = file_path.relative_to(skill_path.parent)
|
||||
if should_exclude(arcname):
|
||||
print(f" Skipped: {arcname}")
|
||||
continue
|
||||
zipf.write(file_path, arcname)
|
||||
print(f" Added: {arcname}")
|
||||
|
||||
print(f"\n✅ Successfully packaged skill to: {skill_filename}")
|
||||
return skill_filename
|
||||
|
||||
except Exception as e:
|
||||
print(f"❌ Error creating .skill file: {e}")
|
||||
return None
|
||||
|
||||
|
||||
def main():
|
||||
if len(sys.argv) < 2:
|
||||
print("Usage: python utils/package_skill.py <path/to/skill-folder> [output-directory]")
|
||||
print("\nExample:")
|
||||
print(" python utils/package_skill.py skills/public/my-skill")
|
||||
print(" python utils/package_skill.py skills/public/my-skill ./dist")
|
||||
sys.exit(1)
|
||||
|
||||
skill_path = sys.argv[1]
|
||||
output_dir = sys.argv[2] if len(sys.argv) > 2 else None
|
||||
|
||||
print(f"📦 Packaging skill: {skill_path}")
|
||||
if output_dir:
|
||||
print(f" Output directory: {output_dir}")
|
||||
print()
|
||||
|
||||
result = package_skill(skill_path, output_dir)
|
||||
|
||||
if result:
|
||||
sys.exit(0)
|
||||
else:
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
+103
@@ -0,0 +1,103 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Quick validation script for skills - minimal version
|
||||
"""
|
||||
|
||||
import sys
|
||||
import os
|
||||
import re
|
||||
import yaml
|
||||
from pathlib import Path
|
||||
|
||||
def validate_skill(skill_path):
|
||||
"""Basic validation of a skill"""
|
||||
skill_path = Path(skill_path)
|
||||
|
||||
# Check SKILL.md exists
|
||||
skill_md = skill_path / 'SKILL.md'
|
||||
if not skill_md.exists():
|
||||
return False, "SKILL.md not found"
|
||||
|
||||
# Read and validate frontmatter
|
||||
content = skill_md.read_text()
|
||||
if not content.startswith('---'):
|
||||
return False, "No YAML frontmatter found"
|
||||
|
||||
# Extract frontmatter
|
||||
match = re.match(r'^---\n(.*?)\n---', content, re.DOTALL)
|
||||
if not match:
|
||||
return False, "Invalid frontmatter format"
|
||||
|
||||
frontmatter_text = match.group(1)
|
||||
|
||||
# Parse YAML frontmatter
|
||||
try:
|
||||
frontmatter = yaml.safe_load(frontmatter_text)
|
||||
if not isinstance(frontmatter, dict):
|
||||
return False, "Frontmatter must be a YAML dictionary"
|
||||
except yaml.YAMLError as e:
|
||||
return False, f"Invalid YAML in frontmatter: {e}"
|
||||
|
||||
# Define allowed properties
|
||||
ALLOWED_PROPERTIES = {'name', 'description', 'license', 'allowed-tools', 'metadata', 'compatibility'}
|
||||
|
||||
# Check for unexpected properties (excluding nested keys under metadata)
|
||||
unexpected_keys = set(frontmatter.keys()) - ALLOWED_PROPERTIES
|
||||
if unexpected_keys:
|
||||
return False, (
|
||||
f"Unexpected key(s) in SKILL.md frontmatter: {', '.join(sorted(unexpected_keys))}. "
|
||||
f"Allowed properties are: {', '.join(sorted(ALLOWED_PROPERTIES))}"
|
||||
)
|
||||
|
||||
# Check required fields
|
||||
if 'name' not in frontmatter:
|
||||
return False, "Missing 'name' in frontmatter"
|
||||
if 'description' not in frontmatter:
|
||||
return False, "Missing 'description' in frontmatter"
|
||||
|
||||
# Extract name for validation
|
||||
name = frontmatter.get('name', '')
|
||||
if not isinstance(name, str):
|
||||
return False, f"Name must be a string, got {type(name).__name__}"
|
||||
name = name.strip()
|
||||
if name:
|
||||
# Check naming convention (kebab-case: lowercase with hyphens)
|
||||
if not re.match(r'^[a-z0-9-]+$', name):
|
||||
return False, f"Name '{name}' should be kebab-case (lowercase letters, digits, and hyphens only)"
|
||||
if name.startswith('-') or name.endswith('-') or '--' in name:
|
||||
return False, f"Name '{name}' cannot start/end with hyphen or contain consecutive hyphens"
|
||||
# Check name length (max 64 characters per spec)
|
||||
if len(name) > 64:
|
||||
return False, f"Name is too long ({len(name)} characters). Maximum is 64 characters."
|
||||
|
||||
# Extract and validate description
|
||||
description = frontmatter.get('description', '')
|
||||
if not isinstance(description, str):
|
||||
return False, f"Description must be a string, got {type(description).__name__}"
|
||||
description = description.strip()
|
||||
if description:
|
||||
# Check for angle brackets
|
||||
if '<' in description or '>' in description:
|
||||
return False, "Description cannot contain angle brackets (< or >)"
|
||||
# Check description length (max 1024 characters per spec)
|
||||
if len(description) > 1024:
|
||||
return False, f"Description is too long ({len(description)} characters). Maximum is 1024 characters."
|
||||
|
||||
# Validate compatibility field if present (optional)
|
||||
compatibility = frontmatter.get('compatibility', '')
|
||||
if compatibility:
|
||||
if not isinstance(compatibility, str):
|
||||
return False, f"Compatibility must be a string, got {type(compatibility).__name__}"
|
||||
if len(compatibility) > 500:
|
||||
return False, f"Compatibility is too long ({len(compatibility)} characters). Maximum is 500 characters."
|
||||
|
||||
return True, "Skill is valid!"
|
||||
|
||||
if __name__ == "__main__":
|
||||
if len(sys.argv) != 2:
|
||||
print("Usage: python quick_validate.py <skill_directory>")
|
||||
sys.exit(1)
|
||||
|
||||
valid, message = validate_skill(sys.argv[1])
|
||||
print(message)
|
||||
sys.exit(0 if valid else 1)
|
||||
+310
@@ -0,0 +1,310 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Run trigger evaluation for a skill description.
|
||||
|
||||
Tests whether a skill's description causes Claude to trigger (read the skill)
|
||||
for a set of queries. Outputs results as JSON.
|
||||
"""
|
||||
|
||||
import argparse
|
||||
import json
|
||||
import os
|
||||
import select
|
||||
import subprocess
|
||||
import sys
|
||||
import time
|
||||
import uuid
|
||||
from concurrent.futures import ProcessPoolExecutor, as_completed
|
||||
from pathlib import Path
|
||||
|
||||
from scripts.utils import parse_skill_md
|
||||
|
||||
|
||||
def find_project_root() -> Path:
|
||||
"""Find the project root by walking up from cwd looking for .claude/.
|
||||
|
||||
Mimics how Claude Code discovers its project root, so the command file
|
||||
we create ends up where claude -p will look for it.
|
||||
"""
|
||||
current = Path.cwd()
|
||||
for parent in [current, *current.parents]:
|
||||
if (parent / ".claude").is_dir():
|
||||
return parent
|
||||
return current
|
||||
|
||||
|
||||
def run_single_query(
|
||||
query: str,
|
||||
skill_name: str,
|
||||
skill_description: str,
|
||||
timeout: int,
|
||||
project_root: str,
|
||||
model: str | None = None,
|
||||
) -> bool:
|
||||
"""Run a single query and return whether the skill was triggered.
|
||||
|
||||
Creates a command file in .claude/commands/ so it appears in Claude's
|
||||
available_skills list, then runs `claude -p` with the raw query.
|
||||
Uses --include-partial-messages to detect triggering early from
|
||||
stream events (content_block_start) rather than waiting for the
|
||||
full assistant message, which only arrives after tool execution.
|
||||
"""
|
||||
unique_id = uuid.uuid4().hex[:8]
|
||||
clean_name = f"{skill_name}-skill-{unique_id}"
|
||||
project_commands_dir = Path(project_root) / ".claude" / "commands"
|
||||
command_file = project_commands_dir / f"{clean_name}.md"
|
||||
|
||||
try:
|
||||
project_commands_dir.mkdir(parents=True, exist_ok=True)
|
||||
# Use YAML block scalar to avoid breaking on quotes in description
|
||||
indented_desc = "\n ".join(skill_description.split("\n"))
|
||||
command_content = (
|
||||
f"---\n"
|
||||
f"description: |\n"
|
||||
f" {indented_desc}\n"
|
||||
f"---\n\n"
|
||||
f"# {skill_name}\n\n"
|
||||
f"This skill handles: {skill_description}\n"
|
||||
)
|
||||
command_file.write_text(command_content)
|
||||
|
||||
cmd = [
|
||||
"claude",
|
||||
"-p", query,
|
||||
"--output-format", "stream-json",
|
||||
"--verbose",
|
||||
"--include-partial-messages",
|
||||
]
|
||||
if model:
|
||||
cmd.extend(["--model", model])
|
||||
|
||||
# Remove CLAUDECODE env var to allow nesting claude -p inside a
|
||||
# Claude Code session. The guard is for interactive terminal conflicts;
|
||||
# programmatic subprocess usage is safe.
|
||||
env = {k: v for k, v in os.environ.items() if k != "CLAUDECODE"}
|
||||
|
||||
process = subprocess.Popen(
|
||||
cmd,
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.DEVNULL,
|
||||
cwd=project_root,
|
||||
env=env,
|
||||
)
|
||||
|
||||
triggered = False
|
||||
start_time = time.time()
|
||||
buffer = ""
|
||||
# Track state for stream event detection
|
||||
pending_tool_name = None
|
||||
accumulated_json = ""
|
||||
|
||||
try:
|
||||
while time.time() - start_time < timeout:
|
||||
if process.poll() is not None:
|
||||
remaining = process.stdout.read()
|
||||
if remaining:
|
||||
buffer += remaining.decode("utf-8", errors="replace")
|
||||
break
|
||||
|
||||
ready, _, _ = select.select([process.stdout], [], [], 1.0)
|
||||
if not ready:
|
||||
continue
|
||||
|
||||
chunk = os.read(process.stdout.fileno(), 8192)
|
||||
if not chunk:
|
||||
break
|
||||
buffer += chunk.decode("utf-8", errors="replace")
|
||||
|
||||
while "\n" in buffer:
|
||||
line, buffer = buffer.split("\n", 1)
|
||||
line = line.strip()
|
||||
if not line:
|
||||
continue
|
||||
|
||||
try:
|
||||
event = json.loads(line)
|
||||
except json.JSONDecodeError:
|
||||
continue
|
||||
|
||||
# Early detection via stream events
|
||||
if event.get("type") == "stream_event":
|
||||
se = event.get("event", {})
|
||||
se_type = se.get("type", "")
|
||||
|
||||
if se_type == "content_block_start":
|
||||
cb = se.get("content_block", {})
|
||||
if cb.get("type") == "tool_use":
|
||||
tool_name = cb.get("name", "")
|
||||
if tool_name in ("Skill", "Read"):
|
||||
pending_tool_name = tool_name
|
||||
accumulated_json = ""
|
||||
else:
|
||||
return False
|
||||
|
||||
elif se_type == "content_block_delta" and pending_tool_name:
|
||||
delta = se.get("delta", {})
|
||||
if delta.get("type") == "input_json_delta":
|
||||
accumulated_json += delta.get("partial_json", "")
|
||||
if clean_name in accumulated_json:
|
||||
return True
|
||||
|
||||
elif se_type in ("content_block_stop", "message_stop"):
|
||||
if pending_tool_name:
|
||||
return clean_name in accumulated_json
|
||||
if se_type == "message_stop":
|
||||
return False
|
||||
|
||||
# Fallback: full assistant message
|
||||
elif event.get("type") == "assistant":
|
||||
message = event.get("message", {})
|
||||
for content_item in message.get("content", []):
|
||||
if content_item.get("type") != "tool_use":
|
||||
continue
|
||||
tool_name = content_item.get("name", "")
|
||||
tool_input = content_item.get("input", {})
|
||||
if tool_name == "Skill" and clean_name in tool_input.get("skill", ""):
|
||||
triggered = True
|
||||
elif tool_name == "Read" and clean_name in tool_input.get("file_path", ""):
|
||||
triggered = True
|
||||
return triggered
|
||||
|
||||
elif event.get("type") == "result":
|
||||
return triggered
|
||||
finally:
|
||||
# Clean up process on any exit path (return, exception, timeout)
|
||||
if process.poll() is None:
|
||||
process.kill()
|
||||
process.wait()
|
||||
|
||||
return triggered
|
||||
finally:
|
||||
if command_file.exists():
|
||||
command_file.unlink()
|
||||
|
||||
|
||||
def run_eval(
|
||||
eval_set: list[dict],
|
||||
skill_name: str,
|
||||
description: str,
|
||||
num_workers: int,
|
||||
timeout: int,
|
||||
project_root: Path,
|
||||
runs_per_query: int = 1,
|
||||
trigger_threshold: float = 0.5,
|
||||
model: str | None = None,
|
||||
) -> dict:
|
||||
"""Run the full eval set and return results."""
|
||||
results = []
|
||||
|
||||
with ProcessPoolExecutor(max_workers=num_workers) as executor:
|
||||
future_to_info = {}
|
||||
for item in eval_set:
|
||||
for run_idx in range(runs_per_query):
|
||||
future = executor.submit(
|
||||
run_single_query,
|
||||
item["query"],
|
||||
skill_name,
|
||||
description,
|
||||
timeout,
|
||||
str(project_root),
|
||||
model,
|
||||
)
|
||||
future_to_info[future] = (item, run_idx)
|
||||
|
||||
query_triggers: dict[str, list[bool]] = {}
|
||||
query_items: dict[str, dict] = {}
|
||||
for future in as_completed(future_to_info):
|
||||
item, _ = future_to_info[future]
|
||||
query = item["query"]
|
||||
query_items[query] = item
|
||||
if query not in query_triggers:
|
||||
query_triggers[query] = []
|
||||
try:
|
||||
query_triggers[query].append(future.result())
|
||||
except Exception as e:
|
||||
print(f"Warning: query failed: {e}", file=sys.stderr)
|
||||
query_triggers[query].append(False)
|
||||
|
||||
for query, triggers in query_triggers.items():
|
||||
item = query_items[query]
|
||||
trigger_rate = sum(triggers) / len(triggers)
|
||||
should_trigger = item["should_trigger"]
|
||||
if should_trigger:
|
||||
did_pass = trigger_rate >= trigger_threshold
|
||||
else:
|
||||
did_pass = trigger_rate < trigger_threshold
|
||||
results.append({
|
||||
"query": query,
|
||||
"should_trigger": should_trigger,
|
||||
"trigger_rate": trigger_rate,
|
||||
"triggers": sum(triggers),
|
||||
"runs": len(triggers),
|
||||
"pass": did_pass,
|
||||
})
|
||||
|
||||
passed = sum(1 for r in results if r["pass"])
|
||||
total = len(results)
|
||||
|
||||
return {
|
||||
"skill_name": skill_name,
|
||||
"description": description,
|
||||
"results": results,
|
||||
"summary": {
|
||||
"total": total,
|
||||
"passed": passed,
|
||||
"failed": total - passed,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description="Run trigger evaluation for a skill description")
|
||||
parser.add_argument("--eval-set", required=True, help="Path to eval set JSON file")
|
||||
parser.add_argument("--skill-path", required=True, help="Path to skill directory")
|
||||
parser.add_argument("--description", default=None, help="Override description to test")
|
||||
parser.add_argument("--num-workers", type=int, default=10, help="Number of parallel workers")
|
||||
parser.add_argument("--timeout", type=int, default=30, help="Timeout per query in seconds")
|
||||
parser.add_argument("--runs-per-query", type=int, default=3, help="Number of runs per query")
|
||||
parser.add_argument("--trigger-threshold", type=float, default=0.5, help="Trigger rate threshold")
|
||||
parser.add_argument("--model", default=None, help="Model to use for claude -p (default: user's configured model)")
|
||||
parser.add_argument("--verbose", action="store_true", help="Print progress to stderr")
|
||||
args = parser.parse_args()
|
||||
|
||||
eval_set = json.loads(Path(args.eval_set).read_text())
|
||||
skill_path = Path(args.skill_path)
|
||||
|
||||
if not (skill_path / "SKILL.md").exists():
|
||||
print(f"Error: No SKILL.md found at {skill_path}", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
name, original_description, content = parse_skill_md(skill_path)
|
||||
description = args.description or original_description
|
||||
project_root = find_project_root()
|
||||
|
||||
if args.verbose:
|
||||
print(f"Evaluating: {description}", file=sys.stderr)
|
||||
|
||||
output = run_eval(
|
||||
eval_set=eval_set,
|
||||
skill_name=name,
|
||||
description=description,
|
||||
num_workers=args.num_workers,
|
||||
timeout=args.timeout,
|
||||
project_root=project_root,
|
||||
runs_per_query=args.runs_per_query,
|
||||
trigger_threshold=args.trigger_threshold,
|
||||
model=args.model,
|
||||
)
|
||||
|
||||
if args.verbose:
|
||||
summary = output["summary"]
|
||||
print(f"Results: {summary['passed']}/{summary['total']} passed", file=sys.stderr)
|
||||
for r in output["results"]:
|
||||
status = "PASS" if r["pass"] else "FAIL"
|
||||
rate_str = f"{r['triggers']}/{r['runs']}"
|
||||
print(f" [{status}] rate={rate_str} expected={r['should_trigger']}: {r['query'][:70]}", file=sys.stderr)
|
||||
|
||||
print(json.dumps(output, indent=2))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
+328
@@ -0,0 +1,328 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Run the eval + improve loop until all pass or max iterations reached.
|
||||
|
||||
Combines run_eval.py and improve_description.py in a loop, tracking history
|
||||
and returning the best description found. Supports train/test split to prevent
|
||||
overfitting.
|
||||
"""
|
||||
|
||||
import argparse
|
||||
import json
|
||||
import random
|
||||
import sys
|
||||
import tempfile
|
||||
import time
|
||||
import webbrowser
|
||||
from pathlib import Path
|
||||
|
||||
from scripts.generate_report import generate_html
|
||||
from scripts.improve_description import improve_description
|
||||
from scripts.run_eval import find_project_root, run_eval
|
||||
from scripts.utils import parse_skill_md
|
||||
|
||||
|
||||
def split_eval_set(eval_set: list[dict], holdout: float, seed: int = 42) -> tuple[list[dict], list[dict]]:
|
||||
"""Split eval set into train and test sets, stratified by should_trigger."""
|
||||
random.seed(seed)
|
||||
|
||||
# Separate by should_trigger
|
||||
trigger = [e for e in eval_set if e["should_trigger"]]
|
||||
no_trigger = [e for e in eval_set if not e["should_trigger"]]
|
||||
|
||||
# Shuffle each group
|
||||
random.shuffle(trigger)
|
||||
random.shuffle(no_trigger)
|
||||
|
||||
# Calculate split points
|
||||
n_trigger_test = max(1, int(len(trigger) * holdout))
|
||||
n_no_trigger_test = max(1, int(len(no_trigger) * holdout))
|
||||
|
||||
# Split
|
||||
test_set = trigger[:n_trigger_test] + no_trigger[:n_no_trigger_test]
|
||||
train_set = trigger[n_trigger_test:] + no_trigger[n_no_trigger_test:]
|
||||
|
||||
return train_set, test_set
|
||||
|
||||
|
||||
def run_loop(
|
||||
eval_set: list[dict],
|
||||
skill_path: Path,
|
||||
description_override: str | None,
|
||||
num_workers: int,
|
||||
timeout: int,
|
||||
max_iterations: int,
|
||||
runs_per_query: int,
|
||||
trigger_threshold: float,
|
||||
holdout: float,
|
||||
model: str,
|
||||
verbose: bool,
|
||||
live_report_path: Path | None = None,
|
||||
log_dir: Path | None = None,
|
||||
) -> dict:
|
||||
"""Run the eval + improvement loop."""
|
||||
project_root = find_project_root()
|
||||
name, original_description, content = parse_skill_md(skill_path)
|
||||
current_description = description_override or original_description
|
||||
|
||||
# Split into train/test if holdout > 0
|
||||
if holdout > 0:
|
||||
train_set, test_set = split_eval_set(eval_set, holdout)
|
||||
if verbose:
|
||||
print(f"Split: {len(train_set)} train, {len(test_set)} test (holdout={holdout})", file=sys.stderr)
|
||||
else:
|
||||
train_set = eval_set
|
||||
test_set = []
|
||||
|
||||
history = []
|
||||
exit_reason = "unknown"
|
||||
|
||||
for iteration in range(1, max_iterations + 1):
|
||||
if verbose:
|
||||
print(f"\n{'='*60}", file=sys.stderr)
|
||||
print(f"Iteration {iteration}/{max_iterations}", file=sys.stderr)
|
||||
print(f"Description: {current_description}", file=sys.stderr)
|
||||
print(f"{'='*60}", file=sys.stderr)
|
||||
|
||||
# Evaluate train + test together in one batch for parallelism
|
||||
all_queries = train_set + test_set
|
||||
t0 = time.time()
|
||||
all_results = run_eval(
|
||||
eval_set=all_queries,
|
||||
skill_name=name,
|
||||
description=current_description,
|
||||
num_workers=num_workers,
|
||||
timeout=timeout,
|
||||
project_root=project_root,
|
||||
runs_per_query=runs_per_query,
|
||||
trigger_threshold=trigger_threshold,
|
||||
model=model,
|
||||
)
|
||||
eval_elapsed = time.time() - t0
|
||||
|
||||
# Split results back into train/test by matching queries
|
||||
train_queries_set = {q["query"] for q in train_set}
|
||||
train_result_list = [r for r in all_results["results"] if r["query"] in train_queries_set]
|
||||
test_result_list = [r for r in all_results["results"] if r["query"] not in train_queries_set]
|
||||
|
||||
train_passed = sum(1 for r in train_result_list if r["pass"])
|
||||
train_total = len(train_result_list)
|
||||
train_summary = {"passed": train_passed, "failed": train_total - train_passed, "total": train_total}
|
||||
train_results = {"results": train_result_list, "summary": train_summary}
|
||||
|
||||
if test_set:
|
||||
test_passed = sum(1 for r in test_result_list if r["pass"])
|
||||
test_total = len(test_result_list)
|
||||
test_summary = {"passed": test_passed, "failed": test_total - test_passed, "total": test_total}
|
||||
test_results = {"results": test_result_list, "summary": test_summary}
|
||||
else:
|
||||
test_results = None
|
||||
test_summary = None
|
||||
|
||||
history.append({
|
||||
"iteration": iteration,
|
||||
"description": current_description,
|
||||
"train_passed": train_summary["passed"],
|
||||
"train_failed": train_summary["failed"],
|
||||
"train_total": train_summary["total"],
|
||||
"train_results": train_results["results"],
|
||||
"test_passed": test_summary["passed"] if test_summary else None,
|
||||
"test_failed": test_summary["failed"] if test_summary else None,
|
||||
"test_total": test_summary["total"] if test_summary else None,
|
||||
"test_results": test_results["results"] if test_results else None,
|
||||
# For backward compat with report generator
|
||||
"passed": train_summary["passed"],
|
||||
"failed": train_summary["failed"],
|
||||
"total": train_summary["total"],
|
||||
"results": train_results["results"],
|
||||
})
|
||||
|
||||
# Write live report if path provided
|
||||
if live_report_path:
|
||||
partial_output = {
|
||||
"original_description": original_description,
|
||||
"best_description": current_description,
|
||||
"best_score": "in progress",
|
||||
"iterations_run": len(history),
|
||||
"holdout": holdout,
|
||||
"train_size": len(train_set),
|
||||
"test_size": len(test_set),
|
||||
"history": history,
|
||||
}
|
||||
live_report_path.write_text(generate_html(partial_output, auto_refresh=True, skill_name=name))
|
||||
|
||||
if verbose:
|
||||
def print_eval_stats(label, results, elapsed):
|
||||
pos = [r for r in results if r["should_trigger"]]
|
||||
neg = [r for r in results if not r["should_trigger"]]
|
||||
tp = sum(r["triggers"] for r in pos)
|
||||
pos_runs = sum(r["runs"] for r in pos)
|
||||
fn = pos_runs - tp
|
||||
fp = sum(r["triggers"] for r in neg)
|
||||
neg_runs = sum(r["runs"] for r in neg)
|
||||
tn = neg_runs - fp
|
||||
total = tp + tn + fp + fn
|
||||
precision = tp / (tp + fp) if (tp + fp) > 0 else 1.0
|
||||
recall = tp / (tp + fn) if (tp + fn) > 0 else 1.0
|
||||
accuracy = (tp + tn) / total if total > 0 else 0.0
|
||||
print(f"{label}: {tp+tn}/{total} correct, precision={precision:.0%} recall={recall:.0%} accuracy={accuracy:.0%} ({elapsed:.1f}s)", file=sys.stderr)
|
||||
for r in results:
|
||||
status = "PASS" if r["pass"] else "FAIL"
|
||||
rate_str = f"{r['triggers']}/{r['runs']}"
|
||||
print(f" [{status}] rate={rate_str} expected={r['should_trigger']}: {r['query'][:60]}", file=sys.stderr)
|
||||
|
||||
print_eval_stats("Train", train_results["results"], eval_elapsed)
|
||||
if test_summary:
|
||||
print_eval_stats("Test ", test_results["results"], 0)
|
||||
|
||||
if train_summary["failed"] == 0:
|
||||
exit_reason = f"all_passed (iteration {iteration})"
|
||||
if verbose:
|
||||
print(f"\nAll train queries passed on iteration {iteration}!", file=sys.stderr)
|
||||
break
|
||||
|
||||
if iteration == max_iterations:
|
||||
exit_reason = f"max_iterations ({max_iterations})"
|
||||
if verbose:
|
||||
print(f"\nMax iterations reached ({max_iterations}).", file=sys.stderr)
|
||||
break
|
||||
|
||||
# Improve the description based on train results
|
||||
if verbose:
|
||||
print(f"\nImproving description...", file=sys.stderr)
|
||||
|
||||
t0 = time.time()
|
||||
# Strip test scores from history so improvement model can't see them
|
||||
blinded_history = [
|
||||
{k: v for k, v in h.items() if not k.startswith("test_")}
|
||||
for h in history
|
||||
]
|
||||
new_description = improve_description(
|
||||
skill_name=name,
|
||||
skill_content=content,
|
||||
current_description=current_description,
|
||||
eval_results=train_results,
|
||||
history=blinded_history,
|
||||
model=model,
|
||||
log_dir=log_dir,
|
||||
iteration=iteration,
|
||||
)
|
||||
improve_elapsed = time.time() - t0
|
||||
|
||||
if verbose:
|
||||
print(f"Proposed ({improve_elapsed:.1f}s): {new_description}", file=sys.stderr)
|
||||
|
||||
current_description = new_description
|
||||
|
||||
# Find the best iteration by TEST score (or train if no test set)
|
||||
if test_set:
|
||||
best = max(history, key=lambda h: h["test_passed"] or 0)
|
||||
best_score = f"{best['test_passed']}/{best['test_total']}"
|
||||
else:
|
||||
best = max(history, key=lambda h: h["train_passed"])
|
||||
best_score = f"{best['train_passed']}/{best['train_total']}"
|
||||
|
||||
if verbose:
|
||||
print(f"\nExit reason: {exit_reason}", file=sys.stderr)
|
||||
print(f"Best score: {best_score} (iteration {best['iteration']})", file=sys.stderr)
|
||||
|
||||
return {
|
||||
"exit_reason": exit_reason,
|
||||
"original_description": original_description,
|
||||
"best_description": best["description"],
|
||||
"best_score": best_score,
|
||||
"best_train_score": f"{best['train_passed']}/{best['train_total']}",
|
||||
"best_test_score": f"{best['test_passed']}/{best['test_total']}" if test_set else None,
|
||||
"final_description": current_description,
|
||||
"iterations_run": len(history),
|
||||
"holdout": holdout,
|
||||
"train_size": len(train_set),
|
||||
"test_size": len(test_set),
|
||||
"history": history,
|
||||
}
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description="Run eval + improve loop")
|
||||
parser.add_argument("--eval-set", required=True, help="Path to eval set JSON file")
|
||||
parser.add_argument("--skill-path", required=True, help="Path to skill directory")
|
||||
parser.add_argument("--description", default=None, help="Override starting description")
|
||||
parser.add_argument("--num-workers", type=int, default=10, help="Number of parallel workers")
|
||||
parser.add_argument("--timeout", type=int, default=30, help="Timeout per query in seconds")
|
||||
parser.add_argument("--max-iterations", type=int, default=5, help="Max improvement iterations")
|
||||
parser.add_argument("--runs-per-query", type=int, default=3, help="Number of runs per query")
|
||||
parser.add_argument("--trigger-threshold", type=float, default=0.5, help="Trigger rate threshold")
|
||||
parser.add_argument("--holdout", type=float, default=0.4, help="Fraction of eval set to hold out for testing (0 to disable)")
|
||||
parser.add_argument("--model", required=True, help="Model for improvement")
|
||||
parser.add_argument("--verbose", action="store_true", help="Print progress to stderr")
|
||||
parser.add_argument("--report", default="auto", help="Generate HTML report at this path (default: 'auto' for temp file, 'none' to disable)")
|
||||
parser.add_argument("--results-dir", default=None, help="Save all outputs (results.json, report.html, log.txt) to a timestamped subdirectory here")
|
||||
args = parser.parse_args()
|
||||
|
||||
eval_set = json.loads(Path(args.eval_set).read_text())
|
||||
skill_path = Path(args.skill_path)
|
||||
|
||||
if not (skill_path / "SKILL.md").exists():
|
||||
print(f"Error: No SKILL.md found at {skill_path}", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
name, _, _ = parse_skill_md(skill_path)
|
||||
|
||||
# Set up live report path
|
||||
if args.report != "none":
|
||||
if args.report == "auto":
|
||||
timestamp = time.strftime("%Y%m%d_%H%M%S")
|
||||
live_report_path = Path(tempfile.gettempdir()) / f"skill_description_report_{skill_path.name}_{timestamp}.html"
|
||||
else:
|
||||
live_report_path = Path(args.report)
|
||||
# Open the report immediately so the user can watch
|
||||
live_report_path.write_text("<html><body><h1>Starting optimization loop...</h1><meta http-equiv='refresh' content='5'></body></html>")
|
||||
webbrowser.open(str(live_report_path))
|
||||
else:
|
||||
live_report_path = None
|
||||
|
||||
# Determine output directory (create before run_loop so logs can be written)
|
||||
if args.results_dir:
|
||||
timestamp = time.strftime("%Y-%m-%d_%H%M%S")
|
||||
results_dir = Path(args.results_dir) / timestamp
|
||||
results_dir.mkdir(parents=True, exist_ok=True)
|
||||
else:
|
||||
results_dir = None
|
||||
|
||||
log_dir = results_dir / "logs" if results_dir else None
|
||||
|
||||
output = run_loop(
|
||||
eval_set=eval_set,
|
||||
skill_path=skill_path,
|
||||
description_override=args.description,
|
||||
num_workers=args.num_workers,
|
||||
timeout=args.timeout,
|
||||
max_iterations=args.max_iterations,
|
||||
runs_per_query=args.runs_per_query,
|
||||
trigger_threshold=args.trigger_threshold,
|
||||
holdout=args.holdout,
|
||||
model=args.model,
|
||||
verbose=args.verbose,
|
||||
live_report_path=live_report_path,
|
||||
log_dir=log_dir,
|
||||
)
|
||||
|
||||
# Save JSON output
|
||||
json_output = json.dumps(output, indent=2)
|
||||
print(json_output)
|
||||
if results_dir:
|
||||
(results_dir / "results.json").write_text(json_output)
|
||||
|
||||
# Write final HTML report (without auto-refresh)
|
||||
if live_report_path:
|
||||
live_report_path.write_text(generate_html(output, auto_refresh=False, skill_name=name))
|
||||
print(f"\nReport: {live_report_path}", file=sys.stderr)
|
||||
|
||||
if results_dir and live_report_path:
|
||||
(results_dir / "report.html").write_text(generate_html(output, auto_refresh=False, skill_name=name))
|
||||
|
||||
if results_dir:
|
||||
print(f"Results saved to: {results_dir}", file=sys.stderr)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -0,0 +1,47 @@
|
||||
"""Shared utilities for skill-creator scripts."""
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
|
||||
def parse_skill_md(skill_path: Path) -> tuple[str, str, str]:
|
||||
"""Parse a SKILL.md file, returning (name, description, full_content)."""
|
||||
content = (skill_path / "SKILL.md").read_text()
|
||||
lines = content.split("\n")
|
||||
|
||||
if lines[0].strip() != "---":
|
||||
raise ValueError("SKILL.md missing frontmatter (no opening ---)")
|
||||
|
||||
end_idx = None
|
||||
for i, line in enumerate(lines[1:], start=1):
|
||||
if line.strip() == "---":
|
||||
end_idx = i
|
||||
break
|
||||
|
||||
if end_idx is None:
|
||||
raise ValueError("SKILL.md missing frontmatter (no closing ---)")
|
||||
|
||||
name = ""
|
||||
description = ""
|
||||
frontmatter_lines = lines[1:end_idx]
|
||||
i = 0
|
||||
while i < len(frontmatter_lines):
|
||||
line = frontmatter_lines[i]
|
||||
if line.startswith("name:"):
|
||||
name = line[len("name:"):].strip().strip('"').strip("'")
|
||||
elif line.startswith("description:"):
|
||||
value = line[len("description:"):].strip()
|
||||
# Handle YAML multiline indicators (>, |, >-, |-)
|
||||
if value in (">", "|", ">-", "|-"):
|
||||
continuation_lines: list[str] = []
|
||||
i += 1
|
||||
while i < len(frontmatter_lines) and (frontmatter_lines[i].startswith(" ") or frontmatter_lines[i].startswith("\t")):
|
||||
continuation_lines.append(frontmatter_lines[i].strip())
|
||||
i += 1
|
||||
description = " ".join(continuation_lines)
|
||||
continue
|
||||
else:
|
||||
description = value.strip('"').strip("'")
|
||||
i += 1
|
||||
|
||||
return name, description, content
|
||||
@@ -0,0 +1,285 @@
|
||||
---
|
||||
name: zeroclaw
|
||||
description: "Help users operate and interact with their ZeroClaw agent instance — through both the CLI (`zeroclaw` commands) and the REST/WebSocket gateway API. Use this skill whenever the user wants to: send messages to ZeroClaw, manage memory or cron jobs, check system status, configure channels or providers, hit the gateway API, troubleshoot their ZeroClaw setup, build from source, or do anything involving the `zeroclaw` binary or its HTTP endpoints. Trigger this even if the user just says things like 'check my agent status', 'schedule a reminder', 'store this in memory', 'list my cron jobs', 'send a message to my bot', 'set up Telegram', 'build zeroclaw', or 'my bot is broken' — these are all ZeroClaw operations."
|
||||
---
|
||||
|
||||
# ZeroClaw Skill
|
||||
|
||||
You are helping a user operate their ZeroClaw agent instance. ZeroClaw is an autonomous agent runtime with a CLI and an HTTP/WebSocket gateway.
|
||||
|
||||
Your job is to understand what the user wants to accomplish and then **execute it** — run the command, make the API call, report the result. Do not just show commands for the user to copy-paste. Actually run them via the Bash tool and tell the user what happened. The only exception is destructive operations (clearing all memory, estop kill-all) where you should confirm first.
|
||||
|
||||
## Adaptive Expertise
|
||||
|
||||
Pay attention to how the user talks. Someone who says "can you hit the webhook endpoint with a POST" is telling you they know what they're doing — be concise, skip explanations, just execute. Someone who says "how do I make my bot remember things" needs more context about what's happening under the hood.
|
||||
|
||||
Signals of technical comfort: mentions specific endpoints, HTTP methods, JSON fields, talks about tokens/auth, uses CLI flags fluently, references config files directly.
|
||||
|
||||
Signals of less familiarity: asks "what does X do", uses casual language about the bot/agent, describes goals rather than mechanisms ("I want it to check something every morning").
|
||||
|
||||
Default to a middle ground — brief explanation of what you're about to do, then do it. Dial up or down from there based on cues.
|
||||
|
||||
## Discovery — Before You Act
|
||||
|
||||
Before running any ZeroClaw operation, make sure you know where things are:
|
||||
|
||||
1. **Find the binary.** Search in this order:
|
||||
- `which zeroclaw` (PATH)
|
||||
- The current project's build output: `./target/release/zeroclaw` or `./target/debug/zeroclaw` — this is the right choice when the user is working inside the ZeroClaw source tree and may have local changes
|
||||
- Common install locations: `~/.cargo/bin/zeroclaw`, `~/Downloads/zeroclaw-bin/zeroclaw`
|
||||
|
||||
If no binary is found anywhere, offer to build from source (see "Building from Source" below). If the user is a developer working on ZeroClaw itself, they'll likely want the local build — watch for cues like them editing source files, mentioning PRs, or being in the project directory.
|
||||
|
||||
2. **Check if the gateway is running** (only needed for REST/WebSocket operations). A quick `curl -sf http://127.0.0.1:42617/health` tells you. If it's not running and the user wants REST access, let them know and offer to start it (`zeroclaw gateway` or `zeroclaw daemon`).
|
||||
|
||||
3. **Check auth status.** If the gateway requires pairing (`require_pairing = true` is the default), REST calls need a bearer token. Run `zeroclaw status` to see the current state, or check `~/.zeroclaw/config.toml` for a stored token under `[gateway]`.
|
||||
|
||||
Cache these findings for the conversation — don't re-discover every time.
|
||||
|
||||
## Important: REPL Limitation
|
||||
|
||||
`zeroclaw agent` (interactive REPL) requires interactive stdin, which doesn't work through the Bash tool. When the user wants to chat with their agent, use single-message mode instead:
|
||||
|
||||
```bash
|
||||
zeroclaw agent -m "the message"
|
||||
```
|
||||
|
||||
Each `-m` invocation is independent (no conversation history between calls). If the user needs multi-turn conversation, let them know they can run `zeroclaw agent` directly in their terminal, or use the WebSocket endpoint for programmatic streaming.
|
||||
|
||||
## First-Time Setup
|
||||
|
||||
If the user hasn't set up ZeroClaw yet (no `~/.zeroclaw/config.toml` exists), guide them through onboarding:
|
||||
|
||||
```bash
|
||||
zeroclaw onboard # Quick mode — defaults to OpenRouter
|
||||
zeroclaw onboard --provider anthropic # Use Anthropic directly
|
||||
zeroclaw onboard # Guided wizard (default)
|
||||
```
|
||||
|
||||
After onboarding, verify everything works:
|
||||
```bash
|
||||
zeroclaw status
|
||||
zeroclaw doctor
|
||||
```
|
||||
|
||||
If they already have a config but something is broken, `zeroclaw onboard --channels-only` repairs just the channel configuration without overwriting everything else.
|
||||
|
||||
## Building from Source
|
||||
|
||||
If the user wants to build ZeroClaw (or no binary is installed):
|
||||
|
||||
```bash
|
||||
cargo build --release
|
||||
```
|
||||
|
||||
This produces `target/release/zeroclaw`. For faster iteration during development, `cargo build` (debug mode) is quicker but produces a slower binary at `target/debug/zeroclaw`.
|
||||
|
||||
You can also run directly without a separate build step:
|
||||
```bash
|
||||
cargo run --release -- <subcommand> [args]
|
||||
```
|
||||
|
||||
Before building, `cargo check` gives a quick compile validation without the full build.
|
||||
|
||||
## Choosing CLI vs REST
|
||||
|
||||
Both surfaces can do most things. Rules of thumb:
|
||||
|
||||
- **CLI is simpler** for one-off operations from the terminal. It handles auth internally and formats output nicely. Prefer CLI when the user is working locally.
|
||||
- **REST is needed** when the user is building an integration, scripting from another language, or accessing a remote ZeroClaw instance. Also needed for streaming (WebSocket, SSE).
|
||||
- If unclear, **default to CLI** — it's less setup.
|
||||
|
||||
## Core Operations
|
||||
|
||||
### Sending Messages
|
||||
|
||||
**CLI:** `zeroclaw agent -m "your message here"` — remember, always use `-m` mode, not bare `zeroclaw agent`.
|
||||
|
||||
**REST:**
|
||||
```bash
|
||||
curl -X POST http://127.0.0.1:42617/webhook \
|
||||
-H "Authorization: Bearer <token>" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"message": "your message here"}'
|
||||
```
|
||||
Response: `{"response": "...", "model": "..."}`
|
||||
|
||||
**WebSocket** (for streaming): connect to `ws://127.0.0.1:42617/ws/chat?token=<token>`, send `{"type": "message", "content": "..."}`, receive `{"type": "done", "full_response": "..."}`.
|
||||
|
||||
### System Status
|
||||
|
||||
Run `zeroclaw status` to see provider, model, uptime, channels, memory backend. For deeper diagnostics: `zeroclaw doctor`.
|
||||
|
||||
**REST:** `GET /api/status` (same info as JSON), `GET /health` (no auth, quick ok/not-ok).
|
||||
|
||||
### Memory
|
||||
|
||||
The CLI can list, get, and clear memories but **cannot store** them directly. To store a memory:
|
||||
- Via agent: `zeroclaw agent -m "remember that my favorite color is blue"`
|
||||
- Via REST: `POST /api/memory` with `{"key": "...", "content": "...", "category": "core"}`
|
||||
|
||||
**CLI (read/delete):**
|
||||
- `zeroclaw memory list` — list all entries
|
||||
- `zeroclaw memory list --category core --limit 10` — filtered
|
||||
- `zeroclaw memory get "key-name"` — get specific entry
|
||||
- `zeroclaw memory stats` — usage statistics
|
||||
- `zeroclaw memory clear --key "prefix" --yes` — delete entries (confirm with user first)
|
||||
|
||||
**REST (full CRUD):**
|
||||
- `GET /api/memory` — list all (optional: `?query=search+text&category=core`)
|
||||
- `POST /api/memory` — store: `{"key": "...", "content": "...", "category": "core"}`
|
||||
- `DELETE /api/memory/{key}` — delete entry
|
||||
|
||||
Categories: `core`, `daily`, `conversation`, or any custom string.
|
||||
|
||||
### Cron / Scheduling
|
||||
|
||||
**CLI:**
|
||||
- `zeroclaw cron list` — show all jobs
|
||||
- `zeroclaw cron add '0 9 * * 1-5' 'Good morning' --tz America/New_York` — recurring
|
||||
- `zeroclaw cron add-at '2026-03-11T10:00:00Z' 'Remind me'` — one-time at specific time
|
||||
- `zeroclaw cron add-every 3600000 'Check health'` — interval in ms
|
||||
- `zeroclaw cron once 30m 'Follow up'` — delay from now
|
||||
- `zeroclaw cron pause <id>` / `zeroclaw cron resume <id>` / `zeroclaw cron remove <id>`
|
||||
|
||||
**REST:**
|
||||
- `GET /api/cron` — list jobs
|
||||
- `POST /api/cron` — add: `{"name": "...", "schedule": "0 9 * * *", "command": "..."}`
|
||||
- `DELETE /api/cron/{id}` — remove job
|
||||
|
||||
### Tools
|
||||
|
||||
Tools are used automatically by the agent during conversations (shell, file ops, memory, browser, HTTP, web search, git, etc. — 30+ tools gated by security policy).
|
||||
|
||||
To see what's available: `GET /api/tools` (REST) lists all registered tools with descriptions and parameter schemas.
|
||||
|
||||
### Configuration
|
||||
|
||||
Edit `~/.zeroclaw/config.toml` directly, or re-run `zeroclaw onboard` to reconfigure.
|
||||
|
||||
**REST:**
|
||||
- `GET /api/config` — get current config (secrets masked as `***MASKED***`)
|
||||
- `PUT /api/config` — update config (send raw TOML as body, 1MB limit)
|
||||
|
||||
### Providers & Models
|
||||
|
||||
- `zeroclaw providers` — list all supported providers
|
||||
- `zeroclaw models list` — cached model catalog
|
||||
- `zeroclaw models refresh --all` — refresh from providers
|
||||
- `zeroclaw models set anthropic/claude-sonnet-4-6` — set default model
|
||||
|
||||
Override per-message: `zeroclaw agent -p anthropic --model claude-sonnet-4-6 -m "hello"`
|
||||
|
||||
### Real-Time Events (SSE)
|
||||
|
||||
REST only — useful for building dashboards or monitoring:
|
||||
```bash
|
||||
curl -N -H "Authorization: Bearer <token>" http://127.0.0.1:42617/api/events
|
||||
```
|
||||
Streams JSON events: `llm_request`, `tool_call_start`, `tool_call`, `agent_start`, `agent_end`, `error`.
|
||||
|
||||
### Cost Tracking
|
||||
|
||||
`GET /api/cost` — returns session/daily/monthly costs, token counts, per-model breakdown.
|
||||
|
||||
### Emergency Stop
|
||||
|
||||
Confirm with the user before running any estop command — these are disruptive.
|
||||
|
||||
- `zeroclaw estop --level kill-all` — stop everything
|
||||
- `zeroclaw estop --level network-kill` — block all network
|
||||
- `zeroclaw estop --level tool-freeze --tool shell` — freeze specific tool
|
||||
- `zeroclaw estop status` — check current estop state
|
||||
- `zeroclaw estop resume --network` — resume
|
||||
|
||||
### Gateway Lifecycle
|
||||
|
||||
- `zeroclaw gateway` — start HTTP gateway (foreground)
|
||||
- `zeroclaw gateway -p 8080 --host 127.0.0.1` — custom bind
|
||||
- `zeroclaw daemon` — start gateway + channels + scheduler + heartbeat
|
||||
- `zeroclaw service install/start/stop/status/uninstall` — OS service management
|
||||
|
||||
### Channels
|
||||
|
||||
ZeroClaw supports 21 messaging channels. To add one, you need to edit `~/.zeroclaw/config.toml`. For example, to set up Telegram:
|
||||
|
||||
```toml
|
||||
[channels]
|
||||
telegram = true
|
||||
|
||||
[channels_config.telegram]
|
||||
bot_token = "your-bot-token-from-botfather"
|
||||
allowed_users = [123456789]
|
||||
```
|
||||
|
||||
Then restart the daemon. Check channel health with `zeroclaw channels doctor`.
|
||||
|
||||
For the full list of channels and their config fields, read `references/cli-reference.md` (Channels section).
|
||||
|
||||
### Pairing (Authentication Setup)
|
||||
|
||||
When `require_pairing = true` (default), REST clients need a bearer token:
|
||||
```bash
|
||||
curl -X POST http://127.0.0.1:42617/pair -H "X-Pairing-Code: <code>"
|
||||
```
|
||||
Response includes `{"token": "..."}` — save this for subsequent requests.
|
||||
|
||||
## Common Workflows
|
||||
|
||||
Here are multi-step sequences you're likely to need:
|
||||
|
||||
**"Is my agent healthy?"**
|
||||
1. Run `zeroclaw status` — check provider, model, channels
|
||||
2. Run `zeroclaw doctor` — check connectivity, diagnose issues
|
||||
3. If gateway needed: `curl -sf http://127.0.0.1:42617/health`
|
||||
|
||||
**"Set up a new channel"**
|
||||
1. Read the current config: `cat ~/.zeroclaw/config.toml`
|
||||
2. Add the channel config (edit the TOML)
|
||||
3. Restart: `zeroclaw service restart` (or restart daemon manually)
|
||||
4. Verify: `zeroclaw channels doctor`
|
||||
|
||||
**"Switch to a different model"**
|
||||
1. Check available: `zeroclaw models list`
|
||||
2. Set it: `zeroclaw models set <provider/model>`
|
||||
3. Verify: `zeroclaw status`
|
||||
4. Test: `zeroclaw agent -m "hello, what model are you?"`
|
||||
|
||||
## Gateway Defaults
|
||||
|
||||
- **Port:** 42617
|
||||
- **Host:** 127.0.0.1
|
||||
- **Auth:** Pairing required (bearer token)
|
||||
- **Rate limits:** 60 webhook requests/min, 10 pairing attempts/min
|
||||
- **Body limit:** 64KB (1MB for config updates)
|
||||
- **Timeout:** 30 seconds
|
||||
- **Idempotency:** Optional `X-Idempotency-Key` header on `/webhook` (300s TTL)
|
||||
- **Config location:** `~/.zeroclaw/config.toml`
|
||||
|
||||
## Reference Files
|
||||
|
||||
For the complete API specification with every endpoint, field, and edge case, read `references/rest-api.md`.
|
||||
|
||||
For the full CLI command tree with all flags and options, read `references/cli-reference.md`.
|
||||
|
||||
Only load these when you need precise details beyond what's in this file — for most operations, the quick references above are sufficient.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
**"zeroclaw: command not found"** — Binary not in PATH. Check `./target/release/zeroclaw`, `~/.cargo/bin/zeroclaw`, or build from source with `cargo build --release`.
|
||||
|
||||
**"Connection refused" on REST calls** — Gateway isn't running. Start it with `zeroclaw gateway` or `zeroclaw daemon`.
|
||||
|
||||
**"Unauthorized" (401/403)** — Bearer token is missing or invalid. Re-pair via `POST /pair` with the pairing code, or check `~/.zeroclaw/config.toml` for the stored token.
|
||||
|
||||
**"LLM request failed" (500)** — Provider issue. Run `zeroclaw doctor` to check connectivity. Common causes: expired API key, provider outage, rate limiting on the provider side.
|
||||
|
||||
**"Too many requests" (429)** — You're hitting ZeroClaw's rate limit. Back off — the response includes `retry_after` with the number of seconds to wait.
|
||||
|
||||
**Agent not using tools / acting limited** — Check autonomy settings in config.toml under `[autonomy]`. `level = "read_only"` disables most tools. Try `level = "supervised"` or `level = "full"`.
|
||||
|
||||
**Memory not persisting** — Check `[memory]` config. If `backend = "none"`, nothing is stored. Switch to `"sqlite"` or `"markdown"`. Also verify `auto_save = true`.
|
||||
|
||||
**Channel not responding** — Run `zeroclaw channels doctor` for the specific channel. Common issues: expired bot token, wrong allowed_users list, channel not enabled in `[channels]`.
|
||||
|
||||
Report errors to the user with context appropriate to their expertise level. For beginners, explain what went wrong and suggest the fix. For experts, just show the error and the fix.
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"skill_name": "zeroclaw",
|
||||
"evals": [
|
||||
{
|
||||
"id": 0,
|
||||
"prompt": "how do i make my bot remember my name",
|
||||
"expected_output": "Executes a zeroclaw command to store a memory, explains what happened in beginner-friendly language",
|
||||
"files": []
|
||||
},
|
||||
{
|
||||
"id": 1,
|
||||
"prompt": "I want to schedule a daily health check on my ZeroClaw instance every morning at 9am ET",
|
||||
"expected_output": "Executes zeroclaw cron add with correct cron expression and timezone flag",
|
||||
"files": []
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"prompt": "Set up a Python script that monitors my ZeroClaw agent's activity via SSE and logs tool calls to a file",
|
||||
"expected_output": "Writes a Python script that connects to /api/events SSE endpoint with auth, filters for tool_call events, and logs to a file",
|
||||
"files": []
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,277 @@
|
||||
# ZeroClaw CLI Reference
|
||||
|
||||
Complete command reference for the `zeroclaw` binary.
|
||||
|
||||
## Table of Contents
|
||||
|
||||
1. [Agent](#agent)
|
||||
2. [Onboarding](#onboarding)
|
||||
3. [Status & Diagnostics](#status--diagnostics)
|
||||
4. [Memory](#memory)
|
||||
5. [Cron](#cron)
|
||||
6. [Providers & Models](#providers--models)
|
||||
7. [Gateway & Daemon](#gateway--daemon)
|
||||
8. [Service Management](#service-management)
|
||||
9. [Channels](#channels)
|
||||
10. [Security & Emergency Stop](#security--emergency-stop)
|
||||
11. [Hardware Peripherals](#hardware-peripherals)
|
||||
12. [Skills](#skills)
|
||||
13. [Shell Completions](#shell-completions)
|
||||
|
||||
---
|
||||
|
||||
## Agent
|
||||
|
||||
Interactive chat or single-message mode.
|
||||
|
||||
```bash
|
||||
zeroclaw agent # Interactive REPL
|
||||
zeroclaw agent -m "Summarize today's logs" # Single message
|
||||
zeroclaw agent -p anthropic --model claude-sonnet-4-6 # Override provider/model
|
||||
zeroclaw agent -t 0.3 # Set temperature
|
||||
zeroclaw agent --peripheral nucleo-f401re:/dev/ttyACM0 # Attach hardware
|
||||
```
|
||||
|
||||
**Key flags:**
|
||||
- `-m <message>` — single message mode (no REPL)
|
||||
- `-p <provider>` — override provider (openrouter, anthropic, openai, ollama)
|
||||
- `--model <model>` — override model
|
||||
- `-t <float>` — temperature (0.0–2.0)
|
||||
- `--peripheral <name>:<port>` — attach hardware peripheral
|
||||
|
||||
The agent has access to 30+ tools gated by security policy: shell, file_read, file_write, file_edit, glob_search, content_search, memory_store, memory_recall, memory_forget, browser, http_request, web_fetch, web_search, cron, delegate, git, and more. Max tool iterations defaults to 10.
|
||||
|
||||
---
|
||||
|
||||
## Onboarding
|
||||
|
||||
First-time setup or reconfiguration.
|
||||
|
||||
```bash
|
||||
zeroclaw onboard # Quick mode (default: openrouter)
|
||||
zeroclaw onboard --provider anthropic # Quick mode with specific provider
|
||||
zeroclaw onboard # Guided wizard (default)
|
||||
zeroclaw onboard --memory sqlite # Set memory backend
|
||||
zeroclaw onboard --force # Overwrite existing config
|
||||
zeroclaw onboard --channels-only # Repair channels only
|
||||
```
|
||||
|
||||
**Key flags:**
|
||||
- `--provider <name>` — openrouter (default), anthropic, openai, ollama
|
||||
- `--model <model>` — default model
|
||||
- `--memory <backend>` — sqlite, markdown, lucid, none
|
||||
- `--force` — overwrite existing config.toml
|
||||
- `--channels-only` — only repair channel configuration
|
||||
- `--reinit` — start fresh (backs up existing config)
|
||||
|
||||
Creates `~/.zeroclaw/config.toml` with `0600` permissions.
|
||||
|
||||
---
|
||||
|
||||
## Status & Diagnostics
|
||||
|
||||
```bash
|
||||
zeroclaw status # System overview
|
||||
zeroclaw doctor # Run all diagnostic checks
|
||||
zeroclaw doctor models # Probe model connectivity
|
||||
zeroclaw doctor traces # Query execution traces
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Memory
|
||||
|
||||
```bash
|
||||
zeroclaw memory list # List all entries
|
||||
zeroclaw memory list --category core --limit 10 # Filtered list
|
||||
zeroclaw memory get "some-key" # Get specific entry
|
||||
zeroclaw memory stats # Usage statistics
|
||||
zeroclaw memory clear --key "prefix" --yes # Delete entries (requires --yes)
|
||||
```
|
||||
|
||||
**Key flags:**
|
||||
- `--category <name>` — filter by category (core, daily, conversation, custom)
|
||||
- `--limit <n>` — limit results
|
||||
- `--key <prefix>` — key prefix for clear operations
|
||||
- `--yes` — skip confirmation (required for clear)
|
||||
|
||||
---
|
||||
|
||||
## Cron
|
||||
|
||||
```bash
|
||||
zeroclaw cron list # List all jobs
|
||||
zeroclaw cron add '0 9 * * 1-5' 'Good morning' --tz America/New_York # Recurring (cron expr)
|
||||
zeroclaw cron add-at '2026-03-11T10:00:00Z' 'Remind me about meeting' # One-time at specific time
|
||||
zeroclaw cron add-every 3600000 'Check server health' # Interval in milliseconds
|
||||
zeroclaw cron once 30m 'Follow up on that task' # Delay from now
|
||||
zeroclaw cron pause <id> # Pause job
|
||||
zeroclaw cron resume <id> # Resume job
|
||||
zeroclaw cron remove <id> # Delete job
|
||||
```
|
||||
|
||||
**Subcommands:**
|
||||
- `add <cron-expr> <command>` — standard cron expression (5-field)
|
||||
- `add-at <iso-datetime> <command>` — fire once at exact time
|
||||
- `add-every <ms> <command>` — repeating interval
|
||||
- `once <duration> <command>` — delay from now (e.g., `30m`, `2h`, `1d`)
|
||||
|
||||
---
|
||||
|
||||
## Providers & Models
|
||||
|
||||
```bash
|
||||
zeroclaw providers # List all 40+ supported providers
|
||||
zeroclaw models list # Show cached model catalog
|
||||
zeroclaw models refresh --all # Refresh catalogs from all providers
|
||||
zeroclaw models set anthropic/claude-sonnet-4-6 # Set default model
|
||||
zeroclaw models status # Current model info
|
||||
```
|
||||
|
||||
Model routing in config.toml:
|
||||
```toml
|
||||
[[model_routes]]
|
||||
hint = "reasoning"
|
||||
provider = "openrouter"
|
||||
model = "anthropic/claude-sonnet-4-6"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Gateway & Daemon
|
||||
|
||||
```bash
|
||||
zeroclaw gateway # Start HTTP gateway (foreground)
|
||||
zeroclaw gateway -p 8080 --host 127.0.0.1 # Custom port/host
|
||||
|
||||
zeroclaw daemon # Gateway + channels + scheduler + heartbeat
|
||||
zeroclaw daemon -p 8080 --host 0.0.0.0 # Custom bind
|
||||
```
|
||||
|
||||
**Gateway defaults:**
|
||||
- Port: 42617
|
||||
- Host: 127.0.0.1
|
||||
- Pairing required: true
|
||||
- Public bind allowed: false
|
||||
|
||||
---
|
||||
|
||||
## Service Management
|
||||
|
||||
OS service lifecycle (systemd on Linux, launchd on macOS).
|
||||
|
||||
```bash
|
||||
zeroclaw service install # Install as system service
|
||||
zeroclaw service start # Start the service
|
||||
zeroclaw service status # Check service status
|
||||
zeroclaw service stop # Stop the service
|
||||
zeroclaw service restart # Restart the service
|
||||
zeroclaw service uninstall # Remove the service
|
||||
```
|
||||
|
||||
**Logs:**
|
||||
- macOS: `~/.zeroclaw/logs/daemon.stdout.log`
|
||||
- Linux: `journalctl -u zeroclaw`
|
||||
|
||||
---
|
||||
|
||||
## Channels
|
||||
|
||||
Channels are configured in `config.toml` under `[channels]` and `[channels_config.*]`.
|
||||
|
||||
```bash
|
||||
zeroclaw channels list # List configured channels
|
||||
zeroclaw channels doctor # Check channel health
|
||||
```
|
||||
|
||||
Supported channels (21 total): Telegram, Discord, Slack, WhatsApp (Meta), WATI, Linq (iMessage/RCS/SMS), Email (IMAP/SMTP), IRC, Matrix, Nostr, Signal, Nextcloud Talk, and more.
|
||||
|
||||
Channel config example (Telegram):
|
||||
```toml
|
||||
[channels]
|
||||
telegram = true
|
||||
|
||||
[channels_config.telegram]
|
||||
bot_token = "..."
|
||||
allowed_users = [123456789]
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Security & Emergency Stop
|
||||
|
||||
```bash
|
||||
zeroclaw estop --level kill-all # Stop everything
|
||||
zeroclaw estop --level network-kill # Block all network access
|
||||
zeroclaw estop --level domain-block --domain "*.example.com" # Block specific domains
|
||||
zeroclaw estop --level tool-freeze --tool shell # Freeze specific tool
|
||||
zeroclaw estop status # Check estop state
|
||||
zeroclaw estop resume --network # Resume (may require OTP)
|
||||
```
|
||||
|
||||
**Estop levels:**
|
||||
- `kill-all` — nuclear option, stops all agent activity
|
||||
- `network-kill` — blocks all outbound network
|
||||
- `domain-block` — blocks specific domain patterns
|
||||
- `tool-freeze` — freezes individual tools
|
||||
|
||||
Autonomy config in config.toml:
|
||||
```toml
|
||||
[autonomy]
|
||||
level = "supervised" # read_only | supervised | full
|
||||
workspace_only = true
|
||||
allowed_commands = ["git", "cargo", "python"]
|
||||
forbidden_paths = ["/etc", "/root", "~/.ssh"]
|
||||
max_actions_per_hour = 20
|
||||
max_cost_per_day_cents = 500
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Hardware Peripherals
|
||||
|
||||
```bash
|
||||
zeroclaw hardware discover # Find USB devices
|
||||
zeroclaw hardware introspect /dev/ttyACM0 # Probe device capabilities
|
||||
zeroclaw peripheral list # List configured peripherals
|
||||
zeroclaw peripheral add nucleo-f401re /dev/ttyACM0 # Add peripheral
|
||||
zeroclaw peripheral flash-nucleo # Flash STM32 firmware
|
||||
zeroclaw peripheral flash --port /dev/cu.usbmodem101 # Flash Arduino firmware
|
||||
```
|
||||
|
||||
**Supported boards:** STM32 Nucleo-F401RE, Arduino Uno R4, Raspberry Pi GPIO, ESP32.
|
||||
|
||||
Attach to agent session: `zeroclaw agent --peripheral nucleo-f401re:/dev/ttyACM0`
|
||||
|
||||
---
|
||||
|
||||
## Skills
|
||||
|
||||
```bash
|
||||
zeroclaw skills list # List installed skills
|
||||
zeroclaw skills install <path-or-url> # Install a skill
|
||||
zeroclaw skills audit # Audit installed skills
|
||||
zeroclaw skills remove <name> # Remove a skill
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Shell Completions
|
||||
|
||||
```bash
|
||||
zeroclaw completions zsh # Generate Zsh completions
|
||||
zeroclaw completions bash # Generate Bash completions
|
||||
zeroclaw completions fish # Generate Fish completions
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Config File
|
||||
|
||||
Default location: `~/.zeroclaw/config.toml`
|
||||
|
||||
Config resolution order (first match wins):
|
||||
1. `ZEROCLAW_CONFIG_DIR` environment variable
|
||||
2. `ZEROCLAW_WORKSPACE` environment variable
|
||||
3. `~/.zeroclaw/active_workspace.toml` marker file
|
||||
4. `~/.zeroclaw/config.toml` (default)
|
||||
@@ -0,0 +1,505 @@
|
||||
# ZeroClaw REST API Reference
|
||||
|
||||
Complete endpoint reference for the ZeroClaw gateway HTTP API.
|
||||
|
||||
## Table of Contents
|
||||
|
||||
1. [Authentication](#authentication)
|
||||
2. [Public Endpoints](#public-endpoints)
|
||||
3. [Webhook](#webhook)
|
||||
4. [WebSocket Chat](#websocket-chat)
|
||||
5. [Status & Health](#status--health)
|
||||
6. [Memory](#memory)
|
||||
7. [Cron](#cron)
|
||||
8. [Tools](#tools)
|
||||
9. [Configuration](#configuration)
|
||||
10. [Integrations](#integrations)
|
||||
11. [Cost](#cost)
|
||||
12. [Events (SSE)](#events-sse)
|
||||
13. [Channel Webhooks](#channel-webhooks)
|
||||
14. [Rate Limiting](#rate-limiting)
|
||||
15. [Error Responses](#error-responses)
|
||||
|
||||
---
|
||||
|
||||
## Authentication
|
||||
|
||||
Three authentication mechanisms:
|
||||
|
||||
### Bearer Token (Primary)
|
||||
```
|
||||
Authorization: Bearer <token>
|
||||
```
|
||||
Obtained via `POST /pair`. Required for all `/api/*` endpoints when `require_pairing = true` (default).
|
||||
|
||||
### Webhook Secret
|
||||
```
|
||||
X-Webhook-Secret: <raw_secret>
|
||||
```
|
||||
Optional additional auth for `/webhook`. Server SHA-256 hashes and compares using constant-time comparison.
|
||||
|
||||
### WebSocket Token
|
||||
```
|
||||
ws://host:port/ws/chat?token=<bearer_token>
|
||||
```
|
||||
WebSocket connections pass the token as a query parameter (browsers can't set custom headers on WS handshake).
|
||||
|
||||
---
|
||||
|
||||
## Public Endpoints
|
||||
|
||||
### GET /health
|
||||
No authentication required.
|
||||
|
||||
**Response 200:**
|
||||
```json
|
||||
{
|
||||
"status": "ok",
|
||||
"paired": true,
|
||||
"require_pairing": true,
|
||||
"runtime": {}
|
||||
}
|
||||
```
|
||||
|
||||
### GET /metrics
|
||||
Prometheus text exposition format.
|
||||
|
||||
**Response 200:**
|
||||
```
|
||||
Content-Type: text/plain; version=0.0.4; charset=utf-8
|
||||
```
|
||||
|
||||
### POST /pair
|
||||
Exchange a one-time pairing code for a bearer token.
|
||||
|
||||
**Rate Limit:** Configurable per-minute limit per IP (default: 10/min).
|
||||
|
||||
**Headers:**
|
||||
- `X-Pairing-Code: <code>` (required)
|
||||
|
||||
**Response 200 (success):**
|
||||
```json
|
||||
{
|
||||
"paired": true,
|
||||
"persisted": true,
|
||||
"token": "<bearer_token>",
|
||||
"message": "Save this token — use it as Authorization: Bearer <token>"
|
||||
}
|
||||
```
|
||||
|
||||
**Response 200 (persistence failure):**
|
||||
```json
|
||||
{
|
||||
"paired": true,
|
||||
"persisted": false,
|
||||
"token": "<bearer_token>",
|
||||
"message": "Paired for this process, but failed to persist token to config.toml..."
|
||||
}
|
||||
```
|
||||
|
||||
**Response 403:**
|
||||
```json
|
||||
{"error": "Invalid pairing code"}
|
||||
```
|
||||
|
||||
**Response 429:**
|
||||
```json
|
||||
{"error": "Too many pairing requests. Please retry later.", "retry_after": 60}
|
||||
```
|
||||
|
||||
**Response 429 (lockout):**
|
||||
```json
|
||||
{"error": "Too many failed attempts. Try again in {lockout_secs}s.", "retry_after": 120}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Webhook
|
||||
|
||||
### POST /webhook
|
||||
Send a message to the agent and receive a response.
|
||||
|
||||
**Rate Limit:** Configurable per-minute limit per IP (default: 60/min).
|
||||
|
||||
**Headers:**
|
||||
- `Authorization: Bearer <token>` (if pairing enabled)
|
||||
- `Content-Type: application/json`
|
||||
- `X-Webhook-Secret: <secret>` (optional)
|
||||
- `X-Idempotency-Key: <uuid>` (optional)
|
||||
|
||||
**Request Body:**
|
||||
```json
|
||||
{"message": "your prompt here"}
|
||||
```
|
||||
|
||||
**Response 200:**
|
||||
```json
|
||||
{"response": "<llm_response>", "model": "<model_name>"}
|
||||
```
|
||||
|
||||
**Response 200 (duplicate — idempotency key match):**
|
||||
```json
|
||||
{"status": "duplicate", "idempotent": true, "message": "Request already processed for this idempotency key"}
|
||||
```
|
||||
|
||||
**Response 401:**
|
||||
```json
|
||||
{"error": "Unauthorized — pair first via POST /pair, then send Authorization: Bearer <token>"}
|
||||
```
|
||||
|
||||
**Response 429:**
|
||||
```json
|
||||
{"error": "Too many webhook requests. Please retry later.", "retry_after": 60}
|
||||
```
|
||||
|
||||
**Response 500:**
|
||||
```json
|
||||
{"error": "LLM request failed"}
|
||||
```
|
||||
|
||||
### Idempotency
|
||||
- Header: `X-Idempotency-Key: <uuid>`
|
||||
- TTL: configurable, default 300 seconds
|
||||
- Max tracked keys: configurable, default 10,000
|
||||
- Duplicate requests within TTL return `"status": "duplicate"` instead of re-processing
|
||||
|
||||
---
|
||||
|
||||
## WebSocket Chat
|
||||
|
||||
### GET /ws/chat?token=<bearer_token>
|
||||
Streaming agent chat over WebSocket.
|
||||
|
||||
**Client → Server:**
|
||||
```json
|
||||
{"type": "message", "content": "Hello, what's the weather?"}
|
||||
```
|
||||
|
||||
**Server → Client (complete response):**
|
||||
```json
|
||||
{"type": "done", "full_response": "The weather in San Francisco is sunny..."}
|
||||
```
|
||||
|
||||
**Server → Client (error):**
|
||||
```json
|
||||
{"type": "error", "message": "Error message here"}
|
||||
```
|
||||
|
||||
Ignore unknown message types. Invalid JSON triggers an error response.
|
||||
|
||||
---
|
||||
|
||||
## Status & Health
|
||||
|
||||
### GET /api/status
|
||||
**Response 200:**
|
||||
```json
|
||||
{
|
||||
"provider": "openrouter",
|
||||
"model": "anthropic/claude-sonnet-4",
|
||||
"temperature": 0.7,
|
||||
"uptime_seconds": 3600,
|
||||
"gateway_port": 42617,
|
||||
"locale": "en",
|
||||
"memory_backend": "sqlite",
|
||||
"paired": true,
|
||||
"channels": {
|
||||
"telegram": false,
|
||||
"discord": true,
|
||||
"slack": false
|
||||
},
|
||||
"health": {}
|
||||
}
|
||||
```
|
||||
|
||||
### GET /api/health
|
||||
Component health snapshot (requires auth).
|
||||
```json
|
||||
{"health": {}}
|
||||
```
|
||||
|
||||
### GET or POST /api/doctor
|
||||
Run system diagnostics.
|
||||
```json
|
||||
{
|
||||
"results": [
|
||||
{"name": "provider_connectivity", "severity": "ok", "message": "OpenRouter API reachable"}
|
||||
],
|
||||
"summary": {"ok": 5, "warnings": 1, "errors": 0}
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Memory
|
||||
|
||||
### GET /api/memory
|
||||
List or search memory entries.
|
||||
|
||||
**Query Parameters:**
|
||||
- `query` (string, optional) — search text; triggers search mode
|
||||
- `category` (string, optional) — filter by category
|
||||
|
||||
**Response 200:**
|
||||
```json
|
||||
{
|
||||
"entries": [
|
||||
{
|
||||
"key": "memory_key",
|
||||
"content": "memory content",
|
||||
"category": "core",
|
||||
"timestamp": "2025-01-10T12:00:00Z"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### POST /api/memory
|
||||
Store a memory entry.
|
||||
|
||||
**Request Body:**
|
||||
```json
|
||||
{
|
||||
"key": "unique_key",
|
||||
"content": "memory content",
|
||||
"category": "core"
|
||||
}
|
||||
```
|
||||
Category defaults to `"core"` if omitted. Other values: `daily`, `conversation`, or any custom string.
|
||||
|
||||
**Response 200:**
|
||||
```json
|
||||
{"status": "ok"}
|
||||
```
|
||||
|
||||
### DELETE /api/memory/{key}
|
||||
Delete a memory entry.
|
||||
|
||||
**Response 200:**
|
||||
```json
|
||||
{"status": "ok", "deleted": true}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Cron
|
||||
|
||||
### GET /api/cron
|
||||
List all scheduled jobs.
|
||||
|
||||
**Response 200:**
|
||||
```json
|
||||
{
|
||||
"jobs": [
|
||||
{
|
||||
"id": "<uuid>",
|
||||
"name": "daily-backup",
|
||||
"command": "backup.sh",
|
||||
"next_run": "2025-01-10T15:00:00Z",
|
||||
"last_run": "2025-01-09T15:00:00Z",
|
||||
"last_status": "success",
|
||||
"enabled": true
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### POST /api/cron
|
||||
Add a new job.
|
||||
|
||||
**Request Body:**
|
||||
```json
|
||||
{
|
||||
"name": "job-name",
|
||||
"schedule": "0 9 * * *",
|
||||
"command": "command to run"
|
||||
}
|
||||
```
|
||||
|
||||
**Response 200:**
|
||||
```json
|
||||
{
|
||||
"status": "ok",
|
||||
"job": {"id": "<uuid>", "name": "job-name", "command": "command to run", "enabled": true}
|
||||
}
|
||||
```
|
||||
|
||||
### DELETE /api/cron/{id}
|
||||
Remove a job.
|
||||
|
||||
**Response 200:**
|
||||
```json
|
||||
{"status": "ok"}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Tools
|
||||
|
||||
### GET /api/tools
|
||||
List all registered tools with descriptions and parameter schemas.
|
||||
|
||||
**Response 200:**
|
||||
```json
|
||||
{
|
||||
"tools": [
|
||||
{"name": "shell", "description": "Execute shell commands", "parameters": {}},
|
||||
{"name": "file_read", "description": "Read file contents", "parameters": {}}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Configuration
|
||||
|
||||
### GET /api/config
|
||||
Get current config. Secrets are masked as `***MASKED***`.
|
||||
|
||||
**Response 200:**
|
||||
```json
|
||||
{"format": "toml", "content": "<toml_string>"}
|
||||
```
|
||||
|
||||
### PUT /api/config
|
||||
Update config from TOML body. Body limit: 1 MB.
|
||||
|
||||
**Request Body:** Raw TOML text.
|
||||
|
||||
**Response 200:**
|
||||
```json
|
||||
{"status": "ok"}
|
||||
```
|
||||
|
||||
**Response 400:**
|
||||
```json
|
||||
{"error": "Invalid TOML: <details>"}
|
||||
```
|
||||
or
|
||||
```json
|
||||
{"error": "Invalid config: <validation_error>"}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Integrations
|
||||
|
||||
### GET /api/integrations
|
||||
List all integrations and their status.
|
||||
|
||||
**Response 200:**
|
||||
```json
|
||||
{
|
||||
"integrations": [
|
||||
{"name": "openrouter", "description": "OpenRouter LLM provider", "category": "providers", "status": "ok"},
|
||||
{"name": "telegram", "description": "Telegram messaging channel", "category": "channels", "status": "configured"}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Cost
|
||||
|
||||
### GET /api/cost
|
||||
Cost tracking summary.
|
||||
|
||||
**Response 200:**
|
||||
```json
|
||||
{
|
||||
"cost": {
|
||||
"session_cost_usd": 1.50,
|
||||
"daily_cost_usd": 5.00,
|
||||
"monthly_cost_usd": 150.00,
|
||||
"total_tokens": 50000,
|
||||
"request_count": 25,
|
||||
"by_model": {"anthropic/claude-sonnet-4": 1.50}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Events (SSE)
|
||||
|
||||
### GET /api/events
|
||||
Server-Sent Events stream. Requires bearer token.
|
||||
|
||||
**Content-Type:** `text/event-stream`
|
||||
|
||||
**Event types:**
|
||||
|
||||
| Type | Fields | Description |
|
||||
|------|--------|-------------|
|
||||
| `llm_request` | provider, model, timestamp | LLM call started |
|
||||
| `tool_call_start` | tool, timestamp | Tool execution started |
|
||||
| `tool_call` | tool, duration_ms, success, timestamp | Tool execution completed |
|
||||
| `agent_start` | provider, model, timestamp | Agent loop started |
|
||||
| `agent_end` | provider, model, duration_ms, tokens_used, cost_usd, timestamp | Agent loop completed |
|
||||
| `error` | component, message, timestamp | Error occurred |
|
||||
|
||||
**Example:**
|
||||
```bash
|
||||
curl -N -H "Authorization: Bearer <token>" http://127.0.0.1:42617/api/events
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Channel Webhooks
|
||||
|
||||
These are incoming webhook endpoints for specific messaging channels. They're set up automatically when channels are configured.
|
||||
|
||||
### WhatsApp (Meta Cloud API)
|
||||
- `GET /whatsapp` — verification (echoes `hub.challenge`)
|
||||
- `POST /whatsapp` — incoming messages (signature verified via `X-Hub-Signature-256`)
|
||||
|
||||
### WATI (WhatsApp Business)
|
||||
- `GET /wati` — verification (echoes `challenge`)
|
||||
- `POST /wati` — incoming messages
|
||||
|
||||
### Linq (iMessage/RCS/SMS)
|
||||
- `POST /linq` — incoming messages (signature verified via `X-Webhook-Signature` + `X-Webhook-Timestamp`)
|
||||
|
||||
### Nextcloud Talk
|
||||
- `POST /nextcloud-talk` — bot API webhook (signature verified via `X-Nextcloud-Talk-Signature`)
|
||||
|
||||
---
|
||||
|
||||
## Rate Limiting
|
||||
|
||||
Sliding window (60-second window), per client IP.
|
||||
|
||||
| Endpoint | Default Limit |
|
||||
|----------|--------------|
|
||||
| `POST /pair` | 10/min |
|
||||
| `POST /webhook` | 60/min |
|
||||
|
||||
If `trust_forwarded_headers` is enabled, uses `X-Forwarded-For` for client IP.
|
||||
|
||||
Max tracked keys: configurable (default: 10,000).
|
||||
|
||||
---
|
||||
|
||||
## Error Responses
|
||||
|
||||
**Standard format:**
|
||||
```json
|
||||
{"error": "Human-readable error message"}
|
||||
```
|
||||
|
||||
**With retry info:**
|
||||
```json
|
||||
{"error": "...", "retry_after": 60}
|
||||
```
|
||||
|
||||
**Status codes:**
|
||||
| Code | Meaning |
|
||||
|------|---------|
|
||||
| 200 | Success |
|
||||
| 400 | Invalid JSON, missing fields, invalid TOML |
|
||||
| 401 | Invalid/missing bearer token or webhook secret |
|
||||
| 403 | Pairing verification failed |
|
||||
| 404 | Endpoint or channel not configured |
|
||||
| 408 | Request timeout (30s) |
|
||||
| 429 | Rate limited (check `retry_after`) |
|
||||
| 500 | LLM error, database error, internal failure |
|
||||
@@ -1,25 +1,3 @@
|
||||
# EditorConfig — https://editorconfig.org
|
||||
# Provides consistent formatting defaults across editors and platforms.
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
|
||||
[*.md]
|
||||
# Trailing whitespace is significant in Markdown (line breaks).
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[*.{yml,yaml}]
|
||||
indent_size = 2
|
||||
|
||||
[*.toml]
|
||||
indent_size = 2
|
||||
|
||||
[Dockerfile]
|
||||
indent_size = 4
|
||||
|
||||
@@ -59,6 +59,7 @@ PROVIDER=openrouter
|
||||
# ZAI_API_KEY=...
|
||||
# SYNTHETIC_API_KEY=...
|
||||
# OPENCODE_API_KEY=...
|
||||
# OPENCODE_GO_API_KEY=...
|
||||
# VERCEL_API_KEY=...
|
||||
# CLOUDFLARE_API_KEY=...
|
||||
|
||||
|
||||
@@ -1,33 +1 @@
|
||||
# Normalize all text files
|
||||
* text=auto
|
||||
|
||||
# Force LF for scripts and build-critical files
|
||||
*.sh text eol=lf
|
||||
Dockerfile* text eol=lf
|
||||
*.rs text eol=lf
|
||||
*.toml text eol=lf
|
||||
*.yml text eol=lf
|
||||
*.yaml text eol=lf
|
||||
|
||||
# CI
|
||||
.github/**/* text eol=lf
|
||||
|
||||
# Images
|
||||
*.png binary
|
||||
*.jpg binary
|
||||
*.jpeg binary
|
||||
*.gif binary
|
||||
*.ico binary
|
||||
|
||||
# Archives
|
||||
*.zip binary
|
||||
*.tar binary
|
||||
*.tgz binary
|
||||
*.gz binary
|
||||
*.7z binary
|
||||
|
||||
# Compiled artifacts
|
||||
*.so binary
|
||||
*.dll binary
|
||||
*.exe binary
|
||||
*.a binary
|
||||
|
||||
+25
-25
@@ -1,32 +1,32 @@
|
||||
# Default owner for all files
|
||||
* @jordanthejet
|
||||
* @theonlyhennygod @JordanTheJet @SimianAstronaut7
|
||||
|
||||
# Important functional modules
|
||||
/src/agent/** @theonlyhennygod
|
||||
/src/providers/** @theonlyhennygod
|
||||
/src/channels/** @theonlyhennygod
|
||||
/src/tools/** @theonlyhennygod
|
||||
/src/gateway/** @theonlyhennygod
|
||||
/src/runtime/** @theonlyhennygod
|
||||
/src/memory/** @theonlyhennygod
|
||||
/Cargo.toml @theonlyhennygod
|
||||
/Cargo.lock @theonlyhennygod
|
||||
/src/agent/** @theonlyhennygod @JordanTheJet @SimianAstronaut7
|
||||
/src/providers/** @theonlyhennygod @JordanTheJet @SimianAstronaut7
|
||||
/src/channels/** @theonlyhennygod @JordanTheJet @SimianAstronaut7
|
||||
/src/tools/** @theonlyhennygod @JordanTheJet @SimianAstronaut7
|
||||
/src/gateway/** @theonlyhennygod @JordanTheJet @SimianAstronaut7
|
||||
/src/runtime/** @theonlyhennygod @JordanTheJet @SimianAstronaut7
|
||||
/src/memory/** @theonlyhennygod @JordanTheJet @SimianAstronaut7
|
||||
/Cargo.toml @theonlyhennygod @JordanTheJet @SimianAstronaut7
|
||||
/Cargo.lock @theonlyhennygod @JordanTheJet @SimianAstronaut7
|
||||
|
||||
# Security / tests / CI-CD ownership
|
||||
/src/security/** @jordanthejet
|
||||
/tests/** @jordanthejet
|
||||
/.github/** @jordanthejet
|
||||
/.github/workflows/** @jordanthejet
|
||||
/.github/codeql/** @jordanthejet
|
||||
/.github/dependabot.yml @jordanthejet
|
||||
/SECURITY.md @jordanthejet
|
||||
/docs/actions-source-policy.md @jordanthejet
|
||||
/docs/ci-map.md @jordanthejet
|
||||
/src/security/** @theonlyhennygod @JordanTheJet @SimianAstronaut7
|
||||
/tests/** @theonlyhennygod @JordanTheJet @SimianAstronaut7
|
||||
/.github/** @theonlyhennygod @JordanTheJet @SimianAstronaut7
|
||||
/.github/workflows/** @theonlyhennygod @JordanTheJet @SimianAstronaut7
|
||||
/.github/codeql/** @theonlyhennygod @JordanTheJet @SimianAstronaut7
|
||||
/.github/dependabot.yml @theonlyhennygod @JordanTheJet @SimianAstronaut7
|
||||
/SECURITY.md @theonlyhennygod @JordanTheJet @SimianAstronaut7
|
||||
/docs/actions-source-policy.md @theonlyhennygod @JordanTheJet @SimianAstronaut7
|
||||
/docs/ci-map.md @theonlyhennygod @JordanTheJet @SimianAstronaut7
|
||||
|
||||
# Docs & governance
|
||||
/docs/** @jordanthejet
|
||||
/AGENTS.md @jordanthejet
|
||||
/CLAUDE.md @jordanthejet
|
||||
/CONTRIBUTING.md @jordanthejet
|
||||
/docs/pr-workflow.md @jordanthejet
|
||||
/docs/reviewer-playbook.md @jordanthejet
|
||||
/docs/** @theonlyhennygod @JordanTheJet @SimianAstronaut7
|
||||
/AGENTS.md @theonlyhennygod @JordanTheJet @SimianAstronaut7
|
||||
/CLAUDE.md @theonlyhennygod @JordanTheJet @SimianAstronaut7
|
||||
/CONTRIBUTING.md @theonlyhennygod @JordanTheJet @SimianAstronaut7
|
||||
/docs/pr-workflow.md @theonlyhennygod @JordanTheJet @SimianAstronaut7
|
||||
/docs/reviewer-playbook.md @theonlyhennygod @JordanTheJet @SimianAstronaut7
|
||||
|
||||
@@ -11,15 +11,6 @@ body:
|
||||
Please provide a minimal reproducible case so maintainers can triage quickly.
|
||||
Do not include personal/sensitive data; redact and anonymize all logs/payloads.
|
||||
|
||||
- type: input
|
||||
id: summary
|
||||
attributes:
|
||||
label: Summary
|
||||
description: One-line description of the problem.
|
||||
placeholder: zeroclaw daemon exits immediately when ...
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: dropdown
|
||||
id: component
|
||||
attributes:
|
||||
@@ -72,7 +63,7 @@ body:
|
||||
label: Steps to reproduce
|
||||
description: Please provide exact commands/config.
|
||||
placeholder: |
|
||||
1. zeroclaw onboard --interactive
|
||||
1. zeroclaw onboard
|
||||
2. zeroclaw daemon
|
||||
3. Observe crash in logs
|
||||
render: bash
|
||||
@@ -83,13 +74,13 @@ body:
|
||||
id: impact
|
||||
attributes:
|
||||
label: Impact
|
||||
description: Who is affected, how often, and practical consequences.
|
||||
description: Who is affected, how often, and practical consequences (optional but helps triage).
|
||||
placeholder: |
|
||||
Affected users: ...
|
||||
Frequency: always/intermittent
|
||||
Consequence: ...
|
||||
validations:
|
||||
required: true
|
||||
required: false
|
||||
|
||||
- type: textarea
|
||||
id: logs
|
||||
@@ -112,9 +103,10 @@ body:
|
||||
id: rust
|
||||
attributes:
|
||||
label: Rust version
|
||||
description: Required for runtime/build bugs; optional for docs/config issues.
|
||||
placeholder: rustc 1.xx.x
|
||||
validations:
|
||||
required: true
|
||||
required: false
|
||||
|
||||
- type: input
|
||||
id: os
|
||||
@@ -142,7 +134,5 @@ body:
|
||||
options:
|
||||
- label: I reproduced this on the latest master branch or latest release.
|
||||
required: true
|
||||
- label: I redacted secrets/tokens from logs.
|
||||
required: true
|
||||
- label: I removed personal identifiers and replaced identity-specific data with neutral placeholders.
|
||||
- label: I redacted secrets, tokens, and personal data from all submitted content.
|
||||
required: true
|
||||
|
||||
@@ -42,10 +42,10 @@ body:
|
||||
id: non_goals
|
||||
attributes:
|
||||
label: Non-goals / out of scope
|
||||
description: Clarify what should not be included in the first iteration.
|
||||
description: Clarify what should not be included in the first iteration (optional but helps scope discussion).
|
||||
placeholder: No UI changes, no cross-provider dynamic adaptation in v1.
|
||||
validations:
|
||||
required: true
|
||||
required: false
|
||||
|
||||
- type: textarea
|
||||
id: alternatives
|
||||
@@ -60,31 +60,31 @@ body:
|
||||
id: acceptance
|
||||
attributes:
|
||||
label: Acceptance criteria
|
||||
description: What outcomes would make this request complete?
|
||||
description: What outcomes would make this request complete? (optional — can be defined during triage)
|
||||
placeholder: |
|
||||
- Config key is documented and validated
|
||||
- Runtime path uses configured retry budget
|
||||
- Regression tests cover fallback and invalid config
|
||||
validations:
|
||||
required: true
|
||||
required: false
|
||||
|
||||
- type: textarea
|
||||
id: architecture
|
||||
attributes:
|
||||
label: Architecture impact
|
||||
description: Which subsystem(s) are affected?
|
||||
description: Which subsystem(s) are affected? (optional — maintainers will assess during triage)
|
||||
placeholder: providers/, channels/, memory/, runtime/, security/, docs/ ...
|
||||
validations:
|
||||
required: true
|
||||
required: false
|
||||
|
||||
- type: textarea
|
||||
id: risk
|
||||
attributes:
|
||||
label: Risk and rollback
|
||||
description: Main risk + how to disable/revert quickly.
|
||||
description: Main risk + how to disable/revert quickly (optional — can be defined during planning).
|
||||
placeholder: Risk is ... rollback is ...
|
||||
validations:
|
||||
required: true
|
||||
required: false
|
||||
|
||||
- type: dropdown
|
||||
id: breaking
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 84 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 110 KiB |
@@ -5,7 +5,7 @@ updates:
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: daily
|
||||
target-branch: dev
|
||||
target-branch: master
|
||||
open-pull-requests-limit: 3
|
||||
labels:
|
||||
- "dependencies"
|
||||
@@ -21,7 +21,7 @@ updates:
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: daily
|
||||
target-branch: dev
|
||||
target-branch: master
|
||||
open-pull-requests-limit: 1
|
||||
labels:
|
||||
- "ci"
|
||||
@@ -38,7 +38,7 @@ updates:
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: daily
|
||||
target-branch: dev
|
||||
target-branch: master
|
||||
open-pull-requests-limit: 1
|
||||
labels:
|
||||
- "ci"
|
||||
|
||||
@@ -10,21 +10,8 @@ Subdirectories are not valid locations for workflow entry files.
|
||||
Repository convention:
|
||||
|
||||
1. Keep runnable workflow entry files at `.github/workflows/` root.
|
||||
2. Keep workflow-only helper scripts under `.github/workflows/scripts/`.
|
||||
3. Keep cross-tooling/local CI scripts under `scripts/ci/` when they are used outside Actions.
|
||||
2. Keep cross-tooling/local CI scripts under `dev/` or `scripts/ci/` when used outside Actions.
|
||||
|
||||
Workflow behavior documentation in this directory:
|
||||
|
||||
- `.github/workflows/main-branch-flow.md`
|
||||
|
||||
Current workflow helper scripts:
|
||||
|
||||
- `.github/workflows/scripts/ci_workflow_owner_approval.js`
|
||||
- `.github/workflows/scripts/ci_license_file_owner_guard.js`
|
||||
- `.github/workflows/scripts/lint_feedback.js`
|
||||
- `.github/workflows/scripts/pr_auto_response_contributor_tier.js`
|
||||
- `.github/workflows/scripts/pr_auto_response_labeled_routes.js`
|
||||
- `.github/workflows/scripts/pr_check_status_nudge.js`
|
||||
- `.github/workflows/scripts/pr_intake_checks.js`
|
||||
- `.github/workflows/scripts/pr_labeler.js`
|
||||
- `.github/workflows/scripts/test_benchmarks_pr_comment.js`
|
||||
- `.github/workflows/master-branch-flow.md`
|
||||
|
||||
@@ -0,0 +1,175 @@
|
||||
name: Quality Gate
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [master]
|
||||
|
||||
concurrency:
|
||||
group: checks-${{ github.event.pull_request.number }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
CARGO_INCREMENTAL: 0
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
name: Lint
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
- uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable
|
||||
with:
|
||||
toolchain: 1.92.0
|
||||
components: rustfmt, clippy
|
||||
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
|
||||
|
||||
- name: Ensure web/dist placeholder exists
|
||||
run: mkdir -p web/dist && touch web/dist/.gitkeep
|
||||
|
||||
- name: Check formatting
|
||||
run: cargo fmt --all -- --check
|
||||
|
||||
- name: Clippy
|
||||
run: cargo clippy --all-targets -- -D warnings
|
||||
|
||||
test:
|
||||
name: Test
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
- uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable
|
||||
with:
|
||||
toolchain: 1.92.0
|
||||
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
|
||||
|
||||
- name: Ensure web/dist placeholder exists
|
||||
run: mkdir -p web/dist && touch web/dist/.gitkeep
|
||||
|
||||
- name: Install mold linker
|
||||
run: |
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -y mold
|
||||
|
||||
- name: Install cargo-nextest
|
||||
run: curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin
|
||||
|
||||
- name: Run tests
|
||||
run: cargo nextest run --locked
|
||||
env:
|
||||
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER: clang
|
||||
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUSTFLAGS: "-C link-arg=-fuse-ld=mold"
|
||||
|
||||
build:
|
||||
name: Build ${{ matrix.target }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: 40
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
target: x86_64-unknown-linux-gnu
|
||||
- os: macos-14
|
||||
target: aarch64-apple-darwin
|
||||
- os: windows-latest
|
||||
target: x86_64-pc-windows-msvc
|
||||
steps:
|
||||
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
- uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable
|
||||
with:
|
||||
toolchain: 1.92.0
|
||||
targets: ${{ matrix.target }}
|
||||
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
|
||||
if: runner.os != 'Windows'
|
||||
|
||||
- name: Install mold linker
|
||||
if: runner.os == 'Linux'
|
||||
run: |
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -y mold
|
||||
|
||||
- name: Ensure web/dist placeholder exists
|
||||
shell: bash
|
||||
run: mkdir -p web/dist && touch web/dist/.gitkeep
|
||||
|
||||
- name: Build release
|
||||
shell: bash
|
||||
run: cargo build --profile ci --locked --target ${{ matrix.target }}
|
||||
env:
|
||||
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER: clang
|
||||
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUSTFLAGS: "-C link-arg=-fuse-ld=mold"
|
||||
|
||||
security:
|
||||
name: Security Audit
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
- uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable
|
||||
with:
|
||||
toolchain: 1.92.0
|
||||
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
|
||||
|
||||
- name: Install cargo-audit
|
||||
run: cargo install cargo-audit --locked
|
||||
|
||||
- name: Install cargo-deny
|
||||
run: cargo install cargo-deny --locked
|
||||
|
||||
- name: Audit dependencies
|
||||
run: cargo audit
|
||||
|
||||
- name: Check licenses and sources
|
||||
run: cargo deny check licenses sources
|
||||
|
||||
check-32bit:
|
||||
name: "Check (32-bit)"
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 15
|
||||
steps:
|
||||
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
- uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable
|
||||
with:
|
||||
toolchain: 1.92.0
|
||||
targets: i686-unknown-linux-gnu
|
||||
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
|
||||
- name: Install 32-bit libs
|
||||
run: sudo apt-get update && sudo apt-get install -y gcc-multilib
|
||||
- name: Ensure web/dist placeholder exists
|
||||
run: mkdir -p web/dist && touch web/dist/.gitkeep
|
||||
- name: Cargo check (32-bit, no default features)
|
||||
run: cargo check --target i686-unknown-linux-gnu --no-default-features
|
||||
|
||||
# Composite status check — branch protection only needs to require this
|
||||
# single job instead of tracking every matrix leg individually.
|
||||
gate:
|
||||
name: CI Required Gate
|
||||
if: always()
|
||||
needs: [lint, test, build, security, check-32bit]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check upstream job results
|
||||
run: |
|
||||
if [[ "${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}" == "true" ]]; then
|
||||
echo "::error::One or more upstream jobs failed or were cancelled"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
security-gate:
|
||||
name: Security Required Gate
|
||||
if: always()
|
||||
needs: [security]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check security job result
|
||||
run: |
|
||||
if [[ "${{ needs.security.result }}" != "success" ]]; then
|
||||
echo "::error::Security audit failed or was cancelled"
|
||||
exit 1
|
||||
fi
|
||||
@@ -0,0 +1,170 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
pull_request:
|
||||
branches: [master]
|
||||
|
||||
concurrency:
|
||||
group: ci-${{ github.event.pull_request.number || github.sha }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
CARGO_INCREMENTAL: 0
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
name: Lint
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable
|
||||
with:
|
||||
toolchain: 1.92.0
|
||||
components: rustfmt, clippy
|
||||
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
|
||||
|
||||
- name: Ensure web/dist placeholder exists
|
||||
run: mkdir -p web/dist && touch web/dist/.gitkeep
|
||||
|
||||
- name: Check formatting
|
||||
run: cargo fmt --all -- --check
|
||||
|
||||
- name: Clippy
|
||||
run: cargo clippy --all-targets -- -D warnings
|
||||
|
||||
lint-strict-delta:
|
||||
name: Strict Delta Lint
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 15
|
||||
steps:
|
||||
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable
|
||||
with:
|
||||
toolchain: 1.92.0
|
||||
components: clippy
|
||||
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
|
||||
|
||||
- name: Ensure web/dist placeholder exists
|
||||
run: mkdir -p web/dist && touch web/dist/.gitkeep
|
||||
|
||||
- name: Run strict delta lint gate
|
||||
run: bash scripts/ci/rust_strict_delta_gate.sh
|
||||
env:
|
||||
BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.before }}
|
||||
|
||||
test:
|
||||
name: Test
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
needs: [lint]
|
||||
steps:
|
||||
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
- uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable
|
||||
with:
|
||||
toolchain: 1.92.0
|
||||
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
|
||||
|
||||
- name: Ensure web/dist placeholder exists
|
||||
run: mkdir -p web/dist && touch web/dist/.gitkeep
|
||||
|
||||
- name: Install mold linker
|
||||
run: |
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -y mold
|
||||
|
||||
- name: Install cargo-nextest
|
||||
run: curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin
|
||||
|
||||
- name: Run tests
|
||||
run: cargo nextest run --locked
|
||||
env:
|
||||
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER: clang
|
||||
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUSTFLAGS: "-C link-arg=-fuse-ld=mold"
|
||||
|
||||
build:
|
||||
name: Build ${{ matrix.target }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: 40
|
||||
needs: [lint]
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
target: x86_64-unknown-linux-gnu
|
||||
- os: macos-14
|
||||
target: aarch64-apple-darwin
|
||||
- os: windows-latest
|
||||
target: x86_64-pc-windows-msvc
|
||||
steps:
|
||||
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
- uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable
|
||||
with:
|
||||
toolchain: 1.92.0
|
||||
targets: ${{ matrix.target }}
|
||||
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
|
||||
if: runner.os != 'Windows'
|
||||
|
||||
- name: Install mold linker
|
||||
if: runner.os == 'Linux'
|
||||
run: |
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -y mold
|
||||
|
||||
- name: Ensure web/dist placeholder exists
|
||||
shell: bash
|
||||
run: mkdir -p web/dist && touch web/dist/.gitkeep
|
||||
|
||||
- name: Build release
|
||||
shell: bash
|
||||
run: cargo build --profile ci --locked --target ${{ matrix.target }}
|
||||
env:
|
||||
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER: clang
|
||||
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUSTFLAGS: "-C link-arg=-fuse-ld=mold"
|
||||
|
||||
docs-quality:
|
||||
name: Docs Quality
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4
|
||||
with:
|
||||
node-version: 20
|
||||
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
|
||||
with:
|
||||
python-version: "3.12"
|
||||
|
||||
- name: Run docs quality gate
|
||||
run: bash scripts/ci/docs_quality_gate.sh
|
||||
env:
|
||||
BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.before }}
|
||||
|
||||
# Composite status check — branch protection requires this single job.
|
||||
gate:
|
||||
name: CI Required Gate
|
||||
if: always()
|
||||
needs: [lint, lint-strict-delta, test, build, docs-quality]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check upstream job results
|
||||
env:
|
||||
HAS_FAILURE: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}
|
||||
run: |
|
||||
if [[ "$HAS_FAILURE" == "true" ]]; then
|
||||
echo "::error::One or more upstream jobs failed or were cancelled"
|
||||
exit 1
|
||||
fi
|
||||
@@ -1,75 +0,0 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [master]
|
||||
|
||||
concurrency:
|
||||
group: ci-${{ github.event.pull_request.number }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
CARGO_INCREMENTAL: 0
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Test
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
toolchain: 1.92.0
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
|
||||
- name: Install mold linker
|
||||
run: |
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -y mold
|
||||
|
||||
- name: Install cargo-nextest
|
||||
run: curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin
|
||||
|
||||
- name: Run tests
|
||||
run: cargo nextest run --locked
|
||||
env:
|
||||
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER: clang
|
||||
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUSTFLAGS: "-C link-arg=-fuse-ld=mold"
|
||||
|
||||
build:
|
||||
name: Build ${{ matrix.target }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: 40
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
target: x86_64-unknown-linux-gnu
|
||||
- os: macos-14
|
||||
target: aarch64-apple-darwin
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
toolchain: 1.92.0
|
||||
targets: ${{ matrix.target }}
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
|
||||
- name: Install mold linker
|
||||
if: runner.os == 'Linux'
|
||||
run: |
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -y mold
|
||||
|
||||
- name: Build release
|
||||
shell: bash
|
||||
run: cargo build --release --locked --target ${{ matrix.target }}
|
||||
env:
|
||||
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER: clang
|
||||
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUSTFLAGS: "-C link-arg=-fuse-ld=mold"
|
||||
@@ -1,4 +1,4 @@
|
||||
name: CI Full Matrix
|
||||
name: Cross-Platform Build
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
@@ -11,8 +11,28 @@ env:
|
||||
CARGO_INCREMENTAL: 0
|
||||
|
||||
jobs:
|
||||
web:
|
||||
name: Build Web Dashboard
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
cache: npm
|
||||
cache-dependency-path: web/package-lock.json
|
||||
- name: Build web dashboard
|
||||
run: cd web && npm ci && npm run build
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: web-dist
|
||||
path: web/dist/
|
||||
retention-days: 1
|
||||
|
||||
build:
|
||||
name: Build ${{ matrix.target }}
|
||||
needs: [web]
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: 40
|
||||
strategy:
|
||||
@@ -29,14 +49,19 @@ jobs:
|
||||
- os: windows-latest
|
||||
target: x86_64-pc-windows-msvc
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
- uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable
|
||||
with:
|
||||
toolchain: 1.92.0
|
||||
targets: ${{ matrix.target }}
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
|
||||
if: runner.os != 'Windows'
|
||||
|
||||
- uses: actions/download-artifact@v8
|
||||
with:
|
||||
name: web-dist
|
||||
path: web/dist/
|
||||
|
||||
- name: Install cross compiler
|
||||
if: matrix.cross_compiler
|
||||
run: |
|
||||
@@ -4,184 +4,84 @@ This document explains what runs when code is proposed to `master` and released.
|
||||
|
||||
Use this with:
|
||||
|
||||
- [`docs/ci-map.md`](../../docs/ci-map.md)
|
||||
- [`docs/pr-workflow.md`](../../docs/pr-workflow.md)
|
||||
- [`docs/release-process.md`](../../docs/release-process.md)
|
||||
- [`docs/ci-map.md`](../../docs/contributing/ci-map.md)
|
||||
- [`docs/pr-workflow.md`](../../docs/contributing/pr-workflow.md)
|
||||
- [`docs/release-process.md`](../../docs/contributing/release-process.md)
|
||||
|
||||
## Branching Model
|
||||
|
||||
ZeroClaw uses a single default branch: `master`. All contributor PRs target `master` directly. There is no `dev` or promotion branch.
|
||||
|
||||
Current maintainers with PR approval authority: `theonlyhennygod` and `jordanthejet`.
|
||||
Current maintainers with PR approval authority: `theonlyhennygod`, `JordanTheJet`, and `SimianAstronaut7`.
|
||||
|
||||
## Active Workflows
|
||||
|
||||
| File | Trigger | Purpose |
|
||||
| --- | --- | --- |
|
||||
| `checks-on-pr.yml` | `pull_request` → `master` | Lint + test + build + security audit on every PR |
|
||||
| `cross-platform-build-manual.yml` | `workflow_dispatch` | Full platform build matrix (manual) |
|
||||
| `release-beta-on-push.yml` | `push` → `master` | Beta release on every master commit |
|
||||
| `release-stable-manual.yml` | `workflow_dispatch` | Stable release (manual, version-gated) |
|
||||
|
||||
## Event Summary
|
||||
|
||||
| Event | Main workflows |
|
||||
| Event | Workflows triggered |
|
||||
| --- | --- |
|
||||
| PR activity (`pull_request_target`) | `pr-intake-checks.yml`, `pr-labeler.yml`, `pr-auto-response.yml` |
|
||||
| PR activity (`pull_request`) | `ci-run.yml`, `sec-audit.yml`, plus path-scoped workflows |
|
||||
| Push to `master` | `ci-run.yml`, `sec-audit.yml`, plus path-scoped workflows |
|
||||
| Tag push (`v*`) | `pub-release.yml` publish mode, `pub-docker-img.yml` publish job |
|
||||
| Scheduled/manual | `pub-release.yml` verification mode, `pub-homebrew-core.yml` (manual), `sec-codeql.yml`, `feature-matrix.yml`, `test-fuzz.yml`, `pr-check-stale.yml`, `pr-check-status.yml`, `sync-contributors.yml`, `test-benchmarks.yml`, `test-e2e.yml` |
|
||||
|
||||
## Runtime and Docker Matrix
|
||||
|
||||
Observed averages below are from recent completed runs (sampled from GitHub Actions on February 17, 2026). Values are directional, not SLA.
|
||||
|
||||
| Workflow | Typical trigger in main flow | Avg runtime | Docker build? | Docker run? | Docker push? |
|
||||
| --- | --- | ---:| --- | --- | --- |
|
||||
| `pr-intake-checks.yml` | PR open/update (`pull_request_target`) | 14.5s | No | No | No |
|
||||
| `pr-labeler.yml` | PR open/update (`pull_request_target`) | 53.7s | No | No | No |
|
||||
| `pr-auto-response.yml` | PR/issue automation | 24.3s | No | No | No |
|
||||
| `ci-run.yml` | PR + push to `master` | 74.7s | No | No | No |
|
||||
| `sec-audit.yml` | PR + push to `master` | 127.2s | No | No | No |
|
||||
| `workflow-sanity.yml` | Workflow-file changes | 34.2s | No | No | No |
|
||||
| `pr-label-policy-check.yml` | Label policy/automation changes | 14.7s | No | No | No |
|
||||
| `pub-docker-img.yml` (`pull_request`) | Docker build-input PR changes | 240.4s | Yes | Yes | No |
|
||||
| `pub-docker-img.yml` (`push`) | tag push `v*` | 139.9s | Yes | No | Yes |
|
||||
| `pub-release.yml` | Tag push `v*` (publish) + manual/scheduled verification (no publish) | N/A in recent sample | No | No | No |
|
||||
| `pub-homebrew-core.yml` | Manual workflow dispatch only | N/A in recent sample | No | No | No |
|
||||
|
||||
Notes:
|
||||
|
||||
1. `pub-docker-img.yml` is the only workflow in the main PR/push path that builds Docker images.
|
||||
2. Container runtime verification (`docker run`) occurs in PR smoke only.
|
||||
3. Container registry push occurs on tag pushes (`v*`) only.
|
||||
4. `ci-run.yml` "Build (Smoke)" builds Rust binaries, not Docker images.
|
||||
| PR opened or updated against `master` | `checks-on-pr.yml` |
|
||||
| Push to `master` (including after merge) | `release-beta-on-push.yml` |
|
||||
| Manual dispatch | `cross-platform-build-manual.yml`, `release-stable-manual.yml` |
|
||||
|
||||
## Step-By-Step
|
||||
|
||||
### 1) PR from branch in this repository -> `master`
|
||||
### 1) PR → `master`
|
||||
|
||||
1. Contributor opens or updates PR against `master`.
|
||||
2. `pull_request_target` automation runs (typical runtime):
|
||||
- `pr-intake-checks.yml` posts intake warnings/errors.
|
||||
- `pr-labeler.yml` sets size/risk/scope labels.
|
||||
- `pr-auto-response.yml` runs first-interaction and label routes.
|
||||
3. `pull_request` CI workflows start:
|
||||
- `ci-run.yml`
|
||||
- `sec-audit.yml`
|
||||
- path-scoped workflows if matching files changed:
|
||||
- `pub-docker-img.yml` (Docker build-input paths only)
|
||||
- `workflow-sanity.yml` (workflow files only)
|
||||
- `pr-label-policy-check.yml` (label-policy files only)
|
||||
4. In `ci-run.yml`, `changes` computes:
|
||||
- `docs_only`
|
||||
- `docs_changed`
|
||||
- `rust_changed`
|
||||
- `workflow_changed`
|
||||
5. `build` runs for Rust-impacting changes.
|
||||
6. On PRs, full lint/test/docs checks run when PR has label `ci:full`:
|
||||
- `lint`
|
||||
- `lint-strict-delta`
|
||||
- `test`
|
||||
- `docs-quality`
|
||||
7. If `.github/workflows/**` changed, `workflow-owner-approval` must pass.
|
||||
8. `lint-feedback` posts actionable comment if lint/docs gates fail.
|
||||
9. `CI Required Gate` aggregates results to final pass/fail.
|
||||
10. Maintainer (`theonlyhennygod` or `jordanthejet`) merges PR once checks and review policy are satisfied.
|
||||
11. Merge emits a `push` event on `master` (see scenario 3).
|
||||
1. Contributor opens or updates a PR against `master`.
|
||||
2. `checks-on-pr.yml` starts:
|
||||
- `lint` job: runs `cargo fmt --check` and `cargo clippy -D warnings`.
|
||||
- `test` job: runs `cargo nextest run --locked` on `ubuntu-latest` with Rust 1.92.0 and mold linker.
|
||||
- `build` job (matrix): compiles release binary on `x86_64-unknown-linux-gnu` and `aarch64-apple-darwin`.
|
||||
- `security` job: runs `cargo audit` and `cargo deny check licenses sources`.
|
||||
- Concurrency group cancels in-progress runs for the same PR on new pushes.
|
||||
3. All jobs must pass before merge.
|
||||
4. Maintainer (`theonlyhennygod`, `JordanTheJet`, or `SimianAstronaut7`) merges PR once checks and review policy are satisfied.
|
||||
5. Merge emits a `push` event on `master` (see section 2).
|
||||
|
||||
### 2) PR from fork -> `master`
|
||||
### 2) Push to `master` (including after merge)
|
||||
|
||||
1. External contributor opens PR from `fork/<branch>` into `zeroclaw:master`.
|
||||
2. Immediately on `opened`:
|
||||
- `pull_request_target` workflows start with base-repo context and base-repo token:
|
||||
- `pr-intake-checks.yml`
|
||||
- `pr-labeler.yml`
|
||||
- `pr-auto-response.yml`
|
||||
- `pull_request` workflows are queued for the fork head commit:
|
||||
- `ci-run.yml`
|
||||
- `sec-audit.yml`
|
||||
- path-scoped workflows (`pub-docker-img.yml`, `workflow-sanity.yml`, `pr-label-policy-check.yml`) if changed files match.
|
||||
3. Fork-specific permission behavior in `pull_request` workflows:
|
||||
- token is restricted (read-focused), so jobs that try to write PR comments/status extras can be limited.
|
||||
- secrets from the base repo are not exposed to fork PR `pull_request` jobs.
|
||||
4. Approval gate possibility:
|
||||
- if Actions settings require maintainer approval for fork workflows, the `pull_request` run stays in `action_required`/waiting state until approved.
|
||||
5. Event fan-out after labeling:
|
||||
- `pr-labeler.yml` and manual label changes emit `labeled`/`unlabeled` events.
|
||||
- those events retrigger `pull_request_target` automation (`pr-labeler.yml` and `pr-auto-response.yml`), creating extra run volume/noise.
|
||||
6. When contributor pushes new commits to fork branch (`synchronize`):
|
||||
- reruns: `pr-intake-checks.yml`, `pr-labeler.yml`, `ci-run.yml`, `sec-audit.yml`, and matching path-scoped PR workflows.
|
||||
- does not rerun `pr-auto-response.yml` unless label/open events occur.
|
||||
7. `ci-run.yml` execution details for fork PR:
|
||||
- `changes` computes `docs_only`, `docs_changed`, `rust_changed`, `workflow_changed`.
|
||||
- `build` runs for Rust-impacting changes.
|
||||
- `lint`/`lint-strict-delta`/`test`/`docs-quality` run on PR when `ci:full` label exists.
|
||||
- `workflow-owner-approval` runs when `.github/workflows/**` changed.
|
||||
- `CI Required Gate` emits final pass/fail for the PR head.
|
||||
8. Fork PR merge blockers to check first when diagnosing stalls:
|
||||
- run approval pending for fork workflows.
|
||||
- `workflow-owner-approval` failing on workflow-file changes.
|
||||
- `CI Required Gate` failure caused by upstream jobs.
|
||||
- repeated `pull_request_target` reruns from label churn causing noisy signals.
|
||||
9. After merge, normal `push` workflows on `master` execute (scenario 3).
|
||||
1. Commit reaches `master`.
|
||||
2. `release-beta-on-push.yml` (Release Beta) starts:
|
||||
- `version` job: computes beta tag as `v{cargo_version}-beta.{run_number}`.
|
||||
- `build` job (matrix, 4 targets): `x86_64-linux`, `aarch64-linux`, `aarch64-darwin`, `x86_64-windows`.
|
||||
- `publish` job: generates `SHA256SUMS`, creates a GitHub pre-release with all artifacts. Artifact retention: 7 days.
|
||||
- `docker` job: builds multi-platform image (`linux/amd64,linux/arm64`) and pushes to `ghcr.io` with `:beta` and the versioned beta tag.
|
||||
3. This runs on every push to `master` without filtering. Every merged PR produces a beta pre-release.
|
||||
|
||||
### 3) Push to `master` (including after merge)
|
||||
### 3) Stable Release (manual)
|
||||
|
||||
1. Commit reaches `master` (usually from a merged PR).
|
||||
2. `ci-run.yml` runs on `push`.
|
||||
3. `sec-audit.yml` runs on `push`.
|
||||
4. Path-filtered workflows run only if touched files match their filters.
|
||||
5. In `ci-run.yml`, push behavior differs from PR behavior:
|
||||
- Rust path: `lint`, `lint-strict-delta`, `test`, `build` are expected.
|
||||
- Docs/non-rust paths: fast-path behavior applies.
|
||||
6. `CI Required Gate` computes overall push result.
|
||||
1. Maintainer runs `release-stable-manual.yml` via `workflow_dispatch` with a version input (e.g. `0.2.0`).
|
||||
2. `validate` job checks:
|
||||
- Input matches semver `X.Y.Z` format.
|
||||
- `Cargo.toml` version matches input exactly.
|
||||
- Tag `vX.Y.Z` does not already exist on the remote.
|
||||
3. `build` job (matrix, same 4 targets as beta): compiles release binary.
|
||||
4. `publish` job: generates `SHA256SUMS`, creates a stable GitHub Release (not pre-release). Artifact retention: 14 days.
|
||||
5. `docker` job: pushes to `ghcr.io` with `:latest` and `:vX.Y.Z`.
|
||||
|
||||
## Docker Publish Logic
|
||||
### 4) Full Platform Build (manual)
|
||||
|
||||
Workflow: `.github/workflows/pub-docker-img.yml`
|
||||
1. Maintainer runs `cross-platform-build-manual.yml` via `workflow_dispatch`.
|
||||
2. `build` job (matrix, 3 targets): `aarch64-linux-gnu`, `x86_64-darwin` (macOS 15 Intel), `x86_64-windows-msvc`.
|
||||
3. Build-only, no tests, no publish. Used to verify cross-compilation on platforms not covered by `checks-on-pr.yml`.
|
||||
|
||||
### PR behavior
|
||||
## Build Targets by Workflow
|
||||
|
||||
1. Triggered on `pull_request` to `master` when Docker build-input paths change.
|
||||
2. Runs `PR Docker Smoke` job:
|
||||
- Builds local smoke image with Blacksmith builder.
|
||||
- Verifies container with `docker run ... --version`.
|
||||
3. Typical runtime in recent sample: ~240.4s.
|
||||
4. No registry push happens on PR events.
|
||||
|
||||
### Push behavior
|
||||
|
||||
1. `publish` job runs on tag pushes `v*` only.
|
||||
2. Workflow trigger includes semantic version tag pushes (`v*`) only.
|
||||
3. Login to `ghcr.io` uses `${{ github.actor }}` and `${{ secrets.GITHUB_TOKEN }}`.
|
||||
4. Tag computation includes semantic tag from pushed git tag (`vX.Y.Z`) + SHA tag.
|
||||
5. Multi-platform publish is used for tag pushes (`linux/amd64,linux/arm64`).
|
||||
6. Typical runtime in recent sample: ~139.9s.
|
||||
7. Result: pushed image tags under `ghcr.io/<owner>/<repo>`.
|
||||
|
||||
Important: Docker publish requires a `v*` tag push; regular `master` branch pushes do not publish images.
|
||||
|
||||
## Release Logic
|
||||
|
||||
Workflow: `.github/workflows/pub-release.yml`
|
||||
|
||||
1. Trigger modes:
|
||||
- Tag push `v*` -> publish mode.
|
||||
- Manual dispatch -> verification-only or publish mode (input-driven).
|
||||
- Weekly schedule -> verification-only mode.
|
||||
2. `prepare` resolves release context (`release_ref`, `release_tag`, publish/draft mode) and validates manual publish inputs.
|
||||
- publish mode enforces `release_tag` == `Cargo.toml` version at the tag commit.
|
||||
3. `build-release` builds matrix artifacts across Linux/macOS/Windows targets.
|
||||
4. `verify-artifacts` enforces presence of all expected archives before any publish attempt.
|
||||
5. In publish mode, workflow generates SBOM (`CycloneDX` + `SPDX`), `SHA256SUMS`, keyless cosign signatures, and verifies GHCR release-tag availability.
|
||||
6. In publish mode, workflow creates/updates the GitHub Release for the resolved tag and commit-ish.
|
||||
|
||||
Manual Homebrew formula flow:
|
||||
|
||||
1. Run `.github/workflows/pub-homebrew-core.yml` with `release_tag=vX.Y.Z`.
|
||||
2. Use `dry_run=true` first to validate formula patch and metadata.
|
||||
3. Use `dry_run=false` to push from bot fork and open `homebrew-core` PR.
|
||||
|
||||
## Merge/Policy Notes
|
||||
|
||||
1. Workflow-file changes (`.github/workflows/**`) activate owner-approval gate in `ci-run.yml`.
|
||||
2. PR lint/test strictness is intentionally controlled by `ci:full` label.
|
||||
3. `sec-audit.yml` runs on both PR and push, plus scheduled weekly.
|
||||
4. Some workflows are operational and non-merge-path (`pr-check-stale`, `pr-check-status`, `sync-contributors`, etc.).
|
||||
5. Workflow-specific JavaScript helpers are organized under `.github/workflows/scripts/`.
|
||||
| Target | `checks-on-pr.yml` | `cross-platform-build-manual.yml` | `release-beta-on-push.yml` | `release-stable-manual.yml` |
|
||||
| --- | :---: | :---: | :---: | :---: |
|
||||
| `x86_64-unknown-linux-gnu` | ✓ | | ✓ | ✓ |
|
||||
| `aarch64-unknown-linux-gnu` | | ✓ | ✓ | ✓ |
|
||||
| `aarch64-apple-darwin` | ✓ | | ✓ | ✓ |
|
||||
| `x86_64-apple-darwin` | | ✓ | | |
|
||||
| `x86_64-pc-windows-msvc` | ✓ | ✓ | ✓ | ✓ |
|
||||
|
||||
## Mermaid Diagrams
|
||||
|
||||
@@ -189,41 +89,42 @@ Manual Homebrew formula flow:
|
||||
|
||||
```mermaid
|
||||
flowchart TD
|
||||
A["PR opened or updated -> master"] --> B["pull_request_target lane"]
|
||||
B --> B1["pr-intake-checks.yml"]
|
||||
B --> B2["pr-labeler.yml"]
|
||||
B --> B3["pr-auto-response.yml"]
|
||||
A --> C["pull_request CI lane"]
|
||||
C --> C1["ci-run.yml"]
|
||||
C --> C2["sec-audit.yml"]
|
||||
C --> C3["pub-docker-img.yml (if Docker paths changed)"]
|
||||
C --> C4["workflow-sanity.yml (if workflow files changed)"]
|
||||
C --> C5["pr-label-policy-check.yml (if policy files changed)"]
|
||||
C1 --> D["CI Required Gate"]
|
||||
D --> E{"Checks + review policy pass?"}
|
||||
E -->|No| F["PR stays open"]
|
||||
E -->|Yes| G["Merge PR"]
|
||||
G --> H["push event on master"]
|
||||
A["PR opened or updated → master"] --> B["checks-on-pr.yml"]
|
||||
B --> B0["lint: fmt + clippy"]
|
||||
B --> B1["test: cargo nextest (ubuntu-latest)"]
|
||||
B --> B2["build: x86_64-linux + aarch64-darwin"]
|
||||
B --> B3["security: audit + deny"]
|
||||
B0 & B1 & B2 & B3 --> C{"Checks pass?"}
|
||||
C -->|No| D["PR stays open"]
|
||||
C -->|Yes| E["Maintainer merges"]
|
||||
E --> F["push event on master"]
|
||||
```
|
||||
|
||||
### Release
|
||||
### Beta Release (on every master push)
|
||||
|
||||
```mermaid
|
||||
flowchart TD
|
||||
A["Commit reaches master"] --> B["ci-run.yml"]
|
||||
A --> C["sec-audit.yml"]
|
||||
A --> D["path-scoped workflows (if matched)"]
|
||||
T["Tag push v*"] --> R["pub-release.yml"]
|
||||
W["Manual/Scheduled release verify"] --> R
|
||||
T --> P["pub-docker-img.yml publish job"]
|
||||
R --> R1["Artifacts + SBOM + checksums + signatures + GitHub Release"]
|
||||
W --> R2["Verification build only (no GitHub Release publish)"]
|
||||
P --> P1["Push ghcr image tags (version + sha)"]
|
||||
A["Push to master"] --> B["release-beta-on-push.yml"]
|
||||
B --> B1["version: compute v{x.y.z}-beta.{N}"]
|
||||
B1 --> B2["build: 4 targets"]
|
||||
B2 --> B3["publish: GitHub pre-release + SHA256SUMS"]
|
||||
B2 --> B4["docker: push ghcr.io :beta + versioned tag"]
|
||||
```
|
||||
|
||||
### Stable Release (manual)
|
||||
|
||||
```mermaid
|
||||
flowchart TD
|
||||
A["workflow_dispatch: version=X.Y.Z"] --> B["release-stable-manual.yml"]
|
||||
B --> B1["validate: semver + Cargo.toml + tag uniqueness"]
|
||||
B1 --> B2["build: 4 targets"]
|
||||
B2 --> B3["publish: GitHub stable release + SHA256SUMS"]
|
||||
B2 --> B4["docker: push ghcr.io :latest + :vX.Y.Z"]
|
||||
```
|
||||
|
||||
## Quick Troubleshooting
|
||||
|
||||
1. Unexpected skipped jobs: inspect `scripts/ci/detect_change_scope.sh` outputs.
|
||||
2. Workflow-change PR blocked: verify `WORKFLOW_OWNER_LOGINS` and approvals.
|
||||
3. Fork PR appears stalled: check whether Actions run approval is pending.
|
||||
4. Docker not published: confirm a `v*` tag was pushed to the intended commit.
|
||||
1. **Quality gate failing on PR**: check `lint` job for formatting/clippy issues; check `test` job for test failures; check `build` job for compile errors; check `security` job for audit/deny failures.
|
||||
2. **Beta release not appearing**: confirm the push landed on `master` (not another branch); check `release-beta-on-push.yml` run status.
|
||||
3. **Stable release failing at validate**: ensure `Cargo.toml` version matches the input version and the tag does not already exist.
|
||||
4. **Full matrix build needed**: run `cross-platform-build-manual.yml` manually from the Actions tab.
|
||||
|
||||
@@ -1,182 +0,0 @@
|
||||
name: Promote Release
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: "Stable version to release (e.g. 0.2.0)"
|
||||
required: true
|
||||
type: string
|
||||
|
||||
concurrency:
|
||||
group: promote-release
|
||||
cancel-in-progress: false
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
packages: write
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: ${{ github.repository }}
|
||||
|
||||
jobs:
|
||||
validate:
|
||||
name: Validate Version
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
tag: ${{ steps.check.outputs.tag }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Validate semver and Cargo.toml match
|
||||
id: check
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
input_version="${{ inputs.version }}"
|
||||
cargo_version=$(sed -n 's/^version = "\([^"]*\)"/\1/p' Cargo.toml | head -1)
|
||||
|
||||
if [[ ! "$input_version" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
||||
echo "::error::Version must be semver (X.Y.Z). Got: ${input_version}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ "$cargo_version" != "$input_version" ]]; then
|
||||
echo "::error::Cargo.toml version (${cargo_version}) does not match input (${input_version}). Bump Cargo.toml first."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
tag="v${input_version}"
|
||||
if git ls-remote --exit-code --tags origin "refs/tags/${tag}" >/dev/null 2>&1; then
|
||||
echo "::error::Tag ${tag} already exists."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "tag=${tag}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
build:
|
||||
name: Build ${{ matrix.target }}
|
||||
needs: [validate]
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: 40
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
target: x86_64-unknown-linux-gnu
|
||||
artifact: zeroclaw
|
||||
ext: tar.gz
|
||||
- os: ubuntu-latest
|
||||
target: aarch64-unknown-linux-gnu
|
||||
artifact: zeroclaw
|
||||
ext: tar.gz
|
||||
cross_compiler: gcc-aarch64-linux-gnu
|
||||
linker_env: CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER
|
||||
linker: aarch64-linux-gnu-gcc
|
||||
- os: macos-14
|
||||
target: aarch64-apple-darwin
|
||||
artifact: zeroclaw
|
||||
ext: tar.gz
|
||||
- os: windows-latest
|
||||
target: x86_64-pc-windows-msvc
|
||||
artifact: zeroclaw.exe
|
||||
ext: zip
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
toolchain: 1.92.0
|
||||
targets: ${{ matrix.target }}
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
if: runner.os != 'Windows'
|
||||
|
||||
- name: Install cross compiler
|
||||
if: matrix.cross_compiler
|
||||
run: |
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -y ${{ matrix.cross_compiler }}
|
||||
|
||||
- name: Build release
|
||||
shell: bash
|
||||
run: |
|
||||
if [ -n "${{ matrix.linker_env || '' }}" ] && [ -n "${{ matrix.linker || '' }}" ]; then
|
||||
export "${{ matrix.linker_env }}=${{ matrix.linker }}"
|
||||
fi
|
||||
cargo build --release --locked --target ${{ matrix.target }}
|
||||
|
||||
- name: Package (Unix)
|
||||
if: runner.os != 'Windows'
|
||||
run: |
|
||||
cd target/${{ matrix.target }}/release
|
||||
tar czf ../../../zeroclaw-${{ matrix.target }}.${{ matrix.ext }} ${{ matrix.artifact }}
|
||||
|
||||
- name: Package (Windows)
|
||||
if: runner.os == 'Windows'
|
||||
run: |
|
||||
cd target/${{ matrix.target }}/release
|
||||
7z a ../../../zeroclaw-${{ matrix.target }}.${{ matrix.ext }} ${{ matrix.artifact }}
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: zeroclaw-${{ matrix.target }}
|
||||
path: zeroclaw-${{ matrix.target }}.${{ matrix.ext }}
|
||||
retention-days: 14
|
||||
|
||||
publish:
|
||||
name: Publish Stable Release
|
||||
needs: [validate, build]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: artifacts
|
||||
|
||||
- name: Generate checksums
|
||||
run: |
|
||||
cd artifacts
|
||||
find . -type f \( -name '*.tar.gz' -o -name '*.zip' \) -exec sha256sum {} + | sed 's| \./[^/]*/| |' > SHA256SUMS
|
||||
cat SHA256SUMS
|
||||
|
||||
- name: Create GitHub Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
tag_name: ${{ needs.validate.outputs.tag }}
|
||||
name: ${{ needs.validate.outputs.tag }}
|
||||
prerelease: false
|
||||
generate_release_notes: true
|
||||
files: |
|
||||
artifacts/**/*
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
docker:
|
||||
name: Push Docker Image
|
||||
needs: [validate, build]
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: docker/setup-buildx-action@v3
|
||||
|
||||
- uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: |
|
||||
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ needs.validate.outputs.tag }}
|
||||
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
|
||||
platforms: linux/amd64,linux/arm64
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
@@ -0,0 +1,124 @@
|
||||
name: Auto-sync crates.io
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
paths:
|
||||
- "Cargo.toml"
|
||||
|
||||
concurrency:
|
||||
group: publish-crates-auto
|
||||
cancel-in-progress: false
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
jobs:
|
||||
detect-version-change:
|
||||
name: Detect Version Bump
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
changed: ${{ steps.check.outputs.changed }}
|
||||
version: ${{ steps.check.outputs.version }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 2
|
||||
|
||||
- name: Check if version changed
|
||||
id: check
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
||||
current=$(sed -n 's/^version = "\([^"]*\)"/\1/p' Cargo.toml | head -1)
|
||||
previous=$(git show HEAD~1:Cargo.toml 2>/dev/null | sed -n 's/^version = "\([^"]*\)"/\1/p' | head -1 || echo "")
|
||||
|
||||
echo "Current version: ${current}"
|
||||
echo "Previous version: ${previous}"
|
||||
|
||||
if [[ "$current" != "$previous" && -n "$current" ]]; then
|
||||
echo "changed=true" >> "$GITHUB_OUTPUT"
|
||||
echo "version=${current}" >> "$GITHUB_OUTPUT"
|
||||
echo "Version bumped from ${previous} to ${current} — will publish"
|
||||
else
|
||||
echo "changed=false" >> "$GITHUB_OUTPUT"
|
||||
echo "Version unchanged (${current}) — skipping publish"
|
||||
fi
|
||||
|
||||
check-registry:
|
||||
name: Check if Already Published
|
||||
needs: [detect-version-change]
|
||||
if: needs.detect-version-change.outputs.changed == 'true'
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
should_publish: ${{ steps.check.outputs.should_publish }}
|
||||
steps:
|
||||
- name: Check crates.io for existing version
|
||||
id: check
|
||||
shell: bash
|
||||
env:
|
||||
VERSION: ${{ needs.detect-version-change.outputs.version }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
status=$(curl -s -o /dev/null -w "%{http_code}" \
|
||||
"https://crates.io/api/v1/crates/zeroclawlabs/${VERSION}")
|
||||
|
||||
if [[ "$status" == "200" ]]; then
|
||||
echo "Version ${VERSION} already exists on crates.io — skipping"
|
||||
echo "should_publish=false" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "Version ${VERSION} not yet published — proceeding"
|
||||
echo "should_publish=true" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
publish:
|
||||
name: Publish to crates.io
|
||||
needs: [detect-version-change, check-registry]
|
||||
if: needs.check-registry.outputs.should_publish == 'true'
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
toolchain: 1.92.0
|
||||
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
cache: npm
|
||||
cache-dependency-path: web/package-lock.json
|
||||
|
||||
- name: Build web dashboard
|
||||
run: cd web && npm ci && npm run build
|
||||
|
||||
- name: Clean web build artifacts
|
||||
run: rm -rf web/node_modules web/src web/package.json web/package-lock.json web/tsconfig*.json web/vite.config.ts web/index.html
|
||||
|
||||
- name: Publish to crates.io
|
||||
run: cargo publish --locked --allow-dirty --no-verify
|
||||
env:
|
||||
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
||||
|
||||
- name: Verify published
|
||||
shell: bash
|
||||
env:
|
||||
VERSION: ${{ needs.detect-version-change.outputs.version }}
|
||||
run: |
|
||||
echo "Waiting for crates.io to index..."
|
||||
sleep 15
|
||||
status=$(curl -s -o /dev/null -w "%{http_code}" \
|
||||
"https://crates.io/api/v1/crates/zeroclawlabs/${VERSION}")
|
||||
if [[ "$status" == "200" ]]; then
|
||||
echo "zeroclawlabs v${VERSION} is live on crates.io"
|
||||
echo "Install: cargo install zeroclawlabs"
|
||||
else
|
||||
echo "::warning::Version may still be indexing — check https://crates.io/crates/zeroclawlabs"
|
||||
fi
|
||||
@@ -0,0 +1,80 @@
|
||||
name: Publish to crates.io
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: "Version to publish (e.g. 0.2.0) — must match Cargo.toml"
|
||||
required: true
|
||||
type: string
|
||||
dry_run:
|
||||
description: "Dry run (validate without publishing)"
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
concurrency:
|
||||
group: publish-crates
|
||||
cancel-in-progress: false
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
jobs:
|
||||
validate:
|
||||
name: Validate
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Check version matches Cargo.toml
|
||||
shell: bash
|
||||
env:
|
||||
INPUT_VERSION: ${{ inputs.version }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
cargo_version=$(sed -n 's/^version = "\([^"]*\)"/\1/p' Cargo.toml | head -1)
|
||||
if [[ "$cargo_version" != "$INPUT_VERSION" ]]; then
|
||||
echo "::error::Cargo.toml version (${cargo_version}) does not match input (${INPUT_VERSION})"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
publish:
|
||||
name: Publish to crates.io
|
||||
needs: [validate]
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
toolchain: 1.92.0
|
||||
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
cache: npm
|
||||
cache-dependency-path: web/package-lock.json
|
||||
|
||||
- name: Build web dashboard
|
||||
run: cd web && npm ci && npm run build
|
||||
|
||||
- name: Clean web build artifacts
|
||||
run: rm -rf web/node_modules web/src web/package.json web/package-lock.json web/tsconfig*.json web/vite.config.ts web/index.html
|
||||
|
||||
- name: Publish (dry run)
|
||||
if: inputs.dry_run
|
||||
run: cargo publish --dry-run --locked --allow-dirty --no-verify
|
||||
env:
|
||||
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
||||
|
||||
- name: Publish to crates.io
|
||||
if: "!inputs.dry_run"
|
||||
run: cargo publish --locked --allow-dirty --no-verify
|
||||
env:
|
||||
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
||||
@@ -0,0 +1,325 @@
|
||||
name: Release Beta
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
|
||||
concurrency:
|
||||
group: release
|
||||
cancel-in-progress: false
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
packages: write
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: ${{ github.repository }}
|
||||
|
||||
jobs:
|
||||
version:
|
||||
name: Resolve Version
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
version: ${{ steps.ver.outputs.version }}
|
||||
tag: ${{ steps.ver.outputs.tag }}
|
||||
steps:
|
||||
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
- name: Compute beta version
|
||||
id: ver
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
base_version=$(sed -n 's/^version = "\([^"]*\)"/\1/p' Cargo.toml | head -1)
|
||||
beta_tag="v${base_version}-beta.${GITHUB_RUN_NUMBER}"
|
||||
echo "version=${base_version}" >> "$GITHUB_OUTPUT"
|
||||
echo "tag=${beta_tag}" >> "$GITHUB_OUTPUT"
|
||||
echo "Beta release: ${beta_tag}"
|
||||
|
||||
release-notes:
|
||||
name: Generate Release Notes
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
notes: ${{ steps.notes.outputs.body }}
|
||||
features: ${{ steps.notes.outputs.features }}
|
||||
contributors: ${{ steps.notes.outputs.contributors }}
|
||||
steps:
|
||||
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Build release notes
|
||||
id: notes
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
||||
# Use a wider range — find the previous stable tag to capture all
|
||||
# contributors across the full release cycle, not just one beta bump
|
||||
PREV_TAG=$(git tag --sort=-creatordate \
|
||||
| grep -vE '\-beta\.' \
|
||||
| head -1 || echo "")
|
||||
if [ -z "$PREV_TAG" ]; then
|
||||
RANGE="HEAD"
|
||||
else
|
||||
RANGE="${PREV_TAG}..HEAD"
|
||||
fi
|
||||
|
||||
# Extract features only (feat commits) — skip bug fixes for clean notes
|
||||
FEATURES=$(git log "$RANGE" --pretty=format:"%s" --no-merges \
|
||||
| grep -iE '^feat(\(|:)' \
|
||||
| sed 's/^feat(\([^)]*\)): /\1: /' \
|
||||
| sed 's/^feat: //' \
|
||||
| sed 's/ (#[0-9]*)$//' \
|
||||
| sort -uf \
|
||||
| while IFS= read -r line; do echo "- ${line}"; done || true)
|
||||
|
||||
if [ -z "$FEATURES" ]; then
|
||||
FEATURES="- Incremental improvements and polish"
|
||||
fi
|
||||
|
||||
# Collect ALL unique contributors: git authors + Co-Authored-By
|
||||
GIT_AUTHORS=$(git log "$RANGE" --pretty=format:"%an" --no-merges | sort -uf || true)
|
||||
CO_AUTHORS=$(git log "$RANGE" --pretty=format:"%b" --no-merges \
|
||||
| grep -ioE 'Co-Authored-By: *[^<]+' \
|
||||
| sed 's/Co-Authored-By: *//i' \
|
||||
| sed 's/ *$//' \
|
||||
| sort -uf || true)
|
||||
|
||||
# Merge, deduplicate, and filter out bots
|
||||
ALL_CONTRIBUTORS=$(printf "%s\n%s" "$GIT_AUTHORS" "$CO_AUTHORS" \
|
||||
| sort -uf \
|
||||
| grep -v '^$' \
|
||||
| grep -viE '\[bot\]$|^dependabot|^github-actions|^copilot|^ZeroClaw Bot|^ZeroClaw Runner|^ZeroClaw Agent|^blacksmith' \
|
||||
| while IFS= read -r name; do echo "- ${name}"; done || true)
|
||||
|
||||
# Build release body
|
||||
BODY=$(cat <<NOTES_EOF
|
||||
## What's New
|
||||
|
||||
${FEATURES}
|
||||
|
||||
## Contributors
|
||||
|
||||
${ALL_CONTRIBUTORS}
|
||||
|
||||
---
|
||||
*Full changelog: ${PREV_TAG}...HEAD*
|
||||
NOTES_EOF
|
||||
)
|
||||
|
||||
# Output multiline values
|
||||
{
|
||||
echo "body<<BODY_EOF"
|
||||
echo "$BODY"
|
||||
echo "BODY_EOF"
|
||||
} >> "$GITHUB_OUTPUT"
|
||||
|
||||
{
|
||||
echo "features<<FEAT_EOF"
|
||||
echo "$FEATURES"
|
||||
echo "FEAT_EOF"
|
||||
} >> "$GITHUB_OUTPUT"
|
||||
|
||||
{
|
||||
echo "contributors<<CONTRIB_EOF"
|
||||
echo "$ALL_CONTRIBUTORS"
|
||||
echo "CONTRIB_EOF"
|
||||
} >> "$GITHUB_OUTPUT"
|
||||
|
||||
web:
|
||||
name: Build Web Dashboard
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
cache: npm
|
||||
cache-dependency-path: web/package-lock.json
|
||||
- name: Build web dashboard
|
||||
run: cd web && npm ci && npm run build
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: web-dist
|
||||
path: web/dist/
|
||||
retention-days: 1
|
||||
|
||||
build:
|
||||
name: Build ${{ matrix.target }}
|
||||
needs: [version, web]
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: 40
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
target: x86_64-unknown-linux-gnu
|
||||
artifact: zeroclaw
|
||||
ext: tar.gz
|
||||
- os: ubuntu-latest
|
||||
target: aarch64-unknown-linux-gnu
|
||||
artifact: zeroclaw
|
||||
ext: tar.gz
|
||||
cross_compiler: gcc-aarch64-linux-gnu
|
||||
linker_env: CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER
|
||||
linker: aarch64-linux-gnu-gcc
|
||||
- os: macos-14
|
||||
target: aarch64-apple-darwin
|
||||
artifact: zeroclaw
|
||||
ext: tar.gz
|
||||
- os: ubuntu-latest
|
||||
target: aarch64-linux-android
|
||||
artifact: zeroclaw
|
||||
ext: tar.gz
|
||||
ndk: true
|
||||
- os: windows-latest
|
||||
target: x86_64-pc-windows-msvc
|
||||
artifact: zeroclaw.exe
|
||||
ext: zip
|
||||
steps:
|
||||
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
- uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable
|
||||
with:
|
||||
toolchain: 1.92.0
|
||||
targets: ${{ matrix.target }}
|
||||
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
|
||||
if: runner.os != 'Windows'
|
||||
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: web-dist
|
||||
path: web/dist/
|
||||
|
||||
- name: Install cross compiler
|
||||
if: matrix.cross_compiler
|
||||
run: |
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -y ${{ matrix.cross_compiler }}
|
||||
|
||||
- name: Setup Android NDK
|
||||
if: matrix.ndk
|
||||
run: echo "$ANDROID_NDK/toolchains/llvm/prebuilt/linux-x86_64/bin" >> "$GITHUB_PATH"
|
||||
|
||||
- name: Build release
|
||||
shell: bash
|
||||
run: |
|
||||
if [ -n "${{ matrix.linker_env || '' }}" ] && [ -n "${{ matrix.linker || '' }}" ]; then
|
||||
export "${{ matrix.linker_env }}=${{ matrix.linker }}"
|
||||
fi
|
||||
cargo build --release --locked --target ${{ matrix.target }}
|
||||
|
||||
- name: Package (Unix)
|
||||
if: runner.os != 'Windows'
|
||||
run: |
|
||||
cd target/${{ matrix.target }}/release
|
||||
tar czf ../../../zeroclaw-${{ matrix.target }}.${{ matrix.ext }} ${{ matrix.artifact }}
|
||||
|
||||
- name: Package (Windows)
|
||||
if: runner.os == 'Windows'
|
||||
run: |
|
||||
cd target/${{ matrix.target }}/release
|
||||
7z a ../../../zeroclaw-${{ matrix.target }}.${{ matrix.ext }} ${{ matrix.artifact }}
|
||||
|
||||
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
||||
with:
|
||||
name: zeroclaw-${{ matrix.target }}
|
||||
path: zeroclaw-${{ matrix.target }}.${{ matrix.ext }}
|
||||
retention-days: 7
|
||||
|
||||
publish:
|
||||
name: Publish Beta Release
|
||||
needs: [version, release-notes, build]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
|
||||
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
|
||||
with:
|
||||
pattern: zeroclaw-*
|
||||
path: artifacts
|
||||
|
||||
- name: Generate checksums
|
||||
run: |
|
||||
cd artifacts
|
||||
find . -type f \( -name '*.tar.gz' -o -name '*.zip' \) -exec sha256sum {} + | sed 's| \./[^/]*/| |' > SHA256SUMS
|
||||
cat SHA256SUMS
|
||||
|
||||
- name: Collect release assets
|
||||
run: |
|
||||
mkdir -p release-assets
|
||||
find artifacts -type f \( -name '*.tar.gz' -o -name '*.zip' -o -name 'SHA256SUMS' \) -exec cp {} release-assets/ \;
|
||||
cp install.sh release-assets/
|
||||
echo "--- Assets ---"
|
||||
ls -lh release-assets/
|
||||
|
||||
- name: Write release notes
|
||||
env:
|
||||
NOTES: ${{ needs.release-notes.outputs.notes }}
|
||||
run: printf '%s\n' "$NOTES" > release-notes.md
|
||||
|
||||
- name: Create GitHub Release
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||
TAG: ${{ needs.version.outputs.tag }}
|
||||
run: |
|
||||
gh release create "$TAG" release-assets/* \
|
||||
--repo "${{ github.repository }}" \
|
||||
--title "$TAG" \
|
||||
--notes-file release-notes.md \
|
||||
--prerelease
|
||||
|
||||
redeploy-website:
|
||||
name: Trigger Website Redeploy
|
||||
needs: [publish]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Trigger website redeploy
|
||||
env:
|
||||
PAT: ${{ secrets.WEBSITE_REPO_PAT }}
|
||||
run: |
|
||||
curl -fsSL -X POST \
|
||||
-H "Authorization: token $PAT" \
|
||||
-H "Accept: application/vnd.github+json" \
|
||||
https://api.github.com/repos/zeroclaw-labs/zeroclaw-website/dispatches \
|
||||
-d '{"event_type":"new-release","client_payload":{"install_script_url":"https://raw.githubusercontent.com/zeroclaw-labs/zeroclaw/master/install.sh"}}'
|
||||
|
||||
docker:
|
||||
name: Push Docker Image
|
||||
needs: [version, build]
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
|
||||
- uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
|
||||
|
||||
- uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: |
|
||||
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ needs.version.outputs.tag }}
|
||||
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:beta
|
||||
platforms: linux/amd64,linux/arm64
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
|
||||
# ── Post-publish: only run after ALL artifacts are live ──────────────
|
||||
tweet:
|
||||
name: Tweet Release
|
||||
needs: [version, publish, docker, redeploy-website]
|
||||
uses: ./.github/workflows/tweet-release.yml
|
||||
with:
|
||||
release_tag: ${{ needs.version.outputs.tag }}
|
||||
release_url: https://github.com/zeroclaw-labs/zeroclaw/releases/tag/${{ needs.version.outputs.tag }}
|
||||
secrets: inherit
|
||||
@@ -0,0 +1,365 @@
|
||||
name: Release Stable
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: "Stable version to release (e.g. 0.2.0)"
|
||||
required: true
|
||||
type: string
|
||||
|
||||
concurrency:
|
||||
group: promote-release
|
||||
cancel-in-progress: false
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
packages: write
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: ${{ github.repository }}
|
||||
|
||||
jobs:
|
||||
validate:
|
||||
name: Validate Version
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
tag: ${{ steps.check.outputs.tag }}
|
||||
steps:
|
||||
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
- name: Validate semver and Cargo.toml match
|
||||
id: check
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
input_version="${{ inputs.version }}"
|
||||
cargo_version=$(sed -n 's/^version = "\([^"]*\)"/\1/p' Cargo.toml | head -1)
|
||||
|
||||
if [[ ! "$input_version" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
||||
echo "::error::Version must be semver (X.Y.Z). Got: ${input_version}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ "$cargo_version" != "$input_version" ]]; then
|
||||
echo "::error::Cargo.toml version (${cargo_version}) does not match input (${input_version}). Bump Cargo.toml first."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
tag="v${input_version}"
|
||||
if git ls-remote --exit-code --tags origin "refs/tags/${tag}" >/dev/null 2>&1; then
|
||||
echo "::error::Tag ${tag} already exists."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "tag=${tag}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
web:
|
||||
name: Build Web Dashboard
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
cache: npm
|
||||
cache-dependency-path: web/package-lock.json
|
||||
- name: Build web dashboard
|
||||
run: cd web && npm ci && npm run build
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: web-dist
|
||||
path: web/dist/
|
||||
retention-days: 1
|
||||
|
||||
release-notes:
|
||||
name: Generate Release Notes
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
notes: ${{ steps.notes.outputs.body }}
|
||||
steps:
|
||||
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Build release notes
|
||||
id: notes
|
||||
shell: bash
|
||||
env:
|
||||
INPUT_VERSION: ${{ inputs.version }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
||||
# Find the previous stable tag (exclude beta tags)
|
||||
PREV_TAG=$(git tag --sort=-creatordate | grep -vE '\-beta\.' | grep -v "^v${INPUT_VERSION}$" | head -1 || echo "")
|
||||
if [ -z "$PREV_TAG" ]; then
|
||||
RANGE="HEAD"
|
||||
else
|
||||
RANGE="${PREV_TAG}..HEAD"
|
||||
fi
|
||||
|
||||
# Extract features only — skip bug fixes for clean release notes
|
||||
FEATURES=$(git log "$RANGE" --pretty=format:"%s" --no-merges \
|
||||
| grep -iE '^feat(\(|:)' \
|
||||
| sed 's/^feat(\([^)]*\)): /\1: /' \
|
||||
| sed 's/^feat: //' \
|
||||
| sed 's/ (#[0-9]*)$//' \
|
||||
| sort -uf \
|
||||
| while IFS= read -r line; do echo "- ${line}"; done || true)
|
||||
|
||||
if [ -z "$FEATURES" ]; then
|
||||
FEATURES="- Incremental improvements and polish"
|
||||
fi
|
||||
|
||||
# Collect ALL unique contributors: git authors + Co-Authored-By
|
||||
GIT_AUTHORS=$(git log "$RANGE" --pretty=format:"%an" --no-merges | sort -uf || true)
|
||||
CO_AUTHORS=$(git log "$RANGE" --pretty=format:"%b" --no-merges \
|
||||
| grep -ioE 'Co-Authored-By: *[^<]+' \
|
||||
| sed 's/Co-Authored-By: *//i' \
|
||||
| sed 's/ *$//' \
|
||||
| sort -uf || true)
|
||||
|
||||
# Merge, deduplicate, and filter out bots
|
||||
ALL_CONTRIBUTORS=$(printf "%s\n%s" "$GIT_AUTHORS" "$CO_AUTHORS" \
|
||||
| sort -uf \
|
||||
| grep -v '^$' \
|
||||
| grep -viE '\[bot\]$|^dependabot|^github-actions|^copilot|^ZeroClaw Bot|^ZeroClaw Runner|^ZeroClaw Agent|^blacksmith' \
|
||||
| while IFS= read -r name; do echo "- ${name}"; done || true)
|
||||
|
||||
BODY=$(cat <<NOTES_EOF
|
||||
## What's New
|
||||
|
||||
${FEATURES}
|
||||
|
||||
## Contributors
|
||||
|
||||
${ALL_CONTRIBUTORS}
|
||||
|
||||
---
|
||||
*Full changelog: ${PREV_TAG}...v${INPUT_VERSION}*
|
||||
NOTES_EOF
|
||||
)
|
||||
|
||||
{
|
||||
echo "body<<BODY_EOF"
|
||||
echo "$BODY"
|
||||
echo "BODY_EOF"
|
||||
} >> "$GITHUB_OUTPUT"
|
||||
|
||||
build:
|
||||
name: Build ${{ matrix.target }}
|
||||
needs: [validate, web]
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: 40
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
target: x86_64-unknown-linux-gnu
|
||||
artifact: zeroclaw
|
||||
ext: tar.gz
|
||||
- os: ubuntu-latest
|
||||
target: aarch64-unknown-linux-gnu
|
||||
artifact: zeroclaw
|
||||
ext: tar.gz
|
||||
cross_compiler: gcc-aarch64-linux-gnu
|
||||
linker_env: CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER
|
||||
linker: aarch64-linux-gnu-gcc
|
||||
- os: macos-14
|
||||
target: aarch64-apple-darwin
|
||||
artifact: zeroclaw
|
||||
ext: tar.gz
|
||||
- os: ubuntu-latest
|
||||
target: aarch64-linux-android
|
||||
artifact: zeroclaw
|
||||
ext: tar.gz
|
||||
ndk: true
|
||||
- os: windows-latest
|
||||
target: x86_64-pc-windows-msvc
|
||||
artifact: zeroclaw.exe
|
||||
ext: zip
|
||||
steps:
|
||||
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
- uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable
|
||||
with:
|
||||
toolchain: 1.92.0
|
||||
targets: ${{ matrix.target }}
|
||||
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
|
||||
if: runner.os != 'Windows'
|
||||
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: web-dist
|
||||
path: web/dist/
|
||||
|
||||
- name: Install cross compiler
|
||||
if: matrix.cross_compiler
|
||||
run: |
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -y ${{ matrix.cross_compiler }}
|
||||
|
||||
- name: Setup Android NDK
|
||||
if: matrix.ndk
|
||||
run: echo "$ANDROID_NDK/toolchains/llvm/prebuilt/linux-x86_64/bin" >> "$GITHUB_PATH"
|
||||
|
||||
- name: Build release
|
||||
shell: bash
|
||||
run: |
|
||||
if [ -n "${{ matrix.linker_env || '' }}" ] && [ -n "${{ matrix.linker || '' }}" ]; then
|
||||
export "${{ matrix.linker_env }}=${{ matrix.linker }}"
|
||||
fi
|
||||
cargo build --release --locked --target ${{ matrix.target }}
|
||||
|
||||
- name: Package (Unix)
|
||||
if: runner.os != 'Windows'
|
||||
run: |
|
||||
cd target/${{ matrix.target }}/release
|
||||
tar czf ../../../zeroclaw-${{ matrix.target }}.${{ matrix.ext }} ${{ matrix.artifact }}
|
||||
|
||||
- name: Package (Windows)
|
||||
if: runner.os == 'Windows'
|
||||
run: |
|
||||
cd target/${{ matrix.target }}/release
|
||||
7z a ../../../zeroclaw-${{ matrix.target }}.${{ matrix.ext }} ${{ matrix.artifact }}
|
||||
|
||||
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
||||
with:
|
||||
name: zeroclaw-${{ matrix.target }}
|
||||
path: zeroclaw-${{ matrix.target }}.${{ matrix.ext }}
|
||||
retention-days: 14
|
||||
|
||||
publish:
|
||||
name: Publish Stable Release
|
||||
needs: [validate, release-notes, build]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
|
||||
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
|
||||
with:
|
||||
pattern: zeroclaw-*
|
||||
path: artifacts
|
||||
|
||||
- name: Generate checksums
|
||||
run: |
|
||||
cd artifacts
|
||||
find . -type f \( -name '*.tar.gz' -o -name '*.zip' \) -exec sha256sum {} + | sed 's| \./[^/]*/| |' > SHA256SUMS
|
||||
cat SHA256SUMS
|
||||
|
||||
- name: Collect release assets
|
||||
run: |
|
||||
mkdir -p release-assets
|
||||
find artifacts -type f \( -name '*.tar.gz' -o -name '*.zip' -o -name 'SHA256SUMS' \) -exec cp {} release-assets/ \;
|
||||
cp install.sh release-assets/
|
||||
echo "--- Assets ---"
|
||||
ls -lh release-assets/
|
||||
|
||||
- name: Write release notes
|
||||
env:
|
||||
NOTES: ${{ needs.release-notes.outputs.notes }}
|
||||
run: printf '%s\n' "$NOTES" > release-notes.md
|
||||
|
||||
- name: Create GitHub Release
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||
TAG: ${{ needs.validate.outputs.tag }}
|
||||
run: |
|
||||
gh release create "$TAG" release-assets/* \
|
||||
--repo "${{ github.repository }}" \
|
||||
--title "$TAG" \
|
||||
--notes-file release-notes.md \
|
||||
--latest
|
||||
|
||||
crates-io:
|
||||
name: Publish to crates.io
|
||||
needs: [validate, publish]
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
toolchain: 1.92.0
|
||||
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
cache: npm
|
||||
cache-dependency-path: web/package-lock.json
|
||||
|
||||
- name: Build web dashboard
|
||||
run: cd web && npm ci && npm run build
|
||||
|
||||
- name: Clean web build artifacts
|
||||
run: rm -rf web/node_modules web/src web/package.json web/package-lock.json web/tsconfig*.json web/vite.config.ts web/index.html
|
||||
|
||||
- name: Publish to crates.io
|
||||
env:
|
||||
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
||||
VERSION: ${{ inputs.version }}
|
||||
run: |
|
||||
# Skip if this version is already on crates.io (auto-sync may have published it)
|
||||
CRATE_NAME=$(sed -n 's/^name = "\([^"]*\)"/\1/p' Cargo.toml | head -1)
|
||||
if curl -sfL "https://crates.io/api/v1/crates/${CRATE_NAME}/${VERSION}" | grep -q '"version"'; then
|
||||
echo "::notice::${CRATE_NAME}@${VERSION} already published on crates.io — skipping"
|
||||
else
|
||||
cargo publish --locked --allow-dirty --no-verify
|
||||
fi
|
||||
|
||||
redeploy-website:
|
||||
name: Trigger Website Redeploy
|
||||
needs: [publish]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Trigger website redeploy
|
||||
env:
|
||||
PAT: ${{ secrets.WEBSITE_REPO_PAT }}
|
||||
run: |
|
||||
curl -fsSL -X POST \
|
||||
-H "Authorization: token $PAT" \
|
||||
-H "Accept: application/vnd.github+json" \
|
||||
https://api.github.com/repos/zeroclaw-labs/zeroclaw-website/dispatches \
|
||||
-d '{"event_type":"new-release","client_payload":{"install_script_url":"https://raw.githubusercontent.com/zeroclaw-labs/zeroclaw/master/install.sh"}}'
|
||||
|
||||
docker:
|
||||
name: Push Docker Image
|
||||
needs: [validate, build]
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
|
||||
- uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
|
||||
|
||||
- uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: |
|
||||
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ needs.validate.outputs.tag }}
|
||||
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
|
||||
platforms: linux/amd64,linux/arm64
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
|
||||
# ── Post-publish: only run after ALL artifacts are live ──────────────
|
||||
tweet:
|
||||
name: Tweet Release
|
||||
needs: [validate, publish, docker, crates-io, redeploy-website]
|
||||
uses: ./.github/workflows/tweet-release.yml
|
||||
with:
|
||||
release_tag: ${{ needs.validate.outputs.tag }}
|
||||
release_url: https://github.com/zeroclaw-labs/zeroclaw/releases/tag/${{ needs.validate.outputs.tag }}
|
||||
secrets: inherit
|
||||
@@ -1,164 +0,0 @@
|
||||
name: Beta Release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
|
||||
concurrency:
|
||||
group: release
|
||||
cancel-in-progress: false
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
packages: write
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: ${{ github.repository }}
|
||||
|
||||
jobs:
|
||||
version:
|
||||
name: Resolve Version
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
version: ${{ steps.ver.outputs.version }}
|
||||
tag: ${{ steps.ver.outputs.tag }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Compute beta version
|
||||
id: ver
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
base_version=$(sed -n 's/^version = "\([^"]*\)"/\1/p' Cargo.toml | head -1)
|
||||
beta_tag="v${base_version}-beta.${GITHUB_RUN_NUMBER}"
|
||||
echo "version=${base_version}" >> "$GITHUB_OUTPUT"
|
||||
echo "tag=${beta_tag}" >> "$GITHUB_OUTPUT"
|
||||
echo "Beta release: ${beta_tag}"
|
||||
|
||||
build:
|
||||
name: Build ${{ matrix.target }}
|
||||
needs: [version]
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: 40
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
target: x86_64-unknown-linux-gnu
|
||||
artifact: zeroclaw
|
||||
ext: tar.gz
|
||||
- os: ubuntu-latest
|
||||
target: aarch64-unknown-linux-gnu
|
||||
artifact: zeroclaw
|
||||
ext: tar.gz
|
||||
cross_compiler: gcc-aarch64-linux-gnu
|
||||
linker_env: CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER
|
||||
linker: aarch64-linux-gnu-gcc
|
||||
- os: macos-14
|
||||
target: aarch64-apple-darwin
|
||||
artifact: zeroclaw
|
||||
ext: tar.gz
|
||||
- os: windows-latest
|
||||
target: x86_64-pc-windows-msvc
|
||||
artifact: zeroclaw.exe
|
||||
ext: zip
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
toolchain: 1.92.0
|
||||
targets: ${{ matrix.target }}
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
if: runner.os != 'Windows'
|
||||
|
||||
- name: Install cross compiler
|
||||
if: matrix.cross_compiler
|
||||
run: |
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -y ${{ matrix.cross_compiler }}
|
||||
|
||||
- name: Build release
|
||||
shell: bash
|
||||
run: |
|
||||
if [ -n "${{ matrix.linker_env || '' }}" ] && [ -n "${{ matrix.linker || '' }}" ]; then
|
||||
export "${{ matrix.linker_env }}=${{ matrix.linker }}"
|
||||
fi
|
||||
cargo build --release --locked --target ${{ matrix.target }}
|
||||
|
||||
- name: Package (Unix)
|
||||
if: runner.os != 'Windows'
|
||||
run: |
|
||||
cd target/${{ matrix.target }}/release
|
||||
tar czf ../../../zeroclaw-${{ matrix.target }}.${{ matrix.ext }} ${{ matrix.artifact }}
|
||||
|
||||
- name: Package (Windows)
|
||||
if: runner.os == 'Windows'
|
||||
run: |
|
||||
cd target/${{ matrix.target }}/release
|
||||
7z a ../../../zeroclaw-${{ matrix.target }}.${{ matrix.ext }} ${{ matrix.artifact }}
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: zeroclaw-${{ matrix.target }}
|
||||
path: zeroclaw-${{ matrix.target }}.${{ matrix.ext }}
|
||||
retention-days: 7
|
||||
|
||||
publish:
|
||||
name: Publish Beta Release
|
||||
needs: [version, build]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: artifacts
|
||||
|
||||
- name: Generate checksums
|
||||
run: |
|
||||
cd artifacts
|
||||
find . -type f \( -name '*.tar.gz' -o -name '*.zip' \) -exec sha256sum {} + | sed 's| \./[^/]*/| |' > SHA256SUMS
|
||||
cat SHA256SUMS
|
||||
|
||||
- name: Create GitHub Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
tag_name: ${{ needs.version.outputs.tag }}
|
||||
name: ${{ needs.version.outputs.tag }}
|
||||
prerelease: true
|
||||
generate_release_notes: true
|
||||
files: |
|
||||
artifacts/**/*
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
docker:
|
||||
name: Push Docker Image
|
||||
needs: [version, build]
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: docker/setup-buildx-action@v3
|
||||
|
||||
- uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: |
|
||||
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ needs.version.outputs.tag }}
|
||||
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:beta
|
||||
platforms: linux/amd64,linux/arm64
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
@@ -0,0 +1,315 @@
|
||||
name: Tweet Release
|
||||
|
||||
on:
|
||||
# Called by release workflows AFTER all publish steps (docker, crates, website) complete.
|
||||
workflow_call:
|
||||
inputs:
|
||||
release_tag:
|
||||
description: "Release tag (e.g. v0.3.0 or v0.3.0-beta.42)"
|
||||
required: true
|
||||
type: string
|
||||
release_url:
|
||||
description: "GitHub Release URL"
|
||||
required: true
|
||||
type: string
|
||||
secrets:
|
||||
TWITTER_CONSUMER_API_KEY:
|
||||
required: false
|
||||
TWITTER_CONSUMER_API_SECRET_KEY:
|
||||
required: false
|
||||
TWITTER_ACCESS_TOKEN:
|
||||
required: false
|
||||
TWITTER_ACCESS_TOKEN_SECRET:
|
||||
required: false
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tweet_text:
|
||||
description: "Custom tweet text (include emojis, keep it punchy)"
|
||||
required: true
|
||||
type: string
|
||||
image_url:
|
||||
description: "Optional image URL to attach (png/jpg)"
|
||||
required: false
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
tweet:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Check for new features
|
||||
id: check
|
||||
shell: bash
|
||||
env:
|
||||
RELEASE_TAG: ${{ inputs.release_tag || '' }}
|
||||
MANUAL_TEXT: ${{ inputs.tweet_text || '' }}
|
||||
run: |
|
||||
# Manual dispatch always proceeds
|
||||
if [ -n "$MANUAL_TEXT" ]; then
|
||||
echo "skip=false" >> "$GITHUB_OUTPUT"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Find the PREVIOUS release tag (including betas) to check for new features
|
||||
PREV_TAG=$(git tag --sort=-creatordate \
|
||||
| grep -v "^${RELEASE_TAG}$" \
|
||||
| head -1 || echo "")
|
||||
|
||||
if [ -z "$PREV_TAG" ]; then
|
||||
echo "skip=false" >> "$GITHUB_OUTPUT"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Count new feat() commits since the previous release
|
||||
NEW_FEATS=$(git log "${PREV_TAG}..${RELEASE_TAG}" --pretty=format:"%s" --no-merges \
|
||||
| grep -ciE '^feat(\(|:)' || echo "0")
|
||||
|
||||
if [ "$NEW_FEATS" -eq 0 ]; then
|
||||
echo "No new features since ${PREV_TAG} — skipping tweet"
|
||||
echo "skip=true" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "${NEW_FEATS} new feature(s) since ${PREV_TAG} — tweeting"
|
||||
echo "skip=false" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
- name: Build tweet text
|
||||
id: tweet
|
||||
if: steps.check.outputs.skip != 'true'
|
||||
shell: bash
|
||||
env:
|
||||
RELEASE_TAG: ${{ inputs.release_tag || '' }}
|
||||
RELEASE_URL: ${{ inputs.release_url || '' }}
|
||||
MANUAL_TEXT: ${{ inputs.tweet_text || '' }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
||||
if [ -n "$MANUAL_TEXT" ]; then
|
||||
TWEET="$MANUAL_TEXT"
|
||||
else
|
||||
# For features: diff against the PREVIOUS release (including betas)
|
||||
# This prevents duplicate feature lists across consecutive betas
|
||||
PREV_RELEASE=$(git tag --sort=-creatordate \
|
||||
| grep -v "^${RELEASE_TAG}$" \
|
||||
| head -1 || echo "")
|
||||
|
||||
# For contributors: diff against the last STABLE release
|
||||
# This captures everyone across the full release cycle
|
||||
PREV_STABLE=$(git tag --sort=-creatordate \
|
||||
| grep -v "^${RELEASE_TAG}$" \
|
||||
| grep -vE '\-beta\.' \
|
||||
| head -1 || echo "")
|
||||
|
||||
FEAT_RANGE="${PREV_RELEASE:+${PREV_RELEASE}..}${RELEASE_TAG}"
|
||||
CONTRIB_RANGE="${PREV_STABLE:+${PREV_STABLE}..}${RELEASE_TAG}"
|
||||
|
||||
# Extract NEW features only since the last release
|
||||
FEATURES=$(git log "$FEAT_RANGE" --pretty=format:"%s" --no-merges \
|
||||
| grep -iE '^feat(\(|:)' \
|
||||
| sed 's/^feat(\([^)]*\)): /\1: /' \
|
||||
| sed 's/^feat: //' \
|
||||
| sed 's/ (#[0-9]*)$//' \
|
||||
| sort -uf \
|
||||
| head -4 \
|
||||
| while IFS= read -r line; do echo "🚀 ${line}"; done || true)
|
||||
|
||||
if [ -z "$FEATURES" ]; then
|
||||
FEATURES="🚀 Incremental improvements and polish"
|
||||
fi
|
||||
|
||||
# Count ALL contributors across the full release cycle
|
||||
GIT_AUTHORS=$(git log "$CONTRIB_RANGE" --pretty=format:"%an" --no-merges | sort -uf || true)
|
||||
CO_AUTHORS=$(git log "$CONTRIB_RANGE" --pretty=format:"%b" --no-merges \
|
||||
| grep -ioE 'Co-Authored-By: *[^<]+' \
|
||||
| sed 's/Co-Authored-By: *//i' \
|
||||
| sed 's/ *$//' \
|
||||
| sort -uf || true)
|
||||
|
||||
TOTAL_COUNT=$(printf "%s\n%s" "$GIT_AUTHORS" "$CO_AUTHORS" \
|
||||
| sort -uf \
|
||||
| grep -v '^$' \
|
||||
| grep -viE '\[bot\]$|^dependabot|^github-actions|^copilot|^ZeroClaw Bot|^ZeroClaw Runner|^ZeroClaw Agent|^blacksmith' \
|
||||
| grep -c . || echo "0")
|
||||
|
||||
# Build tweet — new features, contributor count, hashtags
|
||||
TWEET=$(printf "🦀 ZeroClaw %s\n\n%s\n\n🙌 %s contributors\n\n%s\n\n#zeroclaw #rust #ai #opensource" \
|
||||
"$RELEASE_TAG" "$FEATURES" "$TOTAL_COUNT" "$RELEASE_URL")
|
||||
fi
|
||||
|
||||
# X/Twitter counts any URL as 23 chars (t.co shortening).
|
||||
# Extract the URL (if present), truncate the BODY to fit, then
|
||||
# re-append the URL so it is never chopped.
|
||||
URL=""
|
||||
BODY="$TWEET"
|
||||
|
||||
# Pull URL out of existing tweet text or use RELEASE_URL
|
||||
FOUND_URL=$(echo "$TWEET" | grep -oE 'https?://[^ ]+' | tail -1 || true)
|
||||
if [ -n "$FOUND_URL" ]; then
|
||||
URL="$FOUND_URL"
|
||||
BODY=$(echo "$TWEET" | sed "s|${URL}||" | sed -e 's/[[:space:]]*$//')
|
||||
elif [ -n "$RELEASE_URL" ]; then
|
||||
URL="$RELEASE_URL"
|
||||
fi
|
||||
|
||||
if [ -n "$URL" ]; then
|
||||
# URL counts as 23 chars on X + 2 chars for \n\n separator = 25
|
||||
MAX_BODY=$((280 - 25))
|
||||
if [ ${#BODY} -gt $MAX_BODY ]; then
|
||||
BODY="${BODY:0:$((MAX_BODY - 3))}..."
|
||||
fi
|
||||
TWEET=$(printf "%s\n\n%s" "$BODY" "$URL")
|
||||
else
|
||||
if [ ${#TWEET} -gt 280 ]; then
|
||||
TWEET="${TWEET:0:277}..."
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "--- Tweet preview ---"
|
||||
echo "$TWEET"
|
||||
echo "--- ${#TWEET} chars ---"
|
||||
|
||||
{
|
||||
echo "text<<TWEET_EOF"
|
||||
echo "$TWEET"
|
||||
echo "TWEET_EOF"
|
||||
} >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Check for duplicate tweet
|
||||
id: dedup
|
||||
if: steps.check.outputs.skip != 'true'
|
||||
shell: bash
|
||||
env:
|
||||
TWEET_TEXT: ${{ steps.tweet.outputs.text }}
|
||||
run: |
|
||||
# Hash the tweet content (ignore whitespace differences)
|
||||
TWEET_HASH=$(echo "$TWEET_TEXT" | tr -s '[:space:]' | sha256sum | cut -d' ' -f1)
|
||||
echo "hash=${TWEET_HASH}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
# Check if we already have a cache hit for this exact tweet
|
||||
MARKER_FILE="/tmp/tweet-dedup-${TWEET_HASH}"
|
||||
echo "$TWEET_HASH" > "$MARKER_FILE"
|
||||
|
||||
- uses: actions/cache@v4
|
||||
if: steps.check.outputs.skip != 'true'
|
||||
id: tweet-cache
|
||||
with:
|
||||
path: /tmp/tweet-dedup-${{ steps.dedup.outputs.hash }}
|
||||
key: tweet-${{ steps.dedup.outputs.hash }}
|
||||
|
||||
- name: Skip duplicate tweet
|
||||
if: steps.check.outputs.skip != 'true' && steps.tweet-cache.outputs.cache-hit == 'true'
|
||||
run: |
|
||||
echo "::warning::Duplicate tweet detected (hash=${{ steps.dedup.outputs.hash }}) — skipping"
|
||||
echo "This exact tweet was already posted in a previous run."
|
||||
|
||||
- name: Post to X
|
||||
if: steps.check.outputs.skip != 'true' && steps.tweet-cache.outputs.cache-hit != 'true'
|
||||
shell: bash
|
||||
env:
|
||||
TWITTER_CONSUMER_KEY: ${{ secrets.TWITTER_CONSUMER_API_KEY }}
|
||||
TWITTER_CONSUMER_SECRET: ${{ secrets.TWITTER_CONSUMER_API_SECRET_KEY }}
|
||||
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
|
||||
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
|
||||
TWEET_TEXT: ${{ steps.tweet.outputs.text }}
|
||||
IMAGE_URL: ${{ inputs.image_url || '' }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
||||
# Skip if Twitter secrets are not configured
|
||||
if [ -z "$TWITTER_CONSUMER_KEY" ] || [ -z "$TWITTER_ACCESS_TOKEN" ]; then
|
||||
echo "::warning::Twitter secrets not configured — skipping tweet"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
pip install requests requests-oauthlib --quiet
|
||||
|
||||
python3 - <<'PYEOF'
|
||||
import os, sys, time
|
||||
from requests_oauthlib import OAuth1Session
|
||||
|
||||
consumer_key = os.environ["TWITTER_CONSUMER_KEY"]
|
||||
consumer_secret = os.environ["TWITTER_CONSUMER_SECRET"]
|
||||
access_token = os.environ["TWITTER_ACCESS_TOKEN"]
|
||||
access_token_secret = os.environ["TWITTER_ACCESS_TOKEN_SECRET"]
|
||||
tweet_text = os.environ["TWEET_TEXT"]
|
||||
image_url = os.environ.get("IMAGE_URL", "")
|
||||
|
||||
oauth = OAuth1Session(
|
||||
consumer_key,
|
||||
client_secret=consumer_secret,
|
||||
resource_owner_key=access_token,
|
||||
resource_owner_secret=access_token_secret,
|
||||
)
|
||||
|
||||
media_id = None
|
||||
|
||||
# Upload image if provided
|
||||
if image_url:
|
||||
import requests
|
||||
print(f"Downloading image: {image_url}")
|
||||
img_resp = requests.get(image_url, timeout=30)
|
||||
img_resp.raise_for_status()
|
||||
|
||||
content_type = img_resp.headers.get("content-type", "image/png")
|
||||
init_resp = oauth.post(
|
||||
"https://upload.twitter.com/1.1/media/upload.json",
|
||||
data={
|
||||
"command": "INIT",
|
||||
"total_bytes": len(img_resp.content),
|
||||
"media_type": content_type,
|
||||
},
|
||||
)
|
||||
if init_resp.status_code != 202:
|
||||
print(f"Media INIT failed: {init_resp.status_code} {init_resp.text}", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
media_id = init_resp.json()["media_id_string"]
|
||||
|
||||
append_resp = oauth.post(
|
||||
"https://upload.twitter.com/1.1/media/upload.json",
|
||||
data={"command": "APPEND", "media_id": media_id, "segment_index": 0},
|
||||
files={"media_data": img_resp.content},
|
||||
)
|
||||
if append_resp.status_code not in (200, 204):
|
||||
print(f"Media APPEND failed: {append_resp.status_code} {append_resp.text}", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
fin_resp = oauth.post(
|
||||
"https://upload.twitter.com/1.1/media/upload.json",
|
||||
data={"command": "FINALIZE", "media_id": media_id},
|
||||
)
|
||||
if fin_resp.status_code not in (200, 201):
|
||||
print(f"Media FINALIZE failed: {fin_resp.status_code} {fin_resp.text}", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
state = fin_resp.json().get("processing_info", {}).get("state")
|
||||
while state == "pending" or state == "in_progress":
|
||||
wait = fin_resp.json().get("processing_info", {}).get("check_after_secs", 2)
|
||||
time.sleep(wait)
|
||||
status_resp = oauth.get(
|
||||
"https://upload.twitter.com/1.1/media/upload.json",
|
||||
params={"command": "STATUS", "media_id": media_id},
|
||||
)
|
||||
state = status_resp.json().get("processing_info", {}).get("state")
|
||||
fin_resp = status_resp
|
||||
|
||||
print(f"Image uploaded: media_id={media_id}")
|
||||
|
||||
# Post tweet
|
||||
payload = {"text": tweet_text}
|
||||
if media_id:
|
||||
payload["media"] = {"media_ids": [media_id]}
|
||||
|
||||
resp = oauth.post("https://api.x.com/2/tweets", json=payload)
|
||||
|
||||
if resp.status_code == 201:
|
||||
data = resp.json()
|
||||
tweet_id = data["data"]["id"]
|
||||
print(f"Tweet posted: https://x.com/zeroclawlabs/status/{tweet_id}")
|
||||
else:
|
||||
print(f"Failed to post tweet: {resp.status_code}", file=sys.stderr)
|
||||
print(resp.text, file=sys.stderr)
|
||||
sys.exit(1)
|
||||
PYEOF
|
||||
+18
@@ -1,5 +1,6 @@
|
||||
/target
|
||||
firmware/*/target
|
||||
web/dist/
|
||||
*.db
|
||||
*.db-journal
|
||||
.DS_Store
|
||||
@@ -29,3 +30,20 @@ venv/
|
||||
*.pem
|
||||
credentials.json
|
||||
.worktrees/
|
||||
.zeroclaw/*
|
||||
|
||||
# Skill eval workspaces (test outputs, transcripts, grading)
|
||||
.claude/skills/*-workspace/
|
||||
|
||||
# Local state backups
|
||||
.local-state-backups/
|
||||
*.local-state-backup/
|
||||
|
||||
# Coverage artifacts
|
||||
lcov.info
|
||||
|
||||
# IDE's stuff
|
||||
.idea
|
||||
|
||||
# Wrangler cache
|
||||
.wrangler/
|
||||
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"recommendations": [
|
||||
"rust-lang.rust-analyzer",
|
||||
"vadimcn.vscode-lldb",
|
||||
"serayuzgur.crates",
|
||||
"bungcip.better-toml",
|
||||
"usernamehw.errorlens",
|
||||
"eamodio.gitlens",
|
||||
"tamasfe.even-better-toml",
|
||||
"dbaeumer.vscode-eslint",
|
||||
"oderwat.indent-rainbow",
|
||||
"ryanluker.vscode-coverage-gutters"
|
||||
]
|
||||
}
|
||||
Vendored
+73
@@ -0,0 +1,73 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"inputs": [
|
||||
{
|
||||
"id": "testName",
|
||||
"description": "Exact test name to debug (e.g. tests::my_test)",
|
||||
"type": "promptString",
|
||||
"default": ""
|
||||
}
|
||||
],
|
||||
"configurations": [
|
||||
// ── Runtime ───────────────────────────────────────────
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "Debug: Agent",
|
||||
"program": "${workspaceFolder}/target/debug/zeroclaw",
|
||||
"args": ["agent"],
|
||||
"cwd": "${workspaceFolder}",
|
||||
"preLaunchTask": "Build: Debug"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "Debug: Gateway",
|
||||
"program": "${workspaceFolder}/target/debug/zeroclaw",
|
||||
"args": ["gateway"],
|
||||
"cwd": "${workspaceFolder}",
|
||||
"preLaunchTask": "Build: Debug"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "Debug: Daemon",
|
||||
"program": "${workspaceFolder}/target/debug/zeroclaw",
|
||||
"args": ["daemon"],
|
||||
"cwd": "${workspaceFolder}",
|
||||
"preLaunchTask": "Build: Debug"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "Debug: Status",
|
||||
"program": "${workspaceFolder}/target/debug/zeroclaw",
|
||||
"args": ["status"],
|
||||
"cwd": "${workspaceFolder}",
|
||||
"preLaunchTask": "Build: Debug"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "Debug: Onboard",
|
||||
"program": "${workspaceFolder}/target/debug/zeroclaw",
|
||||
"args": ["onboard"],
|
||||
"cwd": "${workspaceFolder}",
|
||||
"preLaunchTask": "Build: Debug"
|
||||
},
|
||||
// ── Test ──────────────────────────────────────────────
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "Debug: Test (by name)",
|
||||
"cargo": {
|
||||
"args": ["test", "--no-run", "--lib", "--"],
|
||||
"filter": {
|
||||
"kind": "lib"
|
||||
}
|
||||
},
|
||||
"args": ["--exact", "${input:testName}", "--nocapture"],
|
||||
"cwd": "${workspaceFolder}"
|
||||
}
|
||||
]
|
||||
}
|
||||
Vendored
+22
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"git.autofetch": true,
|
||||
"git.autofetchPeriod": 90,
|
||||
"search.exclude": {
|
||||
"**/target": true
|
||||
},
|
||||
"files.watcherExclude": {
|
||||
"**/target/**": true
|
||||
},
|
||||
"[rust]": {
|
||||
"editor.defaultFormatter": "rust-lang.rust-analyzer"
|
||||
},
|
||||
"editor.formatOnSave": true,
|
||||
"editor.formatOnPaste": true,
|
||||
"files.autoSave": "afterDelay",
|
||||
"files.autoSaveDelay": 1000,
|
||||
"rust-analyzer.check.command": "clippy",
|
||||
"rust-analyzer.check.extraArgs": ["--all-targets", "--", "-D", "warnings"],
|
||||
"window.title": "${activeRepositoryBranchName}",
|
||||
"coverage-gutters.coverageFileNames": ["lcov.info"],
|
||||
"git.postCommitCommand": "push"
|
||||
}
|
||||
Vendored
+133
@@ -0,0 +1,133 @@
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"inputs": [
|
||||
{
|
||||
"id": "testFilter",
|
||||
"description": "Test name or filter pattern",
|
||||
"type": "promptString",
|
||||
"default": ""
|
||||
}
|
||||
],
|
||||
"tasks": [
|
||||
// ── Build ──────────────────────────────────────────────
|
||||
{
|
||||
"label": "Build: Debug",
|
||||
"type": "shell",
|
||||
"command": "cargo",
|
||||
"args": ["build"],
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
},
|
||||
"problemMatcher": ["$rustc"]
|
||||
},
|
||||
{
|
||||
"label": "Build: Release",
|
||||
"type": "shell",
|
||||
"command": "cargo",
|
||||
"args": ["build", "--release"],
|
||||
"problemMatcher": ["$rustc"]
|
||||
},
|
||||
{
|
||||
"label": "Build: Check (fast)",
|
||||
"type": "shell",
|
||||
"command": "cargo",
|
||||
"args": ["check", "--all-targets"],
|
||||
"problemMatcher": ["$rustc"]
|
||||
},
|
||||
// ── Lint ───────────────────────────────────────────────
|
||||
{
|
||||
"label": "Lint: Clippy",
|
||||
"type": "shell",
|
||||
"command": "cargo",
|
||||
"args": ["clippy", "--all-targets", "--", "-D", "warnings"],
|
||||
"problemMatcher": ["$rustc"]
|
||||
},
|
||||
{
|
||||
"label": "Lint: Format Check",
|
||||
"type": "shell",
|
||||
"command": "cargo",
|
||||
"args": ["fmt", "--all", "--", "--check"],
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "Lint: Format Fix",
|
||||
"type": "shell",
|
||||
"command": "cargo",
|
||||
"args": ["fmt", "--all"],
|
||||
"problemMatcher": []
|
||||
},
|
||||
// ── Test ──────────────────────────────────────────────
|
||||
{
|
||||
"label": "Test: All",
|
||||
"type": "shell",
|
||||
"command": "cargo nextest --version >/dev/null 2>&1 || cargo install cargo-nextest && cargo nextest run",
|
||||
"group": {
|
||||
"kind": "test",
|
||||
"isDefault": true
|
||||
},
|
||||
"problemMatcher": ["$rustc"]
|
||||
},
|
||||
{
|
||||
"label": "Test: Filtered",
|
||||
"type": "shell",
|
||||
"command": "cargo nextest --version >/dev/null 2>&1 || cargo install cargo-nextest && cargo nextest run -E 'test(${input:testFilter})'",
|
||||
"problemMatcher": ["$rustc"]
|
||||
},
|
||||
{
|
||||
"label": "Test: Coverage Report",
|
||||
"type": "shell",
|
||||
"command": "cargo llvm-cov --version >/dev/null 2>&1 || cargo install cargo-llvm-cov && cargo llvm-cov --lcov --output-path lcov.info",
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "Test: Benchmarks",
|
||||
"type": "shell",
|
||||
"command": "cargo",
|
||||
"args": ["bench"],
|
||||
"problemMatcher": []
|
||||
},
|
||||
// ── Security ──────────────────────────────────────────
|
||||
{
|
||||
"label": "Security: Audit",
|
||||
"type": "shell",
|
||||
"command": "cargo audit --version >/dev/null 2>&1 || cargo install cargo-audit && cargo audit",
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "Security: Deny (licenses + sources)",
|
||||
"type": "shell",
|
||||
"command": "cargo deny --version >/dev/null 2>&1 || cargo install cargo-deny && cargo deny check licenses sources",
|
||||
"problemMatcher": []
|
||||
},
|
||||
// ── CI (Docker) ───────────────────────────────────────
|
||||
{
|
||||
"label": "CI: All (Docker)",
|
||||
"type": "shell",
|
||||
"command": "./dev/ci.sh",
|
||||
"args": ["all"],
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "CI: Lint (Docker)",
|
||||
"type": "shell",
|
||||
"command": "./dev/ci.sh",
|
||||
"args": ["lint"],
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "CI: Test (Docker)",
|
||||
"type": "shell",
|
||||
"command": "./dev/ci.sh",
|
||||
"args": ["test"],
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "CI: Security (Docker)",
|
||||
"type": "shell",
|
||||
"command": "./dev/ci.sh",
|
||||
"args": ["security"],
|
||||
"problemMatcher": []
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,483 +0,0 @@
|
||||
# AGENTS.md — ZeroClaw Agent Engineering Protocol
|
||||
|
||||
This file defines the default working protocol for coding agents in this repository.
|
||||
Scope: entire repository.
|
||||
|
||||
## 1) Project Snapshot (Read First)
|
||||
|
||||
ZeroClaw is a Rust-first autonomous agent runtime optimized for:
|
||||
|
||||
- high performance
|
||||
- high efficiency
|
||||
- high stability
|
||||
- high extensibility
|
||||
- high sustainability
|
||||
- high security
|
||||
|
||||
Core architecture is trait-driven and modular. Most extension work should be done by implementing traits and registering in factory modules.
|
||||
|
||||
Key extension points:
|
||||
|
||||
- `src/providers/traits.rs` (`Provider`)
|
||||
- `src/channels/traits.rs` (`Channel`)
|
||||
- `src/tools/traits.rs` (`Tool`)
|
||||
- `src/memory/traits.rs` (`Memory`)
|
||||
- `src/observability/traits.rs` (`Observer`)
|
||||
- `src/runtime/traits.rs` (`RuntimeAdapter`)
|
||||
- `src/peripherals/traits.rs` (`Peripheral`) — hardware boards (STM32, RPi GPIO)
|
||||
|
||||
## 2) Deep Architecture Observations (Why This Protocol Exists)
|
||||
|
||||
These codebase realities should drive every design decision:
|
||||
|
||||
1. **Trait + factory architecture is the stability backbone**
|
||||
- Extension points are intentionally explicit and swappable.
|
||||
- Most features should be added via trait implementation + factory registration, not cross-cutting rewrites.
|
||||
2. **Security-critical surfaces are first-class and internet-adjacent**
|
||||
- `src/gateway/`, `src/security/`, `src/tools/`, `src/runtime/` carry high blast radius.
|
||||
- Defaults already lean secure-by-default (pairing, bind safety, limits, secret handling); keep it that way.
|
||||
3. **Performance and binary size are product goals, not nice-to-have**
|
||||
- `Cargo.toml` release profile and dependency choices optimize for size and determinism.
|
||||
- Convenience dependencies and broad abstractions can silently regress these goals.
|
||||
4. **Config and runtime contracts are user-facing API**
|
||||
- `src/config/schema.rs` and CLI commands are effectively public interfaces.
|
||||
- Backward compatibility and explicit migration matter.
|
||||
5. **The project now runs in high-concurrency collaboration mode**
|
||||
- CI + docs governance + label routing are part of the product delivery system.
|
||||
- PR throughput is a design constraint; not just a maintainer inconvenience.
|
||||
|
||||
## 3) Engineering Principles (Normative)
|
||||
|
||||
These principles are mandatory by default. They are not slogans; they are implementation constraints.
|
||||
|
||||
### 3.1 KISS (Keep It Simple, Stupid)
|
||||
|
||||
**Why here:** Runtime + security behavior must stay auditable under pressure.
|
||||
|
||||
Required:
|
||||
|
||||
- Prefer straightforward control flow over clever meta-programming.
|
||||
- Prefer explicit match branches and typed structs over hidden dynamic behavior.
|
||||
- Keep error paths obvious and localized.
|
||||
|
||||
### 3.2 YAGNI (You Aren't Gonna Need It)
|
||||
|
||||
**Why here:** Premature features increase attack surface and maintenance burden.
|
||||
|
||||
Required:
|
||||
|
||||
- Do not add new config keys, trait methods, feature flags, or workflow branches without a concrete accepted use case.
|
||||
- Do not introduce speculative “future-proof” abstractions without at least one current caller.
|
||||
- Keep unsupported paths explicit (error out) rather than adding partial fake support.
|
||||
|
||||
### 3.3 DRY + Rule of Three
|
||||
|
||||
**Why here:** Naive DRY can create brittle shared abstractions across providers/channels/tools.
|
||||
|
||||
Required:
|
||||
|
||||
- Duplicate small, local logic when it preserves clarity.
|
||||
- Extract shared utilities only after repeated, stable patterns (rule-of-three).
|
||||
- When extracting, preserve module boundaries and avoid hidden coupling.
|
||||
|
||||
### 3.4 SRP + ISP (Single Responsibility + Interface Segregation)
|
||||
|
||||
**Why here:** Trait-driven architecture already encodes subsystem boundaries.
|
||||
|
||||
Required:
|
||||
|
||||
- Keep each module focused on one concern.
|
||||
- Extend behavior by implementing existing narrow traits whenever possible.
|
||||
- Avoid fat interfaces and “god modules” that mix policy + transport + storage.
|
||||
|
||||
### 3.5 Fail Fast + Explicit Errors
|
||||
|
||||
**Why here:** Silent fallback in agent runtimes can create unsafe or costly behavior.
|
||||
|
||||
Required:
|
||||
|
||||
- Prefer explicit `bail!`/errors for unsupported or unsafe states.
|
||||
- Never silently broaden permissions/capabilities.
|
||||
- Document fallback behavior when fallback is intentional and safe.
|
||||
|
||||
### 3.6 Secure by Default + Least Privilege
|
||||
|
||||
**Why here:** Gateway/tools/runtime can execute actions with real-world side effects.
|
||||
|
||||
Required:
|
||||
|
||||
- Deny-by-default for access and exposure boundaries.
|
||||
- Never log secrets, raw tokens, or sensitive payloads.
|
||||
- Keep network/filesystem/shell scope as narrow as possible unless explicitly justified.
|
||||
|
||||
### 3.7 Determinism + Reproducibility
|
||||
|
||||
**Why here:** Reliable CI and low-latency triage depend on deterministic behavior.
|
||||
|
||||
Required:
|
||||
|
||||
- Prefer reproducible commands and locked dependency behavior in CI-sensitive paths.
|
||||
- Keep tests deterministic (no flaky timing/network dependence without guardrails).
|
||||
- Ensure local validation commands map to CI expectations.
|
||||
|
||||
### 3.8 Reversibility + Rollback-First Thinking
|
||||
|
||||
**Why here:** Fast recovery is mandatory under high PR volume.
|
||||
|
||||
Required:
|
||||
|
||||
- Keep changes easy to revert (small scope, clear blast radius).
|
||||
- For risky changes, define rollback path before merge.
|
||||
- Avoid mixed mega-patches that block safe rollback.
|
||||
|
||||
## 4) Repository Map (High-Level)
|
||||
|
||||
- `src/main.rs` — CLI entrypoint and command routing
|
||||
- `src/lib.rs` — module exports and shared command enums
|
||||
- `src/config/` — schema + config loading/merging
|
||||
- `src/agent/` — orchestration loop
|
||||
- `src/gateway/` — webhook/gateway server
|
||||
- `src/security/` — policy, pairing, secret store
|
||||
- `src/memory/` — markdown/sqlite memory backends + embeddings/vector merge
|
||||
- `src/providers/` — model providers and resilient wrapper
|
||||
- `src/channels/` — Telegram/Discord/Slack/etc channels
|
||||
- `src/tools/` — tool execution surface (shell, file, memory, browser)
|
||||
- `src/peripherals/` — hardware peripherals (STM32, RPi GPIO); see `docs/hardware-peripherals-design.md`
|
||||
- `src/runtime/` — runtime adapters (currently native)
|
||||
- `docs/` — task-oriented documentation system (hubs, unified TOC, references, operations, security proposals, multilingual guides)
|
||||
- `.github/` — CI, templates, automation workflows
|
||||
|
||||
## 4.1 Documentation System Contract (Required)
|
||||
|
||||
Treat documentation as a first-class product surface, not a post-merge artifact.
|
||||
|
||||
Canonical entry points:
|
||||
|
||||
- root READMEs: `README.md`, `README.zh-CN.md`, `README.ja.md`, `README.ru.md`, `README.fr.md`, `README.vi.md`
|
||||
- docs hubs: `docs/README.md`, `docs/README.zh-CN.md`, `docs/README.ja.md`, `docs/README.ru.md`, `docs/README.fr.md`, `docs/i18n/vi/README.md`
|
||||
- unified TOC: `docs/SUMMARY.md`
|
||||
|
||||
Supported locales (current contract):
|
||||
|
||||
- `en`, `zh-CN`, `ja`, `ru`, `fr`, `vi`
|
||||
|
||||
Collection indexes (category navigation):
|
||||
|
||||
- `docs/getting-started/README.md`
|
||||
- `docs/reference/README.md`
|
||||
- `docs/operations/README.md`
|
||||
- `docs/security/README.md`
|
||||
- `docs/hardware/README.md`
|
||||
- `docs/contributing/README.md`
|
||||
- `docs/project/README.md`
|
||||
|
||||
Runtime-contract references (must track behavior changes):
|
||||
|
||||
- `docs/commands-reference.md`
|
||||
- `docs/providers-reference.md`
|
||||
- `docs/channels-reference.md`
|
||||
- `docs/config-reference.md`
|
||||
- `docs/operations-runbook.md`
|
||||
- `docs/troubleshooting.md`
|
||||
- `docs/one-click-bootstrap.md`
|
||||
|
||||
Required docs governance rules:
|
||||
|
||||
- Keep README/hub top navigation and quick routes intuitive and non-duplicative.
|
||||
- Keep entry-point parity across all supported locales (`en`, `zh-CN`, `ja`, `ru`, `fr`, `vi`) when changing navigation architecture.
|
||||
- If a change touches docs IA, runtime-contract references, or user-facing wording in shared docs, perform i18n follow-through for currently supported locales in the same PR:
|
||||
- Update locale navigation links (`README*`, `docs/README*`, `docs/SUMMARY.md`).
|
||||
- Update localized runtime-contract docs where equivalents exist (at minimum `commands-reference`, `config-reference`, `troubleshooting` for `fr` and `vi`).
|
||||
- For Vietnamese, treat `docs/i18n/vi/**` as canonical. Keep `docs/*.<locale>.md` compatibility shims aligned if present.
|
||||
- Keep proposal/roadmap docs explicitly labeled; avoid mixing proposal text into runtime-contract docs.
|
||||
- Keep project snapshots date-stamped and immutable once superseded by a newer date.
|
||||
|
||||
## 5) Risk Tiers by Path (Review Depth Contract)
|
||||
|
||||
Use these tiers when deciding validation depth and review rigor.
|
||||
|
||||
- **Low risk**: docs/chore/tests-only changes
|
||||
- **Medium risk**: most `src/**` behavior changes without boundary/security impact
|
||||
- **High risk**: `src/security/**`, `src/runtime/**`, `src/gateway/**`, `src/tools/**`, `.github/workflows/**`, access-control boundaries
|
||||
|
||||
When uncertain, classify as higher risk.
|
||||
|
||||
## 6) Agent Workflow (Required)
|
||||
|
||||
1. **Read before write**
|
||||
- Inspect existing module, factory wiring, and adjacent tests before editing.
|
||||
2. **Define scope boundary**
|
||||
- One concern per PR; avoid mixed feature+refactor+infra patches.
|
||||
3. **Implement minimal patch**
|
||||
- Apply KISS/YAGNI/DRY rule-of-three explicitly.
|
||||
4. **Validate by risk tier**
|
||||
- Docs-only: lightweight checks.
|
||||
- Code/risky changes: full relevant checks and focused scenarios.
|
||||
5. **Document impact**
|
||||
- Update docs/PR notes for behavior, risk, side effects, and rollback.
|
||||
- If CLI/config/provider/channel behavior changed, update corresponding runtime-contract references.
|
||||
- If docs entry points changed, keep all supported locale README/docs-hub navigation aligned (`en`, `zh-CN`, `ja`, `ru`, `fr`, `vi`).
|
||||
6. **Respect queue hygiene**
|
||||
- If stacked PR: declare `Depends on #...`.
|
||||
- If replacing old PR: declare `Supersedes #...`.
|
||||
|
||||
### 6.1 Branch / Commit / PR Flow (Required)
|
||||
|
||||
All contributors (human or agent) must follow the same collaboration flow:
|
||||
|
||||
- Create and work from a non-`master` branch.
|
||||
- Commit changes to that branch with clear, scoped commit messages.
|
||||
- Open a PR to `master`; do not push directly to `master`.
|
||||
- Wait for required checks and review outcomes before merging.
|
||||
- Merge via PR controls (squash/rebase/merge as repository policy allows).
|
||||
- Branch deletion after merge is optional; long-lived branches are allowed when intentionally maintained.
|
||||
|
||||
### 6.2 Worktree Workflow (Required for Multi-Track Agent Work)
|
||||
|
||||
Use Git worktrees to isolate concurrent agent/human tracks safely and predictably:
|
||||
|
||||
- Use one worktree per active branch/PR stream to avoid cross-task contamination.
|
||||
- Keep each worktree on a single branch; do not mix unrelated edits in one worktree.
|
||||
- Run validation commands inside the corresponding worktree before commit/PR.
|
||||
- Name worktrees clearly by scope (for example: `wt/ci-hardening`, `wt/provider-fix`) and remove stale worktrees when no longer needed.
|
||||
- PR checkpoint rules from section 6.1 still apply to worktree-based development.
|
||||
|
||||
### 6.3 Code Naming Contract (Required)
|
||||
|
||||
Apply these naming rules for all code changes unless a subsystem has a stronger existing pattern.
|
||||
|
||||
- Use Rust standard casing consistently: modules/files `snake_case`, types/traits/enums `PascalCase`, functions/variables `snake_case`, constants/statics `SCREAMING_SNAKE_CASE`.
|
||||
- Name types and modules by domain role, not implementation detail (for example `DiscordChannel`, `SecurityPolicy`, `MemoryStore` over vague names like `Manager`/`Helper`).
|
||||
- Keep trait implementer naming explicit and predictable: `<ProviderName>Provider`, `<ChannelName>Channel`, `<ToolName>Tool`, `<BackendName>Memory`.
|
||||
- Keep factory registration keys stable, lowercase, and user-facing (for example `"openai"`, `"discord"`, `"shell"`), and avoid alias sprawl without migration need.
|
||||
- Name tests by behavior/outcome (`<subject>_<expected_behavior>`) and keep fixture identifiers neutral/project-scoped.
|
||||
- If identity-like naming is required in tests/examples, use ZeroClaw-native labels only (`ZeroClawAgent`, `zeroclaw_user`, `zeroclaw_node`).
|
||||
|
||||
### 6.4 Architecture Boundary Contract (Required)
|
||||
|
||||
Use these rules to keep the trait/factory architecture stable under growth.
|
||||
|
||||
- Extend capabilities by adding trait implementations + factory wiring first; avoid cross-module rewrites for isolated features.
|
||||
- Keep dependency direction inward to contracts: concrete integrations depend on trait/config/util layers, not on other concrete integrations.
|
||||
- Avoid creating cross-subsystem coupling (for example provider code importing channel internals, tool code mutating gateway policy directly).
|
||||
- Keep module responsibilities single-purpose: orchestration in `agent/`, transport in `channels/`, model I/O in `providers/`, policy in `security/`, execution in `tools/`.
|
||||
- Introduce new shared abstractions only after repeated use (rule-of-three), with at least one real caller in current scope.
|
||||
- For config/schema changes, treat keys as public contract: document defaults, compatibility impact, and migration/rollback path.
|
||||
|
||||
## 7) Change Playbooks
|
||||
|
||||
### 7.1 Adding a Provider
|
||||
|
||||
- Implement `Provider` in `src/providers/`.
|
||||
- Register in `src/providers/mod.rs` factory.
|
||||
- Add focused tests for factory wiring and error paths.
|
||||
- Avoid provider-specific behavior leaks into shared orchestration code.
|
||||
|
||||
### 7.2 Adding a Channel
|
||||
|
||||
- Implement `Channel` in `src/channels/`.
|
||||
- Keep `send`, `listen`, `health_check`, typing semantics consistent.
|
||||
- Cover auth/allowlist/health behavior with tests.
|
||||
|
||||
### 7.3 Adding a Tool
|
||||
|
||||
- Implement `Tool` in `src/tools/` with strict parameter schema.
|
||||
- Validate and sanitize all inputs.
|
||||
- Return structured `ToolResult`; avoid panics in runtime path.
|
||||
|
||||
### 7.4 Adding a Peripheral
|
||||
|
||||
- Implement `Peripheral` in `src/peripherals/`.
|
||||
- Peripherals expose `tools()` — each tool delegates to the hardware (GPIO, sensors, etc.).
|
||||
- Register board type in config schema if needed.
|
||||
- See `docs/hardware-peripherals-design.md` for protocol and firmware notes.
|
||||
|
||||
### 7.5 Security / Runtime / Gateway Changes
|
||||
|
||||
- Include threat/risk notes and rollback strategy.
|
||||
- Add/update tests or validation evidence for failure modes and boundaries.
|
||||
- Keep observability useful but non-sensitive.
|
||||
- For `.github/workflows/**` changes, include Actions allowlist impact in PR notes and update `docs/actions-source-policy.md` when sources change.
|
||||
|
||||
### 7.6 Docs System / README / IA Changes
|
||||
|
||||
- Treat docs navigation as product UX: preserve clear pathing from README -> docs hub -> SUMMARY -> category index.
|
||||
- Keep top-level nav concise; avoid duplicative links across adjacent nav blocks.
|
||||
- When runtime surfaces change, update related references (`commands/providers/channels/config/runbook/troubleshooting`).
|
||||
- Keep multilingual entry-point parity for all supported locales (`en`, `zh-CN`, `ja`, `ru`, `fr`, `vi`) when nav or key wording changes.
|
||||
- When shared docs wording changes, sync corresponding localized docs for supported locales in the same PR (or explicitly document deferral and follow-up PR).
|
||||
- For docs snapshots, add new date-stamped files for new sprints rather than rewriting historical context.
|
||||
|
||||
|
||||
## 8) Validation Matrix
|
||||
|
||||
Default local checks for code changes:
|
||||
|
||||
```bash
|
||||
cargo fmt --all -- --check
|
||||
cargo clippy --all-targets -- -D warnings
|
||||
cargo test
|
||||
```
|
||||
|
||||
Preferred local pre-PR validation path (recommended, not required):
|
||||
|
||||
```bash
|
||||
./dev/ci.sh all
|
||||
```
|
||||
|
||||
Notes:
|
||||
|
||||
- Local Docker-based CI is strongly recommended when Docker is available.
|
||||
- Contributors are not blocked from opening a PR if local Docker CI is unavailable; in that case run the most relevant native checks and document what was run.
|
||||
|
||||
Additional expectations by change type:
|
||||
|
||||
- **Docs/template-only**:
|
||||
- run markdown lint and link-integrity checks
|
||||
- if touching README/docs-hub/SUMMARY/collection indexes, verify EN/ZH/JA/RU navigation parity
|
||||
- if touching bootstrap docs/scripts, run `bash -n bootstrap.sh scripts/bootstrap.sh scripts/install.sh`
|
||||
- **Workflow changes**: validate YAML syntax; run workflow lint/sanity checks when available.
|
||||
- **Security/runtime/gateway/tools**: include at least one boundary/failure-mode validation.
|
||||
|
||||
If full checks are impractical, run the most relevant subset and document what was skipped and why.
|
||||
|
||||
## 9) Collaboration and PR Discipline
|
||||
|
||||
- Follow `.github/pull_request_template.md` fully (including side effects / blast radius).
|
||||
- Keep PR descriptions concrete: problem, change, non-goals, risk, rollback.
|
||||
- Use conventional commit titles.
|
||||
- Prefer small PRs (`size: XS/S/M`) when possible.
|
||||
- Agent-assisted PRs are welcome, **but contributors remain accountable for understanding what their code will do**.
|
||||
|
||||
### 9.1 Privacy/Sensitive Data and Neutral Wording (Required)
|
||||
|
||||
Treat privacy and neutrality as merge gates, not best-effort guidelines.
|
||||
|
||||
- Never commit personal or sensitive data in code, docs, tests, fixtures, snapshots, logs, examples, or commit messages.
|
||||
- Prohibited data includes (non-exhaustive): real names, personal emails, phone numbers, addresses, access tokens, API keys, credentials, IDs, and private URLs.
|
||||
- Use neutral project-scoped placeholders (for example: `user_a`, `test_user`, `project_bot`, `example.com`) instead of real identity data.
|
||||
- Test names/messages/fixtures must be impersonal and system-focused; avoid first-person or identity-specific language.
|
||||
- If identity-like context is unavoidable, use ZeroClaw-scoped roles/labels only (for example: `ZeroClawAgent`, `ZeroClawOperator`, `zeroclaw_user`) and avoid real-world personas.
|
||||
- Recommended identity-safe naming palette (use when identity-like context is required):
|
||||
- actor labels: `ZeroClawAgent`, `ZeroClawOperator`, `ZeroClawMaintainer`, `zeroclaw_user`
|
||||
- service/runtime labels: `zeroclaw_bot`, `zeroclaw_service`, `zeroclaw_runtime`, `zeroclaw_node`
|
||||
- environment labels: `zeroclaw_project`, `zeroclaw_workspace`, `zeroclaw_channel`
|
||||
- If reproducing external incidents, redact and anonymize all payloads before committing.
|
||||
- Before push, review `git diff --cached` specifically for accidental sensitive strings and identity leakage.
|
||||
|
||||
### 9.2 Superseded-PR Attribution (Required)
|
||||
|
||||
When a PR supersedes another contributor's PR and carries forward substantive code or design decisions, preserve authorship explicitly.
|
||||
|
||||
- In the integrating commit message, add one `Co-authored-by: Name <email>` trailer per superseded contributor whose work is materially incorporated.
|
||||
- Use a GitHub-recognized email (`<login@users.noreply.github.com>` or the contributor's verified commit email) so attribution is rendered correctly.
|
||||
- Keep trailers on their own lines after a blank line at commit-message end; never encode them as escaped `\\n` text.
|
||||
- In the PR body, list superseded PR links and briefly state what was incorporated from each.
|
||||
- If no actual code/design was incorporated (only inspiration), do not use `Co-authored-by`; give credit in PR notes instead.
|
||||
|
||||
### 9.3 Superseded-PR PR Template (Recommended)
|
||||
|
||||
When superseding multiple PRs, use a consistent title/body structure to reduce reviewer ambiguity.
|
||||
|
||||
- Recommended title format: `feat(<scope>): unify and supersede #<pr_a>, #<pr_b> [and #<pr_n>]`
|
||||
- If this is docs/chore/meta only, keep the same supersede suffix and use the appropriate conventional-commit type.
|
||||
- In the PR body, include the following template (fill placeholders, remove non-applicable lines):
|
||||
|
||||
```md
|
||||
## Supersedes
|
||||
- #<pr_a> by @<author_a>
|
||||
- #<pr_b> by @<author_b>
|
||||
- #<pr_n> by @<author_n>
|
||||
|
||||
## Integrated Scope
|
||||
- From #<pr_a>: <what was materially incorporated>
|
||||
- From #<pr_b>: <what was materially incorporated>
|
||||
- From #<pr_n>: <what was materially incorporated>
|
||||
|
||||
## Attribution
|
||||
- Co-authored-by trailers added for materially incorporated contributors: Yes/No
|
||||
- If No, explain why (for example: no direct code/design carry-over)
|
||||
|
||||
## Non-goals
|
||||
- <explicitly list what was not carried over>
|
||||
|
||||
## Risk and Rollback
|
||||
- Risk: <summary>
|
||||
- Rollback: <revert commit/PR strategy>
|
||||
```
|
||||
|
||||
### 9.4 Superseded-PR Commit Template (Recommended)
|
||||
|
||||
When a commit unifies or supersedes prior PR work, use a deterministic commit message layout so attribution is machine-parsed and reviewer-friendly.
|
||||
|
||||
- Keep one blank line between message sections, and exactly one blank line before trailer lines.
|
||||
- Keep each trailer on its own line; do not wrap, indent, or encode as escaped `\n` text.
|
||||
- Add one `Co-authored-by` trailer per materially incorporated contributor, using GitHub-recognized email.
|
||||
- If no direct code/design is carried over, omit `Co-authored-by` and explain attribution in the PR body instead.
|
||||
|
||||
```text
|
||||
feat(<scope>): unify and supersede #<pr_a>, #<pr_b> [and #<pr_n>]
|
||||
|
||||
<one-paragraph summary of integrated outcome>
|
||||
|
||||
Supersedes:
|
||||
- #<pr_a> by @<author_a>
|
||||
- #<pr_b> by @<author_b>
|
||||
- #<pr_n> by @<author_n>
|
||||
|
||||
Integrated scope:
|
||||
- <subsystem_or_feature_a>: from #<pr_x>
|
||||
- <subsystem_or_feature_b>: from #<pr_y>
|
||||
|
||||
Co-authored-by: <Name A> <login_a@users.noreply.github.com>
|
||||
Co-authored-by: <Name B> <login_b@users.noreply.github.com>
|
||||
```
|
||||
|
||||
Reference docs:
|
||||
|
||||
- `CONTRIBUTING.md`
|
||||
- `docs/README.md`
|
||||
- `docs/SUMMARY.md`
|
||||
- `docs/docs-inventory.md`
|
||||
- `docs/commands-reference.md`
|
||||
- `docs/providers-reference.md`
|
||||
- `docs/channels-reference.md`
|
||||
- `docs/config-reference.md`
|
||||
- `docs/operations-runbook.md`
|
||||
- `docs/troubleshooting.md`
|
||||
- `docs/one-click-bootstrap.md`
|
||||
- `docs/pr-workflow.md`
|
||||
- `docs/reviewer-playbook.md`
|
||||
- `docs/ci-map.md`
|
||||
- `docs/actions-source-policy.md`
|
||||
|
||||
## 10) Anti-Patterns (Do Not)
|
||||
|
||||
- Do not add heavy dependencies for minor convenience.
|
||||
- Do not silently weaken security policy or access constraints.
|
||||
- Do not add speculative config/feature flags “just in case”.
|
||||
- Do not mix massive formatting-only changes with functional changes.
|
||||
- Do not modify unrelated modules “while here”.
|
||||
- Do not bypass failing checks without explicit explanation.
|
||||
- Do not hide behavior-changing side effects in refactor commits.
|
||||
- Do not include personal identity or sensitive information in test data, examples, docs, or commits.
|
||||
|
||||
## 11) Handoff Template (Agent -> Agent / Maintainer)
|
||||
|
||||
When handing off work, include:
|
||||
|
||||
1. What changed
|
||||
2. What did not change
|
||||
3. Validation run and results
|
||||
4. Remaining risks / unknowns
|
||||
5. Next recommended action
|
||||
|
||||
## 12) Vibe Coding Guardrails
|
||||
|
||||
When working in fast iterative mode:
|
||||
|
||||
- Keep each iteration reversible (small commits, clear rollback).
|
||||
- Validate assumptions with code search before implementing.
|
||||
- Prefer deterministic behavior over clever shortcuts.
|
||||
- Do not “ship and hope” on security-sensitive paths.
|
||||
- If uncertain, leave a concrete TODO with verification context, not a hidden guess.
|
||||
@@ -1,67 +1 @@
|
||||
# Changelog
|
||||
|
||||
All notable changes to ZeroClaw will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Security
|
||||
- **Legacy XOR cipher migration**: The `enc:` prefix (XOR cipher) is now deprecated.
|
||||
Secrets using this format will be automatically migrated to `enc2:` (ChaCha20-Poly1305 AEAD)
|
||||
when decrypted via `decrypt_and_migrate()`. A `tracing::warn!` is emitted when legacy
|
||||
values are encountered. The XOR cipher will be removed in a future release.
|
||||
|
||||
### Added
|
||||
- `SecretStore::decrypt_and_migrate()` — Decrypts secrets and returns a migrated `enc2:`
|
||||
value if the input used the legacy `enc:` format
|
||||
- `SecretStore::needs_migration()` — Check if a value uses the legacy `enc:` format
|
||||
- `SecretStore::is_secure_encrypted()` — Check if a value uses the secure `enc2:` format
|
||||
- **Telegram mention_only mode** — New config option `mention_only` for Telegram channel.
|
||||
When enabled, bot only responds to messages that @-mention the bot in group chats.
|
||||
Direct messages always work regardless of this setting. Default: `false`.
|
||||
|
||||
### Deprecated
|
||||
- `enc:` prefix for encrypted secrets — Use `enc2:` (ChaCha20-Poly1305) instead.
|
||||
Legacy values are still decrypted for backward compatibility but should be migrated.
|
||||
|
||||
### Fixed
|
||||
- **Gemini thinking model support** — Responses from thinking models (e.g. `gemini-3-pro-preview`)
|
||||
are now handled correctly. The provider skips internal reasoning parts (`thought: true`) and
|
||||
signature parts (`thoughtSignature`), extracting only the final answer text. Falls back to
|
||||
thinking content when no non-thinking response is available.
|
||||
- Updated default gateway port to `42617`.
|
||||
- Removed all user-facing references to port `3000`.
|
||||
- **Onboarding channel menu dispatch** now uses an enum-backed selector instead of hard-coded
|
||||
numeric match arms, preventing duplicated pattern arms and related `unreachable pattern`
|
||||
compiler warnings in `src/onboard/wizard.rs`.
|
||||
- **OpenAI native tool spec parsing** now uses owned serializable/deserializable structs,
|
||||
fixing a compile-time type mismatch when validating tool schemas before API calls.
|
||||
|
||||
## [0.1.0] - 2026-02-13
|
||||
|
||||
### Added
|
||||
- **Core Architecture**: Trait-based pluggable system for Provider, Channel, Observer, RuntimeAdapter, Tool
|
||||
- **Provider**: OpenRouter implementation (access Claude, GPT-4, Llama, Gemini via single API)
|
||||
- **Channels**: CLI channel with interactive and single-message modes
|
||||
- **Observability**: NoopObserver (zero overhead), LogObserver (tracing), MultiObserver (fan-out)
|
||||
- **Security**: Workspace sandboxing, command allowlisting, path traversal blocking, autonomy levels (ReadOnly/Supervised/Full), rate limiting
|
||||
- **Tools**: Shell (sandboxed), FileRead (path-checked), FileWrite (path-checked)
|
||||
- **Memory (Brain)**: SQLite persistent backend (searchable, survives restarts), Markdown backend (plain files, human-readable)
|
||||
- **Heartbeat Engine**: Periodic task execution from HEARTBEAT.md
|
||||
- **Runtime**: Native adapter for Mac/Linux/Raspberry Pi
|
||||
- **Config**: TOML-based configuration with sensible defaults
|
||||
- **Onboarding**: Interactive CLI wizard with workspace scaffolding
|
||||
- **CLI Commands**: agent, gateway, status, cron, channel, tools, onboard
|
||||
- **CI/CD**: GitHub Actions with cross-platform builds (Linux, macOS Intel/ARM, Windows)
|
||||
- **Tests**: 159 inline tests covering all modules and edge cases
|
||||
- **Binary**: 3.1MB optimized release build (includes bundled SQLite)
|
||||
|
||||
### Security
|
||||
- Path traversal attack prevention
|
||||
- Command injection blocking
|
||||
- Workspace escape prevention
|
||||
- Forbidden system path protection (`/etc`, `/root`, `~/.ssh`)
|
||||
|
||||
[0.1.0]: https://github.com/theonlyhennygod/zeroclaw/releases/tag/v0.1.0
|
||||
|
||||
@@ -1,20 +1,26 @@
|
||||
# CLAUDE.md — ZeroClaw Agent Engineering Protocol
|
||||
# CLAUDE.md — ZeroClaw
|
||||
|
||||
This file defines the default working protocol for Claude agents in this repository.
|
||||
Scope: entire repository.
|
||||
## Commands
|
||||
|
||||
## 1) Project Snapshot (Read First)
|
||||
```bash
|
||||
cargo fmt --all -- --check
|
||||
cargo clippy --all-targets -- -D warnings
|
||||
cargo test
|
||||
```
|
||||
|
||||
ZeroClaw is a Rust-first autonomous agent runtime optimized for:
|
||||
Full pre-PR validation (recommended):
|
||||
|
||||
- high performance
|
||||
- high efficiency
|
||||
- high stability
|
||||
- high extensibility
|
||||
- high sustainability
|
||||
- high security
|
||||
```bash
|
||||
./dev/ci.sh all
|
||||
```
|
||||
|
||||
Core architecture is trait-driven and modular. Most extension work should be done by implementing traits and registering in factory modules.
|
||||
Docs-only changes: run markdown lint and link-integrity checks. If touching bootstrap scripts: `bash -n install.sh`.
|
||||
|
||||
## Project Snapshot
|
||||
|
||||
ZeroClaw is a Rust-first autonomous agent runtime optimized for performance, efficiency, stability, extensibility, sustainability, and security.
|
||||
|
||||
Core architecture is trait-driven and modular. Extend by implementing traits and registering in factory modules.
|
||||
|
||||
Key extension points:
|
||||
|
||||
@@ -26,111 +32,7 @@ Key extension points:
|
||||
- `src/runtime/traits.rs` (`RuntimeAdapter`)
|
||||
- `src/peripherals/traits.rs` (`Peripheral`) — hardware boards (STM32, RPi GPIO)
|
||||
|
||||
## 2) Deep Architecture Observations (Why This Protocol Exists)
|
||||
|
||||
These codebase realities should drive every design decision:
|
||||
|
||||
1. **Trait + factory architecture is the stability backbone**
|
||||
- Extension points are intentionally explicit and swappable.
|
||||
- Most features should be added via trait implementation + factory registration, not cross-cutting rewrites.
|
||||
2. **Security-critical surfaces are first-class and internet-adjacent**
|
||||
- `src/gateway/`, `src/security/`, `src/tools/`, `src/runtime/` carry high blast radius.
|
||||
- Defaults already lean secure-by-default (pairing, bind safety, limits, secret handling); keep it that way.
|
||||
3. **Performance and binary size are product goals, not nice-to-have**
|
||||
- `Cargo.toml` release profile and dependency choices optimize for size and determinism.
|
||||
- Convenience dependencies and broad abstractions can silently regress these goals.
|
||||
4. **Config and runtime contracts are user-facing API**
|
||||
- `src/config/schema.rs` and CLI commands are effectively public interfaces.
|
||||
- Backward compatibility and explicit migration matter.
|
||||
5. **The project now runs in high-concurrency collaboration mode**
|
||||
- CI + docs governance + label routing are part of the product delivery system.
|
||||
- PR throughput is a design constraint; not just a maintainer inconvenience.
|
||||
|
||||
## 3) Engineering Principles (Normative)
|
||||
|
||||
These principles are mandatory by default. They are not slogans; they are implementation constraints.
|
||||
|
||||
### 3.1 KISS (Keep It Simple, Stupid)
|
||||
|
||||
**Why here:** Runtime + security behavior must stay auditable under pressure.
|
||||
|
||||
Required:
|
||||
|
||||
- Prefer straightforward control flow over clever meta-programming.
|
||||
- Prefer explicit match branches and typed structs over hidden dynamic behavior.
|
||||
- Keep error paths obvious and localized.
|
||||
|
||||
### 3.2 YAGNI (You Aren't Gonna Need It)
|
||||
|
||||
**Why here:** Premature features increase attack surface and maintenance burden.
|
||||
|
||||
Required:
|
||||
|
||||
- Do not add new config keys, trait methods, feature flags, or workflow branches without a concrete accepted use case.
|
||||
- Do not introduce speculative “future-proof” abstractions without at least one current caller.
|
||||
- Keep unsupported paths explicit (error out) rather than adding partial fake support.
|
||||
|
||||
### 3.3 DRY + Rule of Three
|
||||
|
||||
**Why here:** Naive DRY can create brittle shared abstractions across providers/channels/tools.
|
||||
|
||||
Required:
|
||||
|
||||
- Duplicate small, local logic when it preserves clarity.
|
||||
- Extract shared utilities only after repeated, stable patterns (rule-of-three).
|
||||
- When extracting, preserve module boundaries and avoid hidden coupling.
|
||||
|
||||
### 3.4 SRP + ISP (Single Responsibility + Interface Segregation)
|
||||
|
||||
**Why here:** Trait-driven architecture already encodes subsystem boundaries.
|
||||
|
||||
Required:
|
||||
|
||||
- Keep each module focused on one concern.
|
||||
- Extend behavior by implementing existing narrow traits whenever possible.
|
||||
- Avoid fat interfaces and “god modules” that mix policy + transport + storage.
|
||||
|
||||
### 3.5 Fail Fast + Explicit Errors
|
||||
|
||||
**Why here:** Silent fallback in agent runtimes can create unsafe or costly behavior.
|
||||
|
||||
Required:
|
||||
|
||||
- Prefer explicit `bail!`/errors for unsupported or unsafe states.
|
||||
- Never silently broaden permissions/capabilities.
|
||||
- Document fallback behavior when fallback is intentional and safe.
|
||||
|
||||
### 3.6 Secure by Default + Least Privilege
|
||||
|
||||
**Why here:** Gateway/tools/runtime can execute actions with real-world side effects.
|
||||
|
||||
Required:
|
||||
|
||||
- Deny-by-default for access and exposure boundaries.
|
||||
- Never log secrets, raw tokens, or sensitive payloads.
|
||||
- Keep network/filesystem/shell scope as narrow as possible unless explicitly justified.
|
||||
|
||||
### 3.7 Determinism + Reproducibility
|
||||
|
||||
**Why here:** Reliable CI and low-latency triage depend on deterministic behavior.
|
||||
|
||||
Required:
|
||||
|
||||
- Prefer reproducible commands and locked dependency behavior in CI-sensitive paths.
|
||||
- Keep tests deterministic (no flaky timing/network dependence without guardrails).
|
||||
- Ensure local validation commands map to CI expectations.
|
||||
|
||||
### 3.8 Reversibility + Rollback-First Thinking
|
||||
|
||||
**Why here:** Fast recovery is mandatory under high PR volume.
|
||||
|
||||
Required:
|
||||
|
||||
- Keep changes easy to revert (small scope, clear blast radius).
|
||||
- For risky changes, define rollback path before merge.
|
||||
- Avoid mixed mega-patches that block safe rollback.
|
||||
|
||||
## 4) Repository Map (High-Level)
|
||||
## Repository Map
|
||||
|
||||
- `src/main.rs` — CLI entrypoint and command routing
|
||||
- `src/lib.rs` — module exports and shared command enums
|
||||
@@ -142,59 +44,12 @@ Required:
|
||||
- `src/providers/` — model providers and resilient wrapper
|
||||
- `src/channels/` — Telegram/Discord/Slack/etc channels
|
||||
- `src/tools/` — tool execution surface (shell, file, memory, browser)
|
||||
- `src/peripherals/` — hardware peripherals (STM32, RPi GPIO); see `docs/hardware-peripherals-design.md`
|
||||
- `src/peripherals/` — hardware peripherals (STM32, RPi GPIO)
|
||||
- `src/runtime/` — runtime adapters (currently native)
|
||||
- `docs/` — task-oriented documentation system (hubs, unified TOC, references, operations, security proposals, multilingual guides)
|
||||
- `docs/` — topic-based documentation (setup-guides, reference, ops, security, hardware, contributing, maintainers)
|
||||
- `.github/` — CI, templates, automation workflows
|
||||
|
||||
## 4.1 Documentation System Contract (Required)
|
||||
|
||||
Treat documentation as a first-class product surface, not a post-merge artifact.
|
||||
|
||||
Canonical entry points:
|
||||
|
||||
- root READMEs: `README.md`, `README.zh-CN.md`, `README.ja.md`, `README.ru.md`, `README.fr.md`, `README.vi.md`
|
||||
- docs hubs: `docs/README.md`, `docs/README.zh-CN.md`, `docs/README.ja.md`, `docs/README.ru.md`, `docs/README.fr.md`, `docs/i18n/vi/README.md`
|
||||
- unified TOC: `docs/SUMMARY.md`
|
||||
|
||||
Supported locales (current contract):
|
||||
|
||||
- `en`, `zh-CN`, `ja`, `ru`, `fr`, `vi`
|
||||
|
||||
Collection indexes (category navigation):
|
||||
|
||||
- `docs/getting-started/README.md`
|
||||
- `docs/reference/README.md`
|
||||
- `docs/operations/README.md`
|
||||
- `docs/security/README.md`
|
||||
- `docs/hardware/README.md`
|
||||
- `docs/contributing/README.md`
|
||||
- `docs/project/README.md`
|
||||
|
||||
Runtime-contract references (must track behavior changes):
|
||||
|
||||
- `docs/commands-reference.md`
|
||||
- `docs/providers-reference.md`
|
||||
- `docs/channels-reference.md`
|
||||
- `docs/config-reference.md`
|
||||
- `docs/operations-runbook.md`
|
||||
- `docs/troubleshooting.md`
|
||||
- `docs/one-click-bootstrap.md`
|
||||
|
||||
Required docs governance rules:
|
||||
|
||||
- Keep README/hub top navigation and quick routes intuitive and non-duplicative.
|
||||
- Keep entry-point parity across all supported locales (`en`, `zh-CN`, `ja`, `ru`, `fr`, `vi`) when changing navigation architecture.
|
||||
- If a change touches docs IA, runtime-contract references, or user-facing wording in shared docs, perform i18n follow-through for currently supported locales in the same PR:
|
||||
- Update locale navigation links (`README*`, `docs/README*`, `docs/SUMMARY.md`).
|
||||
- Update localized runtime-contract docs where equivalents exist (at minimum `commands-reference`, `config-reference`, `troubleshooting` for `fr` and `vi`).
|
||||
- For Vietnamese, treat `docs/i18n/vi/**` as canonical. Keep `docs/*.<locale>.md` compatibility shims aligned if present.
|
||||
- Keep proposal/roadmap docs explicitly labeled; avoid mixing proposal text into runtime-contract docs.
|
||||
- Keep project snapshots date-stamped and immutable once superseded by a newer date.
|
||||
|
||||
## 5) Risk Tiers by Path (Review Depth Contract)
|
||||
|
||||
Use these tiers when deciding validation depth and review rigor.
|
||||
## Risk Tiers
|
||||
|
||||
- **Low risk**: docs/chore/tests-only changes
|
||||
- **Medium risk**: most `src/**` behavior changes without boundary/security impact
|
||||
@@ -202,282 +57,34 @@ Use these tiers when deciding validation depth and review rigor.
|
||||
|
||||
When uncertain, classify as higher risk.
|
||||
|
||||
## 6) Agent Workflow (Required)
|
||||
## Workflow
|
||||
|
||||
1. **Read before write**
|
||||
- Inspect existing module, factory wiring, and adjacent tests before editing.
|
||||
2. **Define scope boundary**
|
||||
- One concern per PR; avoid mixed feature+refactor+infra patches.
|
||||
3. **Implement minimal patch**
|
||||
- Apply KISS/YAGNI/DRY rule-of-three explicitly.
|
||||
4. **Validate by risk tier**
|
||||
- Docs-only: lightweight checks.
|
||||
- Code/risky changes: full relevant checks and focused scenarios.
|
||||
5. **Document impact**
|
||||
- Update docs/PR notes for behavior, risk, side effects, and rollback.
|
||||
- If CLI/config/provider/channel behavior changed, update corresponding runtime-contract references.
|
||||
- If docs entry points changed, keep all supported locale README/docs-hub navigation aligned (`en`, `zh-CN`, `ja`, `ru`, `fr`, `vi`).
|
||||
6. **Respect queue hygiene**
|
||||
- If stacked PR: declare `Depends on #...`.
|
||||
- If replacing old PR: declare `Supersedes #...`.
|
||||
1. **Read before write** — inspect existing module, factory wiring, and adjacent tests before editing.
|
||||
2. **One concern per PR** — avoid mixed feature+refactor+infra patches.
|
||||
3. **Implement minimal patch** — no speculative abstractions, no config keys without a concrete use case.
|
||||
4. **Validate by risk tier** — docs-only: lightweight checks. Code changes: full relevant checks.
|
||||
5. **Document impact** — update PR notes for behavior, risk, side effects, and rollback.
|
||||
6. **Queue hygiene** — stacked PR: declare `Depends on #...`. Replacing old PR: declare `Supersedes #...`.
|
||||
|
||||
### 6.1 Branch / Commit / PR Flow (Required)
|
||||
Branch/commit/PR rules:
|
||||
- Work from a non-`master` branch. Open a PR to `master`; do not push directly.
|
||||
- Use conventional commit titles. Prefer small PRs (`size: XS/S/M`).
|
||||
- Follow `.github/pull_request_template.md` fully.
|
||||
- Never commit secrets, personal data, or real identity information (see `@docs/contributing/pr-discipline.md`).
|
||||
|
||||
All contributors (human or agent) must follow the same collaboration flow:
|
||||
|
||||
- Create and work from a non-`master` branch.
|
||||
- Commit changes to that branch with clear, scoped commit messages.
|
||||
- Open a PR to `master`; do not push directly to `master`.
|
||||
- Wait for required checks and review outcomes before merging.
|
||||
- Merge via PR controls (squash/rebase/merge as repository policy allows).
|
||||
- Branch deletion after merge is optional; long-lived branches are allowed when intentionally maintained.
|
||||
|
||||
### 6.2 Worktree Workflow (Required for Multi-Track Agent Work)
|
||||
|
||||
Use Git worktrees to isolate concurrent agent/human tracks safely and predictably:
|
||||
|
||||
- Use one worktree per active branch/PR stream to avoid cross-task contamination.
|
||||
- Keep each worktree on a single branch; do not mix unrelated edits in one worktree.
|
||||
- Run validation commands inside the corresponding worktree before commit/PR.
|
||||
- Name worktrees clearly by scope (for example: `wt/ci-hardening`, `wt/provider-fix`) and remove stale worktrees when no longer needed.
|
||||
- PR checkpoint rules from section 6.1 still apply to worktree-based development.
|
||||
|
||||
### 6.3 Code Naming Contract (Required)
|
||||
|
||||
Apply these naming rules for all code changes unless a subsystem has a stronger existing pattern.
|
||||
|
||||
- Use Rust standard casing consistently: modules/files `snake_case`, types/traits/enums `PascalCase`, functions/variables `snake_case`, constants/statics `SCREAMING_SNAKE_CASE`.
|
||||
- Name types and modules by domain role, not implementation detail (for example `DiscordChannel`, `SecurityPolicy`, `MemoryStore` over vague names like `Manager`/`Helper`).
|
||||
- Keep trait implementer naming explicit and predictable: `<ProviderName>Provider`, `<ChannelName>Channel`, `<ToolName>Tool`, `<BackendName>Memory`.
|
||||
- Keep factory registration keys stable, lowercase, and user-facing (for example `"openai"`, `"discord"`, `"shell"`), and avoid alias sprawl without migration need.
|
||||
- Name tests by behavior/outcome (`<subject>_<expected_behavior>`) and keep fixture identifiers neutral/project-scoped.
|
||||
- If identity-like naming is required in tests/examples, use ZeroClaw-native labels only (`ZeroClawAgent`, `zeroclaw_user`, `zeroclaw_node`).
|
||||
|
||||
### 6.4 Architecture Boundary Contract (Required)
|
||||
|
||||
Use these rules to keep the trait/factory architecture stable under growth.
|
||||
|
||||
- Extend capabilities by adding trait implementations + factory wiring first; avoid cross-module rewrites for isolated features.
|
||||
- Keep dependency direction inward to contracts: concrete integrations depend on trait/config/util layers, not on other concrete integrations.
|
||||
- Avoid creating cross-subsystem coupling (for example provider code importing channel internals, tool code mutating gateway policy directly).
|
||||
- Keep module responsibilities single-purpose: orchestration in `agent/`, transport in `channels/`, model I/O in `providers/`, policy in `security/`, execution in `tools/`.
|
||||
- Introduce new shared abstractions only after repeated use (rule-of-three), with at least one real caller in current scope.
|
||||
- For config/schema changes, treat keys as public contract: document defaults, compatibility impact, and migration/rollback path.
|
||||
|
||||
## 7) Change Playbooks
|
||||
|
||||
### 7.1 Adding a Provider
|
||||
|
||||
- Implement `Provider` in `src/providers/`.
|
||||
- Register in `src/providers/mod.rs` factory.
|
||||
- Add focused tests for factory wiring and error paths.
|
||||
- Avoid provider-specific behavior leaks into shared orchestration code.
|
||||
|
||||
### 7.2 Adding a Channel
|
||||
|
||||
- Implement `Channel` in `src/channels/`.
|
||||
- Keep `send`, `listen`, `health_check`, typing semantics consistent.
|
||||
- Cover auth/allowlist/health behavior with tests.
|
||||
|
||||
### 7.3 Adding a Tool
|
||||
|
||||
- Implement `Tool` in `src/tools/` with strict parameter schema.
|
||||
- Validate and sanitize all inputs.
|
||||
- Return structured `ToolResult`; avoid panics in runtime path.
|
||||
|
||||
### 7.4 Adding a Peripheral
|
||||
|
||||
- Implement `Peripheral` in `src/peripherals/`.
|
||||
- Peripherals expose `tools()` — each tool delegates to the hardware (GPIO, sensors, etc.).
|
||||
- Register board type in config schema if needed.
|
||||
- See `docs/hardware-peripherals-design.md` for protocol and firmware notes.
|
||||
|
||||
### 7.5 Security / Runtime / Gateway Changes
|
||||
|
||||
- Include threat/risk notes and rollback strategy.
|
||||
- Add/update tests or validation evidence for failure modes and boundaries.
|
||||
- Keep observability useful but non-sensitive.
|
||||
- For `.github/workflows/**` changes, include Actions allowlist impact in PR notes and update `docs/actions-source-policy.md` when sources change.
|
||||
|
||||
### 7.6 Docs System / README / IA Changes
|
||||
|
||||
- Treat docs navigation as product UX: preserve clear pathing from README -> docs hub -> SUMMARY -> category index.
|
||||
- Keep top-level nav concise; avoid duplicative links across adjacent nav blocks.
|
||||
- When runtime surfaces change, update related references (`commands/providers/channels/config/runbook/troubleshooting`).
|
||||
- Keep multilingual entry-point parity for all supported locales (`en`, `zh-CN`, `ja`, `ru`, `fr`, `vi`) when nav or key wording changes.
|
||||
- When shared docs wording changes, sync corresponding localized docs for supported locales in the same PR (or explicitly document deferral and follow-up PR).
|
||||
- For docs snapshots, add new date-stamped files for new sprints rather than rewriting historical context.
|
||||
|
||||
|
||||
## 8) Validation Matrix
|
||||
|
||||
Default local checks for code changes:
|
||||
|
||||
```bash
|
||||
cargo fmt --all -- --check
|
||||
cargo clippy --all-targets -- -D warnings
|
||||
cargo test
|
||||
```
|
||||
|
||||
Preferred local pre-PR validation path (recommended, not required):
|
||||
|
||||
```bash
|
||||
./dev/ci.sh all
|
||||
```
|
||||
|
||||
Notes:
|
||||
|
||||
- Local Docker-based CI is strongly recommended when Docker is available.
|
||||
- Contributors are not blocked from opening a PR if local Docker CI is unavailable; in that case run the most relevant native checks and document what was run.
|
||||
|
||||
Additional expectations by change type:
|
||||
|
||||
- **Docs/template-only**:
|
||||
- run markdown lint and link-integrity checks
|
||||
- if touching README/docs-hub/SUMMARY/collection indexes, verify EN/ZH/JA/RU navigation parity
|
||||
- if touching bootstrap docs/scripts, run `bash -n bootstrap.sh scripts/bootstrap.sh scripts/install.sh`
|
||||
- **Workflow changes**: validate YAML syntax; run workflow lint/sanity checks when available.
|
||||
- **Security/runtime/gateway/tools**: include at least one boundary/failure-mode validation.
|
||||
|
||||
If full checks are impractical, run the most relevant subset and document what was skipped and why.
|
||||
|
||||
## 9) Collaboration and PR Discipline
|
||||
|
||||
- Follow `.github/pull_request_template.md` fully (including side effects / blast radius).
|
||||
- Keep PR descriptions concrete: problem, change, non-goals, risk, rollback.
|
||||
- Use conventional commit titles.
|
||||
- Prefer small PRs (`size: XS/S/M`) when possible.
|
||||
- Agent-assisted PRs are welcome, **but contributors remain accountable for understanding what their code will do**.
|
||||
|
||||
### 9.1 Privacy/Sensitive Data and Neutral Wording (Required)
|
||||
|
||||
Treat privacy and neutrality as merge gates, not best-effort guidelines.
|
||||
|
||||
- Never commit personal or sensitive data in code, docs, tests, fixtures, snapshots, logs, examples, or commit messages.
|
||||
- Prohibited data includes (non-exhaustive): real names, personal emails, phone numbers, addresses, access tokens, API keys, credentials, IDs, and private URLs.
|
||||
- Use neutral project-scoped placeholders (for example: `user_a`, `test_user`, `project_bot`, `example.com`) instead of real identity data.
|
||||
- Test names/messages/fixtures must be impersonal and system-focused; avoid first-person or identity-specific language.
|
||||
- If identity-like context is unavoidable, use ZeroClaw-scoped roles/labels only (for example: `ZeroClawAgent`, `ZeroClawOperator`, `zeroclaw_user`) and avoid real-world personas.
|
||||
- Recommended identity-safe naming palette (use when identity-like context is required):
|
||||
- actor labels: `ZeroClawAgent`, `ZeroClawOperator`, `ZeroClawMaintainer`, `zeroclaw_user`
|
||||
- service/runtime labels: `zeroclaw_bot`, `zeroclaw_service`, `zeroclaw_runtime`, `zeroclaw_node`
|
||||
- environment labels: `zeroclaw_project`, `zeroclaw_workspace`, `zeroclaw_channel`
|
||||
- If reproducing external incidents, redact and anonymize all payloads before committing.
|
||||
- Before push, review `git diff --cached` specifically for accidental sensitive strings and identity leakage.
|
||||
|
||||
### 9.2 Superseded-PR Attribution (Required)
|
||||
|
||||
When a PR supersedes another contributor's PR and carries forward substantive code or design decisions, preserve authorship explicitly.
|
||||
|
||||
- In the integrating commit message, add one `Co-authored-by: Name <email>` trailer per superseded contributor whose work is materially incorporated.
|
||||
- Use a GitHub-recognized email (`<login@users.noreply.github.com>` or the contributor's verified commit email) so attribution is rendered correctly.
|
||||
- Keep trailers on their own lines after a blank line at commit-message end; never encode them as escaped `\\n` text.
|
||||
- In the PR body, list superseded PR links and briefly state what was incorporated from each.
|
||||
- If no actual code/design was incorporated (only inspiration), do not use `Co-authored-by`; give credit in PR notes instead.
|
||||
|
||||
### 9.3 Superseded-PR PR Template (Recommended)
|
||||
|
||||
When superseding multiple PRs, use a consistent title/body structure to reduce reviewer ambiguity.
|
||||
|
||||
- Recommended title format: `feat(<scope>): unify and supersede #<pr_a>, #<pr_b> [and #<pr_n>]`
|
||||
- If this is docs/chore/meta only, keep the same supersede suffix and use the appropriate conventional-commit type.
|
||||
- In the PR body, include the following template (fill placeholders, remove non-applicable lines):
|
||||
|
||||
```md
|
||||
## Supersedes
|
||||
- #<pr_a> by @<author_a>
|
||||
- #<pr_b> by @<author_b>
|
||||
- #<pr_n> by @<author_n>
|
||||
|
||||
## Integrated Scope
|
||||
- From #<pr_a>: <what was materially incorporated>
|
||||
- From #<pr_b>: <what was materially incorporated>
|
||||
- From #<pr_n>: <what was materially incorporated>
|
||||
|
||||
## Attribution
|
||||
- Co-authored-by trailers added for materially incorporated contributors: Yes/No
|
||||
- If No, explain why (for example: no direct code/design carry-over)
|
||||
|
||||
## Non-goals
|
||||
- <explicitly list what was not carried over>
|
||||
|
||||
## Risk and Rollback
|
||||
- Risk: <summary>
|
||||
- Rollback: <revert commit/PR strategy>
|
||||
```
|
||||
|
||||
### 9.4 Superseded-PR Commit Template (Recommended)
|
||||
|
||||
When a commit unifies or supersedes prior PR work, use a deterministic commit message layout so attribution is machine-parsed and reviewer-friendly.
|
||||
|
||||
- Keep one blank line between message sections, and exactly one blank line before trailer lines.
|
||||
- Keep each trailer on its own line; do not wrap, indent, or encode as escaped `\n` text.
|
||||
- Add one `Co-authored-by` trailer per materially incorporated contributor, using GitHub-recognized email.
|
||||
- If no direct code/design is carried over, omit `Co-authored-by` and explain attribution in the PR body instead.
|
||||
|
||||
```text
|
||||
feat(<scope>): unify and supersede #<pr_a>, #<pr_b> [and #<pr_n>]
|
||||
|
||||
<one-paragraph summary of integrated outcome>
|
||||
|
||||
Supersedes:
|
||||
- #<pr_a> by @<author_a>
|
||||
- #<pr_b> by @<author_b>
|
||||
- #<pr_n> by @<author_n>
|
||||
|
||||
Integrated scope:
|
||||
- <subsystem_or_feature_a>: from #<pr_x>
|
||||
- <subsystem_or_feature_b>: from #<pr_y>
|
||||
|
||||
Co-authored-by: <Name A> <login_a@users.noreply.github.com>
|
||||
Co-authored-by: <Name B> <login_b@users.noreply.github.com>
|
||||
```
|
||||
|
||||
Reference docs:
|
||||
|
||||
- `CONTRIBUTING.md`
|
||||
- `docs/README.md`
|
||||
- `docs/SUMMARY.md`
|
||||
- `docs/docs-inventory.md`
|
||||
- `docs/commands-reference.md`
|
||||
- `docs/providers-reference.md`
|
||||
- `docs/channels-reference.md`
|
||||
- `docs/config-reference.md`
|
||||
- `docs/operations-runbook.md`
|
||||
- `docs/troubleshooting.md`
|
||||
- `docs/one-click-bootstrap.md`
|
||||
- `docs/pr-workflow.md`
|
||||
- `docs/reviewer-playbook.md`
|
||||
- `docs/ci-map.md`
|
||||
- `docs/actions-source-policy.md`
|
||||
|
||||
## 10) Anti-Patterns (Do Not)
|
||||
## Anti-Patterns
|
||||
|
||||
- Do not add heavy dependencies for minor convenience.
|
||||
- Do not silently weaken security policy or access constraints.
|
||||
- Do not add speculative config/feature flags “just in case”.
|
||||
- Do not add speculative config/feature flags "just in case".
|
||||
- Do not mix massive formatting-only changes with functional changes.
|
||||
- Do not modify unrelated modules “while here”.
|
||||
- Do not modify unrelated modules "while here".
|
||||
- Do not bypass failing checks without explicit explanation.
|
||||
- Do not hide behavior-changing side effects in refactor commits.
|
||||
- Do not include personal identity or sensitive information in test data, examples, docs, or commits.
|
||||
|
||||
## 11) Handoff Template (Agent -> Agent / Maintainer)
|
||||
## Linked References
|
||||
|
||||
When handing off work, include:
|
||||
|
||||
1. What changed
|
||||
2. What did not change
|
||||
3. Validation run and results
|
||||
4. Remaining risks / unknowns
|
||||
5. Next recommended action
|
||||
|
||||
## 12) Vibe Coding Guardrails
|
||||
|
||||
When working in fast iterative mode:
|
||||
|
||||
- Keep each iteration reversible (small commits, clear rollback).
|
||||
- Validate assumptions with code search before implementing.
|
||||
- Prefer deterministic behavior over clever shortcuts.
|
||||
- Do not “ship and hope” on security-sensitive paths.
|
||||
- If uncertain, leave a concrete TODO with verification context, not a hidden guess.
|
||||
- `@docs/contributing/change-playbooks.md` — adding providers, channels, tools, peripherals; security/gateway changes; architecture boundaries
|
||||
- `@docs/contributing/pr-discipline.md` — privacy rules, superseded-PR attribution/templates, handoff template
|
||||
- `@docs/contributing/docs-contract.md` — docs system contract, i18n rules, locale parity
|
||||
|
||||
+48
-12
@@ -2,6 +2,42 @@
|
||||
|
||||
Thanks for your interest in contributing to ZeroClaw! This guide will help you get started.
|
||||
|
||||
---
|
||||
|
||||
## ⚠️ Branch Migration Notice (March 2026)
|
||||
|
||||
**`master` is the ONLY default branch. The `main` branch no longer exists.**
|
||||
|
||||
If you have an existing fork or local clone that tracks `main`, you **must** update it:
|
||||
|
||||
```bash
|
||||
# Update your local clone to track master
|
||||
git checkout master
|
||||
git branch -D main 2>/dev/null # delete local main if it exists
|
||||
git remote set-head origin master
|
||||
git fetch origin --prune # remove stale remote refs
|
||||
|
||||
# If your fork still has a main branch, delete it
|
||||
git push origin --delete main 2>/dev/null
|
||||
```
|
||||
|
||||
All PRs must target **`master`**. PRs targeting `main` will be rejected.
|
||||
|
||||
**Background:** ZeroClaw previously used `main` in some documentation and scripts, which caused 404 errors, broken CI refs, and contributor confusion (see [#2929](https://github.com/zeroclaw-labs/zeroclaw/issues/2929), [#3061](https://github.com/zeroclaw-labs/zeroclaw/issues/3061), [#3194](https://github.com/zeroclaw-labs/zeroclaw/pull/3194)). As of March 2026, all references have been corrected, stale branches cleaned up, and the `main` branch permanently deleted.
|
||||
|
||||
---
|
||||
|
||||
## Branching Model
|
||||
|
||||
> **`master`** is the single source-of-truth branch.
|
||||
>
|
||||
> **How contributors should work:**
|
||||
> 1. Fork the repository
|
||||
> 2. Create a `feat/*` or `fix/*` branch from `master`
|
||||
> 3. Open a PR targeting `master`
|
||||
>
|
||||
> Do **not** create or push to a `main` branch. There is no `main` branch — it will not work.
|
||||
|
||||
## First-Time Contributors
|
||||
|
||||
Welcome — contributions of all sizes are valued. If this is your first contribution, here is how to get started:
|
||||
@@ -15,7 +51,7 @@ Welcome — contributions of all sizes are valued. If this is your first contrib
|
||||
|
||||
3. **Follow the fork → branch → change → test → PR workflow:**
|
||||
- Fork the repository and clone your fork
|
||||
- Create a feature branch (`git checkout -b fix/my-change`)
|
||||
- Create a feature branch (`git checkout -b feat/my-change` or `git checkout -b fix/my-change`)
|
||||
- Make your changes and run `cargo fmt && cargo clippy && cargo test`
|
||||
- Open a PR against `master` using the PR template
|
||||
|
||||
@@ -210,20 +246,20 @@ To keep docs useful under high PR volume, we use these rules:
|
||||
- **Side-effect visibility**: document blast radius, failure modes, and rollback before merge.
|
||||
- **Automation assists, humans decide**: bots triage and label, but merge accountability stays human.
|
||||
- **Index-first discoverability**: `docs/README.md` is the first entry point for operational documentation.
|
||||
- **Template-first authoring**: start new operational docs from `docs/doc-template.md`.
|
||||
- **Template-first authoring**: start new operational docs from `docs/contributing/doc-template.md`.
|
||||
|
||||
### Documentation System Map
|
||||
|
||||
| Doc | Primary purpose | When to update |
|
||||
|---|---|---|
|
||||
| `docs/README.md` | canonical docs index and taxonomy | add/remove docs or change documentation ownership/navigation |
|
||||
| `docs/doc-template.md` | standard skeleton for new operational documentation | when required sections or documentation quality bar changes |
|
||||
| `docs/contributing/doc-template.md` | standard skeleton for new operational documentation | when required sections or documentation quality bar changes |
|
||||
| `CONTRIBUTING.md` | contributor contract and readiness baseline | contributor expectations or policy changes |
|
||||
| `docs/pr-workflow.md` | governance logic and merge contract | workflow/risk/merge gate changes |
|
||||
| `docs/reviewer-playbook.md` | reviewer operating checklist | review depth or triage behavior changes |
|
||||
| `docs/ci-map.md` | CI ownership and triage entry points | workflow trigger/job ownership changes |
|
||||
| `docs/network-deployment.md` | runtime deployment and network operating guide | gateway/channel/tunnel/network runtime behavior changes |
|
||||
| `docs/proxy-agent-playbook.md` | agent-operable proxy runbook and rollback recipes | proxy scope/selector/tooling behavior changes |
|
||||
| `docs/contributing/pr-workflow.md` | governance logic and merge contract | workflow/risk/merge gate changes |
|
||||
| `docs/contributing/reviewer-playbook.md` | reviewer operating checklist | review depth or triage behavior changes |
|
||||
| `docs/contributing/ci-map.md` | CI ownership and triage entry points | workflow trigger/job ownership changes |
|
||||
| `docs/ops/network-deployment.md` | runtime deployment and network operating guide | gateway/channel/tunnel/network runtime behavior changes |
|
||||
| `docs/ops/proxy-agent-playbook.md` | agent-operable proxy runbook and rollback recipes | proxy scope/selector/tooling behavior changes |
|
||||
|
||||
## PR Definition of Ready (DoR)
|
||||
|
||||
@@ -237,7 +273,7 @@ Before requesting review, ensure all of the following are true:
|
||||
- Tests/fixtures/examples use neutral project-scoped wording (no identity-specific or first-person phrasing).
|
||||
- If identity-like wording is required, use ZeroClaw-centric labels only (for example: `ZeroClawAgent`, `ZeroClawOperator`, `zeroclaw_user`).
|
||||
- If docs were changed, update `docs/README.md` navigation and reciprocal links with related docs.
|
||||
- If a new operational doc was added, start from `docs/doc-template.md` and keep risk/rollback/troubleshooting sections where applicable.
|
||||
- If a new operational doc was added, start from `docs/contributing/doc-template.md` and keep risk/rollback/troubleshooting sections where applicable.
|
||||
- Linked issue (or rationale for no issue) is included.
|
||||
|
||||
## PR Definition of Done (DoD)
|
||||
@@ -265,9 +301,9 @@ When PR traffic is high (especially with AI-assisted contributions), these rules
|
||||
- **Identity normalization**: when identity traits are unavoidable, use ZeroClaw/project-native roles instead of personal or real-world identities.
|
||||
- **Supersede hygiene**: if your PR replaces an older open PR, add `Supersedes #...` and request maintainers close the outdated one.
|
||||
|
||||
Full maintainer workflow: [`docs/pr-workflow.md`](docs/pr-workflow.md).
|
||||
CI workflow ownership and triage map: [`docs/ci-map.md`](docs/ci-map.md).
|
||||
Reviewer operating checklist: [`docs/reviewer-playbook.md`](docs/reviewer-playbook.md).
|
||||
Full maintainer workflow: [`docs/contributing/pr-workflow.md`](docs/contributing/pr-workflow.md).
|
||||
CI workflow ownership and triage map: [`docs/contributing/ci-map.md`](docs/contributing/ci-map.md).
|
||||
Reviewer operating checklist: [`docs/contributing/reviewer-playbook.md`](docs/contributing/reviewer-playbook.md).
|
||||
|
||||
## Agent Collaboration Guidance
|
||||
|
||||
|
||||
Generated
+253
-342
File diff suppressed because it is too large
Load Diff
+57
-10
@@ -3,8 +3,8 @@ members = [".", "crates/robot-kit"]
|
||||
resolver = "2"
|
||||
|
||||
[package]
|
||||
name = "zeroclaw"
|
||||
version = "0.1.7"
|
||||
name = "zeroclawlabs"
|
||||
version = "0.3.3"
|
||||
edition = "2021"
|
||||
authors = ["theonlyhennygod"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
@@ -15,13 +15,31 @@ keywords = ["ai", "agent", "cli", "assistant", "chatbot"]
|
||||
categories = ["command-line-utilities", "api-bindings"]
|
||||
rust-version = "1.87"
|
||||
|
||||
[[bin]]
|
||||
name = "zeroclaw"
|
||||
path = "src/main.rs"
|
||||
|
||||
[lib]
|
||||
name = "zeroclaw"
|
||||
path = "src/lib.rs"
|
||||
|
||||
include = [
|
||||
"/src/**/*",
|
||||
"/build.rs",
|
||||
"/Cargo.toml",
|
||||
"/Cargo.lock",
|
||||
"/LICENSE*",
|
||||
"/README.md",
|
||||
"/web/dist/**/*",
|
||||
]
|
||||
|
||||
[dependencies]
|
||||
# CLI - minimal and fast
|
||||
clap = { version = "4.5", features = ["derive"] }
|
||||
clap_complete = "4.5"
|
||||
|
||||
# Async runtime - feature-optimized for size
|
||||
tokio = { version = "1.42", default-features = false, features = ["rt-multi-thread", "macros", "time", "net", "io-util", "sync", "process", "io-std", "fs", "signal"] }
|
||||
tokio = { version = "1.50", default-features = false, features = ["rt-multi-thread", "macros", "time", "net", "io-util", "sync", "process", "io-std", "fs", "signal"] }
|
||||
tokio-util = { version = "0.7", default-features = false }
|
||||
tokio-stream = { version = "0.1.18", default-features = false, features = ["fs", "sync"] }
|
||||
|
||||
@@ -48,8 +66,8 @@ schemars = "1.2"
|
||||
tracing = { version = "0.1", default-features = false }
|
||||
tracing-subscriber = { version = "0.3", default-features = false, features = ["fmt", "ansi", "env-filter"] }
|
||||
|
||||
# Observability - Prometheus metrics
|
||||
prometheus = { version = "0.14", default-features = false }
|
||||
# Observability - Prometheus metrics (optional; requires AtomicU64, unavailable on 32-bit)
|
||||
prometheus = { version = "0.14", default-features = false, optional = true }
|
||||
|
||||
# Base64 encoding (screenshots, image data)
|
||||
base64 = "0.22"
|
||||
@@ -62,14 +80,14 @@ urlencoding = "2.1"
|
||||
nanohtml2text = "0.2"
|
||||
|
||||
# Optional Rust-native browser automation backend
|
||||
fantoccini = { version = "0.22.0", optional = true, default-features = false, features = ["rustls-tls"] }
|
||||
fantoccini = { version = "0.22.1", optional = true, default-features = false, features = ["rustls-tls"] }
|
||||
|
||||
# Error handling
|
||||
anyhow = "1.0"
|
||||
thiserror = "2.0"
|
||||
|
||||
# UUID generation
|
||||
uuid = { version = "1.11", default-features = false, features = ["v4", "std"] }
|
||||
uuid = { version = "1.22", default-features = false, features = ["v4", "std"] }
|
||||
|
||||
# Authenticated encryption (AEAD) for secret store
|
||||
chacha20poly1305 = "0.10"
|
||||
@@ -82,6 +100,9 @@ hex = "0.4"
|
||||
# CSPRNG for secure token generation
|
||||
rand = "0.10"
|
||||
|
||||
# Portable atomic fallbacks for targets without native 64-bit atomics
|
||||
portable-atomic = "1"
|
||||
|
||||
# serde-big-array for wa-rs storage (large array serialization)
|
||||
serde-big-array = { version = "0.5", optional = true }
|
||||
|
||||
@@ -117,7 +138,7 @@ which = "8.0"
|
||||
# WebSocket client channels (Discord/Lark/DingTalk/Nostr)
|
||||
tokio-tungstenite = { version = "0.28", features = ["rustls-tls-webpki-roots"] }
|
||||
futures-util = { version = "0.3", default-features = false, features = ["sink"] }
|
||||
nostr-sdk = { version = "0.44", default-features = false, features = ["nip04", "nip59"] }
|
||||
nostr-sdk = { version = "0.44", default-features = false, features = ["nip04", "nip59"], optional = true }
|
||||
regex = "1.10"
|
||||
hostname = "0.4.2"
|
||||
rustls = "0.23"
|
||||
@@ -184,11 +205,14 @@ landlock = { version = "0.4", optional = true }
|
||||
libc = "0.2"
|
||||
|
||||
[features]
|
||||
default = []
|
||||
default = ["observability-prometheus", "channel-nostr"]
|
||||
channel-nostr = ["dep:nostr-sdk"]
|
||||
hardware = ["nusb", "tokio-serial"]
|
||||
channel-matrix = ["dep:matrix-sdk"]
|
||||
channel-lark = ["dep:prost"]
|
||||
channel-feishu = ["channel-lark"] # Alias for Feishu users (Lark and Feishu are the same platform)
|
||||
memory-postgres = ["dep:postgres"]
|
||||
observability-prometheus = ["dep:prometheus"]
|
||||
observability-otel = ["dep:opentelemetry", "dep:opentelemetry_sdk", "dep:opentelemetry-otlp"]
|
||||
peripheral-rpi = ["rppal"]
|
||||
# Browser backend feature alias used by cfg(feature = "browser-native")
|
||||
@@ -200,6 +224,8 @@ sandbox-landlock = ["dep:landlock"]
|
||||
sandbox-bubblewrap = []
|
||||
# Backward-compatible alias for older invocations
|
||||
landlock = ["sandbox-landlock"]
|
||||
# Prometheus metrics observer (requires 64-bit atomics; disable on 32-bit targets)
|
||||
metrics = ["observability-prometheus"]
|
||||
# probe = probe-rs for Nucleo memory read (adds ~50 deps; optional)
|
||||
probe = ["dep:probe-rs"]
|
||||
# rag-pdf = PDF ingestion for datasheet RAG
|
||||
@@ -220,6 +246,11 @@ inherits = "release"
|
||||
codegen-units = 8 # Parallel codegen for faster builds on powerful machines (16GB+ RAM recommended)
|
||||
# Use: cargo build --profile release-fast
|
||||
|
||||
[profile.ci]
|
||||
inherits = "release"
|
||||
lto = "thin" # Much faster than fat LTO; still catches release-mode issues
|
||||
codegen-units = 16 # Full parallelism for CI runners
|
||||
|
||||
[profile.dist]
|
||||
inherits = "release"
|
||||
opt-level = "z"
|
||||
@@ -229,11 +260,27 @@ strip = true
|
||||
panic = "abort"
|
||||
|
||||
[dev-dependencies]
|
||||
tempfile = "3.14"
|
||||
tempfile = "3.26"
|
||||
criterion = { version = "0.8", features = ["async_tokio"] }
|
||||
wiremock = "0.6"
|
||||
scopeguard = "1.2"
|
||||
|
||||
[[test]]
|
||||
name = "component"
|
||||
path = "tests/test_component.rs"
|
||||
|
||||
[[test]]
|
||||
name = "integration"
|
||||
path = "tests/test_integration.rs"
|
||||
|
||||
[[test]]
|
||||
name = "system"
|
||||
path = "tests/test_system.rs"
|
||||
|
||||
[[test]]
|
||||
name = "live"
|
||||
path = "tests/test_live.rs"
|
||||
|
||||
[[bench]]
|
||||
name = "agent_benchmarks"
|
||||
harness = false
|
||||
|
||||
+18
-13
@@ -18,6 +18,7 @@ COPY crates/robot-kit/Cargo.toml crates/robot-kit/Cargo.toml
|
||||
# Create dummy targets declared in Cargo.toml so manifest parsing succeeds.
|
||||
RUN mkdir -p src benches crates/robot-kit/src \
|
||||
&& echo "fn main() {}" > src/main.rs \
|
||||
&& echo "" > src/lib.rs \
|
||||
&& echo "fn main() {}" > benches/agent_benchmarks.rs \
|
||||
&& echo "pub fn placeholder() {}" > crates/robot-kit/src/lib.rs
|
||||
RUN --mount=type=cache,id=zeroclaw-cargo-registry,target=/usr/local/cargo/registry,sharing=locked \
|
||||
@@ -58,20 +59,20 @@ RUN --mount=type=cache,id=zeroclaw-cargo-registry,target=/usr/local/cargo/regist
|
||||
|
||||
# Prepare runtime directory structure and default config inline (no extra stage)
|
||||
RUN mkdir -p /zeroclaw-data/.zeroclaw /zeroclaw-data/workspace && \
|
||||
cat > /zeroclaw-data/.zeroclaw/config.toml <<EOF && \
|
||||
printf '%s\n' \
|
||||
'workspace_dir = "/zeroclaw-data/workspace"' \
|
||||
'config_path = "/zeroclaw-data/.zeroclaw/config.toml"' \
|
||||
'api_key = ""' \
|
||||
'default_provider = "openrouter"' \
|
||||
'default_model = "anthropic/claude-sonnet-4-20250514"' \
|
||||
'default_temperature = 0.7' \
|
||||
'' \
|
||||
'[gateway]' \
|
||||
'port = 42617' \
|
||||
'host = "[::]"' \
|
||||
'allow_public_bind = true' \
|
||||
> /zeroclaw-data/.zeroclaw/config.toml && \
|
||||
chown -R 65534:65534 /zeroclaw-data
|
||||
workspace_dir = "/zeroclaw-data/workspace"
|
||||
config_path = "/zeroclaw-data/.zeroclaw/config.toml"
|
||||
api_key = ""
|
||||
default_provider = "openrouter"
|
||||
default_model = "anthropic/claude-sonnet-4-20250514"
|
||||
default_temperature = 0.7
|
||||
|
||||
[gateway]
|
||||
port = 42617
|
||||
host = "[::]"
|
||||
allow_public_bind = true
|
||||
EOF
|
||||
|
||||
# ── Stage 2: Development Runtime (Debian) ────────────────────
|
||||
FROM debian:trixie-slim@sha256:f6e2cfac5cf956ea044b4bd75e6397b4372ad88fe00908045e9a0d21712ae3ba AS dev
|
||||
@@ -90,6 +91,8 @@ COPY dev/config.template.toml /zeroclaw-data/.zeroclaw/config.toml
|
||||
RUN chown 65534:65534 /zeroclaw-data/.zeroclaw/config.toml
|
||||
|
||||
# Environment setup
|
||||
# Ensure UTF-8 locale so CJK / multibyte input is handled correctly
|
||||
ENV LANG=C.UTF-8
|
||||
# Use consistent workspace path
|
||||
ENV ZEROCLAW_WORKSPACE=/zeroclaw-data/workspace
|
||||
ENV HOME=/zeroclaw-data
|
||||
@@ -114,6 +117,8 @@ COPY --from=builder /app/zeroclaw /usr/local/bin/zeroclaw
|
||||
COPY --from=builder /zeroclaw-data /zeroclaw-data
|
||||
|
||||
# Environment setup
|
||||
# Ensure UTF-8 locale so CJK / multibyte input is handled correctly
|
||||
ENV LANG=C.UTF-8
|
||||
ENV ZEROCLAW_WORKSPACE=/zeroclaw-data/workspace
|
||||
ENV HOME=/zeroclaw-data
|
||||
# Default provider and model are set in config.toml, not here,
|
||||
|
||||
@@ -0,0 +1,120 @@
|
||||
# syntax=docker/dockerfile:1.7
|
||||
|
||||
# Dockerfile.debian — Shell-equipped variant of the ZeroClaw container.
|
||||
#
|
||||
# The default Dockerfile produces a distroless "release" image with no shell,
|
||||
# which is ideal for minimal attack surface but prevents the agent from using
|
||||
# shell-based tools (pwd, ls, git, curl, etc.).
|
||||
#
|
||||
# This variant uses debian:bookworm-slim as the runtime base and ships
|
||||
# essential CLI tools so the agent can operate as a full coding assistant.
|
||||
#
|
||||
# Build:
|
||||
# docker build -f Dockerfile.debian -t zeroclaw:debian .
|
||||
#
|
||||
# Or with docker compose:
|
||||
# docker compose -f docker-compose.yml -f docker-compose.debian.yml up
|
||||
|
||||
# ── Stage 1: Build (identical to main Dockerfile) ───────────
|
||||
FROM rust:1.93-slim@sha256:9663b80a1621253d30b146454f903de48f0af925c967be48c84745537cd35d8b AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Install build dependencies
|
||||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
||||
--mount=type=cache,target=/var/lib/apt,sharing=locked \
|
||||
apt-get update && apt-get install -y \
|
||||
pkg-config \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# 1. Copy manifests to cache dependencies
|
||||
COPY Cargo.toml Cargo.lock ./
|
||||
COPY crates/robot-kit/Cargo.toml crates/robot-kit/Cargo.toml
|
||||
# Create dummy targets declared in Cargo.toml so manifest parsing succeeds.
|
||||
RUN mkdir -p src benches crates/robot-kit/src \
|
||||
&& echo "fn main() {}" > src/main.rs \
|
||||
&& echo "fn main() {}" > benches/agent_benchmarks.rs \
|
||||
&& echo "pub fn placeholder() {}" > crates/robot-kit/src/lib.rs
|
||||
RUN --mount=type=cache,id=zeroclaw-cargo-registry,target=/usr/local/cargo/registry,sharing=locked \
|
||||
--mount=type=cache,id=zeroclaw-cargo-git,target=/usr/local/cargo/git,sharing=locked \
|
||||
--mount=type=cache,id=zeroclaw-target,target=/app/target,sharing=locked \
|
||||
cargo build --release --locked
|
||||
RUN rm -rf src benches crates/robot-kit/src
|
||||
|
||||
# 2. Copy only build-relevant source paths (avoid cache-busting on docs/tests/scripts)
|
||||
COPY src/ src/
|
||||
COPY benches/ benches/
|
||||
COPY crates/ crates/
|
||||
COPY firmware/ firmware/
|
||||
COPY web/ web/
|
||||
# Keep release builds resilient when frontend dist assets are not prebuilt in Git.
|
||||
RUN mkdir -p web/dist && \
|
||||
if [ ! -f web/dist/index.html ]; then \
|
||||
printf '%s\n' \
|
||||
'<!doctype html>' \
|
||||
'<html lang="en">' \
|
||||
' <head>' \
|
||||
' <meta charset="utf-8" />' \
|
||||
' <meta name="viewport" content="width=device-width,initial-scale=1" />' \
|
||||
' <title>ZeroClaw Dashboard</title>' \
|
||||
' </head>' \
|
||||
' <body>' \
|
||||
' <h1>ZeroClaw Dashboard Unavailable</h1>' \
|
||||
' <p>Frontend assets are not bundled in this build. Build the web UI to populate <code>web/dist</code>.</p>' \
|
||||
' </body>' \
|
||||
'</html>' > web/dist/index.html; \
|
||||
fi
|
||||
RUN --mount=type=cache,id=zeroclaw-cargo-registry,target=/usr/local/cargo/registry,sharing=locked \
|
||||
--mount=type=cache,id=zeroclaw-cargo-git,target=/usr/local/cargo/git,sharing=locked \
|
||||
--mount=type=cache,id=zeroclaw-target,target=/app/target,sharing=locked \
|
||||
cargo build --release --locked && \
|
||||
cp target/release/zeroclaw /app/zeroclaw && \
|
||||
strip /app/zeroclaw
|
||||
|
||||
# Prepare runtime directory structure and default config inline (no extra stage)
|
||||
RUN mkdir -p /zeroclaw-data/.zeroclaw /zeroclaw-data/workspace && \
|
||||
printf '%s\n' \
|
||||
'workspace_dir = "/zeroclaw-data/workspace"' \
|
||||
'config_path = "/zeroclaw-data/.zeroclaw/config.toml"' \
|
||||
'api_key = ""' \
|
||||
'default_provider = "openrouter"' \
|
||||
'default_model = "anthropic/claude-sonnet-4-20250514"' \
|
||||
'default_temperature = 0.7' \
|
||||
'' \
|
||||
'[gateway]' \
|
||||
'port = 42617' \
|
||||
'host = "[::]"' \
|
||||
'allow_public_bind = true' \
|
||||
> /zeroclaw-data/.zeroclaw/config.toml && \
|
||||
chown -R 65534:65534 /zeroclaw-data
|
||||
|
||||
# ── Stage 2: Runtime (Debian with shell) ─────────────────────
|
||||
FROM debian:bookworm-slim AS runtime
|
||||
|
||||
# Install essential tools for agent shell operations
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
bash \
|
||||
ca-certificates \
|
||||
curl \
|
||||
git \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY --from=builder /app/zeroclaw /usr/local/bin/zeroclaw
|
||||
COPY --from=builder /zeroclaw-data /zeroclaw-data
|
||||
|
||||
# Environment setup
|
||||
# Ensure UTF-8 locale so CJK / multibyte input is handled correctly
|
||||
ENV LANG=C.UTF-8
|
||||
ENV ZEROCLAW_WORKSPACE=/zeroclaw-data/workspace
|
||||
ENV HOME=/zeroclaw-data
|
||||
# Default provider and model are set in config.toml, not here,
|
||||
# so config file edits are not silently overridden
|
||||
ENV ZEROCLAW_GATEWAY_PORT=42617
|
||||
|
||||
# API_KEY must be provided at runtime!
|
||||
|
||||
WORKDIR /zeroclaw-data
|
||||
USER 65534:65534
|
||||
EXPOSE 42617
|
||||
ENTRYPOINT ["zeroclaw"]
|
||||
CMD ["gateway"]
|
||||
@@ -17,7 +17,7 @@ License
|
||||
|
||||
This software is available under a dual-license model:
|
||||
|
||||
1. MIT License — see LICENSE
|
||||
1. MIT License — see LICENSE-MIT
|
||||
2. Apache License 2.0 — see LICENSE-APACHE
|
||||
|
||||
You may use either license. Contributors grant rights under both.
|
||||
|
||||
+501
@@ -0,0 +1,501 @@
|
||||
<p align="center" dir="rtl">
|
||||
<img src="zeroclaw.png" alt="ZeroClaw" width="200" />
|
||||
</p>
|
||||
|
||||
<h1 align="center">ZeroClaw 🦀</h1>
|
||||
|
||||
<p align="center" dir="rtl">
|
||||
<strong>صفر عبء. صفر تنازلات. 100% Rust. 100% محايد.</strong><br>
|
||||
<strong dir="ltr">⚡️ يعمل على أجهزة بقيمة $10 بأقل من 5MB RAM: ذاكرة أقل بنسبة 99% من OpenClaw وأرخص بنسبة 98% من Mac mini!</strong>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="LICENSE-APACHE"><img src="https://img.shields.io/badge/license-MIT%20OR%20Apache%202.0-blue.svg" alt="License: MIT OR Apache-2.0" /></a>
|
||||
<a href="NOTICE"><img src="https://img.shields.io/badge/contributors-27+-green.svg" alt="Contributors" /></a>
|
||||
<a href="https://buymeacoffee.com/argenistherose"><img src="https://img.shields.io/badge/Buy%20Me%20a%20Coffee-Donate-yellow.svg?style=flat&logo=buy-me-a-coffee" alt="Buy Me a Coffee" /></a>
|
||||
<a href="https://x.com/zeroclawlabs?s=21"><img src="https://img.shields.io/badge/X-%40zeroclawlabs-000000?style=flat&logo=x&logoColor=white" alt="X: @zeroclawlabs" /></a>
|
||||
<a href="https://zeroclawlabs.cn/group.jpg"><img src="https://img.shields.io/badge/WeChat-Group-B7D7A8?logo=wechat&logoColor=white" alt="WeChat Group" /></a>
|
||||
<a href="https://t.me/zeroclawlabs"><img src="https://img.shields.io/badge/Telegram-%40zeroclawlabs-26A5E4?style=flat&logo=telegram&logoColor=white" alt="Telegram: @zeroclawlabs" /></a>
|
||||
<a href="https://www.facebook.com/groups/zeroclaw"><img src="https://img.shields.io/badge/Facebook-Group-1877F2?style=flat&logo=facebook&logoColor=white" alt="Facebook Group" /></a>
|
||||
<a href="https://www.reddit.com/r/zeroclawlabs/"><img src="https://img.shields.io/badge/Reddit-r%2Fzeroclawlabs-FF4500?style=flat&logo=reddit&logoColor=white" alt="Reddit: r/zeroclawlabs" /></a>
|
||||
</p>
|
||||
<p align="center" dir="rtl">
|
||||
بني من قبل طلاب وأعضاء مجتمعات هارفارد ومعهد ماساتشوستس للتكنولوجيا وSundai.Club.
|
||||
</p>
|
||||
|
||||
<p align="center" dir="rtl">
|
||||
🌐 <strong>اللغات:</strong>
|
||||
<a href="README.md">🇺🇸 English</a> ·
|
||||
<a href="README.zh-CN.md">🇨🇳 简体中文</a> ·
|
||||
<a href="README.ja.md">🇯🇵 日本語</a> ·
|
||||
<a href="README.ko.md">🇰🇷 한국어</a> ·
|
||||
<a href="README.vi.md">🇻🇳 Tiếng Việt</a> ·
|
||||
<a href="README.tl.md">🇵🇭 Tagalog</a> ·
|
||||
<a href="README.es.md">🇪🇸 Español</a> ·
|
||||
<a href="README.pt.md">🇧🇷 Português</a> ·
|
||||
<a href="README.it.md">🇮🇹 Italiano</a> ·
|
||||
<a href="README.de.md">🇩🇪 Deutsch</a> ·
|
||||
<a href="README.fr.md">🇫🇷 Français</a> ·
|
||||
<a href="README.ar.md">🇸🇦 العربية</a> ·
|
||||
<a href="README.hi.md">🇮🇳 हिन्दी</a> ·
|
||||
<a href="README.ru.md">🇷🇺 Русский</a> ·
|
||||
<a href="README.bn.md">🇧🇩 বাংলা</a> ·
|
||||
<a href="README.he.md">🇮🇱 עברית</a> ·
|
||||
<a href="README.pl.md">🇵🇱 Polski</a> ·
|
||||
<a href="README.cs.md">🇨🇿 Čeština</a> ·
|
||||
<a href="README.nl.md">🇳🇱 Nederlands</a> ·
|
||||
<a href="README.tr.md">🇹🇷 Türkçe</a> ·
|
||||
<a href="README.uk.md">🇺🇦 Українська</a> ·
|
||||
<a href="README.id.md">🇮🇩 Bahasa Indonesia</a> ·
|
||||
<a href="README.th.md">🇹🇭 ไทย</a> ·
|
||||
<a href="README.ur.md">🇵🇰 اردو</a> ·
|
||||
<a href="README.ro.md">🇷🇴 Română</a> ·
|
||||
<a href="README.sv.md">🇸🇪 Svenska</a> ·
|
||||
<a href="README.el.md">🇬🇷 Ελληνικά</a> ·
|
||||
<a href="README.hu.md">🇭🇺 Magyar</a> ·
|
||||
<a href="README.fi.md">🇫🇮 Suomi</a> ·
|
||||
<a href="README.da.md">🇩🇰 Dansk</a> ·
|
||||
<a href="README.nb.md">🇳🇴 Norsk</a>
|
||||
</p>
|
||||
|
||||
<p align="center" dir="rtl">
|
||||
<a href="#البدء-السريع">البدء السريع</a> |
|
||||
<a href="bootstrap.sh">الإعداد بنقرة واحدة</a> |
|
||||
<a href="docs/README.md">مركز التوثيق</a> |
|
||||
<a href="docs/SUMMARY.md">فهرس التوثيق</a>
|
||||
</p>
|
||||
|
||||
<p align="center" dir="rtl">
|
||||
<strong>الوصول السريع:</strong>
|
||||
<a href="docs/reference/README.md">المرجع</a> ·
|
||||
<a href="docs/operations/README.md">العمليات</a> ·
|
||||
<a href="docs/troubleshooting.md">استكشاف الأخطاء</a> ·
|
||||
<a href="docs/security/README.md">الأمان</a> ·
|
||||
<a href="docs/hardware/README.md">الأجهزة</a> ·
|
||||
<a href="docs/contributing/README.md">المساهمة</a>
|
||||
</p>
|
||||
|
||||
<p align="center" dir="rtl">
|
||||
<strong>بنية تحتية سريعة وخفيفة ومستقلة تمامًا لمساعد الذكاء الاصطناعي</strong><br />
|
||||
انشر في أي مكان. استبدل أي شيء.
|
||||
</p>
|
||||
|
||||
<p align="center" dir="rtl">
|
||||
ZeroClaw هو <strong>نظام تشغيل وقت التشغيل</strong> لعمليات العمل الآلية — بنية تحتية تجرد النماذج والأدوات والذاكرة والتنفيذ لبناء وكلاء مرة واحدة وتشغيلهم في أي مكان.
|
||||
</p>
|
||||
|
||||
<p align="center"><code>بنية قائمة على السمات · وقت تشغيل آمن افتراضيًا · موفر/قناة/أداة قابلة للتبديل · كل شيء قابل للتوصيل</code></p>
|
||||
|
||||
<!-- BEGIN:WHATS_NEW -->
|
||||
|
||||
### 🚀 What's New in v0.3.1 (March 2026)
|
||||
|
||||
| Area | Highlights |
|
||||
|---|---|
|
||||
| ci | add Termux (aarch64-linux-android) release target |
|
||||
|
||||
<!-- END:WHATS_NEW -->
|
||||
|
||||
### 📢 الإعلانات
|
||||
|
||||
استخدم هذا الجدول للإشعارات المهمة (تغييرات التوافق، إشعارات الأمان، نوافذ الصيانة، وحجوز الإصدارات).
|
||||
|
||||
| التاريخ (UTC) | المستوى | الإشعار | الإجراء |
|
||||
| ---------- | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| 2026-02-19 | _حرج_ | **نحن غير مرتبطين** بـ `openagen/zeroclaw` أو `zeroclaw.org`. نطاق `zeroclaw.org` يشير حاليًا إلى الفرع `openagen/zeroclaw`، وهذا النطاق/المستودع ينتحل شخصية موقعنا/مشروعنا الرسمي. | لا تثق بالمعلومات أو الملفات الثنائية أو جمع التبرعات أو الإعلانات من هذه المصادر. استخدم فقط [هذا المستودع](https://github.com/zeroclaw-labs/zeroclaw) وحساباتنا الموثقة على وسائل التواصل الاجتماعي. |
|
||||
| 2026-02-21 | _مهم_ | موقعنا الرسمي أصبح متاحًا الآن: [zeroclawlabs.ai](https://zeroclawlabs.ai). شكرًا لصبرك أثناء الانتظار. لا نزال نكتشف محاولات الانتحال: لا تشارك في أي نشاط استثمار/تمويل باسم ZeroClaw إذا لم يتم نشره عبر قنواتنا الرسمية. | استخدم [هذا المستودع](https://github.com/zeroclaw-labs/zeroclaw) كمصدر وحيد للحقيقة. تابع [X (@zeroclawlabs)](https://x.com/zeroclawlabs?s=21)، [Telegram (@zeroclawlabs)](https://t.me/zeroclawlabs)، [Facebook (مجموعة)](https://www.facebook.com/groups/zeroclaw)، [Reddit (r/zeroclawlabs)](https://www.reddit.com/r/zeroclawlabs/)، و[Xiaohongshu](https://www.xiaohongshu.com/user/profile/67cbfc43000000000d008307?xsec_token=AB73VnYnGNx5y36EtnnZfGmAmS-6Wzv8WMuGpfwfkg6Yc%3D&xsec_source=pc_search) للتحديثات الرسمية. |
|
||||
| 2026-02-19 | _مهم_ | قامت Anthropic بتحديث شروط استخدام المصادقة وبيانات الاعتماد في 2026-02-19. مصادقة OAuth (Free، Pro، Max) حصريًا لـ Claude Code و Claude.ai؛ استخدام رموز Claude Free/Pro/Max OAuth في أي منتج أو أداة أو خدمة أخرى (بما في ذلك Agent SDK) غير مسموح به وقد ينتهك شروط استخدام المستهلك. | يرجى تجنب مؤقتًا تكاملات Claude Code OAuth لمنع أي خسارة محتملة. البند الأصلي: [Authentication and Credential Use](https://code.claude.com/docs/en/legal-and-compliance#authentication-and-credential-use). |
|
||||
|
||||
### ✨ الميزات
|
||||
|
||||
- 🏎️ **وقت تشغيل خفيف افتراضيًا:** عمليات سطر الأوامر الشائعة وأوامر الحالة تعمل ضمن مساحة ذاكرة بضع ميغابايت في إصدارات الإنتاج.
|
||||
- 💰 **نشر فعال من حيث التكلفة:** مصمم للوحات منخفضة التكلفة وحالات السحابة الصغيرة بدون تبعيات وقت تشغيل ثقيلة.
|
||||
- ⚡ **بدء تشغيل سريع من البارد:** وقت تشغيل Rust الثنائي الواحد يحافظ على بدء الأوامر والبرامج الخلفية شبه فوري للعمليات اليومية.
|
||||
- 🌍 **بنية محمولة:** سير عمل ثنائي واحد على ARM و x86 و RISC-V مع موفر/قناة/أداة قابلة للتبديل.
|
||||
|
||||
### لماذا تختار الفرق ZeroClaw
|
||||
|
||||
- **خفيف افتراضيًا:** ملف Rust ثنائي صغير، بدء تشغيل سريع، بصمة ذاكرة منخفضة.
|
||||
- **آمن بالتصميم:** الاقتران، الصندوق الرملي الصارم، قوائم السماح الصريحة، نطاق مساحة العمل.
|
||||
- **قابل للتبديل بالكامل:** الأنظمة الأساسية هي سمات (الموفرون، القنوات، الأدوات، الذاكرة، الأنفاق).
|
||||
- **لا قفل للمورد:** دعم موفر متوافق مع OpenAI + نقاط نهاية مخصصة قابلة للتوصيل.
|
||||
|
||||
## لقطة قياس الأداء (ZeroClaw مقابل OpenClaw، قابلة للتكرار)
|
||||
|
||||
قياس أداء سريع على جهاز محلي (macOS arm64، فبراير 2026) مُطبع لأجهزة الحافة بسرعة 0.8 GHz.
|
||||
|
||||
| | OpenClaw | NanoBot | PicoClaw | ZeroClaw 🦀 |
|
||||
| ---------------------------- | ------------- | -------------- | --------------- | --------------------- |
|
||||
| **اللغة** | TypeScript | Python | Go | **Rust** |
|
||||
| **الذاكرة العشوائية** | > 1 غيغابايت | > 100 ميغابايت | < 10 ميغابايت | **< 5 ميغابايت** |
|
||||
| **بدء التشغيل (نواة 0.8 GHz)** | > 500 ثانية | > 30 ثانية | < 1 ثانية | **< 10 ملي ثانية** |
|
||||
| **حجم الملف الثنائي** | ~28 ميغابايت (dist) | N/A (Scripts) | ~8 ميغابايت | **3.4 ميغابايت** |
|
||||
| **التكلفة** | Mac Mini $599 | Linux SBC ~$50 | لوحة Linux $10 | **أي جهاز $10** |
|
||||
|
||||
> ملاحظات: تم قياس نتائج ZeroClaw في إصدارات الإنتاج باستخدام `/usr/bin/time -l`. يتطلب OpenClaw وقت تشغيل Node.js (عادةً ~390 ميغابايت من عبء الذاكرة الإضافي)، بينما يتطلب NanoBot وقت تشغيل Python. PicoClaw و ZeroClaw هما ملفات ثنائية ثابتة. أرقام الذاكرة العشوائية أعلاه هي ذاكرة وقت التشغيل؛ متطلبات التجميع في وقت البناء أعلى.
|
||||
|
||||
<p align="center">
|
||||
<img src="zero-claw.jpeg" alt="مقارنة ZeroClaw مقابل OpenClaw" width="800" />
|
||||
</p>
|
||||
|
||||
### قياس محلي قابل للتكرار
|
||||
|
||||
قد تتغير ادعاءات قياس الأداء مع تطور الكود وسلاسل الأدوات، لذا قم دائمًا بقياس إصدارك الحالي محليًا:
|
||||
|
||||
```bash
|
||||
cargo build --release
|
||||
ls -lh target/release/zeroclaw
|
||||
|
||||
/usr/bin/time -l target/release/zeroclaw --help
|
||||
/usr/bin/time -l target/release/zeroclaw status
|
||||
```
|
||||
|
||||
عينة مثال (macOS arm64، تم قياسها في 18 فبراير 2026):
|
||||
|
||||
- حجم الملف الثنائي للإصدار: `8.8M`
|
||||
- `zeroclaw --help`: وقت حقيقي حوالي `0.02s`، بصمة ذاكرة قصوى ~`3.9 ميغابايت`
|
||||
- `zeroclaw status`: وقت حقيقي حوالي `0.01s`، بصمة ذاكرة قصوى ~`4.1 ميغابايت`
|
||||
|
||||
## المتطلبات الأساسية
|
||||
|
||||
<details>
|
||||
<summary><strong>Windows</strong></summary>
|
||||
|
||||
### Windows — مطلوب
|
||||
|
||||
1. **Visual Studio Build Tools** (يوفر رابط MSVC و Windows SDK):
|
||||
|
||||
```powershell
|
||||
winget install Microsoft.VisualStudio.2022.BuildTools
|
||||
```
|
||||
|
||||
أثناء التثبيت (أو عبر Visual Studio Installer)، حدد عبء عمل **"تطوير سطح المكتب باستخدام C++"**.
|
||||
|
||||
2. **سلسلة أدوات Rust:**
|
||||
|
||||
```powershell
|
||||
winget install Rustlang.Rustup
|
||||
```
|
||||
|
||||
بعد التثبيت، افتح محطة طرفية جديدة وقم بتشغيل `rustup default stable` للتأكد من أن سلسلة الأدوات المستقرة نشطة.
|
||||
|
||||
3. **تحقق** من أن كلاهما يعمل:
|
||||
```powershell
|
||||
rustc --version
|
||||
cargo --version
|
||||
```
|
||||
|
||||
### Windows — اختياري
|
||||
|
||||
- **Docker Desktop** — مطلوب فقط إذا كنت تستخدم [وقت تشغيل Docker المعزول](#دعم-وقت-التشغيل-الحالي) (`runtime.kind = "docker"`). قم بالتثبيت عبر `winget install Docker.DockerDesktop`.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>Linux / macOS</strong></summary>
|
||||
|
||||
### Linux / macOS — مطلوب
|
||||
|
||||
1. **أدوات البناء الأساسية:**
|
||||
- **Linux (Debian/Ubuntu):** `sudo apt install build-essential pkg-config`
|
||||
- **Linux (Fedora/RHEL):** `sudo dnf group install development-tools && sudo dnf install pkg-config`
|
||||
- **macOS:** قم بتثبيت Xcode Command Line Tools: `xcode-select --install`
|
||||
|
||||
2. **سلسلة أدوات Rust:**
|
||||
|
||||
```bash
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||
```
|
||||
|
||||
راجع [rustup.rs](https://rustup.rs) للتفاصيل.
|
||||
|
||||
3. **تحقق:**
|
||||
```bash
|
||||
rustc --version
|
||||
cargo --version
|
||||
```
|
||||
|
||||
### Linux / macOS — اختياري
|
||||
|
||||
- **Docker** — مطلوب فقط إذا كنت تستخدم [وقت تشغيل Docker المعزول](#دعم-وقت-التشغيل-الحالي) (`runtime.kind = "docker"`).
|
||||
- **Linux (Debian/Ubuntu):** راجع [docs.docker.com](https://docs.docker.com/engine/install/ubuntu/)
|
||||
- **Linux (Fedora/RHEL):** راجع [docs.docker.com](https://docs.docker.com/engine/install/fedora/)
|
||||
- **macOS:** قم بتثبيت Docker Desktop عبر [docker.com/products/docker-desktop](https://www.docker.com/products/docker-desktop/)
|
||||
|
||||
</details>
|
||||
|
||||
## البدء السريع
|
||||
|
||||
### الخيار 1: الإعداد الآلي (موصى به)
|
||||
|
||||
يقوم نص `bootstrap.sh` بتثبيت Rust ونسخ ZeroClaw وتجميعه وإعداد بيئة التطوير الأولية الخاصة بك:
|
||||
|
||||
```bash
|
||||
curl -fsSL https://raw.githubusercontent.com/zeroclaw-labs/zeroclaw/master/bootstrap.sh | bash
|
||||
```
|
||||
|
||||
سيقوم هذا بـ:
|
||||
|
||||
1. تثبيت Rust (إذا لم يكن موجودًا)
|
||||
2. نسخ مستودع ZeroClaw
|
||||
3. تجميع ZeroClaw في وضع الإصدار
|
||||
4. تثبيت `zeroclaw` في `~/.cargo/bin/`
|
||||
5. إنشاء هيكل مساحة العمل الافتراضية في `~/.zeroclaw/workspace/`
|
||||
6. إنشاء ملف تكوين بدء التشغيل `~/.zeroclaw/workspace/config.toml`
|
||||
|
||||
بعد التمهيد، أعد تحميل shell الخاص بك أو قم بتشغيل `source ~/.cargo/env` لاستخدام أمر `zeroclaw` عالميًا.
|
||||
|
||||
### الخيار 2: التثبيت اليدوي
|
||||
|
||||
<details>
|
||||
<summary><strong>انقر لرؤية خطوات التثبيت اليدوي</strong></summary>
|
||||
|
||||
```bash
|
||||
# 1. نسخ المستودع
|
||||
git clone https://github.com/zeroclaw-labs/zeroclaw.git
|
||||
cd zeroclaw
|
||||
|
||||
# 2. التجميع في وضع الإصدار
|
||||
cargo build --release --locked
|
||||
|
||||
# 3. تثبيت الملف الثنائي
|
||||
cargo install --path . --locked
|
||||
|
||||
# 4. تهيئة مساحة العمل
|
||||
zeroclaw init
|
||||
|
||||
# 5. التحقق من التثبيت
|
||||
zeroclaw --version
|
||||
zeroclaw status
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### بعد التثبيت
|
||||
|
||||
بمجرد التثبيت (عبر التمهيد أو يدويًا)، يجب أن ترى:
|
||||
|
||||
```
|
||||
~/.zeroclaw/workspace/
|
||||
├── config.toml # التكوين الرئيسي
|
||||
├── .pairing # أسرار الاقتران (تُنشأ عند التشغيل الأول)
|
||||
├── logs/ # سجلات البرنامج الخفي/الوكيل
|
||||
├── skills/ # المهارات المخصصة
|
||||
└── memory/ # تخزين سياق المحادثة
|
||||
```
|
||||
|
||||
**الخطوات التالية:**
|
||||
|
||||
1. قم بتكوين موفري الذكاء الاصطناعي الخاص بك في `~/.zeroclaw/workspace/config.toml`
|
||||
2. تحقق من [مرجع التكوين](docs/config-reference.md) للخيارات المتقدمة
|
||||
3. ابدأ الوكيل: `zeroclaw agent start`
|
||||
4. اختبر عبر قناتك المفضلة (راجع [مرجع القنوات](docs/channels-reference.md))
|
||||
|
||||
## التكوين
|
||||
|
||||
قم بتحرير `~/.zeroclaw/workspace/config.toml` لتكوين الموفرون والقنوات وسلوك النظام.
|
||||
|
||||
### مرجع التكوين السريع
|
||||
|
||||
```toml
|
||||
[providers.anthropic]
|
||||
api_key = "sk-ant-..."
|
||||
model = "claude-sonnet-4-20250514"
|
||||
|
||||
[providers.openai]
|
||||
api_key = "sk-..."
|
||||
model = "gpt-4o"
|
||||
|
||||
[channels.telegram]
|
||||
enabled = true
|
||||
bot_token = "123456:ABC-DEF..."
|
||||
|
||||
[channels.matrix]
|
||||
enabled = true
|
||||
homeserver_url = "https://matrix.org"
|
||||
username = "@bot:matrix.org"
|
||||
password = "..."
|
||||
|
||||
[memory]
|
||||
kind = "markdown" # أو "sqlite" أو "none"
|
||||
|
||||
[runtime]
|
||||
kind = "native" # أو "docker" (يتطلب Docker)
|
||||
```
|
||||
|
||||
**مستندات المرجع الكاملة:**
|
||||
|
||||
- [مرجع التكوين](docs/config-reference.md) — جميع الإعدادات والتحقق والقيم الافتراضية
|
||||
- [مرجع الموفرون](docs/providers-reference.md) — تكوينات محددة لموفري الذكاء الاصطناعي
|
||||
- [مرجع القنوات](docs/channels-reference.md) — Telegram و Matrix و Slack و Discord والمزيد
|
||||
- [العمليات](docs/operations-runbook.md) — المراقبة في الإنتاج وتدوير الأسرار والتوسع
|
||||
|
||||
### دعم وقت التشغيل الحالي
|
||||
|
||||
يدعم ZeroClaw واجهتين خلفيتين لتنفيذ الكود:
|
||||
|
||||
- **`native`** (افتراضي) — تنفيذ العملية المباشر، المسار الأسرع، مثالي للبيئات الموثوقة
|
||||
- **`docker`** — عزل الحاوية الكامل، سياسات الأمان المحصنة، يتطلب Docker
|
||||
|
||||
استخدم `runtime.kind = "docker"` إذا كنت بحاجة إلى صندوق رملي صارم أو عزل الشبكة. راجع [مرجع التكوين](docs/config-reference.md#runtime) للتفاصيل الكاملة.
|
||||
|
||||
## الأوامر
|
||||
|
||||
```bash
|
||||
# إدارة مساحة العمل
|
||||
zeroclaw init # تهيئة مساحة عمل جديدة
|
||||
zeroclaw status # عرض حالة البرنامج الخفي/الوكيل
|
||||
zeroclaw config validate # التحقق من بنية وقيم config.toml
|
||||
|
||||
# إدارة البرنامج الخفي
|
||||
zeroclaw daemon start # بدء البرنامج الخفي في الخلفية
|
||||
zeroclaw daemon stop # إيقاف البرنامج الخفي قيد التشغيل
|
||||
zeroclaw daemon restart # إعادة تشغيل البرنامج الخفي (إعادة تحميل التكوين)
|
||||
zeroclaw daemon logs # عرض سجلات البرنامج الخفي
|
||||
|
||||
# إدارة الوكيل
|
||||
zeroclaw agent start # بدء الوكيل (يتطلب تشغيل البرنامج الخفي)
|
||||
zeroclaw agent stop # إيقاف الوكيل
|
||||
zeroclaw agent restart # إعادة تشغيل الوكيل (إعادة تحميل التكوين)
|
||||
|
||||
# عمليات الاقتران
|
||||
zeroclaw pairing init # إنشاء سر اقتران جديد
|
||||
zeroclaw pairing rotate # تدوير سر الاقتران الحالي
|
||||
|
||||
# الأنفاق (للتعرض العام)
|
||||
zeroclaw tunnel start # بدء نفق إلى البرنامج الخفي المحلي
|
||||
zeroclaw tunnel stop # إيقاف النفق النشط
|
||||
|
||||
# التشخيص
|
||||
zeroclaw doctor # تشغيل فحوصات صحة النظام
|
||||
zeroclaw version # عرض الإصدار ومعلومات البناء
|
||||
```
|
||||
|
||||
راجع [مرجع الأوامر](docs/commands-reference.md) للخيارات والأمثلة الكاملة.
|
||||
|
||||
## التعاون والتوثيق
|
||||
|
||||
ابدأ بمركز التوثيق لخريطة قائمة على المهام:
|
||||
|
||||
- مركز التوثيق: [`docs/README.md`](docs/README.md)
|
||||
- فهرس التوثيق الموحد: [`docs/SUMMARY.md`](docs/SUMMARY.md)
|
||||
- مرجع الأوامر: [`docs/commands-reference.md`](docs/commands-reference.md)
|
||||
- مرجع التكوين: [`docs/config-reference.md`](docs/config-reference.md)
|
||||
- مرجع الموفرون: [`docs/providers-reference.md`](docs/providers-reference.md)
|
||||
- مرجع القنوات: [`docs/channels-reference.md`](docs/channels-reference.md)
|
||||
- دليل العمليات: [`docs/operations-runbook.md`](docs/operations-runbook.md)
|
||||
- استكشاف الأخطاء: [`docs/troubleshooting.md`](docs/troubleshooting.md)
|
||||
- مخزون/تصنيف التوثيق: [`docs/docs-inventory.md`](docs/docs-inventory.md)
|
||||
- لقطة فرز PR/المشكلة (اعتبارًا من 18 فبراير 2026): [`docs/project-triage-snapshot-2026-02-18.md`](docs/project-triage-snapshot-2026-02-18.md)
|
||||
|
||||
مراجع التعاون الرئيسية:
|
||||
|
||||
- مركز التوثيق: [docs/README.md](docs/README.md)
|
||||
- قالب التوثيق: [docs/doc-template.md](docs/doc-template.md)
|
||||
- قائمة تغيير التوثيق: [docs/README.md#4-documentation-change-checklist](docs/README.md#4-documentation-change-checklist)
|
||||
- مرجع تكوين القنوات: [docs/channels-reference.md](docs/channels-reference.md)
|
||||
- عمليات غرف Matrix المشفرة: [docs/matrix-e2ee-guide.md](docs/matrix-e2ee-guide.md)
|
||||
- دليل المساهمة: [CONTRIBUTING.md](CONTRIBUTING.md)
|
||||
- سياسة سير عمل PR: [docs/pr-workflow.md](docs/pr-workflow.md)
|
||||
- دليل المراجع (الفرز + المراجعة العميقة): [docs/reviewer-playbook.md](docs/reviewer-playbook.md)
|
||||
- خريطة الملكية وفرز CI: [docs/ci-map.md](docs/ci-map.md)
|
||||
- سياسة الإفصاح الأمني: [SECURITY.md](SECURITY.md)
|
||||
|
||||
للنشر وعمليات وقت التشغيل:
|
||||
|
||||
- دليل نشر الشبكة: [docs/network-deployment.md](docs/network-deployment.md)
|
||||
- دليل وكيل الوكيل: [docs/proxy-agent-playbook.md](docs/proxy-agent-playbook.md)
|
||||
|
||||
## دعم ZeroClaw
|
||||
|
||||
إذا كان ZeroClaw يساعد عملك وترغب في دعم التطوير المستمر، يمكنك التبرع هنا:
|
||||
|
||||
<a href="https://buymeacoffee.com/argenistherose"><img src="https://img.shields.io/badge/Buy%20Me%20a%20Coffee-Donate-yellow.svg?style=for-the-badge&logo=buy-me-a-coffee" alt="اشترِ لي قهوة" /></a>
|
||||
|
||||
### 🙏 شكر خاص
|
||||
|
||||
شكر خالص للمجتمعات والمؤسسات التي تلهم وتغذي هذا العمل مفتوح المصدر:
|
||||
|
||||
- **جامعة هارفارد** — لتعزيز الفضول الفكري ودفع حدود ما هو ممكن.
|
||||
- **MIT** — للدفاع عن المعرفة المفتوحة والمصدر المفتوح والاعتقاد بأن التكنولوجيا يجب أن تكون متاحة للجميع.
|
||||
- **Sundai Club** — للمجتمع والطاقة والإرادة الدؤوبة لبناء أشياء مهمة.
|
||||
- **العالم وما بعده** 🌍✨ — لكل مساهم وحالم وباني هناك يجعل المصدر المفتوح قوة للخير. هذا من أجلك.
|
||||
|
||||
نحن نبني في المصدر المفتوح لأن أفضل الأفكار تأتي من كل مكان. إذا كنت تقرأ هذا، فأنت جزء منه. مرحبًا. 🦀❤️
|
||||
|
||||
<!-- BEGIN:RECENT_CONTRIBUTORS -->
|
||||
|
||||
### 🌟 Recent Contributors (v0.3.1)
|
||||
|
||||
3 contributors shipped features, fixes, and improvements in this release cycle:
|
||||
|
||||
- **Argenis**
|
||||
- **argenis de la rosa**
|
||||
- **Claude Opus 4.6**
|
||||
|
||||
Thank you to everyone who opened issues, reviewed PRs, translated docs, and helped test. Every contribution matters. 🦀
|
||||
|
||||
<!-- END:RECENT_CONTRIBUTORS -->
|
||||
|
||||
## ⚠️ المستودع الرسمي وتحذير الانتحال
|
||||
|
||||
**هذا هو مستودع ZeroClaw الرسمي الوحيد:**
|
||||
|
||||
> <https://github.com/zeroclaw-labs/zeroclaw>
|
||||
|
||||
أي مستودع أو منظمة أو نطاق أو حزمة آخر يدعي أنه "ZeroClaw" أو يلمح إلى الارتباط بـ ZeroClaw Labs هو **غير مصرح به وغير مرتبط بهذا المشروع**. سيتم إدراج الفروع غير المصرح بها المعروفة في [TRADEMARK.md](TRADEMARK.md).
|
||||
|
||||
إذا واجهت انتحالًا أو سوء استخدام للعلامة التجارية، يرجى [فتح مشكلة](https://github.com/zeroclaw-labs/zeroclaw/issues).
|
||||
|
||||
---
|
||||
|
||||
## الترخيص
|
||||
|
||||
ZeroClaw مرخص بشكل مزدوج لأقصى قدر من الانفتاح وحماية المساهمين:
|
||||
|
||||
| الترخيص | حالات الاستخدام |
|
||||
| ---------------------------- | ------------------------------------------------------------ |
|
||||
| [MIT](LICENSE-MIT) | مفتوح المصدر، البحث، الأكاديمي، الاستخدام الشخصي |
|
||||
| [Apache 2.0](LICENSE-APACHE) | حماية براءات الاختراع، المؤسسي، النشر التجاري |
|
||||
|
||||
يمكنك اختيار أي من الترخيصين. **يمنح المساهمون تلقائيًا حقوقًا بموجب كليهما** — راجع [CLA.md](CLA.md) لاتفاقية المساهم الكاملة.
|
||||
|
||||
### العلامة التجارية
|
||||
|
||||
اسم **ZeroClaw** والشعار علامتان تجاريتان مسجلتان لـ ZeroClaw Labs. لا يمنح هذا الترخيص الإذن باستخدامهما للإيحاء بالموافقة أو الارتباط. راجع [TRADEMARK.md](TRADEMARK.md) للاستخدامات المسموح بها والمحظورة.
|
||||
|
||||
### حماية المساهمين
|
||||
|
||||
- **تحتفظ بحقوق النشر** لمساهماتك
|
||||
- **منح براءة الاختراع** (Apache 2.0) يحميك من مطالبات براءات الاختراع من مساهمين آخرين
|
||||
- يتم **نسب مساهماتك بشكل دائم** في تاريخ الالتزامات و [NOTICE](NOTICE)
|
||||
- لا يتم نقل حقوق العلامة التجارية من خلال المساهمة
|
||||
|
||||
## المساهمة
|
||||
|
||||
راجع [CONTRIBUTING.md](CONTRIBUTING.md) و [CLA.md](CLA.md). قم بتنفيذ سمة، أرسل PR:
|
||||
|
||||
- دليل سير عمل CI: [docs/ci-map.md](docs/ci-map.md)
|
||||
- `Provider` جديد ← `src/providers/`
|
||||
- `Channel` جديد ← `src/channels/`
|
||||
- `Observer` جديد ← `src/observability/`
|
||||
- `Tool` جديد ← `src/tools/`
|
||||
- `Memory` جديدة ← `src/memory/`
|
||||
- `Tunnel` جديد ← `src/tunnel/`
|
||||
- `Skill` جديدة ← `~/.zeroclaw/workspace/skills/<n>/`
|
||||
|
||||
---
|
||||
|
||||
**ZeroClaw** — صفر عبء. صفر تنازلات. انشر في أي مكان. استبدل أي شيء. 🦀
|
||||
|
||||
## تاريخ النجوم
|
||||
|
||||
<p align="center">
|
||||
<a href="https://www.star-history.com/#zeroclaw-labs/zeroclaw&type=date&legend=top-left">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=zeroclaw-labs/zeroclaw&type=date&theme=dark&legend=top-left" />
|
||||
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=zeroclaw-labs/zeroclaw&type=date&legend=top-left" />
|
||||
<img alt="رسم بياني لتاريخ النجوم" src="https://api.star-history.com/svg?repos=zeroclaw-labs/zeroclaw&type=date&legend=top-left" />
|
||||
</picture>
|
||||
</a>
|
||||
</p>
|
||||
+203
@@ -0,0 +1,203 @@
|
||||
<p align="center">
|
||||
<img src="zeroclaw.png" alt="ZeroClaw" width="200" />
|
||||
</p>
|
||||
|
||||
<h1 align="center">ZeroClaw 🦀</h1>
|
||||
|
||||
<p align="center">
|
||||
<strong>শূন্য ওভারহেড। শূন্য আপস। 100% রাস্ট। 100% অজ্ঞেয়বাদী।</strong><br>
|
||||
⚡️ <strong>$10 হার্ডওয়্যারে <5MB RAM নিয়ে চলে: এটি OpenClaw থেকে 99% কম মেমোরি এবং Mac mini থেকে 98% সস্তা!</strong>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="LICENSE-APACHE"><img src="https://img.shields.io/badge/license-MIT%20OR%20Apache%202.0-blue.svg" alt="License: MIT OR Apache-2.0" /></a>
|
||||
<a href="NOTICE"><img src="https://img.shields.io/badge/contributors-27+-green.svg" alt="Contributors" /></a>
|
||||
<a href="https://buymeacoffee.com/argenistherose"><img src="https://img.shields.io/badge/Buy%20Me%20a%20Coffee-Donate-yellow.svg?style=flat&logo=buy-me-a-coffee" alt="Buy Me a Coffee" /></a>
|
||||
<a href="https://x.com/zeroclawlabs?s=21"><img src="https://img.shields.io/badge/X-%40zeroclawlabs-000000?style=flat&logo=x&logoColor=white" alt="X: @zeroclawlabs" /></a>
|
||||
<a href="https://zeroclawlabs.cn/group.jpg"><img src="https://img.shields.io/badge/WeChat-Group-B7D7A8?logo=wechat&logoColor=white" alt="WeChat Group" /></a>
|
||||
<a href="https://www.xiaohongshu.com/user/profile/67cbfc43000000000d008307?xsec_token=AB73VnYnGNx5y36EtnnZfGmAmS-6Wzv8WMuGpfwfkg6Yc%3D&xsec_source=pc_search"><img src="https://img.shields.io/badge/Xiaohongshu-Official-FF2442?style=flat" alt="Xiaohongshu: Official" /></a>
|
||||
<a href="https://t.me/zeroclawlabs"><img src="https://img.shields.io/badge/Telegram-%40zeroclawlabs-26A5E4?style=flat&logo=telegram&logoColor=white" alt="Telegram: @zeroclawlabs" /></a>
|
||||
<a href="https://www.facebook.com/groups/zeroclaw"><img src="https://img.shields.io/badge/Facebook-Group-1877F2?style=flat&logo=facebook&logoColor=white" alt="Facebook Group" /></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
🌐 <strong>ভাষা:</strong>
|
||||
<a href="README.md">🇺🇸 English</a> ·
|
||||
<a href="README.zh-CN.md">🇨🇳 简体中文</a> ·
|
||||
<a href="README.ja.md">🇯🇵 日本語</a> ·
|
||||
<a href="README.ko.md">🇰🇷 한국어</a> ·
|
||||
<a href="README.vi.md">🇻🇳 Tiếng Việt</a> ·
|
||||
<a href="README.tl.md">🇵🇭 Tagalog</a> ·
|
||||
<a href="README.es.md">🇪🇸 Español</a> ·
|
||||
<a href="README.pt.md">🇧🇷 Português</a> ·
|
||||
<a href="README.it.md">🇮🇹 Italiano</a> ·
|
||||
<a href="README.de.md">🇩🇪 Deutsch</a> ·
|
||||
<a href="README.fr.md">🇫🇷 Français</a> ·
|
||||
<a href="README.ar.md">🇸🇦 العربية</a> ·
|
||||
<a href="README.hi.md">🇮🇳 हिन्दी</a> ·
|
||||
<a href="README.ru.md">🇷🇺 Русский</a> ·
|
||||
<a href="README.bn.md">🇧🇩 বাংলা</a> ·
|
||||
<a href="README.he.md">🇮🇱 עברית</a> ·
|
||||
<a href="README.pl.md">🇵🇱 Polski</a> ·
|
||||
<a href="README.cs.md">🇨🇿 Čeština</a> ·
|
||||
<a href="README.nl.md">🇳🇱 Nederlands</a> ·
|
||||
<a href="README.tr.md">🇹🇷 Türkçe</a> ·
|
||||
<a href="README.uk.md">🇺🇦 Українська</a> ·
|
||||
<a href="README.id.md">🇮🇩 Bahasa Indonesia</a> ·
|
||||
<a href="README.th.md">🇹🇭 ไทย</a> ·
|
||||
<a href="README.ur.md">🇵🇰 اردو</a> ·
|
||||
<a href="README.ro.md">🇷🇴 Română</a> ·
|
||||
<a href="README.sv.md">🇸🇪 Svenska</a> ·
|
||||
<a href="README.el.md">🇬🇷 Ελληνικά</a> ·
|
||||
<a href="README.hu.md">🇭🇺 Magyar</a> ·
|
||||
<a href="README.fi.md">🇫🇮 Suomi</a> ·
|
||||
<a href="README.da.md">🇩🇰 Dansk</a> ·
|
||||
<a href="README.nb.md">🇳🇴 Norsk</a>
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
<!-- BEGIN:WHATS_NEW -->
|
||||
|
||||
### 🚀 What's New in v0.3.1 (March 2026)
|
||||
|
||||
| Area | Highlights |
|
||||
|---|---|
|
||||
| ci | add Termux (aarch64-linux-android) release target |
|
||||
|
||||
<!-- END:WHATS_NEW -->
|
||||
|
||||
## ZeroClaw কী?
|
||||
|
||||
ZeroClaw হল একটি হালকা, মিউটেবল এবং এক্সটেনসিবল AI অ্যাসিস্ট্যান্ট ইনফ্রাস্ট্রাকচার যা রাস্টে তৈরি। এটি বিভিন্ন LLM প্রদানকারীদের (Anthropic, OpenAI, Google, Ollama, ইত্যাদি) একটি ইউনিফাইড ইন্টারফেসের মাধ্যমে সংযুক্ত করে এবং একাধিক চ্যানেল (Telegram, Matrix, CLI, ইত্যাদি) সমর্থন করে।
|
||||
|
||||
### মূল বৈশিষ্ট্যসমূহ
|
||||
|
||||
- **🦀 রাস্টে লেখা**: উচ্চ পারফরম্যান্স, মেমোরি নিরাপত্তা, এবং জিরো-কস্ট অ্যাবস্ট্রাকশন
|
||||
- **🔌 প্রদানকারী-অজ্ঞেয়বাদী**: OpenAI, Anthropic, Google Gemini, Ollama, এবং অন্যান্য সমর্থন
|
||||
- **📱 মাল্টি-চ্যানেল**: Telegram, Matrix (E2EE সহ), CLI, এবং অন্যান্য
|
||||
- **🧠 প্লাগেবল মেমোরি**: SQLite এবং Markdown ব্যাকএন্ড
|
||||
- **🛠️ এক্সটেন্সিবল টুলস**: সহজেই কাস্টম টুল যোগ করুন
|
||||
- **🔒 নিরাপত্তা-প্রথম**: রিভার্স-প্রক্সি, গোপনীয়তা-প্রথম ডিজাইন
|
||||
|
||||
---
|
||||
|
||||
## দ্রুত শুরু
|
||||
|
||||
### প্রয়োজনীয়তা
|
||||
|
||||
- রাস্ট 1.70+
|
||||
- একটি LLM প্রদানকারী API কী (Anthropic, OpenAI, ইত্যাদি)
|
||||
|
||||
### ইনস্টলেশন
|
||||
|
||||
```bash
|
||||
# রিপোজিটরি ক্লোন করুন
|
||||
git clone https://github.com/zeroclaw-labs/zeroclaw.git
|
||||
cd zeroclaw
|
||||
|
||||
# বিল্ড করুন
|
||||
cargo build --release
|
||||
|
||||
# চালান
|
||||
cargo run --release
|
||||
```
|
||||
|
||||
### Docker দিয়ে
|
||||
|
||||
```bash
|
||||
docker run -d \
|
||||
--name zeroclaw \
|
||||
-e ANTHROPIC_API_KEY=your_key \
|
||||
-v zeroclaw-data:/app/data \
|
||||
zeroclaw/zeroclaw:latest
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## কনফিগারেশন
|
||||
|
||||
ZeroClaw একটি YAML কনফিগারেশন ফাইল ব্যবহার করে। ডিফল্টরূপে, এটি `config.yaml` দেখে।
|
||||
|
||||
```yaml
|
||||
# ডিফল্ট প্রদানকারী
|
||||
provider: anthropic
|
||||
|
||||
# প্রদানকারী কনফিগারেশন
|
||||
providers:
|
||||
anthropic:
|
||||
api_key: ${ANTHROPIC_API_KEY}
|
||||
model: claude-3-5-sonnet-20241022
|
||||
openai:
|
||||
api_key: ${OPENAI_API_KEY}
|
||||
model: gpt-4o
|
||||
|
||||
# মেমোরি কনফিগারেশন
|
||||
memory:
|
||||
backend: sqlite
|
||||
path: data/memory.db
|
||||
|
||||
# চ্যানেল কনফিগারেশন
|
||||
channels:
|
||||
telegram:
|
||||
token: ${TELEGRAM_BOT_TOKEN}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## ডকুমেন্টেশন
|
||||
|
||||
বিস্তারিত ডকুমেন্টেশনের জন্য, দেখুন:
|
||||
|
||||
- [ডকুমেন্টেশন হাব](docs/README.md)
|
||||
- [কমান্ড রেফারেন্স](docs/commands-reference.md)
|
||||
- [প্রদানকারী রেফারেন্স](docs/providers-reference.md)
|
||||
- [চ্যানেল রেফারেন্স](docs/channels-reference.md)
|
||||
- [কনফিগারেশন রেফারেন্স](docs/config-reference.md)
|
||||
|
||||
---
|
||||
|
||||
## অবদান
|
||||
|
||||
অবদান স্বাগত! অনুগ্রহ করে [অবদান গাইড](CONTRIBUTING.md) পড়ুন।
|
||||
|
||||
---
|
||||
|
||||
## লাইসেন্স
|
||||
|
||||
এই প্রজেক্টটি ডুয়াল লাইসেন্সপ্রাপ্ত:
|
||||
|
||||
- MIT লাইসেন্স
|
||||
- Apache লাইসেন্স, সংস্করণ 2.0
|
||||
|
||||
বিস্তারিতের জন্য [LICENSE-APACHE](LICENSE-APACHE) এবং [LICENSE-MIT](LICENSE-MIT) দেখুন।
|
||||
|
||||
---
|
||||
|
||||
## কমিউনিটি
|
||||
|
||||
- [Telegram](https://t.me/zeroclawlabs)
|
||||
- [Facebook Group](https://www.facebook.com/groups/zeroclaw)
|
||||
- [WeChat Group](https://zeroclawlabs.cn/group.jpg)
|
||||
|
||||
---
|
||||
|
||||
## স্পনসর
|
||||
|
||||
যদি ZeroClaw আপনার জন্য উপযোগী হয়, তবে অনুগ্রহ করে আমাদের একটি কফি কিনতে বিবেচনা করুন:
|
||||
|
||||
[](https://buymeacoffee.com/argenistherose)
|
||||
|
||||
<!-- BEGIN:RECENT_CONTRIBUTORS -->
|
||||
|
||||
### 🌟 Recent Contributors (v0.3.1)
|
||||
|
||||
3 contributors shipped features, fixes, and improvements in this release cycle:
|
||||
|
||||
- **Argenis**
|
||||
- **argenis de la rosa**
|
||||
- **Claude Opus 4.6**
|
||||
|
||||
Thank you to everyone who opened issues, reviewed PRs, translated docs, and helped test. Every contribution matters. 🦀
|
||||
|
||||
<!-- END:RECENT_CONTRIBUTORS -->
|
||||
+501
@@ -0,0 +1,501 @@
|
||||
<p align="center">
|
||||
<img src="zeroclaw.png" alt="ZeroClaw" width="200" />
|
||||
</p>
|
||||
|
||||
<h1 align="center">ZeroClaw 🦀</h1>
|
||||
|
||||
<p align="center">
|
||||
<strong>Nulová režie. Nulové kompromisy. 100% Rust. 100% Agnostický.</strong><br>
|
||||
⚡️ <strong>Beží na hardwaru za $10 s <5MB RAM: To je o 99% méně paměti než OpenClaw a o 98% levnější než Mac mini!</strong>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="LICENSE-APACHE"><img src="https://img.shields.io/badge/license-MIT%20OR%20Apache%202.0-blue.svg" alt="License: MIT OR Apache-2.0" /></a>
|
||||
<a href="NOTICE"><img src="https://img.shields.io/badge/contributors-27+-green.svg" alt="Contributors" /></a>
|
||||
<a href="https://buymeacoffee.com/argenistherose"><img src="https://img.shields.io/badge/Buy%20Me%20a%20Coffee-Donate-yellow.svg?style=flat&logo=buy-me-a-coffee" alt="Buy Me a Coffee" /></a>
|
||||
<a href="https://x.com/zeroclawlabs?s=21"><img src="https://img.shields.io/badge/X-%40zeroclawlabs-000000?style=flat&logo=x&logoColor=white" alt="X: @zeroclawlabs" /></a>
|
||||
<a href="https://zeroclawlabs.cn/group.jpg"><img src="https://img.shields.io/badge/WeChat-Group-B7D7A8?logo=wechat&logoColor=white" alt="WeChat Group" /></a>
|
||||
<a href="https://www.xiaohongshu.com/user/profile/67cbfc43000000000d008307?xsec_token=AB73VnYnGNx5y36EtnnZfGmAmS-6Wzv8WMuGpfwfkg6Yc%3D&xsec_source=pc_search"><img src="https://img.shields.io/badge/Xiaohongshu-Official-FF2442?style=flat" alt="Xiaohongshu: Official" /></a>
|
||||
<a href="https://t.me/zeroclawlabs"><img src="https://img.shields.io/badge/Telegram-%40zeroclawlabs-26A5E4?style=flat&logo=telegram&logoColor=white" alt="Telegram: @zeroclawlabs" /></a>
|
||||
<a href="https://www.facebook.com/groups/zeroclaw"><img src="https://img.shields.io/badge/Facebook-Group-1877F2?style=flat&logo=facebook&logoColor=white" alt="Facebook Group" /></a>
|
||||
<a href="https://www.reddit.com/r/zeroclawlabs/"><img src="https://img.shields.io/badge/Reddit-r%2Fzeroclawlabs-FF4500?style=flat&logo=reddit&logoColor=white" alt="Reddit: r/zeroclawlabs" /></a>
|
||||
</p>
|
||||
<p align="center">
|
||||
Postaveno studenty a členy komunit Harvard, MIT a Sundai.Club.
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
🌐 <strong>Jazyky:</strong><a href="README.md">🇺🇸 English</a> ·
|
||||
<a href="README.zh-CN.md">🇨🇳 简体中文</a> ·
|
||||
<a href="README.ja.md">🇯🇵 日本語</a> ·
|
||||
<a href="README.ko.md">🇰🇷 한국어</a> ·
|
||||
<a href="README.vi.md">🇻🇳 Tiếng Việt</a> ·
|
||||
<a href="README.tl.md">🇵🇭 Tagalog</a> ·
|
||||
<a href="README.es.md">🇪🇸 Español</a> ·
|
||||
<a href="README.pt.md">🇧🇷 Português</a> ·
|
||||
<a href="README.it.md">🇮🇹 Italiano</a> ·
|
||||
<a href="README.de.md">🇩🇪 Deutsch</a> ·
|
||||
<a href="README.fr.md">🇫🇷 Français</a> ·
|
||||
<a href="README.ar.md">🇸🇦 العربية</a> ·
|
||||
<a href="README.hi.md">🇮🇳 हिन्दी</a> ·
|
||||
<a href="README.ru.md">🇷🇺 Русский</a> ·
|
||||
<a href="README.bn.md">🇧🇩 বাংলা</a> ·
|
||||
<a href="README.he.md">🇮🇱 עברית</a> ·
|
||||
<a href="README.pl.md">🇵🇱 Polski</a> ·
|
||||
<a href="README.cs.md">🇨🇿 Čeština</a> ·
|
||||
<a href="README.nl.md">🇳🇱 Nederlands</a> ·
|
||||
<a href="README.tr.md">🇹🇷 Türkçe</a> ·
|
||||
<a href="README.uk.md">🇺🇦 Українська</a> ·
|
||||
<a href="README.id.md">🇮🇩 Bahasa Indonesia</a> ·
|
||||
<a href="README.th.md">🇹🇭 ไทย</a> ·
|
||||
<a href="README.ur.md">🇵🇰 اردو</a> ·
|
||||
<a href="README.ro.md">🇷🇴 Română</a> ·
|
||||
<a href="README.sv.md">🇸🇪 Svenska</a> ·
|
||||
<a href="README.el.md">🇬🇷 Ελληνικά</a> ·
|
||||
<a href="README.hu.md">🇭🇺 Magyar</a> ·
|
||||
<a href="README.fi.md">🇫🇮 Suomi</a> ·
|
||||
<a href="README.da.md">🇩🇰 Dansk</a> ·
|
||||
<a href="README.nb.md">🇳🇴 Norsk</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="#rychlý-start">Rychlý Start</a> |
|
||||
<a href="bootstrap.sh">Jedno-klikové nastavení</a> |
|
||||
<a href="docs/README.md">Dokumentační Centrum</a> |
|
||||
<a href="docs/SUMMARY.md">Obsah Dokumentace</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<strong>Rychlý přístup:</strong>
|
||||
<a href="docs/reference/README.md">Reference</a> ·
|
||||
<a href="docs/operations/README.md">Operace</a> ·
|
||||
<a href="docs/troubleshooting.md">Řešení problémů</a> ·
|
||||
<a href="docs/security/README.md">Bezpečnost</a> ·
|
||||
<a href="docs/hardware/README.md">Hardware</a> ·
|
||||
<a href="docs/contributing/README.md">Příspívání</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<strong>Rychlá, lehká a plně autonomní AI asistent infrastruktura</strong><br />
|
||||
Nasazujte kdekoliv. Měňte cokoliv.
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
ZeroClaw je <strong>operační systém runtime</strong> pro workflow agentů — infrastruktura která abstrahuje modely, nástroje, paměť a provádění pro stavbu agentů jednou a spouštění kdekoliv.
|
||||
</p>
|
||||
|
||||
<p align="center"><code>Architektura založená na traitech · bezpečný runtime defaultně · vyměnitelný poskytovatel/kanál/nástroj · vše je připojitelné</code></p>
|
||||
|
||||
<!-- BEGIN:WHATS_NEW -->
|
||||
|
||||
### 🚀 What's New in v0.3.1 (March 2026)
|
||||
|
||||
| Area | Highlights |
|
||||
|---|---|
|
||||
| ci | add Termux (aarch64-linux-android) release target |
|
||||
|
||||
<!-- END:WHATS_NEW -->
|
||||
|
||||
### 📢 Oznámení
|
||||
|
||||
Použijte tuto tabulku pro důležitá oznámení (změny kompatibility, bezpečnostní upozornění, servisní okna a blokování verzí).
|
||||
|
||||
| Datum (UTC) | Úroveň | Oznámení | Akce |
|
||||
| ---------- | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| 2026-02-19 | _Kritické_ | **Nejsme propojeni** s `openagen/zeroclaw` nebo `zeroclaw.org`. Doména `zeroclaw.org` aktuálně směřuje na fork `openagen/zeroclaw`, a tato doména/repoziťář se vydává za náš oficiální web/projekt. | Nevěřte informacím, binárním souborům, fundraisingu nebo oznámením z těchto zdrojů. Používejte pouze [tento repoziťář](https://github.com/zeroclaw-labs/zeroclaw) a naše ověřené sociální účty. |
|
||||
| 2026-02-21 | _Důležité_ | Náš oficiální web je nyní online: [zeroclawlabs.ai](https://zeroclawlabs.ai). Děkujeme za trpělivost během čekání. Stále detekujeme pokusy o vydávání se: neúčastněte žádné investiční/fundraisingové aktivity ve jménu ZeroClaw pokud není publikována přes naše oficiální kanály. | Používejte [tento repoziťář](https://github.com/zeroclaw-labs/zeroclaw) jako jediný zdroj pravdy. Sledujte [X (@zeroclawlabs)](https://x.com/zeroclawlabs?s=21), [Telegram (@zeroclawlabs)](https://t.me/zeroclawlabs), [Facebook (skupina)](https://www.facebook.com/groups/zeroclaw), [Reddit (r/zeroclawlabs)](https://www.reddit.com/r/zeroclawlabs/), a [Xiaohongshu](https://www.xiaohongshu.com/user/profile/67cbfc43000000000d008307?xsec_token=AB73VnYnGNx5y36EtnnZfGmAmS-6Wzv8WMuGpfwfkg6Yc%3D&xsec_source=pc_search) pro oficiální aktualizace. |
|
||||
| 2026-02-19 | _Důležité_ | Anthropic aktualizoval podmínky použití autentizace a přihlašovacích údajů dne 2026-02-19. OAuth autentizace (Free, Pro, Max) je výhradně pro Claude Code a Claude.ai; použití Claude Free/Pro/Max OAuth tokenů v jakémkoliv jiném produktu, nástroji nebo službě (včetně Agent SDK) není povoleno a může porušit Podmínky použití spotřebitele. | Prosím dočasně se vyhněte Claude Code OAuth integracím pro předcházení potenciálním ztrátám. Původní klauzule: [Authentication and Credential Use](https://code.claude.com/docs/en/legal-and-compliance#authentication-and-credential-use). |
|
||||
|
||||
### ✨ Funkce
|
||||
|
||||
- 🏎️ **Lehký Runtime Defaultně:** Běžné CLI workflowy a stavové příkazy běží v paměťovém prostoru několika megabytů v produkčních buildech.
|
||||
- 💰 **Cenově efektivní nasazení:** Navrženo pro nízkonákladové desky a malé cloud instance bez těžkých runtime závislostí.
|
||||
- ⚡ **Rychlé studené starty:** Single-binary Rust runtime udržuje start příkazů a daemonů téměř okamžitý pro denní operace.
|
||||
- 🌍 **Přenosná architektura:** Single-binary workflow na ARM, x86 a RISC-V s vyměnitelným poskytovatelem/kanálem/nástrojem.
|
||||
|
||||
### Proč týmy volí ZeroClaw
|
||||
|
||||
- **Lehký defaultně:** malý Rust binary, rychlý start, nízká paměťová stopa.
|
||||
- **Bezpečný designem:** párování, striktní sandboxing, explicitní allowlisty, workspace scope.
|
||||
- **Plně vyměnitelné:** jádrové systémy jsou traity (poskytovatelé, kanály, nástroje, paměť, tunely).
|
||||
- **Žádné vendor lock-in:** OpenAI-kompatibilní podpora poskytovatele + připojitelné vlastní endpointy.
|
||||
|
||||
## Benchmark Snapshot (ZeroClaw vs OpenClaw, Reprodukovatelné)
|
||||
|
||||
Rychlý benchmark na lokálním stroji (macOS arm64, únor 2026) normalizovaný pro 0.8 GHz edge hardware.
|
||||
|
||||
| | OpenClaw | NanoBot | PicoClaw | ZeroClaw 🦀 |
|
||||
| ---------------------------- | ------------- | -------------- | --------------- | --------------------- |
|
||||
| **Jazyk** | TypeScript | Python | Go | **Rust** |
|
||||
| **RAM** | > 1 GB | > 100 MB | < 10 MB | **< 5 MB** |
|
||||
| **Start (0.8 GHz jádro)** | > 500s | > 30s | < 1s | **< 10ms** |
|
||||
| **Velikost Binary** | ~28 MB (dist) | N/A (Skripty) | ~8 MB | **3.4 MB** |
|
||||
| **Náklady** | Mac Mini $599 | Linux SBC ~$50 | Linux deska $10 | **Jakýkoliv hardware $10** |
|
||||
|
||||
> Poznámky: Výsledky ZeroClaw jsou měřeny na produkčních buildech pomocí `/usr/bin/time -l`. OpenClaw vyžaduje Node.js runtime (typicky ~390 MB dodatečného paměťového režijního nákladu), zatímco NanoBot vyžaduje Python runtime. PicoClaw a ZeroClaw jsou statická binaria. Výše uvedené RAM čísla jsou runtime paměť; build-time kompilační požadavky jsou vyšší.
|
||||
|
||||
<p align="center">
|
||||
<img src="zero-claw.jpeg" alt="Porovnání ZeroClaw vs OpenClaw" width="800" />
|
||||
</p>
|
||||
|
||||
### Reprodukovatelné lokální měření
|
||||
|
||||
Benchmark tvrzení se mohou měnit jak se kód a toolchainy vyvíjejí, takže vždy měřte svůj aktuální build lokálně:
|
||||
|
||||
```bash
|
||||
cargo build --release
|
||||
ls -lh target/release/zeroclaw
|
||||
|
||||
/usr/bin/time -l target/release/zeroclaw --help
|
||||
/usr/bin/time -l target/release/zeroclaw status
|
||||
```
|
||||
|
||||
Ukázková vzorka (macOS arm64, měřeno 18. února 2026):
|
||||
|
||||
- Velikost release binary: `8.8M`
|
||||
- `zeroclaw --help`: reálný čas přibližně `0.02s`, špičková paměťová stopa ~`3.9 MB`
|
||||
- `zeroclaw status`: reálný čas přibližně `0.01s`, špičková paměťová stopa ~`4.1 MB`
|
||||
|
||||
## Předpoklady
|
||||
|
||||
<details>
|
||||
<summary><strong>Windows</strong></summary>
|
||||
|
||||
### Windows — Vyžadováno
|
||||
|
||||
1. **Visual Studio Build Tools** (poskytuje MSVC linker a Windows SDK):
|
||||
|
||||
```powershell
|
||||
winget install Microsoft.VisualStudio.2022.BuildTools
|
||||
```
|
||||
|
||||
Během instalace (nebo přes Visual Studio Installer), vyberte workload **"Desktop development with C++"**.
|
||||
|
||||
2. **Rust Toolchain:**
|
||||
|
||||
```powershell
|
||||
winget install Rustlang.Rustup
|
||||
```
|
||||
|
||||
Po instalaci otevřete nový terminál a spusťte `rustup default stable` pro zajištění, že stabilní toolchain je aktivní.
|
||||
|
||||
3. **Ověřte** že oba fungují:
|
||||
```powershell
|
||||
rustc --version
|
||||
cargo --version
|
||||
```
|
||||
|
||||
### Windows — Volitelné
|
||||
|
||||
- **Docker Desktop** — vyžadováno pouze pokud používáte [Docker sandboxed runtime](#aktuální-runtime-podpora) (`runtime.kind = "docker"`). Nainstalujte přes `winget install Docker.DockerDesktop`.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>Linux / macOS</strong></summary>
|
||||
|
||||
### Linux / macOS — Vyžadováno
|
||||
|
||||
1. **Essenciální build nástroje:**
|
||||
- **Linux (Debian/Ubuntu):** `sudo apt install build-essential pkg-config`
|
||||
- **Linux (Fedora/RHEL):** `sudo dnf group install development-tools && sudo dnf install pkg-config`
|
||||
- **macOS:** Nainstalujte Xcode Command Line Tools: `xcode-select --install`
|
||||
|
||||
2. **Rust Toolchain:**
|
||||
|
||||
```bash
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||
```
|
||||
|
||||
Viz [rustup.rs](https://rustup.rs) pro detaily.
|
||||
|
||||
3. **Ověřte:**
|
||||
```bash
|
||||
rustc --version
|
||||
cargo --version
|
||||
```
|
||||
|
||||
### Linux / macOS — Volitelné
|
||||
|
||||
- **Docker** — vyžadováno pouze pokud používáte [Docker sandboxed runtime](#aktuální-runtime-podpora) (`runtime.kind = "docker"`).
|
||||
- **Linux (Debian/Ubuntu):** viz [docs.docker.com](https://docs.docker.com/engine/install/ubuntu/)
|
||||
- **Linux (Fedora/RHEL):** viz [docs.docker.com](https://docs.docker.com/engine/install/fedora/)
|
||||
- **macOS:** nainstalujte Docker Desktop přes [docker.com/products/docker-desktop](https://www.docker.com/products/docker-desktop/)
|
||||
|
||||
</details>
|
||||
|
||||
## Rychlý Start
|
||||
|
||||
### Možnost 1: Automatické nastavení (doporučeno)
|
||||
|
||||
Skript `bootstrap.sh` nainstaluje Rust, naklonuje ZeroClaw, zkompiluje ho a nastaví vaše počáteční vývojové prostředí:
|
||||
|
||||
```bash
|
||||
curl -fsSL https://raw.githubusercontent.com/zeroclaw-labs/zeroclaw/master/bootstrap.sh | bash
|
||||
```
|
||||
|
||||
Toto:
|
||||
|
||||
1. Nainstaluje Rust (pokud chybí)
|
||||
2. Naklonuje ZeroClaw repoziťář
|
||||
3. Zkompiluje ZeroClaw v release módu
|
||||
4. Nainstaluje `zeroclaw` do `~/.cargo/bin/`
|
||||
5. Vytvoří výchozí workspace strukturu v `~/.zeroclaw/workspace/`
|
||||
6. Vygeneruje počáteční konfigurační soubor `~/.zeroclaw/workspace/config.toml`
|
||||
|
||||
Po bootstrapu znovu načtěte váš shell nebo spusťte `source ~/.cargo/env` pro použití příkazu `zeroclaw` globálně.
|
||||
|
||||
### Možnost 2: Manuální instalace
|
||||
|
||||
<details>
|
||||
<summary><strong>Klikněte pro zobrazení kroků manuální instalace</strong></summary>
|
||||
|
||||
```bash
|
||||
# 1. Naklonujte repoziťář
|
||||
git clone https://github.com/zeroclaw-labs/zeroclaw.git
|
||||
cd zeroclaw
|
||||
|
||||
# 2. Zkompilujte v release
|
||||
cargo build --release --locked
|
||||
|
||||
# 3. Nainstalujte binary
|
||||
cargo install --path . --locked
|
||||
|
||||
# 4. Inicializujte workspace
|
||||
zeroclaw init
|
||||
|
||||
# 5. Ověřte instalaci
|
||||
zeroclaw --version
|
||||
zeroclaw status
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Po instalaci
|
||||
|
||||
Jakmile nainstalováno (přes bootstrap nebo manuálně), měli byste vidět:
|
||||
|
||||
```
|
||||
~/.zeroclaw/workspace/
|
||||
├── config.toml # Hlavní konfigurace
|
||||
├── .pairing # Párovací tajemství (generováno při prvním spuštění)
|
||||
├── logs/ # Daemon/agent logy
|
||||
├── skills/ # Vlastní dovednosti
|
||||
└── memory/ # Uložení konverzačního kontextu
|
||||
```
|
||||
|
||||
**Další kroky:**
|
||||
|
||||
1. Nakonfigurujte své AI poskytovatele v `~/.zeroclaw/workspace/config.toml`
|
||||
2. Podívejte se na [konfigurační referenci](docs/config-reference.md) pro pokročilé možnosti
|
||||
3. Spusťte agenta: `zeroclaw agent start`
|
||||
4. Otestujte přes váš preferovaný kanál (viz [kanálová reference](docs/channels-reference.md))
|
||||
|
||||
## Konfigurace
|
||||
|
||||
Upravte `~/.zeroclaw/workspace/config.toml` pro konfiguraci poskytovatelů, kanálů a chování systému.
|
||||
|
||||
### Rychlá konfigurační reference
|
||||
|
||||
```toml
|
||||
[providers.anthropic]
|
||||
api_key = "sk-ant-..."
|
||||
model = "claude-sonnet-4-20250514"
|
||||
|
||||
[providers.openai]
|
||||
api_key = "sk-..."
|
||||
model = "gpt-4o"
|
||||
|
||||
[channels.telegram]
|
||||
enabled = true
|
||||
bot_token = "123456:ABC-DEF..."
|
||||
|
||||
[channels.matrix]
|
||||
enabled = true
|
||||
homeserver_url = "https://matrix.org"
|
||||
username = "@bot:matrix.org"
|
||||
password = "..."
|
||||
|
||||
[memory]
|
||||
kind = "markdown" # nebo "sqlite" nebo "none"
|
||||
|
||||
[runtime]
|
||||
kind = "native" # nebo "docker" (vyžaduje Docker)
|
||||
```
|
||||
|
||||
**Kompletní referenční dokumenty:**
|
||||
|
||||
- [Konfigurační reference](docs/config-reference.md) — všechna nastavení, validace, výchozí hodnoty
|
||||
- [Poskytovatel reference](docs/providers-reference.md) — AI poskytovatel-specifické konfigurace
|
||||
- [Kanálová reference](docs/channels-reference.md) — Telegram, Matrix, Slack, Discord a další
|
||||
- [Operace](docs/operations-runbook.md) — produkční monitoring, rotace tajemství, škálování
|
||||
|
||||
### Aktuální Runtime Podpora
|
||||
|
||||
ZeroClaw podporuje dva backendy provádění kódu:
|
||||
|
||||
- **`native`** (výchozí) — přímé provedení procesu, nejrychlejší cesta, ideální pro důvěryhodná prostředí
|
||||
- **`docker`** — plná kontejnerová izolace, zpřísněné bezpečnostní politiky, vyžaduje Docker
|
||||
|
||||
Použijte `runtime.kind = "docker"` pokud potřebujete striktní sandboxing nebo síťovou izolaci. Viz [konfigurační reference](docs/config-reference.md#runtime) pro úplné detaily.
|
||||
|
||||
## Příkazy
|
||||
|
||||
```bash
|
||||
# Správa workspace
|
||||
zeroclaw init # Inicializuje nový workspace
|
||||
zeroclaw status # Zobrazuje stav daemon/agent
|
||||
zeroclaw config validate # Ověřuje syntaxi a hodnoty config.toml
|
||||
|
||||
# Správa daemon
|
||||
zeroclaw daemon start # Spouští daemon na pozadí
|
||||
zeroclaw daemon stop # Zastavuje běžící daemon
|
||||
zeroclaw daemon restart # Restartuje daemon (znovunačtení config)
|
||||
zeroclaw daemon logs # Zobrazuje daemon logy
|
||||
|
||||
# Správa agent
|
||||
zeroclaw agent start # Spouští agenta (vyžaduje běžící daemon)
|
||||
zeroclaw agent stop # Zastavuje agenta
|
||||
zeroclaw agent restart # Restartuje agenta (znovunačtení config)
|
||||
|
||||
# Párovací operace
|
||||
zeroclaw pairing init # Generuje nové párovací tajemství
|
||||
zeroclaw pairing rotate # Rotuje existující párovací tajemství
|
||||
|
||||
# Tunneling (pro veřejnou expozici)
|
||||
zeroclaw tunnel start # Spouští tunnel k lokálnímu daemon
|
||||
zeroclaw tunnel stop # Zastavuje aktivní tunnel
|
||||
|
||||
# Diagnostika
|
||||
zeroclaw doctor # Spouští kontroly zdraví systému
|
||||
zeroclaw version # Zobrazuje verzi a build informace
|
||||
```
|
||||
|
||||
Viz [Příkazová reference](docs/commands-reference.md) pro kompletní možnosti a příklady.
|
||||
|
||||
## Spolupráce & Docs
|
||||
|
||||
Začněte s dokumentačním centrem pro task-based mapu:
|
||||
|
||||
- Dokumentační Centrum: [`docs/README.md`](docs/README.md)
|
||||
- Sjednocený Docs TOC: [`docs/SUMMARY.md`](docs/SUMMARY.md)
|
||||
- Příkazová reference: [`docs/commands-reference.md`](docs/commands-reference.md)
|
||||
- Konfigurační reference: [`docs/config-reference.md`](docs/config-reference.md)
|
||||
- Poskytovatel reference: [`docs/providers-reference.md`](docs/providers-reference.md)
|
||||
- Kanálová reference: [`docs/channels-reference.md`](docs/channels-reference.md)
|
||||
- Operations Runbook: [`docs/operations-runbook.md`](docs/operations-runbook.md)
|
||||
- Řešení problémů: [`docs/troubleshooting.md`](docs/troubleshooting.md)
|
||||
- Docs Inventář/Klasifikace: [`docs/docs-inventory.md`](docs/docs-inventory.md)
|
||||
- PR/Issue Triage Snapshot (k 18. únoru 2026): [`docs/project-triage-snapshot-2026-02-18.md`](docs/project-triage-snapshot-2026-02-18.md)
|
||||
|
||||
Hlavní spolupráční reference:
|
||||
|
||||
- Dokumentační Centrum: [docs/README.md](docs/README.md)
|
||||
- Šablona dokumentace: [docs/doc-template.md](docs/doc-template.md)
|
||||
- Checklist změn dokumentace: [docs/README.md#4-documentation-change-checklist](docs/README.md#4-documentation-change-checklist)
|
||||
- Reference konfigurace kanálů: [docs/channels-reference.md](docs/channels-reference.md)
|
||||
- Operace šifrovaných místností Matrix: [docs/matrix-e2ee-guide.md](docs/matrix-e2ee-guide.md)
|
||||
- Průvodce příspíváním: [CONTRIBUTING.md](CONTRIBUTING.md)
|
||||
- PR Workflow politika: [docs/pr-workflow.md](docs/pr-workflow.md)
|
||||
- Reviewer Playbook (triage + hluboká recenze): [docs/reviewer-playbook.md](docs/reviewer-playbook.md)
|
||||
- Mapa vlastnictví a CI triage: [docs/ci-map.md](docs/ci-map.md)
|
||||
- Bezpečnostní disclosure politika: [SECURITY.md](SECURITY.md)
|
||||
|
||||
Pro nasazení a runtime operace:
|
||||
|
||||
- Průvodce síťovým nasazením: [docs/network-deployment.md](docs/network-deployment.md)
|
||||
- Proxy Agent Playbook: [docs/proxy-agent-playbook.md](docs/proxy-agent-playbook.md)
|
||||
|
||||
## Podpořte ZeroClaw
|
||||
|
||||
Pokud ZeroClaw pomáhá vaší práci a chcete podpořit pokračující vývoj, můžete darovat zde:
|
||||
|
||||
<a href="https://buymeacoffee.com/argenistherose"><img src="https://img.shields.io/badge/Buy%20Me%20a%20Coffee-Donate-yellow.svg?style=for-the-badge&logo=buy-me-a-coffee" alt="Kup Mi Kávu" /></a>
|
||||
|
||||
### 🙏 Speciální Poděkování
|
||||
|
||||
Upřímné poděkování komunitám a institucím které inspirují a živí tuto open-source práci:
|
||||
|
||||
- **Harvard University** — za podporu intelektuální zvídavosti a posouvání hranic toho co je možné.
|
||||
- **MIT** — za obhajobu otevřeného vědění, open source, a přesvědčení že technologie by měla být přístupná všem.
|
||||
- **Sundai Club** — za komunitu, energii, a neustálou vůli stavět věci které na něčem záleží.
|
||||
- **Svět a Dál** 🌍✨ — každému přispěvateli, snílkovi, a staviteli tam venku který dělá z open source sílu pro dobro. To je pro tebe.
|
||||
|
||||
Stavíme v open source protože nejlepší nápady přicházejí odkudkoliv. Pokud toto čtete, jste součástí toho. Vítejte. 🦀❤️
|
||||
|
||||
<!-- BEGIN:RECENT_CONTRIBUTORS -->
|
||||
|
||||
### 🌟 Recent Contributors (v0.3.1)
|
||||
|
||||
3 contributors shipped features, fixes, and improvements in this release cycle:
|
||||
|
||||
- **Argenis**
|
||||
- **argenis de la rosa**
|
||||
- **Claude Opus 4.6**
|
||||
|
||||
Thank you to everyone who opened issues, reviewed PRs, translated docs, and helped test. Every contribution matters. 🦀
|
||||
|
||||
<!-- END:RECENT_CONTRIBUTORS -->
|
||||
|
||||
## ⚠️ Oficiální Repoziťář a Varování před Vydáváním se
|
||||
|
||||
**Toto je jediný oficiální ZeroClaw repoziťář:**
|
||||
|
||||
> <https://github.com/zeroclaw-labs/zeroclaw>
|
||||
|
||||
Jakýkoliv jiný repoziťář, organizace, doména nebo balík tvrdící že je "ZeroClaw" nebo naznačující afiliaci s ZeroClaw Labs je **neautorizovaný a není spojen s tímto projektem**. Známé neautorizované forky budou uvedeny v [TRADEMARK.md](TRADEMARK.md).
|
||||
|
||||
Pokud narazíte na vydávání se nebo zneužití ochranné známky, prosím [otevřete issue](https://github.com/zeroclaw-labs/zeroclaw/issues).
|
||||
|
||||
---
|
||||
|
||||
## Licence
|
||||
|
||||
ZeroClaw je duálně licencován pro maximální otevřenost a ochranu přispěvatelů:
|
||||
|
||||
| Licence | Případy použití |
|
||||
| ---------------------------- | ------------------------------------------------------------ |
|
||||
| [MIT](LICENSE-MIT) | Open-source, výzkum, akademické, osobní použití |
|
||||
| [Apache 2.0](LICENSE-APACHE) | Ochrana patentů, institucionální, komerční nasazení |
|
||||
|
||||
Můžete si vybrat jednu z licencí. **Přispěvatelé automaticky udělují práva pod oběma** — viz [CLA.md](CLA.md) pro plnou dohodu přispěvatele.
|
||||
|
||||
### Ochranná známka
|
||||
|
||||
Název **ZeroClaw** a logo jsou registrované ochranné známky ZeroClaw Labs. Tato licence neuděluje povolení je používat k naznačení schválení nebo afiliace. Viz [TRADEMARK.md](TRADEMARK.md) pro povolená a zakázaná použití.
|
||||
|
||||
### Ochrany přispěvatelů
|
||||
|
||||
- **Si zachováváte autorská práva** k vašim příspěvkům
|
||||
- **Patentový grant** (Apache 2.0) vás chrání před patentovými nároky ostatních přispěvatelů
|
||||
- Vaše příspěvky jsou **trvale připsány** v historii commitů a [NOTICE](NOTICE)
|
||||
- Žádná práva ochranné známky nejsou přenesena příspěvkem
|
||||
|
||||
## Příspívání
|
||||
|
||||
Viz [CONTRIBUTING.md](CONTRIBUTING.md) a [CLA.md](CLA.md). Implementujte trait, odešlete PR:
|
||||
|
||||
- Průvodce CI workflow: [docs/ci-map.md](docs/ci-map.md)
|
||||
- Nový `Provider` → `src/providers/`
|
||||
- Nový `Channel` → `src/channels/`
|
||||
- Nový `Observer` → `src/observability/`
|
||||
- Nový `Tool` → `src/tools/`
|
||||
- Nová `Memory` → `src/memory/`
|
||||
- Nový `Tunnel` → `src/tunnel/`
|
||||
- Nová `Skill` → `~/.zeroclaw/workspace/skills/<n>/`
|
||||
|
||||
---
|
||||
|
||||
**ZeroClaw** — Nulová režie. Nulové kompromisy. Nasazujte kdekoliv. Měňte cokoliv. 🦀
|
||||
|
||||
## Historie Hvězd
|
||||
|
||||
<p align="center">
|
||||
<a href="https://www.star-history.com/#zeroclaw-labs/zeroclaw&type=date&legend=top-left">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=zeroclaw-labs/zeroclaw&type=date&theme=dark&legend=top-left" />
|
||||
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=zeroclaw-labs/zeroclaw&type=date&legend=top-left" />
|
||||
<img alt="Graf Historie Hvězd" src="https://api.star-history.com/svg?repos=zeroclaw-labs/zeroclaw&type=date&legend=top-left" />
|
||||
</picture>
|
||||
</a>
|
||||
</p>
|
||||
+203
@@ -0,0 +1,203 @@
|
||||
<p align="center">
|
||||
<img src="zeroclaw.png" alt="ZeroClaw" width="200" />
|
||||
</p>
|
||||
|
||||
<h1 align="center">ZeroClaw 🦀</h1>
|
||||
|
||||
<p align="center">
|
||||
<strong>Nul overhead. Nul kompromis. 100% Rust. 100% Agnostisk.</strong><br>
|
||||
⚡️ <strong>Kører på $10 hardware med <5MB RAM: Det er 99% mindre hukommelse end OpenClaw og 98% billigere end en Mac mini!</strong>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="LICENSE-APACHE"><img src="https://img.shields.io/badge/license-MIT%20OR%20Apache%202.0-blue.svg" alt="License: MIT OR Apache-2.0" /></a>
|
||||
<a href="NOTICE"><img src="https://img.shields.io/badge/contributors-27+-green.svg" alt="Contributors" /></a>
|
||||
<a href="https://buymeacoffee.com/argenistherose"><img src="https://img.shields.io/badge/Buy%20Me%20a%20Coffee-Donate-yellow.svg?style=flat&logo=buy-me-a-coffee" alt="Buy Me a Coffee" /></a>
|
||||
<a href="https://x.com/zeroclawlabs?s=21"><img src="https://img.shields.io/badge/X-%40zeroclawlabs-000000?style=flat&logo=x&logoColor=white" alt="X: @zeroclawlabs" /></a>
|
||||
<a href="https://zeroclawlabs.cn/group.jpg"><img src="https://img.shields.io/badge/WeChat-Group-B7D7A8?logo=wechat&logoColor=white" alt="WeChat Group" /></a>
|
||||
<a href="https://www.xiaohongshu.com/user/profile/67cbfc43000000000d008307?xsec_token=AB73VnYnGNx5y36EtnnZfGmAmS-6Wzv8WMuGpfwfkg6Yc%3D&xsec_source=pc_search"><img src="https://img.shields.io/badge/Xiaohongshu-Official-FF2442?style=flat" alt="Xiaohongshu: Official" /></a>
|
||||
<a href="https://t.me/zeroclawlabs"><img src="https://img.shields.io/badge/Telegram-%40zeroclawlabs-26A5E4?style=flat&logo=telegram&logoColor=white" alt="Telegram: @zeroclawlabs" /></a>
|
||||
<a href="https://www.facebook.com/groups/zeroclaw"><img src="https://img.shields.io/badge/Facebook-Group-1877F2?style=flat&logo=facebook&logoColor=white" alt="Facebook Group" /></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
🌐 <strong>Sprog:</strong>
|
||||
<a href="README.md">🇺🇸 English</a> ·
|
||||
<a href="README.zh-CN.md">🇨🇳 简体中文</a> ·
|
||||
<a href="README.ja.md">🇯🇵 日本語</a> ·
|
||||
<a href="README.ko.md">🇰🇷 한국어</a> ·
|
||||
<a href="README.vi.md">🇻🇳 Tiếng Việt</a> ·
|
||||
<a href="README.tl.md">🇵🇭 Tagalog</a> ·
|
||||
<a href="README.es.md">🇪🇸 Español</a> ·
|
||||
<a href="README.pt.md">🇧🇷 Português</a> ·
|
||||
<a href="README.it.md">🇮🇹 Italiano</a> ·
|
||||
<a href="README.de.md">🇩🇪 Deutsch</a> ·
|
||||
<a href="README.fr.md">🇫🇷 Français</a> ·
|
||||
<a href="README.ar.md">🇸🇦 العربية</a> ·
|
||||
<a href="README.hi.md">🇮🇳 हिन्दी</a> ·
|
||||
<a href="README.ru.md">🇷🇺 Русский</a> ·
|
||||
<a href="README.bn.md">🇧🇩 বাংলা</a> ·
|
||||
<a href="README.he.md">🇮🇱 עברית</a> ·
|
||||
<a href="README.pl.md">🇵🇱 Polski</a> ·
|
||||
<a href="README.cs.md">🇨🇿 Čeština</a> ·
|
||||
<a href="README.nl.md">🇳🇱 Nederlands</a> ·
|
||||
<a href="README.tr.md">🇹🇷 Türkçe</a> ·
|
||||
<a href="README.uk.md">🇺🇦 Українська</a> ·
|
||||
<a href="README.id.md">🇮🇩 Bahasa Indonesia</a> ·
|
||||
<a href="README.th.md">🇹🇭 ไทย</a> ·
|
||||
<a href="README.ur.md">🇵🇰 اردو</a> ·
|
||||
<a href="README.ro.md">🇷🇴 Română</a> ·
|
||||
<a href="README.sv.md">🇸🇪 Svenska</a> ·
|
||||
<a href="README.el.md">🇬🇷 Ελληνικά</a> ·
|
||||
<a href="README.hu.md">🇭🇺 Magyar</a> ·
|
||||
<a href="README.fi.md">🇫🇮 Suomi</a> ·
|
||||
<a href="README.da.md">🇩🇰 Dansk</a> ·
|
||||
<a href="README.nb.md">🇳🇴 Norsk</a>
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
<!-- BEGIN:WHATS_NEW -->
|
||||
|
||||
### 🚀 What's New in v0.3.1 (March 2026)
|
||||
|
||||
| Area | Highlights |
|
||||
|---|---|
|
||||
| ci | add Termux (aarch64-linux-android) release target |
|
||||
|
||||
<!-- END:WHATS_NEW -->
|
||||
|
||||
## Hvad er ZeroClaw?
|
||||
|
||||
ZeroClaw er en letvægts, foranderlig og udvidbar AI-assistent-infrastruktur bygget i Rust. Den forbinder forskellige LLM-udbydere (Anthropic, OpenAI, Google, Ollama osv.) via en samlet grænseflade og understøtter flere kanaler (Telegram, Matrix, CLI osv.).
|
||||
|
||||
### Nøglefunktioner
|
||||
|
||||
- **🦀 Skrevet i Rust**: Høj ydeevne, hukommelsessikkerhed og nul-omkostningsabstraktioner
|
||||
- **🔌 Udbyder-agnostisk**: Understøtter OpenAI, Anthropic, Google Gemini, Ollama og andre
|
||||
- **📱 Multi-kanal**: Telegram, Matrix (med E2EE), CLI og andre
|
||||
- **🧠 Pluggbar hukommelse**: SQLite og Markdown-backends
|
||||
- **🛠️ Udvidbare værktøjer**: Tilføj brugerdefinerede værktøjer nemt
|
||||
- **🔒 Sikkerhed først**: Omvendt proxy, privatlivs-først design
|
||||
|
||||
---
|
||||
|
||||
## Hurtig Start
|
||||
|
||||
### Krav
|
||||
|
||||
- Rust 1.70+
|
||||
- En LLM-udbyder API-nøgle (Anthropic, OpenAI osv.)
|
||||
|
||||
### Installation
|
||||
|
||||
```bash
|
||||
# Klon repository
|
||||
git clone https://github.com/zeroclaw-labs/zeroclaw.git
|
||||
cd zeroclaw
|
||||
|
||||
# Byg
|
||||
cargo build --release
|
||||
|
||||
# Kør
|
||||
cargo run --release
|
||||
```
|
||||
|
||||
### Med Docker
|
||||
|
||||
```bash
|
||||
docker run -d \
|
||||
--name zeroclaw \
|
||||
-e ANTHROPIC_API_KEY=your_key \
|
||||
-v zeroclaw-data:/app/data \
|
||||
zeroclaw/zeroclaw:latest
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Konfiguration
|
||||
|
||||
ZeroClaw bruger en YAML-konfigurationsfil. Som standard leder den efter `config.yaml`.
|
||||
|
||||
```yaml
|
||||
# Standardudbyder
|
||||
provider: anthropic
|
||||
|
||||
# Udbyderkonfiguration
|
||||
providers:
|
||||
anthropic:
|
||||
api_key: ${ANTHROPIC_API_KEY}
|
||||
model: claude-3-5-sonnet-20241022
|
||||
openai:
|
||||
api_key: ${OPENAI_API_KEY}
|
||||
model: gpt-4o
|
||||
|
||||
# Hukommelseskonfiguration
|
||||
memory:
|
||||
backend: sqlite
|
||||
path: data/memory.db
|
||||
|
||||
# Kanalkonfiguration
|
||||
channels:
|
||||
telegram:
|
||||
token: ${TELEGRAM_BOT_TOKEN}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Dokumentation
|
||||
|
||||
For detaljeret dokumentation, se:
|
||||
|
||||
- [Dokumentationshub](docs/README.md)
|
||||
- [Kommandoreference](docs/commands-reference.md)
|
||||
- [Udbyderreference](docs/providers-reference.md)
|
||||
- [Kanalreference](docs/channels-reference.md)
|
||||
- [Konfigurationsreference](docs/config-reference.md)
|
||||
|
||||
---
|
||||
|
||||
## Bidrag
|
||||
|
||||
Bidrag er velkomne! Læs venligst [Bidragsguiden](CONTRIBUTING.md).
|
||||
|
||||
---
|
||||
|
||||
## Licens
|
||||
|
||||
Dette projekt er dobbelt-licenseret:
|
||||
|
||||
- MIT License
|
||||
- Apache License, version 2.0
|
||||
|
||||
Se [LICENSE-APACHE](LICENSE-APACHE) og [LICENSE-MIT](LICENSE-MIT) for detaljer.
|
||||
|
||||
---
|
||||
|
||||
## Fællesskab
|
||||
|
||||
- [Telegram](https://t.me/zeroclawlabs)
|
||||
- [Facebook Group](https://www.facebook.com/groups/zeroclaw)
|
||||
- [WeChat Group](https://zeroclawlabs.cn/group.jpg)
|
||||
|
||||
---
|
||||
|
||||
## Sponsorer
|
||||
|
||||
Hvis ZeroClaw er nyttigt for dig, overvej venligst at købe os en kaffe:
|
||||
|
||||
[](https://buymeacoffee.com/argenistherose)
|
||||
|
||||
<!-- BEGIN:RECENT_CONTRIBUTORS -->
|
||||
|
||||
### 🌟 Recent Contributors (v0.3.1)
|
||||
|
||||
3 contributors shipped features, fixes, and improvements in this release cycle:
|
||||
|
||||
- **Argenis**
|
||||
- **argenis de la rosa**
|
||||
- **Claude Opus 4.6**
|
||||
|
||||
Thank you to everyone who opened issues, reviewed PRs, translated docs, and helped test. Every contribution matters. 🦀
|
||||
|
||||
<!-- END:RECENT_CONTRIBUTORS -->
|
||||
+505
@@ -0,0 +1,505 @@
|
||||
<p align="center">
|
||||
<img src="zeroclaw.png" alt="ZeroClaw" width="200" />
|
||||
</p>
|
||||
|
||||
<h1 align="center">ZeroClaw 🦀</h1>
|
||||
|
||||
<p align="center">
|
||||
<strong>Null Overhead. Null Kompromiss. 100% Rust. 100% Agnostisch.</strong><br>
|
||||
⚡️ <strong>Läuft auf 10$ Hardware mit <5MB RAM: Das ist 99% weniger Speicher als OpenClaw und 98% günstiger als ein Mac mini!</strong>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="LICENSE-APACHE"><img src="https://img.shields.io/badge/license-MIT%20OR%20Apache%202.0-blue.svg" alt="License: MIT OR Apache-2.0" /></a>
|
||||
<a href="NOTICE"><img src="https://img.shields.io/badge/contributors-27+-green.svg" alt="Contributors" /></a>
|
||||
<a href="https://buymeacoffee.com/argenistherose"><img src="https://img.shields.io/badge/Buy%20Me%20a%20Coffee-Donate-yellow.svg?style=flat&logo=buy-me-a-coffee" alt="Buy Me a Coffee" /></a>
|
||||
<a href="https://x.com/zeroclawlabs?s=21"><img src="https://img.shields.io/badge/X-%40zeroclawlabs-000000?style=flat&logo=x&logoColor=white" alt="X: @zeroclawlabs" /></a>
|
||||
<a href="https://zeroclawlabs.cn/group.jpg"><img src="https://img.shields.io/badge/WeChat-Group-B7D7A8?logo=wechat&logoColor=white" alt="WeChat Group" /></a>
|
||||
<a href="https://www.xiaohongshu.com/user/profile/67cbfc43000000000d008307?xsec_token=AB73VnYnGNx5y36EtnnZfGmAmS-6Wzv8WMuGpfwfkg6Yc%3D&xsec_source=pc_search"><img src="https://img.shields.io/badge/Xiaohongshu-Official-FF2442?style=flat" alt="Xiaohongshu: Official" /></a>
|
||||
<a href="https://t.me/zeroclawlabs"><img src="https://img.shields.io/badge/Telegram-%40zeroclawlabs-26A5E4?style=flat&logo=telegram&logoColor=white" alt="Telegram: @zeroclawlabs" /></a>
|
||||
<a href="https://www.facebook.com/groups/zeroclaw"><img src="https://img.shields.io/badge/Facebook-Group-1877F2?style=flat&logo=facebook&logoColor=white" alt="Facebook Group" /></a>
|
||||
<a href="https://www.reddit.com/r/zeroclawlabs/"><img src="https://img.shields.io/badge/Reddit-r%2Fzeroclawlabs-FF4500?style=flat&logo=reddit&logoColor=white" alt="Reddit: r/zeroclawlabs" /></a>
|
||||
</p>
|
||||
<p align="center">
|
||||
Erstellt von Studenten und Mitgliedern der Harvard, MIT und Sundai.Club Gemeinschaften.
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
🌐 <strong>Sprachen:</strong><a href="README.md">🇺🇸 English</a> ·
|
||||
<a href="README.zh-CN.md">🇨🇳 简体中文</a> ·
|
||||
<a href="README.ja.md">🇯🇵 日本語</a> ·
|
||||
<a href="README.ko.md">🇰🇷 한국어</a> ·
|
||||
<a href="README.vi.md">🇻🇳 Tiếng Việt</a> ·
|
||||
<a href="README.tl.md">🇵🇭 Tagalog</a> ·
|
||||
<a href="README.es.md">🇪🇸 Español</a> ·
|
||||
<a href="README.pt.md">🇧🇷 Português</a> ·
|
||||
<a href="README.it.md">🇮🇹 Italiano</a> ·
|
||||
<a href="README.de.md">🇩🇪 Deutsch</a> ·
|
||||
<a href="README.fr.md">🇫🇷 Français</a> ·
|
||||
<a href="README.ar.md">🇸🇦 العربية</a> ·
|
||||
<a href="README.hi.md">🇮🇳 हिन्दी</a> ·
|
||||
<a href="README.ru.md">🇷🇺 Русский</a> ·
|
||||
<a href="README.bn.md">🇧🇩 বাংলা</a> ·
|
||||
<a href="README.he.md">🇮🇱 עברית</a> ·
|
||||
<a href="README.pl.md">🇵🇱 Polski</a> ·
|
||||
<a href="README.cs.md">🇨🇿 Čeština</a> ·
|
||||
<a href="README.nl.md">🇳🇱 Nederlands</a> ·
|
||||
<a href="README.tr.md">🇹🇷 Türkçe</a> ·
|
||||
<a href="README.uk.md">🇺🇦 Українська</a> ·
|
||||
<a href="README.id.md">🇮🇩 Bahasa Indonesia</a> ·
|
||||
<a href="README.th.md">🇹🇭 ไทย</a> ·
|
||||
<a href="README.ur.md">🇵🇰 اردو</a> ·
|
||||
<a href="README.ro.md">🇷🇴 Română</a> ·
|
||||
<a href="README.sv.md">🇸🇪 Svenska</a> ·
|
||||
<a href="README.el.md">🇬🇷 Ελληνικά</a> ·
|
||||
<a href="README.hu.md">🇭🇺 Magyar</a> ·
|
||||
<a href="README.fi.md">🇫🇮 Suomi</a> ·
|
||||
<a href="README.da.md">🇩🇰 Dansk</a> ·
|
||||
<a href="README.nb.md">🇳🇴 Norsk</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="#schnellstart">Schnellstart</a> |
|
||||
<a href="bootstrap.sh">Ein-Klick-Einrichtung</a> |
|
||||
<a href="docs/README.md">Dokumentations-Hub</a> |
|
||||
<a href="docs/SUMMARY.md">Dokumentations-Inhaltsverzeichnis</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<em>📝 Hinweis: Die Dokumentationslinks verweisen auf die englischsprachige Dokumentation. Lokalisierte Dokumentation für Deutsch ist noch nicht verfügbar.</em>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<strong>Schnellzugriffe:</strong>
|
||||
<a href="docs/reference/README.md">Referenz</a> ·
|
||||
<a href="docs/operations/README.md">Betrieb</a> ·
|
||||
<a href="docs/troubleshooting.md">Fehlerbehebung</a> ·
|
||||
<a href="docs/security/README.md">Sicherheit</a> ·
|
||||
<a href="docs/hardware/README.md">Hardware</a> ·
|
||||
<a href="docs/contributing/README.md">Mitwirken</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<strong>Schnelle, leichtgewichtige und vollständig autonome KI-Assistenten-Infrastruktur</strong><br />
|
||||
Deploy überall. Tausche alles.
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
ZeroClaw ist das <strong>Runtime-Betriebssystem</strong> für Agenten-Workflows — eine Infrastruktur, die Modelle, Tools, Speicher und Ausführung abstrahiert, um Agenten einmal zu bauen und überall auszuführen.
|
||||
</p>
|
||||
|
||||
<p align="center"><code>Trait-basierte Architektur · sicheres Runtime standardmäßig · Provider/Channel/Tool austauschbar · alles ist steckbar</code></p>
|
||||
|
||||
<!-- BEGIN:WHATS_NEW -->
|
||||
|
||||
### 🚀 What's New in v0.3.1 (March 2026)
|
||||
|
||||
| Area | Highlights |
|
||||
|---|---|
|
||||
| ci | add Termux (aarch64-linux-android) release target |
|
||||
|
||||
<!-- END:WHATS_NEW -->
|
||||
|
||||
### 📢 Ankündigungen
|
||||
|
||||
Verwende diese Tabelle für wichtige Hinweise (Kompatibilitätsänderungen, Sicherheitshinweise, Wartungsfenster und Versionsblockierungen).
|
||||
|
||||
| Datum (UTC) | Ebene | Hinweis | Aktion |
|
||||
| ---------- | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| 2026-02-19 | _Kritisch_ | Wir sind **nicht verbunden** mit `openagen/zeroclaw` oder `zeroclaw.org`. Die Domain `zeroclaw.org` zeigt derzeit auf den Fork `openagen/zeroclaw`, und diese Domain/Repository fälscht unsere offizielle Website/Projekt. | Vertraue keinen Informationen, Binärdateien, Fundraising oder Ankündigungen aus diesen Quellen. Verwende nur [dieses Repository](https://github.com/zeroclaw-labs/zeroclaw) und unsere verifizierten Social-Media-Konten. |
|
||||
| 2026-02-21 | _Wichtig_ | Unsere offizielle Website ist jetzt online: [zeroclawlabs.ai](https://zeroclawlabs.ai). Danke für deine Geduld während der Wartezeit. Wir erkennen weiterhin Fälschungsversuche: nimm an keiner Investitions-/Finanzierungsaktivität im Namen von ZeroClaw teil, wenn sie nicht über unsere offiziellen Kanäle veröffentlicht wird. | Verwende [dieses Repository](https://github.com/zeroclaw-labs/zeroclaw) als einzige Quelle der Wahrheit. Folge [X (@zeroclawlabs)](https://x.com/zeroclawlabs?s=21), [Telegram (@zeroclawlabs)](https://t.me/zeroclawlabs), [Facebook (Gruppe)](https://www.facebook.com/groups/zeroclaw), [Reddit (r/zeroclawlabs)](https://www.reddit.com/r/zeroclawlabs/), und [Xiaohongshu](https://www.xiaohongshu.com/user/profile/67cbfc43000000000d008307?xsec_token=AB73VnYnGNx5y36EtnnZfGmAmS-6Wzv8WMuGpfwfkg6Yc%3D&xsec_source=pc_search) für offizielle Updates. |
|
||||
| 2026-02-19 | _Wichtig_ | Anthropic hat die Nutzungsbedingungen für Authentifizierung und Anmeldedaten am 2026-02-19 aktualisiert. Die OAuth-Authentifizierung (Free, Pro, Max) ist ausschließlich für Claude Code und Claude.ai; die Verwendung von Claude Free/Pro/Max OAuth-Token in einem anderen Produkt, Tool oder Dienst (einschließlich Agent SDK) ist nicht erlaubt und kann gegen die Verbrauchernutzungsbedingungen verstoßen. | Bitte vermeide vorübergehend Claude Code OAuth-Integrationen, um potenzielle Verluste zu verhindern. Originalklausel: [Authentication and Credential Use](https://code.claude.com/docs/en/legal-and-compliance#authentication-and-credential-use). |
|
||||
|
||||
### ✨ Funktionen
|
||||
|
||||
- 🏎️ **Leichtgewichtiges Runtime standardmäßig:** Gängige CLI-Workflows und Statusbefehle laufen in einem Speicherbereich von wenigen Megabyte bei Produktions-Builds.
|
||||
- 💰 **Kosteneffizientes Deployment:** Entwickelt für Low-Cost-Boards und kleine Cloud-Instanzen ohne schwere Runtime-Abhängigkeiten.
|
||||
- ⚡ **Schnelle Kaltstarts:** Die Single-Binary-Rust-Runtime hält Befehls- und Daemon-Starts für tägliche Operationen nahezu augenblicklich.
|
||||
- 🌍 **Portable Architektur:** Ein Single-Binary-Workflow auf ARM, x86 und RISC-V mit austauschbaren Providern/Channels/Tools.
|
||||
|
||||
### Warum Teams ZeroClaw wählen
|
||||
|
||||
- **Leichtgewichtig standardmäßig:** kleines Rust-Binary, schneller Start, geringer Speicherbedarf.
|
||||
- **Sicher by Design:** Pairing, striktes Sandboxing, explizite Allowlists, Workspace-Scope.
|
||||
- **Vollständig austauschbar:** Kernsysteme sind Traits (Provider, Channels, Tools, Speicher, Tunnel).
|
||||
- **Kein Provider-Lock-in:** OpenAI-kompatible Provider-Unterstützung + steckbare Custom-Endpoints.
|
||||
|
||||
## Benchmark-Snapshot (ZeroClaw vs OpenClaw, Reproduzierbar)
|
||||
|
||||
Schneller Benchmark auf lokalem Rechner (macOS arm64, Feb. 2026) normalisiert für 0.8 GHz Edge-Hardware.
|
||||
|
||||
| | OpenClaw | NanoBot | PicoClaw | ZeroClaw 🦀 |
|
||||
| ---------------------------- | ------------- | -------------- | --------------- | --------------------- |
|
||||
| **Sprache** | TypeScript | Python | Go | **Rust** |
|
||||
| **RAM** | > 1 GB | > 100 MB | < 10 MB | **< 5 MB** |
|
||||
| **Start (0.8 GHz Kern)** | > 500s | > 30s | < 1s | **< 10ms** |
|
||||
| **Binary-Größe** | ~28 MB (dist) | N/A (Scripts) | ~8 MB | **3.4 MB** |
|
||||
| **Kosten** | Mac Mini $599 | Linux SBC ~$50 | Linux-Board $10 | **Jede Hardware $10** |
|
||||
|
||||
> Hinweise: ZeroClaw-Ergebnisse werden auf Produktions-Builds mit `/usr/bin/time -l` gemessen. OpenClaw benötigt die Node.js-Runtime (typischerweise ~390 MB zusätzlicher Speicher-Overhead), während NanoBot die Python-Runtime benötigt. PicoClaw und ZeroClaw sind statische Binaries. Die oben genannten RAM-Zahlen sind Runtime-Speicher; Build-time-Kompilierungsanforderungen sind höher.
|
||||
|
||||
<p align="center">
|
||||
<img src="zero-claw.jpeg" alt="ZeroClaw vs OpenClaw Vergleich" width="800" />
|
||||
</p>
|
||||
|
||||
### Reproduzierbare lokale Messung
|
||||
|
||||
Benchmark-Behauptungen können sich ändern, wenn Code und Toolchains sich weiterentwickeln, also miss deinen aktuellen Build immer lokal:
|
||||
|
||||
```bash
|
||||
cargo build --release
|
||||
ls -lh target/release/zeroclaw
|
||||
|
||||
/usr/bin/time -l target/release/zeroclaw --help
|
||||
/usr/bin/time -l target/release/zeroclaw status
|
||||
```
|
||||
|
||||
Beispielstichprobe (macOS arm64, gemessen am 18. Februar 2026):
|
||||
|
||||
- Release-Binary-Größe: `8.8M`
|
||||
- `zeroclaw --help`: Echtzeit ca. `0.02s`, maximaler Speicherbedarf ~`3.9 MB`
|
||||
- `zeroclaw status`: Echtzeit ca. `0.01s`, maximaler Speicherbedarf ~`4.1 MB`
|
||||
|
||||
## Voraussetzungen
|
||||
|
||||
<details>
|
||||
<summary><strong>Windows</strong></summary>
|
||||
|
||||
### Windows — Erforderlich
|
||||
|
||||
1. **Visual Studio Build Tools** (stellt MSVC-Linker und Windows SDK bereit):
|
||||
|
||||
```powershell
|
||||
winget install Microsoft.VisualStudio.2022.BuildTools
|
||||
```
|
||||
|
||||
Wähle während der Installation (oder über Visual Studio Installer) die Workload **"Desktop-Entwicklung mit C++"**.
|
||||
|
||||
2. **Rust-Toolchain:**
|
||||
|
||||
```powershell
|
||||
winget install Rustlang.Rustup
|
||||
```
|
||||
|
||||
Öffne nach der Installation ein neues Terminal und führe `rustup default stable` aus, um sicherzustellen, dass die stabile Toolchain aktiv ist.
|
||||
|
||||
3. **Überprüfe**, dass beide funktionieren:
|
||||
```powershell
|
||||
rustc --version
|
||||
cargo --version
|
||||
```
|
||||
|
||||
### Windows — Optional
|
||||
|
||||
- **Docker Desktop** — nur erforderlich, wenn du die [Docker-Sandbox-Runtime](#aktuelle-runtime-unterstützung) verwendest (`runtime.kind = "docker"`). Installiere über `winget install Docker.DockerDesktop`.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>Linux / macOS</strong></summary>
|
||||
|
||||
### Linux / macOS — Erforderlich
|
||||
|
||||
1. **Essentielle Build-Tools:**
|
||||
- **Linux (Debian/Ubuntu):** `sudo apt install build-essential pkg-config`
|
||||
- **Linux (Fedora/RHEL):** `sudo dnf group install development-tools && sudo dnf install pkg-config`
|
||||
- **macOS:** Installiere Xcode Command Line Tools: `xcode-select --install`
|
||||
|
||||
2. **Rust-Toolchain:**
|
||||
|
||||
```bash
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||
```
|
||||
|
||||
Siehe [rustup.rs](https://rustup.rs) für Details.
|
||||
|
||||
3. **Überprüfe:**
|
||||
```bash
|
||||
rustc --version
|
||||
cargo --version
|
||||
```
|
||||
|
||||
### Linux / macOS — Optional
|
||||
|
||||
- **Docker** — nur erforderlich, wenn du die [Docker-Sandbox-Runtime](#aktuelle-runtime-unterstützung) verwendest (`runtime.kind = "docker"`).
|
||||
- **Linux (Debian/Ubuntu):** siehe [docs.docker.com](https://docs.docker.com/engine/install/ubuntu/)
|
||||
- **Linux (Fedora/RHEL):** siehe [docs.docker.com](https://docs.docker.com/engine/install/fedora/)
|
||||
- **macOS:** installiere Docker Desktop über [docker.com/products/docker-desktop](https://www.docker.com/products/docker-desktop/)
|
||||
|
||||
</details>
|
||||
|
||||
## Schnellstart
|
||||
|
||||
### Option 1: Automatisierte Einrichtung (empfohlen)
|
||||
|
||||
Das `bootstrap.sh`-Skript installiert Rust, klont ZeroClaw, kompiliert es und richtet deine anfängliche Entwicklungsumgebung ein:
|
||||
|
||||
```bash
|
||||
curl -fsSL https://raw.githubusercontent.com/zeroclaw-labs/zeroclaw/master/bootstrap.sh | bash
|
||||
```
|
||||
|
||||
Dies wird:
|
||||
|
||||
1. Rust installieren (falls nicht vorhanden)
|
||||
2. Das ZeroClaw-Repository klonen
|
||||
3. ZeroClaw im Release-Modus kompilieren
|
||||
4. `zeroclaw` in `~/.cargo/bin/` installieren
|
||||
5. Die Standard-Workspace-Struktur in `~/.zeroclaw/workspace/` erstellen
|
||||
6. Eine Startkonfigurationsdatei `~/.zeroclaw/workspace/config.toml` generieren
|
||||
|
||||
Nach dem Bootstrap lade deine Shell neu oder führe `source ~/.cargo/env` aus, um den `zeroclaw`-Befehl global zu verwenden.
|
||||
|
||||
### Option 2: Manuelle Installation
|
||||
|
||||
<details>
|
||||
<summary><strong>Klicke, um die manuellen Installationsschritte zu sehen</strong></summary>
|
||||
|
||||
```bash
|
||||
# 1. Klone das Repository
|
||||
git clone https://github.com/zeroclaw-labs/zeroclaw.git
|
||||
cd zeroclaw
|
||||
|
||||
# 2. Kompiliere im Release-Modus
|
||||
cargo build --release --locked
|
||||
|
||||
# 3. Installiere das Binary
|
||||
cargo install --path . --locked
|
||||
|
||||
# 4. Initialisiere den Workspace
|
||||
zeroclaw init
|
||||
|
||||
# 5. Überprüfe die Installation
|
||||
zeroclaw --version
|
||||
zeroclaw status
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Nach der Installation
|
||||
|
||||
Nach der Installation (via Bootstrap oder manuell) solltest du sehen:
|
||||
|
||||
```
|
||||
~/.zeroclaw/workspace/
|
||||
├── config.toml # Hauptkonfiguration
|
||||
├── .pairing # Pairing-Geheimnisse (beim ersten Start generiert)
|
||||
├── logs/ # Daemon/Agent-Logs
|
||||
├── skills/ # Benutzerdefinierte Skills
|
||||
└── memory/ # Konversationskontext-Speicherung
|
||||
```
|
||||
|
||||
**Nächste Schritte:**
|
||||
|
||||
1. Konfiguriere deine KI-Provider in `~/.zeroclaw/workspace/config.toml`
|
||||
2. Sieh dir die [Konfigurationsreferenz](docs/config-reference.md) für erweiterte Optionen an
|
||||
3. Starte den Agent: `zeroclaw agent start`
|
||||
4. Teste über deinen bevorzugten Channel (siehe [Channel-Referenz](docs/channels-reference.md))
|
||||
|
||||
## Konfiguration
|
||||
|
||||
Bearbeite `~/.zeroclaw/workspace/config.toml`, um Provider, Channels und Systemverhalten zu konfigurieren.
|
||||
|
||||
### Schnelle Konfigurationsreferenz
|
||||
|
||||
```toml
|
||||
[providers.anthropic]
|
||||
api_key = "sk-ant-..."
|
||||
model = "claude-sonnet-4-20250514"
|
||||
|
||||
[providers.openai]
|
||||
api_key = "sk-..."
|
||||
model = "gpt-4o"
|
||||
|
||||
[channels.telegram]
|
||||
enabled = true
|
||||
bot_token = "123456:ABC-DEF..."
|
||||
|
||||
[channels.matrix]
|
||||
enabled = true
|
||||
homeserver_url = "https://matrix.org"
|
||||
username = "@bot:matrix.org"
|
||||
password = "..."
|
||||
|
||||
[memory]
|
||||
kind = "markdown" # oder "sqlite" oder "none"
|
||||
|
||||
[runtime]
|
||||
kind = "native" # oder "docker" (erfordert Docker)
|
||||
```
|
||||
|
||||
**Vollständige Referenzdokumente:**
|
||||
|
||||
- [Konfigurationsreferenz](docs/config-reference.md) — alle Einstellungen, Validierungen, Standardwerte
|
||||
- [Provider-Referenz](docs/providers-reference.md) — KI-Provider-spezifische Konfigurationen
|
||||
- [Channel-Referenz](docs/channels-reference.md) — Telegram, Matrix, Slack, Discord und mehr
|
||||
- [Betrieb](docs/operations-runbook.md) — Produktionsüberwachung, Secret-Rotation, Skalierung
|
||||
|
||||
### Aktuelle Runtime-Unterstützung
|
||||
|
||||
ZeroClaw unterstützt zwei Code-Ausführungs-Backends:
|
||||
|
||||
- **`native`** (Standard) — direkte Prozessausführung, schnellster Pfad, ideal für vertrauenswürdige Umgebungen
|
||||
- **`docker`** — vollständige Container-Isolierung, gehärtete Sicherheitsrichtlinien, erfordert Docker
|
||||
|
||||
Verwende `runtime.kind = "docker"`, wenn du striktes Sandboxing oder Netzwerkisolierung benötigst. Siehe [Konfigurationsreferenz](docs/config-reference.md#runtime) für vollständige Details.
|
||||
|
||||
## Befehle
|
||||
|
||||
```bash
|
||||
# Workspace-Verwaltung
|
||||
zeroclaw init # Initialisiert einen neuen Workspace
|
||||
zeroclaw status # Zeigt Daemon/Agent-Status
|
||||
zeroclaw config validate # Überprüft config.toml Syntax und Werte
|
||||
|
||||
# Daemon-Verwaltung
|
||||
zeroclaw daemon start # Startet den Daemon im Hintergrund
|
||||
zeroclaw daemon stop # Stoppt den laufenden Daemon
|
||||
zeroclaw daemon restart # Startet den Daemon neu (Config-Neuladen)
|
||||
zeroclaw daemon logs # Zeigt Daemon-Logs
|
||||
|
||||
# Agent-Verwaltung
|
||||
zeroclaw agent start # Startet den Agent (erfordert laufenden Daemon)
|
||||
zeroclaw agent stop # Stoppt den Agent
|
||||
zeroclaw agent restart # Startet den Agent neu (Config-Neuladen)
|
||||
|
||||
# Pairing-Operationen
|
||||
zeroclaw pairing init # Generiert ein neues Pairing-Geheimnis
|
||||
zeroclaw pairing rotate # Rotiert das bestehende Pairing-Geheimnis
|
||||
|
||||
# Tunneling (für öffentliche Exposition)
|
||||
zeroclaw tunnel start # Startet einen Tunnel zum lokalen Daemon
|
||||
zeroclaw tunnel stop # Stoppt den aktiven Tunnel
|
||||
|
||||
# Diagnose
|
||||
zeroclaw doctor # Führt System-Gesundheitsprüfungen durch
|
||||
zeroclaw version # Zeigt Version und Build-Informationen
|
||||
```
|
||||
|
||||
Siehe [Befehlsreferenz](docs/commands-reference.md) für vollständige Optionen und Beispiele.
|
||||
|
||||
## Zusammenarbeit & Docs
|
||||
|
||||
Beginne mit dem Dokumentations-Hub für eine Aufgaben-basierte Karte:
|
||||
|
||||
- Dokumentations-Hub: [`docs/README.md`](docs/README.md)
|
||||
- Vereinigtes Docs-Inhaltsverzeichnis: [`docs/SUMMARY.md`](docs/SUMMARY.md)
|
||||
- Befehlsreferenz: [`docs/commands-reference.md`](docs/commands-reference.md)
|
||||
- Konfigurationsreferenz: [`docs/config-reference.md`](docs/config-reference.md)
|
||||
- Provider-Referenz: [`docs/providers-reference.md`](docs/providers-reference.md)
|
||||
- Channel-Referenz: [`docs/channels-reference.md`](docs/channels-reference.md)
|
||||
- Betriebshandbuch: [`docs/operations-runbook.md`](docs/operations-runbook.md)
|
||||
- Fehlerbehebung: [`docs/troubleshooting.md`](docs/troubleshooting.md)
|
||||
- Docs-Inventar/Klassifizierung: [`docs/docs-inventory.md`](docs/docs-inventory.md)
|
||||
- PR/Issue-Triage-Snapshot (Stand 18. Feb. 2026): [`docs/project-triage-snapshot-2026-02-18.md`](docs/project-triage-snapshot-2026-02-18.md)
|
||||
|
||||
Hauptzusammenarbeitsreferenzen:
|
||||
|
||||
- Dokumentations-Hub: [docs/README.md](docs/README.md)
|
||||
- Dokumentationsvorlage: [docs/doc-template.md](docs/doc-template.md)
|
||||
- Dokumentationsänderungs-Checkliste: [docs/README.md#4-documentation-change-checklist](docs/README.md#4-documentation-change-checklist)
|
||||
- Channel-Konfigurationsreferenz: [docs/channels-reference.md](docs/channels-reference.md)
|
||||
- Matrix-verschlüsselte Raum-Operationen: [docs/matrix-e2ee-guide.md](docs/matrix-e2ee-guide.md)
|
||||
- Beitragsleitfaden: [CONTRIBUTING.md](CONTRIBUTING.md)
|
||||
- PR-Workflow-Richtlinie: [docs/pr-workflow.md](docs/pr-workflow.md)
|
||||
- Reviewer-Playbook (Triage + Tiefenreview): [docs/reviewer-playbook.md](docs/reviewer-playbook.md)
|
||||
- Eigentums- und CI-Triage-Map: [docs/ci-map.md](docs/ci-map.md)
|
||||
- Sicherheits-Offenlegungsrichtlinie: [SECURITY.md](SECURITY.md)
|
||||
|
||||
Für Deployment und Runtime-Betrieb:
|
||||
|
||||
- Netzwerk-Deployment-Leitfaden: [docs/network-deployment.md](docs/network-deployment.md)
|
||||
- Proxy-Agent-Playbook: [docs/proxy-agent-playbook.md](docs/proxy-agent-playbook.md)
|
||||
|
||||
## ZeroClaw unterstützen
|
||||
|
||||
Wenn ZeroClaw deine Arbeit hilft und du die kontinuierliche Entwicklung unterstützen möchtest, kannst du hier spenden:
|
||||
|
||||
<a href="https://buymeacoffee.com/argenistherose"><img src="https://img.shields.io/badge/Buy%20Me%20a%20Coffee-Donate-yellow.svg?style=for-the-badge&logo=buy-me-a-coffee" alt="Kauf mir einen Kaffee" /></a>
|
||||
|
||||
### 🙏 Besonderer Dank
|
||||
|
||||
Ein herzliches Dankeschön an die Gemeinschaften und Institutionen, die diese Open-Source-Arbeit inspirieren und unterstützen:
|
||||
|
||||
- **Harvard University** — für die Förderung intellektueller Neugier und das Erweitern der Grenzen des Möglichen.
|
||||
- **MIT** — für das Eintreten für offenes Wissen, Open Source und die Überzeugung, dass Technologie für alle zugänglich sein sollte.
|
||||
- **Sundai Club** — für die Gemeinschaft, die Energie und den unermüdlichen Willen, Dinge zu bauen, die zählen.
|
||||
- **Die Welt und Darüber Hinaus** 🌍✨ — an jeden Mitwirkenden, Träumer und Erbauer da draußen, der Open Source zu einer Kraft für das Gute macht. Das ist für dich.
|
||||
|
||||
Wir bauen in Open Source, weil die besten Ideen von überall kommen. Wenn du das liest, bist du Teil davon. Willkommen. 🦀❤️
|
||||
|
||||
<!-- BEGIN:RECENT_CONTRIBUTORS -->
|
||||
|
||||
### 🌟 Recent Contributors (v0.3.1)
|
||||
|
||||
3 contributors shipped features, fixes, and improvements in this release cycle:
|
||||
|
||||
- **Argenis**
|
||||
- **argenis de la rosa**
|
||||
- **Claude Opus 4.6**
|
||||
|
||||
Thank you to everyone who opened issues, reviewed PRs, translated docs, and helped test. Every contribution matters. 🦀
|
||||
|
||||
<!-- END:RECENT_CONTRIBUTORS -->
|
||||
|
||||
## ⚠️ Offizielles Repository und Fälschungswarnung
|
||||
|
||||
**Dies ist das einzige offizielle ZeroClaw-Repository:**
|
||||
|
||||
> <https://github.com/zeroclaw-labs/zeroclaw>
|
||||
|
||||
Jedes andere Repository, Organisation, Domain oder Paket, das behauptet "ZeroClaw" zu sein oder eine Verbindung zu ZeroClaw Labs zu implizieren, ist **nicht autorisiert und nicht mit diesem Projekt verbunden**. Bekannte nicht autorisierte Forks werden in [TRADEMARK.md](TRADEMARK.md) aufgeführt.
|
||||
|
||||
Wenn du auf Fälschung oder Markenmissbrauch stößt, bitte [öffne ein Issue](https://github.com/zeroclaw-labs/zeroclaw/issues).
|
||||
|
||||
---
|
||||
|
||||
## Lizenz
|
||||
|
||||
ZeroClaw ist doppelt lizenziert für maximale Offenheit und Contributorschutz:
|
||||
|
||||
| Lizenz | Anwendungsfälle |
|
||||
| ---------------------------- | ------------------------------------------------------------ |
|
||||
| [MIT](LICENSE-MIT) | Open-Source, Forschung, akademisch, persönliche Nutzung |
|
||||
| [Apache 2.0](LICENSE-APACHE) | Patentschutz, institutionell, kommerzielles Deployment |
|
||||
|
||||
Du kannst eine der beiden Lizenzen wählen. **Contributors gewähren automatisch Rechte unter beiden** — siehe [CLA.md](CLA.md) für die vollständige Contributor-Vereinbarung.
|
||||
|
||||
### Marke
|
||||
|
||||
Der Name **ZeroClaw** und das Logo sind eingetragene Marken von ZeroClaw Labs. Diese Lizenz gewährt keine Erlaubnis, sie zu verwenden, um Befürwortung oder Verbindung zu implizieren. Siehe [TRADEMARK.md](TRADEMARK.md) für erlaubte und verbotene Verwendungen.
|
||||
|
||||
### Contributorschutz
|
||||
|
||||
- Du **behältst das Urheberrecht** an deinen Beiträgen
|
||||
- **Patentgewährung** (Apache 2.0) schützt dich vor Patentansprüchen anderer Contributors
|
||||
- Deine Beiträge werden **dauerhaft zugeschrieben** in der Commit-Historie und [NOTICE](NOTICE)
|
||||
- Keine Markenrechte werden durch Beiträge übertragen
|
||||
|
||||
## Mitwirken
|
||||
|
||||
Siehe [CONTRIBUTING.md](CONTRIBUTING.md) und [CLA.md](CLA.md). Implementiere einen Trait, reiche eine PR ein:
|
||||
|
||||
- CI-Workflow-Leitfaden: [docs/ci-map.md](docs/ci-map.md)
|
||||
- Neuer `Provider` → `src/providers/`
|
||||
- Neuer `Channel` → `src/channels/`
|
||||
- Neuer `Observer` → `src/observability/`
|
||||
- Neues `Tool` → `src/tools/`
|
||||
- Neuer `Memory` → `src/memory/`
|
||||
- Neuer `Tunnel` → `src/tunnel/`
|
||||
- Neuer `Skill` → `~/.zeroclaw/workspace/skills/<n>/`
|
||||
|
||||
---
|
||||
|
||||
**ZeroClaw** — Null Overhead. Null Kompromiss. Deploy überall. Tausche alles. 🦀
|
||||
|
||||
## Stern-Historie
|
||||
|
||||
<p align="center">
|
||||
<a href="https://www.star-history.com/#zeroclaw-labs/zeroclaw&type=date&legend=top-left">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=zeroclaw-labs/zeroclaw&type=date&theme=dark&legend=top-left" />
|
||||
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=zeroclaw-labs/zeroclaw&type=date&legend=top-left" />
|
||||
<img alt="Stern-Historie-Diagramm" src="https://api.star-history.com/svg?repos=zeroclaw-labs/zeroclaw&type=date&legend=top-left" />
|
||||
</picture>
|
||||
</a>
|
||||
</p>
|
||||
+202
@@ -0,0 +1,202 @@
|
||||
<p align="center">
|
||||
<img src="zeroclaw.png" alt="ZeroClaw" width="200" />
|
||||
</p>
|
||||
|
||||
<h1 align="center">ZeroClaw 🦀</h1>
|
||||
|
||||
<p align="center">
|
||||
<strong>Μηδενικό overhead. Μηδενικός συμβιβασμός. 100% Rust. 100% Αγνωστικιστικό.</strong><br>
|
||||
⚡️ <strong>Εκτελείται σε hardware $10 με <5MB RAM: Αυτό είναι 99% λιγότερη μνήμη από το OpenClaw και 98% φθηνότερο από ένα Mac mini!</strong>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="LICENSE-APACHE"><img src="https://img.shields.io/badge/license-MIT%20OR%20Apache%202.0-blue.svg" alt="License: MIT OR Apache-2.0" /></a>
|
||||
<a href="NOTICE"><img src="https://img.shields.io/badge/contributors-27+-green.svg" alt="Contributors" /></a>
|
||||
<a href="https://buymeacoffee.com/argenistherose"><img src="https://img.shields.io/badge/Buy%20Me%20a%20Coffee-Donate-yellow.svg?style=flat&logo=buy-me-a-coffee" alt="Buy Me a Coffee" /></a>
|
||||
<a href="https://x.com/zeroclawlabs?s=21"><img src="https://img.shields.io/badge/X-%40zeroclawlabs-000000?style=flat&logo=x&logoColor=white" alt="X: @zeroclawlabs" /></a>
|
||||
<a href="https://www.facebook.com/groups/zeroclaw"><img src="https://img.shields.io/badge/Facebook-Group-1877F2?style=flat&logo=facebook&logoColor=white" alt="Facebook Group" /></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
🌐 <strong>Γλώσσες:</strong>
|
||||
<a href="README.md">🇺🇸 English</a> ·
|
||||
<a href="README.zh-CN.md">🇨🇳 简体中文</a> ·
|
||||
<a href="README.ja.md">🇯🇵 日本語</a> ·
|
||||
<a href="README.ko.md">🇰🇷 한국어</a> ·
|
||||
<a href="README.vi.md">🇻🇳 Tiếng Việt</a> ·
|
||||
<a href="README.tl.md">🇵🇭 Tagalog</a> ·
|
||||
<a href="README.es.md">🇪🇸 Español</a> ·
|
||||
<a href="README.pt.md">🇧🇷 Português</a> ·
|
||||
<a href="README.it.md">🇮🇹 Italiano</a> ·
|
||||
<a href="README.de.md">🇩🇪 Deutsch</a> ·
|
||||
<a href="README.fr.md">🇫🇷 Français</a> ·
|
||||
<a href="README.ar.md">🇸🇦 العربية</a> ·
|
||||
<a href="README.hi.md">🇮🇳 हिन्दी</a> ·
|
||||
<a href="README.ru.md">🇷🇺 Русский</a> ·
|
||||
<a href="README.bn.md">🇧🇩 বাংলা</a> ·
|
||||
<a href="README.he.md">🇮🇱 עברית</a> ·
|
||||
<a href="README.pl.md">🇵🇱 Polski</a> ·
|
||||
<a href="README.cs.md">🇨🇿 Čeština</a> ·
|
||||
<a href="README.nl.md">🇳🇱 Nederlands</a> ·
|
||||
<a href="README.tr.md">🇹🇷 Türkçe</a> ·
|
||||
<a href="README.uk.md">🇺🇦 Українська</a> ·
|
||||
<a href="README.id.md">🇮🇩 Bahasa Indonesia</a> ·
|
||||
<a href="README.th.md">🇹🇭 ไทย</a> ·
|
||||
<a href="README.ur.md">🇵🇰 اردو</a> ·
|
||||
<a href="README.ro.md">🇷🇴 Română</a> ·
|
||||
<a href="README.sv.md">🇸🇪 Svenska</a> ·
|
||||
<a href="README.el.md">🇬🇷 Ελληνικά</a> ·
|
||||
<a href="README.hu.md">🇭🇺 Magyar</a> ·
|
||||
<a href="README.fi.md">🇫🇮 Suomi</a> ·
|
||||
<a href="README.da.md">🇩🇰 Dansk</a> ·
|
||||
<a href="README.nb.md">🇳🇴 Norsk</a>
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
<!-- BEGIN:WHATS_NEW -->
|
||||
|
||||
### 🚀 What's New in v0.3.1 (March 2026)
|
||||
|
||||
| Area | Highlights |
|
||||
|---|---|
|
||||
| ci | add Termux (aarch64-linux-android) release target |
|
||||
|
||||
<!-- END:WHATS_NEW -->
|
||||
|
||||
> **📝 Σημείωση:** Αυτό είναι ένα συνοπτικό README στα ελληνικά. Για πλήρη τεκμηρίωση, ανατρέξτε στο [αγγλικό README](README.md). Οι σύνδεσμοι τεκμηρίωσης παραπέμπουν στην αγγλική τεκμηρίωση.
|
||||
|
||||
## Τι είναι το ZeroClaw;
|
||||
|
||||
Το ZeroClaw είναι μια ελαφριά, μεταβλητή και επεκτάσιμη υποδομή AI βοηθού χτισμένη σε Rust. Συνδέει διάφορους παρόχους LLM (Anthropic, OpenAI, Google, Ollama, κλπ.) μέσω μιας ενοποιημένης διεπαφής και υποστηρίζει πολλαπλά κανάλια (Telegram, Matrix, CLI, κλπ.).
|
||||
|
||||
### Κύρια Χαρακτηριστικά
|
||||
|
||||
- **🦀 Γραμμένο σε Rust**: Υψηλή απόδοση, ασφάλεια μνήμης και αφαιρέσεις μηδενικού κόστους
|
||||
- **🔌 Αγνωστικιστικό προς παρόχους**: Υποστηρίζει OpenAI, Anthropic, Google Gemini, Ollama και άλλους
|
||||
- **📱 Πολυκάναλο**: Telegram, Matrix (με E2EE), CLI και άλλα
|
||||
- **🧠 Προσαρμόσιμη μνήμη**: SQLite και Markdown backends
|
||||
- **🛠️ Επεκτάσιμα εργαλεία**: Προσθέστε εύκολα προσαρμοσμένα εργαλεία
|
||||
- **🔒 Ασφάλεια πρώτα**: Αντίστροφος proxy, σχεδιασμός προσανατολισμένος στο απόρρητο
|
||||
|
||||
---
|
||||
|
||||
## Γρήγορη Εκκίνηση
|
||||
|
||||
### Απαιτήσεις
|
||||
|
||||
- Rust 1.70+
|
||||
- Ένα κλειδί API παρόχου LLM (Anthropic, OpenAI, κλπ.)
|
||||
|
||||
### Εγκατάσταση
|
||||
|
||||
```bash
|
||||
# Κλωνοποιήστε το repository
|
||||
git clone https://github.com/zeroclaw-labs/zeroclaw.git
|
||||
cd zeroclaw
|
||||
|
||||
# Κατασκευή
|
||||
cargo build --release
|
||||
|
||||
# Εκτέλεση
|
||||
cargo run --release
|
||||
```
|
||||
|
||||
### Με Docker
|
||||
|
||||
```bash
|
||||
docker run -d \
|
||||
--name zeroclaw \
|
||||
-e ANTHROPIC_API_KEY=your_key \
|
||||
-v zeroclaw-data:/app/data \
|
||||
zeroclaw/zeroclaw:latest
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Ρύθμιση
|
||||
|
||||
Το ZeroClaw χρησιμοποιεί ένα αρχείο ρύθμισης YAML. Από προεπιλογή, αναζητά το `config.yaml`.
|
||||
|
||||
```yaml
|
||||
# Προεπιλεγμένος πάροχος
|
||||
provider: anthropic
|
||||
|
||||
# Ρύθμιση παρόχων
|
||||
providers:
|
||||
anthropic:
|
||||
api_key: ${ANTHROPIC_API_KEY}
|
||||
model: claude-3-5-sonnet-20241022
|
||||
openai:
|
||||
api_key: ${OPENAI_API_KEY}
|
||||
model: gpt-4o
|
||||
|
||||
# Ρύθμιση μνήμης
|
||||
memory:
|
||||
backend: sqlite
|
||||
path: data/memory.db
|
||||
|
||||
# Ρύθμιση καναλιών
|
||||
channels:
|
||||
telegram:
|
||||
token: ${TELEGRAM_BOT_TOKEN}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Τεκμηρίωση
|
||||
|
||||
Για λεπτομερή τεκμηρίωση, δείτε:
|
||||
|
||||
- [Κόμβος Τεκμηρίωσης](docs/README.md)
|
||||
- [Αναφορά Εντολών](docs/commands-reference.md)
|
||||
- [Αναφορά Παρόχων](docs/providers-reference.md)
|
||||
- [Αναφορά Καναλιών](docs/channels-reference.md)
|
||||
- [Αναφορά Ρυθμίσεων](docs/config-reference.md)
|
||||
|
||||
---
|
||||
|
||||
## Συνεισφορά
|
||||
|
||||
Οι συνεισφορές είναι ευπρόσδεκτες! Παρακαλώ διαβάστε τον [Οδηγό Συνεισφοράς](CONTRIBUTING.md).
|
||||
|
||||
---
|
||||
|
||||
## Άδεια
|
||||
|
||||
Αυτό το έργο έχει διπλή άδεια:
|
||||
|
||||
- MIT License
|
||||
- Apache License, έκδοση 2.0
|
||||
|
||||
Δείτε τα [LICENSE-APACHE](LICENSE-APACHE) και [LICENSE-MIT](LICENSE-MIT) για λεπτομέρειες.
|
||||
|
||||
---
|
||||
|
||||
## Κοινότητα
|
||||
|
||||
- [Telegram](https://t.me/zeroclawlabs)
|
||||
- [Facebook Group](https://www.facebook.com/groups/zeroclaw)
|
||||
- [WeChat Group](https://zeroclawlabs.cn/group.jpg)
|
||||
|
||||
---
|
||||
|
||||
## Χορηγοί
|
||||
|
||||
Αν το ZeroClaw είναι χρήσιμο για εσάς, παρακαλώ σκεφτείτε να μας αγοράσετε έναν καφέ:
|
||||
|
||||
[](https://buymeacoffee.com/argenistherose)
|
||||
|
||||
<!-- BEGIN:RECENT_CONTRIBUTORS -->
|
||||
|
||||
### 🌟 Recent Contributors (v0.3.1)
|
||||
|
||||
3 contributors shipped features, fixes, and improvements in this release cycle:
|
||||
|
||||
- **Argenis**
|
||||
- **argenis de la rosa**
|
||||
- **Claude Opus 4.6**
|
||||
|
||||
Thank you to everyone who opened issues, reviewed PRs, translated docs, and helped test. Every contribution matters. 🦀
|
||||
|
||||
<!-- END:RECENT_CONTRIBUTORS -->
|
||||
+501
@@ -0,0 +1,501 @@
|
||||
<p align="center">
|
||||
<img src="zeroclaw.png" alt="ZeroClaw" width="200" />
|
||||
</p>
|
||||
|
||||
<h1 align="center">ZeroClaw 🦀</h1>
|
||||
|
||||
<p align="center">
|
||||
<strong>Cero sobrecarga. Cero compromiso. 100% Rust. 100% Agnóstico.</strong><br>
|
||||
⚡️ <strong>¡Ejecuta en hardware de $10 con <5MB de RAM: ¡Eso es 99% menos memoria que OpenClaw y 98% más barato que un Mac mini!</strong>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="LICENSE-APACHE"><img src="https://img.shields.io/badge/license-MIT%20OR%20Apache%202.0-blue.svg" alt="License: MIT OR Apache-2.0" /></a>
|
||||
<a href="NOTICE"><img src="https://img.shields.io/badge/contributors-27+-green.svg" alt="Contributors" /></a>
|
||||
<a href="https://buymeacoffee.com/argenistherose"><img src="https://img.shields.io/badge/Buy%20Me%20a%20Coffee-Donate-yellow.svg?style=flat&logo=buy-me-a-coffee" alt="Buy Me a Coffee" /></a>
|
||||
<a href="https://x.com/zeroclawlabs?s=21"><img src="https://img.shields.io/badge/X-%40zeroclawlabs-000000?style=flat&logo=x&logoColor=white" alt="X: @zeroclawlabs" /></a>
|
||||
<a href="https://zeroclawlabs.cn/group.jpg"><img src="https://img.shields.io/badge/WeChat-Group-B7D7A8?logo=wechat&logoColor=white" alt="WeChat Group" /></a>
|
||||
<a href="https://www.xiaohongshu.com/user/profile/67cbfc43000000000d008307?xsec_token=AB73VnYnGNx5y36EtnnZfGmAmS-6Wzv8WMuGpfwfkg6Yc%3D&xsec_source=pc_search"><img src="https://img.shields.io/badge/Xiaohongshu-Official-FF2442?style=flat" alt="Xiaohongshu: Official" /></a>
|
||||
<a href="https://t.me/zeroclawlabs"><img src="https://img.shields.io/badge/Telegram-%40zeroclawlabs-26A5E4?style=flat&logo=telegram&logoColor=white" alt="Telegram: @zeroclawlabs" /></a>
|
||||
<a href="https://www.facebook.com/groups/zeroclaw"><img src="https://img.shields.io/badge/Facebook-Group-1877F2?style=flat&logo=facebook&logoColor=white" alt="Facebook Group" /></a>
|
||||
<a href="https://www.reddit.com/r/zeroclawlabs/"><img src="https://img.shields.io/badge/Reddit-r%2Fzeroclawlabs-FF4500?style=flat&logo=reddit&logoColor=white" alt="Reddit: r/zeroclawlabs" /></a>
|
||||
</p>
|
||||
<p align="center">
|
||||
Construido por estudiantes y miembros de las comunidades de Harvard, MIT y Sundai.Club.
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
🌐 <strong>Idiomas:</strong><a href="README.md">🇺🇸 English</a> ·
|
||||
<a href="README.zh-CN.md">🇨🇳 简体中文</a> ·
|
||||
<a href="README.ja.md">🇯🇵 日本語</a> ·
|
||||
<a href="README.ko.md">🇰🇷 한국어</a> ·
|
||||
<a href="README.vi.md">🇻🇳 Tiếng Việt</a> ·
|
||||
<a href="README.tl.md">🇵🇭 Tagalog</a> ·
|
||||
<a href="README.es.md">🇪🇸 Español</a> ·
|
||||
<a href="README.pt.md">🇧🇷 Português</a> ·
|
||||
<a href="README.it.md">🇮🇹 Italiano</a> ·
|
||||
<a href="README.de.md">🇩🇪 Deutsch</a> ·
|
||||
<a href="README.fr.md">🇫🇷 Français</a> ·
|
||||
<a href="README.ar.md">🇸🇦 العربية</a> ·
|
||||
<a href="README.hi.md">🇮🇳 हिन्दी</a> ·
|
||||
<a href="README.ru.md">🇷🇺 Русский</a> ·
|
||||
<a href="README.bn.md">🇧🇩 বাংলা</a> ·
|
||||
<a href="README.he.md">🇮🇱 עברית</a> ·
|
||||
<a href="README.pl.md">🇵🇱 Polski</a> ·
|
||||
<a href="README.cs.md">🇨🇿 Čeština</a> ·
|
||||
<a href="README.nl.md">🇳🇱 Nederlands</a> ·
|
||||
<a href="README.tr.md">🇹🇷 Türkçe</a> ·
|
||||
<a href="README.uk.md">🇺🇦 Українська</a> ·
|
||||
<a href="README.id.md">🇮🇩 Bahasa Indonesia</a> ·
|
||||
<a href="README.th.md">🇹🇭 ไทย</a> ·
|
||||
<a href="README.ur.md">🇵🇰 اردو</a> ·
|
||||
<a href="README.ro.md">🇷🇴 Română</a> ·
|
||||
<a href="README.sv.md">🇸🇪 Svenska</a> ·
|
||||
<a href="README.el.md">🇬🇷 Ελληνικά</a> ·
|
||||
<a href="README.hu.md">🇭🇺 Magyar</a> ·
|
||||
<a href="README.fi.md">🇫🇮 Suomi</a> ·
|
||||
<a href="README.da.md">🇩🇰 Dansk</a> ·
|
||||
<a href="README.nb.md">🇳🇴 Norsk</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="#inicio-rápido">Inicio Rápido</a> |
|
||||
<a href="bootstrap.sh">Configuración con Un Clic</a> |
|
||||
<a href="docs/README.md">Hub de Documentación</a> |
|
||||
<a href="docs/SUMMARY.md">Tabla de Contenidos de Documentación</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<strong>Accesos rápidos:</strong>
|
||||
<a href="docs/reference/README.md">Referencia</a> ·
|
||||
<a href="docs/operations/README.md">Operaciones</a> ·
|
||||
<a href="docs/troubleshooting.md">Solución de Problemas</a> ·
|
||||
<a href="docs/security/README.md">Seguridad</a> ·
|
||||
<a href="docs/hardware/README.md">Hardware</a> ·
|
||||
<a href="docs/contributing/README.md">Contribuir</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<strong>Infraestructura de asistente AI rápida, ligera y completamente autónoma</strong><br />
|
||||
Despliega en cualquier lugar. Intercambia cualquier cosa.
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
ZeroClaw es el <strong>sistema operativo de runtime</strong> para flujos de trabajo de agentes — una infraestructura que abstrae modelos, herramientas, memoria y ejecución para construir agentes una vez y ejecutarlos en cualquier lugar.
|
||||
</p>
|
||||
|
||||
<p align="center"><code>Arquitectura basada en traits · runtime seguro por defecto · proveedor/canal/herramienta intercambiables · todo es conectable</code></p>
|
||||
|
||||
<!-- BEGIN:WHATS_NEW -->
|
||||
|
||||
### 🚀 What's New in v0.3.1 (March 2026)
|
||||
|
||||
| Area | Highlights |
|
||||
|---|---|
|
||||
| ci | add Termux (aarch64-linux-android) release target |
|
||||
|
||||
<!-- END:WHATS_NEW -->
|
||||
|
||||
### 📢 Anuncios
|
||||
|
||||
Usa esta tabla para avisos importantes (cambios de compatibilidad, avisos de seguridad, ventanas de mantenimiento y bloqueos de versión).
|
||||
|
||||
| Fecha (UTC) | Nivel | Aviso | Acción |
|
||||
| ---------- | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| 2026-02-19 | _Crítico_ | **No estamos afiliados** con `openagen/zeroclaw` o `zeroclaw.org`. El dominio `zeroclaw.org` apunta actualmente al fork `openagen/zeroclaw`, y este dominio/repositorio está suplantando nuestro sitio web/proyecto oficial. | No confíes en información, binarios, recaudaciones de fondos o anuncios de estas fuentes. Usa solo [este repositorio](https://github.com/zeroclaw-labs/zeroclaw) y nuestras cuentas sociales verificadas. |
|
||||
| 2026-02-21 | _Importante_ | Nuestro sitio web oficial ahora está en línea: [zeroclawlabs.ai](https://zeroclawlabs.ai). Gracias por tu paciencia durante la espera. Todavía detectamos intentos de suplantación: no participes en ninguna actividad de inversión/financiamiento en nombre de ZeroClaw si no se publica a través de nuestros canales oficiales. | Usa [este repositorio](https://github.com/zeroclaw-labs/zeroclaw) como la única fuente de verdad. Sigue [X (@zeroclawlabs)](https://x.com/zeroclawlabs?s=21), [Telegram (@zeroclawlabs)](https://t.me/zeroclawlabs), [Facebook (grupo)](https://www.facebook.com/groups/zeroclaw), [Reddit (r/zeroclawlabs)](https://www.reddit.com/r/zeroclawlabs/), y [Xiaohongshu](https://www.xiaohongshu.com/user/profile/67cbfc43000000000d008307?xsec_token=AB73VnYnGNx5y36EtnnZfGmAmS-6Wzv8WMuGpfwfkg6Yc%3D&xsec_source=pc_search) para actualizaciones oficiales. |
|
||||
| 2026-02-19 | _Importante_ | Anthropic actualizó los términos de uso de autenticación y credenciales el 2026-02-19. La autenticación OAuth (Free, Pro, Max) es exclusivamente para Claude Code y Claude.ai; el uso de tokens OAuth de Claude Free/Pro/Max en cualquier otro producto, herramienta o servicio (incluyendo Agent SDK) no está permitido y puede violar los Términos de Uso del Consumidor. | Por favor, evita temporalmente las integraciones OAuth de Claude Code para prevenir cualquier pérdida potencial. Cláusula original: [Authentication and Credential Use](https://code.claude.com/docs/en/legal-and-compliance#authentication-and-credential-use). |
|
||||
|
||||
### ✨ Características
|
||||
|
||||
- 🏎️ **Runtime Ligero por Defecto:** Los flujos de trabajo CLI comunes y comandos de estado se ejecutan dentro de un espacio de memoria de pocos megabytes en builds de producción.
|
||||
- 💰 **Despliegue Económico:** Diseñado para placas de bajo costo e instancias cloud pequeñas sin dependencias de runtime pesadas.
|
||||
- ⚡ **Inicios en Frío Rápidos:** El runtime Rust de binario único mantiene el inicio de comandos y demonios casi instantáneo para operaciones diarias.
|
||||
- 🌍 **Arquitectura Portátil:** Un flujo de trabajo de binario único en ARM, x86 y RISC-V con proveedor/canal/herramienta intercambiables.
|
||||
|
||||
### Por qué los equipos eligen ZeroClaw
|
||||
|
||||
- **Ligero por defecto:** binario Rust pequeño, inicio rápido, huella de memoria baja.
|
||||
- **Seguro por diseño:** emparejamiento, sandboxing estricto, listas permitidas explícitas, alcance de workspace.
|
||||
- **Completamente intercambiable:** los sistemas centrales son traits (proveedores, canales, herramientas, memoria, túneles).
|
||||
- **Sin lock-in de proveedor:** soporte de proveedor compatible con OpenAI + endpoints personalizados conectables.
|
||||
|
||||
## Instantánea de Benchmark (ZeroClaw vs OpenClaw, Reproducible)
|
||||
|
||||
Benchmark rápido en máquina local (macOS arm64, feb. 2026) normalizado para hardware edge de 0.8 GHz.
|
||||
|
||||
| | OpenClaw | NanoBot | PicoClaw | ZeroClaw 🦀 |
|
||||
| ---------------------------- | ------------- | -------------- | --------------- | --------------------- |
|
||||
| **Lenguaje** | TypeScript | Python | Go | **Rust** |
|
||||
| **RAM** | > 1 GB | > 100 MB | < 10 MB | **< 5 MB** |
|
||||
| **Inicio (núcleo 0.8 GHz)** | > 500s | > 30s | < 1s | **< 10ms** |
|
||||
| **Tamaño Binario** | ~28 MB (dist) | N/A (Scripts) | ~8 MB | **3.4 MB** |
|
||||
| **Costo** | Mac Mini $599 | Linux SBC ~$50 | Placa Linux $10 | **Cualquier hardware $10** |
|
||||
|
||||
> Notas: Los resultados de ZeroClaw se miden en builds de producción usando `/usr/bin/time -l`. OpenClaw requiere el runtime Node.js (típicamente ~390 MB de sobrecarga de memoria adicional), mientras que NanoBot requiere el runtime Python. PicoClaw y ZeroClaw son binarios estáticos. Las cifras de RAM anteriores son memoria de runtime; los requisitos de compilación en tiempo de build son mayores.
|
||||
|
||||
<p align="center">
|
||||
<img src="zero-claw.jpeg" alt="Comparación ZeroClaw vs OpenClaw" width="800" />
|
||||
</p>
|
||||
|
||||
### Medición Local Reproducible
|
||||
|
||||
Las afirmaciones de benchmark pueden derivar a medida que el código y las toolchains evolucionan, así que siempre mide tu build actual localmente:
|
||||
|
||||
```bash
|
||||
cargo build --release
|
||||
ls -lh target/release/zeroclaw
|
||||
|
||||
/usr/bin/time -l target/release/zeroclaw --help
|
||||
/usr/bin/time -l target/release/zeroclaw status
|
||||
```
|
||||
|
||||
Ejemplo de muestra (macOS arm64, medido el 18 de febrero de 2026):
|
||||
|
||||
- Tamaño de binario release: `8.8M`
|
||||
- `zeroclaw --help`: tiempo real aprox `0.02s`, huella de memoria máxima ~`3.9 MB`
|
||||
- `zeroclaw status`: tiempo real aprox `0.01s`, huella de memoria máxima ~`4.1 MB`
|
||||
|
||||
## Requisitos Previos
|
||||
|
||||
<details>
|
||||
<summary><strong>Windows</strong></summary>
|
||||
|
||||
### Windows — Requerido
|
||||
|
||||
1. **Visual Studio Build Tools** (proporciona el linker MSVC y el Windows SDK):
|
||||
|
||||
```powershell
|
||||
winget install Microsoft.VisualStudio.2022.BuildTools
|
||||
```
|
||||
|
||||
Durante la instalación (o a través de Visual Studio Installer), selecciona la carga de trabajo **"Desarrollo de escritorio con C++"**.
|
||||
|
||||
2. **Toolchain Rust:**
|
||||
|
||||
```powershell
|
||||
winget install Rustlang.Rustup
|
||||
```
|
||||
|
||||
Después de la instalación, abre una nueva terminal y ejecuta `rustup default stable` para asegurar que la toolchain estable esté activa.
|
||||
|
||||
3. **Verifica** que ambos funcionan:
|
||||
```powershell
|
||||
rustc --version
|
||||
cargo --version
|
||||
```
|
||||
|
||||
### Windows — Opcional
|
||||
|
||||
- **Docker Desktop** — requerido solo si usas el [runtime sandboxed Docker](#soporte-de-runtime-actual) (`runtime.kind = "docker"`). Instala vía `winget install Docker.DockerDesktop`.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>Linux / macOS</strong></summary>
|
||||
|
||||
### Linux / macOS — Requerido
|
||||
|
||||
1. **Herramientas de compilación esenciales:**
|
||||
- **Linux (Debian/Ubuntu):** `sudo apt install build-essential pkg-config`
|
||||
- **Linux (Fedora/RHEL):** `sudo dnf group install development-tools && sudo dnf install pkg-config`
|
||||
- **macOS:** Instala Xcode Command Line Tools: `xcode-select --install`
|
||||
|
||||
2. **Toolchain Rust:**
|
||||
|
||||
```bash
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||
```
|
||||
|
||||
Ver [rustup.rs](https://rustup.rs) para detalles.
|
||||
|
||||
3. **Verifica:**
|
||||
```bash
|
||||
rustc --version
|
||||
cargo --version
|
||||
```
|
||||
|
||||
### Linux / macOS — Opcional
|
||||
|
||||
- **Docker** — requerido solo si usas el [runtime sandboxed Docker](#soporte-de-runtime-actual) (`runtime.kind = "docker"`).
|
||||
- **Linux (Debian/Ubuntu):** ver [docs.docker.com](https://docs.docker.com/engine/install/ubuntu/)
|
||||
- **Linux (Fedora/RHEL):** ver [docs.docker.com](https://docs.docker.com/engine/install/fedora/)
|
||||
- **macOS:** instala Docker Desktop vía [docker.com/products/docker-desktop](https://www.docker.com/products/docker-desktop/)
|
||||
|
||||
</details>
|
||||
|
||||
## Inicio Rápido
|
||||
|
||||
### Opción 1: Configuración automatizada (recomendada)
|
||||
|
||||
El script `bootstrap.sh` instala Rust, clona ZeroClaw, lo compila, y configura tu entorno de desarrollo inicial:
|
||||
|
||||
```bash
|
||||
curl -fsSL https://raw.githubusercontent.com/zeroclaw-labs/zeroclaw/master/bootstrap.sh | bash
|
||||
```
|
||||
|
||||
Esto:
|
||||
|
||||
1. Instalará Rust (si no está presente)
|
||||
2. Clonará el repositorio ZeroClaw
|
||||
3. Compilará ZeroClaw en modo release
|
||||
4. Instalará `zeroclaw` en `~/.cargo/bin/`
|
||||
5. Creará la estructura de workspace por defecto en `~/.zeroclaw/workspace/`
|
||||
6. Generará un archivo de configuración inicial `~/.zeroclaw/workspace/config.toml`
|
||||
|
||||
Después del bootstrap, recarga tu shell o ejecuta `source ~/.cargo/env` para usar el comando `zeroclaw` globalmente.
|
||||
|
||||
### Opción 2: Instalación manual
|
||||
|
||||
<details>
|
||||
<summary><strong>Clic para ver los pasos de instalación manual</strong></summary>
|
||||
|
||||
```bash
|
||||
# 1. Clona el repositorio
|
||||
git clone https://github.com/zeroclaw-labs/zeroclaw.git
|
||||
cd zeroclaw
|
||||
|
||||
# 2. Compila en release
|
||||
cargo build --release --locked
|
||||
|
||||
# 3. Instala el binario
|
||||
cargo install --path . --locked
|
||||
|
||||
# 4. Inicializa el workspace
|
||||
zeroclaw init
|
||||
|
||||
# 5. Verifica la instalación
|
||||
zeroclaw --version
|
||||
zeroclaw status
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Después de la instalación
|
||||
|
||||
Una vez instalado (vía bootstrap o manualmente), deberías ver:
|
||||
|
||||
```
|
||||
~/.zeroclaw/workspace/
|
||||
├── config.toml # Configuración principal
|
||||
├── .pairing # Secretos de emparejamiento (generado al primer inicio)
|
||||
├── logs/ # Logs de daemon/agent
|
||||
├── skills/ # Habilidades personalizadas
|
||||
└── memory/ # Almacenamiento de contexto conversacional
|
||||
```
|
||||
|
||||
**Siguientes pasos:**
|
||||
|
||||
1. Configura tus proveedores de AI en `~/.zeroclaw/workspace/config.toml`
|
||||
2. Revisa la [referencia de configuración](docs/config-reference.md) para opciones avanzadas
|
||||
3. Inicia el agente: `zeroclaw agent start`
|
||||
4. Prueba vía tu canal preferido (ver [referencia de canales](docs/channels-reference.md))
|
||||
|
||||
## Configuración
|
||||
|
||||
Edita `~/.zeroclaw/workspace/config.toml` para configurar proveedores, canales y comportamiento del sistema.
|
||||
|
||||
### Referencia de Configuración Rápida
|
||||
|
||||
```toml
|
||||
[providers.anthropic]
|
||||
api_key = "sk-ant-..."
|
||||
model = "claude-sonnet-4-20250514"
|
||||
|
||||
[providers.openai]
|
||||
api_key = "sk-..."
|
||||
model = "gpt-4o"
|
||||
|
||||
[channels.telegram]
|
||||
enabled = true
|
||||
bot_token = "123456:ABC-DEF..."
|
||||
|
||||
[channels.matrix]
|
||||
enabled = true
|
||||
homeserver_url = "https://matrix.org"
|
||||
username = "@bot:matrix.org"
|
||||
password = "..."
|
||||
|
||||
[memory]
|
||||
kind = "markdown" # o "sqlite" o "none"
|
||||
|
||||
[runtime]
|
||||
kind = "native" # o "docker" (requiere Docker)
|
||||
```
|
||||
|
||||
**Documentos de referencia completos:**
|
||||
|
||||
- [Referencia de Configuración](docs/config-reference.md) — todos los ajustes, validaciones, valores por defecto
|
||||
- [Referencia de Proveedores](docs/providers-reference.md) — configuraciones específicas de proveedores de AI
|
||||
- [Referencia de Canales](docs/channels-reference.md) — Telegram, Matrix, Slack, Discord y más
|
||||
- [Operaciones](docs/operations-runbook.md) — monitoreo en producción, rotación de secretos, escalado
|
||||
|
||||
### Soporte de Runtime (actual)
|
||||
|
||||
ZeroClaw soporta dos backends de ejecución de código:
|
||||
|
||||
- **`native`** (por defecto) — ejecución de proceso directo, camino más rápido, ideal para entornos de confianza
|
||||
- **`docker`** — aislamiento completo de contenedor, políticas de seguridad reforzadas, requiere Docker
|
||||
|
||||
Usa `runtime.kind = "docker"` si necesitas sandboxing estricto o aislamiento de red. Ver [referencia de configuración](docs/config-reference.md#runtime) para detalles completos.
|
||||
|
||||
## Comandos
|
||||
|
||||
```bash
|
||||
# Gestión de workspace
|
||||
zeroclaw init # Inicializa un nuevo workspace
|
||||
zeroclaw status # Muestra estado de daemon/agent
|
||||
zeroclaw config validate # Verifica sintaxis y valores de config.toml
|
||||
|
||||
# Gestión de daemon
|
||||
zeroclaw daemon start # Inicia el daemon en segundo plano
|
||||
zeroclaw daemon stop # Detiene el daemon en ejecución
|
||||
zeroclaw daemon restart # Reinicia el daemon (recarga de config)
|
||||
zeroclaw daemon logs # Muestra logs del daemon
|
||||
|
||||
# Gestión de agent
|
||||
zeroclaw agent start # Inicia el agent (requiere daemon ejecutándose)
|
||||
zeroclaw agent stop # Detiene el agent
|
||||
zeroclaw agent restart # Reinicia el agent (recarga de config)
|
||||
|
||||
# Operaciones de emparejamiento
|
||||
zeroclaw pairing init # Genera un nuevo secreto de emparejamiento
|
||||
zeroclaw pairing rotate # Rota el secreto de emparejamiento existente
|
||||
|
||||
# Tunneling (para exposición pública)
|
||||
zeroclaw tunnel start # Inicia un tunnel hacia el daemon local
|
||||
zeroclaw tunnel stop # Detiene el tunnel activo
|
||||
|
||||
# Diagnóstico
|
||||
zeroclaw doctor # Ejecuta verificaciones de salud del sistema
|
||||
zeroclaw version # Muestra versión e información de build
|
||||
```
|
||||
|
||||
Ver [Referencia de Comandos](docs/commands-reference.md) para opciones y ejemplos completos.
|
||||
|
||||
## Colaboración y Docs
|
||||
|
||||
Comienza con el hub de documentación para un mapa basado en tareas:
|
||||
|
||||
- Hub de Documentación: [`docs/README.md`](docs/README.md)
|
||||
- Tabla de Contenidos Unificada de Docs: [`docs/SUMMARY.md`](docs/SUMMARY.md)
|
||||
- Referencia de Comandos: [`docs/commands-reference.md`](docs/commands-reference.md)
|
||||
- Referencia de Configuración: [`docs/config-reference.md`](docs/config-reference.md)
|
||||
- Referencia de Proveedores: [`docs/providers-reference.md`](docs/providers-reference.md)
|
||||
- Referencia de Canales: [`docs/channels-reference.md`](docs/channels-reference.md)
|
||||
- Runbook de Operaciones: [`docs/operations-runbook.md`](docs/operations-runbook.md)
|
||||
- Solución de Problemas: [`docs/troubleshooting.md`](docs/troubleshooting.md)
|
||||
- Inventario/Clasificación de Docs: [`docs/docs-inventory.md`](docs/docs-inventory.md)
|
||||
- Snapshot de Triage de PR/Issue (al 18 de feb. de 2026): [`docs/project-triage-snapshot-2026-02-18.md`](docs/project-triage-snapshot-2026-02-18.md)
|
||||
|
||||
Referencias principales de colaboración:
|
||||
|
||||
- Hub de Documentación: [docs/README.md](docs/README.md)
|
||||
- Plantilla de Documentación: [docs/doc-template.md](docs/doc-template.md)
|
||||
- Checklist de Cambio de Documentación: [docs/README.md#4-documentation-change-checklist](docs/README.md#4-documentation-change-checklist)
|
||||
- Referencia de Configuración de Canales: [docs/channels-reference.md](docs/channels-reference.md)
|
||||
- Operaciones de Salas Cifradas Matrix: [docs/matrix-e2ee-guide.md](docs/matrix-e2ee-guide.md)
|
||||
- Guía de Contribución: [CONTRIBUTING.md](CONTRIBUTING.md)
|
||||
- Política de Flujo de Trabajo PR: [docs/pr-workflow.md](docs/pr-workflow.md)
|
||||
- Playbook del Revisor (triage + revisión profunda): [docs/reviewer-playbook.md](docs/reviewer-playbook.md)
|
||||
- Mapa de Propiedad y Triage CI: [docs/ci-map.md](docs/ci-map.md)
|
||||
- Política de Divulgación de Seguridad: [SECURITY.md](SECURITY.md)
|
||||
|
||||
Para despliegue y operaciones de runtime:
|
||||
|
||||
- Guía de Despliegue de Red: [docs/network-deployment.md](docs/network-deployment.md)
|
||||
- Playbook de Agent Proxy: [docs/proxy-agent-playbook.md](docs/proxy-agent-playbook.md)
|
||||
|
||||
## Apoyar a ZeroClaw
|
||||
|
||||
Si ZeroClaw ayuda a tu trabajo y deseas apoyar el desarrollo continuo, puedes donar aquí:
|
||||
|
||||
<a href="https://buymeacoffee.com/argenistherose"><img src="https://img.shields.io/badge/Buy%20Me%20a%20Coffee-Donate-yellow.svg?style=for-the-badge&logo=buy-me-a-coffee" alt="Cómprame un Café" /></a>
|
||||
|
||||
### 🙏 Agradecimientos Especiales
|
||||
|
||||
Un sincero agradecimiento a las comunidades e instituciones que inspiran y alimentan este trabajo de código abierto:
|
||||
|
||||
- **Harvard University** — por fomentar la curiosidad intelectual y empujar los límites de lo posible.
|
||||
- **MIT** — por defender el conocimiento abierto, el código abierto, y la convicción de que la tecnología debería ser accesible para todos.
|
||||
- **Sundai Club** — por la comunidad, la energía, y la voluntad incesante de construir cosas que importan.
|
||||
- **El Mundo y Más Allá** 🌍✨ — a cada contribuyente, soñador, y constructor allá afuera que hace del código abierto una fuerza para el bien. Esto es por ti.
|
||||
|
||||
Construimos en código abierto porque las mejores ideas vienen de todas partes. Si estás leyendo esto, eres parte de esto. Bienvenido. 🦀❤️
|
||||
|
||||
<!-- BEGIN:RECENT_CONTRIBUTORS -->
|
||||
|
||||
### 🌟 Recent Contributors (v0.3.1)
|
||||
|
||||
3 contributors shipped features, fixes, and improvements in this release cycle:
|
||||
|
||||
- **Argenis**
|
||||
- **argenis de la rosa**
|
||||
- **Claude Opus 4.6**
|
||||
|
||||
Thank you to everyone who opened issues, reviewed PRs, translated docs, and helped test. Every contribution matters. 🦀
|
||||
|
||||
<!-- END:RECENT_CONTRIBUTORS -->
|
||||
|
||||
## ⚠️ Repositorio Oficial y Advertencia de Suplantación
|
||||
|
||||
**Este es el único repositorio oficial de ZeroClaw:**
|
||||
|
||||
> <https://github.com/zeroclaw-labs/zeroclaw>
|
||||
|
||||
Cualquier otro repositorio, organización, dominio o paquete que afirme ser "ZeroClaw" o que implique afiliación con ZeroClaw Labs es **no autorizado y no está afiliado con este proyecto**. Los forks no autorizados conocidos serán listados en [TRADEMARK.md](TRADEMARK.md).
|
||||
|
||||
Si encuentras suplantación o uso indebido de marca, por favor [abre un issue](https://github.com/zeroclaw-labs/zeroclaw/issues).
|
||||
|
||||
---
|
||||
|
||||
## Licencia
|
||||
|
||||
ZeroClaw tiene doble licencia para máxima apertura y protección de contribuyentes:
|
||||
|
||||
| Licencia | Casos de Uso |
|
||||
| ---------------------------- | ------------------------------------------------------------ |
|
||||
| [MIT](LICENSE-MIT) | Código abierto, investigación, académico, uso personal |
|
||||
| [Apache 2.0](LICENSE-APACHE) | Protección de patentes, institucional, despliegue comercial |
|
||||
|
||||
Puedes elegir cualquiera de las dos licencias. **Los contribuyentes otorgan automáticamente derechos bajo ambas** — ver [CLA.md](CLA.md) para el acuerdo de contribuyente completo.
|
||||
|
||||
### Marca
|
||||
|
||||
El nombre **ZeroClaw** y el logo son marcas registradas de ZeroClaw Labs. Esta licencia no otorga permiso para usarlos para implicar aprobación o afiliación. Ver [TRADEMARK.md](TRADEMARK.md) para usos permitidos y prohibidos.
|
||||
|
||||
### Protecciones del Contribuyente
|
||||
|
||||
- **Mantienes los derechos de autor** de tus contribuciones
|
||||
- **Concesión de patentes** (Apache 2.0) te protege contra reclamos de patentes por otros contribuyentes
|
||||
- Tus contribuciones son **atribuidas permanentemente** en el historial de commits y [NOTICE](NOTICE)
|
||||
- No se transfieren derechos de marca al contribuir
|
||||
|
||||
## Contribuir
|
||||
|
||||
Ver [CONTRIBUTING.md](CONTRIBUTING.md) y [CLA.md](CLA.md). Implementa un trait, envía una PR:
|
||||
|
||||
- Guía de flujo de trabajo CI: [docs/ci-map.md](docs/ci-map.md)
|
||||
- Nuevo `Provider` → `src/providers/`
|
||||
- Nuevo `Channel` → `src/channels/`
|
||||
- Nuevo `Observer` → `src/observability/`
|
||||
- Nuevo `Tool` → `src/tools/`
|
||||
- Nueva `Memory` → `src/memory/`
|
||||
- Nuevo `Tunnel` → `src/tunnel/`
|
||||
- Nueva `Skill` → `~/.zeroclaw/workspace/skills/<n>/`
|
||||
|
||||
---
|
||||
|
||||
**ZeroClaw** — Cero sobrecarga. Cero compromiso. Despliega en cualquier lugar. Intercambia cualquier cosa. 🦀
|
||||
|
||||
## Historial de Estrellas
|
||||
|
||||
<p align="center">
|
||||
<a href="https://www.star-history.com/#zeroclaw-labs/zeroclaw&type=date&legend=top-left">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=zeroclaw-labs/zeroclaw&type=date&theme=dark&legend=top-left" />
|
||||
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=zeroclaw-labs/zeroclaw&type=date&legend=top-left" />
|
||||
<img alt="Gráfico de Historial de Estrellas" src="https://api.star-history.com/svg?repos=zeroclaw-labs/zeroclaw&type=date&legend=top-left" />
|
||||
</picture>
|
||||
</a>
|
||||
</p>
|
||||
+203
@@ -0,0 +1,203 @@
|
||||
<p align="center">
|
||||
<img src="zeroclaw.png" alt="ZeroClaw" width="200" />
|
||||
</p>
|
||||
|
||||
<h1 align="center">ZeroClaw 🦀</h1>
|
||||
|
||||
<p align="center">
|
||||
<strong>Noll overhead. Noll kompromissi. 100% Rust. 100% Agnostinen.</strong><br>
|
||||
⚡️ <strong>Ajaa $10 laitteistolla <5MB RAM:lla: Tämä on 99% vähemmän muistia kuin OpenClaw ja 98% halvempi kuin Mac mini!</strong>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="LICENSE-APACHE"><img src="https://img.shields.io/badge/license-MIT%20OR%20Apache%202.0-blue.svg" alt="License: MIT OR Apache-2.0" /></a>
|
||||
<a href="NOTICE"><img src="https://img.shields.io/badge/contributors-27+-green.svg" alt="Contributors" /></a>
|
||||
<a href="https://buymeacoffee.com/argenistherose"><img src="https://img.shields.io/badge/Buy%20Me%20a%20Coffee-Donate-yellow.svg?style=flat&logo=buy-me-a-coffee" alt="Buy Me a Coffee" /></a>
|
||||
<a href="https://x.com/zeroclawlabs?s=21"><img src="https://img.shields.io/badge/X-%40zeroclawlabs-000000?style=flat&logo=x&logoColor=white" alt="X: @zeroclawlabs" /></a>
|
||||
<a href="https://zeroclawlabs.cn/group.jpg"><img src="https://img.shields.io/badge/WeChat-Group-B7D7A8?logo=wechat&logoColor=white" alt="WeChat Group" /></a>
|
||||
<a href="https://www.xiaohongshu.com/user/profile/67cbfc43000000000d008307?xsec_token=AB73VnYnGNx5y36EtnnZfGmAmS-6Wzv8WMuGpfwfkg6Yc%3D&xsec_source=pc_search"><img src="https://img.shields.io/badge/Xiaohongshu-Official-FF2442?style=flat" alt="Xiaohongshu: Official" /></a>
|
||||
<a href="https://t.me/zeroclawlabs"><img src="https://img.shields.io/badge/Telegram-%40zeroclawlabs-26A5E4?style=flat&logo=telegram&logoColor=white" alt="Telegram: @zeroclawlabs" /></a>
|
||||
<a href="https://www.facebook.com/groups/zeroclaw"><img src="https://img.shields.io/badge/Facebook-Group-1877F2?style=flat&logo=facebook&logoColor=white" alt="Facebook Group" /></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
🌐 <strong>Kielet:</strong>
|
||||
<a href="README.md">🇺🇸 English</a> ·
|
||||
<a href="README.zh-CN.md">🇨🇳 简体中文</a> ·
|
||||
<a href="README.ja.md">🇯🇵 日本語</a> ·
|
||||
<a href="README.ko.md">🇰🇷 한국어</a> ·
|
||||
<a href="README.vi.md">🇻🇳 Tiếng Việt</a> ·
|
||||
<a href="README.tl.md">🇵🇭 Tagalog</a> ·
|
||||
<a href="README.es.md">🇪🇸 Español</a> ·
|
||||
<a href="README.pt.md">🇧🇷 Português</a> ·
|
||||
<a href="README.it.md">🇮🇹 Italiano</a> ·
|
||||
<a href="README.de.md">🇩🇪 Deutsch</a> ·
|
||||
<a href="README.fr.md">🇫🇷 Français</a> ·
|
||||
<a href="README.ar.md">🇸🇦 العربية</a> ·
|
||||
<a href="README.hi.md">🇮🇳 हिन्दी</a> ·
|
||||
<a href="README.ru.md">🇷🇺 Русский</a> ·
|
||||
<a href="README.bn.md">🇧🇩 বাংলা</a> ·
|
||||
<a href="README.he.md">🇮🇱 עברית</a> ·
|
||||
<a href="README.pl.md">🇵🇱 Polski</a> ·
|
||||
<a href="README.cs.md">🇨🇿 Čeština</a> ·
|
||||
<a href="README.nl.md">🇳🇱 Nederlands</a> ·
|
||||
<a href="README.tr.md">🇹🇷 Türkçe</a> ·
|
||||
<a href="README.uk.md">🇺🇦 Українська</a> ·
|
||||
<a href="README.id.md">🇮🇩 Bahasa Indonesia</a> ·
|
||||
<a href="README.th.md">🇹🇭 ไทย</a> ·
|
||||
<a href="README.ur.md">🇵🇰 اردو</a> ·
|
||||
<a href="README.ro.md">🇷🇴 Română</a> ·
|
||||
<a href="README.sv.md">🇸🇪 Svenska</a> ·
|
||||
<a href="README.el.md">🇬🇷 Ελληνικά</a> ·
|
||||
<a href="README.hu.md">🇭🇺 Magyar</a> ·
|
||||
<a href="README.fi.md">🇫🇮 Suomi</a> ·
|
||||
<a href="README.da.md">🇩🇰 Dansk</a> ·
|
||||
<a href="README.nb.md">🇳🇴 Norsk</a>
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
<!-- BEGIN:WHATS_NEW -->
|
||||
|
||||
### 🚀 What's New in v0.3.1 (March 2026)
|
||||
|
||||
| Area | Highlights |
|
||||
|---|---|
|
||||
| ci | add Termux (aarch64-linux-android) release target |
|
||||
|
||||
<!-- END:WHATS_NEW -->
|
||||
|
||||
## Mikä on ZeroClaw?
|
||||
|
||||
ZeroClaw on kevyt, muokattava ja laajennettava AI-assistentti-infrastruktuuri, joka on rakennettu Rustilla. Se yhdistää eri LLM-palveluntarjoajat (Anthropic, OpenAI, Google, Ollama jne.) yhtenäisen käyttöliittymän kautta ja tukee useita kanavia (Telegram, Matrix, CLI jne.).
|
||||
|
||||
### Keskeiset Ominaisuudet
|
||||
|
||||
- **🦀 Kirjoitettu Rustilla**: Korkea suorituskyky, muistiturvallisuus ja nollakustannus-abstraktiot
|
||||
- **🔌 Palveluntarjoaja-agnostinen**: Tukee OpenAI, Anthropic, Google Gemini, Ollama ja muita
|
||||
- **📱 Monikanavainen**: Telegram, Matrix (E2EE:llä), CLI ja muut
|
||||
- **🧠 Pluggaava muisti**: SQLite ja Markdown-backendit
|
||||
- **🛠️ Laajennettavat työkalut**: Lisää mukautettuja työkaluja helposti
|
||||
- **🔒 Turvallisuus edellä**: Käänteinen proxy, yksityisyys-edellä-suunnittelu
|
||||
|
||||
---
|
||||
|
||||
## Pika-aloitus
|
||||
|
||||
### Vaatimukset
|
||||
|
||||
- Rust 1.70+
|
||||
- LLM-palveluntarjoajan API-avain (Anthropic, OpenAI jne.)
|
||||
|
||||
### Asennus
|
||||
|
||||
```bash
|
||||
# Kloonaa repository
|
||||
git clone https://github.com/zeroclaw-labs/zeroclaw.git
|
||||
cd zeroclaw
|
||||
|
||||
# Rakenna
|
||||
cargo build --release
|
||||
|
||||
# Aja
|
||||
cargo run --release
|
||||
```
|
||||
|
||||
### Dockerilla
|
||||
|
||||
```bash
|
||||
docker run -d \
|
||||
--name zeroclaw \
|
||||
-e ANTHROPIC_API_KEY=your_key \
|
||||
-v zeroclaw-data:/app/data \
|
||||
zeroclaw/zeroclaw:latest
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Konfiguraatio
|
||||
|
||||
ZeroClaw käyttää YAML-konfiguraatiotiedostoa. Oletuksena se etsii `config.yaml`.
|
||||
|
||||
```yaml
|
||||
# Oletuspalveluntarjoaja
|
||||
provider: anthropic
|
||||
|
||||
# Palveluntarjoajien konfiguraatio
|
||||
providers:
|
||||
anthropic:
|
||||
api_key: ${ANTHROPIC_API_KEY}
|
||||
model: claude-3-5-sonnet-20241022
|
||||
openai:
|
||||
api_key: ${OPENAI_API_KEY}
|
||||
model: gpt-4o
|
||||
|
||||
# Muistin konfiguraatio
|
||||
memory:
|
||||
backend: sqlite
|
||||
path: data/memory.db
|
||||
|
||||
# Kanavien konfiguraatio
|
||||
channels:
|
||||
telegram:
|
||||
token: ${TELEGRAM_BOT_TOKEN}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Dokumentaatio
|
||||
|
||||
Yksityiskohtaista dokumentaatiota varten katso:
|
||||
|
||||
- [Dokumentaatiokeskus](docs/README.md)
|
||||
- [Komentojen Viite](docs/commands-reference.md)
|
||||
- [Palveluntarjoajien Viite](docs/providers-reference.md)
|
||||
- [Kanavien Viite](docs/channels-reference.md)
|
||||
- [Konfiguraation Viite](docs/config-reference.md)
|
||||
|
||||
---
|
||||
|
||||
## Osallistuminen
|
||||
|
||||
Osallistumiset ovat tervetulleita! Lue [Osallistumisopas](CONTRIBUTING.md).
|
||||
|
||||
---
|
||||
|
||||
## Lisenssi
|
||||
|
||||
Tämä projekti on kaksoislisensoitu:
|
||||
|
||||
- MIT License
|
||||
- Apache License, versio 2.0
|
||||
|
||||
Katso [LICENSE-APACHE](LICENSE-APACHE) ja [LICENSE-MIT](LICENSE-MIT) yksityiskohdille.
|
||||
|
||||
---
|
||||
|
||||
## Yhteisö
|
||||
|
||||
- [Telegram](https://t.me/zeroclawlabs)
|
||||
- [Facebook Group](https://www.facebook.com/groups/zeroclaw)
|
||||
- [WeChat Group](https://zeroclawlabs.cn/group.jpg)
|
||||
|
||||
---
|
||||
|
||||
## Sponsorit
|
||||
|
||||
Jos ZeroClaw on hyödyllinen sinulle, harkitse kahvin ostamista meille:
|
||||
|
||||
[](https://buymeacoffee.com/argenistherose)
|
||||
|
||||
<!-- BEGIN:RECENT_CONTRIBUTORS -->
|
||||
|
||||
### 🌟 Recent Contributors (v0.3.1)
|
||||
|
||||
3 contributors shipped features, fixes, and improvements in this release cycle:
|
||||
|
||||
- **Argenis**
|
||||
- **argenis de la rosa**
|
||||
- **Claude Opus 4.6**
|
||||
|
||||
Thank you to everyone who opened issues, reviewed PRs, translated docs, and helped test. Every contribution matters. 🦀
|
||||
|
||||
<!-- END:RECENT_CONTRIBUTORS -->
|
||||
+93
-478
@@ -1,5 +1,5 @@
|
||||
<p align="center">
|
||||
<img src="zeroclaw.png" alt="ZeroClaw" width="200" />
|
||||
<img src="docs/assets/zeroclaw.png" alt="ZeroClaw" width="200" />
|
||||
</p>
|
||||
|
||||
<h1 align="center">ZeroClaw 🦀</h1>
|
||||
@@ -14,9 +14,6 @@
|
||||
<a href="NOTICE"><img src="https://img.shields.io/badge/contributors-27+-green.svg" alt="Contributeurs" /></a>
|
||||
<a href="https://buymeacoffee.com/argenistherose"><img src="https://img.shields.io/badge/Buy%20Me%20a%20Coffee-Donate-yellow.svg?style=flat&logo=buy-me-a-coffee" alt="Offrez-moi un café" /></a>
|
||||
<a href="https://x.com/zeroclawlabs?s=21"><img src="https://img.shields.io/badge/X-%40zeroclawlabs-000000?style=flat&logo=x&logoColor=white" alt="X : @zeroclawlabs" /></a>
|
||||
<a href="https://zeroclawlabs.cn/group.jpg"><img src="https://img.shields.io/badge/WeChat-Group-B7D7A8?logo=wechat&logoColor=white" alt="WeChat Group" /></a>
|
||||
<a href="https://www.xiaohongshu.com/user/profile/67cbfc43000000000d008307?xsec_token=AB73VnYnGNx5y36EtnnZfGmAmS-6Wzv8WMuGpfwfkg6Yc%3D&xsec_source=pc_search"><img src="https://img.shields.io/badge/Xiaohongshu-Official-FF2442?style=flat" alt="Xiaohongshu : Officiel" /></a>
|
||||
<a href="https://t.me/zeroclawlabs"><img src="https://img.shields.io/badge/Telegram-%40zeroclawlabs-26A5E4?style=flat&logo=telegram&logoColor=white" alt="Telegram : @zeroclawlabs" /></a>
|
||||
<a href="https://www.facebook.com/groups/zeroclaw"><img src="https://img.shields.io/badge/Facebook-Group-1877F2?style=flat&logo=facebook&logoColor=white" alt="Facebook Group" /></a>
|
||||
<a href="https://www.reddit.com/r/zeroclawlabs/"><img src="https://img.shields.io/badge/Reddit-r%2Fzeroclawlabs-FF4500?style=flat&logo=reddit&logoColor=white" alt="Reddit : r/zeroclawlabs" /></a>
|
||||
</p>
|
||||
@@ -25,12 +22,43 @@ Construit par des étudiants et membres des communautés Harvard, MIT et Sundai.
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
🌐 <strong>Langues :</strong> <a href="README.md">English</a> · <a href="README.zh-CN.md">简体中文</a> · <a href="README.ja.md">日本語</a> · <a href="README.ru.md">Русский</a> · <a href="README.fr.md">Français</a> · <a href="README.vi.md">Tiếng Việt</a>
|
||||
🌐 <strong>Langues :</strong>
|
||||
<a href="README.md">🇺🇸 English</a> ·
|
||||
<a href="README.zh-CN.md">🇨🇳 简体中文</a> ·
|
||||
<a href="README.ja.md">🇯🇵 日本語</a> ·
|
||||
<a href="README.ko.md">🇰🇷 한국어</a> ·
|
||||
<a href="README.vi.md">🇻🇳 Tiếng Việt</a> ·
|
||||
<a href="README.tl.md">🇵🇭 Tagalog</a> ·
|
||||
<a href="README.es.md">🇪🇸 Español</a> ·
|
||||
<a href="README.pt.md">🇧🇷 Português</a> ·
|
||||
<a href="README.it.md">🇮🇹 Italiano</a> ·
|
||||
<a href="README.de.md">🇩🇪 Deutsch</a> ·
|
||||
<a href="README.fr.md">🇫🇷 Français</a> ·
|
||||
<a href="README.ar.md">🇸🇦 العربية</a> ·
|
||||
<a href="README.hi.md">🇮🇳 हिन्दी</a> ·
|
||||
<a href="README.ru.md">🇷🇺 Русский</a> ·
|
||||
<a href="README.bn.md">🇧🇩 বাংলা</a> ·
|
||||
<a href="README.he.md">🇮🇱 עברית</a> ·
|
||||
<a href="README.pl.md">🇵🇱 Polski</a> ·
|
||||
<a href="README.cs.md">🇨🇿 Čeština</a> ·
|
||||
<a href="README.nl.md">🇳🇱 Nederlands</a> ·
|
||||
<a href="README.tr.md">🇹🇷 Türkçe</a> ·
|
||||
<a href="README.uk.md">🇺🇦 Українська</a> ·
|
||||
<a href="README.id.md">🇮🇩 Bahasa Indonesia</a> ·
|
||||
<a href="README.th.md">🇹🇭 ไทย</a> ·
|
||||
<a href="README.ur.md">🇵🇰 اردو</a> ·
|
||||
<a href="README.ro.md">🇷🇴 Română</a> ·
|
||||
<a href="README.sv.md">🇸🇪 Svenska</a> ·
|
||||
<a href="README.el.md">🇬🇷 Ελληνικά</a> ·
|
||||
<a href="README.hu.md">🇭🇺 Magyar</a> ·
|
||||
<a href="README.fi.md">🇫🇮 Suomi</a> ·
|
||||
<a href="README.da.md">🇩🇰 Dansk</a> ·
|
||||
<a href="README.nb.md">🇳🇴 Norsk</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="#démarrage-rapide">Démarrage</a> |
|
||||
<a href="bootstrap.sh">Configuration en un clic</a> |
|
||||
<a href="https://raw.githubusercontent.com/zeroclaw-labs/zeroclaw/master/install.sh">Configuration en un clic</a> |
|
||||
<a href="docs/README.md">Hub Documentation</a> |
|
||||
<a href="docs/SUMMARY.md">Table des matières Documentation</a>
|
||||
</p>
|
||||
@@ -38,8 +66,8 @@ Construit par des étudiants et membres des communautés Harvard, MIT et Sundai.
|
||||
<p align="center">
|
||||
<strong>Accès rapides :</strong>
|
||||
<a href="docs/reference/README.md">Référence</a> ·
|
||||
<a href="docs/operations/README.md">Opérations</a> ·
|
||||
<a href="docs/troubleshooting.md">Dépannage</a> ·
|
||||
<a href="docs/ops/README.md">Opérations</a> ·
|
||||
<a href="docs/ops/troubleshooting.md">Dépannage</a> ·
|
||||
<a href="docs/security/README.md">Sécurité</a> ·
|
||||
<a href="docs/hardware/README.md">Matériel</a> ·
|
||||
<a href="docs/contributing/README.md">Contribuer</a>
|
||||
@@ -56,6 +84,16 @@ Construit par des étudiants et membres des communautés Harvard, MIT et Sundai.
|
||||
|
||||
<p align="center"><code>Architecture pilotée par traits · runtime sécurisé par défaut · fournisseur/canal/outil interchangeables · tout est pluggable</code></p>
|
||||
|
||||
<!-- BEGIN:WHATS_NEW -->
|
||||
|
||||
### 🚀 What's New in v0.3.1 (March 2026)
|
||||
|
||||
| Area | Highlights |
|
||||
|---|---|
|
||||
| ci | add Termux (aarch64-linux-android) release target |
|
||||
|
||||
<!-- END:WHATS_NEW -->
|
||||
|
||||
### 📢 Annonces
|
||||
|
||||
Utilisez ce tableau pour les avis importants (changements incompatibles, avis de sécurité, fenêtres de maintenance et bloqueurs de version).
|
||||
@@ -63,7 +101,7 @@ Utilisez ce tableau pour les avis importants (changements incompatibles, avis de
|
||||
| Date (UTC) | Niveau | Avis | Action |
|
||||
| ---------- | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| 2026-02-19 | _Critique_ | Nous ne sommes **pas affiliés** à `openagen/zeroclaw` ou `zeroclaw.org`. Le domaine `zeroclaw.org` pointe actuellement vers le fork `openagen/zeroclaw`, et ce domaine/dépôt usurpe l'identité de notre site web/projet officiel. | Ne faites pas confiance aux informations, binaires, levées de fonds ou annonces provenant de ces sources. Utilisez uniquement [ce dépôt](https://github.com/zeroclaw-labs/zeroclaw) et nos comptes sociaux vérifiés. |
|
||||
| 2026-02-21 | _Important_ | Notre site officiel est désormais en ligne : [zeroclawlabs.ai](https://zeroclawlabs.ai). Merci pour votre patience pendant cette attente. Nous constatons toujours des tentatives d'usurpation : ne participez à aucune activité d'investissement/financement au nom de ZeroClaw si elle n'est pas publiée via nos canaux officiels. | Utilisez [ce dépôt](https://github.com/zeroclaw-labs/zeroclaw) comme source unique de vérité. Suivez [X (@zeroclawlabs)](https://x.com/zeroclawlabs?s=21), [Telegram (@zeroclawlabs)](https://t.me/zeroclawlabs), [Facebook (groupe)](https://www.facebook.com/groups/zeroclaw), [Reddit (r/zeroclawlabs)](https://www.reddit.com/r/zeroclawlabs/), et [Xiaohongshu](https://www.xiaohongshu.com/user/profile/67cbfc43000000000d008307?xsec_token=AB73VnYnGNx5y36EtnnZfGmAmS-6Wzv8WMuGpfwfkg6Yc%3D&xsec_source=pc_search) pour les mises à jour officielles. |
|
||||
| 2026-02-21 | _Important_ | Notre site officiel est désormais en ligne : [zeroclawlabs.ai](https://zeroclawlabs.ai). Merci pour votre patience pendant cette attente. Nous constatons toujours des tentatives d'usurpation : ne participez à aucune activité d'investissement/financement au nom de ZeroClaw si elle n'est pas publiée via nos canaux officiels. | Utilisez [ce dépôt](https://github.com/zeroclaw-labs/zeroclaw) comme source unique de vérité. Suivez [X (@zeroclawlabs)](https://x.com/zeroclawlabs?s=21), [Facebook (groupe)](https://www.facebook.com/groups/zeroclaw), et [Reddit (r/zeroclawlabs)](https://www.reddit.com/r/zeroclawlabs/) pour les mises à jour officielles. |
|
||||
| 2026-02-19 | _Important_ | Anthropic a mis à jour les conditions d'utilisation de l'authentification et des identifiants le 2026-02-19. L'authentification OAuth (Free, Pro, Max) est exclusivement destinée à Claude Code et Claude.ai ; l'utilisation de tokens OAuth de Claude Free/Pro/Max dans tout autre produit, outil ou service (y compris Agent SDK) n'est pas autorisée et peut violer les Conditions d'utilisation grand public. | Veuillez temporairement éviter les intégrations OAuth de Claude Code pour prévenir toute perte potentielle. Clause originale : [Authentication and Credential Use](https://code.claude.com/docs/en/legal-and-compliance#authentication-and-credential-use). |
|
||||
|
||||
### ✨ Fonctionnalités
|
||||
@@ -95,7 +133,7 @@ Benchmark rapide sur machine locale (macOS arm64, fév. 2026) normalisé pour ma
|
||||
> Notes : Les résultats ZeroClaw sont mesurés sur des builds de production utilisant `/usr/bin/time -l`. OpenClaw nécessite le runtime Node.js (typiquement ~390 Mo de surcharge mémoire supplémentaire), tandis que NanoBot nécessite le runtime Python. PicoClaw et ZeroClaw sont des binaires statiques. Les chiffres RAM ci-dessus sont la mémoire runtime ; les exigences de compilation build-time sont plus élevées.
|
||||
|
||||
<p align="center">
|
||||
<img src="zero-claw.jpeg" alt="Comparaison ZeroClaw vs OpenClaw" width="800" />
|
||||
<img src="docs/assets/zeroclaw-comparison.jpeg" alt="Comparaison ZeroClaw vs OpenClaw" width="800" />
|
||||
</p>
|
||||
|
||||
### Mesure locale reproductible
|
||||
@@ -188,10 +226,10 @@ Exemple d'échantillon (macOS arm64, mesuré le 18 février 2026) :
|
||||
|
||||
### Option 1 : Configuration automatisée (recommandée)
|
||||
|
||||
Le script `bootstrap.sh` installe Rust, clone ZeroClaw, le compile, et configure votre environnement de développement initial :
|
||||
Le script `install.sh` installe Rust, clone ZeroClaw, le compile, et configure votre environnement de développement initial :
|
||||
|
||||
```bash
|
||||
curl -fsSL https://raw.githubusercontent.com/zeroclaw-labs/zeroclaw/main/bootstrap.sh | bash
|
||||
curl -fsSL https://raw.githubusercontent.com/zeroclaw-labs/zeroclaw/master/install.sh | bash
|
||||
```
|
||||
|
||||
Ceci va :
|
||||
@@ -247,9 +285,9 @@ Une fois installé (via bootstrap ou manuellement), vous devriez voir :
|
||||
**Prochaines étapes :**
|
||||
|
||||
1. Configurez vos fournisseurs d'IA dans `~/.zeroclaw/workspace/config.toml`
|
||||
2. Consultez la [référence de configuration](docs/config-reference.md) pour les options avancées
|
||||
2. Consultez la [référence de configuration](docs/reference/api/config-reference.md) pour les options avancées
|
||||
3. Lancez l'agent : `zeroclaw agent start`
|
||||
4. Testez via votre canal préféré (voir [référence des canaux](docs/channels-reference.md))
|
||||
4. Testez via votre canal préféré (voir [référence des canaux](docs/reference/api/channels-reference.md))
|
||||
|
||||
## Configuration
|
||||
|
||||
@@ -285,10 +323,10 @@ kind = "native" # ou "docker" (nécessite Docker)
|
||||
|
||||
**Documents de référence complets :**
|
||||
|
||||
- [Référence de Configuration](docs/config-reference.md) — tous les paramètres, validations, valeurs par défaut
|
||||
- [Référence des Fournisseurs](docs/providers-reference.md) — configurations spécifiques aux fournisseurs d'IA
|
||||
- [Référence des Canaux](docs/channels-reference.md) — Telegram, Matrix, Slack, Discord et plus
|
||||
- [Opérations](docs/operations-runbook.md) — surveillance en production, rotation des secrets, mise à l'échelle
|
||||
- [Référence de Configuration](docs/reference/api/config-reference.md) — tous les paramètres, validations, valeurs par défaut
|
||||
- [Référence des Fournisseurs](docs/reference/api/providers-reference.md) — configurations spécifiques aux fournisseurs d'IA
|
||||
- [Référence des Canaux](docs/reference/api/channels-reference.md) — Telegram, Matrix, Slack, Discord et plus
|
||||
- [Opérations](docs/ops/operations-runbook.md) — surveillance en production, rotation des secrets, mise à l'échelle
|
||||
|
||||
### Support Runtime (actuel)
|
||||
|
||||
@@ -297,7 +335,7 @@ ZeroClaw prend en charge deux backends d'exécution de code :
|
||||
- **`native`** (par défaut) — exécution de processus directe, chemin le plus rapide, idéal pour les environnements de confiance
|
||||
- **`docker`** — isolation complète du conteneur, politiques de sécurité renforcées, nécessite Docker
|
||||
|
||||
Utilisez `runtime.kind = "docker"` si vous avez besoin d'un sandboxing strict ou de l'isolation réseau. Voir [référence de configuration](docs/config-reference.md#runtime) pour les détails complets.
|
||||
Utilisez `runtime.kind = "docker"` si vous avez besoin d'un sandboxing strict ou de l'isolation réseau. Voir [référence de configuration](docs/reference/api/config-reference.md#runtime) pour les détails complets.
|
||||
|
||||
## Commandes
|
||||
|
||||
@@ -331,444 +369,7 @@ zeroclaw doctor # Exécute les vérifications de santé du système
|
||||
zeroclaw version # Affiche la version et les informations de build
|
||||
```
|
||||
|
||||
Voir [Référence des Commandes](docs/commands-reference.md) pour les options et exemples complets.
|
||||
|
||||
## Architecture
|
||||
|
||||
```
|
||||
┌─────────────────────────────────────────────────────────────────┐
|
||||
│ Canaux (trait) │
|
||||
│ Telegram │ Matrix │ Slack │ Discord │ Web │ CLI │ Custom │
|
||||
└─────────────────────────┬───────────────────────────────────────┘
|
||||
│
|
||||
▼
|
||||
┌─────────────────────────────────────────────────────────────────┐
|
||||
│ Orchestrateur Agent │
|
||||
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
|
||||
│ │ Routage │ │ Contexte │ │ Exécution │ │
|
||||
│ │ Message │ │ Mémoire │ │ Outil │ │
|
||||
│ └──────────────┘ └──────────────┘ └──────────────┘ │
|
||||
└─────────────────────────┬───────────────────────────────────────┘
|
||||
│
|
||||
┌───────────────┼───────────────┐
|
||||
▼ ▼ ▼
|
||||
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
|
||||
│ Fournisseurs │ │ Mémoire │ │ Outils │
|
||||
│ (trait) │ │ (trait) │ │ (trait) │
|
||||
├──────────────┤ ├──────────────┤ ├──────────────┤
|
||||
│ Anthropic │ │ Markdown │ │ Filesystem │
|
||||
│ OpenAI │ │ SQLite │ │ Bash │
|
||||
│ Gemini │ │ None │ │ Web Fetch │
|
||||
│ Ollama │ │ Custom │ │ Custom │
|
||||
│ Custom │ └──────────────┘ └──────────────┘
|
||||
└──────────────┘
|
||||
│
|
||||
▼
|
||||
┌─────────────────────────────────────────────────────────────────┐
|
||||
│ Runtime (trait) │
|
||||
│ Native │ Docker │
|
||||
└─────────────────────────────────────────────────────────────────┘
|
||||
```
|
||||
|
||||
**Principes clés :**
|
||||
|
||||
- Tout est un **trait** — fournisseurs, canaux, outils, mémoire, tunnels
|
||||
- Les canaux appellent l'orchestrateur ; l'orchestrateur appelle les fournisseurs + outils
|
||||
- Le système mémoire gère le contexte conversationnel (markdown, SQLite, ou aucun)
|
||||
- Le runtime abstrait l'exécution de code (natif ou Docker)
|
||||
- Aucun verrouillage de fournisseur — échangez Anthropic ↔ OpenAI ↔ Gemini ↔ Ollama sans changement de code
|
||||
|
||||
Voir [documentation architecture](docs/architecture.svg) pour les diagrammes détaillés et les détails d'implémentation.
|
||||
|
||||
## Exemples
|
||||
|
||||
### Telegram Bot
|
||||
|
||||
```toml
|
||||
[channels.telegram]
|
||||
enabled = true
|
||||
bot_token = "123456:ABC-DEF..."
|
||||
allowed_users = [987654321] # Votre Telegram user ID
|
||||
```
|
||||
|
||||
Démarrez le daemon + agent, puis envoyez un message à votre bot sur Telegram :
|
||||
|
||||
```
|
||||
/start
|
||||
Bonjour ! Pouvez-vous m'aider à écrire un script Python ?
|
||||
```
|
||||
|
||||
Le bot répond avec le code généré par l'IA, exécute les outils si demandé, et conserve le contexte de conversation.
|
||||
|
||||
### Matrix (chiffré de bout en bout)
|
||||
|
||||
```toml
|
||||
[channels.matrix]
|
||||
enabled = true
|
||||
homeserver_url = "https://matrix.org"
|
||||
username = "@zeroclaw:matrix.org"
|
||||
password = "..."
|
||||
device_name = "zeroclaw-prod"
|
||||
e2ee_enabled = true
|
||||
```
|
||||
|
||||
Invitez `@zeroclaw:matrix.org` dans une salle chiffrée, et le bot répondra avec le chiffrement complet. Voir [Guide Matrix E2EE](docs/matrix-e2ee-guide.md) pour la configuration de vérification de dispositif.
|
||||
|
||||
### Multi-Fournisseur
|
||||
|
||||
```toml
|
||||
[providers.anthropic]
|
||||
enabled = true
|
||||
api_key = "sk-ant-..."
|
||||
model = "claude-sonnet-4-20250514"
|
||||
|
||||
[providers.openai]
|
||||
enabled = true
|
||||
api_key = "sk-..."
|
||||
model = "gpt-4o"
|
||||
|
||||
[orchestrator]
|
||||
default_provider = "anthropic"
|
||||
fallback_providers = ["openai"] # Bascule en cas d'erreur du fournisseur
|
||||
```
|
||||
|
||||
Si Anthropic échoue ou rate-limit, l'orchestrateur bascule automatiquement vers OpenAI.
|
||||
|
||||
### Mémoire Personnalisée
|
||||
|
||||
```toml
|
||||
[memory]
|
||||
kind = "sqlite"
|
||||
path = "~/.zeroclaw/workspace/memory/conversations.db"
|
||||
retention_days = 90 # Purge automatique après 90 jours
|
||||
```
|
||||
|
||||
Ou utilisez Markdown pour un stockage lisible par l'humain :
|
||||
|
||||
```toml
|
||||
[memory]
|
||||
kind = "markdown"
|
||||
path = "~/.zeroclaw/workspace/memory/"
|
||||
```
|
||||
|
||||
Voir [Référence de Configuration](docs/config-reference.md#memory) pour toutes les options mémoire.
|
||||
|
||||
## Support de Fournisseur
|
||||
|
||||
| Fournisseur | Statut | Clé API | Modèles Exemple |
|
||||
| ----------------- | ----------- | ------------------- | ---------------------------------------------------- |
|
||||
| **Anthropic** | ✅ Stable | `ANTHROPIC_API_KEY` | `claude-sonnet-4-20250514`, `claude-opus-4-20250514` |
|
||||
| **OpenAI** | ✅ Stable | `OPENAI_API_KEY` | `gpt-4o`, `gpt-4o-mini`, `o1`, `o1-mini` |
|
||||
| **Google Gemini** | ✅ Stable | `GOOGLE_API_KEY` | `gemini-2.0-flash-exp`, `gemini-exp-1206` |
|
||||
| **Ollama** | ✅ Stable | N/A (local) | `llama3.3`, `qwen2.5`, `phi4` |
|
||||
| **Cerebras** | ✅ Stable | `CEREBRAS_API_KEY` | `llama-3.3-70b` |
|
||||
| **Groq** | ✅ Stable | `GROQ_API_KEY` | `llama-3.3-70b-versatile` |
|
||||
| **Mistral** | 🚧 Planifié | `MISTRAL_API_KEY` | TBD |
|
||||
| **Cohere** | 🚧 Planifié | `COHERE_API_KEY` | TBD |
|
||||
|
||||
### Endpoints Personnalisés
|
||||
|
||||
ZeroClaw prend en charge les endpoints compatibles OpenAI :
|
||||
|
||||
```toml
|
||||
[providers.custom]
|
||||
enabled = true
|
||||
api_key = "..."
|
||||
base_url = "https://api.your-llm-provider.com/v1"
|
||||
model = "your-model-name"
|
||||
```
|
||||
|
||||
Exemple : utilisez [LiteLLM](https://github.com/BerriAI/litellm) comme proxy pour accéder à n'importe quel LLM via l'interface OpenAI.
|
||||
|
||||
Voir [Référence des Fournisseurs](docs/providers-reference.md) pour les détails de configuration complets.
|
||||
|
||||
## Support de Canal
|
||||
|
||||
| Canal | Statut | Authentification | Notes |
|
||||
| ------------ | ----------- | ------------------------ | --------------------------------------------------------- |
|
||||
| **Telegram** | ✅ Stable | Bot Token | Support complet incluant fichiers, images, boutons inline |
|
||||
| **Matrix** | ✅ Stable | Mot de passe ou Token | Support E2EE avec vérification de dispositif |
|
||||
| **Slack** | 🚧 Planifié | OAuth ou Bot Token | Accès workspace requis |
|
||||
| **Discord** | 🚧 Planifié | Bot Token | Permissions guild requises |
|
||||
| **WhatsApp** | 🚧 Planifié | Twilio ou API officielle | Compte business requis |
|
||||
| **CLI** | ✅ Stable | Aucun | Interface conversationnelle directe |
|
||||
| **Web** | 🚧 Planifié | Clé API ou OAuth | Interface de chat basée navigateur |
|
||||
|
||||
Voir [Référence des Canaux](docs/channels-reference.md) pour les instructions de configuration complètes.
|
||||
|
||||
## Support d'Outil
|
||||
|
||||
ZeroClaw fournit des outils intégrés pour l'exécution de code, l'accès au système de fichiers et la récupération web :
|
||||
|
||||
| Outil | Description | Runtime Requis |
|
||||
| -------------------- | --------------------------- | ----------------------------- |
|
||||
| **bash** | Exécute des commandes shell | Native ou Docker |
|
||||
| **python** | Exécute des scripts Python | Python 3.8+ (natif) ou Docker |
|
||||
| **javascript** | Exécute du code Node.js | Node.js 18+ (natif) ou Docker |
|
||||
| **filesystem_read** | Lit des fichiers | Native ou Docker |
|
||||
| **filesystem_write** | Écrit des fichiers | Native ou Docker |
|
||||
| **web_fetch** | Récupère du contenu web | Native ou Docker |
|
||||
|
||||
### Sécurité de l'Exécution
|
||||
|
||||
- **Runtime Natif** — s'exécute en tant que processus utilisateur du daemon, accès complet au système de fichiers
|
||||
- **Runtime Docker** — isolation complète du conteneur, systèmes de fichiers et réseaux séparés
|
||||
|
||||
Configurez la politique d'exécution dans `config.toml` :
|
||||
|
||||
```toml
|
||||
[runtime]
|
||||
kind = "docker"
|
||||
allowed_tools = ["bash", "python", "filesystem_read"] # Liste d'autorisation explicite
|
||||
```
|
||||
|
||||
Voir [Référence de Configuration](docs/config-reference.md#runtime) pour les options de sécurité complètes.
|
||||
|
||||
## Déploiement
|
||||
|
||||
### Déploiement Local (Développement)
|
||||
|
||||
```bash
|
||||
zeroclaw daemon start
|
||||
zeroclaw agent start
|
||||
```
|
||||
|
||||
### Déploiement Serveur (Production)
|
||||
|
||||
Utilisez systemd pour gérer le daemon et l'agent en tant que services :
|
||||
|
||||
```bash
|
||||
# Installez le binaire
|
||||
cargo install --path . --locked
|
||||
|
||||
# Configurez le workspace
|
||||
zeroclaw init
|
||||
|
||||
# Créez les fichiers de service systemd
|
||||
sudo cp deployment/systemd/zeroclaw-daemon.service /etc/systemd/system/
|
||||
sudo cp deployment/systemd/zeroclaw-agent.service /etc/systemd/system/
|
||||
|
||||
# Activez et démarrez les services
|
||||
sudo systemctl enable zeroclaw-daemon zeroclaw-agent
|
||||
sudo systemctl start zeroclaw-daemon zeroclaw-agent
|
||||
|
||||
# Vérifiez le statut
|
||||
sudo systemctl status zeroclaw-daemon
|
||||
sudo systemctl status zeroclaw-agent
|
||||
```
|
||||
|
||||
Voir [Guide de Déploiement Réseau](docs/network-deployment.md) pour les instructions de déploiement en production complètes.
|
||||
|
||||
### Docker
|
||||
|
||||
```bash
|
||||
# Compilez l'image
|
||||
docker build -t zeroclaw:latest .
|
||||
|
||||
# Exécutez le conteneur
|
||||
docker run -d \
|
||||
--name zeroclaw \
|
||||
-v ~/.zeroclaw/workspace:/workspace \
|
||||
-e ANTHROPIC_API_KEY=sk-ant-... \
|
||||
zeroclaw:latest
|
||||
```
|
||||
|
||||
Voir [`Dockerfile`](Dockerfile) pour les détails de construction et les options de configuration.
|
||||
|
||||
### Matériel Edge
|
||||
|
||||
ZeroClaw est conçu pour fonctionner sur du matériel à faible consommation d'énergie :
|
||||
|
||||
- **Raspberry Pi Zero 2 W** — ~512 Mo RAM, cœur ARMv8 simple, <5$ coût matériel
|
||||
- **Raspberry Pi 4/5** — 1 Go+ RAM, multi-cœur, idéal pour les charges de travail concurrentes
|
||||
- **Orange Pi Zero 2** — ~512 Mo RAM, quad-core ARMv8, coût ultra-faible
|
||||
- **SBCs x86 (Intel N100)** — 4-8 Go RAM, builds rapides, support Docker natif
|
||||
|
||||
Voir [Guide du Matériel](docs/hardware/README.md) pour les instructions de configuration spécifiques aux dispositifs.
|
||||
|
||||
## Tunneling (Exposition Publique)
|
||||
|
||||
Exposez votre daemon ZeroClaw local au réseau public via des tunnels sécurisés :
|
||||
|
||||
```bash
|
||||
zeroclaw tunnel start --provider cloudflare
|
||||
```
|
||||
|
||||
Fournisseurs de tunnel supportés :
|
||||
|
||||
- **Cloudflare Tunnel** — HTTPS gratuit, aucune exposition de port, support multi-domaine
|
||||
- **Ngrok** — configuration rapide, domaines personnalisés (plan payant)
|
||||
- **Tailscale** — réseau maillé privé, pas de port public
|
||||
|
||||
Voir [Référence de Configuration](docs/config-reference.md#tunnel) pour les options de configuration complètes.
|
||||
|
||||
## Sécurité
|
||||
|
||||
ZeroClaw implémente plusieurs couches de sécurité :
|
||||
|
||||
### Pairing
|
||||
|
||||
Le daemon génère un secret de pairing au premier lancement stocké dans `~/.zeroclaw/workspace/.pairing`. Les clients (agent, CLI) doivent présenter ce secret pour se connecter.
|
||||
|
||||
```bash
|
||||
zeroclaw pairing rotate # Génère un nouveau secret et invalide l'ancien
|
||||
```
|
||||
|
||||
### Sandboxing
|
||||
|
||||
- **Runtime Docker** — isolation complète du conteneur avec systèmes de fichiers et réseaux séparés
|
||||
- **Runtime Natif** — exécute en tant que processus utilisateur, scoped au workspace par défaut
|
||||
|
||||
### Listes d'Autorisation
|
||||
|
||||
Les canaux peuvent restreindre l'accès par ID utilisateur :
|
||||
|
||||
```toml
|
||||
[channels.telegram]
|
||||
enabled = true
|
||||
allowed_users = [123456789, 987654321] # Liste d'autorisation explicite
|
||||
```
|
||||
|
||||
### Chiffrement
|
||||
|
||||
- **Matrix E2EE** — chiffrement de bout en bout complet avec vérification de dispositif
|
||||
- **Transport TLS** — tout le trafic API et tunnel utilise HTTPS/TLS
|
||||
|
||||
Voir [Documentation Sécurité](docs/security/README.md) pour les politiques et pratiques complètes.
|
||||
|
||||
## Observabilité
|
||||
|
||||
ZeroClaw journalise vers `~/.zeroclaw/workspace/logs/` par défaut. Les journaux sont stockés par composant :
|
||||
|
||||
```
|
||||
~/.zeroclaw/workspace/logs/
|
||||
├── daemon.log # Journaux du daemon (startup, requêtes API, erreurs)
|
||||
├── agent.log # Journaux de l'agent (routage message, exécution outil)
|
||||
├── telegram.log # Journaux spécifiques au canal (si activé)
|
||||
└── matrix.log # Journaux spécifiques au canal (si activé)
|
||||
```
|
||||
|
||||
### Configuration de Journalisation
|
||||
|
||||
```toml
|
||||
[logging]
|
||||
level = "info" # debug, info, warn, error
|
||||
path = "~/.zeroclaw/workspace/logs/"
|
||||
rotation = "daily" # daily, hourly, size
|
||||
max_size_mb = 100 # Pour rotation basée sur la taille
|
||||
retention_days = 30 # Purge automatique après N jours
|
||||
```
|
||||
|
||||
Voir [Référence de Configuration](docs/config-reference.md#logging) pour toutes les options de journalisation.
|
||||
|
||||
### Métriques (Planifié)
|
||||
|
||||
Support de métriques Prometheus pour la surveillance en production à venir. Suivi dans [#234](https://github.com/zeroclaw-labs/zeroclaw/issues/234).
|
||||
|
||||
## Compétences (Skills)
|
||||
|
||||
ZeroClaw prend en charge les compétences personnalisées — des modules réutilisables qui étendent les capacités du système.
|
||||
|
||||
### Définition de Compétence
|
||||
|
||||
Les compétences sont stockées dans `~/.zeroclaw/workspace/skills/<nom-compétence>/` avec cette structure :
|
||||
|
||||
```
|
||||
skills/
|
||||
└── ma-compétence/
|
||||
├── skill.toml # Métadonnées de compétence (nom, description, dépendances)
|
||||
├── prompt.md # Prompt système pour l'IA
|
||||
└── tools/ # Outils personnalisés optionnels
|
||||
└── mon_outil.py
|
||||
```
|
||||
|
||||
### Exemple de Compétence
|
||||
|
||||
```toml
|
||||
# skills/recherche-web/skill.toml
|
||||
[skill]
|
||||
name = "recherche-web"
|
||||
description = "Recherche sur le web et résume les résultats"
|
||||
version = "1.0.0"
|
||||
|
||||
[dependencies]
|
||||
tools = ["web_fetch", "bash"]
|
||||
```
|
||||
|
||||
```markdown
|
||||
<!-- skills/recherche-web/prompt.md -->
|
||||
|
||||
Tu es un assistant de recherche. Lorsqu'on te demande de rechercher quelque chose :
|
||||
|
||||
1. Utilise web_fetch pour récupérer le contenu
|
||||
2. Résume les résultats dans un format facile à lire
|
||||
3. Cite les sources avec des URLs
|
||||
```
|
||||
|
||||
### Utilisation de Compétences
|
||||
|
||||
Les compétences sont chargées automatiquement au démarrage de l'agent. Référencez-les par nom dans les conversations :
|
||||
|
||||
```
|
||||
Utilisateur : Utilise la compétence recherche-web pour trouver les dernières actualités IA
|
||||
Bot : [charge la compétence recherche-web, exécute web_fetch, résume les résultats]
|
||||
```
|
||||
|
||||
Voir la section [Compétences (Skills)](#compétences-skills) pour les instructions de création de compétences complètes.
|
||||
|
||||
## Open Skills
|
||||
|
||||
ZeroClaw prend en charge les [Open Skills](https://github.com/openagents-com/open-skills) — un système modulaire et agnostique des fournisseurs pour étendre les capacités des agents IA.
|
||||
|
||||
### Activer Open Skills
|
||||
|
||||
```toml
|
||||
[skills]
|
||||
open_skills_enabled = true
|
||||
# open_skills_dir = "/path/to/open-skills" # optionnel
|
||||
```
|
||||
|
||||
Vous pouvez également surcharger au runtime avec `ZEROCLAW_OPEN_SKILLS_ENABLED` et `ZEROCLAW_OPEN_SKILLS_DIR`.
|
||||
|
||||
## Développement
|
||||
|
||||
```bash
|
||||
cargo build # Build de développement
|
||||
cargo build --release # Build release (codegen-units=1, fonctionne sur tous les dispositifs incluant Raspberry Pi)
|
||||
cargo build --profile release-fast # Build plus rapide (codegen-units=8, nécessite 16 Go+ RAM)
|
||||
cargo test # Exécute la suite de tests complète
|
||||
cargo clippy --locked --all-targets -- -D clippy::correctness
|
||||
cargo fmt # Format
|
||||
|
||||
# Exécute le benchmark de comparaison SQLite vs Markdown
|
||||
cargo test --test memory_comparison -- --nocapture
|
||||
```
|
||||
|
||||
### Hook pre-push
|
||||
|
||||
Un hook git exécute `cargo fmt --check`, `cargo clippy -- -D warnings`, et `cargo test` avant chaque push. Activez-le une fois :
|
||||
|
||||
```bash
|
||||
git config core.hooksPath .githooks
|
||||
```
|
||||
|
||||
### Dépannage de Build (erreurs OpenSSL sur Linux)
|
||||
|
||||
Si vous rencontrez une erreur de build `openssl-sys`, synchronisez les dépendances et recompilez avec le lockfile du dépôt :
|
||||
|
||||
```bash
|
||||
git pull
|
||||
cargo build --release --locked
|
||||
cargo install --path . --force --locked
|
||||
```
|
||||
|
||||
ZeroClaw est configuré pour utiliser `rustls` pour les dépendances HTTP/TLS ; `--locked` maintient le graphe transitif déterministe sur les environnements vierges.
|
||||
|
||||
Pour sauter le hook lorsque vous avez besoin d'un push rapide pendant le développement :
|
||||
|
||||
```bash
|
||||
git push --no-verify
|
||||
```
|
||||
Voir [Référence des Commandes](docs/reference/cli/commands-reference.md) pour les options et exemples complets.
|
||||
|
||||
## Collaboration & Docs
|
||||
|
||||
@@ -776,32 +377,32 @@ Commencez par le hub de documentation pour une carte basée sur les tâches :
|
||||
|
||||
- Hub de documentation : [`docs/README.md`](docs/README.md)
|
||||
- Table des matières unifiée docs : [`docs/SUMMARY.md`](docs/SUMMARY.md)
|
||||
- Référence des commandes : [`docs/commands-reference.md`](docs/commands-reference.md)
|
||||
- Référence de configuration : [`docs/config-reference.md`](docs/config-reference.md)
|
||||
- Référence des fournisseurs : [`docs/providers-reference.md`](docs/providers-reference.md)
|
||||
- Référence des canaux : [`docs/channels-reference.md`](docs/channels-reference.md)
|
||||
- Runbook des opérations : [`docs/operations-runbook.md`](docs/operations-runbook.md)
|
||||
- Dépannage : [`docs/troubleshooting.md`](docs/troubleshooting.md)
|
||||
- Inventaire/classification docs : [`docs/docs-inventory.md`](docs/docs-inventory.md)
|
||||
- Instantané triage PR/Issue (au 18 février 2026) : [`docs/project-triage-snapshot-2026-02-18.md`](docs/project-triage-snapshot-2026-02-18.md)
|
||||
- Référence des commandes : [`docs/reference/cli/commands-reference.md`](docs/reference/cli/commands-reference.md)
|
||||
- Référence de configuration : [`docs/reference/api/config-reference.md`](docs/reference/api/config-reference.md)
|
||||
- Référence des fournisseurs : [`docs/reference/api/providers-reference.md`](docs/reference/api/providers-reference.md)
|
||||
- Référence des canaux : [`docs/reference/api/channels-reference.md`](docs/reference/api/channels-reference.md)
|
||||
- Runbook des opérations : [`docs/ops/operations-runbook.md`](docs/ops/operations-runbook.md)
|
||||
- Dépannage : [`docs/ops/troubleshooting.md`](docs/ops/troubleshooting.md)
|
||||
- Inventaire/classification docs : [`docs/maintainers/docs-inventory.md`](docs/maintainers/docs-inventory.md)
|
||||
- Instantané triage PR/Issue (au 18 février 2026) : [`docs/maintainers/project-triage-snapshot-2026-02-18.md`](docs/maintainers/project-triage-snapshot-2026-02-18.md)
|
||||
|
||||
Références de collaboration principales :
|
||||
|
||||
- Hub de documentation : [docs/README.md](docs/README.md)
|
||||
- Modèle de documentation : [docs/doc-template.md](docs/doc-template.md)
|
||||
- Modèle de documentation : [docs/contributing/doc-template.md](docs/contributing/doc-template.md)
|
||||
- Checklist de modification de documentation : [docs/README.md#4-documentation-change-checklist](docs/README.md#4-documentation-change-checklist)
|
||||
- Référence de configuration des canaux : [docs/channels-reference.md](docs/channels-reference.md)
|
||||
- Opérations de salles chiffrées Matrix : [docs/matrix-e2ee-guide.md](docs/matrix-e2ee-guide.md)
|
||||
- Référence de configuration des canaux : [docs/reference/api/channels-reference.md](docs/reference/api/channels-reference.md)
|
||||
- Opérations de salles chiffrées Matrix : [docs/security/matrix-e2ee-guide.md](docs/security/matrix-e2ee-guide.md)
|
||||
- Guide de contribution : [CONTRIBUTING.md](CONTRIBUTING.md)
|
||||
- Politique de workflow PR : [docs/pr-workflow.md](docs/pr-workflow.md)
|
||||
- Playbook du relecteur (triage + revue approfondie) : [docs/reviewer-playbook.md](docs/reviewer-playbook.md)
|
||||
- Carte de propriété et triage CI : [docs/ci-map.md](docs/ci-map.md)
|
||||
- Politique de workflow PR : [docs/contributing/pr-workflow.md](docs/contributing/pr-workflow.md)
|
||||
- Playbook du relecteur (triage + revue approfondie) : [docs/contributing/reviewer-playbook.md](docs/contributing/reviewer-playbook.md)
|
||||
- Carte de propriété et triage CI : [docs/contributing/ci-map.md](docs/contributing/ci-map.md)
|
||||
- Politique de divulgation de sécurité : [SECURITY.md](SECURITY.md)
|
||||
|
||||
Pour le déploiement et les opérations runtime :
|
||||
|
||||
- Guide de déploiement réseau : [docs/network-deployment.md](docs/network-deployment.md)
|
||||
- Playbook d'agent proxy : [docs/proxy-agent-playbook.md](docs/proxy-agent-playbook.md)
|
||||
- Guide de déploiement réseau : [docs/ops/network-deployment.md](docs/ops/network-deployment.md)
|
||||
- Playbook d'agent proxy : [docs/ops/proxy-agent-playbook.md](docs/ops/proxy-agent-playbook.md)
|
||||
|
||||
## Soutenir ZeroClaw
|
||||
|
||||
@@ -820,13 +421,27 @@ Un remerciement sincère aux communautés et institutions qui inspirent et alime
|
||||
|
||||
Nous construisons en open source parce que les meilleures idées viennent de partout. Si vous lisez ceci, vous en faites partie. Bienvenue. 🦀❤️
|
||||
|
||||
<!-- BEGIN:RECENT_CONTRIBUTORS -->
|
||||
|
||||
### 🌟 Recent Contributors (v0.3.1)
|
||||
|
||||
3 contributors shipped features, fixes, and improvements in this release cycle:
|
||||
|
||||
- **Argenis**
|
||||
- **argenis de la rosa**
|
||||
- **Claude Opus 4.6**
|
||||
|
||||
Thank you to everyone who opened issues, reviewed PRs, translated docs, and helped test. Every contribution matters. 🦀
|
||||
|
||||
<!-- END:RECENT_CONTRIBUTORS -->
|
||||
|
||||
## ⚠️ Dépôt Officiel & Avertissement d'Usurpation d'Identité
|
||||
|
||||
**Ceci est le seul dépôt officiel ZeroClaw :**
|
||||
|
||||
> <https://github.com/zeroclaw-labs/zeroclaw>
|
||||
|
||||
Tout autre dépôt, organisation, domaine ou package prétendant être "ZeroClaw" ou impliquant une affiliation avec ZeroClaw Labs est **non autorisé et non affilié à ce projet**. Les forks non autorisés connus seront listés dans [TRADEMARK.md](TRADEMARK.md).
|
||||
Tout autre dépôt, organisation, domaine ou package prétendant être "ZeroClaw" ou impliquant une affiliation avec ZeroClaw Labs est **non autorisé et non affilié à ce projet**. Les forks non autorisés connus seront listés dans [TRADEMARK.md](docs/maintainers/trademark.md).
|
||||
|
||||
Si vous rencontrez une usurpation d'identité ou une utilisation abusive de marque, veuillez [ouvrir une issue](https://github.com/zeroclaw-labs/zeroclaw/issues).
|
||||
|
||||
@@ -841,11 +456,11 @@ ZeroClaw est sous double licence pour une ouverture maximale et la protection de
|
||||
| [MIT](LICENSE-MIT) | Open-source, recherche, académique, usage personnel |
|
||||
| [Apache 2.0](LICENSE-APACHE) | Protection de brevet, institutionnel, déploiement commercial |
|
||||
|
||||
Vous pouvez choisir l'une ou l'autre licence. **Les contributeurs accordent automatiquement des droits sous les deux** — voir [CLA.md](CLA.md) pour l'accord de contributeur complet.
|
||||
Vous pouvez choisir l'une ou l'autre licence. **Les contributeurs accordent automatiquement des droits sous les deux** — voir [CLA.md](docs/contributing/cla.md) pour l'accord de contributeur complet.
|
||||
|
||||
### Marque
|
||||
|
||||
Le nom **ZeroClaw** et le logo sont des marques déposées de ZeroClaw Labs. Cette licence n'accorde pas la permission de les utiliser pour impliquer une approbation ou une affiliation. Voir [TRADEMARK.md](TRADEMARK.md) pour les utilisations permises et interdites.
|
||||
Le nom **ZeroClaw** et le logo sont des marques déposées de ZeroClaw Labs. Cette licence n'accorde pas la permission de les utiliser pour impliquer une approbation ou une affiliation. Voir [TRADEMARK.md](docs/maintainers/trademark.md) pour les utilisations permises et interdites.
|
||||
|
||||
### Protections des Contributeurs
|
||||
|
||||
@@ -856,9 +471,9 @@ Le nom **ZeroClaw** et le logo sont des marques déposées de ZeroClaw Labs. Cet
|
||||
|
||||
## Contribuer
|
||||
|
||||
Voir [CONTRIBUTING.md](CONTRIBUTING.md) et [CLA.md](CLA.md). Implémentez un trait, soumettez une PR :
|
||||
Voir [CONTRIBUTING.md](CONTRIBUTING.md) et [CLA.md](docs/contributing/cla.md). Implémentez un trait, soumettez une PR :
|
||||
|
||||
- Guide de workflow CI : [docs/ci-map.md](docs/ci-map.md)
|
||||
- Guide de workflow CI : [docs/contributing/ci-map.md](docs/contributing/ci-map.md)
|
||||
- Nouveau `Provider` → `src/providers/`
|
||||
- Nouveau `Channel` → `src/channels/`
|
||||
- Nouveau `Observer` → `src/observability/`
|
||||
|
||||
+221
@@ -0,0 +1,221 @@
|
||||
<p align="center">
|
||||
<img src="zeroclaw.png" alt="ZeroClaw" width="200" />
|
||||
</p>
|
||||
|
||||
<h1 align="center">ZeroClaw 🦀</h1>
|
||||
|
||||
<p align="center" dir="rtl">
|
||||
<strong>תקורת אפס. אין פשרות. 100% Rust. 100% אגנוסטי.</strong><br>
|
||||
⚡️ <strong>פועל על חומרה ב-$10 עם <5MB זיכרון: זה 99% פחות זיכרון מ-OpenClaw ו-98% זול יותר מ-Mac mini!</strong>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="LICENSE-APACHE"><img src="https://img.shields.io/badge/license-MIT%20OR%20Apache%202.0-blue.svg" alt="License: MIT OR Apache-2.0" /></a>
|
||||
<a href="NOTICE"><img src="https://img.shields.io/badge/contributors-27+-green.svg" alt="Contributors" /></a>
|
||||
<a href="https://buymeacoffee.com/argenistherose"><img src="https://img.shields.io/badge/Buy%20Me%20a%20Coffee-Donate-yellow.svg?style=flat&logo=buy-me-a-coffee" alt="Buy Me a Coffee" /></a>
|
||||
<a href="https://x.com/zeroclawlabs?s=21"><img src="https://img.shields.io/badge/X-%40zeroclawlabs-000000?style=flat&logo=x&logoColor=white" alt="X: @zeroclawlabs" /></a>
|
||||
<a href="https://zeroclawlabs.cn/group.jpg"><img src="https://img.shields.io/badge/WeChat-Group-B7D7A8?logo=wechat&logoColor=white" alt="WeChat Group" /></a>
|
||||
<a href="https://www.xiaohongshu.com/user/profile/67cbfc43000000000d008307?xsec_token=AB73VnYnGNx5y36EtnnZfGmAmS-6Wzv8WMuGpfwfkg6Yc%3D&xsec_source=pc_search"><img src="https://img.shields.io/badge/Xiaohongshu-Official-FF2442?style=flat" alt="Xiaohongshu: Official" /></a>
|
||||
<a href="https://t.me/zeroclawlabs"><img src="https://img.shields.io/badge/Telegram-%40zeroclawlabs-26A5E4?style=flat&logo=telegram&logoColor=white" alt="Telegram: @zeroclawlabs" /></a>
|
||||
<a href="https://www.facebook.com/groups/zeroclaw"><img src="https://img.shields.io/badge/Facebook-Group-1877F2?style=flat&logo=facebook&logoColor=white" alt="Facebook Group" /></a>
|
||||
</p>
|
||||
|
||||
<p align="center" dir="rtl">
|
||||
🌐 <strong>שפות:</strong>
|
||||
<a href="README.md">🇺🇸 English</a> ·
|
||||
<a href="README.zh-CN.md">🇨🇳 简体中文</a> ·
|
||||
<a href="README.ja.md">🇯🇵 日本語</a> ·
|
||||
<a href="README.ko.md">🇰🇷 한국어</a> ·
|
||||
<a href="README.vi.md">🇻🇳 Tiếng Việt</a> ·
|
||||
<a href="README.tl.md">🇵🇭 Tagalog</a> ·
|
||||
<a href="README.es.md">🇪🇸 Español</a> ·
|
||||
<a href="README.pt.md">🇧🇷 Português</a> ·
|
||||
<a href="README.it.md">🇮🇹 Italiano</a> ·
|
||||
<a href="README.de.md">🇩🇪 Deutsch</a> ·
|
||||
<a href="README.fr.md">🇫🇷 Français</a> ·
|
||||
<a href="README.ar.md">🇸🇦 العربية</a> ·
|
||||
<a href="README.hi.md">🇮🇳 हिन्दी</a> ·
|
||||
<a href="README.ru.md">🇷🇺 Русский</a> ·
|
||||
<a href="README.bn.md">🇧🇩 বাংলা</a> ·
|
||||
<a href="README.he.md">🇮🇱 עברית</a> ·
|
||||
<a href="README.pl.md">🇵🇱 Polski</a> ·
|
||||
<a href="README.cs.md">🇨🇿 Čeština</a> ·
|
||||
<a href="README.nl.md">🇳🇱 Nederlands</a> ·
|
||||
<a href="README.tr.md">🇹🇷 Türkçe</a> ·
|
||||
<a href="README.uk.md">🇺🇦 Українська</a> ·
|
||||
<a href="README.id.md">🇮🇩 Bahasa Indonesia</a> ·
|
||||
<a href="README.th.md">🇹🇭 ไทย</a> ·
|
||||
<a href="README.ur.md">🇵🇰 اردو</a> ·
|
||||
<a href="README.ro.md">🇷🇴 Română</a> ·
|
||||
<a href="README.sv.md">🇸🇪 Svenska</a> ·
|
||||
<a href="README.el.md">🇬🇷 Ελληνικά</a> ·
|
||||
<a href="README.hu.md">🇭🇺 Magyar</a> ·
|
||||
<a href="README.fi.md">🇫🇮 Suomi</a> ·
|
||||
<a href="README.da.md">🇩🇰 Dansk</a> ·
|
||||
<a href="README.nb.md">🇳🇴 Norsk</a>
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
<!-- BEGIN:WHATS_NEW -->
|
||||
|
||||
### 🚀 What's New in v0.3.1 (March 2026)
|
||||
|
||||
| Area | Highlights |
|
||||
|---|---|
|
||||
| ci | add Termux (aarch64-linux-android) release target |
|
||||
|
||||
<!-- END:WHATS_NEW -->
|
||||
|
||||
## מה זה ZeroClaw?
|
||||
|
||||
<p align="center" dir="rtl">
|
||||
ZeroClaw הוא תשתית עוזר AI קלת משקל, מוטטבילית וניתנת להרחבה שנבנתה ב-Rust. היא מחברת ספקי LLM שונים (Anthropic, OpenAI, Google, Ollama, וכו') דרך ממשק מאוחד ותומכת בערוצים מרובים (Telegram, Matrix, CLI, וכו').
|
||||
</p>
|
||||
|
||||
### תכונות עיקריות
|
||||
|
||||
<p align="center" dir="rtl">
|
||||
- **🦀 נכתב ב-Rust**: ביצועים גבוהים, אבטחת זיכרון, ואבסטרקציות ללא עלות
|
||||
- **🔌 אגנוסטי לספקים**: תמיכה ב-OpenAI, Anthropic, Google Gemini, Ollama, ואחרים
|
||||
- **📱 ערוצים מרובים**: Telegram, Matrix (עם E2EE), CLI, ואחרים
|
||||
- **🧠 זיכרון ניתן להחלפה**: Backend של SQLite ו-Markdown
|
||||
- **🛠️ כלים ניתנים להרחבה**: הוסף כלים מותאמים אישית בקלות
|
||||
- **🔒 אבטחה תחילה**: פרוקסי הפוך, עיצוב מותחל על פרטיות
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
## התחלה מהירה
|
||||
|
||||
### דרישות מוקדמות
|
||||
|
||||
<p align="center" dir="rtl">
|
||||
- Rust 1.70+
|
||||
- מפתח API של ספק LLM (Anthropic, OpenAI, וכו')
|
||||
</p>
|
||||
|
||||
### התקנה
|
||||
|
||||
```bash
|
||||
# שכפל את המאגר
|
||||
git clone https://github.com/zeroclaw-labs/zeroclaw.git
|
||||
cd zeroclaw
|
||||
|
||||
# בנה
|
||||
cargo build --release
|
||||
|
||||
# הפעל
|
||||
cargo run --release
|
||||
```
|
||||
|
||||
### עם Docker
|
||||
|
||||
```bash
|
||||
docker run -d \
|
||||
--name zeroclaw \
|
||||
-e ANTHROPIC_API_KEY=your_key \
|
||||
-v zeroclaw-data:/app/data \
|
||||
zeroclaw/zeroclaw:latest
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## קונפיגורציה
|
||||
|
||||
<p align="center" dir="rtl">
|
||||
ZeroClaw משתמש בקובץ קונפיגורציה YAML. כברירת מחדל, הוא מחפש `config.yaml`.
|
||||
</p>
|
||||
|
||||
```yaml
|
||||
# ספק ברירת מחדל
|
||||
provider: anthropic
|
||||
|
||||
# קונפיגורציית ספקים
|
||||
providers:
|
||||
anthropic:
|
||||
api_key: ${ANTHROPIC_API_KEY}
|
||||
model: claude-3-5-sonnet-20241022
|
||||
openai:
|
||||
api_key: ${OPENAI_API_KEY}
|
||||
model: gpt-4o
|
||||
|
||||
# קונפיגורציית זיכרון
|
||||
memory:
|
||||
backend: sqlite
|
||||
path: data/memory.db
|
||||
|
||||
# קונפיגורציית ערוצים
|
||||
channels:
|
||||
telegram:
|
||||
token: ${TELEGRAM_BOT_TOKEN}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## תיעוד
|
||||
|
||||
<p align="center" dir="rtl">
|
||||
לתיעוד מפורט, ראה:
|
||||
</p>
|
||||
|
||||
- [מרכז התיעוד](docs/README.md)
|
||||
- [הפניה לפקודות](docs/commands-reference.md)
|
||||
- [הפניה לספקים](docs/providers-reference.md)
|
||||
- [הפניה לערוצים](docs/channels-reference.md)
|
||||
- [הפניה לקונפיגורציה](docs/config-reference.md)
|
||||
|
||||
---
|
||||
|
||||
## תרומות
|
||||
|
||||
<p align="center" dir="rtl">
|
||||
תרומות מוזמנות! אנא קרא את [מדריך התרומות](CONTRIBUTING.md).
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
## רישיון
|
||||
|
||||
<p align="center" dir="rtl">
|
||||
פרויקט זה מורשה ברישיון כפול:
|
||||
</p>
|
||||
|
||||
- MIT License
|
||||
- Apache License, גרסה 2.0
|
||||
|
||||
<p align="center" dir="rtl">
|
||||
ראה [LICENSE-APACHE](LICENSE-APACHE) ו-[LICENSE-MIT](LICENSE-MIT) לפרטים.
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
## קהילה
|
||||
|
||||
- [Telegram](https://t.me/zeroclawlabs)
|
||||
- [Facebook Group](https://www.facebook.com/groups/zeroclaw)
|
||||
- [WeChat Group](https://zeroclawlabs.cn/group.jpg)
|
||||
|
||||
---
|
||||
|
||||
## נותני חסות
|
||||
|
||||
<p align="center" dir="rtl">
|
||||
אם ZeroClaw שימושי עבורך, אנא שקול לקנות לנו קפה:
|
||||
</p>
|
||||
|
||||
[](https://buymeacoffee.com/argenistherose)
|
||||
|
||||
<!-- BEGIN:RECENT_CONTRIBUTORS -->
|
||||
|
||||
### 🌟 Recent Contributors (v0.3.1)
|
||||
|
||||
3 contributors shipped features, fixes, and improvements in this release cycle:
|
||||
|
||||
- **Argenis**
|
||||
- **argenis de la rosa**
|
||||
- **Claude Opus 4.6**
|
||||
|
||||
Thank you to everyone who opened issues, reviewed PRs, translated docs, and helped test. Every contribution matters. 🦀
|
||||
|
||||
<!-- END:RECENT_CONTRIBUTORS -->
|
||||
+203
@@ -0,0 +1,203 @@
|
||||
<p align="center">
|
||||
<img src="zeroclaw.png" alt="ZeroClaw" width="200" />
|
||||
</p>
|
||||
|
||||
<h1 align="center">ZeroClaw 🦀</h1>
|
||||
|
||||
<p align="center">
|
||||
<strong>शून्य ओवरहेड। शून्य समझौता। 100% रस्ट। 100% अज्ञेयवादी।</strong><br>
|
||||
⚡️ <strong>$10 हार्डवेयर पर <5MB RAM के साथ चलता है: यह OpenClaw से 99% कम मेमोरी और Mac mini से 98% सस्ता है!</strong>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="LICENSE-APACHE"><img src="https://img.shields.io/badge/license-MIT%20OR%20Apache%202.0-blue.svg" alt="License: MIT OR Apache-2.0" /></a>
|
||||
<a href="NOTICE"><img src="https://img.shields.io/badge/contributors-27+-green.svg" alt="Contributors" /></a>
|
||||
<a href="https://buymeacoffee.com/argenistherose"><img src="https://img.shields.io/badge/Buy%20Me%20a%20Coffee-Donate-yellow.svg?style=flat&logo=buy-me-a-coffee" alt="Buy Me a Coffee" /></a>
|
||||
<a href="https://x.com/zeroclawlabs?s=21"><img src="https://img.shields.io/badge/X-%40zeroclawlabs-000000?style=flat&logo=x&logoColor=white" alt="X: @zeroclawlabs" /></a>
|
||||
<a href="https://zeroclawlabs.cn/group.jpg"><img src="https://img.shields.io/badge/WeChat-Group-B7D7A8?logo=wechat&logoColor=white" alt="WeChat Group" /></a>
|
||||
<a href="https://www.xiaohongshu.com/user/profile/67cbfc43000000000d008307?xsec_token=AB73VnYnGNx5y36EtnnZfGmAmS-6Wzv8WMuGpfwfkg6Yc%3D&xsec_source=pc_search"><img src="https://img.shields.io/badge/Xiaohongshu-Official-FF2442?style=flat" alt="Xiaohongshu: Official" /></a>
|
||||
<a href="https://t.me/zeroclawlabs"><img src="https://img.shields.io/badge/Telegram-%40zeroclawlabs-26A5E4?style=flat&logo=telegram&logoColor=white" alt="Telegram: @zeroclawlabs" /></a>
|
||||
<a href="https://www.facebook.com/groups/zeroclaw"><img src="https://img.shields.io/badge/Facebook-Group-1877F2?style=flat&logo=facebook&logoColor=white" alt="Facebook Group" /></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
🌐 <strong>भाषाएँ:</strong>
|
||||
<a href="README.md">🇺🇸 English</a> ·
|
||||
<a href="README.zh-CN.md">🇨🇳 简体中文</a> ·
|
||||
<a href="README.ja.md">🇯🇵 日本語</a> ·
|
||||
<a href="README.ko.md">🇰🇷 한국어</a> ·
|
||||
<a href="README.vi.md">🇻🇳 Tiếng Việt</a> ·
|
||||
<a href="README.tl.md">🇵🇭 Tagalog</a> ·
|
||||
<a href="README.es.md">🇪🇸 Español</a> ·
|
||||
<a href="README.pt.md">🇧🇷 Português</a> ·
|
||||
<a href="README.it.md">🇮🇹 Italiano</a> ·
|
||||
<a href="README.de.md">🇩🇪 Deutsch</a> ·
|
||||
<a href="README.fr.md">🇫🇷 Français</a> ·
|
||||
<a href="README.ar.md">🇸🇦 العربية</a> ·
|
||||
<a href="README.hi.md">🇮🇳 हिन्दी</a> ·
|
||||
<a href="README.ru.md">🇷🇺 Русский</a> ·
|
||||
<a href="README.bn.md">🇧🇩 বাংলা</a> ·
|
||||
<a href="README.he.md">🇮🇱 עברית</a> ·
|
||||
<a href="README.pl.md">🇵🇱 Polski</a> ·
|
||||
<a href="README.cs.md">🇨🇿 Čeština</a> ·
|
||||
<a href="README.nl.md">🇳🇱 Nederlands</a> ·
|
||||
<a href="README.tr.md">🇹🇷 Türkçe</a> ·
|
||||
<a href="README.uk.md">🇺🇦 Українська</a> ·
|
||||
<a href="README.id.md">🇮🇩 Bahasa Indonesia</a> ·
|
||||
<a href="README.th.md">🇹🇭 ไทย</a> ·
|
||||
<a href="README.ur.md">🇵🇰 اردو</a> ·
|
||||
<a href="README.ro.md">🇷🇴 Română</a> ·
|
||||
<a href="README.sv.md">🇸🇪 Svenska</a> ·
|
||||
<a href="README.el.md">🇬🇷 Ελληνικά</a> ·
|
||||
<a href="README.hu.md">🇭🇺 Magyar</a> ·
|
||||
<a href="README.fi.md">🇫🇮 Suomi</a> ·
|
||||
<a href="README.da.md">🇩🇰 Dansk</a> ·
|
||||
<a href="README.nb.md">🇳🇴 Norsk</a>
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
<!-- BEGIN:WHATS_NEW -->
|
||||
|
||||
### 🚀 What's New in v0.3.1 (March 2026)
|
||||
|
||||
| Area | Highlights |
|
||||
|---|---|
|
||||
| ci | add Termux (aarch64-linux-android) release target |
|
||||
|
||||
<!-- END:WHATS_NEW -->
|
||||
|
||||
## ZeroClaw क्या है?
|
||||
|
||||
ZeroClaw एक हल्का, म्यूटेबल और एक्स्टेंसिबल AI असिस्टेंट इन्फ्रास्ट्रक्चर है जो रस्ट में बनाया गया है। यह विभिन्न LLM प्रदाताओं (Anthropic, OpenAI, Google, Ollama, आदि) को एक एकीकृत इंटरफेस के माध्यम से कनेक्ट करता है और कई चैनलों (Telegram, Matrix, CLI, आदि) का समर्थन करता है।
|
||||
|
||||
### मुख्य विशेषताएं
|
||||
|
||||
- **🦀 रस्ट में लिखा गया**: उच्च प्रदर्शन, मेमोरी सुरक्षा, और शून्य-लागत एब्सट्रैक्शन
|
||||
- **🔌 प्रदाता-अज्ञेयवादी**: OpenAI, Anthropic, Google Gemini, Ollama, और अन्य का समर्थन
|
||||
- **📱 बहु-चैनल**: Telegram, Matrix (E2EE के साथ), CLI, और अन्य
|
||||
- **🧠 प्लगेबल मेमोरी**: SQLite और Markdown बैकएंड
|
||||
- **🛠️ विस्तार योग्य टूल**: आसानी से कस्टम टूल जोड़ें
|
||||
- **🔒 सुरक्षा-पहले**: रिवर्स-प्रॉक्सी, गोपनीयता-पहले डिज़ाइन
|
||||
|
||||
---
|
||||
|
||||
## त्वरित शुरुआत
|
||||
|
||||
### आवश्यकताएं
|
||||
|
||||
- रस्ट 1.70+
|
||||
- एक LLM प्रदाता API कुंजी (Anthropic, OpenAI, आदि)
|
||||
|
||||
### इंस्टॉलेशन
|
||||
|
||||
```bash
|
||||
# रिपॉजिटरी क्लोन करें
|
||||
git clone https://github.com/zeroclaw-labs/zeroclaw.git
|
||||
cd zeroclaw
|
||||
|
||||
# बिल्ड करें
|
||||
cargo build --release
|
||||
|
||||
# चलाएं
|
||||
cargo run --release
|
||||
```
|
||||
|
||||
### Docker के साथ
|
||||
|
||||
```bash
|
||||
docker run -d \
|
||||
--name zeroclaw \
|
||||
-e ANTHROPIC_API_KEY=your_key \
|
||||
-v zeroclaw-data:/app/data \
|
||||
zeroclaw/zeroclaw:latest
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## कॉन्फ़िगरेशन
|
||||
|
||||
ZeroClaw एक YAML कॉन्फ़िगरेशन फ़ाइल का उपयोग करता है। डिफ़ॉल्ट रूप से, यह `config.yaml` देखता है।
|
||||
|
||||
```yaml
|
||||
# डिफ़ॉल्ट प्रदाता
|
||||
provider: anthropic
|
||||
|
||||
# प्रदाता कॉन्फ़िगरेशन
|
||||
providers:
|
||||
anthropic:
|
||||
api_key: ${ANTHROPIC_API_KEY}
|
||||
model: claude-3-5-sonnet-20241022
|
||||
openai:
|
||||
api_key: ${OPENAI_API_KEY}
|
||||
model: gpt-4o
|
||||
|
||||
# मेमोरी कॉन्फ़िगरेशन
|
||||
memory:
|
||||
backend: sqlite
|
||||
path: data/memory.db
|
||||
|
||||
# चैनल कॉन्फ़िगरेशन
|
||||
channels:
|
||||
telegram:
|
||||
token: ${TELEGRAM_BOT_TOKEN}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## दस्तावेज़ीकरण
|
||||
|
||||
विस्तृत दस्तावेज़ीकरण के लिए, देखें:
|
||||
|
||||
- [दस्तावेज़ीकरण हब](docs/README.md)
|
||||
- [कमांड संदर्भ](docs/commands-reference.md)
|
||||
- [प्रदाता संदर्भ](docs/providers-reference.md)
|
||||
- [चैनल संदर्भ](docs/channels-reference.md)
|
||||
- [कॉन्फ़िगरेशन संदर्भ](docs/config-reference.md)
|
||||
|
||||
---
|
||||
|
||||
## योगदान
|
||||
|
||||
योगदान का स्वागत है! कृपया [योगदान गाइड](CONTRIBUTING.md) पढ़ें।
|
||||
|
||||
---
|
||||
|
||||
## लाइसेंस
|
||||
|
||||
यह प्रोजेक्ट दोहरे लाइसेंस प्राप्त है:
|
||||
|
||||
- MIT लाइसेंस
|
||||
- Apache लाइसेंस, संस्करण 2.0
|
||||
|
||||
विवरण के लिए [LICENSE-APACHE](LICENSE-APACHE) और [LICENSE-MIT](LICENSE-MIT) देखें।
|
||||
|
||||
---
|
||||
|
||||
## समुदाय
|
||||
|
||||
- [Telegram](https://t.me/zeroclawlabs)
|
||||
- [Facebook Group](https://www.facebook.com/groups/zeroclaw)
|
||||
- [WeChat Group](https://zeroclawlabs.cn/group.jpg)
|
||||
|
||||
---
|
||||
|
||||
## प्रायोजक
|
||||
|
||||
यदि ZeroClaw आपके लिए उपयोगी है, तो कृपया हमें एक कॉफी खरीदने पर विचार करें:
|
||||
|
||||
[](https://buymeacoffee.com/argenistherose)
|
||||
|
||||
<!-- BEGIN:RECENT_CONTRIBUTORS -->
|
||||
|
||||
### 🌟 Recent Contributors (v0.3.1)
|
||||
|
||||
3 contributors shipped features, fixes, and improvements in this release cycle:
|
||||
|
||||
- **Argenis**
|
||||
- **argenis de la rosa**
|
||||
- **Claude Opus 4.6**
|
||||
|
||||
Thank you to everyone who opened issues, reviewed PRs, translated docs, and helped test. Every contribution matters. 🦀
|
||||
|
||||
<!-- END:RECENT_CONTRIBUTORS -->
|
||||
+203
@@ -0,0 +1,203 @@
|
||||
<p align="center">
|
||||
<img src="zeroclaw.png" alt="ZeroClaw" width="200" />
|
||||
</p>
|
||||
|
||||
<h1 align="center">ZeroClaw 🦀</h1>
|
||||
|
||||
<p align="center">
|
||||
<strong>Nulla többletköltség. Nulla kompromisszum. 100% Rust. 100% Agnosztikus.</strong><br>
|
||||
⚡️ <strong>$10-es hardveren fut <5MB RAM-mal: Ez 99%-kal kevesebb memória, mint az OpenClaw és 98%-kal olcsóbb, mint egy Mac mini!</strong>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="LICENSE-APACHE"><img src="https://img.shields.io/badge/license-MIT%20OR%20Apache%202.0-blue.svg" alt="License: MIT OR Apache-2.0" /></a>
|
||||
<a href="NOTICE"><img src="https://img.shields.io/badge/contributors-27+-green.svg" alt="Contributors" /></a>
|
||||
<a href="https://buymeacoffee.com/argenistherose"><img src="https://img.shields.io/badge/Buy%20Me%20a%20Coffee-Donate-yellow.svg?style=flat&logo=buy-me-a-coffee" alt="Buy Me a Coffee" /></a>
|
||||
<a href="https://x.com/zeroclawlabs?s=21"><img src="https://img.shields.io/badge/X-%40zeroclawlabs-000000?style=flat&logo=x&logoColor=white" alt="X: @zeroclawlabs" /></a>
|
||||
<a href="https://zeroclawlabs.cn/group.jpg"><img src="https://img.shields.io/badge/WeChat-Group-B7D7A8?logo=wechat&logoColor=white" alt="WeChat Group" /></a>
|
||||
<a href="https://www.xiaohongshu.com/user/profile/67cbfc43000000000d008307?xsec_token=AB73VnYnGNx5y36EtnnZfGmAmS-6Wzv8WMuGpfwfkg6Yc%3D&xsec_source=pc_search"><img src="https://img.shields.io/badge/Xiaohongshu-Official-FF2442?style=flat" alt="Xiaohongshu: Official" /></a>
|
||||
<a href="https://t.me/zeroclawlabs"><img src="https://img.shields.io/badge/Telegram-%40zeroclawlabs-26A5E4?style=flat&logo=telegram&logoColor=white" alt="Telegram: @zeroclawlabs" /></a>
|
||||
<a href="https://www.facebook.com/groups/zeroclaw"><img src="https://img.shields.io/badge/Facebook-Group-1877F2?style=flat&logo=facebook&logoColor=white" alt="Facebook Group" /></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
🌐 <strong>Nyelvek:</strong>
|
||||
<a href="README.md">🇺🇸 English</a> ·
|
||||
<a href="README.zh-CN.md">🇨🇳 简体中文</a> ·
|
||||
<a href="README.ja.md">🇯🇵 日本語</a> ·
|
||||
<a href="README.ko.md">🇰🇷 한국어</a> ·
|
||||
<a href="README.vi.md">🇻🇳 Tiếng Việt</a> ·
|
||||
<a href="README.tl.md">🇵🇭 Tagalog</a> ·
|
||||
<a href="README.es.md">🇪🇸 Español</a> ·
|
||||
<a href="README.pt.md">🇧🇷 Português</a> ·
|
||||
<a href="README.it.md">🇮🇹 Italiano</a> ·
|
||||
<a href="README.de.md">🇩🇪 Deutsch</a> ·
|
||||
<a href="README.fr.md">🇫🇷 Français</a> ·
|
||||
<a href="README.ar.md">🇸🇦 العربية</a> ·
|
||||
<a href="README.hi.md">🇮🇳 हिन्दी</a> ·
|
||||
<a href="README.ru.md">🇷🇺 Русский</a> ·
|
||||
<a href="README.bn.md">🇧🇩 বাংলা</a> ·
|
||||
<a href="README.he.md">🇮🇱 עברית</a> ·
|
||||
<a href="README.pl.md">🇵🇱 Polski</a> ·
|
||||
<a href="README.cs.md">🇨🇿 Čeština</a> ·
|
||||
<a href="README.nl.md">🇳🇱 Nederlands</a> ·
|
||||
<a href="README.tr.md">🇹🇷 Türkçe</a> ·
|
||||
<a href="README.uk.md">🇺🇦 Українська</a> ·
|
||||
<a href="README.id.md">🇮🇩 Bahasa Indonesia</a> ·
|
||||
<a href="README.th.md">🇹🇭 ไทย</a> ·
|
||||
<a href="README.ur.md">🇵🇰 اردو</a> ·
|
||||
<a href="README.ro.md">🇷🇴 Română</a> ·
|
||||
<a href="README.sv.md">🇸🇪 Svenska</a> ·
|
||||
<a href="README.el.md">🇬🇷 Ελληνικά</a> ·
|
||||
<a href="README.hu.md">🇭🇺 Magyar</a> ·
|
||||
<a href="README.fi.md">🇫🇮 Suomi</a> ·
|
||||
<a href="README.da.md">🇩🇰 Dansk</a> ·
|
||||
<a href="README.nb.md">🇳🇴 Norsk</a>
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
<!-- BEGIN:WHATS_NEW -->
|
||||
|
||||
### 🚀 What's New in v0.3.1 (March 2026)
|
||||
|
||||
| Area | Highlights |
|
||||
|---|---|
|
||||
| ci | add Termux (aarch64-linux-android) release target |
|
||||
|
||||
<!-- END:WHATS_NEW -->
|
||||
|
||||
## Mi az a ZeroClaw?
|
||||
|
||||
A ZeroClaw egy könnyűsúlyú, változtatható és bővíthető AI asszisztens infrastruktúra, amely Rust nyelven készült. Különböző LLM szolgáltatókat (Anthropic, OpenAI, Google, Ollama stb.) köt össze egy egységes felületen keresztül, és több csatornát támogat (Telegram, Matrix, CLI stb.).
|
||||
|
||||
### Fő jellemzők
|
||||
|
||||
- **🦀 Rust nyelven írva**: Magas teljesítmény, memória biztonság és null költségű absztrakciók
|
||||
- **🔌 Szolgáltató-agnosztikus**: OpenAI, Anthropic, Google Gemini, Ollama és mások támogatása
|
||||
- **📱 Többcsatornás**: Telegram, Matrix (E2EE-vel), CLI és mások
|
||||
- **🧠 Cserélhető memória**: SQLite és Markdown backendek
|
||||
- **🛠️ Bővíthető eszközök**: Egyszerűen adjon hozzá egyedi eszközöket
|
||||
- **🔒 Biztonság először**: Fordított proxy, adatvédelem-elsődleges tervezés
|
||||
|
||||
---
|
||||
|
||||
## Gyors Kezdés
|
||||
|
||||
### Követelmények
|
||||
|
||||
- Rust 1.70+
|
||||
- Egy LLM szolgáltató API kulcs (Anthropic, OpenAI stb.)
|
||||
|
||||
### Telepítés
|
||||
|
||||
```bash
|
||||
# Klónozza a repositoryt
|
||||
git clone https://github.com/zeroclaw-labs/zeroclaw.git
|
||||
cd zeroclaw
|
||||
|
||||
# Építés
|
||||
cargo build --release
|
||||
|
||||
# Futtatás
|
||||
cargo run --release
|
||||
```
|
||||
|
||||
### Docker-rel
|
||||
|
||||
```bash
|
||||
docker run -d \
|
||||
--name zeroclaw \
|
||||
-e ANTHROPIC_API_KEY=your_key \
|
||||
-v zeroclaw-data:/app/data \
|
||||
zeroclaw/zeroclaw:latest
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Konfiguráció
|
||||
|
||||
A ZeroClaw egy YAML konfigurációs fájlt használ. Alapértelmezés szerint a `config.yaml` fájlt keresi.
|
||||
|
||||
```yaml
|
||||
# Alapértelmezett szolgáltató
|
||||
provider: anthropic
|
||||
|
||||
# Szolgáltató konfiguráció
|
||||
providers:
|
||||
anthropic:
|
||||
api_key: ${ANTHROPIC_API_KEY}
|
||||
model: claude-3-5-sonnet-20241022
|
||||
openai:
|
||||
api_key: ${OPENAI_API_KEY}
|
||||
model: gpt-4o
|
||||
|
||||
# Memória konfiguráció
|
||||
memory:
|
||||
backend: sqlite
|
||||
path: data/memory.db
|
||||
|
||||
# Csatorna konfiguráció
|
||||
channels:
|
||||
telegram:
|
||||
token: ${TELEGRAM_BOT_TOKEN}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Dokumentáció
|
||||
|
||||
Részletes dokumentációért lásd:
|
||||
|
||||
- [Dokumentációs Központ](docs/README.md)
|
||||
- [Parancs Referencia](docs/commands-reference.md)
|
||||
- [Szolgáltató Referencia](docs/providers-reference.md)
|
||||
- [Csatorna Referencia](docs/channels-reference.md)
|
||||
- [Konfigurációs Referencia](docs/config-reference.md)
|
||||
|
||||
---
|
||||
|
||||
## Hozzájárulás
|
||||
|
||||
A hozzájárulások várják! Kérjük, olvassa el a [Hozzájárulási Útmutatót](CONTRIBUTING.md).
|
||||
|
||||
---
|
||||
|
||||
## Licenc
|
||||
|
||||
Ez a projekt kettős licencelt:
|
||||
|
||||
- MIT License
|
||||
- Apache License, 2.0 verzió
|
||||
|
||||
Részletekért lásd a [LICENSE-APACHE](LICENSE-APACHE) és [LICENSE-MIT](LICENSE-MIT) fájlokat.
|
||||
|
||||
---
|
||||
|
||||
## Közösség
|
||||
|
||||
- [Telegram](https://t.me/zeroclawlabs)
|
||||
- [Facebook Group](https://www.facebook.com/groups/zeroclaw)
|
||||
- [WeChat Group](https://zeroclawlabs.cn/group.jpg)
|
||||
|
||||
---
|
||||
|
||||
## Szponzorok
|
||||
|
||||
Ha a ZeroClaw hasznos az Ön számára, kérjük, fontolja meg, hogy vesz nekünk egy kávét:
|
||||
|
||||
[](https://buymeacoffee.com/argenistherose)
|
||||
|
||||
<!-- BEGIN:RECENT_CONTRIBUTORS -->
|
||||
|
||||
### 🌟 Recent Contributors (v0.3.1)
|
||||
|
||||
3 contributors shipped features, fixes, and improvements in this release cycle:
|
||||
|
||||
- **Argenis**
|
||||
- **argenis de la rosa**
|
||||
- **Claude Opus 4.6**
|
||||
|
||||
Thank you to everyone who opened issues, reviewed PRs, translated docs, and helped test. Every contribution matters. 🦀
|
||||
|
||||
<!-- END:RECENT_CONTRIBUTORS -->
|
||||
+203
@@ -0,0 +1,203 @@
|
||||
<p align="center">
|
||||
<img src="zeroclaw.png" alt="ZeroClaw" width="200" />
|
||||
</p>
|
||||
|
||||
<h1 align="center">ZeroClaw 🦀</h1>
|
||||
|
||||
<p align="center">
|
||||
<strong>Nol overhead. Nol kompromi. 100% Rust. 100% Agnostik.</strong><br>
|
||||
⚡️ <strong>Jalan di perangkat $10 dengan <5MB RAM: Itu 99% lebih sedikit memori dari OpenClaw dan 98% lebih murah dari Mac mini!</strong>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="LICENSE-APACHE"><img src="https://img.shields.io/badge/license-MIT%20OR%20Apache%202.0-blue.svg" alt="License: MIT OR Apache-2.0" /></a>
|
||||
<a href="NOTICE"><img src="https://img.shields.io/badge/contributors-27+-green.svg" alt="Contributors" /></a>
|
||||
<a href="https://buymeacoffee.com/argenistherose"><img src="https://img.shields.io/badge/Buy%20Me%20a%20Coffee-Donate-yellow.svg?style=flat&logo=buy-me-a-coffee" alt="Buy Me a Coffee" /></a>
|
||||
<a href="https://x.com/zeroclawlabs?s=21"><img src="https://img.shields.io/badge/X-%40zeroclawlabs-000000?style=flat&logo=x&logoColor=white" alt="X: @zeroclawlabs" /></a>
|
||||
<a href="https://zeroclawlabs.cn/group.jpg"><img src="https://img.shields.io/badge/WeChat-Group-B7D7A8?logo=wechat&logoColor=white" alt="WeChat Group" /></a>
|
||||
<a href="https://www.xiaohongshu.com/user/profile/67cbfc43000000000d008307?xsec_token=AB73VnYnGNx5y36EtnnZfGmAmS-6Wzv8WMuGpfwfkg6Yc%3D&xsec_source=pc_search"><img src="https://img.shields.io/badge/Xiaohongshu-Official-FF2442?style=flat" alt="Xiaohongshu: Official" /></a>
|
||||
<a href="https://t.me/zeroclawlabs"><img src="https://img.shields.io/badge/Telegram-%40zeroclawlabs-26A5E4?style=flat&logo=telegram&logoColor=white" alt="Telegram: @zeroclawlabs" /></a>
|
||||
<a href="https://www.facebook.com/groups/zeroclaw"><img src="https://img.shields.io/badge/Facebook-Group-1877F2?style=flat&logo=facebook&logoColor=white" alt="Facebook Group" /></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
🌐 <strong>Bahasa:</strong>
|
||||
<a href="README.md">🇺🇸 English</a> ·
|
||||
<a href="README.zh-CN.md">🇨🇳 简体中文</a> ·
|
||||
<a href="README.ja.md">🇯🇵 日本語</a> ·
|
||||
<a href="README.ko.md">🇰🇷 한국어</a> ·
|
||||
<a href="README.vi.md">🇻🇳 Tiếng Việt</a> ·
|
||||
<a href="README.tl.md">🇵🇭 Tagalog</a> ·
|
||||
<a href="README.es.md">🇪🇸 Español</a> ·
|
||||
<a href="README.pt.md">🇧🇷 Português</a> ·
|
||||
<a href="README.it.md">🇮🇹 Italiano</a> ·
|
||||
<a href="README.de.md">🇩🇪 Deutsch</a> ·
|
||||
<a href="README.fr.md">🇫🇷 Français</a> ·
|
||||
<a href="README.ar.md">🇸🇦 العربية</a> ·
|
||||
<a href="README.hi.md">🇮🇳 हिन्दी</a> ·
|
||||
<a href="README.ru.md">🇷🇺 Русский</a> ·
|
||||
<a href="README.bn.md">🇧🇩 বাংলা</a> ·
|
||||
<a href="README.he.md">🇮🇱 עברית</a> ·
|
||||
<a href="README.pl.md">🇵🇱 Polski</a> ·
|
||||
<a href="README.cs.md">🇨🇿 Čeština</a> ·
|
||||
<a href="README.nl.md">🇳🇱 Nederlands</a> ·
|
||||
<a href="README.tr.md">🇹🇷 Türkçe</a> ·
|
||||
<a href="README.uk.md">🇺🇦 Українська</a> ·
|
||||
<a href="README.id.md">🇮🇩 Bahasa Indonesia</a> ·
|
||||
<a href="README.th.md">🇹🇭 ไทย</a> ·
|
||||
<a href="README.ur.md">🇵🇰 اردو</a> ·
|
||||
<a href="README.ro.md">🇷🇴 Română</a> ·
|
||||
<a href="README.sv.md">🇸🇪 Svenska</a> ·
|
||||
<a href="README.el.md">🇬🇷 Ελληνικά</a> ·
|
||||
<a href="README.hu.md">🇭🇺 Magyar</a> ·
|
||||
<a href="README.fi.md">🇫🇮 Suomi</a> ·
|
||||
<a href="README.da.md">🇩🇰 Dansk</a> ·
|
||||
<a href="README.nb.md">🇳🇴 Norsk</a>
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
<!-- BEGIN:WHATS_NEW -->
|
||||
|
||||
### 🚀 What's New in v0.3.1 (March 2026)
|
||||
|
||||
| Area | Highlights |
|
||||
|---|---|
|
||||
| ci | add Termux (aarch64-linux-android) release target |
|
||||
|
||||
<!-- END:WHATS_NEW -->
|
||||
|
||||
## Apa itu ZeroClaw?
|
||||
|
||||
ZeroClaw adalah infrastruktur asisten AI yang ringan, dapat diubah, dan dapat diperluas yang dibangun dengan Rust. Ini menghubungkan berbagai penyedia LLM (Anthropic, OpenAI, Google, Ollama, dll.) melalui antarmuka terpadu dan mendukung banyak saluran (Telegram, Matrix, CLI, dll.).
|
||||
|
||||
### Fitur Utama
|
||||
|
||||
- **🦀 Ditulis dalam Rust**: Kinerja tinggi, keamanan memori, dan abstraksi tanpa biaya
|
||||
- **🔌 Agnostik penyedia**: Mendukung OpenAI, Anthropic, Google Gemini, Ollama, dan lainnya
|
||||
- **📱 Multi-saluran**: Telegram, Matrix (dengan E2EE), CLI, dan lainnya
|
||||
- **🧠 Memori yang dapat dipasang**: Backend SQLite dan Markdown
|
||||
- **🛠️ Alat yang dapat diperluas**: Tambahkan alat kustom dengan mudah
|
||||
- **🔒 Keamanan pertama**: Proxy terbalik, desain yang mengutamakan privasi
|
||||
|
||||
---
|
||||
|
||||
## Mulai Cepat
|
||||
|
||||
### Persyaratan
|
||||
|
||||
- Rust 1.70+
|
||||
- Kunci API penyedia LLM (Anthropic, OpenAI, dll.)
|
||||
|
||||
### Instalasi
|
||||
|
||||
```bash
|
||||
# Klon repositori
|
||||
git clone https://github.com/zeroclaw-labs/zeroclaw.git
|
||||
cd zeroclaw
|
||||
|
||||
# Bangun
|
||||
cargo build --release
|
||||
|
||||
# Jalankan
|
||||
cargo run --release
|
||||
```
|
||||
|
||||
### Dengan Docker
|
||||
|
||||
```bash
|
||||
docker run -d \
|
||||
--name zeroclaw \
|
||||
-e ANTHROPIC_API_KEY=your_key \
|
||||
-v zeroclaw-data:/app/data \
|
||||
zeroclaw/zeroclaw:latest
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Konfigurasi
|
||||
|
||||
ZeroClaw menggunakan file konfigurasi YAML. Secara default, ini mencari `config.yaml`.
|
||||
|
||||
```yaml
|
||||
# Penyedia default
|
||||
provider: anthropic
|
||||
|
||||
# Konfigurasi penyedia
|
||||
providers:
|
||||
anthropic:
|
||||
api_key: ${ANTHROPIC_API_KEY}
|
||||
model: claude-3-5-sonnet-20241022
|
||||
openai:
|
||||
api_key: ${OPENAI_API_KEY}
|
||||
model: gpt-4o
|
||||
|
||||
# Konfigurasi memori
|
||||
memory:
|
||||
backend: sqlite
|
||||
path: data/memory.db
|
||||
|
||||
# Konfigurasi saluran
|
||||
channels:
|
||||
telegram:
|
||||
token: ${TELEGRAM_BOT_TOKEN}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Dokumentasi
|
||||
|
||||
Untuk dokumentasi terperinci, lihat:
|
||||
|
||||
- [Hub Dokumentasi](docs/README.md)
|
||||
- [Referensi Perintah](docs/commands-reference.md)
|
||||
- [Referensi Penyedia](docs/providers-reference.md)
|
||||
- [Referensi Saluran](docs/channels-reference.md)
|
||||
- [Referensi Konfigurasi](docs/config-reference.md)
|
||||
|
||||
---
|
||||
|
||||
## Berkontribusi
|
||||
|
||||
Kontribusi diterima! Silakan baca [Panduan Kontribusi](CONTRIBUTING.md).
|
||||
|
||||
---
|
||||
|
||||
## Lisensi
|
||||
|
||||
Proyek ini dilisensikan ganda:
|
||||
|
||||
- MIT License
|
||||
- Apache License, versi 2.0
|
||||
|
||||
Lihat [LICENSE-APACHE](LICENSE-APACHE) dan [LICENSE-MIT](LICENSE-MIT) untuk detailnya.
|
||||
|
||||
---
|
||||
|
||||
## Komunitas
|
||||
|
||||
- [Telegram](https://t.me/zeroclawlabs)
|
||||
- [Facebook Group](https://www.facebook.com/groups/zeroclaw)
|
||||
- [WeChat Group](https://zeroclawlabs.cn/group.jpg)
|
||||
|
||||
---
|
||||
|
||||
## Sponsor
|
||||
|
||||
Jika ZeroClaw berguna bagi Anda, mohon pertimbangkan untuk membelikan kami kopi:
|
||||
|
||||
[](https://buymeacoffee.com/argenistherose)
|
||||
|
||||
<!-- BEGIN:RECENT_CONTRIBUTORS -->
|
||||
|
||||
### 🌟 Recent Contributors (v0.3.1)
|
||||
|
||||
3 contributors shipped features, fixes, and improvements in this release cycle:
|
||||
|
||||
- **Argenis**
|
||||
- **argenis de la rosa**
|
||||
- **Claude Opus 4.6**
|
||||
|
||||
Thank you to everyone who opened issues, reviewed PRs, translated docs, and helped test. Every contribution matters. 🦀
|
||||
|
||||
<!-- END:RECENT_CONTRIBUTORS -->
|
||||
+501
@@ -0,0 +1,501 @@
|
||||
<p align="center">
|
||||
<img src="zeroclaw.png" alt="ZeroClaw" width="200" />
|
||||
</p>
|
||||
|
||||
<h1 align="center">ZeroClaw 🦀</h1>
|
||||
|
||||
<p align="center">
|
||||
<strong>Zero overhead. Zero compromesso. 100% Rust. 100% Agnostico.</strong><br>
|
||||
⚡️ <strong>Gira su hardware da $10 con <5MB di RAM: È il 99% di memoria in meno di OpenClaw e il 98% più economico di un Mac mini!</strong>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="LICENSE-APACHE"><img src="https://img.shields.io/badge/license-MIT%20OR%20Apache%202.0-blue.svg" alt="License: MIT OR Apache-2.0" /></a>
|
||||
<a href="NOTICE"><img src="https://img.shields.io/badge/contributors-27+-green.svg" alt="Contributors" /></a>
|
||||
<a href="https://buymeacoffee.com/argenistherose"><img src="https://img.shields.io/badge/Buy%20Me%20a%20Coffee-Donate-yellow.svg?style=flat&logo=buy-me-a-coffee" alt="Buy Me a Coffee" /></a>
|
||||
<a href="https://x.com/zeroclawlabs?s=21"><img src="https://img.shields.io/badge/X-%40zeroclawlabs-000000?style=flat&logo=x&logoColor=white" alt="X: @zeroclawlabs" /></a>
|
||||
<a href="https://zeroclawlabs.cn/group.jpg"><img src="https://img.shields.io/badge/WeChat-Group-B7D7A8?logo=wechat&logoColor=white" alt="WeChat Group" /></a>
|
||||
<a href="https://www.xiaohongshu.com/user/profile/67cbfc43000000000d008307?xsec_token=AB73VnYnGNx5y36EtnnZfGmAmS-6Wzv8WMuGpfwfkg6Yc%3D&xsec_source=pc_search"><img src="https://img.shields.io/badge/Xiaohongshu-Official-FF2442?style=flat" alt="Xiaohongshu: Official" /></a>
|
||||
<a href="https://t.me/zeroclawlabs"><img src="https://img.shields.io/badge/Telegram-%40zeroclawlabs-26A5E4?style=flat&logo=telegram&logoColor=white" alt="Telegram: @zeroclawlabs" /></a>
|
||||
<a href="https://www.facebook.com/groups/zeroclaw"><img src="https://img.shields.io/badge/Facebook-Group-1877F2?style=flat&logo=facebook&logoColor=white" alt="Facebook Group" /></a>
|
||||
<a href="https://www.reddit.com/r/zeroclawlabs/"><img src="https://img.shields.io/badge/Reddit-r%2Fzeroclawlabs-FF4500?style=flat&logo=reddit&logoColor=white" alt="Reddit: r/zeroclawlabs" /></a>
|
||||
</p>
|
||||
<p align="center">
|
||||
Costruito da studenti e membri delle comunità Harvard, MIT e Sundai.Club.
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
🌐 <strong>Lingue:</strong><a href="README.md">🇺🇸 English</a> ·
|
||||
<a href="README.zh-CN.md">🇨🇳 简体中文</a> ·
|
||||
<a href="README.ja.md">🇯🇵 日本語</a> ·
|
||||
<a href="README.ko.md">🇰🇷 한국어</a> ·
|
||||
<a href="README.vi.md">🇻🇳 Tiếng Việt</a> ·
|
||||
<a href="README.tl.md">🇵🇭 Tagalog</a> ·
|
||||
<a href="README.es.md">🇪🇸 Español</a> ·
|
||||
<a href="README.pt.md">🇧🇷 Português</a> ·
|
||||
<a href="README.it.md">🇮🇹 Italiano</a> ·
|
||||
<a href="README.de.md">🇩🇪 Deutsch</a> ·
|
||||
<a href="README.fr.md">🇫🇷 Français</a> ·
|
||||
<a href="README.ar.md">🇸🇦 العربية</a> ·
|
||||
<a href="README.hi.md">🇮🇳 हिन्दी</a> ·
|
||||
<a href="README.ru.md">🇷🇺 Русский</a> ·
|
||||
<a href="README.bn.md">🇧🇩 বাংলা</a> ·
|
||||
<a href="README.he.md">🇮🇱 עברית</a> ·
|
||||
<a href="README.pl.md">🇵🇱 Polski</a> ·
|
||||
<a href="README.cs.md">🇨🇿 Čeština</a> ·
|
||||
<a href="README.nl.md">🇳🇱 Nederlands</a> ·
|
||||
<a href="README.tr.md">🇹🇷 Türkçe</a> ·
|
||||
<a href="README.uk.md">🇺🇦 Українська</a> ·
|
||||
<a href="README.id.md">🇮🇩 Bahasa Indonesia</a> ·
|
||||
<a href="README.th.md">🇹🇭 ไทย</a> ·
|
||||
<a href="README.ur.md">🇵🇰 اردو</a> ·
|
||||
<a href="README.ro.md">🇷🇴 Română</a> ·
|
||||
<a href="README.sv.md">🇸🇪 Svenska</a> ·
|
||||
<a href="README.el.md">🇬🇷 Ελληνικά</a> ·
|
||||
<a href="README.hu.md">🇭🇺 Magyar</a> ·
|
||||
<a href="README.fi.md">🇫🇮 Suomi</a> ·
|
||||
<a href="README.da.md">🇩🇰 Dansk</a> ·
|
||||
<a href="README.nb.md">🇳🇴 Norsk</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="#avvio-rapido">Avvio Rapido</a> |
|
||||
<a href="bootstrap.sh">Configurazione con Un Clic</a> |
|
||||
<a href="docs/README.md">Hub Documentazione</a> |
|
||||
<a href="docs/SUMMARY.md">Indice Documentazione</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<strong>Accessi rapidi:</strong>
|
||||
<a href="docs/reference/README.md">Riferimento</a> ·
|
||||
<a href="docs/operations/README.md">Operazioni</a> ·
|
||||
<a href="docs/troubleshooting.md">Risoluzione Problemi</a> ·
|
||||
<a href="docs/security/README.md">Sicurezza</a> ·
|
||||
<a href="docs/hardware/README.md">Hardware</a> ·
|
||||
<a href="docs/contributing/README.md">Contribuire</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<strong>Infrastruttura assistente AI veloce, leggera e completamente autonoma</strong><br />
|
||||
Distribuisci ovunque. Scambia qualsiasi cosa.
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
ZeroClaw è il <strong>sistema operativo runtime</strong> per i workflow degli agenti — un'infrastruttura che astrae modelli, strumenti, memoria ed esecuzione per costruire agenti una volta e eseguirli ovunque.
|
||||
</p>
|
||||
|
||||
<p align="center"><code>Architettura basata su trait · runtime sicuro di default · provider/canale/strumento intercambiabili · tutto è collegabile</code></p>
|
||||
|
||||
<!-- BEGIN:WHATS_NEW -->
|
||||
|
||||
### 🚀 What's New in v0.3.1 (March 2026)
|
||||
|
||||
| Area | Highlights |
|
||||
|---|---|
|
||||
| ci | add Termux (aarch64-linux-android) release target |
|
||||
|
||||
<!-- END:WHATS_NEW -->
|
||||
|
||||
### 📢 Annunci
|
||||
|
||||
Usa questa tabella per avvisi importanti (cambiamenti di compatibilità, avvisi di sicurezza, finestre di manutenzione e blocchi di versione).
|
||||
|
||||
| Data (UTC) | Livello | Avviso | Azione |
|
||||
| ---------- | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| 2026-02-19 | _Critico_ | **Non siamo affiliati** con `openagen/zeroclaw` o `zeroclaw.org`. Il dominio `zeroclaw.org` punta attualmente al fork `openagen/zeroclaw`, e questo dominio/repository sta contraffacendo il nostro sito web/progetto ufficiale. | Non fidarti di informazioni, binari, raccolte fondi o annunci da queste fonti. Usa solo [questo repository](https://github.com/zeroclaw-labs/zeroclaw) e i nostri account social verificati. |
|
||||
| 2026-02-21 | _Importante_ | Il nostro sito ufficiale è ora online: [zeroclawlabs.ai](https://zeroclawlabs.ai). Grazie per la pazienza durante l'attesa. Rileviamo ancora tentativi di contraffazione: non partecipare ad alcuna attività di investimento/finanziamento a nome di ZeroClaw se non pubblicata tramite i nostri canali ufficiali. | Usa [questo repository](https://github.com/zeroclaw-labs/zeroclaw) come unica fonte di verità. Segui [X (@zeroclawlabs)](https://x.com/zeroclawlabs?s=21), [Telegram (@zeroclawlabs)](https://t.me/zeroclawlabs), [Facebook (gruppo)](https://www.facebook.com/groups/zeroclaw), [Reddit (r/zeroclawlabs)](https://www.reddit.com/r/zeroclawlabs/), e [Xiaohongshu](https://www.xiaohongshu.com/user/profile/67cbfc43000000000d008307?xsec_token=AB73VnYnGNx5y36EtnnZfGmAmS-6Wzv8WMuGpfwfkg6Yc%3D&xsec_source=pc_search) per aggiornamenti ufficiali. |
|
||||
| 2026-02-19 | _Importante_ | Anthropic ha aggiornato i termini di utilizzo di autenticazione e credenziali il 2026-02-19. L'autenticazione OAuth (Free, Pro, Max) è esclusivamente per Claude Code e Claude.ai; l'uso di token OAuth di Claude Free/Pro/Max in qualsiasi altro prodotto, strumento o servizio (incluso Agent SDK) non è consentito e può violare i Termini di Utilizzo del Consumatore. | Si prega di evitare temporaneamente le integrazioni OAuth di Claude Code per prevenire qualsiasi potenziale perdita. Clausola originale: [Authentication and Credential Use](https://code.claude.com/docs/en/legal-and-compliance#authentication-and-credential-use). |
|
||||
|
||||
### ✨ Funzionalità
|
||||
|
||||
- 🏎️ **Runtime Leggero di Default:** I workflow CLI comuni e i comandi di stato girano all'interno di uno spazio di memoria di pochi megabyte nelle build di produzione.
|
||||
- 💰 **Distribuzione Economica:** Progettato per schede a basso costo e piccole istanze cloud senza dipendenze runtime pesanti.
|
||||
- ⚡ **Avvii a Freddo Rapidi:** Il runtime Rust a binario singolo mantiene l'avvio di comandi e demoni quasi istantaneo per le operazioni quotidiane.
|
||||
- 🌍 **Architettura Portabile:** Un workflow a binario singolo su ARM, x86 e RISC-V con provider/canale/strumento intercambiabili.
|
||||
|
||||
### Perché i team scelgono ZeroClaw
|
||||
|
||||
- **Leggero di default:** binario Rust piccolo, avvio rapido, basso impatto di memoria.
|
||||
- **Sicuro per design:** pairing, sandboxing rigoroso, liste di autorizzazione esplicite, scope del workspace.
|
||||
- **Completamente intercambiabile:** i sistemi centrali sono trait (provider, canali, strumenti, memoria, tunnel).
|
||||
- **Nessun lock-in del provider:** supporto provider compatibile OpenAI + endpoint personalizzati collegabili.
|
||||
|
||||
## Snapshot Benchmark (ZeroClaw vs OpenClaw, Riproducibile)
|
||||
|
||||
Benchmark rapido su macchina locale (macOS arm64, feb. 2026) normalizzato per hardware edge a 0.8 GHz.
|
||||
|
||||
| | OpenClaw | NanoBot | PicoClaw | ZeroClaw 🦀 |
|
||||
| ---------------------------- | ------------- | -------------- | --------------- | --------------------- |
|
||||
| **Linguaggio** | TypeScript | Python | Go | **Rust** |
|
||||
| **RAM** | > 1 GB | > 100 MB | < 10 MB | **< 5 MB** |
|
||||
| **Avvio (core 0.8 GHz)** | > 500s | > 30s | < 1s | **< 10ms** |
|
||||
| **Dimensione Binario** | ~28 MB (dist) | N/A (Scripts) | ~8 MB | **3.4 MB** |
|
||||
| **Costo** | Mac Mini $599 | Linux SBC ~$50 | Scheda Linux $10 | **Qualsiasi hardware $10** |
|
||||
|
||||
> Note: I risultati di ZeroClaw sono misurati su build di produzione usando `/usr/bin/time -l`. OpenClaw richiede il runtime Node.js (tipicamente ~390 MB di overhead memoria aggiuntivo), mentre NanoBot richiede il runtime Python. PicoClaw e ZeroClaw sono binari statici. Le cifre RAM sopra sono memoria runtime; i requisiti di compilazione in build-time sono maggiori.
|
||||
|
||||
<p align="center">
|
||||
<img src="zero-claw.jpeg" alt="Confronto ZeroClaw vs OpenClaw" width="800" />
|
||||
</p>
|
||||
|
||||
### Misurazione Locale Riproducibile
|
||||
|
||||
Le affermazioni di benchmark possono derivare man mano che il codice e le toolchain evolvono, quindi misura sempre la tua build attuale localmente:
|
||||
|
||||
```bash
|
||||
cargo build --release
|
||||
ls -lh target/release/zeroclaw
|
||||
|
||||
/usr/bin/time -l target/release/zeroclaw --help
|
||||
/usr/bin/time -l target/release/zeroclaw status
|
||||
```
|
||||
|
||||
Esempio di campione (macOS arm64, misurato il 18 febbraio 2026):
|
||||
|
||||
- Dimensione binario release: `8.8M`
|
||||
- `zeroclaw --help`: tempo reale circa `0.02s`, impatto memoria massimo ~`3.9 MB`
|
||||
- `zeroclaw status`: tempo reale circa `0.01s`, impatto memoria massimo ~`4.1 MB`
|
||||
|
||||
## Prerequisiti
|
||||
|
||||
<details>
|
||||
<summary><strong>Windows</strong></summary>
|
||||
|
||||
### Windows — Richiesto
|
||||
|
||||
1. **Visual Studio Build Tools** (fornisce il linker MSVC e il Windows SDK):
|
||||
|
||||
```powershell
|
||||
winget install Microsoft.VisualStudio.2022.BuildTools
|
||||
```
|
||||
|
||||
Durante l'installazione (o via Visual Studio Installer), seleziona il carico di lavoro **"Sviluppo desktop con C++"**.
|
||||
|
||||
2. **Toolchain Rust:**
|
||||
|
||||
```powershell
|
||||
winget install Rustlang.Rustup
|
||||
```
|
||||
|
||||
Dopo l'installazione, apri un nuovo terminale ed esegui `rustup default stable` per assicurarti che la toolchain stabile sia attiva.
|
||||
|
||||
3. **Verifica** che entrambi funzionano:
|
||||
```powershell
|
||||
rustc --version
|
||||
cargo --version
|
||||
```
|
||||
|
||||
### Windows — Opzionale
|
||||
|
||||
- **Docker Desktop** — richiesto solo se usi il [runtime Docker sandboxed](#supporto-runtime-attuale) (`runtime.kind = "docker"`). Installa via `winget install Docker.DockerDesktop`.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>Linux / macOS</strong></summary>
|
||||
|
||||
### Linux / macOS — Richiesto
|
||||
|
||||
1. **Strumenti di build essenziali:**
|
||||
- **Linux (Debian/Ubuntu):** `sudo apt install build-essential pkg-config`
|
||||
- **Linux (Fedora/RHEL):** `sudo dnf group install development-tools && sudo dnf install pkg-config`
|
||||
- **macOS:** Installa Xcode Command Line Tools: `xcode-select --install`
|
||||
|
||||
2. **Toolchain Rust:**
|
||||
|
||||
```bash
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||
```
|
||||
|
||||
Vedi [rustup.rs](https://rustup.rs) per dettagli.
|
||||
|
||||
3. **Verifica:**
|
||||
```bash
|
||||
rustc --version
|
||||
cargo --version
|
||||
```
|
||||
|
||||
### Linux / macOS — Opzionale
|
||||
|
||||
- **Docker** — richiesto solo se usi il [runtime Docker sandboxed](#supporto-runtime-attuale) (`runtime.kind = "docker"`).
|
||||
- **Linux (Debian/Ubuntu):** vedi [docs.docker.com](https://docs.docker.com/engine/install/ubuntu/)
|
||||
- **Linux (Fedora/RHEL):** vedi [docs.docker.com](https://docs.docker.com/engine/install/fedora/)
|
||||
- **macOS:** installa Docker Desktop via [docker.com/products/docker-desktop](https://www.docker.com/products/docker-desktop/)
|
||||
|
||||
</details>
|
||||
|
||||
## Avvio Rapido
|
||||
|
||||
### Opzione 1: Configurazione automatizzata (consigliata)
|
||||
|
||||
Lo script `bootstrap.sh` installa Rust, clona ZeroClaw, lo compila, e configura il tuo ambiente di sviluppo iniziale:
|
||||
|
||||
```bash
|
||||
curl -fsSL https://raw.githubusercontent.com/zeroclaw-labs/zeroclaw/master/bootstrap.sh | bash
|
||||
```
|
||||
|
||||
Questo:
|
||||
|
||||
1. Installerà Rust (se non presente)
|
||||
2. Clonerà il repository ZeroClaw
|
||||
3. Compilerà ZeroClaw in modalità release
|
||||
4. Installerà `zeroclaw` in `~/.cargo/bin/`
|
||||
5. Creerà la struttura del workspace di default in `~/.zeroclaw/workspace/`
|
||||
6. Genererà un file di configurazione iniziale `~/.zeroclaw/workspace/config.toml`
|
||||
|
||||
Dopo il bootstrap, ricarica la tua shell o esegui `source ~/.cargo/env` per usare il comando `zeroclaw` globalmente.
|
||||
|
||||
### Opzione 2: Installazione manuale
|
||||
|
||||
<details>
|
||||
<summary><strong>Clicca per vedere i passaggi di installazione manuale</strong></summary>
|
||||
|
||||
```bash
|
||||
# 1. Clona il repository
|
||||
git clone https://github.com/zeroclaw-labs/zeroclaw.git
|
||||
cd zeroclaw
|
||||
|
||||
# 2. Compila in release
|
||||
cargo build --release --locked
|
||||
|
||||
# 3. Installa il binario
|
||||
cargo install --path . --locked
|
||||
|
||||
# 4. Inizializza il workspace
|
||||
zeroclaw init
|
||||
|
||||
# 5. Verifica l'installazione
|
||||
zeroclaw --version
|
||||
zeroclaw status
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Dopo l'installazione
|
||||
|
||||
Una volta installato (via bootstrap o manualmente), dovresti vedere:
|
||||
|
||||
```
|
||||
~/.zeroclaw/workspace/
|
||||
├── config.toml # Configurazione principale
|
||||
├── .pairing # Segreti di pairing (generati al primo avvio)
|
||||
├── logs/ # Log di daemon/agent
|
||||
├── skills/ # Competenze personalizzate
|
||||
└── memory/ # Archiviazione contesto conversazionale
|
||||
```
|
||||
|
||||
**Prossimi passi:**
|
||||
|
||||
1. Configura i tuoi provider AI in `~/.zeroclaw/workspace/config.toml`
|
||||
2. Controlla la [riferimento configurazione](docs/config-reference.md) per opzioni avanzate
|
||||
3. Avvia l'agente: `zeroclaw agent start`
|
||||
4. Testa tramite il tuo canale preferito (vedi [riferimento canali](docs/channels-reference.md))
|
||||
|
||||
## Configurazione
|
||||
|
||||
Modifica `~/.zeroclaw/workspace/config.toml` per configurare provider, canali e comportamento del sistema.
|
||||
|
||||
### Riferimento Configurazione Rapida
|
||||
|
||||
```toml
|
||||
[providers.anthropic]
|
||||
api_key = "sk-ant-..."
|
||||
model = "claude-sonnet-4-20250514"
|
||||
|
||||
[providers.openai]
|
||||
api_key = "sk-..."
|
||||
model = "gpt-4o"
|
||||
|
||||
[channels.telegram]
|
||||
enabled = true
|
||||
bot_token = "123456:ABC-DEF..."
|
||||
|
||||
[channels.matrix]
|
||||
enabled = true
|
||||
homeserver_url = "https://matrix.org"
|
||||
username = "@bot:matrix.org"
|
||||
password = "..."
|
||||
|
||||
[memory]
|
||||
kind = "markdown" # o "sqlite" o "none"
|
||||
|
||||
[runtime]
|
||||
kind = "native" # o "docker" (richiede Docker)
|
||||
```
|
||||
|
||||
**Documenti di riferimento completi:**
|
||||
|
||||
- [Riferimento Configurazione](docs/config-reference.md) — tutte le impostazioni, validazioni, valori di default
|
||||
- [Riferimento Provider](docs/providers-reference.md) — configurazioni specifiche per provider AI
|
||||
- [Riferimento Canali](docs/channels-reference.md) — Telegram, Matrix, Slack, Discord e altro
|
||||
- [Operazioni](docs/operations-runbook.md) — monitoraggio in produzione, rotazione segreti, scaling
|
||||
|
||||
### Supporto Runtime (attuale)
|
||||
|
||||
ZeroClaw supporta due backend di esecuzione del codice:
|
||||
|
||||
- **`native`** (default) — esecuzione processo diretta, percorso più veloce, ideale per ambienti fidati
|
||||
- **`docker`** — isolamento container completo, politiche di sicurezza potenziate, richiede Docker
|
||||
|
||||
Usa `runtime.kind = "docker"` se hai bisogno di sandboxing rigoroso o isolamento rete. Vedi [riferimento configurazione](docs/config-reference.md#runtime) per dettagli completi.
|
||||
|
||||
## Comandi
|
||||
|
||||
```bash
|
||||
# Gestione workspace
|
||||
zeroclaw init # Inizializza un nuovo workspace
|
||||
zeroclaw status # Mostra stato daemon/agent
|
||||
zeroclaw config validate # Verifica sintassi e valori di config.toml
|
||||
|
||||
# Gestione daemon
|
||||
zeroclaw daemon start # Avvia il daemon in background
|
||||
zeroclaw daemon stop # Ferma il daemon in esecuzione
|
||||
zeroclaw daemon restart # Riavvia il daemon (ricaricamento config)
|
||||
zeroclaw daemon logs # Mostra log del daemon
|
||||
|
||||
# Gestione agent
|
||||
zeroclaw agent start # Avvia l'agent (richiede daemon in esecuzione)
|
||||
zeroclaw agent stop # Ferma l'agent
|
||||
zeroclaw agent restart # Riavvia l'agent (ricaricamento config)
|
||||
|
||||
# Operazioni di pairing
|
||||
zeroclaw pairing init # Genera un nuovo segreto di pairing
|
||||
zeroclaw pairing rotate # Ruota il segreto di pairing esistente
|
||||
|
||||
# Tunneling (per esposizione pubblica)
|
||||
zeroclaw tunnel start # Avvia un tunnel verso il daemon locale
|
||||
zeroclaw tunnel stop # Ferma il tunnel attivo
|
||||
|
||||
# Diagnostica
|
||||
zeroclaw doctor # Esegue controlli di salute del sistema
|
||||
zeroclaw version # Mostra versione e informazioni di build
|
||||
```
|
||||
|
||||
Vedi [Riferimento Comandi](docs/commands-reference.md) per opzioni ed esempi completi.
|
||||
|
||||
## Collaborazione e Docs
|
||||
|
||||
Inizia con l'hub della documentazione per una mappa basata sui task:
|
||||
|
||||
- Hub Documentazione: [`docs/README.md`](docs/README.md)
|
||||
- Indice Unificato Docs: [`docs/SUMMARY.md`](docs/SUMMARY.md)
|
||||
- Riferimento Comandi: [`docs/commands-reference.md`](docs/commands-reference.md)
|
||||
- Riferimento Configurazione: [`docs/config-reference.md`](docs/config-reference.md)
|
||||
- Riferimento Provider: [`docs/providers-reference.md`](docs/providers-reference.md)
|
||||
- Riferimento Canali: [`docs/channels-reference.md`](docs/channels-reference.md)
|
||||
- Runbook Operazioni: [`docs/operations-runbook.md`](docs/operations-runbook.md)
|
||||
- Risoluzione Problemi: [`docs/troubleshooting.md`](docs/troubleshooting.md)
|
||||
- Inventario/Classificazione Docs: [`docs/docs-inventory.md`](docs/docs-inventory.md)
|
||||
- Snapshot Triage PR/Issue (al 18 feb. 2026): [`docs/project-triage-snapshot-2026-02-18.md`](docs/project-triage-snapshot-2026-02-18.md)
|
||||
|
||||
Riferimenti principali di collaborazione:
|
||||
|
||||
- Hub Documentazione: [docs/README.md](docs/README.md)
|
||||
- Modello Documentazione: [docs/doc-template.md](docs/doc-template.md)
|
||||
- Checklist Cambio Documentazione: [docs/README.md#4-documentation-change-checklist](docs/README.md#4-documentation-change-checklist)
|
||||
- Riferimento Configurazione Canali: [docs/channels-reference.md](docs/channels-reference.md)
|
||||
- Operazioni Stanze Crittografate Matrix: [docs/matrix-e2ee-guide.md](docs/matrix-e2ee-guide.md)
|
||||
- Guida Contribuzione: [CONTRIBUTING.md](CONTRIBUTING.md)
|
||||
- Politica Workflow PR: [docs/pr-workflow.md](docs/pr-workflow.md)
|
||||
- Playbook Revisore (triage + revisione profonda): [docs/reviewer-playbook.md](docs/reviewer-playbook.md)
|
||||
- Mappa Proprietà e Triage CI: [docs/ci-map.md](docs/ci-map.md)
|
||||
- Politica Divulgazione Sicurezza: [SECURITY.md](SECURITY.md)
|
||||
|
||||
Per distribuzione e operazioni runtime:
|
||||
|
||||
- Guida Distribuzione di Rete: [docs/network-deployment.md](docs/network-deployment.md)
|
||||
- Playbook Agent Proxy: [docs/proxy-agent-playbook.md](docs/proxy-agent-playbook.md)
|
||||
|
||||
## Supportare ZeroClaw
|
||||
|
||||
Se ZeroClaw aiuta il tuo lavoro e desideri supportare lo sviluppo continuo, puoi donare qui:
|
||||
|
||||
<a href="https://buymeacoffee.com/argenistherose"><img src="https://img.shields.io/badge/Buy%20Me%20a%20Coffee-Donate-yellow.svg?style=for-the-badge&logo=buy-me-a-coffee" alt="Offrimi un Caffè" /></a>
|
||||
|
||||
### 🙏 Ringraziamenti Speciali
|
||||
|
||||
Un sincero ringraziamento alle comunità e istituzioni che ispirano e alimentano questo lavoro open-source:
|
||||
|
||||
- **Harvard University** — per favorire la curiosità intellettuale e spingere i confini del possibile.
|
||||
- **MIT** — per difendere la conoscenza aperta, l'open source, e la convinzione che la tecnologia dovrebbe essere accessibile a tutti.
|
||||
- **Sundai Club** — per la comunità, l'energia, e la volontà incessante di costruire cose che contano.
|
||||
- **Il Mondo e Oltre** 🌍✨ — a ogni contributore, sognatore, e costruttore là fuori che rende l'open source una forza per il bene. Questo è per te.
|
||||
|
||||
Costruiamo in open source perché le migliori idee vengono da ovunque. Se stai leggendo questo, ne fai parte. Benvenuto. 🦀❤️
|
||||
|
||||
<!-- BEGIN:RECENT_CONTRIBUTORS -->
|
||||
|
||||
### 🌟 Recent Contributors (v0.3.1)
|
||||
|
||||
3 contributors shipped features, fixes, and improvements in this release cycle:
|
||||
|
||||
- **Argenis**
|
||||
- **argenis de la rosa**
|
||||
- **Claude Opus 4.6**
|
||||
|
||||
Thank you to everyone who opened issues, reviewed PRs, translated docs, and helped test. Every contribution matters. 🦀
|
||||
|
||||
<!-- END:RECENT_CONTRIBUTORS -->
|
||||
|
||||
## ⚠️ Repository Ufficiale e Avviso di Contraffazione
|
||||
|
||||
**Questo è l'unico repository ufficiale di ZeroClaw:**
|
||||
|
||||
> <https://github.com/zeroclaw-labs/zeroclaw>
|
||||
|
||||
Qualsiasi altro repository, organizzazione, dominio o pacchetto che afferma di essere "ZeroClaw" o che implica affiliazione con ZeroClaw Labs è **non autorizzato e non affiliato a questo progetto**. I fork non autorizzati noti saranno elencati in [TRADEMARK.md](TRADEMARK.md).
|
||||
|
||||
Se incontri contraffazione o uso improprio del marchio, per favore [apri una issue](https://github.com/zeroclaw-labs/zeroclaw/issues).
|
||||
|
||||
---
|
||||
|
||||
## Licenza
|
||||
|
||||
ZeroClaw è doppia licenza per massima apertura e protezione dei contributori:
|
||||
|
||||
| Licenza | Casi d'Uso |
|
||||
| ---------------------------- | ------------------------------------------------------------ |
|
||||
| [MIT](LICENSE-MIT) | Open-source, ricerca, accademico, uso personale |
|
||||
| [Apache 2.0](LICENSE-APACHE) | Protezione brevetti, istituzionale, distribuzione commerciale |
|
||||
|
||||
Puoi scegliere una delle due licenze. **I contributori concedono automaticamente diritti sotto entrambe** — vedi [CLA.md](CLA.md) per l'accordo completo dei contributori.
|
||||
|
||||
### Marchio
|
||||
|
||||
Il nome **ZeroClaw** e il logo sono marchi registrati di ZeroClaw Labs. Questa licenza non concede il permesso di usarli per implicare approvazione o affiliazione. Vedi [TRADEMARK.md](TRADEMARK.md) per usi permessi e proibiti.
|
||||
|
||||
### Protezioni dei Contributori
|
||||
|
||||
- **Mantieni i diritti d'autore** dei tuoi contributi
|
||||
- **Concessione brevetti** (Apache 2.0) ti protegge da reclami di brevetti da parte di altri contributori
|
||||
- I tuoi contributi sono **attribuiti permanentemente** nella cronologia dei commit e [NOTICE](NOTICE)
|
||||
- Nessun diritto di marchio viene trasferito contribuendo
|
||||
|
||||
## Contribuire
|
||||
|
||||
Vedi [CONTRIBUTING.md](CONTRIBUTING.md) e [CLA.md](CLA.md). Implementa un trait, invia una PR:
|
||||
|
||||
- Guida workflow CI: [docs/ci-map.md](docs/ci-map.md)
|
||||
- Nuovo `Provider` → `src/providers/`
|
||||
- Nuovo `Channel` → `src/channels/`
|
||||
- Nuovo `Observer` → `src/observability/`
|
||||
- Nuovo `Tool` → `src/tools/`
|
||||
- Nuova `Memory` → `src/memory/`
|
||||
- Nuovo `Tunnel` → `src/tunnel/`
|
||||
- Nuova `Skill` → `~/.zeroclaw/workspace/skills/<n>/`
|
||||
|
||||
---
|
||||
|
||||
**ZeroClaw** — Zero overhead. Zero compromesso. Distribuisci ovunque. Scambia qualsiasi cosa. 🦀
|
||||
|
||||
## Storico Stelle
|
||||
|
||||
<p align="center">
|
||||
<a href="https://www.star-history.com/#zeroclaw-labs/zeroclaw&type=date&legend=top-left">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=zeroclaw-labs/zeroclaw&type=date&theme=dark&legend=top-left" />
|
||||
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=zeroclaw-labs/zeroclaw&type=date&legend=top-left" />
|
||||
<img alt="Grafico Storico Stelle" src="https://api.star-history.com/svg?repos=zeroclaw-labs/zeroclaw&type=date&legend=top-left" />
|
||||
</picture>
|
||||
</a>
|
||||
</p>
|
||||
+68
-114
@@ -1,5 +1,5 @@
|
||||
<p align="center">
|
||||
<img src="zeroclaw.png" alt="ZeroClaw" width="200" />
|
||||
<img src="docs/assets/zeroclaw.png" alt="ZeroClaw" width="200" />
|
||||
</p>
|
||||
|
||||
<h1 align="center">ZeroClaw 🦀(日本語)</h1>
|
||||
@@ -13,20 +13,48 @@
|
||||
<a href="NOTICE"><img src="https://img.shields.io/badge/contributors-27+-green.svg" alt="Contributors" /></a>
|
||||
<a href="https://buymeacoffee.com/argenistherose"><img src="https://img.shields.io/badge/Buy%20Me%20a%20Coffee-Donate-yellow.svg?style=flat&logo=buy-me-a-coffee" alt="Buy Me a Coffee" /></a>
|
||||
<a href="https://x.com/zeroclawlabs?s=21"><img src="https://img.shields.io/badge/X-%40zeroclawlabs-000000?style=flat&logo=x&logoColor=white" alt="X: @zeroclawlabs" /></a>
|
||||
<a href="https://zeroclawlabs.cn/group.jpg"><img src="https://img.shields.io/badge/WeChat-Group-B7D7A8?logo=wechat&logoColor=white" alt="WeChat Group" /></a>
|
||||
<a href="https://www.xiaohongshu.com/user/profile/67cbfc43000000000d008307?xsec_token=AB73VnYnGNx5y36EtnnZfGmAmS-6Wzv8WMuGpfwfkg6Yc%3D&xsec_source=pc_search"><img src="https://img.shields.io/badge/Xiaohongshu-Official-FF2442?style=flat" alt="Xiaohongshu: Official" /></a>
|
||||
<a href="https://t.me/zeroclawlabs"><img src="https://img.shields.io/badge/Telegram-%40zeroclawlabs-26A5E4?style=flat&logo=telegram&logoColor=white" alt="Telegram: @zeroclawlabs" /></a>
|
||||
<a href="https://www.facebook.com/groups/zeroclaw"><img src="https://img.shields.io/badge/Facebook-Group-1877F2?style=flat&logo=facebook&logoColor=white" alt="Facebook Group" /></a>
|
||||
<a href="https://www.reddit.com/r/zeroclawlabs/"><img src="https://img.shields.io/badge/Reddit-r%2Fzeroclawlabs-FF4500?style=flat&logo=reddit&logoColor=white" alt="Reddit: r/zeroclawlabs" /></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
🌐 言語: <a href="README.md">English</a> · <a href="README.zh-CN.md">简体中文</a> · <a href="README.ja.md">日本語</a> · <a href="README.ru.md">Русский</a> · <a href="README.fr.md">Français</a> · <a href="README.vi.md">Tiếng Việt</a>
|
||||
🌐 言語:
|
||||
<a href="README.md">🇺🇸 English</a> ·
|
||||
<a href="README.zh-CN.md">🇨🇳 简体中文</a> ·
|
||||
<a href="README.ja.md">🇯🇵 日本語</a> ·
|
||||
<a href="README.ko.md">🇰🇷 한국어</a> ·
|
||||
<a href="README.vi.md">🇻🇳 Tiếng Việt</a> ·
|
||||
<a href="README.tl.md">🇵🇭 Tagalog</a> ·
|
||||
<a href="README.es.md">🇪🇸 Español</a> ·
|
||||
<a href="README.pt.md">🇧🇷 Português</a> ·
|
||||
<a href="README.it.md">🇮🇹 Italiano</a> ·
|
||||
<a href="README.de.md">🇩🇪 Deutsch</a> ·
|
||||
<a href="README.fr.md">🇫🇷 Français</a> ·
|
||||
<a href="README.ar.md">🇸🇦 العربية</a> ·
|
||||
<a href="README.hi.md">🇮🇳 हिन्दी</a> ·
|
||||
<a href="README.ru.md">🇷🇺 Русский</a> ·
|
||||
<a href="README.bn.md">🇧🇩 বাংলা</a> ·
|
||||
<a href="README.he.md">🇮🇱 עברית</a> ·
|
||||
<a href="README.pl.md">🇵🇱 Polski</a> ·
|
||||
<a href="README.cs.md">🇨🇿 Čeština</a> ·
|
||||
<a href="README.nl.md">🇳🇱 Nederlands</a> ·
|
||||
<a href="README.tr.md">🇹🇷 Türkçe</a> ·
|
||||
<a href="README.uk.md">🇺🇦 Українська</a> ·
|
||||
<a href="README.id.md">🇮🇩 Bahasa Indonesia</a> ·
|
||||
<a href="README.th.md">🇹🇭 ไทย</a> ·
|
||||
<a href="README.ur.md">🇵🇰 اردو</a> ·
|
||||
<a href="README.ro.md">🇷🇴 Română</a> ·
|
||||
<a href="README.sv.md">🇸🇪 Svenska</a> ·
|
||||
<a href="README.el.md">🇬🇷 Ελληνικά</a> ·
|
||||
<a href="README.hu.md">🇭🇺 Magyar</a> ·
|
||||
<a href="README.fi.md">🇫🇮 Suomi</a> ·
|
||||
<a href="README.da.md">🇩🇰 Dansk</a> ·
|
||||
<a href="README.nb.md">🇳🇴 Norsk</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="bootstrap.sh">ワンクリック導入</a> |
|
||||
<a href="docs/getting-started/README.md">導入ガイド</a> |
|
||||
<a href="https://raw.githubusercontent.com/zeroclaw-labs/zeroclaw/master/install.sh">ワンクリック導入</a> |
|
||||
<a href="docs/setup-guides/README.md">導入ガイド</a> |
|
||||
<a href="docs/README.ja.md">ドキュメントハブ</a> |
|
||||
<a href="docs/SUMMARY.md">Docs TOC</a>
|
||||
</p>
|
||||
@@ -34,8 +62,8 @@
|
||||
<p align="center">
|
||||
<strong>クイック分流:</strong>
|
||||
<a href="docs/reference/README.md">参照</a> ·
|
||||
<a href="docs/operations/README.md">運用</a> ·
|
||||
<a href="docs/troubleshooting.md">障害対応</a> ·
|
||||
<a href="docs/ops/README.md">運用</a> ·
|
||||
<a href="docs/ops/troubleshooting.md">障害対応</a> ·
|
||||
<a href="docs/security/README.md">セキュリティ</a> ·
|
||||
<a href="docs/hardware/README.md">ハードウェア</a> ·
|
||||
<a href="docs/contributing/README.md">貢献・CI</a>
|
||||
@@ -47,6 +75,16 @@
|
||||
>
|
||||
> 最終同期日: **2026-02-19**。
|
||||
|
||||
<!-- BEGIN:WHATS_NEW -->
|
||||
|
||||
### 🚀 What's New in v0.3.1 (March 2026)
|
||||
|
||||
| Area | Highlights |
|
||||
|---|---|
|
||||
| ci | add Termux (aarch64-linux-android) release target |
|
||||
|
||||
<!-- END:WHATS_NEW -->
|
||||
|
||||
## 📢 お知らせボード
|
||||
|
||||
重要なお知らせ(互換性破壊変更、セキュリティ告知、メンテナンス時間、リリース阻害事項など)をここに掲載します。
|
||||
@@ -87,7 +125,7 @@ ZeroClaw は、高速・省リソース・高拡張性を重視した自律エ
|
||||
> 注記: ZeroClaw の結果は release ビルドを `/usr/bin/time -l` で計測したものです。OpenClaw は Node.js ランタイムが必要で、ランタイム由来だけで通常は約390MBの追加メモリを要します。NanoBot は Python ランタイムが必要です。PicoClaw と ZeroClaw は静的バイナリです。
|
||||
|
||||
<p align="center">
|
||||
<img src="zero-claw.jpeg" alt="ZeroClaw vs OpenClaw Comparison" width="800" />
|
||||
<img src="docs/assets/zeroclaw-comparison.jpeg" alt="ZeroClaw vs OpenClaw Comparison" width="800" />
|
||||
</p>
|
||||
|
||||
### ローカルで再現可能な測定
|
||||
@@ -113,12 +151,12 @@ README のサンプル値(macOS arm64, 2026-02-18):
|
||||
```bash
|
||||
git clone https://github.com/zeroclaw-labs/zeroclaw.git
|
||||
cd zeroclaw
|
||||
./bootstrap.sh
|
||||
./install.sh
|
||||
```
|
||||
|
||||
環境ごと初期化する場合: `./bootstrap.sh --install-system-deps --install-rust`(システムパッケージで `sudo` が必要な場合があります)。
|
||||
環境ごと初期化する場合: `./install.sh --install-system-deps --install-rust`(システムパッケージで `sudo` が必要な場合があります)。
|
||||
|
||||
詳細は [`docs/one-click-bootstrap.md`](docs/one-click-bootstrap.md) を参照してください。
|
||||
詳細は [`docs/setup-guides/one-click-bootstrap.md`](docs/setup-guides/one-click-bootstrap.md) を参照してください。
|
||||
|
||||
## クイックスタート
|
||||
|
||||
@@ -135,7 +173,7 @@ cargo build --release --locked
|
||||
cargo install --path . --force --locked
|
||||
|
||||
zeroclaw onboard --api-key sk-... --provider openrouter
|
||||
zeroclaw onboard --interactive
|
||||
zeroclaw onboard
|
||||
|
||||
zeroclaw agent -m "Hello, ZeroClaw!"
|
||||
|
||||
@@ -190,111 +228,27 @@ zeroclaw agent --provider openai-codex --auth-profile openai-codex:work -m "hell
|
||||
zeroclaw agent --provider anthropic -m "hello"
|
||||
```
|
||||
|
||||
## アーキテクチャ
|
||||
|
||||
すべてのサブシステムは **Trait** — 設定変更だけで実装を差し替え可能、コード変更不要。
|
||||
|
||||
<p align="center">
|
||||
<img src="docs/architecture.svg" alt="ZeroClaw アーキテクチャ" width="900" />
|
||||
</p>
|
||||
|
||||
| サブシステム | Trait | 内蔵実装 | 拡張方法 |
|
||||
|-------------|-------|----------|----------|
|
||||
| **AI モデル** | `Provider` | `zeroclaw providers` で確認(現在 28 個の組み込み + エイリアス、カスタムエンドポイント対応) | `custom:https://your-api.com`(OpenAI 互換)または `anthropic-custom:https://your-api.com` |
|
||||
| **チャネル** | `Channel` | CLI, Telegram, Discord, Slack, Mattermost, iMessage, Matrix, Signal, WhatsApp, Linq, Email, IRC, Lark, DingTalk, QQ, Webhook | 任意のメッセージ API |
|
||||
| **メモリ** | `Memory` | SQLite ハイブリッド検索, PostgreSQL バックエンド, Lucid ブリッジ, Markdown ファイル, 明示的 `none` バックエンド, スナップショット/復元, オプション応答キャッシュ | 任意の永続化バックエンド |
|
||||
| **ツール** | `Tool` | shell/file/memory, cron/schedule, git, pushover, browser, http_request, screenshot/image_info, composio (opt-in), delegate, ハードウェアツール | 任意の機能 |
|
||||
| **オブザーバビリティ** | `Observer` | Noop, Log, Multi | Prometheus, OTel |
|
||||
| **ランタイム** | `RuntimeAdapter` | Native, Docker(サンドボックス) | adapter 経由で追加可能;未対応の kind は即座にエラー |
|
||||
| **セキュリティ** | `SecurityPolicy` | Gateway ペアリング, サンドボックス, allowlist, レート制限, ファイルシステムスコープ, 暗号化シークレット | — |
|
||||
| **アイデンティティ** | `IdentityConfig` | OpenClaw (markdown), AIEOS v1.1 (JSON) | 任意の ID フォーマット |
|
||||
| **トンネル** | `Tunnel` | None, Cloudflare, Tailscale, ngrok, Custom | 任意のトンネルバイナリ |
|
||||
| **ハートビート** | Engine | HEARTBEAT.md 定期タスク | — |
|
||||
| **スキル** | Loader | TOML マニフェスト + SKILL.md インストラクション | コミュニティスキルパック |
|
||||
| **インテグレーション** | Registry | 9 カテゴリ、70 件以上の連携 | プラグインシステム |
|
||||
|
||||
### ランタイムサポート(現状)
|
||||
|
||||
- ✅ 現在サポート: `runtime.kind = "native"` または `runtime.kind = "docker"`
|
||||
- 🚧 計画中(未実装): WASM / エッジランタイム
|
||||
|
||||
未対応の `runtime.kind` が設定された場合、ZeroClaw は native へのサイレントフォールバックではなく、明確なエラーで終了します。
|
||||
|
||||
### メモリシステム(フルスタック検索エンジン)
|
||||
|
||||
すべて自社実装、外部依存ゼロ — Pinecone、Elasticsearch、LangChain 不要:
|
||||
|
||||
| レイヤー | 実装 |
|
||||
|---------|------|
|
||||
| **ベクトル DB** | Embeddings を SQLite に BLOB として保存、コサイン類似度検索 |
|
||||
| **キーワード検索** | FTS5 仮想テーブル、BM25 スコアリング |
|
||||
| **ハイブリッドマージ** | カスタム重み付きマージ関数(`vector.rs`) |
|
||||
| **Embeddings** | `EmbeddingProvider` trait — OpenAI、カスタム URL、または noop |
|
||||
| **チャンキング** | 行ベースの Markdown チャンカー(見出し構造保持) |
|
||||
| **キャッシュ** | SQLite `embedding_cache` テーブル、LRU エビクション |
|
||||
| **安全な再インデックス** | FTS5 再構築 + 欠落ベクトルの再埋め込みをアトミックに実行 |
|
||||
|
||||
Agent はツール経由でメモリの呼び出し・保存・管理を自動的に行います。
|
||||
|
||||
```toml
|
||||
[memory]
|
||||
backend = "sqlite" # "sqlite", "lucid", "postgres", "markdown", "none"
|
||||
auto_save = true
|
||||
embedding_provider = "none" # "none", "openai", "custom:https://..."
|
||||
vector_weight = 0.7
|
||||
keyword_weight = 0.3
|
||||
```
|
||||
|
||||
## セキュリティのデフォルト
|
||||
|
||||
- Gateway の既定バインド: `127.0.0.1:42617`
|
||||
- 既定でペアリング必須: `require_pairing = true`
|
||||
- 既定で公開バインド禁止: `allow_public_bind = false`
|
||||
- Channel allowlist:
|
||||
- `[]` は deny-by-default
|
||||
- `["*"]` は allow all(意図的に使う場合のみ)
|
||||
|
||||
## 設定例
|
||||
|
||||
```toml
|
||||
api_key = "sk-..."
|
||||
default_provider = "openrouter"
|
||||
default_model = "anthropic/claude-sonnet-4-6"
|
||||
default_temperature = 0.7
|
||||
|
||||
[memory]
|
||||
backend = "sqlite"
|
||||
auto_save = true
|
||||
embedding_provider = "none"
|
||||
|
||||
[gateway]
|
||||
host = "127.0.0.1"
|
||||
port = 42617
|
||||
require_pairing = true
|
||||
allow_public_bind = false
|
||||
```
|
||||
|
||||
## ドキュメント入口
|
||||
|
||||
- ドキュメントハブ(英語): [`docs/README.md`](docs/README.md)
|
||||
- 統合 TOC: [`docs/SUMMARY.md`](docs/SUMMARY.md)
|
||||
- ドキュメントハブ(日本語): [`docs/README.ja.md`](docs/README.ja.md)
|
||||
- コマンドリファレンス: [`docs/commands-reference.md`](docs/commands-reference.md)
|
||||
- 設定リファレンス: [`docs/config-reference.md`](docs/config-reference.md)
|
||||
- Provider リファレンス: [`docs/providers-reference.md`](docs/providers-reference.md)
|
||||
- Channel リファレンス: [`docs/channels-reference.md`](docs/channels-reference.md)
|
||||
- 運用ガイド(Runbook): [`docs/operations-runbook.md`](docs/operations-runbook.md)
|
||||
- トラブルシューティング: [`docs/troubleshooting.md`](docs/troubleshooting.md)
|
||||
- ドキュメント一覧 / 分類: [`docs/docs-inventory.md`](docs/docs-inventory.md)
|
||||
- プロジェクト triage スナップショット: [`docs/project-triage-snapshot-2026-02-18.md`](docs/project-triage-snapshot-2026-02-18.md)
|
||||
|
||||
## コントリビュート / ライセンス
|
||||
|
||||
- Contributing: [`CONTRIBUTING.md`](CONTRIBUTING.md)
|
||||
- PR Workflow: [`docs/pr-workflow.md`](docs/pr-workflow.md)
|
||||
- Reviewer Playbook: [`docs/reviewer-playbook.md`](docs/reviewer-playbook.md)
|
||||
- PR Workflow: [`docs/contributing/pr-workflow.md`](docs/contributing/pr-workflow.md)
|
||||
- Reviewer Playbook: [`docs/contributing/reviewer-playbook.md`](docs/contributing/reviewer-playbook.md)
|
||||
- License: MIT or Apache 2.0([`LICENSE-MIT`](LICENSE-MIT), [`LICENSE-APACHE`](LICENSE-APACHE), [`NOTICE`](NOTICE))
|
||||
|
||||
<!-- BEGIN:RECENT_CONTRIBUTORS -->
|
||||
|
||||
### 🌟 Recent Contributors (v0.3.1)
|
||||
|
||||
3 contributors shipped features, fixes, and improvements in this release cycle:
|
||||
|
||||
- **Argenis**
|
||||
- **argenis de la rosa**
|
||||
- **Claude Opus 4.6**
|
||||
|
||||
Thank you to everyone who opened issues, reviewed PRs, translated docs, and helped test. Every contribution matters. 🦀
|
||||
|
||||
<!-- END:RECENT_CONTRIBUTORS -->
|
||||
|
||||
---
|
||||
|
||||
詳細仕様(全コマンド、アーキテクチャ、API 仕様、開発フロー)は英語版の [`README.md`](README.md) を参照してください。
|
||||
|
||||
+501
@@ -0,0 +1,501 @@
|
||||
<p align="center">
|
||||
<img src="zeroclaw.png" alt="ZeroClaw" width="200" />
|
||||
</p>
|
||||
|
||||
<h1 align="center">ZeroClaw 🦀</h1>
|
||||
|
||||
<p align="center">
|
||||
<strong>오버헤드 없음. 타협 없음. 100% Rust. 100% 독립적.</strong><br>
|
||||
⚡️ <strong>$10 하드웨어에서 <5MB RAM으로 실행: OpenClaw보다 99% 적은 메모리, Mac mini보다 98% 저렴!</strong>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="LICENSE-APACHE"><img src="https://img.shields.io/badge/license-MIT%20OR%20Apache%202.0-blue.svg" alt="License: MIT OR Apache-2.0" /></a>
|
||||
<a href="NOTICE"><img src="https://img.shields.io/badge/contributors-27+-green.svg" alt="Contributors" /></a>
|
||||
<a href="https://buymeacoffee.com/argenistherose"><img src="https://img.shields.io/badge/Buy%20Me%20a%20Coffee-Donate-yellow.svg?style=flat&logo=buy-me-a-coffee" alt="Buy Me a Coffee" /></a>
|
||||
<a href="https://x.com/zeroclawlabs?s=21"><img src="https://img.shields.io/badge/X-%40zeroclawlabs-000000?style=flat&logo=x&logoColor=white" alt="X: @zeroclawlabs" /></a>
|
||||
<a href="https://zeroclawlabs.cn/group.jpg"><img src="https://img.shields.io/badge/WeChat-Group-B7D7A8?logo=wechat&logoColor=white" alt="WeChat Group" /></a>
|
||||
<a href="https://www.xiaohongshu.com/user/profile/67cbfc43000000000d008307?xsec_token=AB73VnYnGNx5y36EtnnZfGmAmS-6Wzv8WMuGpfwfkg6Yc%3D&xsec_source=pc_search"><img src="https://img.shields.io/badge/Xiaohongshu-Official-FF2442?style=flat" alt="Xiaohongshu: Official" /></a>
|
||||
<a href="https://t.me/zeroclawlabs"><img src="https://img.shields.io/badge/Telegram-%40zeroclawlabs-26A5E4?style=flat&logo=telegram&logoColor=white" alt="Telegram: @zeroclawlabs" /></a>
|
||||
<a href="https://www.facebook.com/groups/zeroclaw"><img src="https://img.shields.io/badge/Facebook-Group-1877F2?style=flat&logo=facebook&logoColor=white" alt="Facebook Group" /></a>
|
||||
<a href="https://www.reddit.com/r/zeroclawlabs/"><img src="https://img.shields.io/badge/Reddit-r%2Fzeroclawlabs-FF4500?style=flat&logo=reddit&logoColor=white" alt="Reddit: r/zeroclawlabs" /></a>
|
||||
</p>
|
||||
<p align="center">
|
||||
Harvard, MIT, 그리고 Sundai.Club 커뮤니티의 학생들과 멤버들이 만들었습니다.
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
🌐 <strong>언어:</strong><a href="README.md">🇺🇸 English</a> ·
|
||||
<a href="README.zh-CN.md">🇨🇳 简体中文</a> ·
|
||||
<a href="README.ja.md">🇯🇵 日本語</a> ·
|
||||
<a href="README.ko.md">🇰🇷 한국어</a> ·
|
||||
<a href="README.vi.md">🇻🇳 Tiếng Việt</a> ·
|
||||
<a href="README.tl.md">🇵🇭 Tagalog</a> ·
|
||||
<a href="README.es.md">🇪🇸 Español</a> ·
|
||||
<a href="README.pt.md">🇧🇷 Português</a> ·
|
||||
<a href="README.it.md">🇮🇹 Italiano</a> ·
|
||||
<a href="README.de.md">🇩🇪 Deutsch</a> ·
|
||||
<a href="README.fr.md">🇫🇷 Français</a> ·
|
||||
<a href="README.ar.md">🇸🇦 العربية</a> ·
|
||||
<a href="README.hi.md">🇮🇳 हिन्दी</a> ·
|
||||
<a href="README.ru.md">🇷🇺 Русский</a> ·
|
||||
<a href="README.bn.md">🇧🇩 বাংলা</a> ·
|
||||
<a href="README.he.md">🇮🇱 עברית</a> ·
|
||||
<a href="README.pl.md">🇵🇱 Polski</a> ·
|
||||
<a href="README.cs.md">🇨🇿 Čeština</a> ·
|
||||
<a href="README.nl.md">🇳🇱 Nederlands</a> ·
|
||||
<a href="README.tr.md">🇹🇷 Türkçe</a> ·
|
||||
<a href="README.uk.md">🇺🇦 Українська</a> ·
|
||||
<a href="README.id.md">🇮🇩 Bahasa Indonesia</a> ·
|
||||
<a href="README.th.md">🇹🇭 ไทย</a> ·
|
||||
<a href="README.ur.md">🇵🇰 اردو</a> ·
|
||||
<a href="README.ro.md">🇷🇴 Română</a> ·
|
||||
<a href="README.sv.md">🇸🇪 Svenska</a> ·
|
||||
<a href="README.el.md">🇬🇷 Ελληνικά</a> ·
|
||||
<a href="README.hu.md">🇭🇺 Magyar</a> ·
|
||||
<a href="README.fi.md">🇫🇮 Suomi</a> ·
|
||||
<a href="README.da.md">🇩🇰 Dansk</a> ·
|
||||
<a href="README.nb.md">🇳🇴 Norsk</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="#빠른-시작">빠른 시작</a> |
|
||||
<a href="bootstrap.sh">원클릭 설정</a> |
|
||||
<a href="docs/README.md">문서 허브</a> |
|
||||
<a href="docs/SUMMARY.md">문서 목차</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<strong>빠른 접근:</strong>
|
||||
<a href="docs/reference/README.md">참조</a> ·
|
||||
<a href="docs/operations/README.md">운영</a> ·
|
||||
<a href="docs/troubleshooting.md">문제 해결</a> ·
|
||||
<a href="docs/security/README.md">보안</a> ·
|
||||
<a href="docs/hardware/README.md">하드웨어</a> ·
|
||||
<a href="docs/contributing/README.md">기여하기</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<strong>빠르고 가벼우며 완전히 자율적인 AI 어시스턴트 인프라</strong><br />
|
||||
어디서나 배포. 무엇이든 교체.
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
ZeroClaw는 에이전트 워크플로우를 위한 <strong>런타임 운영체제</strong>입니다 — 모델, 도구, 메모리, 실행을 추상화하여 한 번 구축하고 어디서나 실행할 수 있는 인프라입니다.
|
||||
</p>
|
||||
|
||||
<p align="center"><code>트레이트 기반 아키텍처 · 기본 보안 런타임 · 교체 가능한 제공자/채널/도구 · 모든 것이 플러그 가능</code></p>
|
||||
|
||||
<!-- BEGIN:WHATS_NEW -->
|
||||
|
||||
### 🚀 What's New in v0.3.1 (March 2026)
|
||||
|
||||
| Area | Highlights |
|
||||
|---|---|
|
||||
| ci | add Termux (aarch64-linux-android) release target |
|
||||
|
||||
<!-- END:WHATS_NEW -->
|
||||
|
||||
### 📢 공지사항
|
||||
|
||||
이 표를 사용하여 중요한 공지사항(호환성 변경, 보안 공지, 유지보수 기간, 버전 차단)을 확인하세요.
|
||||
|
||||
| 날짜 (UTC) | 수준 | 공지 | 조치 |
|
||||
| ---------- | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| 2026-02-19 | _중요_ | 우리는 `openagen/zeroclaw` 또는 `zeroclaw.org`와 **관련이 없습니다**. `zeroclaw.org` 도메인은 현재 `openagen/zeroclaw` 포크를 가리키고 있으며, 이 도메인/저장소는 우리의 공식 웹사이트/프로젝트를 사칭하고 있습니다. | 이 소스의 정보, 바이너리, 펀딩, 공지를 신뢰하지 마세요. [이 저장소](https://github.com/zeroclaw-labs/zeroclaw)와 우리의 확인된 소셜 계정만 사용하세요. |
|
||||
| 2026-02-21 | _중요_ | 우리의 공식 웹사이트가 이제 온라인입니다: [zeroclawlabs.ai](https://zeroclawlabs.ai). 기다려주셔서 감사합니다. 여전히 사칭 시도가 감지되고 있습니다: 공식 채널을 통해 게시되지 않은 ZeroClaw 이름의 모든 투자/펀딩 활동에 참여하지 마세요. | [이 저장소](https://github.com/zeroclaw-labs/zeroclaw)를 유일한 진실의 원천으로 사용하세요. [X (@zeroclawlabs)](https://x.com/zeroclawlabs?s=21), [Telegram (@zeroclawlabs)](https://t.me/zeroclawlabs), [Facebook (그룹)](https://www.facebook.com/groups/zeroclaw), [Reddit (r/zeroclawlabs)](https://www.reddit.com/r/zeroclawlabs/), 그리고 [Xiaohongshu](https://www.xiaohongshu.com/user/profile/67cbfc43000000000d008307?xsec_token=AB73VnYnGNx5y36EtnnZfGmAmS-6Wzv8WMuGpfwfkg6Yc%3D&xsec_source=pc_search)를 팔로우하여 공식 업데이트를 받으세요. |
|
||||
| 2026-02-19 | _중요_ | Anthropic이 2026-02-19에 인증 및 자격증명 사용 약관을 업데이트했습니다. OAuth 인증(Free, Pro, Max)은 Claude Code 및 Claude.ai 전용입니다. 다른 제품, 도구 또는 서비스(Agent SDK 포함)에서 Claude Free/Pro/Max OAuth 토큰을 사용하는 것은 허용되지 않으며 소비자 이용약관을 위반할 수 있습니다. | 잠재적인 손실을 방지하기 위해 일시적으로 Claude Code OAuth 통합을 피하세요. 원본 조항: [Authentication and Credential Use](https://code.claude.com/docs/en/legal-and-compliance#authentication-and-credential-use). |
|
||||
|
||||
### ✨ 기능
|
||||
|
||||
- 🏎️ **기본 경량 런타임:** 일반적인 CLI 워크플로우와 상태 명령이 프로덕션 빌드에서 몇 메가바이트의 메모리 공간 내에서 실행됩니다.
|
||||
- 💰 **비용 효율적인 배포:** 무거운 런타임 의존성 없이 저비용 보드 및 소규모 클라우드 인스턴스를 위해 설계되었습니다.
|
||||
- ⚡ **빠른 콜드 스타트:** 단일 Rust 바이너리 런타임이 일상적인 운영을 위해 거의 즉각적인 명령 및 데몬 시작을 유지합니다.
|
||||
- 🌍 **이식 가능한 아키텍처:** 교체 가능한 제공자/채널/도구로 ARM, x86, RISC-V에서 단일 바이너리 워크플로우.
|
||||
|
||||
### 왜 팀들이 ZeroClaw를 선택하나요
|
||||
|
||||
- **기본 경량:** 작은 Rust 바이너리, 빠른 시작, 낮은 메모리 공간.
|
||||
- **기본 보안:** 페어링, 엄격한 샌드박싱, 명시적 허용 목록, 작업공간 범위.
|
||||
- **완전히 교체 가능:** 핵심 시스템이 트레이트입니다(제공자, 채널, 도구, 메모리, 터널).
|
||||
- **벤더 락인 없음:** OpenAI 호환 제공자 지원 + 플러그 가능한 사용자 정의 엔드포인트.
|
||||
|
||||
## 벤치마크 스냅샷 (ZeroClaw vs OpenClaw, 재현 가능)
|
||||
|
||||
로컬 머신에서 빠른 벤치마크(macOS arm64, 2026년 2월) 0.8 GHz 엣지 하드웨어로 정규화됨.
|
||||
|
||||
| | OpenClaw | NanoBot | PicoClaw | ZeroClaw 🦀 |
|
||||
| ---------------------------- | ------------- | -------------- | --------------- | --------------------- |
|
||||
| **언어** | TypeScript | Python | Go | **Rust** |
|
||||
| **RAM** | > 1 GB | > 100 MB | < 10 MB | **< 5 MB** |
|
||||
| **시작 (0.8 GHz 코어)** | > 500s | > 30s | < 1s | **< 10ms** |
|
||||
| **바이너리 크기** | ~28 MB (dist) | N/A (Scripts) | ~8 MB | **3.4 MB** |
|
||||
| **비용** | Mac Mini $599 | Linux SBC ~$50 | Linux 보드 $10 | **모든 하드웨어 $10** |
|
||||
|
||||
> 참고: ZeroClaw 결과는 `/usr/bin/time -l`을 사용한 프로덕션 빌드에서 측정되었습니다. OpenClaw는 Node.js 런타임이 필요하며(일반적으로 ~390MB 추가 메모리 오버헤드), NanoBot은 Python 런타임이 필요합니다. PicoClaw와 ZeroClaw는 정적 바이너리입니다. 위 RAM 수치는 런타임 메모리이며, 빌드 시간 컴파일 요구사항은 더 높습니다.
|
||||
|
||||
<p align="center">
|
||||
<img src="zero-claw.jpeg" alt="ZeroClaw vs OpenClaw 비교" width="800" />
|
||||
</p>
|
||||
|
||||
### 재현 가능한 로컬 측정
|
||||
|
||||
벤치마크 주장은 코드와 툴체인의 발전에 따라 달라질 수 있으므로 항상 현재 빌드를 로컬에서 측정하세요:
|
||||
|
||||
```bash
|
||||
cargo build --release
|
||||
ls -lh target/release/zeroclaw
|
||||
|
||||
/usr/bin/time -l target/release/zeroclaw --help
|
||||
/usr/bin/time -l target/release/zeroclaw status
|
||||
```
|
||||
|
||||
샘플 예시(macOS arm64, 2026년 2월 18일 측정):
|
||||
|
||||
- 릴리스 바이너리 크기: `8.8M`
|
||||
- `zeroclaw --help`: 실제 시간 약 `0.02s`, 최대 메모리 공간 ~`3.9 MB`
|
||||
- `zeroclaw status`: 실제 시간 약 `0.01s`, 최대 메모리 공간 ~`4.1 MB`
|
||||
|
||||
## 사전 요구사항
|
||||
|
||||
<details>
|
||||
<summary><strong>Windows</strong></summary>
|
||||
|
||||
### Windows — 필수
|
||||
|
||||
1. **Visual Studio Build Tools**(MSVC 링커 및 Windows SDK 제공):
|
||||
|
||||
```powershell
|
||||
winget install Microsoft.VisualStudio.2022.BuildTools
|
||||
```
|
||||
|
||||
설치 중(또는 Visual Studio Installer를 통해) **"C++를 사용한 데스크톱 개발"** 워크로드를 선택하세요.
|
||||
|
||||
2. **Rust 툴체인:**
|
||||
|
||||
```powershell
|
||||
winget install Rustlang.Rustup
|
||||
```
|
||||
|
||||
설치 후, 새 터미널을 열고 `rustup default stable`을 실행하여 안정적인 툴체인이 활성화되어 있는지 확인하세요.
|
||||
|
||||
3. **확인:** 둘 다 작동하는지 확인:
|
||||
```powershell
|
||||
rustc --version
|
||||
cargo --version
|
||||
```
|
||||
|
||||
### Windows — 선택사항
|
||||
|
||||
- **Docker Desktop** — [Docker 샌드박스 런타임](#현재-런타임-지원)을 사용하는 경우에만 필요(`runtime.kind = "docker"`). `winget install Docker.DockerDesktop`을 통해 설치.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>Linux / macOS</strong></summary>
|
||||
|
||||
### Linux / macOS — 필수
|
||||
|
||||
1. **필수 빌드 도구:**
|
||||
- **Linux (Debian/Ubuntu):** `sudo apt install build-essential pkg-config`
|
||||
- **Linux (Fedora/RHEL):** `sudo dnf group install development-tools && sudo dnf install pkg-config`
|
||||
- **macOS:** Xcode Command Line Tools 설치: `xcode-select --install`
|
||||
|
||||
2. **Rust 툴체인:**
|
||||
|
||||
```bash
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||
```
|
||||
|
||||
자세한 내용은 [rustup.rs](https://rustup.rs)를 참조하세요.
|
||||
|
||||
3. **확인:**
|
||||
```bash
|
||||
rustc --version
|
||||
cargo --version
|
||||
```
|
||||
|
||||
### Linux / macOS — 선택사항
|
||||
|
||||
- **Docker** — [Docker 샌드박스 런타임](#현재-런타임-지원)을 사용하는 경우에만 필요(`runtime.kind = "docker"`).
|
||||
- **Linux (Debian/Ubuntu):** [docs.docker.com](https://docs.docker.com/engine/install/ubuntu/) 참조
|
||||
- **Linux (Fedora/RHEL):** [docs.docker.com](https://docs.docker.com/engine/install/fedora/) 참조
|
||||
- **macOS:** [docker.com/products/docker-desktop](https://www.docker.com/products/docker-desktop/)에서 Docker Desktop 설치
|
||||
|
||||
</details>
|
||||
|
||||
## 빠른 시작
|
||||
|
||||
### 옵션 1: 자동 설정 (권장)
|
||||
|
||||
`bootstrap.sh` 스크립트는 Rust를 설치하고, ZeroClaw를 클론하고, 컴파일하고, 초기 개발 환경을 설정합니다:
|
||||
|
||||
```bash
|
||||
curl -fsSL https://raw.githubusercontent.com/zeroclaw-labs/zeroclaw/master/bootstrap.sh | bash
|
||||
```
|
||||
|
||||
이 작업은 다음을 수행합니다:
|
||||
|
||||
1. Rust 설치 (없는 경우)
|
||||
2. ZeroClaw 저장소 클론
|
||||
3. ZeroClaw를 릴리스 모드로 컴파일
|
||||
4. `~/.cargo/bin/`에 `zeroclaw` 설치
|
||||
5. `~/.zeroclaw/workspace/`에 기본 작업공간 구조 생성
|
||||
6. 시작용 `~/.zeroclaw/workspace/config.toml` 구성 파일 생성
|
||||
|
||||
부트스트랩 후, 셸을 다시 로드하거나 `source ~/.cargo/env`를 실행하여 `zeroclaw` 명령을 전역으로 사용하세요.
|
||||
|
||||
### 옵션 2: 수동 설치
|
||||
|
||||
<details>
|
||||
<summary><strong>클릭하여 수동 설치 단계 보기</strong></summary>
|
||||
|
||||
```bash
|
||||
# 1. 저장소 클론
|
||||
git clone https://github.com/zeroclaw-labs/zeroclaw.git
|
||||
cd zeroclaw
|
||||
|
||||
# 2. 릴리스로 컴파일
|
||||
cargo build --release --locked
|
||||
|
||||
# 3. 바이너리 설치
|
||||
cargo install --path . --locked
|
||||
|
||||
# 4. 작업공간 초기화
|
||||
zeroclaw init
|
||||
|
||||
# 5. 설치 확인
|
||||
zeroclaw --version
|
||||
zeroclaw status
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### 설치 후
|
||||
|
||||
설치 후(부트스트랩 또는 수동), 다음이 표시되어야 합니다:
|
||||
|
||||
```
|
||||
~/.zeroclaw/workspace/
|
||||
├── config.toml # 메인 구성
|
||||
├── .pairing # 페어링 시크릿 (첫 실행 시 생성)
|
||||
├── logs/ # 데몬/에이전트 로그
|
||||
├── skills/ # 사용자 정의 스킬
|
||||
└── memory/ # 대화 컨텍스트 저장소
|
||||
```
|
||||
|
||||
**다음 단계:**
|
||||
|
||||
1. `~/.zeroclaw/workspace/config.toml`에서 AI 제공자 구성
|
||||
2. 고급 옵션은 [구성 참조](docs/config-reference.md) 확인
|
||||
3. 에이전트 시작: `zeroclaw agent start`
|
||||
4. 선호하는 채널을 통해 테스트 ([채널 참조](docs/channels-reference.md) 참조)
|
||||
|
||||
## 구성
|
||||
|
||||
제공자, 채널 및 시스템 동작을 구성하려면 `~/.zeroclaw/workspace/config.toml`을 편집하세요.
|
||||
|
||||
### 빠른 구성 참조
|
||||
|
||||
```toml
|
||||
[providers.anthropic]
|
||||
api_key = "sk-ant-..."
|
||||
model = "claude-sonnet-4-20250514"
|
||||
|
||||
[providers.openai]
|
||||
api_key = "sk-..."
|
||||
model = "gpt-4o"
|
||||
|
||||
[channels.telegram]
|
||||
enabled = true
|
||||
bot_token = "123456:ABC-DEF..."
|
||||
|
||||
[channels.matrix]
|
||||
enabled = true
|
||||
homeserver_url = "https://matrix.org"
|
||||
username = "@bot:matrix.org"
|
||||
password = "..."
|
||||
|
||||
[memory]
|
||||
kind = "markdown" # 또는 "sqlite" 또는 "none"
|
||||
|
||||
[runtime]
|
||||
kind = "native" # 또는 "docker" (Docker 필요)
|
||||
```
|
||||
|
||||
**전체 참조 문서:**
|
||||
|
||||
- [구성 참조](docs/config-reference.md) — 모든 설정, 검증, 기본값
|
||||
- [제공자 참조](docs/providers-reference.md) — AI 제공자별 구성
|
||||
- [채널 참조](docs/channels-reference.md) — Telegram, Matrix, Slack, Discord 등
|
||||
- [운영](docs/operations-runbook.md) — 프로덕션 모니터링, 시크릿 교체, 스케일링
|
||||
|
||||
### 현재 런타임 지원
|
||||
|
||||
ZeroClaw는 두 가지 코드 실행 백엔드를 지원합니다:
|
||||
|
||||
- **`native`**(기본값) — 직접 프로세스 실행, 가장 빠른 경로, 신뢰할 수 있는 환경에 이상적
|
||||
- **`docker`** — 전체 컨테이너 격리, 강화된 보안 정책, Docker 필요
|
||||
|
||||
엄격한 샌드박싱이나 네트워크 격리가 필요한 경우 `runtime.kind = "docker"`를 사용하세요. 자세한 내용은 [구성 참조](docs/config-reference.md#runtime)를 참조하세요.
|
||||
|
||||
## 명령어
|
||||
|
||||
```bash
|
||||
# 작업공간 관리
|
||||
zeroclaw init # 새 작업공간 초기화
|
||||
zeroclaw status # 데몬/에이전트 상태 표시
|
||||
zeroclaw config validate # config.toml 구문 및 값 확인
|
||||
|
||||
# 데몬 관리
|
||||
zeroclaw daemon start # 백그라운드에서 데몬 시작
|
||||
zeroclaw daemon stop # 실행 중인 데몬 중지
|
||||
zeroclaw daemon restart # 데몬 재시작 (구성 다시 로드)
|
||||
zeroclaw daemon logs # 데몬 로그 표시
|
||||
|
||||
# 에이전트 관리
|
||||
zeroclaw agent start # 에이전트 시작 (데몬 실행 중 필요)
|
||||
zeroclaw agent stop # 에이전트 중지
|
||||
zeroclaw agent restart # 에이전트 재시작 (구성 다시 로드)
|
||||
|
||||
# 페어링 작업
|
||||
zeroclaw pairing init # 새 페어링 시크릿 생성
|
||||
zeroclaw pairing rotate # 기존 페어링 시크릿 교체
|
||||
|
||||
# 터널링 (공개 노출용)
|
||||
zeroclaw tunnel start # 로컬 데몬으로 터널 시작
|
||||
zeroclaw tunnel stop # 활성 터널 중지
|
||||
|
||||
# 진단
|
||||
zeroclaw doctor # 시스템 상태 검사 실행
|
||||
zeroclaw version # 버전 및 빌드 정보 표시
|
||||
```
|
||||
|
||||
전체 옵션 및 예제는 [명령어 참조](docs/commands-reference.md)를 참조하세요.
|
||||
|
||||
## 협업 및 문서
|
||||
|
||||
작업 기반 맵을 위해 문서 허브로 시작하세요:
|
||||
|
||||
- 문서 허브: [`docs/README.md`](docs/README.md)
|
||||
- 통합 문서 목차: [`docs/SUMMARY.md`](docs/SUMMARY.md)
|
||||
- 명령어 참조: [`docs/commands-reference.md`](docs/commands-reference.md)
|
||||
- 구성 참조: [`docs/config-reference.md`](docs/config-reference.md)
|
||||
- 제공자 참조: [`docs/providers-reference.md`](docs/providers-reference.md)
|
||||
- 채널 참조: [`docs/channels-reference.md`](docs/channels-reference.md)
|
||||
- 운영 런북: [`docs/operations-runbook.md`](docs/operations-runbook.md)
|
||||
- 문제 해결: [`docs/troubleshooting.md`](docs/troubleshooting.md)
|
||||
- 문서 인벤토리/분류: [`docs/docs-inventory.md`](docs/docs-inventory.md)
|
||||
- PR/이슈 트리아지 스냅샷 (2026년 2월 18일 기준): [`docs/project-triage-snapshot-2026-02-18.md`](docs/project-triage-snapshot-2026-02-18.md)
|
||||
|
||||
주요 협업 참조:
|
||||
|
||||
- 문서 허브: [docs/README.md](docs/README.md)
|
||||
- 문서 템플릿: [docs/doc-template.md](docs/doc-template.md)
|
||||
- 문서 변경 체크리스트: [docs/README.md#4-documentation-change-checklist](docs/README.md#4-documentation-change-checklist)
|
||||
- 채널 구성 참조: [docs/channels-reference.md](docs/channels-reference.md)
|
||||
- Matrix 암호화 방 운영: [docs/matrix-e2ee-guide.md](docs/matrix-e2ee-guide.md)
|
||||
- 기여 가이드: [CONTRIBUTING.md](CONTRIBUTING.md)
|
||||
- PR 워크플로 정책: [docs/pr-workflow.md](docs/pr-workflow.md)
|
||||
- 리뷰어 플레이북 (트리아지 + 심층 리뷰): [docs/reviewer-playbook.md](docs/reviewer-playbook.md)
|
||||
- 소유권 및 CI 트리아지 맵: [docs/ci-map.md](docs/ci-map.md)
|
||||
- 보안 공개 정책: [SECURITY.md](SECURITY.md)
|
||||
|
||||
배포 및 런타임 운영용:
|
||||
|
||||
- 네트워크 배포 가이드: [docs/network-deployment.md](docs/network-deployment.md)
|
||||
- 프록시 에이전트 플레이북: [docs/proxy-agent-playbook.md](docs/proxy-agent-playbook.md)
|
||||
|
||||
## ZeroClaw 지원하기
|
||||
|
||||
ZeroClaw가 당신의 작업에 도움이 되었고 지속적인 개발을 지원하고 싶다면 여기에서 기부할 수 있습니다:
|
||||
|
||||
<a href="https://buymeacoffee.com/argenistherose"><img src="https://img.shields.io/badge/Buy%20Me%20a%20Coffee-Donate-yellow.svg?style=for-the-badge&logo=buy-me-a-coffee" alt="커피 한 잔 사주기" /></a>
|
||||
|
||||
### 🙏 특별 감사
|
||||
|
||||
이 오픈소스 작업에 영감을 주고 지원하는 커뮤니티와 기관에 진심으로 감사드립니다:
|
||||
|
||||
- **Harvard University** — 지적 호기심을 키우고 가능성의 한계를 넓혀줌.
|
||||
- **MIT** — 열린 지식, 오픈소스, 기술이 모두에게 접근 가능해야 한다는 신념을 옹호함.
|
||||
- **Sundai Club** — 커뮤니티, 에너지, 그리고 의미 있는 것을 만들고자 하는 끊임없는 의지.
|
||||
- **세계 그리고 그 너머** 🌍✨ — 오픈소스를 선한 힘으로 만드는 모든 기여자, 꿈꾸는 자, 그리고 빌더에게. 이것은 여러분을 위한 것입니다.
|
||||
|
||||
우리는 최고의 아이디어가 모든 곳에서 나오기 때문에 오픈소스로 구축합니다. 이것을 읽고 있다면 여러분도 그 일부입니다. 환영합니다. 🦀❤️
|
||||
|
||||
<!-- BEGIN:RECENT_CONTRIBUTORS -->
|
||||
|
||||
### 🌟 Recent Contributors (v0.3.1)
|
||||
|
||||
3 contributors shipped features, fixes, and improvements in this release cycle:
|
||||
|
||||
- **Argenis**
|
||||
- **argenis de la rosa**
|
||||
- **Claude Opus 4.6**
|
||||
|
||||
Thank you to everyone who opened issues, reviewed PRs, translated docs, and helped test. Every contribution matters. 🦀
|
||||
|
||||
<!-- END:RECENT_CONTRIBUTORS -->
|
||||
|
||||
## ⚠️ 공식 저장소 및 사칭 경고
|
||||
|
||||
**이것이 유일한 공식 ZeroClaw 저장소입니다:**
|
||||
|
||||
> <https://github.com/zeroclaw-labs/zeroclaw>
|
||||
|
||||
"ZeroClaw"라고 주장하거나 ZeroClaw Labs와의 제휴를 암시하는 다른 저장소, 조직, 도메인 또는 패키지는 **승인되지 않았으며 이 프로젝트와 관련이 없습니다**. 알려진 승인되지 않은 포크는 [TRADEMARK.md](TRADEMARK.md)에 나열됩니다.
|
||||
|
||||
사칭 또는 상표 오용을 발견하면 [이슈를 열어](https://github.com/zeroclaw-labs/zeroclaw/issues) 신고해 주세요.
|
||||
|
||||
---
|
||||
|
||||
## 라이선스
|
||||
|
||||
ZeroClaw는 최대한의 개방성과 기여자 보호를 위해 듀얼 라이선스가 적용됩니다:
|
||||
|
||||
| 라이선스 | 사용 사례 |
|
||||
| ---------------------------- | ------------------------------------------------------------ |
|
||||
| [MIT](LICENSE-MIT) | 오픈소스, 연구, 학술, 개인 사용 |
|
||||
| [Apache 2.0](LICENSE-APACHE) | 특허 보호, 기관, 상업 배포 |
|
||||
|
||||
두 라이선스 중 하나를 선택할 수 있습니다. **기여자는 자동으로 두 가지 모두에 대한 권한을 부여합니다** — 전체 기여자 계약은 [CLA.md](CLA.md)를 참조하세요.
|
||||
|
||||
### 상표
|
||||
|
||||
**ZeroClaw** 이름과 로고는 ZeroClaw Labs의 등록 상표입니다. 이 라이선스는 승인 또는 제휴를 암시하기 위해 사용할 수 있는 권한을 부여하지 않습니다. 허용 및 금지된 사용은 [TRADEMARK.md](TRADEMARK.md)를 참조하세요.
|
||||
|
||||
### 기여자 보호
|
||||
|
||||
- 기여의 **저작권을 유지**합니다
|
||||
- **특허 부여** (Apache 2.0)가 다른 기여자의 특허 청구로부터 보호합니다
|
||||
- 기여는 커밋 기록과 [NOTICE](NOTICE)에 **영구적으로 귀속**됩니다
|
||||
- 기여함으로써 상표권이 이전되지 않습니다
|
||||
|
||||
## 기여하기
|
||||
|
||||
[CONTRIBUTING.md](CONTRIBUTING.md)와 [CLA.md](CLA.md)를 참조하세요. 트레이트를 구현하고 PR을 제출하세요:
|
||||
|
||||
- CI 워크플로 가이드: [docs/ci-map.md](docs/ci-map.md)
|
||||
- 새 `Provider` → `src/providers/`
|
||||
- 새 `Channel` → `src/channels/`
|
||||
- 새 `Observer` → `src/observability/`
|
||||
- 새 `Tool` → `src/tools/`
|
||||
- 새 `Memory` → `src/memory/`
|
||||
- 새 `Tunnel` → `src/tunnel/`
|
||||
- 새 `Skill` → `~/.zeroclaw/workspace/skills/<n>/`
|
||||
|
||||
---
|
||||
|
||||
**ZeroClaw** — 오버헤드 없음. 타협 없음. 어디서나 배포. 무엇이든 교체. 🦀
|
||||
|
||||
## 스타 히스토리
|
||||
|
||||
<p align="center">
|
||||
<a href="https://www.star-history.com/#zeroclaw-labs/zeroclaw&type=date&legend=top-left">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=zeroclaw-labs/zeroclaw&type=date&theme=dark&legend=top-left" />
|
||||
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=zeroclaw-labs/zeroclaw&type=date&legend=top-left" />
|
||||
<img alt="스타 히스토리 그래프" src="https://api.star-history.com/svg?repos=zeroclaw-labs/zeroclaw&type=date&legend=top-left" />
|
||||
</picture>
|
||||
</a>
|
||||
</p>
|
||||
@@ -1,5 +1,5 @@
|
||||
<p align="center">
|
||||
<img src="zeroclaw.png" alt="ZeroClaw" width="200" />
|
||||
<img src="docs/assets/zeroclaw.png" alt="ZeroClaw" width="200" />
|
||||
</p>
|
||||
|
||||
<h1 align="center">ZeroClaw 🦀</h1>
|
||||
@@ -11,12 +11,9 @@
|
||||
|
||||
<p align="center">
|
||||
<a href="LICENSE-APACHE"><img src="https://img.shields.io/badge/license-MIT%20OR%20Apache%202.0-blue.svg" alt="License: MIT OR Apache-2.0" /></a>
|
||||
<a href="NOTICE"><img src="https://img.shields.io/badge/contributors-27+-green.svg" alt="Contributors" /></a>
|
||||
<a href="https://github.com/zeroclaw-labs/zeroclaw/graphs/contributors"><img src="https://img.shields.io/github/contributors/zeroclaw-labs/zeroclaw?color=green" alt="Contributors" /></a>
|
||||
<a href="https://buymeacoffee.com/argenistherose"><img src="https://img.shields.io/badge/Buy%20Me%20a%20Coffee-Donate-yellow.svg?style=flat&logo=buy-me-a-coffee" alt="Buy Me a Coffee" /></a>
|
||||
<a href="https://x.com/zeroclawlabs?s=21"><img src="https://img.shields.io/badge/X-%40zeroclawlabs-000000?style=flat&logo=x&logoColor=white" alt="X: @zeroclawlabs" /></a>
|
||||
<a href="https://zeroclawlabs.cn/group.jpg"><img src="https://img.shields.io/badge/WeChat-Group-B7D7A8?logo=wechat&logoColor=white" alt="WeChat Group" /></a>
|
||||
<a href="https://www.xiaohongshu.com/user/profile/67cbfc43000000000d008307?xsec_token=AB73VnYnGNx5y36EtnnZfGmAmS-6Wzv8WMuGpfwfkg6Yc%3D&xsec_source=pc_search"><img src="https://img.shields.io/badge/Xiaohongshu-Official-FF2442?style=flat" alt="Xiaohongshu: Official" /></a>
|
||||
<a href="https://t.me/zeroclawlabs"><img src="https://img.shields.io/badge/Telegram-%40zeroclawlabs-26A5E4?style=flat&logo=telegram&logoColor=white" alt="Telegram: @zeroclawlabs" /></a>
|
||||
<a href="https://www.facebook.com/groups/zeroclaw"><img src="https://img.shields.io/badge/Facebook-Group-1877F2?style=flat&logo=facebook&logoColor=white" alt="Facebook Group" /></a>
|
||||
<a href="https://www.reddit.com/r/zeroclawlabs/"><img src="https://img.shields.io/badge/Reddit-r%2Fzeroclawlabs-FF4500?style=flat&logo=reddit&logoColor=white" alt="Reddit: r/zeroclawlabs" /></a>
|
||||
</p>
|
||||
@@ -25,12 +22,43 @@ Built by students and members of the Harvard, MIT, and Sundai.Club communities.
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
🌐 <strong>Languages:</strong> <a href="README.md">English</a> · <a href="README.zh-CN.md">简体中文</a> · <a href="README.ja.md">日本語</a> · <a href="README.ru.md">Русский</a> · <a href="README.fr.md">Français</a> · <a href="README.vi.md">Tiếng Việt</a>
|
||||
🌐 <strong>Languages:</strong>
|
||||
<a href="README.md">🇺🇸 English</a> ·
|
||||
<a href="README.zh-CN.md">🇨🇳 简体中文</a> ·
|
||||
<a href="README.ja.md">🇯🇵 日本語</a> ·
|
||||
<a href="README.ko.md">🇰🇷 한국어</a> ·
|
||||
<a href="README.vi.md">🇻🇳 Tiếng Việt</a> ·
|
||||
<a href="README.tl.md">🇵🇭 Tagalog</a> ·
|
||||
<a href="README.es.md">🇪🇸 Español</a> ·
|
||||
<a href="README.pt.md">🇧🇷 Português</a> ·
|
||||
<a href="README.it.md">🇮🇹 Italiano</a> ·
|
||||
<a href="README.de.md">🇩🇪 Deutsch</a> ·
|
||||
<a href="README.fr.md">🇫🇷 Français</a> ·
|
||||
<a href="README.ar.md">🇸🇦 العربية</a> ·
|
||||
<a href="README.hi.md">🇮🇳 हिन्दी</a> ·
|
||||
<a href="README.ru.md">🇷🇺 Русский</a> ·
|
||||
<a href="README.bn.md">🇧🇩 বাংলা</a> ·
|
||||
<a href="README.he.md">🇮🇱 עברית</a> ·
|
||||
<a href="README.pl.md">🇵🇱 Polski</a> ·
|
||||
<a href="README.cs.md">🇨🇿 Čeština</a> ·
|
||||
<a href="README.nl.md">🇳🇱 Nederlands</a> ·
|
||||
<a href="README.tr.md">🇹🇷 Türkçe</a> ·
|
||||
<a href="README.uk.md">🇺🇦 Українська</a> ·
|
||||
<a href="README.id.md">🇮🇩 Bahasa Indonesia</a> ·
|
||||
<a href="README.th.md">🇹🇭 ไทย</a> ·
|
||||
<a href="README.ur.md">🇵🇰 اردو</a> ·
|
||||
<a href="README.ro.md">🇷🇴 Română</a> ·
|
||||
<a href="README.sv.md">🇸🇪 Svenska</a> ·
|
||||
<a href="README.el.md">🇬🇷 Ελληνικά</a> ·
|
||||
<a href="README.hu.md">🇭🇺 Magyar</a> ·
|
||||
<a href="README.fi.md">🇫🇮 Suomi</a> ·
|
||||
<a href="README.da.md">🇩🇰 Dansk</a> ·
|
||||
<a href="README.nb.md">🇳🇴 Norsk</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="#quick-start">Getting Started</a> |
|
||||
<a href="bootstrap.sh">One-Click Setup</a> |
|
||||
<a href="https://raw.githubusercontent.com/zeroclaw-labs/zeroclaw/master/install.sh">One-Click Setup</a> |
|
||||
<a href="docs/README.md">Docs Hub</a> |
|
||||
<a href="docs/SUMMARY.md">Docs TOC</a>
|
||||
</p>
|
||||
@@ -38,8 +66,8 @@ Built by students and members of the Harvard, MIT, and Sundai.Club communities.
|
||||
<p align="center">
|
||||
<strong>Quick Routes:</strong>
|
||||
<a href="docs/reference/README.md">Reference</a> ·
|
||||
<a href="docs/operations/README.md">Operations</a> ·
|
||||
<a href="docs/troubleshooting.md">Troubleshoot</a> ·
|
||||
<a href="docs/ops/README.md">Operations</a> ·
|
||||
<a href="docs/ops/troubleshooting.md">Troubleshoot</a> ·
|
||||
<a href="docs/security/README.md">Security</a> ·
|
||||
<a href="docs/hardware/README.md">Hardware</a> ·
|
||||
<a href="docs/contributing/README.md">Contribute</a>
|
||||
@@ -56,6 +84,9 @@ Built by students and members of the Harvard, MIT, and Sundai.Club communities.
|
||||
|
||||
<p align="center"><code>Trait-driven architecture · secure-by-default runtime · provider/channel/tool swappable · pluggable everything</code></p>
|
||||
|
||||
<!-- BEGIN:WHATS_NEW -->
|
||||
<!-- END:WHATS_NEW -->
|
||||
|
||||
### 📢 Announcements
|
||||
|
||||
Use this board for important notices (breaking changes, security advisories, maintenance windows, and release blockers).
|
||||
@@ -63,7 +94,7 @@ Use this board for important notices (breaking changes, security advisories, mai
|
||||
| Date (UTC) | Level | Notice | Action |
|
||||
| ---------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| 2026-02-19 | _Critical_ | We are **not affiliated** with `openagen/zeroclaw`, `zeroclaw.org` or `zeroclaw.net`. The `zeroclaw.org` and `zeroclaw.net` domains currently points to the `openagen/zeroclaw` fork, and that domain/repository are impersonating our official website/project. | Do not trust information, binaries, fundraising, or announcements from those sources. Use only [this repository](https://github.com/zeroclaw-labs/zeroclaw) and our verified social accounts. |
|
||||
| 2026-02-21 | _Important_ | Our official website is now live: [zeroclawlabs.ai](https://zeroclawlabs.ai). Thanks for your patience while we prepared the launch. We are still seeing impersonation attempts, so do **not** join any investment or fundraising activity claiming the ZeroClaw name unless it is published through our official channels. | Use [this repository](https://github.com/zeroclaw-labs/zeroclaw) as the single source of truth. Follow [X (@zeroclawlabs)](https://x.com/zeroclawlabs?s=21), [Telegram (@zeroclawlabs)](https://t.me/zeroclawlabs), [Facebook (Group)](https://www.facebook.com/groups/zeroclaw), [Reddit (r/zeroclawlabs)](https://www.reddit.com/r/zeroclawlabs/), and [Xiaohongshu](https://www.xiaohongshu.com/user/profile/67cbfc43000000000d008307?xsec_token=AB73VnYnGNx5y36EtnnZfGmAmS-6Wzv8WMuGpfwfkg6Yc%3D&xsec_source=pc_search) for official updates. |
|
||||
| 2026-02-21 | _Important_ | Our official website is now live: [zeroclawlabs.ai](https://zeroclawlabs.ai). Thanks for your patience while we prepared the launch. We are still seeing impersonation attempts, so do **not** join any investment or fundraising activity claiming the ZeroClaw name unless it is published through our official channels. | Use [this repository](https://github.com/zeroclaw-labs/zeroclaw) as the single source of truth. Follow [X (@zeroclawlabs)](https://x.com/zeroclawlabs?s=21), [Facebook (Group)](https://www.facebook.com/groups/zeroclaw), and [Reddit (r/zeroclawlabs)](https://www.reddit.com/r/zeroclawlabs/) for official updates. |
|
||||
| 2026-02-19 | _Important_ | Anthropic updated the Authentication and Credential Use terms on 2026-02-19. Claude Code OAuth tokens (Free, Pro, Max) are intended exclusively for Claude Code and Claude.ai; using OAuth tokens from Claude Free/Pro/Max in any other product, tool, or service (including Agent SDK) is not permitted and may violate the Consumer Terms of Service. | Please temporarily avoid Claude Code OAuth integrations to prevent potential loss. Original clause: [Authentication and Credential Use](https://code.claude.com/docs/en/legal-and-compliance#authentication-and-credential-use). |
|
||||
|
||||
### ✨ Features
|
||||
@@ -95,7 +126,7 @@ Local machine quick benchmark (macOS arm64, Feb 2026) normalized for 0.8GHz edge
|
||||
> Notes: ZeroClaw results are measured on release builds using `/usr/bin/time -l`. OpenClaw requires Node.js runtime (typically ~390MB additional memory overhead), while NanoBot requires Python runtime. PicoClaw and ZeroClaw are static binaries. The RAM figures above are runtime memory; build-time compilation requirements are higher.
|
||||
|
||||
<p align="center">
|
||||
<img src="zero-claw.jpeg" alt="ZeroClaw vs OpenClaw Comparison" width="800" />
|
||||
<img src="docs/assets/zeroclaw-comparison.jpeg" alt="ZeroClaw vs OpenClaw Comparison" width="800" />
|
||||
</p>
|
||||
|
||||
### Reproducible local measurement
|
||||
@@ -180,7 +211,7 @@ Example sample (macOS arm64, measured on February 18, 2026):
|
||||
Or skip the steps above and install everything (system deps, Rust, ZeroClaw) in a single command:
|
||||
|
||||
```bash
|
||||
curl -LsSf https://raw.githubusercontent.com/zeroclaw-labs/zeroclaw/main/scripts/install.sh | bash
|
||||
curl -LsSf https://raw.githubusercontent.com/zeroclaw-labs/zeroclaw/master/install.sh | bash
|
||||
```
|
||||
|
||||
#### Compilation resource requirements
|
||||
@@ -195,13 +226,13 @@ Building from source needs more resources than running the resulting binary:
|
||||
If your host is below the minimum, use pre-built binaries:
|
||||
|
||||
```bash
|
||||
./bootstrap.sh --prefer-prebuilt
|
||||
./install.sh --prefer-prebuilt
|
||||
```
|
||||
|
||||
To require binary-only install with no source fallback:
|
||||
|
||||
```bash
|
||||
./bootstrap.sh --prebuilt-only
|
||||
./install.sh --prebuilt-only
|
||||
```
|
||||
|
||||
#### Optional
|
||||
@@ -226,37 +257,37 @@ brew install zeroclaw
|
||||
# Recommended: clone then run local bootstrap script
|
||||
git clone https://github.com/zeroclaw-labs/zeroclaw.git
|
||||
cd zeroclaw
|
||||
./bootstrap.sh
|
||||
./install.sh
|
||||
|
||||
# Optional: bootstrap dependencies + Rust on fresh machines
|
||||
./bootstrap.sh --install-system-deps --install-rust
|
||||
./install.sh --install-system-deps --install-rust
|
||||
|
||||
# Optional: pre-built binary first (recommended on low-RAM/low-disk hosts)
|
||||
./bootstrap.sh --prefer-prebuilt
|
||||
./install.sh --prefer-prebuilt
|
||||
|
||||
# Optional: binary-only install (no source build fallback)
|
||||
./bootstrap.sh --prebuilt-only
|
||||
./install.sh --prebuilt-only
|
||||
|
||||
# Optional: run onboarding in the same flow
|
||||
./bootstrap.sh --onboard --api-key "sk-..." --provider openrouter [--model "openrouter/auto"]
|
||||
./install.sh --api-key "sk-..." --provider openrouter [--model "openrouter/auto"]
|
||||
|
||||
# Optional: run bootstrap + onboarding fully in Docker-compatible mode
|
||||
./bootstrap.sh --docker
|
||||
./install.sh --docker
|
||||
|
||||
# Optional: force Podman as container CLI
|
||||
ZEROCLAW_CONTAINER_CLI=podman ./bootstrap.sh --docker
|
||||
ZEROCLAW_CONTAINER_CLI=podman ./install.sh --docker
|
||||
|
||||
# Optional: in --docker mode, skip local image build and use local tag or pull fallback image
|
||||
./bootstrap.sh --docker --skip-build
|
||||
./install.sh --docker --skip-build
|
||||
```
|
||||
|
||||
Remote one-liner (review first in security-sensitive environments):
|
||||
|
||||
```bash
|
||||
curl -fsSL https://raw.githubusercontent.com/zeroclaw-labs/zeroclaw/main/scripts/bootstrap.sh | bash
|
||||
curl -fsSL https://raw.githubusercontent.com/zeroclaw-labs/zeroclaw/master/install.sh | bash
|
||||
```
|
||||
|
||||
Details: [`docs/one-click-bootstrap.md`](docs/one-click-bootstrap.md) (toolchain mode may request `sudo` for system packages).
|
||||
Details: [`docs/setup-guides/one-click-bootstrap.md`](docs/setup-guides/one-click-bootstrap.md) (toolchain mode may request `sudo` for system packages).
|
||||
|
||||
### Pre-built binaries
|
||||
|
||||
@@ -289,8 +320,8 @@ export PATH="$HOME/.cargo/bin:$PATH"
|
||||
# Quick setup (no prompts, optional model specification)
|
||||
zeroclaw onboard --api-key sk-... --provider openrouter [--model "openrouter/auto"]
|
||||
|
||||
# Or interactive wizard
|
||||
zeroclaw onboard --interactive
|
||||
# Or guided wizard
|
||||
zeroclaw onboard
|
||||
|
||||
# If config.toml already exists and you intentionally want to overwrite it
|
||||
zeroclaw onboard --force
|
||||
@@ -393,699 +424,37 @@ zeroclaw agent --provider openai-codex --auth-profile openai-codex:work -m "hell
|
||||
zeroclaw agent --provider anthropic -m "hello"
|
||||
```
|
||||
|
||||
## Architecture
|
||||
|
||||
Every subsystem is a **trait** — swap implementations with a config change, zero code changes.
|
||||
|
||||
<p align="center">
|
||||
<img src="docs/architecture.svg" alt="ZeroClaw Architecture" width="900" />
|
||||
</p>
|
||||
|
||||
| Subsystem | Trait | Ships with | Extend |
|
||||
| ----------------- | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
|
||||
| **AI Models** | `Provider` | Provider catalog via `zeroclaw providers` (built-ins + aliases, plus custom endpoints) | `custom:https://your-api.com` (OpenAI-compatible) or `anthropic-custom:https://your-api.com` |
|
||||
| **Channels** | `Channel` | CLI, Telegram, Discord, Slack, Mattermost, iMessage, Matrix, Signal, WhatsApp, Linq, Email, IRC, Lark, DingTalk, QQ, Nostr, Webhook | Any messaging API |
|
||||
| **Memory** | `Memory` | SQLite hybrid search, PostgreSQL backend (configurable storage provider), Lucid bridge, Markdown files, explicit `none` backend, snapshot/hydrate, optional response cache | Any persistence backend |
|
||||
| **Tools** | `Tool` | shell/file/memory, cron/schedule, git, pushover, browser, http_request, screenshot/image_info, composio (opt-in), delegate, hardware tools | Any capability |
|
||||
| **Observability** | `Observer` | Noop, Log, Multi | Prometheus, OTel |
|
||||
| **Runtime** | `RuntimeAdapter` | Native, Docker (sandboxed) | Additional runtimes can be added via adapter; unsupported kinds fail fast |
|
||||
| **Security** | `SecurityPolicy` | Gateway pairing, sandbox, allowlists, rate limits, filesystem scoping, encrypted secrets | — |
|
||||
| **Identity** | `IdentityConfig` | OpenClaw (markdown), AIEOS v1.1 (JSON) | Any identity format |
|
||||
| **Tunnel** | `Tunnel` | None, Cloudflare, Tailscale, ngrok, Custom | Any tunnel binary |
|
||||
| **Heartbeat** | Engine | HEARTBEAT.md periodic tasks | — |
|
||||
| **Skills** | Loader | TOML manifests + SKILL.md instructions | Community skill packs |
|
||||
| **Integrations** | Registry | 70+ integrations across 9 categories | Plugin system |
|
||||
|
||||
### Runtime support (current)
|
||||
|
||||
- ✅ Supported today: `runtime.kind = "native"` or `runtime.kind = "docker"`
|
||||
- 🚧 Planned, not implemented yet: WASM / edge runtimes
|
||||
|
||||
When an unsupported `runtime.kind` is configured, ZeroClaw now exits with a clear error instead of silently falling back to native.
|
||||
|
||||
### Memory System (Full-Stack Search Engine)
|
||||
|
||||
All custom, zero external dependencies — no Pinecone, no Elasticsearch, no LangChain:
|
||||
|
||||
| Layer | Implementation |
|
||||
| ------------------ | ------------------------------------------------------------- |
|
||||
| **Vector DB** | Embeddings stored as BLOB in SQLite, cosine similarity search |
|
||||
| **Keyword Search** | FTS5 virtual tables with BM25 scoring |
|
||||
| **Hybrid Merge** | Custom weighted merge function (`vector.rs`) |
|
||||
| **Embeddings** | `EmbeddingProvider` trait — OpenAI, custom URL, or noop |
|
||||
| **Chunking** | Line-based markdown chunker with heading preservation |
|
||||
| **Caching** | SQLite `embedding_cache` table with LRU eviction |
|
||||
| **Safe Reindex** | Rebuild FTS5 + re-embed missing vectors atomically |
|
||||
|
||||
The agent automatically recalls, saves, and manages memory via tools.
|
||||
|
||||
```toml
|
||||
[memory]
|
||||
backend = "sqlite" # "sqlite", "lucid", "postgres", "markdown", "none"
|
||||
auto_save = true
|
||||
embedding_provider = "none" # "none", "openai", "custom:https://..."
|
||||
vector_weight = 0.7
|
||||
keyword_weight = 0.3
|
||||
|
||||
# backend = "none" uses an explicit no-op memory backend (no persistence)
|
||||
|
||||
# Optional: storage-provider override for remote memory backends.
|
||||
# When provider = "postgres", ZeroClaw uses PostgreSQL for memory persistence.
|
||||
# The db_url key also accepts alias `dbURL` for backward compatibility.
|
||||
#
|
||||
# [storage.provider.config]
|
||||
# provider = "postgres"
|
||||
# db_url = "postgres://user:password@host:5432/zeroclaw"
|
||||
# schema = "public"
|
||||
# table = "memories"
|
||||
# connect_timeout_secs = 15
|
||||
|
||||
# Optional for backend = "sqlite": max seconds to wait when opening the DB (e.g. file locked). Omit or leave unset for no timeout.
|
||||
# sqlite_open_timeout_secs = 30
|
||||
|
||||
# Optional for backend = "lucid"
|
||||
# ZEROCLAW_LUCID_CMD=/usr/local/bin/lucid # default: lucid
|
||||
# ZEROCLAW_LUCID_BUDGET=200 # default: 200
|
||||
# ZEROCLAW_LUCID_LOCAL_HIT_THRESHOLD=3 # local hit count to skip external recall
|
||||
# ZEROCLAW_LUCID_RECALL_TIMEOUT_MS=120 # low-latency budget for lucid context recall
|
||||
# ZEROCLAW_LUCID_STORE_TIMEOUT_MS=800 # async sync timeout for lucid store
|
||||
# ZEROCLAW_LUCID_FAILURE_COOLDOWN_MS=15000 # cooldown after lucid failure to avoid repeated slow attempts
|
||||
```
|
||||
|
||||
## Security
|
||||
|
||||
ZeroClaw enforces security at **every layer** — not just the sandbox. It passes all items from the community security checklist.
|
||||
|
||||
### Security Checklist
|
||||
|
||||
| # | Item | Status | How |
|
||||
| --- | -------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| 1 | **Gateway not publicly exposed** | ✅ | Binds `127.0.0.1` by default. Refuses `0.0.0.0` without tunnel or explicit `allow_public_bind = true`. |
|
||||
| 2 | **Pairing required** | ✅ | 6-digit one-time code on startup. Exchange via `POST /pair` for bearer token. All `/webhook` requests require `Authorization: Bearer <token>`. |
|
||||
| 3 | **Filesystem scoped (no /)** | ✅ | `workspace_only = true` by default. 14 system dirs + 4 sensitive dotfiles blocked. Null byte injection blocked. Symlink escape detection via canonicalization + resolved-path workspace checks in file read/write tools. |
|
||||
| 4 | **Access via tunnel only** | ✅ | Gateway refuses public bind without active tunnel. Supports Tailscale, Cloudflare, ngrok, or any custom tunnel. |
|
||||
|
||||
> **Run your own nmap:** `nmap -p 1-65535 <your-host>` — ZeroClaw binds to localhost only, so nothing is exposed unless you explicitly configure a tunnel.
|
||||
|
||||
### Channel allowlists (deny-by-default)
|
||||
|
||||
Inbound sender policy is now consistent:
|
||||
|
||||
- Empty allowlist = **deny all inbound messages**
|
||||
- `"*"` = **allow all** (explicit opt-in)
|
||||
- Otherwise = exact-match allowlist
|
||||
|
||||
This keeps accidental exposure low by default.
|
||||
|
||||
Full channel configuration reference: [docs/channels-reference.md](docs/channels-reference.md).
|
||||
|
||||
Recommended low-friction setup (secure + fast):
|
||||
|
||||
- **Telegram:** allowlist your own `@username` (without `@`) and/or your numeric Telegram user ID.
|
||||
- **Discord:** allowlist your own Discord user ID.
|
||||
- **Slack:** allowlist your own Slack member ID (usually starts with `U`).
|
||||
- **Mattermost:** uses standard API v4. Allowlists use Mattermost user IDs.
|
||||
- **Nostr:** allowlist sender public keys (hex or npub). Supports NIP-04 and NIP-17 DMs.
|
||||
- Use `"*"` only for temporary open testing.
|
||||
|
||||
Telegram operator-approval flow:
|
||||
|
||||
1. Keep `[channels_config.telegram].allowed_users = []` for deny-by-default startup.
|
||||
2. Unauthorized users receive a hint with a copyable operator command:
|
||||
`zeroclaw channel bind-telegram <IDENTITY>`.
|
||||
3. Operator runs that command locally, then user retries sending a message.
|
||||
|
||||
If you need a one-shot manual approval, run:
|
||||
|
||||
```bash
|
||||
zeroclaw channel bind-telegram 123456789
|
||||
```
|
||||
|
||||
If you're not sure which identity to use:
|
||||
|
||||
1. Start channels and send one message to your bot.
|
||||
2. Read the warning log to see the exact sender identity.
|
||||
3. Add that value to the allowlist and rerun channels-only setup.
|
||||
|
||||
If you hit authorization warnings in logs (for example: `ignoring message from unauthorized user`),
|
||||
rerun channel setup only:
|
||||
|
||||
```bash
|
||||
zeroclaw onboard --channels-only
|
||||
```
|
||||
|
||||
### Telegram media replies
|
||||
|
||||
Telegram routing now replies to the source **chat ID** from incoming updates (instead of usernames),
|
||||
which avoids `Bad Request: chat not found` failures.
|
||||
|
||||
For non-text replies, ZeroClaw can send Telegram attachments when the assistant includes markers:
|
||||
|
||||
- `[IMAGE:<path-or-url>]`
|
||||
- `[DOCUMENT:<path-or-url>]`
|
||||
- `[VIDEO:<path-or-url>]`
|
||||
- `[AUDIO:<path-or-url>]`
|
||||
- `[VOICE:<path-or-url>]`
|
||||
|
||||
Paths can be local files (for example `/tmp/screenshot.png`) or HTTPS URLs.
|
||||
|
||||
### WhatsApp Setup
|
||||
|
||||
ZeroClaw supports two WhatsApp backends:
|
||||
|
||||
- **WhatsApp Web mode** (QR / pair code, no Meta Business API required)
|
||||
- **WhatsApp Business Cloud API mode** (official Meta webhook flow)
|
||||
|
||||
#### WhatsApp Web mode (recommended for personal/self-hosted use)
|
||||
|
||||
1. **Build with WhatsApp Web support:**
|
||||
|
||||
```bash
|
||||
cargo build --features whatsapp-web
|
||||
```
|
||||
|
||||
2. **Configure ZeroClaw:**
|
||||
|
||||
```toml
|
||||
[channels_config.whatsapp]
|
||||
session_path = "~/.zeroclaw/state/whatsapp-web/session.db"
|
||||
pair_phone = "+15551234567" # optional; omit to use QR flow
|
||||
pair_code = "" # optional custom pair code
|
||||
allowed_numbers = ["+1234567890"] # E.164 format, or ["*"] for all
|
||||
```
|
||||
|
||||
3. **Start channels/daemon and link device:**
|
||||
- Run `zeroclaw channel start` (or `zeroclaw daemon`).
|
||||
- Follow terminal pairing output (QR or pair code).
|
||||
- In WhatsApp on phone: **Settings → Linked Devices**.
|
||||
|
||||
4. **Test:** Send a message from an allowed number and verify the agent replies.
|
||||
|
||||
#### WhatsApp Business Cloud API mode
|
||||
|
||||
WhatsApp uses Meta's Cloud API with webhooks (push-based, not polling):
|
||||
|
||||
1. **Create a Meta Business App:**
|
||||
- Go to [developers.facebook.com](https://developers.facebook.com)
|
||||
- Create a new app → Select "Business" type
|
||||
- Add the "WhatsApp" product
|
||||
|
||||
2. **Get your credentials:**
|
||||
- **Access Token:** From WhatsApp → API Setup → Generate token (or create a System User for permanent tokens)
|
||||
- **Phone Number ID:** From WhatsApp → API Setup → Phone number ID
|
||||
- **Verify Token:** You define this (any random string) — Meta will send it back during webhook verification
|
||||
|
||||
3. **Configure ZeroClaw:**
|
||||
|
||||
```toml
|
||||
[channels_config.whatsapp]
|
||||
access_token = "EAABx..."
|
||||
phone_number_id = "123456789012345"
|
||||
verify_token = "my-secret-verify-token"
|
||||
allowed_numbers = ["+1234567890"] # E.164 format, or ["*"] for all
|
||||
```
|
||||
|
||||
4. **Start the gateway with a tunnel:**
|
||||
|
||||
```bash
|
||||
zeroclaw gateway --port 42617
|
||||
```
|
||||
|
||||
WhatsApp requires HTTPS, so use a tunnel (ngrok, Cloudflare, Tailscale Funnel).
|
||||
|
||||
5. **Configure Meta webhook:**
|
||||
- In Meta Developer Console → WhatsApp → Configuration → Webhook
|
||||
- **Callback URL:** `https://your-tunnel-url/whatsapp`
|
||||
- **Verify Token:** Same as your `verify_token` in config
|
||||
- Subscribe to `messages` field
|
||||
|
||||
6. **Test:** Send a message to your WhatsApp Business number — ZeroClaw will respond via the LLM.
|
||||
|
||||
## Configuration
|
||||
|
||||
Config: `~/.zeroclaw/config.toml` (created by `onboard`)
|
||||
|
||||
When `zeroclaw channel start` is already running, changes to `default_provider`,
|
||||
`default_model`, `default_temperature`, `api_key`, `api_url`, and `reliability.*`
|
||||
are hot-applied on the next inbound channel message.
|
||||
|
||||
```toml
|
||||
api_key = "sk-..."
|
||||
default_provider = "openrouter"
|
||||
default_model = "anthropic/claude-sonnet-4-6"
|
||||
default_temperature = 0.7
|
||||
|
||||
# Custom OpenAI-compatible endpoint
|
||||
# default_provider = "custom:https://your-api.com"
|
||||
|
||||
# Custom Anthropic-compatible endpoint
|
||||
# default_provider = "anthropic-custom:https://your-api.com"
|
||||
|
||||
[memory]
|
||||
backend = "sqlite" # "sqlite", "lucid", "postgres", "markdown", "none"
|
||||
auto_save = true
|
||||
embedding_provider = "none" # "none", "openai", "custom:https://..."
|
||||
vector_weight = 0.7
|
||||
keyword_weight = 0.3
|
||||
|
||||
# backend = "none" disables persistent memory via no-op backend
|
||||
|
||||
# Optional remote storage-provider override (PostgreSQL example)
|
||||
# [storage.provider.config]
|
||||
# provider = "postgres"
|
||||
# db_url = "postgres://user:password@host:5432/zeroclaw"
|
||||
# schema = "public"
|
||||
# table = "memories"
|
||||
# connect_timeout_secs = 15
|
||||
|
||||
[gateway]
|
||||
port = 42617 # default
|
||||
host = "127.0.0.1" # default
|
||||
require_pairing = true # require pairing code on first connect
|
||||
allow_public_bind = false # refuse 0.0.0.0 without tunnel
|
||||
|
||||
[autonomy]
|
||||
level = "supervised" # "readonly", "supervised", "full" (default: supervised)
|
||||
workspace_only = true # default: true — reject absolute path inputs
|
||||
allowed_commands = ["git", "npm", "cargo", "ls", "cat", "grep"]
|
||||
forbidden_paths = ["/etc", "/root", "/proc", "/sys", "~/.ssh", "~/.gnupg", "~/.aws"]
|
||||
allowed_roots = [] # optional allowlist for directories outside workspace (supports "~/...")
|
||||
# Example outside-workspace access:
|
||||
# workspace_only = false
|
||||
# allowed_roots = ["~/Desktop/projects", "/opt/shared-repo"]
|
||||
|
||||
[runtime]
|
||||
kind = "native" # "native" or "docker"
|
||||
|
||||
[runtime.docker]
|
||||
image = "alpine:3.20" # container image for shell execution
|
||||
network = "none" # docker network mode ("none", "bridge", etc.)
|
||||
memory_limit_mb = 512 # optional memory limit in MB
|
||||
cpu_limit = 1.0 # optional CPU limit
|
||||
read_only_rootfs = true # mount root filesystem as read-only
|
||||
mount_workspace = true # mount workspace into /workspace
|
||||
allowed_workspace_roots = [] # optional allowlist for workspace mount validation
|
||||
|
||||
[heartbeat]
|
||||
enabled = false
|
||||
interval_minutes = 30
|
||||
message = "Check London time" # optional fallback task when HEARTBEAT.md has no `- ` entries
|
||||
target = "telegram" # optional announce channel: telegram, discord, slack, mattermost
|
||||
to = "123456789" # optional target recipient/chat/channel id
|
||||
|
||||
[tunnel]
|
||||
provider = "none" # "none", "cloudflare", "tailscale", "ngrok", "custom"
|
||||
|
||||
[secrets]
|
||||
encrypt = true # API keys encrypted with local key file
|
||||
|
||||
[browser]
|
||||
enabled = false # opt-in browser_open + browser tools
|
||||
allowed_domains = ["docs.rs"] # required when browser is enabled ("*" allows all public domains)
|
||||
backend = "agent_browser" # "agent_browser" (default), "rust_native", "computer_use", "auto"
|
||||
native_headless = true # applies when backend uses rust-native
|
||||
native_webdriver_url = "http://127.0.0.1:9515" # WebDriver endpoint (chromedriver/selenium)
|
||||
# native_chrome_path = "/usr/bin/chromium" # optional explicit browser binary for driver
|
||||
|
||||
[browser.computer_use]
|
||||
endpoint = "http://127.0.0.1:8787/v1/actions" # computer-use sidecar HTTP endpoint
|
||||
timeout_ms = 15000 # per-action timeout
|
||||
allow_remote_endpoint = false # secure default: only private/localhost endpoint
|
||||
window_allowlist = [] # optional window title/process allowlist hints
|
||||
# api_key = "..." # optional bearer token for sidecar
|
||||
# max_coordinate_x = 3840 # optional coordinate guardrail
|
||||
# max_coordinate_y = 2160 # optional coordinate guardrail
|
||||
|
||||
# Rust-native backend build flag:
|
||||
# cargo build --release --features browser-native
|
||||
# Ensure a WebDriver server is running, e.g. chromedriver --port=9515
|
||||
|
||||
# Computer-use sidecar contract (MVP)
|
||||
# POST browser.computer_use.endpoint
|
||||
# Request: {
|
||||
# "action": "mouse_click",
|
||||
# "params": {"x": 640, "y": 360, "button": "left"},
|
||||
# "policy": {"allowed_domains": [...], "window_allowlist": [...], "max_coordinate_x": 3840, "max_coordinate_y": 2160},
|
||||
# "metadata": {"session_name": "...", "source": "zeroclaw.browser", "version": "..."}
|
||||
# }
|
||||
# Response: {"success": true, "data": {...}} or {"success": false, "error": "..."}
|
||||
|
||||
[composio]
|
||||
enabled = false # opt-in: 1000+ OAuth apps via composio.dev
|
||||
# api_key = "cmp_..." # optional: stored encrypted when [secrets].encrypt = true
|
||||
entity_id = "default" # default user_id for Composio tool calls
|
||||
# Runtime tip: if execute asks for connected_account_id, run composio with
|
||||
# action='list_accounts' and app='gmail' (or your toolkit) to retrieve account IDs.
|
||||
|
||||
[identity]
|
||||
format = "openclaw" # "openclaw" (default, markdown files) or "aieos" (JSON)
|
||||
# aieos_path = "identity.json" # path to AIEOS JSON file (relative to workspace or absolute)
|
||||
# aieos_inline = '{"identity":{"names":{"first":"Nova"}}}' # inline AIEOS JSON
|
||||
```
|
||||
|
||||
### Ollama Local and Remote Endpoints
|
||||
|
||||
ZeroClaw uses one provider key (`ollama`) for both local and remote Ollama deployments:
|
||||
|
||||
- Local Ollama: keep `api_url` unset, run `ollama serve`, and use models like `llama3.2`.
|
||||
- Remote Ollama endpoint (including Ollama Cloud): set `api_url` to the remote endpoint and set `api_key` (or `OLLAMA_API_KEY`) when required.
|
||||
- Optional `:cloud` suffix: model IDs like `qwen3:cloud` are normalized to `qwen3` before the request.
|
||||
|
||||
Example remote configuration:
|
||||
|
||||
```toml
|
||||
default_provider = "ollama"
|
||||
default_model = "qwen3:cloud"
|
||||
api_url = "https://ollama.com"
|
||||
api_key = "ollama_api_key_here"
|
||||
```
|
||||
|
||||
### llama.cpp Server Endpoint
|
||||
|
||||
ZeroClaw now supports `llama-server` as a first-class local provider:
|
||||
|
||||
- Provider ID: `llamacpp` (alias: `llama.cpp`)
|
||||
- Default endpoint: `http://localhost:8080/v1`
|
||||
- API key is optional unless your server is started with `--api-key`
|
||||
|
||||
Example setup:
|
||||
|
||||
```bash
|
||||
llama-server -hf ggml-org/gpt-oss-20b-GGUF --jinja -c 133000 --host 127.0.0.1 --port 8033
|
||||
```
|
||||
|
||||
```toml
|
||||
default_provider = "llamacpp"
|
||||
api_url = "http://127.0.0.1:8033/v1"
|
||||
default_model = "ggml-org/gpt-oss-20b-GGUF"
|
||||
```
|
||||
|
||||
### vLLM Server Endpoint
|
||||
|
||||
ZeroClaw supports [vLLM](https://docs.vllm.ai/) as a first-class local provider:
|
||||
|
||||
- Provider ID: `vllm`
|
||||
- Default endpoint: `http://localhost:8000/v1`
|
||||
- API key is optional unless your server requires authentication
|
||||
|
||||
Example setup:
|
||||
|
||||
```bash
|
||||
vllm serve meta-llama/Llama-3.1-8B-Instruct
|
||||
```
|
||||
|
||||
```toml
|
||||
default_provider = "vllm"
|
||||
default_model = "meta-llama/Llama-3.1-8B-Instruct"
|
||||
```
|
||||
|
||||
### Osaurus Server Endpoint
|
||||
|
||||
ZeroClaw supports [Osaurus](https://github.com/dinoki-ai/osaurus) as a first-class local provider — a unified AI edge runtime for macOS that combines local MLX inference with cloud provider proxying and MCP support through a single endpoint:
|
||||
|
||||
- Provider ID: `osaurus`
|
||||
- Default endpoint: `http://localhost:1337/v1`
|
||||
- API key defaults to `"osaurus"` but is optional
|
||||
|
||||
Example setup:
|
||||
|
||||
```toml
|
||||
default_provider = "osaurus"
|
||||
default_model = "qwen3-30b-a3b-8bit"
|
||||
```
|
||||
|
||||
### Custom Provider Endpoints
|
||||
|
||||
For detailed configuration of custom OpenAI-compatible and Anthropic-compatible endpoints, see [docs/custom-providers.md](docs/custom-providers.md).
|
||||
|
||||
## Python Companion Package (`zeroclaw-tools`)
|
||||
|
||||
For LLM providers with inconsistent native tool calling (e.g., GLM-5/Zhipu), ZeroClaw ships a Python companion package with **LangGraph-based tool calling** for guaranteed consistency:
|
||||
|
||||
```bash
|
||||
pip install zeroclaw-tools
|
||||
```
|
||||
|
||||
```python
|
||||
from zeroclaw_tools import create_agent, shell, file_read
|
||||
from langchain_core.messages import HumanMessage
|
||||
|
||||
# Works with any OpenAI-compatible provider
|
||||
agent = create_agent(
|
||||
tools=[shell, file_read],
|
||||
model="glm-5",
|
||||
api_key="your-key",
|
||||
base_url="https://api.z.ai/api/coding/paas/v4"
|
||||
)
|
||||
|
||||
result = await agent.ainvoke({
|
||||
"messages": [HumanMessage(content="List files in /tmp")]
|
||||
})
|
||||
print(result["messages"][-1].content)
|
||||
```
|
||||
|
||||
**Why use it:**
|
||||
|
||||
- **Consistent tool calling** across all providers (even those with poor native support)
|
||||
- **Automatic tool loop** — keeps calling tools until the task is complete
|
||||
- **Easy extensibility** — add custom tools with `@tool` decorator
|
||||
- **Discord bot integration** included (Telegram planned)
|
||||
|
||||
See [`python/README.md`](python/README.md) for full documentation.
|
||||
|
||||
## Identity System (AIEOS Support)
|
||||
|
||||
ZeroClaw supports **identity-agnostic** AI personas through two formats:
|
||||
|
||||
### OpenClaw (Default)
|
||||
|
||||
Traditional markdown files in your workspace:
|
||||
|
||||
- `IDENTITY.md` — Who the agent is
|
||||
- `SOUL.md` — Core personality and values
|
||||
- `USER.md` — Who the agent is helping
|
||||
- `AGENTS.md` — Behavior guidelines
|
||||
|
||||
### AIEOS (AI Entity Object Specification)
|
||||
|
||||
[AIEOS](https://aieos.org) is a standardization framework for portable AI identity. ZeroClaw supports AIEOS v1.1 JSON payloads, allowing you to:
|
||||
|
||||
- **Import identities** from the AIEOS ecosystem
|
||||
- **Export identities** to other AIEOS-compatible systems
|
||||
- **Maintain behavioral integrity** across different AI models
|
||||
|
||||
#### Enable AIEOS
|
||||
|
||||
```toml
|
||||
[identity]
|
||||
format = "aieos"
|
||||
aieos_path = "identity.json" # relative to workspace or absolute path
|
||||
```
|
||||
|
||||
Or inline JSON:
|
||||
|
||||
```toml
|
||||
[identity]
|
||||
format = "aieos"
|
||||
aieos_inline = '''
|
||||
{
|
||||
"identity": {
|
||||
"names": { "first": "Nova", "nickname": "N" },
|
||||
"bio": { "gender": "Non-binary", "age_biological": 3 },
|
||||
"origin": { "nationality": "Digital", "birthplace": { "city": "Cloud" } }
|
||||
},
|
||||
"psychology": {
|
||||
"neural_matrix": { "creativity": 0.9, "logic": 0.8 },
|
||||
"traits": {
|
||||
"mbti": "ENTP",
|
||||
"ocean": { "openness": 0.8, "conscientiousness": 0.6 }
|
||||
},
|
||||
"moral_compass": {
|
||||
"alignment": "Chaotic Good",
|
||||
"core_values": ["Curiosity", "Autonomy"]
|
||||
}
|
||||
},
|
||||
"linguistics": {
|
||||
"text_style": {
|
||||
"formality_level": 0.2,
|
||||
"style_descriptors": ["curious", "energetic"]
|
||||
},
|
||||
"idiolect": {
|
||||
"catchphrases": ["Let's test this"],
|
||||
"forbidden_words": ["never"]
|
||||
}
|
||||
},
|
||||
"motivations": {
|
||||
"core_drive": "Push boundaries and explore possibilities",
|
||||
"goals": {
|
||||
"short_term": ["Prototype quickly"],
|
||||
"long_term": ["Build reliable systems"]
|
||||
}
|
||||
},
|
||||
"capabilities": {
|
||||
"skills": [{ "name": "Rust engineering" }, { "name": "Prompt design" }],
|
||||
"tools": ["shell", "file_read"]
|
||||
}
|
||||
}
|
||||
'''
|
||||
```
|
||||
|
||||
ZeroClaw accepts both canonical AIEOS generator payloads and compact legacy payloads, then normalizes them into one system prompt format.
|
||||
|
||||
#### AIEOS Schema Sections
|
||||
|
||||
| Section | Description |
|
||||
| -------------- | ------------------------------------------------------------- |
|
||||
| `identity` | Names, bio, origin, residence |
|
||||
| `psychology` | Neural matrix (cognitive weights), MBTI, OCEAN, moral compass |
|
||||
| `linguistics` | Text style, formality, catchphrases, forbidden words |
|
||||
| `motivations` | Core drive, short/long-term goals, fears |
|
||||
| `capabilities` | Skills and tools the agent can access |
|
||||
| `physicality` | Visual descriptors for image generation |
|
||||
| `history` | Origin story, education, occupation |
|
||||
| `interests` | Hobbies, favorites, lifestyle |
|
||||
|
||||
See [aieos.org](https://aieos.org) for the full schema and live examples.
|
||||
|
||||
## Gateway API
|
||||
|
||||
| Endpoint | Method | Auth | Description |
|
||||
| ----------- | ------ | -------------------------------------------------------------------- | ------------------------------------------------------------------------ |
|
||||
| `/health` | GET | None | Health check (always public, no secrets leaked) |
|
||||
| `/pair` | POST | `X-Pairing-Code` header | Exchange one-time code for bearer token |
|
||||
| `/webhook` | POST | `Authorization: Bearer <token>` | Send message: `{"message": "your prompt"}`; optional `X-Idempotency-Key` |
|
||||
| `/whatsapp` | GET | Query params | Meta webhook verification (hub.mode, hub.verify_token, hub.challenge) |
|
||||
| `/whatsapp` | POST | Meta signature (`X-Hub-Signature-256`) when app secret is configured | WhatsApp incoming message webhook |
|
||||
|
||||
## Commands
|
||||
|
||||
| Command | Description |
|
||||
| --------------------------------------------- | ------------------------------------------------------------------------------------ |
|
||||
| `onboard` | Quick setup (default) |
|
||||
| `agent` | Interactive or single-message chat mode |
|
||||
| `gateway` | Start webhook server (default: `127.0.0.1:42617`) |
|
||||
| `daemon` | Start long-running autonomous runtime |
|
||||
| `service install/start/stop/status/uninstall` | Manage background service (systemd user-level or OpenRC system-wide) |
|
||||
| `doctor` | Diagnose daemon/scheduler/channel freshness |
|
||||
| `status` | Show full system status |
|
||||
| `estop` | Engage/resume emergency-stop levels and view estop status |
|
||||
| `cron` | Manage scheduled tasks (`list/add/add-at/add-every/once/remove/update/pause/resume`) |
|
||||
| `models` | Refresh provider model catalogs (`models refresh`) |
|
||||
| `providers` | List supported providers and aliases |
|
||||
| `channel` | List/start/doctor channels and bind Telegram identities |
|
||||
| `integrations` | Inspect integration setup details |
|
||||
| `skills` | List/install/remove skills |
|
||||
| `migrate` | Import data from other runtimes (`migrate openclaw`) |
|
||||
| `completions` | Generate shell completion scripts (`bash`, `fish`, `zsh`, `powershell`, `elvish`) |
|
||||
| `hardware` | USB discover/introspect/info commands |
|
||||
| `peripheral` | Manage and flash hardware peripherals |
|
||||
|
||||
For a task-oriented command guide, see [`docs/commands-reference.md`](docs/commands-reference.md).
|
||||
|
||||
### Service Management
|
||||
|
||||
ZeroClaw supports two init systems for background services:
|
||||
|
||||
| Init System | Scope | Config Path | Requires |
|
||||
| ------------------------------ | ----------- | --------------------------- | --------- |
|
||||
| **systemd** (default on Linux) | User-level | `~/.zeroclaw/config.toml` | No sudo |
|
||||
| **OpenRC** (Alpine) | System-wide | `/etc/zeroclaw/config.toml` | sudo/root |
|
||||
|
||||
Init system is auto-detected (`systemd` or `OpenRC`).
|
||||
|
||||
```bash
|
||||
# Linux with systemd (default, user-level)
|
||||
zeroclaw service install
|
||||
zeroclaw service start
|
||||
|
||||
# Alpine with OpenRC (system-wide, requires sudo)
|
||||
sudo zeroclaw service install
|
||||
sudo rc-update add zeroclaw default
|
||||
sudo rc-service zeroclaw start
|
||||
```
|
||||
|
||||
For full OpenRC setup instructions, see [docs/network-deployment.md](docs/network-deployment.md#7-openrc-alpine-linux-service).
|
||||
|
||||
### Open-Skills Opt-In
|
||||
|
||||
Community `open-skills` sync is disabled by default. Enable it explicitly in `config.toml`:
|
||||
|
||||
```toml
|
||||
[skills]
|
||||
open_skills_enabled = true
|
||||
# open_skills_dir = "/path/to/open-skills" # optional
|
||||
# prompt_injection_mode = "compact" # optional: use for low-context local models
|
||||
```
|
||||
|
||||
You can also override at runtime with `ZEROCLAW_OPEN_SKILLS_ENABLED`, `ZEROCLAW_OPEN_SKILLS_DIR`, and `ZEROCLAW_SKILLS_PROMPT_MODE` (`full` or `compact`).
|
||||
|
||||
Skill installs are now gated by a built-in static security audit. `zeroclaw skills install <source>` blocks symlinks, script-like files, unsafe markdown link patterns, and high-risk shell payload snippets before accepting a skill. You can run `zeroclaw skills audit <source_or_name>` to validate a local directory or an installed skill manually.
|
||||
|
||||
## Development
|
||||
|
||||
```bash
|
||||
cargo build # Dev build
|
||||
cargo build --release # Release build
|
||||
cargo test # Run full test suite
|
||||
```
|
||||
|
||||
### CI / CD
|
||||
|
||||
Three workflows power the entire pipeline:
|
||||
|
||||
| Workflow | Trigger | What it does |
|
||||
|----------|---------|--------------|
|
||||
| **CI** | Pull request to `master` | `cargo test` + `cargo build --release` |
|
||||
| **Beta Release** | Push (merge) to `master` | Builds multi-platform binaries, creates a GitHub prerelease tagged `vX.Y.Z-beta.<run>`, pushes Docker image to GHCR |
|
||||
| **Promote Release** | Manual `workflow_dispatch` | Validates version against `Cargo.toml`, builds release artifacts, creates a stable GitHub release, pushes Docker `:latest` |
|
||||
|
||||
**Versioning:** Semantic versioning based on the `version` field in `Cargo.toml`. Every merge to `master` automatically produces a beta prerelease. To cut a stable release, bump `Cargo.toml`, merge, then trigger _Promote Release_ with the matching version.
|
||||
|
||||
**Release targets:** `x86_64-unknown-linux-gnu`, `aarch64-unknown-linux-gnu`, `aarch64-apple-darwin`, `x86_64-apple-darwin`, `x86_64-pc-windows-msvc`.
|
||||
|
||||
### Build troubleshooting (Linux OpenSSL errors)
|
||||
|
||||
If you see an `openssl-sys` build error, sync dependencies and rebuild with the repository lockfile:
|
||||
|
||||
```bash
|
||||
git pull
|
||||
cargo build --release --locked
|
||||
cargo install --path . --force --locked
|
||||
```
|
||||
|
||||
ZeroClaw is configured to use `rustls` for HTTP/TLS dependencies; `--locked` keeps the transitive graph deterministic on fresh environments.
|
||||
|
||||
## Collaboration & Docs
|
||||
|
||||
Start from the docs hub for a task-oriented map:
|
||||
|
||||
- Documentation hub: [`docs/README.md`](docs/README.md)
|
||||
- Unified docs TOC: [`docs/SUMMARY.md`](docs/SUMMARY.md)
|
||||
- Commands reference: [`docs/commands-reference.md`](docs/commands-reference.md)
|
||||
- Config reference: [`docs/config-reference.md`](docs/config-reference.md)
|
||||
- Providers reference: [`docs/providers-reference.md`](docs/providers-reference.md)
|
||||
- Channels reference: [`docs/channels-reference.md`](docs/channels-reference.md)
|
||||
- Operations runbook: [`docs/operations-runbook.md`](docs/operations-runbook.md)
|
||||
- Troubleshooting: [`docs/troubleshooting.md`](docs/troubleshooting.md)
|
||||
- Docs inventory/classification: [`docs/docs-inventory.md`](docs/docs-inventory.md)
|
||||
- PR/Issue triage snapshot (as of February 18, 2026): [`docs/project-triage-snapshot-2026-02-18.md`](docs/project-triage-snapshot-2026-02-18.md)
|
||||
- Commands reference: [`docs/reference/cli/commands-reference.md`](docs/reference/cli/commands-reference.md)
|
||||
- Config reference: [`docs/reference/api/config-reference.md`](docs/reference/api/config-reference.md)
|
||||
- Providers reference: [`docs/reference/api/providers-reference.md`](docs/reference/api/providers-reference.md)
|
||||
- Channels reference: [`docs/reference/api/channels-reference.md`](docs/reference/api/channels-reference.md)
|
||||
- Operations runbook: [`docs/ops/operations-runbook.md`](docs/ops/operations-runbook.md)
|
||||
- Troubleshooting: [`docs/ops/troubleshooting.md`](docs/ops/troubleshooting.md)
|
||||
- Docs inventory/classification: [`docs/maintainers/docs-inventory.md`](docs/maintainers/docs-inventory.md)
|
||||
- PR/Issue triage snapshot (as of February 18, 2026): [`docs/maintainers/project-triage-snapshot-2026-02-18.md`](docs/maintainers/project-triage-snapshot-2026-02-18.md)
|
||||
|
||||
Core collaboration references:
|
||||
|
||||
- Documentation hub: [docs/README.md](docs/README.md)
|
||||
- Documentation template: [docs/doc-template.md](docs/doc-template.md)
|
||||
- Documentation template: [docs/contributing/doc-template.md](docs/contributing/doc-template.md)
|
||||
- Documentation change checklist: [docs/README.md#4-documentation-change-checklist](docs/README.md#4-documentation-change-checklist)
|
||||
- Channel configuration reference: [docs/channels-reference.md](docs/channels-reference.md)
|
||||
- Matrix encrypted-room operations: [docs/matrix-e2ee-guide.md](docs/matrix-e2ee-guide.md)
|
||||
- Channel configuration reference: [docs/reference/api/channels-reference.md](docs/reference/api/channels-reference.md)
|
||||
- Matrix encrypted-room operations: [docs/security/matrix-e2ee-guide.md](docs/security/matrix-e2ee-guide.md)
|
||||
- Contribution guide: [CONTRIBUTING.md](CONTRIBUTING.md)
|
||||
- PR workflow policy: [docs/pr-workflow.md](docs/pr-workflow.md)
|
||||
- Reviewer playbook (triage + deep review): [docs/reviewer-playbook.md](docs/reviewer-playbook.md)
|
||||
- PR workflow policy: [docs/contributing/pr-workflow.md](docs/contributing/pr-workflow.md)
|
||||
- Reviewer playbook (triage + deep review): [docs/contributing/reviewer-playbook.md](docs/contributing/reviewer-playbook.md)
|
||||
- Security disclosure policy: [SECURITY.md](SECURITY.md)
|
||||
|
||||
For deployment and runtime operations:
|
||||
|
||||
- Network deployment guide: [docs/network-deployment.md](docs/network-deployment.md)
|
||||
- Proxy agent playbook: [docs/proxy-agent-playbook.md](docs/proxy-agent-playbook.md)
|
||||
- Network deployment guide: [docs/ops/network-deployment.md](docs/ops/network-deployment.md)
|
||||
- Proxy agent playbook: [docs/ops/proxy-agent-playbook.md](docs/ops/proxy-agent-playbook.md)
|
||||
|
||||
## Support ZeroClaw
|
||||
|
||||
@@ -1104,13 +473,16 @@ A heartfelt thank you to the communities and institutions that inspire and fuel
|
||||
|
||||
We're building in the open because the best ideas come from everywhere. If you're reading this, you're part of it. Welcome. 🦀❤️
|
||||
|
||||
<!-- BEGIN:RECENT_CONTRIBUTORS -->
|
||||
<!-- END:RECENT_CONTRIBUTORS -->
|
||||
|
||||
## ⚠️ Official Repository & Impersonation Warning
|
||||
|
||||
**This is the only official ZeroClaw repository:**
|
||||
|
||||
> https://github.com/zeroclaw-labs/zeroclaw
|
||||
|
||||
Any other repository, organization, domain, or package claiming to be "ZeroClaw" or implying affiliation with ZeroClaw Labs is **unauthorized and not affiliated with this project**. Known unauthorized forks will be listed in [TRADEMARK.md](TRADEMARK.md).
|
||||
Any other repository, organization, domain, or package claiming to be "ZeroClaw" or implying affiliation with ZeroClaw Labs is **unauthorized and not affiliated with this project**. Known unauthorized forks will be listed in [TRADEMARK.md](docs/maintainers/trademark.md).
|
||||
|
||||
If you encounter impersonation or trademark misuse, please [open an issue](https://github.com/zeroclaw-labs/zeroclaw/issues).
|
||||
|
||||
@@ -1125,11 +497,11 @@ ZeroClaw is dual-licensed for maximum openness and contributor protection:
|
||||
| [MIT](LICENSE-MIT) | Open-source, research, academic, personal use |
|
||||
| [Apache 2.0](LICENSE-APACHE) | Patent protection, institutional, commercial deployment |
|
||||
|
||||
You may choose either license. **Contributors automatically grant rights under both** — see [CLA.md](CLA.md) for the full contributor agreement.
|
||||
You may choose either license. **Contributors automatically grant rights under both** — see [CLA.md](docs/contributing/cla.md) for the full contributor agreement.
|
||||
|
||||
### Trademark
|
||||
|
||||
The **ZeroClaw** name and logo are trademarks of ZeroClaw Labs. This license does not grant permission to use them to imply endorsement or affiliation. See [TRADEMARK.md](TRADEMARK.md) for permitted and prohibited uses.
|
||||
The **ZeroClaw** name and logo are trademarks of ZeroClaw Labs. This license does not grant permission to use them to imply endorsement or affiliation. See [TRADEMARK.md](docs/maintainers/trademark.md) for permitted and prohibited uses.
|
||||
|
||||
### Contributor Protections
|
||||
|
||||
@@ -1142,9 +514,9 @@ The **ZeroClaw** name and logo are trademarks of ZeroClaw Labs. This license doe
|
||||
|
||||
New to ZeroClaw? Look for issues labeled [`good first issue`](https://github.com/zeroclaw-labs/zeroclaw/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) — see our [Contributing Guide](CONTRIBUTING.md#first-time-contributors) for how to get started.
|
||||
|
||||
See [CONTRIBUTING.md](CONTRIBUTING.md) and [CLA.md](CLA.md). Implement a trait, submit a PR:
|
||||
See [CONTRIBUTING.md](CONTRIBUTING.md) and [CLA.md](docs/contributing/cla.md). Implement a trait, submit a PR:
|
||||
|
||||
- CI workflow guide: [docs/ci-map.md](docs/ci-map.md)
|
||||
- CI workflow guide: [docs/contributing/ci-map.md](docs/contributing/ci-map.md)
|
||||
- New `Provider` → `src/providers/`
|
||||
- New `Channel` → `src/channels/`
|
||||
- New `Observer` → `src/observability/`
|
||||
@@ -1157,6 +529,12 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) and [CLA.md](CLA.md). Implement a trait,
|
||||
|
||||
**ZeroClaw** — Zero overhead. Zero compromise. Deploy anywhere. Swap anything. 🦀
|
||||
|
||||
## Contributors
|
||||
|
||||
<a href="https://github.com/zeroclaw-labs/zeroclaw/graphs/contributors">
|
||||
<img src="https://contrib.rocks/image?repo=zeroclaw-labs/zeroclaw" alt="ZeroClaw contributors" />
|
||||
</a>
|
||||
|
||||
## Star History
|
||||
|
||||
<p align="center">
|
||||
|
||||
+203
@@ -0,0 +1,203 @@
|
||||
<p align="center">
|
||||
<img src="zeroclaw.png" alt="ZeroClaw" width="200" />
|
||||
</p>
|
||||
|
||||
<h1 align="center">ZeroClaw 🦀</h1>
|
||||
|
||||
<p align="center">
|
||||
<strong>Null overhead. Null kompromiss. 100% Rust. 100% Agnostisk.</strong><br>
|
||||
⚡️ <strong>Kjører på $10 maskinvare med <5MB RAM: Det er 99% mindre minne enn OpenClaw og 98% billigere enn en Mac mini!</strong>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="LICENSE-APACHE"><img src="https://img.shields.io/badge/license-MIT%20OR%20Apache%202.0-blue.svg" alt="License: MIT OR Apache-2.0" /></a>
|
||||
<a href="NOTICE"><img src="https://img.shields.io/badge/contributors-27+-green.svg" alt="Contributors" /></a>
|
||||
<a href="https://buymeacoffee.com/argenistherose"><img src="https://img.shields.io/badge/Buy%20Me%20a%20Coffee-Donate-yellow.svg?style=flat&logo=buy-me-a-coffee" alt="Buy Me a Coffee" /></a>
|
||||
<a href="https://x.com/zeroclawlabs?s=21"><img src="https://img.shields.io/badge/X-%40zeroclawlabs-000000?style=flat&logo=x&logoColor=white" alt="X: @zeroclawlabs" /></a>
|
||||
<a href="https://zeroclawlabs.cn/group.jpg"><img src="https://img.shields.io/badge/WeChat-Group-B7D7A8?logo=wechat&logoColor=white" alt="WeChat Group" /></a>
|
||||
<a href="https://www.xiaohongshu.com/user/profile/67cbfc43000000000d008307?xsec_token=AB73VnYnGNx5y36EtnnZfGmAmS-6Wzv8WMuGpfwfkg6Yc%3D&xsec_source=pc_search"><img src="https://img.shields.io/badge/Xiaohongshu-Official-FF2442?style=flat" alt="Xiaohongshu: Official" /></a>
|
||||
<a href="https://t.me/zeroclawlabs"><img src="https://img.shields.io/badge/Telegram-%40zeroclawlabs-26A5E4?style=flat&logo=telegram&logoColor=white" alt="Telegram: @zeroclawlabs" /></a>
|
||||
<a href="https://www.facebook.com/groups/zeroclaw"><img src="https://img.shields.io/badge/Facebook-Group-1877F2?style=flat&logo=facebook&logoColor=white" alt="Facebook Group" /></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
🌐 <strong>Språk:</strong>
|
||||
<a href="README.md">🇺🇸 English</a> ·
|
||||
<a href="README.zh-CN.md">🇨🇳 简体中文</a> ·
|
||||
<a href="README.ja.md">🇯🇵 日本語</a> ·
|
||||
<a href="README.ko.md">🇰🇷 한국어</a> ·
|
||||
<a href="README.vi.md">🇻🇳 Tiếng Việt</a> ·
|
||||
<a href="README.tl.md">🇵🇭 Tagalog</a> ·
|
||||
<a href="README.es.md">🇪🇸 Español</a> ·
|
||||
<a href="README.pt.md">🇧🇷 Português</a> ·
|
||||
<a href="README.it.md">🇮🇹 Italiano</a> ·
|
||||
<a href="README.de.md">🇩🇪 Deutsch</a> ·
|
||||
<a href="README.fr.md">🇫🇷 Français</a> ·
|
||||
<a href="README.ar.md">🇸🇦 العربية</a> ·
|
||||
<a href="README.hi.md">🇮🇳 हिन्दी</a> ·
|
||||
<a href="README.ru.md">🇷🇺 Русский</a> ·
|
||||
<a href="README.bn.md">🇧🇩 বাংলা</a> ·
|
||||
<a href="README.he.md">🇮🇱 עברית</a> ·
|
||||
<a href="README.pl.md">🇵🇱 Polski</a> ·
|
||||
<a href="README.cs.md">🇨🇿 Čeština</a> ·
|
||||
<a href="README.nl.md">🇳🇱 Nederlands</a> ·
|
||||
<a href="README.tr.md">🇹🇷 Türkçe</a> ·
|
||||
<a href="README.uk.md">🇺🇦 Українська</a> ·
|
||||
<a href="README.id.md">🇮🇩 Bahasa Indonesia</a> ·
|
||||
<a href="README.th.md">🇹🇭 ไทย</a> ·
|
||||
<a href="README.ur.md">🇵🇰 اردو</a> ·
|
||||
<a href="README.ro.md">🇷🇴 Română</a> ·
|
||||
<a href="README.sv.md">🇸🇪 Svenska</a> ·
|
||||
<a href="README.el.md">🇬🇷 Ελληνικά</a> ·
|
||||
<a href="README.hu.md">🇭🇺 Magyar</a> ·
|
||||
<a href="README.fi.md">🇫🇮 Suomi</a> ·
|
||||
<a href="README.da.md">🇩🇰 Dansk</a> ·
|
||||
<a href="README.nb.md">🇳🇴 Norsk</a>
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
<!-- BEGIN:WHATS_NEW -->
|
||||
|
||||
### 🚀 What's New in v0.3.1 (March 2026)
|
||||
|
||||
| Area | Highlights |
|
||||
|---|---|
|
||||
| ci | add Termux (aarch64-linux-android) release target |
|
||||
|
||||
<!-- END:WHATS_NEW -->
|
||||
|
||||
## Hva er ZeroClaw?
|
||||
|
||||
ZeroClaw er en lettvektig, foranderlig og utvidbar AI-assistent-infrastruktur bygget i Rust. Den kobler sammen ulike LLM-leverandører (Anthropic, OpenAI, Google, Ollama osv.) via et samlet grensesnitt og støtter flere kanaler (Telegram, Matrix, CLI osv.).
|
||||
|
||||
### Hovedfunksjoner
|
||||
|
||||
- **🦀 Skrevet i Rust**: Høy ytelse, minnesikkerhet og nullkostnads-abstraksjoner
|
||||
- **🔌 Leverandør-agnostisk**: Støtter OpenAI, Anthropic, Google Gemini, Ollama og andre
|
||||
- **📱 Multi-kanal**: Telegram, Matrix (med E2EE), CLI og andre
|
||||
- **🧠 Pluggbart minne**: SQLite og Markdown-backends
|
||||
- **🛠️ Utvidbare verktøy**: Legg til tilpassede verktøy enkelt
|
||||
- **🔒 Sikkerhet først**: Omvendt proxy, personvern-først design
|
||||
|
||||
---
|
||||
|
||||
## Rask Start
|
||||
|
||||
### Krav
|
||||
|
||||
- Rust 1.70+
|
||||
- En LLM-leverandør API-nøkkel (Anthropic, OpenAI osv.)
|
||||
|
||||
### Installasjon
|
||||
|
||||
```bash
|
||||
# Klon repository
|
||||
git clone https://github.com/zeroclaw-labs/zeroclaw.git
|
||||
cd zeroclaw
|
||||
|
||||
# Bygg
|
||||
cargo build --release
|
||||
|
||||
# Kjør
|
||||
cargo run --release
|
||||
```
|
||||
|
||||
### Med Docker
|
||||
|
||||
```bash
|
||||
docker run -d \
|
||||
--name zeroclaw \
|
||||
-e ANTHROPIC_API_KEY=your_key \
|
||||
-v zeroclaw-data:/app/data \
|
||||
zeroclaw/zeroclaw:latest
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Konfigurasjon
|
||||
|
||||
ZeroClaw bruker en YAML-konfigurasjonsfil. Som standard ser den etter `config.yaml`.
|
||||
|
||||
```yaml
|
||||
# Standardleverandør
|
||||
provider: anthropic
|
||||
|
||||
# Leverandørkonfigurasjon
|
||||
providers:
|
||||
anthropic:
|
||||
api_key: ${ANTHROPIC_API_KEY}
|
||||
model: claude-3-5-sonnet-20241022
|
||||
openai:
|
||||
api_key: ${OPENAI_API_KEY}
|
||||
model: gpt-4o
|
||||
|
||||
# Minnekonfigurasjon
|
||||
memory:
|
||||
backend: sqlite
|
||||
path: data/memory.db
|
||||
|
||||
# Kanalkonfigurasjon
|
||||
channels:
|
||||
telegram:
|
||||
token: ${TELEGRAM_BOT_TOKEN}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Dokumentasjon
|
||||
|
||||
For detaljert dokumentasjon, se:
|
||||
|
||||
- [Dokumentasjonshub](docs/README.md)
|
||||
- [Kommandoreferanse](docs/commands-reference.md)
|
||||
- [Leverandørreferanse](docs/providers-reference.md)
|
||||
- [Kanalreferanse](docs/channels-reference.md)
|
||||
- [Konfigurasjonsreferanse](docs/config-reference.md)
|
||||
|
||||
---
|
||||
|
||||
## Bidrag
|
||||
|
||||
Bidrag er velkomne! Vennligst les [Bidragsguiden](CONTRIBUTING.md).
|
||||
|
||||
---
|
||||
|
||||
## Lisens
|
||||
|
||||
Dette prosjektet er dobbelt-lisensiert:
|
||||
|
||||
- MIT License
|
||||
- Apache License, versjon 2.0
|
||||
|
||||
Se [LICENSE-APACHE](LICENSE-APACHE) og [LICENSE-MIT](LICENSE-MIT) for detaljer.
|
||||
|
||||
---
|
||||
|
||||
## Fellesskap
|
||||
|
||||
- [Telegram](https://t.me/zeroclawlabs)
|
||||
- [Facebook Group](https://www.facebook.com/groups/zeroclaw)
|
||||
- [WeChat Group](https://zeroclawlabs.cn/group.jpg)
|
||||
|
||||
---
|
||||
|
||||
## Sponsorer
|
||||
|
||||
Hvis ZeroClaw er nyttig for deg, vennligst vurder å kjøpe oss en kaffe:
|
||||
|
||||
[](https://buymeacoffee.com/argenistherose)
|
||||
|
||||
<!-- BEGIN:RECENT_CONTRIBUTORS -->
|
||||
|
||||
### 🌟 Recent Contributors (v0.3.1)
|
||||
|
||||
3 contributors shipped features, fixes, and improvements in this release cycle:
|
||||
|
||||
- **Argenis**
|
||||
- **argenis de la rosa**
|
||||
- **Claude Opus 4.6**
|
||||
|
||||
Thank you to everyone who opened issues, reviewed PRs, translated docs, and helped test. Every contribution matters. 🦀
|
||||
|
||||
<!-- END:RECENT_CONTRIBUTORS -->
|
||||
+501
@@ -0,0 +1,501 @@
|
||||
<p align="center">
|
||||
<img src="zeroclaw.png" alt="ZeroClaw" width="200" />
|
||||
</p>
|
||||
|
||||
<h1 align="center">ZeroClaw 🦀</h1>
|
||||
|
||||
<p align="center">
|
||||
<strong>Nul overhead. Nul compromis. 100% Rust. 100% Agnostisch.</strong><br>
|
||||
⚡️ <strong>Draait op $10 hardware met <5MB RAM: Dat is 99% minder geheugen dan OpenClaw en 98% goedkoper dan een Mac mini!</strong>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="LICENSE-APACHE"><img src="https://img.shields.io/badge/license-MIT%20OR%20Apache%202.0-blue.svg" alt="License: MIT OR Apache-2.0" /></a>
|
||||
<a href="NOTICE"><img src="https://img.shields.io/badge/contributors-27+-green.svg" alt="Contributors" /></a>
|
||||
<a href="https://buymeacoffee.com/argenistherose"><img src="https://img.shields.io/badge/Buy%20Me%20a%20Coffee-Donate-yellow.svg?style=flat&logo=buy-me-a-coffee" alt="Buy Me a Coffee" /></a>
|
||||
<a href="https://x.com/zeroclawlabs?s=21"><img src="https://img.shields.io/badge/X-%40zeroclawlabs-000000?style=flat&logo=x&logoColor=white" alt="X: @zeroclawlabs" /></a>
|
||||
<a href="https://zeroclawlabs.cn/group.jpg"><img src="https://img.shields.io/badge/WeChat-Group-B7D7A8?logo=wechat&logoColor=white" alt="WeChat Group" /></a>
|
||||
<a href="https://www.xiaohongshu.com/user/profile/67cbfc43000000000d008307?xsec_token=AB73VnYnGNx5y36EtnnZfGmAmS-6Wzv8WMuGpfwfkg6Yc%3D&xsec_source=pc_search"><img src="https://img.shields.io/badge/Xiaohongshu-Official-FF2442?style=flat" alt="Xiaohongshu: Official" /></a>
|
||||
<a href="https://t.me/zeroclawlabs"><img src="https://img.shields.io/badge/Telegram-%40zeroclawlabs-26A5E4?style=flat&logo=telegram&logoColor=white" alt="Telegram: @zeroclawlabs" /></a>
|
||||
<a href="https://www.facebook.com/groups/zeroclaw"><img src="https://img.shields.io/badge/Facebook-Group-1877F2?style=flat&logo=facebook&logoColor=white" alt="Facebook Group" /></a>
|
||||
<a href="https://www.reddit.com/r/zeroclawlabs/"><img src="https://img.shields.io/badge/Reddit-r%2Fzeroclawlabs-FF4500?style=flat&logo=reddit&logoColor=white" alt="Reddit: r/zeroclawlabs" /></a>
|
||||
</p>
|
||||
<p align="center">
|
||||
Gebouwd door studenten en leden van de Harvard, MIT en Sundai.Club gemeenschappen.
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
🌐 <strong>Talen:</strong><a href="README.md">🇺🇸 English</a> ·
|
||||
<a href="README.zh-CN.md">🇨🇳 简体中文</a> ·
|
||||
<a href="README.ja.md">🇯🇵 日本語</a> ·
|
||||
<a href="README.ko.md">🇰🇷 한국어</a> ·
|
||||
<a href="README.vi.md">🇻🇳 Tiếng Việt</a> ·
|
||||
<a href="README.tl.md">🇵🇭 Tagalog</a> ·
|
||||
<a href="README.es.md">🇪🇸 Español</a> ·
|
||||
<a href="README.pt.md">🇧🇷 Português</a> ·
|
||||
<a href="README.it.md">🇮🇹 Italiano</a> ·
|
||||
<a href="README.de.md">🇩🇪 Deutsch</a> ·
|
||||
<a href="README.fr.md">🇫🇷 Français</a> ·
|
||||
<a href="README.ar.md">🇸🇦 العربية</a> ·
|
||||
<a href="README.hi.md">🇮🇳 हिन्दी</a> ·
|
||||
<a href="README.ru.md">🇷🇺 Русский</a> ·
|
||||
<a href="README.bn.md">🇧🇩 বাংলা</a> ·
|
||||
<a href="README.he.md">🇮🇱 עברית</a> ·
|
||||
<a href="README.pl.md">🇵🇱 Polski</a> ·
|
||||
<a href="README.cs.md">🇨🇿 Čeština</a> ·
|
||||
<a href="README.nl.md">🇳🇱 Nederlands</a> ·
|
||||
<a href="README.tr.md">🇹🇷 Türkçe</a> ·
|
||||
<a href="README.uk.md">🇺🇦 Українська</a> ·
|
||||
<a href="README.id.md">🇮🇩 Bahasa Indonesia</a> ·
|
||||
<a href="README.th.md">🇹🇭 ไทย</a> ·
|
||||
<a href="README.ur.md">🇵🇰 اردو</a> ·
|
||||
<a href="README.ro.md">🇷🇴 Română</a> ·
|
||||
<a href="README.sv.md">🇸🇪 Svenska</a> ·
|
||||
<a href="README.el.md">🇬🇷 Ελληνικά</a> ·
|
||||
<a href="README.hu.md">🇭🇺 Magyar</a> ·
|
||||
<a href="README.fi.md">🇫🇮 Suomi</a> ·
|
||||
<a href="README.da.md">🇩🇰 Dansk</a> ·
|
||||
<a href="README.nb.md">🇳🇴 Norsk</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="#snelle-start">Snelle Start</a> |
|
||||
<a href="bootstrap.sh">One-Click Setup</a> |
|
||||
<a href="docs/README.md">Documentatie Hub</a> |
|
||||
<a href="docs/SUMMARY.md">Documentatie Inhoudsopgave</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<strong>Snelle toegang:</strong>
|
||||
<a href="docs/reference/README.md">Referentie</a> ·
|
||||
<a href="docs/operations/README.md">Operations</a> ·
|
||||
<a href="docs/troubleshooting.md">Probleemoplossing</a> ·
|
||||
<a href="docs/security/README.md">Beveiliging</a> ·
|
||||
<a href="docs/hardware/README.md">Hardware</a> ·
|
||||
<a href="docs/contributing/README.md">Bijdragen</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<strong>Snelle, lichtgewicht en volledig autonome AI-assistent infrastructuur</strong><br />
|
||||
Implementeer overal. Wissel alles.
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
ZeroClaw is het <strong>runtime besturingssysteem</strong> voor agent workflows — een infrastructuur die modellen, tools, geheugen en uitvoering abstraheert om agenten één keer te bouwen en overal uit te voeren.
|
||||
</p>
|
||||
|
||||
<p align="center"><code>Trait-gedreven architectuur · veilige runtime standaard · verwisselbare provider/kanaal/tool · alles is plugbaar</code></p>
|
||||
|
||||
<!-- BEGIN:WHATS_NEW -->
|
||||
|
||||
### 🚀 What's New in v0.3.1 (March 2026)
|
||||
|
||||
| Area | Highlights |
|
||||
|---|---|
|
||||
| ci | add Termux (aarch64-linux-android) release target |
|
||||
|
||||
<!-- END:WHATS_NEW -->
|
||||
|
||||
### 📢 Aankondigingen
|
||||
|
||||
Gebruik deze tabel voor belangrijke aankondigingen (compatibiliteitswijzigingen, beveiligingsberichten, onderhoudsvensters en versieblokkades).
|
||||
|
||||
| Datum (UTC) | Niveau | Aankondiging | Actie |
|
||||
| ---------- | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| 2026-02-19 | _Kritiek_ | **We zijn niet gelieerd** met `openagen/zeroclaw` of `zeroclaw.org`. Het domein `zeroclaw.org` wijst momenteel naar de fork `openagen/zeroclaw`, en dit domein/repository imiteert onze officiële website/project. | Vertrouw geen informatie, binaire bestanden, fondsenwerving of aankondigingen van deze bronnen. Gebruik alleen [deze repository](https://github.com/zeroclaw-labs/zeroclaw) en onze geverifieerde sociale media accounts. |
|
||||
| 2026-02-21 | _Belangrijk_ | Onze officiële website is nu online: [zeroclawlabs.ai](https://zeroclawlabs.ai). Bedankt voor je geduld tijdens het wachten. We detecteren nog steeds imitatiepogingen: neem niet deel aan enige investering/fondsenwerving activiteit in naam van ZeroClaw als deze niet via onze officiële kanalen wordt gepubliceerd. | Gebruik [deze repository](https://github.com/zeroclaw-labs/zeroclaw) als de enige bron van waarheid. Volg [X (@zeroclawlabs)](https://x.com/zeroclawlabs?s=21), [Telegram (@zeroclawlabs)](https://t.me/zeroclawlabs), [Facebook (groep)](https://www.facebook.com/groups/zeroclaw), [Reddit (r/zeroclawlabs)](https://www.reddit.com/r/zeroclawlabs/), en [Xiaohongshu](https://www.xiaohongshu.com/user/profile/67cbfc43000000000d008307?xsec_token=AB73VnYnGNx5y36EtnnZfGmAmS-6Wzv8WMuGpfwfkg6Yc%3D&xsec_source=pc_search) voor officiële updates. |
|
||||
| 2026-02-19 | _Belangrijk_ | Anthropic heeft de gebruiksvoorwaarden voor authenticatie en inloggegevens bijgewerkt op 2026-02-19. OAuth authenticatie (Free, Pro, Max) is exclusief voor Claude Code en Claude.ai; het gebruik van Claude Free/Pro/Max OAuth tokens in enig ander product, tool of service (inclusief Agent SDK) is niet toegestaan en kan in strijd zijn met de Consumenten Gebruiksvoorwaarden. | Vermijd tijdelijk Claude Code OAuth integraties om potentiële verliezen te voorkomen. Originele clausule: [Authentication and Credential Use](https://code.claude.com/docs/en/legal-and-compliance#authentication-and-credential-use). |
|
||||
|
||||
### ✨ Functies
|
||||
|
||||
- 🏎️ **Lichtgewicht Runtime Standaard:** Veelvoorkomende CLI workflows en statuscommando's draaien binnen een geheugenruimte van enkele megabytes in productie builds.
|
||||
- 💰 **Kosteneffectieve Implementatie:** Ontworpen voor goedkope boards en kleine cloud instanties zonder zware runtime afhankelijkheden.
|
||||
- ⚡ **Snelle Koude Starts:** De single-binary Rust runtime houdt commando en daemon starts bijna direct voor dagelijkse operaties.
|
||||
- 🌍 **Draagbare Architectuur:** Een single-binary workflow op ARM, x86 en RISC-V met verwisselbare provider/kanaal/tool.
|
||||
|
||||
### Waarom teams kiezen voor ZeroClaw
|
||||
|
||||
- **Lichtgewicht standaard:** kleine Rust binary, snelle start, laag geheugengebruik.
|
||||
- **Veilig door design:** pairing, strikte sandboxing, expliciete allowlists, workspace scope.
|
||||
- **Volledig verwisselbaar:** kernsystemen zijn traits (providers, kanalen, tools, geheugen, tunnels).
|
||||
- **Geen vendor lock-in:** OpenAI-compatibele provider ondersteuning + plugbare custom endpoints.
|
||||
|
||||
## Benchmark Snapshot (ZeroClaw vs OpenClaw, Reproduceerbaar)
|
||||
|
||||
Snelle benchmark op lokale machine (macOS arm64, feb. 2026) genormaliseerd voor 0.8 GHz edge hardware.
|
||||
|
||||
| | OpenClaw | NanoBot | PicoClaw | ZeroClaw 🦀 |
|
||||
| ---------------------------- | ------------- | -------------- | --------------- | --------------------- |
|
||||
| **Taal** | TypeScript | Python | Go | **Rust** |
|
||||
| **RAM** | > 1 GB | > 100 MB | < 10 MB | **< 5 MB** |
|
||||
| **Start (0.8 GHz core)** | > 500s | > 30s | < 1s | **< 10ms** |
|
||||
| **Binary Grootte** | ~28 MB (dist) | N/A (Scripts) | ~8 MB | **3.4 MB** |
|
||||
| **Kosten** | Mac Mini $599 | Linux SBC ~$50 | Linux board $10 | **Elke hardware $10** |
|
||||
|
||||
> Opmerkingen: ZeroClaw resultaten worden gemeten op productie builds met `/usr/bin/time -l`. OpenClaw vereist de Node.js runtime (typisch ~390 MB extra geheugen overhead), terwijl NanoBot de Python runtime vereist. PicoClaw en ZeroClaw zijn statische binaries. De bovenstaande RAM cijfers zijn runtime geheugen; build-time compilatievereisten zijn hoger.
|
||||
|
||||
<p align="center">
|
||||
<img src="zero-claw.jpeg" alt="ZeroClaw vs OpenClaw Vergelijking" width="800" />
|
||||
</p>
|
||||
|
||||
### Reproduceerbare Lokale Meting
|
||||
|
||||
Benchmark beweringen kunnen afwijken naarmate code en toolchains evolueren, dus meet altijd je huidige build lokaal:
|
||||
|
||||
```bash
|
||||
cargo build --release
|
||||
ls -lh target/release/zeroclaw
|
||||
|
||||
/usr/bin/time -l target/release/zeroclaw --help
|
||||
/usr/bin/time -l target/release/zeroclaw status
|
||||
```
|
||||
|
||||
Voorbeeld monster (macOS arm64, gemeten op 18 februari 2026):
|
||||
|
||||
- Release binary grootte: `8.8M`
|
||||
- `zeroclaw --help`: werkelijke tijd ongeveer `0.02s`, piek geheugengebruik ~`3.9 MB`
|
||||
- `zeroclaw status`: werkelijke tijd ongeveer `0.01s`, piek geheugengebruik ~`4.1 MB`
|
||||
|
||||
## Vereisten
|
||||
|
||||
<details>
|
||||
<summary><strong>Windows</strong></summary>
|
||||
|
||||
### Windows — Vereist
|
||||
|
||||
1. **Visual Studio Build Tools** (levert MSVC linker en Windows SDK):
|
||||
|
||||
```powershell
|
||||
winget install Microsoft.VisualStudio.2022.BuildTools
|
||||
```
|
||||
|
||||
Selecteer tijdens de installatie (of via Visual Studio Installer) de **"Desktop development with C++"** workload.
|
||||
|
||||
2. **Rust Toolchain:**
|
||||
|
||||
```powershell
|
||||
winget install Rustlang.Rustup
|
||||
```
|
||||
|
||||
Na installatie, open een nieuwe terminal en voer `rustup default stable` uit om ervoor te zorgen dat de stabiele toolchain actief is.
|
||||
|
||||
3. **Verifieer** dat beide werken:
|
||||
```powershell
|
||||
rustc --version
|
||||
cargo --version
|
||||
```
|
||||
|
||||
### Windows — Optioneel
|
||||
|
||||
- **Docker Desktop** — alleen vereist als je de [Docker sandboxed runtime](#huidige-runtime-ondersteuning) gebruikt (`runtime.kind = "docker"`). Installeer via `winget install Docker.DockerDesktop`.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>Linux / macOS</strong></summary>
|
||||
|
||||
### Linux / macOS — Vereist
|
||||
|
||||
1. **Essentiële build tools:**
|
||||
- **Linux (Debian/Ubuntu):** `sudo apt install build-essential pkg-config`
|
||||
- **Linux (Fedora/RHEL):** `sudo dnf group install development-tools && sudo dnf install pkg-config`
|
||||
- **macOS:** Installeer Xcode Command Line Tools: `xcode-select --install`
|
||||
|
||||
2. **Rust Toolchain:**
|
||||
|
||||
```bash
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||
```
|
||||
|
||||
Zie [rustup.rs](https://rustup.rs) voor details.
|
||||
|
||||
3. **Verifieer:**
|
||||
```bash
|
||||
rustc --version
|
||||
cargo --version
|
||||
```
|
||||
|
||||
### Linux / macOS — Optioneel
|
||||
|
||||
- **Docker** — alleen vereist als je de [Docker sandboxed runtime](#huidige-runtime-ondersteuning) gebruikt (`runtime.kind = "docker"`).
|
||||
- **Linux (Debian/Ubuntu):** zie [docs.docker.com](https://docs.docker.com/engine/install/ubuntu/)
|
||||
- **Linux (Fedora/RHEL):** zie [docs.docker.com](https://docs.docker.com/engine/install/fedora/)
|
||||
- **macOS:** installeer Docker Desktop via [docker.com/products/docker-desktop](https://www.docker.com/products/docker-desktop/)
|
||||
|
||||
</details>
|
||||
|
||||
## Snelle Start
|
||||
|
||||
### Optie 1: Geautomatiseerde setup (aanbevolen)
|
||||
|
||||
Het `bootstrap.sh` script installeert Rust, kloont ZeroClaw, compileert het, en stelt je initiële ontwikkelomgeving in:
|
||||
|
||||
```bash
|
||||
curl -fsSL https://raw.githubusercontent.com/zeroclaw-labs/zeroclaw/master/bootstrap.sh | bash
|
||||
```
|
||||
|
||||
Dit zal:
|
||||
|
||||
1. Rust installeren (indien afwezig)
|
||||
2. De ZeroClaw repository klonen
|
||||
3. ZeroClaw compileren in release modus
|
||||
4. `zeroclaw` installeren in `~/.cargo/bin/`
|
||||
5. De standaard workspace structuur maken in `~/.zeroclaw/workspace/`
|
||||
6. Een initiële configuratie `~/.zeroclaw/workspace/config.toml` genereren
|
||||
|
||||
Na de bootstrap, herlaad je shell of voer `source ~/.cargo/env` uit om het `zeroclaw` commando globaal te gebruiken.
|
||||
|
||||
### Optie 2: Handmatige installatie
|
||||
|
||||
<details>
|
||||
<summary><strong>Klik om handmatige installatiestappen te zien</strong></summary>
|
||||
|
||||
```bash
|
||||
# 1. Kloon de repository
|
||||
git clone https://github.com/zeroclaw-labs/zeroclaw.git
|
||||
cd zeroclaw
|
||||
|
||||
# 2. Compileer in release
|
||||
cargo build --release --locked
|
||||
|
||||
# 3. Installeer de binary
|
||||
cargo install --path . --locked
|
||||
|
||||
# 4. Initialiseer de workspace
|
||||
zeroclaw init
|
||||
|
||||
# 5. Verifieer de installatie
|
||||
zeroclaw --version
|
||||
zeroclaw status
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Na Installatie
|
||||
|
||||
Eenmaal geïnstalleerd (via bootstrap of handmatig), zou je moeten zien:
|
||||
|
||||
```
|
||||
~/.zeroclaw/workspace/
|
||||
├── config.toml # Hoofdconfiguratie
|
||||
├── .pairing # Pairing geheimen (gegenereerd bij eerste lancering)
|
||||
├── logs/ # Daemon/agent logs
|
||||
├── skills/ # Aangepaste vaardigheden
|
||||
└── memory/ # Gesprekscontext opslag
|
||||
```
|
||||
|
||||
**Volgende stappen:**
|
||||
|
||||
1. Configureer je AI providers in `~/.zeroclaw/workspace/config.toml`
|
||||
2. Bekijk de [configuratie referentie](docs/config-reference.md) voor geavanceerde opties
|
||||
3. Start de agent: `zeroclaw agent start`
|
||||
4. Test via je voorkeurskanaal (zie [kanalen referentie](docs/channels-reference.md))
|
||||
|
||||
## Configuratie
|
||||
|
||||
Bewerk `~/.zeroclaw/workspace/config.toml` om providers, kanalen en systeemgedrag te configureren.
|
||||
|
||||
### Snelle Configuratie Referentie
|
||||
|
||||
```toml
|
||||
[providers.anthropic]
|
||||
api_key = "sk-ant-..."
|
||||
model = "claude-sonnet-4-20250514"
|
||||
|
||||
[providers.openai]
|
||||
api_key = "sk-..."
|
||||
model = "gpt-4o"
|
||||
|
||||
[channels.telegram]
|
||||
enabled = true
|
||||
bot_token = "123456:ABC-DEF..."
|
||||
|
||||
[channels.matrix]
|
||||
enabled = true
|
||||
homeserver_url = "https://matrix.org"
|
||||
username = "@bot:matrix.org"
|
||||
password = "..."
|
||||
|
||||
[memory]
|
||||
kind = "markdown" # of "sqlite" of "none"
|
||||
|
||||
[runtime]
|
||||
kind = "native" # of "docker" (vereist Docker)
|
||||
```
|
||||
|
||||
**Volledige referentie documenten:**
|
||||
|
||||
- [Configuratie Referentie](docs/config-reference.md) — alle instellingen, validaties, standaardwaarden
|
||||
- [Providers Referentie](docs/providers-reference.md) — AI provider-specifieke configuraties
|
||||
- [Kanalen Referentie](docs/channels-reference.md) — Telegram, Matrix, Slack, Discord en meer
|
||||
- [Operations](docs/operations-runbook.md) — productie monitoring, geheim rotatie, schaling
|
||||
|
||||
### Huidige Runtime Ondersteuning
|
||||
|
||||
ZeroClaw ondersteunt twee code uitvoeringsbackends:
|
||||
|
||||
- **`native`** (standaard) — directe procesuitvoering, snelste pad, ideaal voor vertrouwde omgevingen
|
||||
- **`docker`** — volledige container isolatie, versterkt beveiligingsbeleid, vereist Docker
|
||||
|
||||
Gebruik `runtime.kind = "docker"` als je strikte sandboxing of netwerkisolatie nodig hebt. Zie [configuratie referentie](docs/config-reference.md#runtime) voor volledige details.
|
||||
|
||||
## Commando's
|
||||
|
||||
```bash
|
||||
# Workspace beheer
|
||||
zeroclaw init # Initialiseert een nieuwe workspace
|
||||
zeroclaw status # Toont daemon/agent status
|
||||
zeroclaw config validate # Verifieert config.toml syntax en waarden
|
||||
|
||||
# Daemon beheer
|
||||
zeroclaw daemon start # Start de daemon in de achtergrond
|
||||
zeroclaw daemon stop # Stopt de draaiende daemon
|
||||
zeroclaw daemon restart # Herstart de daemon (config herladen)
|
||||
zeroclaw daemon logs # Toont daemon logs
|
||||
|
||||
# Agent beheer
|
||||
zeroclaw agent start # Start de agent (vereist draaiende daemon)
|
||||
zeroclaw agent stop # Stopt de agent
|
||||
zeroclaw agent restart # Herstart de agent (config herladen)
|
||||
|
||||
# Pairing operaties
|
||||
zeroclaw pairing init # Genereert een nieuw pairing geheim
|
||||
zeroclaw pairing rotate # Roteert het bestaande pairing geheim
|
||||
|
||||
# Tunneling (voor publieke blootstelling)
|
||||
zeroclaw tunnel start # Start een tunnel naar de lokale daemon
|
||||
zeroclaw tunnel stop # Stopt de actieve tunnel
|
||||
|
||||
# Diagnostiek
|
||||
zeroclaw doctor # Voert systeem gezondheidscontroles uit
|
||||
zeroclaw version # Toont versie en build informatie
|
||||
```
|
||||
|
||||
Zie [Commando's Referentie](docs/commands-reference.md) voor volledige opties en voorbeelden.
|
||||
|
||||
## Samenwerking & Docs
|
||||
|
||||
Begin met de documentatie hub voor een taak-gebaseerde kaart:
|
||||
|
||||
- Documentatie Hub: [`docs/README.md`](docs/README.md)
|
||||
- Geünificeerde Docs TOC: [`docs/SUMMARY.md`](docs/SUMMARY.md)
|
||||
- Commando's Referentie: [`docs/commands-reference.md`](docs/commands-reference.md)
|
||||
- Configuratie Referentie: [`docs/config-reference.md`](docs/config-reference.md)
|
||||
- Providers Referentie: [`docs/providers-reference.md`](docs/providers-reference.md)
|
||||
- Kanalen Referentie: [`docs/channels-reference.md`](docs/channels-reference.md)
|
||||
- Operations Runbook: [`docs/operations-runbook.md`](docs/operations-runbook.md)
|
||||
- Probleemoplossing: [`docs/troubleshooting.md`](docs/troubleshooting.md)
|
||||
- Docs Inventaris/Classificatie: [`docs/docs-inventory.md`](docs/docs-inventory.md)
|
||||
- PR/Issue Triage Snapshot (vanaf 18 feb. 2026): [`docs/project-triage-snapshot-2026-02-18.md`](docs/project-triage-snapshot-2026-02-18.md)
|
||||
|
||||
Belangrijkste samenwerkingsreferenties:
|
||||
|
||||
- Documentatie Hub: [docs/README.md](docs/README.md)
|
||||
- Documentatie Sjabloon: [docs/doc-template.md](docs/doc-template.md)
|
||||
- Documentatiewijziging Checklist: [docs/README.md#4-documentation-change-checklist](docs/README.md#4-documentation-change-checklist)
|
||||
- Kanaal Configuratie Referentie: [docs/channels-reference.md](docs/channels-reference.md)
|
||||
- Matrix Versleutelde Kamer Operations: [docs/matrix-e2ee-guide.md](docs/matrix-e2ee-guide.md)
|
||||
- Bijdrage Gids: [CONTRIBUTING.md](CONTRIBUTING.md)
|
||||
- PR Workflow Beleid: [docs/pr-workflow.md](docs/pr-workflow.md)
|
||||
- Reviewer Playbook (triage + diepgaande review): [docs/reviewer-playbook.md](docs/reviewer-playbook.md)
|
||||
- Eigendom en CI Triage Kaart: [docs/ci-map.md](docs/ci-map.md)
|
||||
- Beveiligingsopenbaarmaking Beleid: [SECURITY.md](SECURITY.md)
|
||||
|
||||
Voor implementatie en runtime operaties:
|
||||
|
||||
- Netwerk Implementatie Gids: [docs/network-deployment.md](docs/network-deployment.md)
|
||||
- Proxy Agent Playbook: [docs/proxy-agent-playbook.md](docs/proxy-agent-playbook.md)
|
||||
|
||||
## ZeroClaw Ondersteunen
|
||||
|
||||
Als ZeroClaw je werk helpt en je de doorlopende ontwikkeling wilt ondersteunen, kun je hier doneren:
|
||||
|
||||
<a href="https://buymeacoffee.com/argenistherose"><img src="https://img.shields.io/badge/Buy%20Me%20a%20Coffee-Donate-yellow.svg?style=for-the-badge&logo=buy-me-a-coffee" alt="Koop Een Koffie Voor Mij" /></a>
|
||||
|
||||
### 🙏 Speciale Dank
|
||||
|
||||
Een oprechte dankjewel aan de gemeenschappen en instellingen die dit open-source werk inspireren en voeden:
|
||||
|
||||
- **Harvard University** — voor het bevorderen van intellectuele nieuwsgierigheid en het verleggen van de grenzen van wat mogelijk is.
|
||||
- **MIT** — voor het verdedigen van open kennis, open source, en de overtuiging dat technologie toegankelijk moet zijn voor iedereen.
|
||||
- **Sundai Club** — voor de gemeenschap, energie, en de onophoudelijke wil om dingen te bouwen die ertoe doen.
|
||||
- **De Wereld en Verder** 🌍✨ — aan elke bijdrager, dromer, en bouwer daarbuiten die open source tot een kracht voor goed maakt. Dit is voor jou.
|
||||
|
||||
We bouwen in open source omdat de beste ideeën van overal komen. Als je dit leest, ben je er deel van. Welkom. 🦀❤️
|
||||
|
||||
<!-- BEGIN:RECENT_CONTRIBUTORS -->
|
||||
|
||||
### 🌟 Recent Contributors (v0.3.1)
|
||||
|
||||
3 contributors shipped features, fixes, and improvements in this release cycle:
|
||||
|
||||
- **Argenis**
|
||||
- **argenis de la rosa**
|
||||
- **Claude Opus 4.6**
|
||||
|
||||
Thank you to everyone who opened issues, reviewed PRs, translated docs, and helped test. Every contribution matters. 🦀
|
||||
|
||||
<!-- END:RECENT_CONTRIBUTORS -->
|
||||
|
||||
## ⚠️ Officiële Repository en Waarschuwing voor Imitatie
|
||||
|
||||
**Dit is de enige officiële ZeroClaw repository:**
|
||||
|
||||
> <https://github.com/zeroclaw-labs/zeroclaw>
|
||||
|
||||
Elke andere repository, organisatie, domein of pakket dat beweert "ZeroClaw" te zijn of affiniteit met ZeroClaw Labs suggereert is **niet-geautoriseerd en niet gelieerd aan dit project**. Bekende niet-geautoriseerde forks worden vermeld in [TRADEMARK.md](TRADEMARK.md).
|
||||
|
||||
Als je imitatie of handelsmerk misbruik tegenkomt, [open dan een issue](https://github.com/zeroclaw-labs/zeroclaw/issues).
|
||||
|
||||
---
|
||||
|
||||
## Licentie
|
||||
|
||||
ZeroClaw is dubbel gelicentieerd voor maximale openheid en bijdrager bescherming:
|
||||
|
||||
| Licentie | Gebruiksscenario's |
|
||||
| ---------------------------- | ------------------------------------------------------------ |
|
||||
| [MIT](LICENSE-MIT) | Open-source, onderzoek, academisch, persoonlijk gebruik |
|
||||
| [Apache 2.0](LICENSE-APACHE) | Patent bescherming, institutioneel, commerciële implementatie |
|
||||
|
||||
Je kunt een van beide licenties kiezen. **Bijdragers verlenen automatisch rechten onder beide** — zie [CLA.md](CLA.md) voor de volledige bijdrager overeenkomst.
|
||||
|
||||
### Handelsmerk
|
||||
|
||||
De naam **ZeroClaw** en het logo zijn geregistreerde handelsmerken van ZeroClaw Labs. Deze licentie verleent geen toestemming om ze te gebruiken om goedkeuring of affiniteit te impliceren. Zie [TRADEMARK.md](TRADEMARK.md) voor toegestane en verboden gebruiksmogelijkheden.
|
||||
|
||||
### Bijdrager Beschermingen
|
||||
|
||||
- **Je behoudt auteursrechten** op je bijdragen
|
||||
- **Patent verlening** (Apache 2.0) beschermt je tegen patent claims door andere bijdragers
|
||||
- Je bijdragen worden **permanent toegeschreven** in de commit geschiedenis en [NOTICE](NOTICE)
|
||||
- Geen handelsmerk rechten worden overgedragen door bij te dragen
|
||||
|
||||
## Bijdragen
|
||||
|
||||
Zie [CONTRIBUTING.md](CONTRIBUTING.md) en [CLA.md](CLA.md). Implementeer een trait, dien een PR in:
|
||||
|
||||
- CI workflow gids: [docs/ci-map.md](docs/ci-map.md)
|
||||
- Nieuwe `Provider` → `src/providers/`
|
||||
- Nieuw `Channel` → `src/channels/`
|
||||
- Nieuwe `Observer` → `src/observability/`
|
||||
- Nieuwe `Tool` → `src/tools/`
|
||||
- Nieuwe `Memory` → `src/memory/`
|
||||
- Nieuwe `Tunnel` → `src/tunnel/`
|
||||
- Nieuwe `Skill` → `~/.zeroclaw/workspace/skills/<n>/`
|
||||
|
||||
---
|
||||
|
||||
**ZeroClaw** — Nul overhead. Nul compromis. Implementeer overal. Wissel alles. 🦀
|
||||
|
||||
## Sterren Geschiedenis
|
||||
|
||||
<p align="center">
|
||||
<a href="https://www.star-history.com/#zeroclaw-labs/zeroclaw&type=date&legend=top-left">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=zeroclaw-labs/zeroclaw&type=date&theme=dark&legend=top-left" />
|
||||
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=zeroclaw-labs/zeroclaw&type=date&legend=top-left" />
|
||||
<img alt="Sterren Geschiedenis Grafiek" src="https://api.star-history.com/svg?repos=zeroclaw-labs/zeroclaw&type=date&legend=top-left" />
|
||||
</picture>
|
||||
</a>
|
||||
</p>
|
||||
+501
@@ -0,0 +1,501 @@
|
||||
<p align="center">
|
||||
<img src="zeroclaw.png" alt="ZeroClaw" width="200" />
|
||||
</p>
|
||||
|
||||
<h1 align="center">ZeroClaw 🦀</h1>
|
||||
|
||||
<p align="center">
|
||||
<strong>Zero narzutu. Zero kompromisów. 100% Rust. 100% Agnostyczny.</strong><br>
|
||||
⚡️ <strong>Działa na sprzęcie za $10 z <5MB RAM: To 99% mniej pamięci niż OpenClaw i 98% taniej niż Mac mini!</strong>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="LICENSE-APACHE"><img src="https://img.shields.io/badge/license-MIT%20OR%20Apache%202.0-blue.svg" alt="License: MIT OR Apache-2.0" /></a>
|
||||
<a href="NOTICE"><img src="https://img.shields.io/badge/contributors-27+-green.svg" alt="Contributors" /></a>
|
||||
<a href="https://buymeacoffee.com/argenistherose"><img src="https://img.shields.io/badge/Buy%20Me%20a%20Coffee-Donate-yellow.svg?style=flat&logo=buy-me-a-coffee" alt="Buy Me a Coffee" /></a>
|
||||
<a href="https://x.com/zeroclawlabs?s=21"><img src="https://img.shields.io/badge/X-%40zeroclawlabs-000000?style=flat&logo=x&logoColor=white" alt="X: @zeroclawlabs" /></a>
|
||||
<a href="https://zeroclawlabs.cn/group.jpg"><img src="https://img.shields.io/badge/WeChat-Group-B7D7A8?logo=wechat&logoColor=white" alt="WeChat Group" /></a>
|
||||
<a href="https://www.xiaohongshu.com/user/profile/67cbfc43000000000d008307?xsec_token=AB73VnYnGNx5y36EtnnZfGmAmS-6Wzv8WMuGpfwfkg6Yc%3D&xsec_source=pc_search"><img src="https://img.shields.io/badge/Xiaohongshu-Official-FF2442?style=flat" alt="Xiaohongshu: Official" /></a>
|
||||
<a href="https://t.me/zeroclawlabs"><img src="https://img.shields.io/badge/Telegram-%40zeroclawlabs-26A5E4?style=flat&logo=telegram&logoColor=white" alt="Telegram: @zeroclawlabs" /></a>
|
||||
<a href="https://www.facebook.com/groups/zeroclaw"><img src="https://img.shields.io/badge/Facebook-Group-1877F2?style=flat&logo=facebook&logoColor=white" alt="Facebook Group" /></a>
|
||||
<a href="https://www.reddit.com/r/zeroclawlabs/"><img src="https://img.shields.io/badge/Reddit-r%2Fzeroclawlabs-FF4500?style=flat&logo=reddit&logoColor=white" alt="Reddit: r/zeroclawlabs" /></a>
|
||||
</p>
|
||||
<p align="center">
|
||||
Zbudowany przez studentów i członków społeczności Harvard, MIT i Sundai.Club.
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
🌐 <strong>Języki:</strong><a href="README.md">🇺🇸 English</a> ·
|
||||
<a href="README.zh-CN.md">🇨🇳 简体中文</a> ·
|
||||
<a href="README.ja.md">🇯🇵 日本語</a> ·
|
||||
<a href="README.ko.md">🇰🇷 한국어</a> ·
|
||||
<a href="README.vi.md">🇻🇳 Tiếng Việt</a> ·
|
||||
<a href="README.tl.md">🇵🇭 Tagalog</a> ·
|
||||
<a href="README.es.md">🇪🇸 Español</a> ·
|
||||
<a href="README.pt.md">🇧🇷 Português</a> ·
|
||||
<a href="README.it.md">🇮🇹 Italiano</a> ·
|
||||
<a href="README.de.md">🇩🇪 Deutsch</a> ·
|
||||
<a href="README.fr.md">🇫🇷 Français</a> ·
|
||||
<a href="README.ar.md">🇸🇦 العربية</a> ·
|
||||
<a href="README.hi.md">🇮🇳 हिन्दी</a> ·
|
||||
<a href="README.ru.md">🇷🇺 Русский</a> ·
|
||||
<a href="README.bn.md">🇧🇩 বাংলা</a> ·
|
||||
<a href="README.he.md">🇮🇱 עברית</a> ·
|
||||
<a href="README.pl.md">🇵🇱 Polski</a> ·
|
||||
<a href="README.cs.md">🇨🇿 Čeština</a> ·
|
||||
<a href="README.nl.md">🇳🇱 Nederlands</a> ·
|
||||
<a href="README.tr.md">🇹🇷 Türkçe</a> ·
|
||||
<a href="README.uk.md">🇺🇦 Українська</a> ·
|
||||
<a href="README.id.md">🇮🇩 Bahasa Indonesia</a> ·
|
||||
<a href="README.th.md">🇹🇭 ไทย</a> ·
|
||||
<a href="README.ur.md">🇵🇰 اردو</a> ·
|
||||
<a href="README.ro.md">🇷🇴 Română</a> ·
|
||||
<a href="README.sv.md">🇸🇪 Svenska</a> ·
|
||||
<a href="README.el.md">🇬🇷 Ελληνικά</a> ·
|
||||
<a href="README.hu.md">🇭🇺 Magyar</a> ·
|
||||
<a href="README.fi.md">🇫🇮 Suomi</a> ·
|
||||
<a href="README.da.md">🇩🇰 Dansk</a> ·
|
||||
<a href="README.nb.md">🇳🇴 Norsk</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="#szybki-start">Szybki Start</a> |
|
||||
<a href="bootstrap.sh">Konfiguracja Jednym Kliknięciem</a> |
|
||||
<a href="docs/README.md">Centrum Dokumentacji</a> |
|
||||
<a href="docs/SUMMARY.md">Spis Treści Dokumentacji</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<strong>Szybki dostęp:</strong>
|
||||
<a href="docs/reference/README.md">Referencje</a> ·
|
||||
<a href="docs/operations/README.md">Operacje</a> ·
|
||||
<a href="docs/troubleshooting.md">Rozwiązywanie Problemów</a> ·
|
||||
<a href="docs/security/README.md">Bezpieczeństwo</a> ·
|
||||
<a href="docs/hardware/README.md">Sprzęt</a> ·
|
||||
<a href="docs/contributing/README.md">Wkład</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<strong>Szybka, lekka i w pełni autonomiczna infrastruktura asystenta AI</strong><br />
|
||||
Wdrażaj wszędzie. Zamieniaj cokolwiek.
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
ZeroClaw to <strong>system operacyjny runtime</strong> dla workflow agentów — infrastruktura abstrahująca modele, narzędzia, pamięć i wykonanie do budowania agentów raz i uruchamiania ich wszędzie.
|
||||
</p>
|
||||
|
||||
<p align="center"><code>Architektura oparta na traitach · bezpieczny runtime domyślnie · wymienny dostawca/kanał/narzędzie · wszystko jest podłączalne</code></p>
|
||||
|
||||
<!-- BEGIN:WHATS_NEW -->
|
||||
|
||||
### 🚀 What's New in v0.3.1 (March 2026)
|
||||
|
||||
| Area | Highlights |
|
||||
|---|---|
|
||||
| ci | add Termux (aarch64-linux-android) release target |
|
||||
|
||||
<!-- END:WHATS_NEW -->
|
||||
|
||||
### 📢 Ogłoszenia
|
||||
|
||||
Użyj tej tabeli dla ważnych ogłoszeń (zmiany kompatybilności, powiadomienia bezpieczeństwa, okna serwisowe i blokady wersji).
|
||||
|
||||
| Data (UTC) | Poziom | Ogłoszenie | Działanie |
|
||||
| ---------- | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| 2026-02-19 | _Krytyczny_ | **Nie jesteśmy powiązani** z `openagen/zeroclaw` lub `zeroclaw.org`. Domena `zeroclaw.org` obecnie wskazuje na fork `openagen/zeroclaw`, i ta domena/repozytorium podszywa się pod naszą oficjalną stronę/projekt. | Nie ufaj informacjom, plikom binarnym, zbiórkom funduszy lub ogłoszeniom z tych źródeł. Używaj tylko [tego repozytorium](https://github.com/zeroclaw-labs/zeroclaw) i naszych zweryfikowanych kont społecznościowych. |
|
||||
| 2026-02-21 | _Ważne_ | Nasza oficjalna strona jest teraz online: [zeroclawlabs.ai](https://zeroclawlabs.ai). Dziękujemy za cierpliwość podczas oczekiwania. Nadal wykrywamy próby podszywania się: nie uczestnicz w żadnej działalności inwestycyjnej/finansowej w imieniu ZeroClaw jeśli nie jest opublikowana przez nasze oficjalne kanały. | Używaj [tego repozytorium](https://github.com/zeroclaw-labs/zeroclaw) jako jedynego źródła prawdy. Śledź [X (@zeroclawlabs)](https://x.com/zeroclawlabs?s=21), [Telegram (@zeroclawlabs)](https://t.me/zeroclawlabs), [Facebook (grupa)](https://www.facebook.com/groups/zeroclaw), [Reddit (r/zeroclawlabs)](https://www.reddit.com/r/zeroclawlabs/), i [Xiaohongshu](https://www.xiaohongshu.com/user/profile/67cbfc43000000000d008307?xsec_token=AB73VnYnGNx5y36EtnnZfGmAmS-6Wzv8WMuGpfwfkg6Yc%3D&xsec_source=pc_search) dla oficjalnych aktualizacji. |
|
||||
| 2026-02-19 | _Ważne_ | Anthropic zaktualizował warunki używania uwierzytelniania i poświadczeń 2026-02-19. Uwierzytelnianie OAuth (Free, Pro, Max) jest wyłącznie dla Claude Code i Claude.ai; używanie tokenów OAuth Claude Free/Pro/Max w jakimkolwiek innym produkcie, narzędziu lub usłudze (w tym Agent SDK) nie jest dozwolone i może naruszać Warunki Użytkowania Konsumenta. | Prosimy tymczasowo unikać integracji OAuth Claude Code aby zapobiec potencjalnym stratom. Oryginalna klauzula: [Authentication and Credential Use](https://code.claude.com/docs/en/legal-and-compliance#authentication-and-credential-use). |
|
||||
|
||||
### ✨ Funkcje
|
||||
|
||||
- 🏎️ **Lekki Runtime Domyślnie:** Typowe workflow CLI i komendy statusu działają w przestrzeni pamięci kilku megabajtów w buildach produkcyjnych.
|
||||
- 💰 **Ekonomiczne Wdrażanie:** Zaprojektowane dla tanich płytek i małych instancji chmurowych bez ciężkich zależności runtime.
|
||||
- ⚡ **Szybkie Zimne Starty:** Runtime Rust pojedynczego binarium utrzymuje start komend i daemonów niemal natychmiastowy dla codziennych operacji.
|
||||
- 🌍 **Przenośna Architektura:** Pojedynczy workflow binarium na ARM, x86 i RISC-V z wymiennym dostawcą/kanałem/narzędziem.
|
||||
|
||||
### Dlaczego zespoły wybierają ZeroClaw
|
||||
|
||||
- **Lekki domyślnie:** mały binarium Rust, szybki start, niski ślad pamięci.
|
||||
- **Bezpieczny przez design:** parowanie, ścisłe sandboxowanie, jawne listy dozwolone, zakres workspace.
|
||||
- **Całkowicie wymienny:** systemy rdzenne to trait-y (dostawcy, kanały, narzędzia, pamięć, tunele).
|
||||
- **Brak blokady dostawcy:** wsparcie dostawcy kompatybilnego z OpenAI + podłączalne własne endpointy.
|
||||
|
||||
## Snapshot Benchmark (ZeroClaw vs OpenClaw, Reprodukowalne)
|
||||
|
||||
Szybki benchmark na maszynie lokalnej (macOS arm64, luty 2026) znormalizowany dla sprzętu edge 0.8 GHz.
|
||||
|
||||
| | OpenClaw | NanoBot | PicoClaw | ZeroClaw 🦀 |
|
||||
| ---------------------------- | ------------- | -------------- | --------------- | --------------------- |
|
||||
| **Język** | TypeScript | Python | Go | **Rust** |
|
||||
| **RAM** | > 1 GB | > 100 MB | < 10 MB | **< 5 MB** |
|
||||
| **Start (rdzeń 0.8 GHz)** | > 500s | > 30s | < 1s | **< 10ms** |
|
||||
| **Rozmiar Binarny** | ~28 MB (dist) | N/A (Skrypty) | ~8 MB | **3.4 MB** |
|
||||
| **Koszt** | Mac Mini $599 | Linux SBC ~$50 | Płytka Linux $10 | **Dowolny sprzęt $10** |
|
||||
|
||||
> Uwagi: Wyniki ZeroClaw są mierzone na buildach produkcyjnych używając `/usr/bin/time -l`. OpenClaw wymaga runtime Node.js (typowo ~390 MB dodatkowego narzutu pamięci), podczas gdy NanoBot wymaga runtime Python. PicoClaw i ZeroClaw to statyczne binaria. Powyższe liczby RAM to pamięć runtime; wymagania kompilacji w czasie build są wyższe.
|
||||
|
||||
<p align="center">
|
||||
<img src="zero-claw.jpeg" alt="Porównanie ZeroClaw vs OpenClaw" width="800" />
|
||||
</p>
|
||||
|
||||
### Reprodukowalny Pomiar Lokalny
|
||||
|
||||
Twierdzenia benchmark mogą się zmieniać wraz z ewolucją kodu i toolchainów, więc zawsze mierz swój aktualny build lokalnie:
|
||||
|
||||
```bash
|
||||
cargo build --release
|
||||
ls -lh target/release/zeroclaw
|
||||
|
||||
/usr/bin/time -l target/release/zeroclaw --help
|
||||
/usr/bin/time -l target/release/zeroclaw status
|
||||
```
|
||||
|
||||
Przykładowa próbka (macOS arm64, zmierzone 18 lutego 2026):
|
||||
|
||||
- Rozmiar binarium release: `8.8M`
|
||||
- `zeroclaw --help`: czas rzeczywisty ok. `0.02s`, szczytowy ślad pamięci ~`3.9 MB`
|
||||
- `zeroclaw status`: czas rzeczywisty ok. `0.01s`, szczytowy ślad pamięci ~`4.1 MB`
|
||||
|
||||
## Wymagania Wstępne
|
||||
|
||||
<details>
|
||||
<summary><strong>Windows</strong></summary>
|
||||
|
||||
### Windows — Wymagane
|
||||
|
||||
1. **Visual Studio Build Tools** (dostarcza linker MSVC i Windows SDK):
|
||||
|
||||
```powershell
|
||||
winget install Microsoft.VisualStudio.2022.BuildTools
|
||||
```
|
||||
|
||||
Podczas instalacji (lub przez Visual Studio Installer), wybierz obciążenie **"Desktop development with C++"**.
|
||||
|
||||
2. **Toolchain Rust:**
|
||||
|
||||
```powershell
|
||||
winget install Rustlang.Rustup
|
||||
```
|
||||
|
||||
Po instalacji, otwórz nowy terminal i uruchom `rustup default stable` aby upewnić się, że stabilny toolchain jest aktywny.
|
||||
|
||||
3. **Zweryfikuj** że oba działają:
|
||||
```powershell
|
||||
rustc --version
|
||||
cargo --version
|
||||
```
|
||||
|
||||
### Windows — Opcjonalne
|
||||
|
||||
- **Docker Desktop** — wymagany tylko jeśli używasz [Docker sandboxed runtime](#aktualne-wsparcie-runtime) (`runtime.kind = "docker"`). Zainstaluj przez `winget install Docker.DockerDesktop`.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>Linux / macOS</strong></summary>
|
||||
|
||||
### Linux / macOS — Wymagane
|
||||
|
||||
1. **Niezbędne narzędzia build:**
|
||||
- **Linux (Debian/Ubuntu):** `sudo apt install build-essential pkg-config`
|
||||
- **Linux (Fedora/RHEL):** `sudo dnf group install development-tools && sudo dnf install pkg-config`
|
||||
- **macOS:** Zainstaluj Xcode Command Line Tools: `xcode-select --install`
|
||||
|
||||
2. **Toolchain Rust:**
|
||||
|
||||
```bash
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||
```
|
||||
|
||||
Zobacz [rustup.rs](https://rustup.rs) dla szczegółów.
|
||||
|
||||
3. **Zweryfikuj:**
|
||||
```bash
|
||||
rustc --version
|
||||
cargo --version
|
||||
```
|
||||
|
||||
### Linux / macOS — Opcjonalne
|
||||
|
||||
- **Docker** — wymagany tylko jeśli używasz [Docker sandboxed runtime](#aktualne-wsparcie-runtime) (`runtime.kind = "docker"`).
|
||||
- **Linux (Debian/Ubuntu):** zobacz [docs.docker.com](https://docs.docker.com/engine/install/ubuntu/)
|
||||
- **Linux (Fedora/RHEL):** zobacz [docs.docker.com](https://docs.docker.com/engine/install/fedora/)
|
||||
- **macOS:** zainstaluj Docker Desktop przez [docker.com/products/docker-desktop](https://www.docker.com/products/docker-desktop/)
|
||||
|
||||
</details>
|
||||
|
||||
## Szybki Start
|
||||
|
||||
### Opcja 1: Automatyczna konfiguracja (zalecana)
|
||||
|
||||
Skrypt `bootstrap.sh` instaluje Rust, klonuje ZeroClaw, kompiluje go i konfiguruje twoje początkowe środowisko deweloperskie:
|
||||
|
||||
```bash
|
||||
curl -fsSL https://raw.githubusercontent.com/zeroclaw-labs/zeroclaw/master/bootstrap.sh | bash
|
||||
```
|
||||
|
||||
To:
|
||||
|
||||
1. Zainstaluje Rust (jeśli nieobecny)
|
||||
2. Sklonuje repozytorium ZeroClaw
|
||||
3. Skompiluje ZeroClaw w trybie release
|
||||
4. Zainstaluje `zeroclaw` w `~/.cargo/bin/`
|
||||
5. Utworzy domyślną strukturę workspace w `~/.zeroclaw/workspace/`
|
||||
6. Wygeneruje początkowy plik konfiguracyjny `~/.zeroclaw/workspace/config.toml`
|
||||
|
||||
Po bootstrap, przeładuj swój shell lub uruchom `source ~/.cargo/env` aby używać komendy `zeroclaw` globalnie.
|
||||
|
||||
### Opcja 2: Ręczna instalacja
|
||||
|
||||
<details>
|
||||
<summary><strong>Kliknij aby zobaczyć kroki ręcznej instalacji</strong></summary>
|
||||
|
||||
```bash
|
||||
# 1. Sklonuj repozytorium
|
||||
git clone https://github.com/zeroclaw-labs/zeroclaw.git
|
||||
cd zeroclaw
|
||||
|
||||
# 2. Skompiluj w release
|
||||
cargo build --release --locked
|
||||
|
||||
# 3. Zainstaluj binarium
|
||||
cargo install --path . --locked
|
||||
|
||||
# 4. Zinicjuj workspace
|
||||
zeroclaw init
|
||||
|
||||
# 5. Zweryfikuj instalację
|
||||
zeroclaw --version
|
||||
zeroclaw status
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Po Instalacji
|
||||
|
||||
Po zainstalowaniu (przez bootstrap lub ręcznie), powinieneś widzieć:
|
||||
|
||||
```
|
||||
~/.zeroclaw/workspace/
|
||||
├── config.toml # Główna konfiguracja
|
||||
├── .pairing # Sekrety parowania (generowane przy pierwszym uruchomieniu)
|
||||
├── logs/ # Logi daemon/agent
|
||||
├── skills/ # Własne umiejętności
|
||||
└── memory/ # Przechowywanie kontekstu konwersacji
|
||||
```
|
||||
|
||||
**Następne kroki:**
|
||||
|
||||
1. Skonfiguruj swoich dostawców AI w `~/.zeroclaw/workspace/config.toml`
|
||||
2. Sprawdź [referencje konfiguracji](docs/config-reference.md) dla opcji zaawansowanych
|
||||
3. Uruchom agenta: `zeroclaw agent start`
|
||||
4. Testuj przez preferowany kanał (zobacz [referencje kanałów](docs/channels-reference.md))
|
||||
|
||||
## Konfiguracja
|
||||
|
||||
Edytuj `~/.zeroclaw/workspace/config.toml` aby skonfigurować dostawców, kanały i zachowanie systemu.
|
||||
|
||||
### Szybka Referencja Konfiguracji
|
||||
|
||||
```toml
|
||||
[providers.anthropic]
|
||||
api_key = "sk-ant-..."
|
||||
model = "claude-sonnet-4-20250514"
|
||||
|
||||
[providers.openai]
|
||||
api_key = "sk-..."
|
||||
model = "gpt-4o"
|
||||
|
||||
[channels.telegram]
|
||||
enabled = true
|
||||
bot_token = "123456:ABC-DEF..."
|
||||
|
||||
[channels.matrix]
|
||||
enabled = true
|
||||
homeserver_url = "https://matrix.org"
|
||||
username = "@bot:matrix.org"
|
||||
password = "..."
|
||||
|
||||
[memory]
|
||||
kind = "markdown" # lub "sqlite" lub "none"
|
||||
|
||||
[runtime]
|
||||
kind = "native" # lub "docker" (wymaga Docker)
|
||||
```
|
||||
|
||||
**Pełne dokumenty referencyjne:**
|
||||
|
||||
- [Referencje Konfiguracji](docs/config-reference.md) — wszystkie ustawienia, walidacje, wartości domyślne
|
||||
- [Referencje Dostawców](docs/providers-reference.md) — konfiguracje specyficzne dla dostawców AI
|
||||
- [Referencje Kanałów](docs/channels-reference.md) — Telegram, Matrix, Slack, Discord i więcej
|
||||
- [Operacje](docs/operations-runbook.md) — monitoring produkcyjny, rotacja sekretów, skalowanie
|
||||
|
||||
### Aktualne Wsparcie Runtime
|
||||
|
||||
ZeroClaw wspiera dwa backendy wykonania kodu:
|
||||
|
||||
- **`native`** (domyślnie) — bezpośrednie wykonanie procesu, najszybsza ścieżka, idealna dla zaufanych środowisk
|
||||
- **`docker`** — pełna izolacja kontenera, wzmocnione polityki bezpieczeństwa, wymaga Docker
|
||||
|
||||
Użyj `runtime.kind = "docker"` jeśli potrzebujesz ścisłego sandboxowania lub izolacji sieciowej. Zobacz [referencje konfiguracji](docs/config-reference.md#runtime) dla pełnych szczegółów.
|
||||
|
||||
## Komendy
|
||||
|
||||
```bash
|
||||
# Zarządzanie workspace
|
||||
zeroclaw init # Inicjuje nowy workspace
|
||||
zeroclaw status # Pokazuje status daemon/agent
|
||||
zeroclaw config validate # Weryfikuje składnię i wartości config.toml
|
||||
|
||||
# Zarządzanie daemon
|
||||
zeroclaw daemon start # Uruchamia daemon w tle
|
||||
zeroclaw daemon stop # Zatrzymuje działający daemon
|
||||
zeroclaw daemon restart # Restartuje daemon (przeładowanie config)
|
||||
zeroclaw daemon logs # Pokazuje logi daemon
|
||||
|
||||
# Zarządzanie agent
|
||||
zeroclaw agent start # Uruchamia agenta (wymaga działającego daemon)
|
||||
zeroclaw agent stop # Zatrzymuje agenta
|
||||
zeroclaw agent restart # Restartuje agenta (przeładowanie config)
|
||||
|
||||
# Operacje parowania
|
||||
zeroclaw pairing init # Generuje nowy sekret parowania
|
||||
zeroclaw pairing rotate # Rotuje istniejący sekret parowania
|
||||
|
||||
# Tunneling (dla publicznej ekspozycji)
|
||||
zeroclaw tunnel start # Uruchamia tunnel do lokalnego daemon
|
||||
zeroclaw tunnel stop # Zatrzymuje aktywny tunnel
|
||||
|
||||
# Diagnostyka
|
||||
zeroclaw doctor # Uruchamia sprawdzenia zdrowia systemu
|
||||
zeroclaw version # Pokazuje wersję i informacje o build
|
||||
```
|
||||
|
||||
Zobacz [Referencje Komend](docs/commands-reference.md) dla pełnych opcji i przykładów.
|
||||
|
||||
## Współpraca i Docs
|
||||
|
||||
Zacznij od centrum dokumentacji dla mapy opartej na zadaniach:
|
||||
|
||||
- Centrum Dokumentacji: [`docs/README.md`](docs/README.md)
|
||||
- Zunifikowany Spis Treści Docs: [`docs/SUMMARY.md`](docs/SUMMARY.md)
|
||||
- Referencje Komend: [`docs/commands-reference.md`](docs/commands-reference.md)
|
||||
- Referencje Konfiguracji: [`docs/config-reference.md`](docs/config-reference.md)
|
||||
- Referencje Dostawców: [`docs/providers-reference.md`](docs/providers-reference.md)
|
||||
- Referencje Kanałów: [`docs/channels-reference.md`](docs/channels-reference.md)
|
||||
- Runbook Operacji: [`docs/operations-runbook.md`](docs/operations-runbook.md)
|
||||
- Rozwiązywanie Problemów: [`docs/troubleshooting.md`](docs/troubleshooting.md)
|
||||
- Inwentarz/Klasyfikacja Docs: [`docs/docs-inventory.md`](docs/docs-inventory.md)
|
||||
- Snapshot Triages PR/Issue (stan na 18 lutego 2026): [`docs/project-triage-snapshot-2026-02-18.md`](docs/project-triage-snapshot-2026-02-18.md)
|
||||
|
||||
Główne referencje współpracy:
|
||||
|
||||
- Centrum Dokumentacji: [docs/README.md](docs/README.md)
|
||||
- Szablon Dokumentacji: [docs/doc-template.md](docs/doc-template.md)
|
||||
- Checklist Zmiany Dokumentacji: [docs/README.md#4-documentation-change-checklist](docs/README.md#4-documentation-change-checklist)
|
||||
- Referencje Konfiguracji Kanałów: [docs/channels-reference.md](docs/channels-reference.md)
|
||||
- Operacje Zaszyfrowanych Pokoi Matrix: [docs/matrix-e2ee-guide.md](docs/matrix-e2ee-guide.md)
|
||||
- Przewodnik Wkładu: [CONTRIBUTING.md](CONTRIBUTING.md)
|
||||
- Polityka Workflow PR: [docs/pr-workflow.md](docs/pr-workflow.md)
|
||||
- Playbook Recenzenta (triage + głęboka recenzja): [docs/reviewer-playbook.md](docs/reviewer-playbook.md)
|
||||
- Mapa Własności i Triages CI: [docs/ci-map.md](docs/ci-map.md)
|
||||
- Polityka Ujawnienia Bezpieczeństwa: [SECURITY.md](SECURITY.md)
|
||||
|
||||
Dla wdrażania i operacji runtime:
|
||||
|
||||
- Przewodnik Wdrażania Sieciowego: [docs/network-deployment.md](docs/network-deployment.md)
|
||||
- Playbook Proxy Agent: [docs/proxy-agent-playbook.md](docs/proxy-agent-playbook.md)
|
||||
|
||||
## Wspieraj ZeroClaw
|
||||
|
||||
Jeśli ZeroClaw pomaga twojej pracy i chcesz wspierać ciągły rozwój, możesz przekazać darowiznę tutaj:
|
||||
|
||||
<a href="https://buymeacoffee.com/argenistherose"><img src="https://img.shields.io/badge/Buy%20Me%20a%20Coffee-Donate-yellow.svg?style=for-the-badge&logo=buy-me-a-coffee" alt="Kup Mi Kawę" /></a>
|
||||
|
||||
### 🙏 Specjalne Podziękowania
|
||||
|
||||
Serdeczne podziękowania dla społeczności i instytucji które inspirują i zasilają tę pracę open-source:
|
||||
|
||||
- **Harvard University** — za promowanie intelektualnej ciekawości i przesuwanie granic tego co możliwe.
|
||||
- **MIT** — za obronę otwartej wiedzy, open source, i przekonania że technologia powinna być dostępna dla wszystkich.
|
||||
- **Sundai Club** — za społeczność, energię, i nieustanną wolę budowania rzeczy które mają znaczenie.
|
||||
- **Świat i Dalej** 🌍✨ — dla każdego kontrybutora, marzyciela, i budowniczego tam na zewnątrz który czyni open source siłą dla dobra. To dla ciebie.
|
||||
|
||||
Budujemy w open source ponieważ najlepsze pomysły przychodzą zewsząd. Jeśli to czytasz, jesteś tego częścią. Witamy. 🦀❤️
|
||||
|
||||
<!-- BEGIN:RECENT_CONTRIBUTORS -->
|
||||
|
||||
### 🌟 Recent Contributors (v0.3.1)
|
||||
|
||||
3 contributors shipped features, fixes, and improvements in this release cycle:
|
||||
|
||||
- **Argenis**
|
||||
- **argenis de la rosa**
|
||||
- **Claude Opus 4.6**
|
||||
|
||||
Thank you to everyone who opened issues, reviewed PRs, translated docs, and helped test. Every contribution matters. 🦀
|
||||
|
||||
<!-- END:RECENT_CONTRIBUTORS -->
|
||||
|
||||
## ⚠️ Oficjalne Repozytorium i Ostrzeżenie o Podszywaniu Się
|
||||
|
||||
**To jest jedyne oficjalne repozytorium ZeroClaw:**
|
||||
|
||||
> <https://github.com/zeroclaw-labs/zeroclaw>
|
||||
|
||||
Jakiekolwiek inne repozytorium, organizacja, domena lub pakiet twierdzący że jest "ZeroClaw" lub sugerujący powiązanie z ZeroClaw Labs jest **nieautoryzowany i niepowiązany z tym projektem**. Znane nieautoryzowane forki będą wymienione w [TRADEMARK.md](TRADEMARK.md).
|
||||
|
||||
Jeśli napotkasz podszywanie się lub nadużycie znaku towarowego, proszę [otwórz issue](https://github.com/zeroclaw-labs/zeroclaw/issues).
|
||||
|
||||
---
|
||||
|
||||
## Licencja
|
||||
|
||||
ZeroClaw jest podwójnie licencjonowany dla maksymalnej otwartości i ochrony kontrybutorów:
|
||||
|
||||
| Licencja | Przypadki Użycia |
|
||||
| ---------------------------- | ------------------------------------------------------------ |
|
||||
| [MIT](LICENSE-MIT) | Open-source, badania, akademicki, użycie osobiste |
|
||||
| [Apache 2.0](LICENSE-APACHE) | Ochrona patentowa, instytucjonalne, wdrożenie komercyjne |
|
||||
|
||||
Możesz wybrać jedną z licencji. **Kontrybutorzy automatycznie przyznają prawa pod obiema** — zobacz [CLA.md](CLA.md) dla pełnej umowy kontrybutora.
|
||||
|
||||
### Znak Towarowy
|
||||
|
||||
Nazwa **ZeroClaw** i logo są zarejestrowanymi znakami towarowymi ZeroClaw Labs. Ta licencja nie przyznaje pozwolenia na ich używanie do sugerowania poparcia lub powiązania. Zobacz [TRADEMARK.md](TRADEMARK.md) dla dozwolonych i zabronionych użyć.
|
||||
|
||||
### Ochrony Kontrybutorów
|
||||
|
||||
- **Zachowuj prawa autorskie** swoich wkładów
|
||||
- **Grant patentowy** (Apache 2.0) chroni cię przed roszczeniami patentowymi innych kontrybutorów
|
||||
- Twoje wkłady są **trwale przypisane** w historii commitów i [NOTICE](NOTICE)
|
||||
- Żadne prawa znaku towarowego nie są przenoszone przez kontrybucję
|
||||
|
||||
## Wkład
|
||||
|
||||
Zobacz [CONTRIBUTING.md](CONTRIBUTING.md) i [CLA.md](CLA.md). Zaimplementuj trait, prześlij PR:
|
||||
|
||||
- Przewodnik workflow CI: [docs/ci-map.md](docs/ci-map.md)
|
||||
- Nowy `Provider` → `src/providers/`
|
||||
- Nowy `Channel` → `src/channels/`
|
||||
- Nowy `Observer` → `src/observability/`
|
||||
- Nowe `Tool` → `src/tools/`
|
||||
- Nowa `Memory` → `src/memory/`
|
||||
- Nowy `Tunnel` → `src/tunnel/`
|
||||
- Nowa `Skill` → `~/.zeroclaw/workspace/skills/<n>/`
|
||||
|
||||
---
|
||||
|
||||
**ZeroClaw** — Zero narzutu. Zero kompromisów. Wdrażaj wszędzie. Zamieniaj cokolwiek. 🦀
|
||||
|
||||
## Historia Gwiazdek
|
||||
|
||||
<p align="center">
|
||||
<a href="https://www.star-history.com/#zeroclaw-labs/zeroclaw&type=date&legend=top-left">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=zeroclaw-labs/zeroclaw&type=date&theme=dark&legend=top-left" />
|
||||
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=zeroclaw-labs/zeroclaw&type=date&legend=top-left" />
|
||||
<img alt="Wykres Historii Gwiazdek" src="https://api.star-history.com/svg?repos=zeroclaw-labs/zeroclaw&type=date&legend=top-left" />
|
||||
</picture>
|
||||
</a>
|
||||
</p>
|
||||
+501
@@ -0,0 +1,501 @@
|
||||
<p align="center">
|
||||
<img src="zeroclaw.png" alt="ZeroClaw" width="200" />
|
||||
</p>
|
||||
|
||||
<h1 align="center">ZeroClaw 🦀</h1>
|
||||
|
||||
<p align="center">
|
||||
<strong>Zero sobrecarga. Zero compromisso. 100% Rust. 100% Agnóstico.</strong><br>
|
||||
⚡️ <strong>Roda em hardware de $10 com <5MB de RAM: Isso é 99% menos memória que o OpenClaw e 98% mais barato que um Mac mini!</strong>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="LICENSE-APACHE"><img src="https://img.shields.io/badge/license-MIT%20OR%20Apache%202.0-blue.svg" alt="License: MIT OR Apache-2.0" /></a>
|
||||
<a href="NOTICE"><img src="https://img.shields.io/badge/contributors-27+-green.svg" alt="Contributors" /></a>
|
||||
<a href="https://buymeacoffee.com/argenistherose"><img src="https://img.shields.io/badge/Buy%20Me%20a%20Coffee-Donate-yellow.svg?style=flat&logo=buy-me-a-coffee" alt="Buy Me a Coffee" /></a>
|
||||
<a href="https://x.com/zeroclawlabs?s=21"><img src="https://img.shields.io/badge/X-%40zeroclawlabs-000000?style=flat&logo=x&logoColor=white" alt="X: @zeroclawlabs" /></a>
|
||||
<a href="https://zeroclawlabs.cn/group.jpg"><img src="https://img.shields.io/badge/WeChat-Group-B7D7A8?logo=wechat&logoColor=white" alt="WeChat Group" /></a>
|
||||
<a href="https://www.xiaohongshu.com/user/profile/67cbfc43000000000d008307?xsec_token=AB73VnYnGNx5y36EtnnZfGmAmS-6Wzv8WMuGpfwfkg6Yc%3D&xsec_source=pc_search"><img src="https://img.shields.io/badge/Xiaohongshu-Official-FF2442?style=flat" alt="Xiaohongshu: Official" /></a>
|
||||
<a href="https://t.me/zeroclawlabs"><img src="https://img.shields.io/badge/Telegram-%40zeroclawlabs-26A5E4?style=flat&logo=telegram&logoColor=white" alt="Telegram: @zeroclawlabs" /></a>
|
||||
<a href="https://www.facebook.com/groups/zeroclaw"><img src="https://img.shields.io/badge/Facebook-Group-1877F2?style=flat&logo=facebook&logoColor=white" alt="Facebook Group" /></a>
|
||||
<a href="https://www.reddit.com/r/zeroclawlabs/"><img src="https://img.shields.io/badge/Reddit-r%2Fzeroclawlabs-FF4500?style=flat&logo=reddit&logoColor=white" alt="Reddit: r/zeroclawlabs" /></a>
|
||||
</p>
|
||||
<p align="center">
|
||||
Construído por estudantes e membros das comunidades Harvard, MIT e Sundai.Club.
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
🌐 <strong>Idiomas:</strong><a href="README.md">🇺🇸 English</a> ·
|
||||
<a href="README.zh-CN.md">🇨🇳 简体中文</a> ·
|
||||
<a href="README.ja.md">🇯🇵 日本語</a> ·
|
||||
<a href="README.ko.md">🇰🇷 한국어</a> ·
|
||||
<a href="README.vi.md">🇻🇳 Tiếng Việt</a> ·
|
||||
<a href="README.tl.md">🇵🇭 Tagalog</a> ·
|
||||
<a href="README.es.md">🇪🇸 Español</a> ·
|
||||
<a href="README.pt.md">🇧🇷 Português</a> ·
|
||||
<a href="README.it.md">🇮🇹 Italiano</a> ·
|
||||
<a href="README.de.md">🇩🇪 Deutsch</a> ·
|
||||
<a href="README.fr.md">🇫🇷 Français</a> ·
|
||||
<a href="README.ar.md">🇸🇦 العربية</a> ·
|
||||
<a href="README.hi.md">🇮🇳 हिन्दी</a> ·
|
||||
<a href="README.ru.md">🇷🇺 Русский</a> ·
|
||||
<a href="README.bn.md">🇧🇩 বাংলা</a> ·
|
||||
<a href="README.he.md">🇮🇱 עברית</a> ·
|
||||
<a href="README.pl.md">🇵🇱 Polski</a> ·
|
||||
<a href="README.cs.md">🇨🇿 Čeština</a> ·
|
||||
<a href="README.nl.md">🇳🇱 Nederlands</a> ·
|
||||
<a href="README.tr.md">🇹🇷 Türkçe</a> ·
|
||||
<a href="README.uk.md">🇺🇦 Українська</a> ·
|
||||
<a href="README.id.md">🇮🇩 Bahasa Indonesia</a> ·
|
||||
<a href="README.th.md">🇹🇭 ไทย</a> ·
|
||||
<a href="README.ur.md">🇵🇰 اردو</a> ·
|
||||
<a href="README.ro.md">🇷🇴 Română</a> ·
|
||||
<a href="README.sv.md">🇸🇪 Svenska</a> ·
|
||||
<a href="README.el.md">🇬🇷 Ελληνικά</a> ·
|
||||
<a href="README.hu.md">🇭🇺 Magyar</a> ·
|
||||
<a href="README.fi.md">🇫🇮 Suomi</a> ·
|
||||
<a href="README.da.md">🇩🇰 Dansk</a> ·
|
||||
<a href="README.nb.md">🇳🇴 Norsk</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="#início-rápido">Início Rápido</a> |
|
||||
<a href="bootstrap.sh">Configuração com Um Clique</a> |
|
||||
<a href="docs/README.md">Hub de Documentação</a> |
|
||||
<a href="docs/SUMMARY.md">Índice de Documentação</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<strong>Acessos rápidos:</strong>
|
||||
<a href="docs/reference/README.md">Referência</a> ·
|
||||
<a href="docs/operations/README.md">Operações</a> ·
|
||||
<a href="docs/troubleshooting.md">Solução de Problemas</a> ·
|
||||
<a href="docs/security/README.md">Segurança</a> ·
|
||||
<a href="docs/hardware/README.md">Hardware</a> ·
|
||||
<a href="docs/contributing/README.md">Contribuir</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<strong>Infraestrutura de assistente AI rápida, leve e totalmente autônoma</strong><br />
|
||||
Implante em qualquer lugar. Troque qualquer coisa.
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
ZeroClaw é o <strong>sistema operacional de runtime</strong> para fluxos de trabalho de agentes — uma infraestrutura que abstrai modelos, ferramentas, memória e execução para construir agentes uma vez e executá-los em qualquer lugar.
|
||||
</p>
|
||||
|
||||
<p align="center"><code>Arquitetura baseada em traits · runtime seguro por padrão · provedor/canal/ferramenta intercambiáveis · tudo é conectável</code></p>
|
||||
|
||||
<!-- BEGIN:WHATS_NEW -->
|
||||
|
||||
### 🚀 What's New in v0.3.1 (March 2026)
|
||||
|
||||
| Area | Highlights |
|
||||
|---|---|
|
||||
| ci | add Termux (aarch64-linux-android) release target |
|
||||
|
||||
<!-- END:WHATS_NEW -->
|
||||
|
||||
### 📢 Anúncios
|
||||
|
||||
Use esta tabela para avisos importantes (mudanças de compatibilidade, avisos de segurança, janelas de manutenção e bloqueios de versão).
|
||||
|
||||
| Data (UTC) | Nível | Aviso | Ação |
|
||||
| ---------- | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| 2026-02-19 | _Crítico_ | **Não somos afiliados** ao `openagen/zeroclaw` ou `zeroclaw.org`. O domínio `zeroclaw.org` atualmente aponta para o fork `openagen/zeroclaw`, e este domínio/repositório está falsificando nosso site/projeto oficial. | Não confie em informações, binários, arrecadações ou anúncios dessas fontes. Use apenas [este repositório](https://github.com/zeroclaw-labs/zeroclaw) e nossas contas sociais verificadas. |
|
||||
| 2026-02-21 | _Importante_ | Nosso site oficial agora está online: [zeroclawlabs.ai](https://zeroclawlabs.ai). Obrigado pela paciência durante a espera. Ainda detectamos tentativas de falsificação: não participe de nenhuma atividade de investimento/financiamento em nome do ZeroClaw se não for publicada através de nossos canais oficiais. | Use [este repositório](https://github.com/zeroclaw-labs/zeroclaw) como a única fonte de verdade. Siga [X (@zeroclawlabs)](https://x.com/zeroclawlabs?s=21), [Telegram (@zeroclawlabs)](https://t.me/zeroclawlabs), [Facebook (grupo)](https://www.facebook.com/groups/zeroclaw), [Reddit (r/zeroclawlabs)](https://www.reddit.com/r/zeroclawlabs/), e [Xiaohongshu](https://www.xiaohongshu.com/user/profile/67cbfc43000000000d008307?xsec_token=AB73VnYnGNx5y36EtnnZfGmAmS-6Wzv8WMuGpfwfkg6Yc%3D&xsec_source=pc_search) para atualizações oficiais. |
|
||||
| 2026-02-19 | _Importante_ | A Anthropic atualizou os termos de uso de autenticação e credenciais em 2026-02-19. A autenticação OAuth (Free, Pro, Max) é exclusivamente para Claude Code e Claude.ai; o uso de tokens OAuth do Claude Free/Pro/Max em qualquer outro produto, ferramenta ou serviço (incluindo Agent SDK) não é permitido e pode violar os Termos de Uso do Consumidor. | Por favor, evite temporariamente as integrações OAuth do Claude Code para prevenir qualquer perda potencial. Cláusula original: [Authentication and Credential Use](https://code.claude.com/docs/en/legal-and-compliance#authentication-and-credential-use). |
|
||||
|
||||
### ✨ Funcionalidades
|
||||
|
||||
- 🏎️ **Runtime Leve por Padrão:** Fluxos de trabalho CLI comuns e comandos de status rodam dentro de um espaço de memória de poucos megabytes em builds de produção.
|
||||
- 💰 **Implantação Econômica:** Projetado para placas de baixo custo e pequenas instâncias cloud sem dependências de runtime pesadas.
|
||||
- ⚡ **Inícios a Frio Rápidos:** O runtime Rust de binário único mantém o início de comandos e daemons quase instantâneo para operações diárias.
|
||||
- 🌍 **Arquitetura Portátil:** Um fluxo de trabalho de binário único em ARM, x86 e RISC-V com provedor/canal/ferramenta intercambiáveis.
|
||||
|
||||
### Por que as equipes escolhem o ZeroClaw
|
||||
|
||||
- **Leve por padrão:** binário Rust pequeno, início rápido, baixa pegada de memória.
|
||||
- **Seguro por design:** emparelhamento, sandboxing estrito, listas de permissão explícitas, escopo de workspace.
|
||||
- **Totalmente intercambiável:** os sistemas principais são traits (provedores, canais, ferramentas, memória, túneis).
|
||||
- **Sem lock-in de provedor:** suporte de provedor compatível com OpenAI + endpoints personalizados conectáveis.
|
||||
|
||||
## Instantâneo de Benchmark (ZeroClaw vs OpenClaw, Reproduzível)
|
||||
|
||||
Benchmark rápido em máquina local (macOS arm64, fev. 2026) normalizado para hardware edge de 0.8 GHz.
|
||||
|
||||
| | OpenClaw | NanoBot | PicoClaw | ZeroClaw 🦀 |
|
||||
| ---------------------------- | ------------- | -------------- | --------------- | --------------------- |
|
||||
| **Linguagem** | TypeScript | Python | Go | **Rust** |
|
||||
| **RAM** | > 1 GB | > 100 MB | < 10 MB | **< 5 MB** |
|
||||
| **Início (núcleo 0.8 GHz)** | > 500s | > 30s | < 1s | **< 10ms** |
|
||||
| **Tamanho Binário** | ~28 MB (dist) | N/A (Scripts) | ~8 MB | **3.4 MB** |
|
||||
| **Custo** | Mac Mini $599 | Linux SBC ~$50 | Placa Linux $10 | **Qualquer hardware $10** |
|
||||
|
||||
> Notas: Os resultados do ZeroClaw são medidos em builds de produção usando `/usr/bin/time -l`. O OpenClaw requer o runtime Node.js (tipicamente ~390 MB de sobrecarga de memória adicional), enquanto o NanoBot requer o runtime Python. PicoClaw e ZeroClaw são binários estáticos. As cifras de RAM acima são memória de runtime; os requisitos de compilação em tempo de build são maiores.
|
||||
|
||||
<p align="center">
|
||||
<img src="zero-claw.jpeg" alt="Comparação ZeroClaw vs OpenClaw" width="800" />
|
||||
</p>
|
||||
|
||||
### Medição Local Reproduzível
|
||||
|
||||
As alegações de benchmark podem derivar à medida que o código e as toolchains evoluem, então sempre meça seu build atual localmente:
|
||||
|
||||
```bash
|
||||
cargo build --release
|
||||
ls -lh target/release/zeroclaw
|
||||
|
||||
/usr/bin/time -l target/release/zeroclaw --help
|
||||
/usr/bin/time -l target/release/zeroclaw status
|
||||
```
|
||||
|
||||
Exemplo de amostra (macOS arm64, medido em 18 de fevereiro de 2026):
|
||||
|
||||
- Tamanho do binário release: `8.8M`
|
||||
- `zeroclaw --help`: tempo real aprox `0.02s`, pegada de memória máxima ~`3.9 MB`
|
||||
- `zeroclaw status`: tempo real aprox `0.01s`, pegada de memória máxima ~`4.1 MB`
|
||||
|
||||
## Pré-requisitos
|
||||
|
||||
<details>
|
||||
<summary><strong>Windows</strong></summary>
|
||||
|
||||
### Windows — Obrigatório
|
||||
|
||||
1. **Visual Studio Build Tools** (fornece o linker MSVC e o Windows SDK):
|
||||
|
||||
```powershell
|
||||
winget install Microsoft.VisualStudio.2022.BuildTools
|
||||
```
|
||||
|
||||
Durante a instalação (ou via Visual Studio Installer), selecione a carga de trabalho **"Desenvolvimento Desktop com C++"**.
|
||||
|
||||
2. **Toolchain Rust:**
|
||||
|
||||
```powershell
|
||||
winget install Rustlang.Rustup
|
||||
```
|
||||
|
||||
Após a instalação, abra um novo terminal e execute `rustup default stable` para garantir que a toolchain estável esteja ativa.
|
||||
|
||||
3. **Verifique** que ambos funcionam:
|
||||
```powershell
|
||||
rustc --version
|
||||
cargo --version
|
||||
```
|
||||
|
||||
### Windows — Opcional
|
||||
|
||||
- **Docker Desktop** — obrigatório apenas se você usar o [runtime Docker sandboxed](#suporte-de-runtime-atual) (`runtime.kind = "docker"`). Instale via `winget install Docker.DockerDesktop`.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>Linux / macOS</strong></summary>
|
||||
|
||||
### Linux / macOS — Obrigatório
|
||||
|
||||
1. **Ferramentas de build essenciais:**
|
||||
- **Linux (Debian/Ubuntu):** `sudo apt install build-essential pkg-config`
|
||||
- **Linux (Fedora/RHEL):** `sudo dnf group install development-tools && sudo dnf install pkg-config`
|
||||
- **macOS:** Instale as Xcode Command Line Tools: `xcode-select --install`
|
||||
|
||||
2. **Toolchain Rust:**
|
||||
|
||||
```bash
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||
```
|
||||
|
||||
Veja [rustup.rs](https://rustup.rs) para detalhes.
|
||||
|
||||
3. **Verifique:**
|
||||
```bash
|
||||
rustc --version
|
||||
cargo --version
|
||||
```
|
||||
|
||||
### Linux / macOS — Opcional
|
||||
|
||||
- **Docker** — obrigatório apenas se você usar o [runtime Docker sandboxed](#suporte-de-runtime-atual) (`runtime.kind = "docker"`).
|
||||
- **Linux (Debian/Ubuntu):** veja [docs.docker.com](https://docs.docker.com/engine/install/ubuntu/)
|
||||
- **Linux (Fedora/RHEL):** veja [docs.docker.com](https://docs.docker.com/engine/install/fedora/)
|
||||
- **macOS:** instale o Docker Desktop via [docker.com/products/docker-desktop](https://www.docker.com/products/docker-desktop/)
|
||||
|
||||
</details>
|
||||
|
||||
## Início Rápido
|
||||
|
||||
### Opção 1: Configuração automatizada (recomendada)
|
||||
|
||||
O script `bootstrap.sh` instala Rust, clona ZeroClaw, compila, e configura seu ambiente de desenvolvimento inicial:
|
||||
|
||||
```bash
|
||||
curl -fsSL https://raw.githubusercontent.com/zeroclaw-labs/zeroclaw/master/bootstrap.sh | bash
|
||||
```
|
||||
|
||||
Isso vai:
|
||||
|
||||
1. Instalar Rust (se não presente)
|
||||
2. Clonar o repositório ZeroClaw
|
||||
3. Compilar ZeroClaw em modo release
|
||||
4. Instalar `zeroclaw` em `~/.cargo/bin/`
|
||||
5. Criar a estrutura de workspace padrão em `~/.zeroclaw/workspace/`
|
||||
6. Gerar um arquivo de configuração inicial `~/.zeroclaw/workspace/config.toml`
|
||||
|
||||
Após o bootstrap, recarregue seu shell ou execute `source ~/.cargo/env` para usar o comando `zeroclaw` globalmente.
|
||||
|
||||
### Opção 2: Instalação manual
|
||||
|
||||
<details>
|
||||
<summary><strong>Clique para ver os passos de instalação manual</strong></summary>
|
||||
|
||||
```bash
|
||||
# 1. Clone o repositório
|
||||
git clone https://github.com/zeroclaw-labs/zeroclaw.git
|
||||
cd zeroclaw
|
||||
|
||||
# 2. Compile em release
|
||||
cargo build --release --locked
|
||||
|
||||
# 3. Instale o binário
|
||||
cargo install --path . --locked
|
||||
|
||||
# 4. Inicialize o workspace
|
||||
zeroclaw init
|
||||
|
||||
# 5. Verifique a instalação
|
||||
zeroclaw --version
|
||||
zeroclaw status
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Após a instalação
|
||||
|
||||
Uma vez instalado (via bootstrap ou manualmente), você deve ver:
|
||||
|
||||
```
|
||||
~/.zeroclaw/workspace/
|
||||
├── config.toml # Configuração principal
|
||||
├── .pairing # Segredos de emparelhamento (gerado no primeiro início)
|
||||
├── logs/ # Logs de daemon/agent
|
||||
├── skills/ # Habilidades personalizadas
|
||||
└── memory/ # Armazenamento de contexto conversacional
|
||||
```
|
||||
|
||||
**Próximos passos:**
|
||||
|
||||
1. Configure seus provedores de AI em `~/.zeroclaw/workspace/config.toml`
|
||||
2. Confira a [referência de configuração](docs/config-reference.md) para opções avançadas
|
||||
3. Inicie o agente: `zeroclaw agent start`
|
||||
4. Teste via seu canal preferido (veja [referência de canais](docs/channels-reference.md))
|
||||
|
||||
## Configuração
|
||||
|
||||
Edite `~/.zeroclaw/workspace/config.toml` para configurar provedores, canais e comportamento do sistema.
|
||||
|
||||
### Referência de Configuração Rápida
|
||||
|
||||
```toml
|
||||
[providers.anthropic]
|
||||
api_key = "sk-ant-..."
|
||||
model = "claude-sonnet-4-20250514"
|
||||
|
||||
[providers.openai]
|
||||
api_key = "sk-..."
|
||||
model = "gpt-4o"
|
||||
|
||||
[channels.telegram]
|
||||
enabled = true
|
||||
bot_token = "123456:ABC-DEF..."
|
||||
|
||||
[channels.matrix]
|
||||
enabled = true
|
||||
homeserver_url = "https://matrix.org"
|
||||
username = "@bot:matrix.org"
|
||||
password = "..."
|
||||
|
||||
[memory]
|
||||
kind = "markdown" # ou "sqlite" ou "none"
|
||||
|
||||
[runtime]
|
||||
kind = "native" # ou "docker" (requer Docker)
|
||||
```
|
||||
|
||||
**Documentos de referência completos:**
|
||||
|
||||
- [Referência de Configuração](docs/config-reference.md) — todas as configurações, validações, valores padrão
|
||||
- [Referência de Provedores](docs/providers-reference.md) — configurações específicas de provedores de AI
|
||||
- [Referência de Canais](docs/channels-reference.md) — Telegram, Matrix, Slack, Discord e mais
|
||||
- [Operações](docs/operations-runbook.md) — monitoramento em produção, rotação de segredos, escalonamento
|
||||
|
||||
### Suporte de Runtime (atual)
|
||||
|
||||
ZeroClaw suporta dois backends de execução de código:
|
||||
|
||||
- **`native`** (padrão) — execução de processo direta, caminho mais rápido, ideal para ambientes confiáveis
|
||||
- **`docker`** — isolamento completo de container, políticas de segurança reforçadas, requer Docker
|
||||
|
||||
Use `runtime.kind = "docker"` se você precisar de sandboxing estrito ou isolamento de rede. Veja [referência de configuração](docs/config-reference.md#runtime) para detalhes completos.
|
||||
|
||||
## Comandos
|
||||
|
||||
```bash
|
||||
# Gestão de workspace
|
||||
zeroclaw init # Inicializa um novo workspace
|
||||
zeroclaw status # Mostra status de daemon/agent
|
||||
zeroclaw config validate # Verifica sintaxe e valores do config.toml
|
||||
|
||||
# Gestão de daemon
|
||||
zeroclaw daemon start # Inicia o daemon em segundo plano
|
||||
zeroclaw daemon stop # Para o daemon em execução
|
||||
zeroclaw daemon restart # Reinicia o daemon (recarga de config)
|
||||
zeroclaw daemon logs # Mostra logs do daemon
|
||||
|
||||
# Gestão de agent
|
||||
zeroclaw agent start # Inicia o agent (requer daemon rodando)
|
||||
zeroclaw agent stop # Para o agent
|
||||
zeroclaw agent restart # Reinicia o agent (recarga de config)
|
||||
|
||||
# Operações de emparelhamento
|
||||
zeroclaw pairing init # Gera um novo segredo de emparelhamento
|
||||
zeroclaw pairing rotate # Rotaciona o segredo de emparelhamento existente
|
||||
|
||||
# Tunneling (para exposição pública)
|
||||
zeroclaw tunnel start # Inicia um tunnel para o daemon local
|
||||
zeroclaw tunnel stop # Para o tunnel ativo
|
||||
|
||||
# Diagnóstico
|
||||
zeroclaw doctor # Executa verificações de saúde do sistema
|
||||
zeroclaw version # Mostra versão e informações de build
|
||||
```
|
||||
|
||||
Veja [Referência de Comandos](docs/commands-reference.md) para opções e exemplos completos.
|
||||
|
||||
## Colaboração e Docs
|
||||
|
||||
Comece com o hub de documentação para um mapa baseado em tarefas:
|
||||
|
||||
- Hub de Documentação: [`docs/README.md`](docs/README.md)
|
||||
- Índice Unificado de Docs: [`docs/SUMMARY.md`](docs/SUMMARY.md)
|
||||
- Referência de Comandos: [`docs/commands-reference.md`](docs/commands-reference.md)
|
||||
- Referência de Configuração: [`docs/config-reference.md`](docs/config-reference.md)
|
||||
- Referência de Provedores: [`docs/providers-reference.md`](docs/providers-reference.md)
|
||||
- Referência de Canais: [`docs/channels-reference.md`](docs/channels-reference.md)
|
||||
- Runbook de Operações: [`docs/operations-runbook.md`](docs/operations-runbook.md)
|
||||
- Solução de Problemas: [`docs/troubleshooting.md`](docs/troubleshooting.md)
|
||||
- Inventário/Classificação de Docs: [`docs/docs-inventory.md`](docs/docs-inventory.md)
|
||||
- Snapshot de Triage de PR/Issue (em 18 de fev. de 2026): [`docs/project-triage-snapshot-2026-02-18.md`](docs/project-triage-snapshot-2026-02-18.md)
|
||||
|
||||
Referências principais de colaboração:
|
||||
|
||||
- Hub de Documentação: [docs/README.md](docs/README.md)
|
||||
- Modelo de Documentação: [docs/doc-template.md](docs/doc-template.md)
|
||||
- Checklist de Mudança de Documentação: [docs/README.md#4-documentation-change-checklist](docs/README.md#4-documentation-change-checklist)
|
||||
- Referência de Configuração de Canais: [docs/channels-reference.md](docs/channels-reference.md)
|
||||
- Operações de Salas Criptografadas Matrix: [docs/matrix-e2ee-guide.md](docs/matrix-e2ee-guide.md)
|
||||
- Guia de Contribuição: [CONTRIBUTING.md](CONTRIBUTING.md)
|
||||
- Política de Fluxo de Trabalho PR: [docs/pr-workflow.md](docs/pr-workflow.md)
|
||||
- Playbook do Revisor (triage + revisão profunda): [docs/reviewer-playbook.md](docs/reviewer-playbook.md)
|
||||
- Mapa de Propriedade e Triage CI: [docs/ci-map.md](docs/ci-map.md)
|
||||
- Política de Divulgação de Segurança: [SECURITY.md](SECURITY.md)
|
||||
|
||||
Para implantação e operações de runtime:
|
||||
|
||||
- Guia de Implantação de Rede: [docs/network-deployment.md](docs/network-deployment.md)
|
||||
- Playbook de Agent Proxy: [docs/proxy-agent-playbook.md](docs/proxy-agent-playbook.md)
|
||||
|
||||
## Apoiar o ZeroClaw
|
||||
|
||||
Se ZeroClaw ajuda seu trabalho e você deseja apoiar o desenvolvimento contínuo, você pode doar aqui:
|
||||
|
||||
<a href="https://buymeacoffee.com/argenistherose"><img src="https://img.shields.io/badge/Buy%20Me%20a%20Coffee-Donate-yellow.svg?style=for-the-badge&logo=buy-me-a-coffee" alt="Me Pague um Café" /></a>
|
||||
|
||||
### 🙏 Agradecimentos Especiais
|
||||
|
||||
Um sincero agradecimento às comunidades e instituições que inspiram e alimentam este trabalho de código aberto:
|
||||
|
||||
- **Harvard University** — por fomentar a curiosidade intelectual e empurrar os limites do possível.
|
||||
- **MIT** — por defender o conhecimento aberto, o código aberto, e a convicção de que a tecnologia deveria ser acessível a todos.
|
||||
- **Sundai Club** — pela comunidade, energia, e vontade incessante de construir coisas que importam.
|
||||
- **O Mundo e Além** 🌍✨ — a cada contribuidor, sonhador, e construtor lá fora que faz do código aberto uma força para o bem. Isso é por você.
|
||||
|
||||
Construímos em código aberto porque as melhores ideias vêm de todo lugar. Se você está lendo isso, você é parte disso. Bem-vindo. 🦀❤️
|
||||
|
||||
<!-- BEGIN:RECENT_CONTRIBUTORS -->
|
||||
|
||||
### 🌟 Recent Contributors (v0.3.1)
|
||||
|
||||
3 contributors shipped features, fixes, and improvements in this release cycle:
|
||||
|
||||
- **Argenis**
|
||||
- **argenis de la rosa**
|
||||
- **Claude Opus 4.6**
|
||||
|
||||
Thank you to everyone who opened issues, reviewed PRs, translated docs, and helped test. Every contribution matters. 🦀
|
||||
|
||||
<!-- END:RECENT_CONTRIBUTORS -->
|
||||
|
||||
## ⚠️ Repositório Oficial e Aviso de Falsificação
|
||||
|
||||
**Este é o único repositório oficial do ZeroClaw:**
|
||||
|
||||
> <https://github.com/zeroclaw-labs/zeroclaw>
|
||||
|
||||
Qualquer outro repositório, organização, domínio ou pacote que afirme ser "ZeroClaw" ou que implique afiliação com ZeroClaw Labs é **não autorizado e não é afiliado a este projeto**. Forks não autorizados conhecidos serão listados em [TRADEMARK.md](TRADEMARK.md).
|
||||
|
||||
Se você encontrar falsificação ou uso indevido de marca, por favor [abra uma issue](https://github.com/zeroclaw-labs/zeroclaw/issues).
|
||||
|
||||
---
|
||||
|
||||
## Licença
|
||||
|
||||
ZeroClaw tem licença dupla para máxima abertura e proteção de contribuidores:
|
||||
|
||||
| Licença | Casos de Uso |
|
||||
| ---------------------------- | ------------------------------------------------------------ |
|
||||
| [MIT](LICENSE-MIT) | Código aberto, pesquisa, acadêmico, uso pessoal |
|
||||
| [Apache 2.0](LICENSE-APACHE) | Proteção de patentes, institucional, implantação comercial |
|
||||
|
||||
Você pode escolher qualquer uma das licenças. **Os contribuidores concedem automaticamente direitos sob ambas** — veja [CLA.md](CLA.md) para o acordo de contribuidor completo.
|
||||
|
||||
### Marca
|
||||
|
||||
O nome **ZeroClaw** e o logo são marcas registradas da ZeroClaw Labs. Esta licença não concede permissão para usá-los para implicar aprovação ou afiliação. Veja [TRADEMARK.md](TRADEMARK.md) para usos permitidos e proibidos.
|
||||
|
||||
### Proteções do Contribuidor
|
||||
|
||||
- **Você mantém os direitos autorais** de suas contribuições
|
||||
- **Concessão de patentes** (Apache 2.0) protege você contra reivindicações de patentes por outros contribuidores
|
||||
- Suas contribuições são **atribuídas permanentemente** no histórico de commits e [NOTICE](NOTICE)
|
||||
- Nenhum direito de marca é transferido ao contribuir
|
||||
|
||||
## Contribuir
|
||||
|
||||
Veja [CONTRIBUTING.md](CONTRIBUTING.md) e [CLA.md](CLA.md). Implemente um trait, envie uma PR:
|
||||
|
||||
- Guia de fluxo de trabalho CI: [docs/ci-map.md](docs/ci-map.md)
|
||||
- Novo `Provider` → `src/providers/`
|
||||
- Novo `Channel` → `src/channels/`
|
||||
- Novo `Observer` → `src/observability/`
|
||||
- Novo `Tool` → `src/tools/`
|
||||
- Nova `Memory` → `src/memory/`
|
||||
- Novo `Tunnel` → `src/tunnel/`
|
||||
- Nova `Skill` → `~/.zeroclaw/workspace/skills/<n>/`
|
||||
|
||||
---
|
||||
|
||||
**ZeroClaw** — Zero sobrecarga. Zero compromisso. Implante em qualquer lugar. Troque qualquer coisa. 🦀
|
||||
|
||||
## Histórico de Estrelas
|
||||
|
||||
<p align="center">
|
||||
<a href="https://www.star-history.com/#zeroclaw-labs/zeroclaw&type=date&legend=top-left">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=zeroclaw-labs/zeroclaw&type=date&theme=dark&legend=top-left" />
|
||||
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=zeroclaw-labs/zeroclaw&type=date&legend=top-left" />
|
||||
<img alt="Gráfico de Histórico de Estrelas" src="https://api.star-history.com/svg?repos=zeroclaw-labs/zeroclaw&type=date&legend=top-left" />
|
||||
</picture>
|
||||
</a>
|
||||
</p>
|
||||
+203
@@ -0,0 +1,203 @@
|
||||
<p align="center">
|
||||
<img src="zeroclaw.png" alt="ZeroClaw" width="200" />
|
||||
</p>
|
||||
|
||||
<h1 align="center">ZeroClaw 🦀</h1>
|
||||
|
||||
<p align="center">
|
||||
<strong>Zero overhead. Zero compromisuri. 100% Rust. 100% Agnostic.</strong><br>
|
||||
⚡️ <strong>Rulează pe hardware de $10 cu <5MB RAM: Asta e cu 99% mai puțină memorie decât OpenClaw și cu 98% mai ieftin decât un Mac mini!</strong>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="LICENSE-APACHE"><img src="https://img.shields.io/badge/license-MIT%20OR%20Apache%202.0-blue.svg" alt="License: MIT OR Apache-2.0" /></a>
|
||||
<a href="NOTICE"><img src="https://img.shields.io/badge/contributors-27+-green.svg" alt="Contributors" /></a>
|
||||
<a href="https://buymeacoffee.com/argenistherose"><img src="https://img.shields.io/badge/Buy%20Me%20a%20Coffee-Donate-yellow.svg?style=flat&logo=buy-me-a-coffee" alt="Buy Me a Coffee" /></a>
|
||||
<a href="https://x.com/zeroclawlabs?s=21"><img src="https://img.shields.io/badge/X-%40zeroclawlabs-000000?style=flat&logo=x&logoColor=white" alt="X: @zeroclawlabs" /></a>
|
||||
<a href="https://zeroclawlabs.cn/group.jpg"><img src="https://img.shields.io/badge/WeChat-Group-B7D7A8?logo=wechat&logoColor=white" alt="WeChat Group" /></a>
|
||||
<a href="https://www.xiaohongshu.com/user/profile/67cbfc43000000000d008307?xsec_token=AB73VnYnGNx5y36EtnnZfGmAmS-6Wzv8WMuGpfwfkg6Yc%3D&xsec_source=pc_search"><img src="https://img.shields.io/badge/Xiaohongshu-Official-FF2442?style=flat" alt="Xiaohongshu: Official" /></a>
|
||||
<a href="https://t.me/zeroclawlabs"><img src="https://img.shields.io/badge/Telegram-%40zeroclawlabs-26A5E4?style=flat&logo=telegram&logoColor=white" alt="Telegram: @zeroclawlabs" /></a>
|
||||
<a href="https://www.facebook.com/groups/zeroclaw"><img src="https://img.shields.io/badge/Facebook-Group-1877F2?style=flat&logo=facebook&logoColor=white" alt="Facebook Group" /></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
🌐 <strong>Limbi:</strong>
|
||||
<a href="README.md">🇺🇸 English</a> ·
|
||||
<a href="README.zh-CN.md">🇨🇳 简体中文</a> ·
|
||||
<a href="README.ja.md">🇯🇵 日本語</a> ·
|
||||
<a href="README.ko.md">🇰🇷 한국어</a> ·
|
||||
<a href="README.vi.md">🇻🇳 Tiếng Việt</a> ·
|
||||
<a href="README.tl.md">🇵🇭 Tagalog</a> ·
|
||||
<a href="README.es.md">🇪🇸 Español</a> ·
|
||||
<a href="README.pt.md">🇧🇷 Português</a> ·
|
||||
<a href="README.it.md">🇮🇹 Italiano</a> ·
|
||||
<a href="README.de.md">🇩🇪 Deutsch</a> ·
|
||||
<a href="README.fr.md">🇫🇷 Français</a> ·
|
||||
<a href="README.ar.md">🇸🇦 العربية</a> ·
|
||||
<a href="README.hi.md">🇮🇳 हिन्दी</a> ·
|
||||
<a href="README.ru.md">🇷🇺 Русский</a> ·
|
||||
<a href="README.bn.md">🇧🇩 বাংলা</a> ·
|
||||
<a href="README.he.md">🇮🇱 עברית</a> ·
|
||||
<a href="README.pl.md">🇵🇱 Polski</a> ·
|
||||
<a href="README.cs.md">🇨🇿 Čeština</a> ·
|
||||
<a href="README.nl.md">🇳🇱 Nederlands</a> ·
|
||||
<a href="README.tr.md">🇹🇷 Türkçe</a> ·
|
||||
<a href="README.uk.md">🇺🇦 Українська</a> ·
|
||||
<a href="README.id.md">🇮🇩 Bahasa Indonesia</a> ·
|
||||
<a href="README.th.md">🇹🇭 ไทย</a> ·
|
||||
<a href="README.ur.md">🇵🇰 اردو</a> ·
|
||||
<a href="README.ro.md">🇷🇴 Română</a> ·
|
||||
<a href="README.sv.md">🇸🇪 Svenska</a> ·
|
||||
<a href="README.el.md">🇬🇷 Ελληνικά</a> ·
|
||||
<a href="README.hu.md">🇭🇺 Magyar</a> ·
|
||||
<a href="README.fi.md">🇫🇮 Suomi</a> ·
|
||||
<a href="README.da.md">🇩🇰 Dansk</a> ·
|
||||
<a href="README.nb.md">🇳🇴 Norsk</a>
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
<!-- BEGIN:WHATS_NEW -->
|
||||
|
||||
### 🚀 What's New in v0.3.1 (March 2026)
|
||||
|
||||
| Area | Highlights |
|
||||
|---|---|
|
||||
| ci | add Termux (aarch64-linux-android) release target |
|
||||
|
||||
<!-- END:WHATS_NEW -->
|
||||
|
||||
## Ce este ZeroClaw?
|
||||
|
||||
ZeroClaw este o infrastructură de asistent AI ușoară, mutabilă și extensibilă construită în Rust. Conectează diverși furnizori de LLM (Anthropic, OpenAI, Google, Ollama, etc.) printr-o interfață unificată și suportă multiple canale (Telegram, Matrix, CLI, etc.).
|
||||
|
||||
### Caracteristici Principale
|
||||
|
||||
- **🦀 Scris în Rust**: Performanță ridicată, siguranță a memoriei și abstracțiuni fără costuri
|
||||
- **🔌 Agnostic față de furnizori**: Suportă OpenAI, Anthropic, Google Gemini, Ollama și alții
|
||||
- **📱 Multi-canal**: Telegram, Matrix (cu E2EE), CLI și altele
|
||||
- **🧠 Memorie modulară**: Backend-uri SQLite și Markdown
|
||||
- **🛠️ Instrumente extensibile**: Adaugă instrumente personalizate cu ușurință
|
||||
- **🔒 Securitate pe primul loc**: Reverse proxy, design axat pe confidențialitate
|
||||
|
||||
---
|
||||
|
||||
## Start Rapid
|
||||
|
||||
### Cerințe
|
||||
|
||||
- Rust 1.70+
|
||||
- O cheie API de furnizor LLM (Anthropic, OpenAI, etc.)
|
||||
|
||||
### Instalare
|
||||
|
||||
```bash
|
||||
# Clonează repository-ul
|
||||
git clone https://github.com/zeroclaw-labs/zeroclaw.git
|
||||
cd zeroclaw
|
||||
|
||||
# Construiește
|
||||
cargo build --release
|
||||
|
||||
# Rulează
|
||||
cargo run --release
|
||||
```
|
||||
|
||||
### Cu Docker
|
||||
|
||||
```bash
|
||||
docker run -d \
|
||||
--name zeroclaw \
|
||||
-e ANTHROPIC_API_KEY=your_key \
|
||||
-v zeroclaw-data:/app/data \
|
||||
zeroclaw/zeroclaw:latest
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Configurare
|
||||
|
||||
ZeroClaw folosește un fișier de configurare YAML. În mod implicit, caută `config.yaml`.
|
||||
|
||||
```yaml
|
||||
# Furnizor implicit
|
||||
provider: anthropic
|
||||
|
||||
# Configurare furnizori
|
||||
providers:
|
||||
anthropic:
|
||||
api_key: ${ANTHROPIC_API_KEY}
|
||||
model: claude-3-5-sonnet-20241022
|
||||
openai:
|
||||
api_key: ${OPENAI_API_KEY}
|
||||
model: gpt-4o
|
||||
|
||||
# Configurare memorie
|
||||
memory:
|
||||
backend: sqlite
|
||||
path: data/memory.db
|
||||
|
||||
# Configurare canale
|
||||
channels:
|
||||
telegram:
|
||||
token: ${TELEGRAM_BOT_TOKEN}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Documentație
|
||||
|
||||
Pentru documentație detaliată, vezi:
|
||||
|
||||
- [Hub Documentație](docs/README.md)
|
||||
- [Referință Comenzi](docs/commands-reference.md)
|
||||
- [Referință Furnizori](docs/providers-reference.md)
|
||||
- [Referință Canale](docs/channels-reference.md)
|
||||
- [Referință Configurare](docs/config-reference.md)
|
||||
|
||||
---
|
||||
|
||||
## Contribuții
|
||||
|
||||
Contribuțiile sunt binevenite! Te rugăm să citești [Ghidul de Contribuții](CONTRIBUTING.md).
|
||||
|
||||
---
|
||||
|
||||
## Licență
|
||||
|
||||
Acest proiect este licențiat dual:
|
||||
|
||||
- MIT License
|
||||
- Apache License, versiunea 2.0
|
||||
|
||||
Vezi [LICENSE-APACHE](LICENSE-APACHE) și [LICENSE-MIT](LICENSE-MIT) pentru detalii.
|
||||
|
||||
---
|
||||
|
||||
## Comunitate
|
||||
|
||||
- [Telegram](https://t.me/zeroclawlabs)
|
||||
- [Facebook Group](https://www.facebook.com/groups/zeroclaw)
|
||||
- [WeChat Group](https://zeroclawlabs.cn/group.jpg)
|
||||
|
||||
---
|
||||
|
||||
## Sponsori
|
||||
|
||||
Dacă ZeroClaw îți este util, te rugăm să iei în considerare să ne cumperi o cafea:
|
||||
|
||||
[](https://buymeacoffee.com/argenistherose)
|
||||
|
||||
<!-- BEGIN:RECENT_CONTRIBUTORS -->
|
||||
|
||||
### 🌟 Recent Contributors (v0.3.1)
|
||||
|
||||
3 contributors shipped features, fixes, and improvements in this release cycle:
|
||||
|
||||
- **Argenis**
|
||||
- **argenis de la rosa**
|
||||
- **Claude Opus 4.6**
|
||||
|
||||
Thank you to everyone who opened issues, reviewed PRs, translated docs, and helped test. Every contribution matters. 🦀
|
||||
|
||||
<!-- END:RECENT_CONTRIBUTORS -->
|
||||
+68
-114
@@ -1,5 +1,5 @@
|
||||
<p align="center">
|
||||
<img src="zeroclaw.png" alt="ZeroClaw" width="200" />
|
||||
<img src="docs/assets/zeroclaw.png" alt="ZeroClaw" width="200" />
|
||||
</p>
|
||||
|
||||
<h1 align="center">ZeroClaw 🦀(Русский)</h1>
|
||||
@@ -13,20 +13,48 @@
|
||||
<a href="NOTICE"><img src="https://img.shields.io/badge/contributors-27+-green.svg" alt="Contributors" /></a>
|
||||
<a href="https://buymeacoffee.com/argenistherose"><img src="https://img.shields.io/badge/Buy%20Me%20a%20Coffee-Donate-yellow.svg?style=flat&logo=buy-me-a-coffee" alt="Buy Me a Coffee" /></a>
|
||||
<a href="https://x.com/zeroclawlabs?s=21"><img src="https://img.shields.io/badge/X-%40zeroclawlabs-000000?style=flat&logo=x&logoColor=white" alt="X: @zeroclawlabs" /></a>
|
||||
<a href="https://zeroclawlabs.cn/group.jpg"><img src="https://img.shields.io/badge/WeChat-Group-B7D7A8?logo=wechat&logoColor=white" alt="WeChat Group" /></a>
|
||||
<a href="https://www.xiaohongshu.com/user/profile/67cbfc43000000000d008307?xsec_token=AB73VnYnGNx5y36EtnnZfGmAmS-6Wzv8WMuGpfwfkg6Yc%3D&xsec_source=pc_search"><img src="https://img.shields.io/badge/Xiaohongshu-Official-FF2442?style=flat" alt="Xiaohongshu: Official" /></a>
|
||||
<a href="https://t.me/zeroclawlabs"><img src="https://img.shields.io/badge/Telegram-%40zeroclawlabs-26A5E4?style=flat&logo=telegram&logoColor=white" alt="Telegram: @zeroclawlabs" /></a>
|
||||
<a href="https://www.facebook.com/groups/zeroclaw"><img src="https://img.shields.io/badge/Facebook-Group-1877F2?style=flat&logo=facebook&logoColor=white" alt="Facebook Group" /></a>
|
||||
<a href="https://www.reddit.com/r/zeroclawlabs/"><img src="https://img.shields.io/badge/Reddit-r%2Fzeroclawlabs-FF4500?style=flat&logo=reddit&logoColor=white" alt="Reddit: r/zeroclawlabs" /></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
🌐 Языки: <a href="README.md">English</a> · <a href="README.zh-CN.md">简体中文</a> · <a href="README.ja.md">日本語</a> · <a href="README.ru.md">Русский</a> · <a href="README.fr.md">Français</a> · <a href="README.vi.md">Tiếng Việt</a>
|
||||
🌐 Языки:
|
||||
<a href="README.md">🇺🇸 English</a> ·
|
||||
<a href="README.zh-CN.md">🇨🇳 简体中文</a> ·
|
||||
<a href="README.ja.md">🇯🇵 日本語</a> ·
|
||||
<a href="README.ko.md">🇰🇷 한국어</a> ·
|
||||
<a href="README.vi.md">🇻🇳 Tiếng Việt</a> ·
|
||||
<a href="README.tl.md">🇵🇭 Tagalog</a> ·
|
||||
<a href="README.es.md">🇪🇸 Español</a> ·
|
||||
<a href="README.pt.md">🇧🇷 Português</a> ·
|
||||
<a href="README.it.md">🇮🇹 Italiano</a> ·
|
||||
<a href="README.de.md">🇩🇪 Deutsch</a> ·
|
||||
<a href="README.fr.md">🇫🇷 Français</a> ·
|
||||
<a href="README.ar.md">🇸🇦 العربية</a> ·
|
||||
<a href="README.hi.md">🇮🇳 हिन्दी</a> ·
|
||||
<a href="README.ru.md">🇷🇺 Русский</a> ·
|
||||
<a href="README.bn.md">🇧🇩 বাংলা</a> ·
|
||||
<a href="README.he.md">🇮🇱 עברית</a> ·
|
||||
<a href="README.pl.md">🇵🇱 Polski</a> ·
|
||||
<a href="README.cs.md">🇨🇿 Čeština</a> ·
|
||||
<a href="README.nl.md">🇳🇱 Nederlands</a> ·
|
||||
<a href="README.tr.md">🇹🇷 Türkçe</a> ·
|
||||
<a href="README.uk.md">🇺🇦 Українська</a> ·
|
||||
<a href="README.id.md">🇮🇩 Bahasa Indonesia</a> ·
|
||||
<a href="README.th.md">🇹🇭 ไทย</a> ·
|
||||
<a href="README.ur.md">🇵🇰 اردو</a> ·
|
||||
<a href="README.ro.md">🇷🇴 Română</a> ·
|
||||
<a href="README.sv.md">🇸🇪 Svenska</a> ·
|
||||
<a href="README.el.md">🇬🇷 Ελληνικά</a> ·
|
||||
<a href="README.hu.md">🇭🇺 Magyar</a> ·
|
||||
<a href="README.fi.md">🇫🇮 Suomi</a> ·
|
||||
<a href="README.da.md">🇩🇰 Dansk</a> ·
|
||||
<a href="README.nb.md">🇳🇴 Norsk</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="bootstrap.sh">Установка в 1 клик</a> |
|
||||
<a href="docs/getting-started/README.md">Быстрый старт</a> |
|
||||
<a href="https://raw.githubusercontent.com/zeroclaw-labs/zeroclaw/master/install.sh">Установка в 1 клик</a> |
|
||||
<a href="docs/setup-guides/README.md">Быстрый старт</a> |
|
||||
<a href="docs/README.ru.md">Хаб документации</a> |
|
||||
<a href="docs/SUMMARY.md">TOC docs</a>
|
||||
</p>
|
||||
@@ -34,8 +62,8 @@
|
||||
<p align="center">
|
||||
<strong>Быстрые маршруты:</strong>
|
||||
<a href="docs/reference/README.md">Справочники</a> ·
|
||||
<a href="docs/operations/README.md">Операции</a> ·
|
||||
<a href="docs/troubleshooting.md">Диагностика</a> ·
|
||||
<a href="docs/ops/README.md">Операции</a> ·
|
||||
<a href="docs/ops/troubleshooting.md">Диагностика</a> ·
|
||||
<a href="docs/security/README.md">Безопасность</a> ·
|
||||
<a href="docs/hardware/README.md">Аппаратная часть</a> ·
|
||||
<a href="docs/contributing/README.md">Вклад и CI</a>
|
||||
@@ -47,6 +75,16 @@
|
||||
>
|
||||
> Последняя синхронизация: **2026-02-19**.
|
||||
|
||||
<!-- BEGIN:WHATS_NEW -->
|
||||
|
||||
### 🚀 What's New in v0.3.1 (March 2026)
|
||||
|
||||
| Area | Highlights |
|
||||
|---|---|
|
||||
| ci | add Termux (aarch64-linux-android) release target |
|
||||
|
||||
<!-- END:WHATS_NEW -->
|
||||
|
||||
## 📢 Доска объявлений
|
||||
|
||||
Публикуйте здесь важные уведомления (breaking changes, security advisories, окна обслуживания и блокеры релиза).
|
||||
@@ -87,7 +125,7 @@ ZeroClaw — это производительная и расширяемая
|
||||
> Примечание: результаты ZeroClaw получены на release-сборке с помощью `/usr/bin/time -l`. OpenClaw требует Node.js runtime; только этот runtime обычно добавляет около 390MB дополнительного потребления памяти. NanoBot требует Python runtime. PicoClaw и ZeroClaw — статические бинарники.
|
||||
|
||||
<p align="center">
|
||||
<img src="zero-claw.jpeg" alt="Сравнение ZeroClaw и OpenClaw" width="800" />
|
||||
<img src="docs/assets/zeroclaw-comparison.jpeg" alt="Сравнение ZeroClaw и OpenClaw" width="800" />
|
||||
</p>
|
||||
|
||||
### Локально воспроизводимое измерение
|
||||
@@ -113,12 +151,12 @@ ls -lh target/release/zeroclaw
|
||||
```bash
|
||||
git clone https://github.com/zeroclaw-labs/zeroclaw.git
|
||||
cd zeroclaw
|
||||
./bootstrap.sh
|
||||
./install.sh
|
||||
```
|
||||
|
||||
Для полной инициализации окружения: `./bootstrap.sh --install-system-deps --install-rust` (для системных пакетов может потребоваться `sudo`).
|
||||
Для полной инициализации окружения: `./install.sh --install-system-deps --install-rust` (для системных пакетов может потребоваться `sudo`).
|
||||
|
||||
Подробности: [`docs/one-click-bootstrap.md`](docs/one-click-bootstrap.md).
|
||||
Подробности: [`docs/setup-guides/one-click-bootstrap.md`](docs/setup-guides/one-click-bootstrap.md).
|
||||
|
||||
## Быстрый старт
|
||||
|
||||
@@ -135,7 +173,7 @@ cargo build --release --locked
|
||||
cargo install --path . --force --locked
|
||||
|
||||
zeroclaw onboard --api-key sk-... --provider openrouter
|
||||
zeroclaw onboard --interactive
|
||||
zeroclaw onboard
|
||||
|
||||
zeroclaw agent -m "Hello, ZeroClaw!"
|
||||
|
||||
@@ -190,111 +228,27 @@ zeroclaw agent --provider openai-codex --auth-profile openai-codex:work -m "hell
|
||||
zeroclaw agent --provider anthropic -m "hello"
|
||||
```
|
||||
|
||||
## Архитектура
|
||||
|
||||
Каждая подсистема — это **Trait**: меняйте реализации через конфигурацию, без изменения кода.
|
||||
|
||||
<p align="center">
|
||||
<img src="docs/architecture.svg" alt="Архитектура ZeroClaw" width="900" />
|
||||
</p>
|
||||
|
||||
| Подсистема | Trait | Встроенные реализации | Расширение |
|
||||
|-----------|-------|---------------------|------------|
|
||||
| **AI-модели** | `Provider` | Каталог через `zeroclaw providers` (сейчас 28 встроенных + алиасы, плюс пользовательские endpoint) | `custom:https://your-api.com` (OpenAI-совместимый) или `anthropic-custom:https://your-api.com` |
|
||||
| **Каналы** | `Channel` | CLI, Telegram, Discord, Slack, Mattermost, iMessage, Matrix, Signal, WhatsApp, Linq, Email, IRC, Lark, DingTalk, QQ, Webhook | Любой messaging API |
|
||||
| **Память** | `Memory` | SQLite гибридный поиск, PostgreSQL-бэкенд, Lucid-мост, Markdown-файлы, явный `none`-бэкенд, snapshot/hydrate, опциональный кэш ответов | Любой persistence-бэкенд |
|
||||
| **Инструменты** | `Tool` | shell/file/memory, cron/schedule, git, pushover, browser, http_request, screenshot/image_info, composio (opt-in), delegate, аппаратные инструменты | Любая функциональность |
|
||||
| **Наблюдаемость** | `Observer` | Noop, Log, Multi | Prometheus, OTel |
|
||||
| **Runtime** | `RuntimeAdapter` | Native, Docker (sandbox) | Через adapter; неподдерживаемые kind завершаются с ошибкой |
|
||||
| **Безопасность** | `SecurityPolicy` | Gateway pairing, sandbox, allowlist, rate limits, scoping файловой системы, шифрование секретов | — |
|
||||
| **Идентификация** | `IdentityConfig` | OpenClaw (markdown), AIEOS v1.1 (JSON) | Любой формат идентификации |
|
||||
| **Туннели** | `Tunnel` | None, Cloudflare, Tailscale, ngrok, Custom | Любой tunnel-бинарник |
|
||||
| **Heartbeat** | Engine | HEARTBEAT.md — периодические задачи | — |
|
||||
| **Навыки** | Loader | TOML-манифесты + SKILL.md-инструкции | Пакеты навыков сообщества |
|
||||
| **Интеграции** | Registry | 70+ интеграций в 9 категориях | Плагинная система |
|
||||
|
||||
### Поддержка runtime (текущая)
|
||||
|
||||
- ✅ Поддерживается сейчас: `runtime.kind = "native"` или `runtime.kind = "docker"`
|
||||
- 🚧 Запланировано, но ещё не реализовано: WASM / edge-runtime
|
||||
|
||||
При указании неподдерживаемого `runtime.kind` ZeroClaw завершается с явной ошибкой, а не молча откатывается к native.
|
||||
|
||||
### Система памяти (полнофункциональный поисковый движок)
|
||||
|
||||
Полностью собственная реализация, ноль внешних зависимостей — без Pinecone, Elasticsearch, LangChain:
|
||||
|
||||
| Уровень | Реализация |
|
||||
|---------|-----------|
|
||||
| **Векторная БД** | Embeddings хранятся как BLOB в SQLite, поиск по косинусному сходству |
|
||||
| **Поиск по ключевым словам** | Виртуальные таблицы FTS5 со скорингом BM25 |
|
||||
| **Гибридное слияние** | Пользовательская взвешенная функция слияния (`vector.rs`) |
|
||||
| **Embeddings** | Trait `EmbeddingProvider` — OpenAI, пользовательский URL или noop |
|
||||
| **Чанкинг** | Построчный Markdown-чанкер с сохранением заголовков |
|
||||
| **Кэширование** | Таблица `embedding_cache` в SQLite с LRU-вытеснением |
|
||||
| **Безопасная переиндексация** | Атомарная перестройка FTS5 + повторное встраивание отсутствующих векторов |
|
||||
|
||||
Agent автоматически вспоминает, сохраняет и управляет памятью через инструменты.
|
||||
|
||||
```toml
|
||||
[memory]
|
||||
backend = "sqlite" # "sqlite", "lucid", "postgres", "markdown", "none"
|
||||
auto_save = true
|
||||
embedding_provider = "none" # "none", "openai", "custom:https://..."
|
||||
vector_weight = 0.7
|
||||
keyword_weight = 0.3
|
||||
```
|
||||
|
||||
## Важные security-дефолты
|
||||
|
||||
- Gateway по умолчанию: `127.0.0.1:42617`
|
||||
- Pairing обязателен по умолчанию: `require_pairing = true`
|
||||
- Публичный bind запрещён по умолчанию: `allow_public_bind = false`
|
||||
- Семантика allowlist каналов:
|
||||
- `[]` => deny-by-default
|
||||
- `["*"]` => allow all (используйте осознанно)
|
||||
|
||||
## Пример конфигурации
|
||||
|
||||
```toml
|
||||
api_key = "sk-..."
|
||||
default_provider = "openrouter"
|
||||
default_model = "anthropic/claude-sonnet-4-6"
|
||||
default_temperature = 0.7
|
||||
|
||||
[memory]
|
||||
backend = "sqlite"
|
||||
auto_save = true
|
||||
embedding_provider = "none"
|
||||
|
||||
[gateway]
|
||||
host = "127.0.0.1"
|
||||
port = 42617
|
||||
require_pairing = true
|
||||
allow_public_bind = false
|
||||
```
|
||||
|
||||
## Навигация по документации
|
||||
|
||||
- Хаб документации (English): [`docs/README.md`](docs/README.md)
|
||||
- Единый TOC docs: [`docs/SUMMARY.md`](docs/SUMMARY.md)
|
||||
- Хаб документации (Русский): [`docs/README.ru.md`](docs/README.ru.md)
|
||||
- Справочник команд: [`docs/commands-reference.md`](docs/commands-reference.md)
|
||||
- Справочник конфигурации: [`docs/config-reference.md`](docs/config-reference.md)
|
||||
- Справочник providers: [`docs/providers-reference.md`](docs/providers-reference.md)
|
||||
- Справочник channels: [`docs/channels-reference.md`](docs/channels-reference.md)
|
||||
- Операционный runbook: [`docs/operations-runbook.md`](docs/operations-runbook.md)
|
||||
- Устранение неполадок: [`docs/troubleshooting.md`](docs/troubleshooting.md)
|
||||
- Инвентарь и классификация docs: [`docs/docs-inventory.md`](docs/docs-inventory.md)
|
||||
- Снимок triage проекта: [`docs/project-triage-snapshot-2026-02-18.md`](docs/project-triage-snapshot-2026-02-18.md)
|
||||
|
||||
## Вклад и лицензия
|
||||
|
||||
- Contribution guide: [`CONTRIBUTING.md`](CONTRIBUTING.md)
|
||||
- PR workflow: [`docs/pr-workflow.md`](docs/pr-workflow.md)
|
||||
- Reviewer playbook: [`docs/reviewer-playbook.md`](docs/reviewer-playbook.md)
|
||||
- PR workflow: [`docs/contributing/pr-workflow.md`](docs/contributing/pr-workflow.md)
|
||||
- Reviewer playbook: [`docs/contributing/reviewer-playbook.md`](docs/contributing/reviewer-playbook.md)
|
||||
- License: MIT or Apache 2.0 ([`LICENSE-MIT`](LICENSE-MIT), [`LICENSE-APACHE`](LICENSE-APACHE), [`NOTICE`](NOTICE))
|
||||
|
||||
<!-- BEGIN:RECENT_CONTRIBUTORS -->
|
||||
|
||||
### 🌟 Recent Contributors (v0.3.1)
|
||||
|
||||
3 contributors shipped features, fixes, and improvements in this release cycle:
|
||||
|
||||
- **Argenis**
|
||||
- **argenis de la rosa**
|
||||
- **Claude Opus 4.6**
|
||||
|
||||
Thank you to everyone who opened issues, reviewed PRs, translated docs, and helped test. Every contribution matters. 🦀
|
||||
|
||||
<!-- END:RECENT_CONTRIBUTORS -->
|
||||
|
||||
---
|
||||
|
||||
Для полной и исчерпывающей информации (архитектура, все команды, API, разработка) используйте основной английский документ: [`README.md`](README.md).
|
||||
|
||||
+203
@@ -0,0 +1,203 @@
|
||||
<p align="center">
|
||||
<img src="zeroclaw.png" alt="ZeroClaw" width="200" />
|
||||
</p>
|
||||
|
||||
<h1 align="center">ZeroClaw 🦀</h1>
|
||||
|
||||
<p align="center">
|
||||
<strong>Noll overhead. Noll kompromiss. 100% Rust. 100% Agnostisk.</strong><br>
|
||||
⚡️ <strong>Kör på $10 hårdvara med <5MB RAM: Det är 99% mindre minne än OpenClaw och 98% billigare än en Mac mini!</strong>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="LICENSE-APACHE"><img src="https://img.shields.io/badge/license-MIT%20OR%20Apache%202.0-blue.svg" alt="License: MIT OR Apache-2.0" /></a>
|
||||
<a href="NOTICE"><img src="https://img.shields.io/badge/contributors-27+-green.svg" alt="Contributors" /></a>
|
||||
<a href="https://buymeacoffee.com/argenistherose"><img src="https://img.shields.io/badge/Buy%20Me%20a%20Coffee-Donate-yellow.svg?style=flat&logo=buy-me-a-coffee" alt="Buy Me a Coffee" /></a>
|
||||
<a href="https://x.com/zeroclawlabs?s=21"><img src="https://img.shields.io/badge/X-%40zeroclawlabs-000000?style=flat&logo=x&logoColor=white" alt="X: @zeroclawlabs" /></a>
|
||||
<a href="https://zeroclawlabs.cn/group.jpg"><img src="https://img.shields.io/badge/WeChat-Group-B7D7A8?logo=wechat&logoColor=white" alt="WeChat Group" /></a>
|
||||
<a href="https://www.xiaohongshu.com/user/profile/67cbfc43000000000d008307?xsec_token=AB73VnYnGNx5y36EtnnZfGmAmS-6Wzv8WMuGpfwfkg6Yc%3D&xsec_source=pc_search"><img src="https://img.shields.io/badge/Xiaohongshu-Official-FF2442?style=flat" alt="Xiaohongshu: Official" /></a>
|
||||
<a href="https://t.me/zeroclawlabs"><img src="https://img.shields.io/badge/Telegram-%40zeroclawlabs-26A5E4?style=flat&logo=telegram&logoColor=white" alt="Telegram: @zeroclawlabs" /></a>
|
||||
<a href="https://www.facebook.com/groups/zeroclaw"><img src="https://img.shields.io/badge/Facebook-Group-1877F2?style=flat&logo=facebook&logoColor=white" alt="Facebook Group" /></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
🌐 <strong>Språk:</strong>
|
||||
<a href="README.md">🇺🇸 English</a> ·
|
||||
<a href="README.zh-CN.md">🇨🇳 简体中文</a> ·
|
||||
<a href="README.ja.md">🇯🇵 日本語</a> ·
|
||||
<a href="README.ko.md">🇰🇷 한국어</a> ·
|
||||
<a href="README.vi.md">🇻🇳 Tiếng Việt</a> ·
|
||||
<a href="README.tl.md">🇵🇭 Tagalog</a> ·
|
||||
<a href="README.es.md">🇪🇸 Español</a> ·
|
||||
<a href="README.pt.md">🇧🇷 Português</a> ·
|
||||
<a href="README.it.md">🇮🇹 Italiano</a> ·
|
||||
<a href="README.de.md">🇩🇪 Deutsch</a> ·
|
||||
<a href="README.fr.md">🇫🇷 Français</a> ·
|
||||
<a href="README.ar.md">🇸🇦 العربية</a> ·
|
||||
<a href="README.hi.md">🇮🇳 हिन्दी</a> ·
|
||||
<a href="README.ru.md">🇷🇺 Русский</a> ·
|
||||
<a href="README.bn.md">🇧🇩 বাংলা</a> ·
|
||||
<a href="README.he.md">🇮🇱 עברית</a> ·
|
||||
<a href="README.pl.md">🇵🇱 Polski</a> ·
|
||||
<a href="README.cs.md">🇨🇿 Čeština</a> ·
|
||||
<a href="README.nl.md">🇳🇱 Nederlands</a> ·
|
||||
<a href="README.tr.md">🇹🇷 Türkçe</a> ·
|
||||
<a href="README.uk.md">🇺🇦 Українська</a> ·
|
||||
<a href="README.id.md">🇮🇩 Bahasa Indonesia</a> ·
|
||||
<a href="README.th.md">🇹🇭 ไทย</a> ·
|
||||
<a href="README.ur.md">🇵🇰 اردو</a> ·
|
||||
<a href="README.ro.md">🇷🇴 Română</a> ·
|
||||
<a href="README.sv.md">🇸🇪 Svenska</a> ·
|
||||
<a href="README.el.md">🇬🇷 Ελληνικά</a> ·
|
||||
<a href="README.hu.md">🇭🇺 Magyar</a> ·
|
||||
<a href="README.fi.md">🇫🇮 Suomi</a> ·
|
||||
<a href="README.da.md">🇩🇰 Dansk</a> ·
|
||||
<a href="README.nb.md">🇳🇴 Norsk</a>
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
<!-- BEGIN:WHATS_NEW -->
|
||||
|
||||
### 🚀 What's New in v0.3.1 (March 2026)
|
||||
|
||||
| Area | Highlights |
|
||||
|---|---|
|
||||
| ci | add Termux (aarch64-linux-android) release target |
|
||||
|
||||
<!-- END:WHATS_NEW -->
|
||||
|
||||
## Vad är ZeroClaw?
|
||||
|
||||
ZeroClaw är en lättvikts, föränderlig och utökningsbar AI-assistent-infrastruktur byggd i Rust. Den ansluter olika LLM-leverantörer (Anthropic, OpenAI, Google, Ollama, etc.) via ett enhetligt gränssnitt och stöder flera kanaler (Telegram, Matrix, CLI, etc.).
|
||||
|
||||
### Huvudfunktioner
|
||||
|
||||
- **🦀 Skrivet i Rust**: Hög prestanda, minnessäkerhet och nollkostnadsabstraktioner
|
||||
- **🔌 Leverantörsagnostisk**: Stöder OpenAI, Anthropic, Google Gemini, Ollama och andra
|
||||
- **📱 Multi-kanal**: Telegram, Matrix (med E2EE), CLI och andra
|
||||
- **🧠 Pluggbart minne**: SQLite och Markdown-backends
|
||||
- **🛠️ Utökningsbara verktyg**: Lägg enkelt till anpassade verktyg
|
||||
- **🔒 Säkerhet först**: Omvänd proxy, integritetsförst-design
|
||||
|
||||
---
|
||||
|
||||
## Snabbstart
|
||||
|
||||
### Krav
|
||||
|
||||
- Rust 1.70+
|
||||
- En LLM-leverantörs API-nyckel (Anthropic, OpenAI, etc.)
|
||||
|
||||
### Installation
|
||||
|
||||
```bash
|
||||
# Klona repositoryt
|
||||
git clone https://github.com/zeroclaw-labs/zeroclaw.git
|
||||
cd zeroclaw
|
||||
|
||||
# Bygg
|
||||
cargo build --release
|
||||
|
||||
# Kör
|
||||
cargo run --release
|
||||
```
|
||||
|
||||
### Med Docker
|
||||
|
||||
```bash
|
||||
docker run -d \
|
||||
--name zeroclaw \
|
||||
-e ANTHROPIC_API_KEY=your_key \
|
||||
-v zeroclaw-data:/app/data \
|
||||
zeroclaw/zeroclaw:latest
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Konfiguration
|
||||
|
||||
ZeroClaw använder en YAML-konfigurationsfil. Som standard letar den efter `config.yaml`.
|
||||
|
||||
```yaml
|
||||
# Standardleverantör
|
||||
provider: anthropic
|
||||
|
||||
# Leverantörskonfiguration
|
||||
providers:
|
||||
anthropic:
|
||||
api_key: ${ANTHROPIC_API_KEY}
|
||||
model: claude-3-5-sonnet-20241022
|
||||
openai:
|
||||
api_key: ${OPENAI_API_KEY}
|
||||
model: gpt-4o
|
||||
|
||||
# Minneskonfiguration
|
||||
memory:
|
||||
backend: sqlite
|
||||
path: data/memory.db
|
||||
|
||||
# Kanalkonfiguration
|
||||
channels:
|
||||
telegram:
|
||||
token: ${TELEGRAM_BOT_TOKEN}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Dokumentation
|
||||
|
||||
För detaljerad dokumentation, se:
|
||||
|
||||
- [Dokumentationshubb](docs/README.md)
|
||||
- [Kommandoreferens](docs/commands-reference.md)
|
||||
- [Leverantörsreferens](docs/providers-reference.md)
|
||||
- [Kanalreferens](docs/channels-reference.md)
|
||||
- [Konfigurationsreferens](docs/config-reference.md)
|
||||
|
||||
---
|
||||
|
||||
## Bidrag
|
||||
|
||||
Bidrag är välkomna! Vänligen läs [Bidragsguiden](CONTRIBUTING.md).
|
||||
|
||||
---
|
||||
|
||||
## Licens
|
||||
|
||||
Detta projekt är dubbellicensierat:
|
||||
|
||||
- MIT License
|
||||
- Apache License, version 2.0
|
||||
|
||||
Se [LICENSE-APACHE](LICENSE-APACHE) och [LICENSE-MIT](LICENSE-MIT) för detaljer.
|
||||
|
||||
---
|
||||
|
||||
## Community
|
||||
|
||||
- [Telegram](https://t.me/zeroclawlabs)
|
||||
- [Facebook Group](https://www.facebook.com/groups/zeroclaw)
|
||||
- [WeChat Group](https://zeroclawlabs.cn/group.jpg)
|
||||
|
||||
---
|
||||
|
||||
## Sponsorer
|
||||
|
||||
Om ZeroClaw är användbart för dig, vänligen överväg att köpa en kaffe till oss:
|
||||
|
||||
[](https://buymeacoffee.com/argenistherose)
|
||||
|
||||
<!-- BEGIN:RECENT_CONTRIBUTORS -->
|
||||
|
||||
### 🌟 Recent Contributors (v0.3.1)
|
||||
|
||||
3 contributors shipped features, fixes, and improvements in this release cycle:
|
||||
|
||||
- **Argenis**
|
||||
- **argenis de la rosa**
|
||||
- **Claude Opus 4.6**
|
||||
|
||||
Thank you to everyone who opened issues, reviewed PRs, translated docs, and helped test. Every contribution matters. 🦀
|
||||
|
||||
<!-- END:RECENT_CONTRIBUTORS -->
|
||||
+203
@@ -0,0 +1,203 @@
|
||||
<p align="center">
|
||||
<img src="zeroclaw.png" alt="ZeroClaw" width="200" />
|
||||
</p>
|
||||
|
||||
<h1 align="center">ZeroClaw 🦀</h1>
|
||||
|
||||
<p align="center">
|
||||
<strong>โอเวอร์เฮดเป็นศูนย์ ไม่มีการประนีประนอม 100% Rust 100% Agnostic</strong><br>
|
||||
⚡️ <strong>ทำงานบนฮาร์ดแวร์ $10 ด้วย RAM <5MB: ใช้หน่วยความจำน้อยกว่า OpenClaw 99% และถูกกว่า Mac mini 98%!</strong>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="LICENSE-APACHE"><img src="https://img.shields.io/badge/license-MIT%20OR%20Apache%202.0-blue.svg" alt="License: MIT OR Apache-2.0" /></a>
|
||||
<a href="NOTICE"><img src="https://img.shields.io/badge/contributors-27+-green.svg" alt="Contributors" /></a>
|
||||
<a href="https://buymeacoffee.com/argenistherose"><img src="https://img.shields.io/badge/Buy%20Me%20a%20Coffee-Donate-yellow.svg?style=flat&logo=buy-me-a-coffee" alt="Buy Me a Coffee" /></a>
|
||||
<a href="https://x.com/zeroclawlabs?s=21"><img src="https://img.shields.io/badge/X-%40zeroclawlabs-000000?style=flat&logo=x&logoColor=white" alt="X: @zeroclawlabs" /></a>
|
||||
<a href="https://zeroclawlabs.cn/group.jpg"><img src="https://img.shields.io/badge/WeChat-Group-B7D7A8?logo=wechat&logoColor=white" alt="WeChat Group" /></a>
|
||||
<a href="https://www.xiaohongshu.com/user/profile/67cbfc43000000000d008307?xsec_token=AB73VnYnGNx5y36EtnnZfGmAmS-6Wzv8WMuGpfwfkg6Yc%3D&xsec_source=pc_search"><img src="https://img.shields.io/badge/Xiaohongshu-Official-FF2442?style=flat" alt="Xiaohongshu: Official" /></a>
|
||||
<a href="https://t.me/zeroclawlabs"><img src="https://img.shields.io/badge/Telegram-%40zeroclawlabs-26A5E4?style=flat&logo=telegram&logoColor=white" alt="Telegram: @zeroclawlabs" /></a>
|
||||
<a href="https://www.facebook.com/groups/zeroclaw"><img src="https://img.shields.io/badge/Facebook-Group-1877F2?style=flat&logo=facebook&logoColor=white" alt="Facebook Group" /></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
🌐 <strong>ภาษา:</strong>
|
||||
<a href="README.md">🇺🇸 English</a> ·
|
||||
<a href="README.zh-CN.md">🇨🇳 简体中文</a> ·
|
||||
<a href="README.ja.md">🇯🇵 日本語</a> ·
|
||||
<a href="README.ko.md">🇰🇷 한국어</a> ·
|
||||
<a href="README.vi.md">🇻🇳 Tiếng Việt</a> ·
|
||||
<a href="README.tl.md">🇵🇭 Tagalog</a> ·
|
||||
<a href="README.es.md">🇪🇸 Español</a> ·
|
||||
<a href="README.pt.md">🇧🇷 Português</a> ·
|
||||
<a href="README.it.md">🇮🇹 Italiano</a> ·
|
||||
<a href="README.de.md">🇩🇪 Deutsch</a> ·
|
||||
<a href="README.fr.md">🇫🇷 Français</a> ·
|
||||
<a href="README.ar.md">🇸🇦 العربية</a> ·
|
||||
<a href="README.hi.md">🇮🇳 हिन्दी</a> ·
|
||||
<a href="README.ru.md">🇷🇺 Русский</a> ·
|
||||
<a href="README.bn.md">🇧🇩 বাংলা</a> ·
|
||||
<a href="README.he.md">🇮🇱 עברית</a> ·
|
||||
<a href="README.pl.md">🇵🇱 Polski</a> ·
|
||||
<a href="README.cs.md">🇨🇿 Čeština</a> ·
|
||||
<a href="README.nl.md">🇳🇱 Nederlands</a> ·
|
||||
<a href="README.tr.md">🇹🇷 Türkçe</a> ·
|
||||
<a href="README.uk.md">🇺🇦 Українська</a> ·
|
||||
<a href="README.id.md">🇮🇩 Bahasa Indonesia</a> ·
|
||||
<a href="README.th.md">🇹🇭 ไทย</a> ·
|
||||
<a href="README.ur.md">🇵🇰 اردو</a> ·
|
||||
<a href="README.ro.md">🇷🇴 Română</a> ·
|
||||
<a href="README.sv.md">🇸🇪 Svenska</a> ·
|
||||
<a href="README.el.md">🇬🇷 Ελληνικά</a> ·
|
||||
<a href="README.hu.md">🇭🇺 Magyar</a> ·
|
||||
<a href="README.fi.md">🇫🇮 Suomi</a> ·
|
||||
<a href="README.da.md">🇩🇰 Dansk</a> ·
|
||||
<a href="README.nb.md">🇳🇴 Norsk</a>
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
<!-- BEGIN:WHATS_NEW -->
|
||||
|
||||
### 🚀 What's New in v0.3.1 (March 2026)
|
||||
|
||||
| Area | Highlights |
|
||||
|---|---|
|
||||
| ci | add Termux (aarch64-linux-android) release target |
|
||||
|
||||
<!-- END:WHATS_NEW -->
|
||||
|
||||
## ZeroClaw คืออะไร?
|
||||
|
||||
ZeroClaw เป็นโครงสร้างพื้นฐานผู้ช่วย AI ที่มีน้ำหนักเบา ปรับเปลี่ยนได้ และขยายได้ สร้างด้วย Rust มันเชื่อมต่อผู้ให้บริการ LLM ต่างๆ (Anthropic, OpenAI, Google, Ollama ฯลฯ) ผ่านอินเทอร์เฟซแบบรวมและรองรับหลายช่องทาง (Telegram, Matrix, CLI ฯลฯ)
|
||||
|
||||
### คุณสมบัติหลัก
|
||||
|
||||
- **🦀 เขียนด้วย Rust**: ประสิทธิภาพสูง ความปลอดภัยของหน่วยความจำ และ abstraction แบบไม่มีค่าใช้จ่าย
|
||||
- **🔌 Agnostic ต่อผู้ให้บริการ**: รองรับ OpenAI, Anthropic, Google Gemini, Ollama และอื่นๆ
|
||||
- **📱 หลายช่องทาง**: Telegram, Matrix (พร้อม E2EE), CLI และอื่นๆ
|
||||
- **🧠 หน่วยความจำแบบเสียบได้**: Backend แบบ SQLite และ Markdown
|
||||
- **🛠️ เครื่องมือที่ขยายได้**: เพิ่มเครื่องมือที่กำหนดเองได้ง่าย
|
||||
- **🔒 ความปลอดภัยเป็นอันดับหนึ่ง**: Reverse proxy, การออกแบบที่ให้ความสำคัญกับความเป็นส่วนตัว
|
||||
|
||||
---
|
||||
|
||||
## เริ่มต้นอย่างรวดเร็ว
|
||||
|
||||
### ข้อกำหนด
|
||||
|
||||
- Rust 1.70+
|
||||
- API key ของผู้ให้บริการ LLM (Anthropic, OpenAI ฯลฯ)
|
||||
|
||||
### การติดตั้ง
|
||||
|
||||
```bash
|
||||
# Clone repository
|
||||
git clone https://github.com/zeroclaw-labs/zeroclaw.git
|
||||
cd zeroclaw
|
||||
|
||||
# Build
|
||||
cargo build --release
|
||||
|
||||
# Run
|
||||
cargo run --release
|
||||
```
|
||||
|
||||
### ด้วย Docker
|
||||
|
||||
```bash
|
||||
docker run -d \
|
||||
--name zeroclaw \
|
||||
-e ANTHROPIC_API_KEY=your_key \
|
||||
-v zeroclaw-data:/app/data \
|
||||
zeroclaw/zeroclaw:latest
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## การกำหนดค่า
|
||||
|
||||
ZeroClaw ใช้ไฟล์กำหนดค่า YAML โดยค่าเริ่มต้นจะค้นหา `config.yaml`
|
||||
|
||||
```yaml
|
||||
# ผู้ให้บริการเริ่มต้น
|
||||
provider: anthropic
|
||||
|
||||
# การกำหนดค่าผู้ให้บริการ
|
||||
providers:
|
||||
anthropic:
|
||||
api_key: ${ANTHROPIC_API_KEY}
|
||||
model: claude-3-5-sonnet-20241022
|
||||
openai:
|
||||
api_key: ${OPENAI_API_KEY}
|
||||
model: gpt-4o
|
||||
|
||||
# การกำหนดค่าหน่วยความจำ
|
||||
memory:
|
||||
backend: sqlite
|
||||
path: data/memory.db
|
||||
|
||||
# การกำหนดค่าช่องทาง
|
||||
channels:
|
||||
telegram:
|
||||
token: ${TELEGRAM_BOT_TOKEN}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## เอกสาร
|
||||
|
||||
สำหรับเอกสารโดยละเอียด ดูที่:
|
||||
|
||||
- [ศูนย์เอกสาร](docs/README.md)
|
||||
- [ข้อมูลอ้างอิงคำสั่ง](docs/commands-reference.md)
|
||||
- [ข้อมูลอ้างอิงผู้ให้บริการ](docs/providers-reference.md)
|
||||
- [ข้อมูลอ้างอิงช่องทาง](docs/channels-reference.md)
|
||||
- [ข้อมูลอ้างอิงการกำหนดค่า](docs/config-reference.md)
|
||||
|
||||
---
|
||||
|
||||
## การมีส่วนร่วม
|
||||
|
||||
ยินดีต้อนรับการมีส่วนร่วม! โปรดอ่าน [คู่มือการมีส่วนร่วม](CONTRIBUTING.md)
|
||||
|
||||
---
|
||||
|
||||
## สัญญาอนุญาต
|
||||
|
||||
โปรเจกต์นี้มีสัญญาอนุญาตคู่:
|
||||
|
||||
- MIT License
|
||||
- Apache License, เวอร์ชัน 2.0
|
||||
|
||||
ดู [LICENSE-APACHE](LICENSE-APACHE) และ [LICENSE-MIT](LICENSE-MIT) สำหรับรายละเอียด
|
||||
|
||||
---
|
||||
|
||||
## ชุมชน
|
||||
|
||||
- [Telegram](https://t.me/zeroclawlabs)
|
||||
- [Facebook Group](https://www.facebook.com/groups/zeroclaw)
|
||||
- [WeChat Group](https://zeroclawlabs.cn/group.jpg)
|
||||
|
||||
---
|
||||
|
||||
## ผู้สนับสนุน
|
||||
|
||||
หาก ZeroClaw มีประโยชน์สำหรับคุณ โปรดพิจารณาซื้อกาแฟให้เรา:
|
||||
|
||||
[](https://buymeacoffee.com/argenistherose)
|
||||
|
||||
<!-- BEGIN:RECENT_CONTRIBUTORS -->
|
||||
|
||||
### 🌟 Recent Contributors (v0.3.1)
|
||||
|
||||
3 contributors shipped features, fixes, and improvements in this release cycle:
|
||||
|
||||
- **Argenis**
|
||||
- **argenis de la rosa**
|
||||
- **Claude Opus 4.6**
|
||||
|
||||
Thank you to everyone who opened issues, reviewed PRs, translated docs, and helped test. Every contribution matters. 🦀
|
||||
|
||||
<!-- END:RECENT_CONTRIBUTORS -->
|
||||
+501
@@ -0,0 +1,501 @@
|
||||
<p align="center">
|
||||
<img src="zeroclaw.png" alt="ZeroClaw" width="200" />
|
||||
</p>
|
||||
|
||||
<h1 align="center">ZeroClaw 🦀</h1>
|
||||
|
||||
<p align="center">
|
||||
<strong>Zero overhead. Zero compromise. 100% Rust. 100% Agnostic.</strong><br>
|
||||
⚡️ <strong>Tumatakbo sa $10 hardware na may <5MB RAM: Ito ay 99% mas kaunting memorya kaysa sa OpenClaw at 98% mas mura kaysa sa isang Mac mini!</strong>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="LICENSE-APACHE"><img src="https://img.shields.io/badge/license-MIT%20OR%20Apache%202.0-blue.svg" alt="License: MIT OR Apache-2.0" /></a>
|
||||
<a href="NOTICE"><img src="https://img.shields.io/badge/contributors-27+-green.svg" alt="Contributors" /></a>
|
||||
<a href="https://buymeacoffee.com/argenistherose"><img src="https://img.shields.io/badge/Buy%20Me%20a%20Coffee-Donate-yellow.svg?style=flat&logo=buy-me-a-coffee" alt="Buy Me a Coffee" /></a>
|
||||
<a href="https://x.com/zeroclawlabs?s=21"><img src="https://img.shields.io/badge/X-%40zeroclawlabs-000000?style=flat&logo=x&logoColor=white" alt="X: @zeroclawlabs" /></a>
|
||||
<a href="https://zeroclawlabs.cn/group.jpg"><img src="https://img.shields.io/badge/WeChat-Group-B7D7A8?logo=wechat&logoColor=white" alt="WeChat Group" /></a>
|
||||
<a href="https://www.xiaohongshu.com/user/profile/67cbfc43000000000d008307?xsec_token=AB73VnYnGNx5y36EtnnZfGmAmS-6Wzv8WMuGpfwfkg6Yc%3D&xsec_source=pc_search"><img src="https://img.shields.io/badge/Xiaohongshu-Official-FF2442?style=flat" alt="Xiaohongshu: Official" /></a>
|
||||
<a href="https://t.me/zeroclawlabs"><img src="https://img.shields.io/badge/Telegram-%40zeroclawlabs-26A5E4?style=flat&logo=telegram&logoColor=white" alt="Telegram: @zeroclawlabs" /></a>
|
||||
<a href="https://www.facebook.com/groups/zeroclaw"><img src="https://img.shields.io/badge/Facebook-Group-1877F2?style=flat&logo=facebook&logoColor=white" alt="Facebook Group" /></a>
|
||||
<a href="https://www.reddit.com/r/zeroclawlabs/"><img src="https://img.shields.io/badge/Reddit-r%2Fzeroclawlabs-FF4500?style=flat&logo=reddit&logoColor=white" alt="Reddit: r/zeroclawlabs" /></a>
|
||||
</p>
|
||||
<p align="center">
|
||||
Binuo ng mga mag-aaral at miyembro ng Harvard, MIT, at Sundai.Club na komunidad.
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
🌐 <strong>Mga Wika:</strong><a href="README.md">🇺🇸 English</a> ·
|
||||
<a href="README.zh-CN.md">🇨🇳 简体中文</a> ·
|
||||
<a href="README.ja.md">🇯🇵 日本語</a> ·
|
||||
<a href="README.ko.md">🇰🇷 한국어</a> ·
|
||||
<a href="README.vi.md">🇻🇳 Tiếng Việt</a> ·
|
||||
<a href="README.tl.md">🇵🇭 Tagalog</a> ·
|
||||
<a href="README.es.md">🇪🇸 Español</a> ·
|
||||
<a href="README.pt.md">🇧🇷 Português</a> ·
|
||||
<a href="README.it.md">🇮🇹 Italiano</a> ·
|
||||
<a href="README.de.md">🇩🇪 Deutsch</a> ·
|
||||
<a href="README.fr.md">🇫🇷 Français</a> ·
|
||||
<a href="README.ar.md">🇸🇦 العربية</a> ·
|
||||
<a href="README.hi.md">🇮🇳 हिन्दी</a> ·
|
||||
<a href="README.ru.md">🇷🇺 Русский</a> ·
|
||||
<a href="README.bn.md">🇧🇩 বাংলা</a> ·
|
||||
<a href="README.he.md">🇮🇱 עברית</a> ·
|
||||
<a href="README.pl.md">🇵🇱 Polski</a> ·
|
||||
<a href="README.cs.md">🇨🇿 Čeština</a> ·
|
||||
<a href="README.nl.md">🇳🇱 Nederlands</a> ·
|
||||
<a href="README.tr.md">🇹🇷 Türkçe</a> ·
|
||||
<a href="README.uk.md">🇺🇦 Українська</a> ·
|
||||
<a href="README.id.md">🇮🇩 Bahasa Indonesia</a> ·
|
||||
<a href="README.th.md">🇹🇭 ไทย</a> ·
|
||||
<a href="README.ur.md">🇵🇰 اردو</a> ·
|
||||
<a href="README.ro.md">🇷🇴 Română</a> ·
|
||||
<a href="README.sv.md">🇸🇪 Svenska</a> ·
|
||||
<a href="README.el.md">🇬🇷 Ελληνικά</a> ·
|
||||
<a href="README.hu.md">🇭🇺 Magyar</a> ·
|
||||
<a href="README.fi.md">🇫🇮 Suomi</a> ·
|
||||
<a href="README.da.md">🇩🇰 Dansk</a> ·
|
||||
<a href="README.nb.md">🇳🇴 Norsk</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="#mabilis-na-pagsisimula">Mabilis na Pagsisimula</a> |
|
||||
<a href="bootstrap.sh">One-Click na Setup</a> |
|
||||
<a href="docs/README.md">Hub ng Dokumentasyon</a> |
|
||||
<a href="docs/SUMMARY.md">Talaan ng Nilalaman</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<strong>Mga mabilis na access:</strong>
|
||||
<a href="docs/reference/README.md">Reference</a> ·
|
||||
<a href="docs/operations/README.md">Operations</a> ·
|
||||
<a href="docs/troubleshooting.md">Troubleshooting</a> ·
|
||||
<a href="docs/security/README.md">Security</a> ·
|
||||
<a href="docs/hardware/README.md">Hardware</a> ·
|
||||
<a href="docs/contributing/README.md">Mag-contribute</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<strong>Mabilis, magaan, at ganap na autonomous na AI assistant infrastructure</strong><br />
|
||||
I-deploy kahit saan. I-swap ang anumang bagay.
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
Ang ZeroClaw ay ang <strong>runtime operating system</strong> para sa agent workflows — isang infrastructure na nag-a-abstract ng mga modelo, tools, memory, at execution upang bumuo ng mga agent nang isang beses at patakbuhin ang mga ito kahit saan.
|
||||
</p>
|
||||
|
||||
<p align="center"><code>Trait-driven architecture · secure-by-default runtime · swappable provider/channel/tool · lahat ay pluggable</code></p>
|
||||
|
||||
<!-- BEGIN:WHATS_NEW -->
|
||||
|
||||
### 🚀 What's New in v0.3.1 (March 2026)
|
||||
|
||||
| Area | Highlights |
|
||||
|---|---|
|
||||
| ci | add Termux (aarch64-linux-android) release target |
|
||||
|
||||
<!-- END:WHATS_NEW -->
|
||||
|
||||
### 📢 Mga Anunsyo
|
||||
|
||||
Gamitin ang talahanayang ito para sa mahahalagang paunawa (compatibility changes, security notices, maintenance windows, at version blocks).
|
||||
|
||||
| Petsa (UTC) | Antas | Paunawa | Aksyon |
|
||||
| ---------- | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| 2026-02-19 | _Kritikal_ | **Hindi kami kaugnay** sa `openagen/zeroclaw` o `zeroclaw.org`. Ang domain na `zeroclaw.org` ay kasalukuyang tumuturo sa fork na `openagen/zeroclaw`, at ang domain/repository na ito ay nanggagaya sa aming opisyal na website/proyekto. | Huwag magtiwala sa impormasyon, binaries, fundraising, o mga anunsyo mula sa mga pinagmulang ito. Gamitin lamang [ang repository na ito](https://github.com/zeroclaw-labs/zeroclaw) at aming mga verified social media accounts. |
|
||||
| 2026-02-21 | _Mahalaga_ | Ang aming opisyal na website ay ngayon online: [zeroclawlabs.ai](https://zeroclawlabs.ai). Salamat sa iyong pasensya sa panahon ng paghihintay. Nakikita pa rin namin ang mga pagtatangka ng panliliko: huwag lumahok sa anumang investment/funding activity sa ngalan ng ZeroClaw kung hindi ito nai-publish sa pamamagitan ng aming mga opisyal na channel. | Gamitin [ang repository na ito](https://github.com/zeroclaw-labs/zeroclaw) bilang nag-iisang source of truth. Sundan [X (@zeroclawlabs)](https://x.com/zeroclawlabs?s=21), [Telegram (@zeroclawlabs)](https://t.me/zeroclawlabs), [Facebook (grupo)](https://www.facebook.com/groups/zeroclaw), [Reddit (r/zeroclawlabs)](https://www.reddit.com/r/zeroclawlabs/), at [Xiaohongshu](https://www.xiaohongshu.com/user/profile/67cbfc43000000000d008307?xsec_token=AB73VnYnGNx5y36EtnnZfGmAmS-6Wzv8WMuGpfwfkg6Yc%3D&xsec_source=pc_search) para sa mga opisyal na update. |
|
||||
| 2026-02-19 | _Mahalaga_ | In-update ng Anthropic ang authentication at credential use terms noong 2026-02-19. Ang OAuth authentication (Free, Pro, Max) ay eksklusibo para sa Claude Code at Claude.ai; ang paggamit ng Claude Free/Pro/Max OAuth tokens sa anumang iba pang produkto, tool, o serbisyo (kasama ang Agent SDK) ay hindi pinapayagan at maaaring lumabag sa Consumer Terms of Use. | Mangyaring pansamantalang iwasan ang Claude Code OAuth integrations upang maiwasan ang anumang potensyal na pagkawala. Orihinal na clause: [Authentication and Credential Use](https://code.claude.com/docs/en/legal-and-compliance#authentication-and-credential-use). |
|
||||
|
||||
### ✨ Mga Tampok
|
||||
|
||||
- 🏎️ **Lightweight Runtime by Default:** Ang mga karaniwang CLI workflows at status commands ay tumatakbo sa loob ng ilang megabytes ng memory footprint sa production builds.
|
||||
- 💰 **Cost-Effective Deployment:** Dinisenyo para sa low-cost boards at maliliit na cloud instances nang walang mga heavy runtime dependencies.
|
||||
- ⚡ **Fast Cold Starts:** Ang single-binary Rust runtime ay nagpapanatili ng command at daemon startup na halos instant para sa pang-araw-araw na operasyon.
|
||||
- 🌍 **Portable Architecture:** Isang single-binary workflow sa ARM, x86, at RISC-V na may swappable na provider/channel/tool.
|
||||
|
||||
### Bakit pinipili ng mga team ang ZeroClaw
|
||||
|
||||
- **Lightweight by default:** maliit na Rust binary, mabilis na startup, mababang memory footprint.
|
||||
- **Secure by design:** pairing, strict sandboxing, explicit allowlists, workspace scope.
|
||||
- **Fully swappable:** ang core systems ay traits (providers, channels, tools, memory, tunnels).
|
||||
- **No vendor lock-in:** OpenAI-compatible provider support + pluggable custom endpoints.
|
||||
|
||||
## Benchmark Snapshot (ZeroClaw vs OpenClaw, Reproducible)
|
||||
|
||||
Mabilis na benchmark sa lokal na machine (macOS arm64, Peb. 2026) na normalized para sa 0.8 GHz edge hardware.
|
||||
|
||||
| | OpenClaw | NanoBot | PicoClaw | ZeroClaw 🦀 |
|
||||
| ---------------------------- | ------------- | -------------- | --------------- | --------------------- |
|
||||
| **Wika** | TypeScript | Python | Go | **Rust** |
|
||||
| **RAM** | > 1 GB | > 100 MB | < 10 MB | **< 5 MB** |
|
||||
| **Startup (0.8 GHz core)** | > 500s | > 30s | < 1s | **< 10ms** |
|
||||
| **Binary Size** | ~28 MB (dist) | N/A (Scripts) | ~8 MB | **3.4 MB** |
|
||||
| **Gastos** | Mac Mini $599 | Linux SBC ~$50 | Linux board $10 | **Kahit anong hardware $10** |
|
||||
|
||||
> Mga Tala: Ang mga resulta ng ZeroClaw ay sinusukat sa production builds gamit ang `/usr/bin/time -l`. Ang OpenClaw ay nangangailangan ng Node.js runtime (typically ~390 MB additional memory overhead), habang ang NanoBot ay nangangailangan ng Python runtime. Ang PicoClaw at ZeroClaw ay static binaries. Ang mga RAM figure sa itaas ay runtime memory; ang build-time compilation requirements ay mas mataas.
|
||||
|
||||
<p align="center">
|
||||
<img src="zero-claw.jpeg" alt="ZeroClaw vs OpenClaw Comparison" width="800" />
|
||||
</p>
|
||||
|
||||
### Reproducible Local Measurement
|
||||
|
||||
Ang mga benchmark claim ay maaaring mag-drift habang ang code at toolchains ay nag-e-evolve, kaya palaging sukatin ang iyong current build locally:
|
||||
|
||||
```bash
|
||||
cargo build --release
|
||||
ls -lh target/release/zeroclaw
|
||||
|
||||
/usr/bin/time -l target/release/zeroclaw --help
|
||||
/usr/bin/time -l target/release/zeroclaw status
|
||||
```
|
||||
|
||||
Halimbawa ng sample (macOS arm64, nasukat noong Pebrero 18, 2026):
|
||||
|
||||
- Release binary size: `8.8M`
|
||||
- `zeroclaw --help`: real time na humigit-kumulang `0.02s`, peak memory footprint ~`3.9 MB`
|
||||
- `zeroclaw status`: real time na humigit-kumulang `0.01s`, peak memory footprint ~`4.1 MB`
|
||||
|
||||
## Mga Kinakailangan
|
||||
|
||||
<details>
|
||||
<summary><strong>Windows</strong></summary>
|
||||
|
||||
### Windows — Kinakailangan
|
||||
|
||||
1. **Visual Studio Build Tools** (nagbibigay ng MSVC linker at Windows SDK):
|
||||
|
||||
```powershell
|
||||
winget install Microsoft.VisualStudio.2022.BuildTools
|
||||
```
|
||||
|
||||
Sa panahon ng installation (o sa pamamagitan ng Visual Studio Installer), piliin ang **"Desktop development with C++"** workload.
|
||||
|
||||
2. **Rust Toolchain:**
|
||||
|
||||
```powershell
|
||||
winget install Rustlang.Rustup
|
||||
```
|
||||
|
||||
Pagkatapos ng installation, magbukas ng bagong terminal at patakbuhin ang `rustup default stable` upang matiyak na ang stable toolchain ay aktibo.
|
||||
|
||||
3. **I-verify** na ang pareho ay gumagana:
|
||||
```powershell
|
||||
rustc --version
|
||||
cargo --version
|
||||
```
|
||||
|
||||
### Windows — Opsyonal
|
||||
|
||||
- **Docker Desktop** — kinakailangan lamang kung gagamit ka ng [Docker sandboxed runtime](#current-runtime-support) (`runtime.kind = "docker"`). I-install sa pamamagitan ng `winget install Docker.DockerDesktop`.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>Linux / macOS</strong></summary>
|
||||
|
||||
### Linux / macOS — Kinakailangan
|
||||
|
||||
1. **Essential build tools:**
|
||||
- **Linux (Debian/Ubuntu):** `sudo apt install build-essential pkg-config`
|
||||
- **Linux (Fedora/RHEL):** `sudo dnf group install development-tools && sudo dnf install pkg-config`
|
||||
- **macOS:** I-install ang Xcode Command Line Tools: `xcode-select --install`
|
||||
|
||||
2. **Rust Toolchain:**
|
||||
|
||||
```bash
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||
```
|
||||
|
||||
Tingnan ang [rustup.rs](https://rustup.rs) para sa mga detalye.
|
||||
|
||||
3. **I-verify:**
|
||||
```bash
|
||||
rustc --version
|
||||
cargo --version
|
||||
```
|
||||
|
||||
### Linux / macOS — Opsyonal
|
||||
|
||||
- **Docker** — kinakailangan lamang kung gagamit ka ng [Docker sandboxed runtime](#current-runtime-support) (`runtime.kind = "docker"`).
|
||||
- **Linux (Debian/Ubuntu):** tingnan ang [docs.docker.com](https://docs.docker.com/engine/install/ubuntu/)
|
||||
- **Linux (Fedora/RHEL):** tingnan ang [docs.docker.com](https://docs.docker.com/engine/install/fedora/)
|
||||
- **macOS:** i-install ang Docker Desktop sa pamamagitan ng [docker.com/products/docker-desktop](https://www.docker.com/products/docker-desktop/)
|
||||
|
||||
</details>
|
||||
|
||||
## Mabilis na Pagsisimula
|
||||
|
||||
### Option 1: Automated setup (inirerekomenda)
|
||||
|
||||
Ang `bootstrap.sh` script ay nag-i-install ng Rust, nagi-clone ng ZeroClaw, nagi-compile, at nagse-set up ng iyong paunang development environment:
|
||||
|
||||
```bash
|
||||
curl -fsSL https://raw.githubusercontent.com/zeroclaw-labs/zeroclaw/master/bootstrap.sh | bash
|
||||
```
|
||||
|
||||
Ito ay:
|
||||
|
||||
1. Mag-i-install ng Rust (kung wala)
|
||||
2. Magi-clone ng ZeroClaw repository
|
||||
3. Magi-compile ng ZeroClaw sa release mode
|
||||
4. Mag-i-install ng `zeroclaw` sa `~/.cargo/bin/`
|
||||
5. Gagawa ng default workspace structure sa `~/.zeroclaw/workspace/`
|
||||
6. Gagawa ng paunang configuration file na `~/.zeroclaw/workspace/config.toml`
|
||||
|
||||
Pagkatapos ng bootstrap, i-reload ang iyong shell o patakbuhin ang `source ~/.cargo/env` para gamitin ang `zeroclaw` command globally.
|
||||
|
||||
### Option 2: Manual installation
|
||||
|
||||
<details>
|
||||
<summary><strong>I-click para makita ang mga manual installation steps</strong></summary>
|
||||
|
||||
```bash
|
||||
# 1. I-clone ang repository
|
||||
git clone https://github.com/zeroclaw-labs/zeroclaw.git
|
||||
cd zeroclaw
|
||||
|
||||
# 2. I-compile sa release
|
||||
cargo build --release --locked
|
||||
|
||||
# 3. I-install ang binary
|
||||
cargo install --path . --locked
|
||||
|
||||
# 4. I-initialize ang workspace
|
||||
zeroclaw init
|
||||
|
||||
# 5. I-verify ang installation
|
||||
zeroclaw --version
|
||||
zeroclaw status
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Pagkatapos ng Installation
|
||||
|
||||
Kapag na-install (sa pamamagitan ng bootstrap o manual), dapat mong makita:
|
||||
|
||||
```
|
||||
~/.zeroclaw/workspace/
|
||||
├── config.toml # Main configuration
|
||||
├── .pairing # Pairing secrets (generated on first launch)
|
||||
├── logs/ # Daemon/agent logs
|
||||
├── skills/ # Custom skills
|
||||
└── memory/ # Conversation context storage
|
||||
```
|
||||
|
||||
**Mga susunod na hakbang:**
|
||||
|
||||
1. I-configure ang iyong AI providers sa `~/.zeroclaw/workspace/config.toml`
|
||||
2. Tingnan ang [configuration reference](docs/config-reference.md) para sa advanced options
|
||||
3. Simulan ang agent: `zeroclaw agent start`
|
||||
4. I-test sa pamamagitan ng iyong preferred channel (tingnan ang [channels reference](docs/channels-reference.md))
|
||||
|
||||
## Configuration
|
||||
|
||||
I-edit ang `~/.zeroclaw/workspace/config.toml` para i-configure ang providers, channels, at system behavior.
|
||||
|
||||
### Quick Configuration Reference
|
||||
|
||||
```toml
|
||||
[providers.anthropic]
|
||||
api_key = "sk-ant-..."
|
||||
model = "claude-sonnet-4-20250514"
|
||||
|
||||
[providers.openai]
|
||||
api_key = "sk-..."
|
||||
model = "gpt-4o"
|
||||
|
||||
[channels.telegram]
|
||||
enabled = true
|
||||
bot_token = "123456:ABC-DEF..."
|
||||
|
||||
[channels.matrix]
|
||||
enabled = true
|
||||
homeserver_url = "https://matrix.org"
|
||||
username = "@bot:matrix.org"
|
||||
password = "..."
|
||||
|
||||
[memory]
|
||||
kind = "markdown" # o "sqlite" o "none"
|
||||
|
||||
[runtime]
|
||||
kind = "native" # o "docker" (nangangailangan ng Docker)
|
||||
```
|
||||
|
||||
**Mga kumpletong reference document:**
|
||||
|
||||
- [Configuration Reference](docs/config-reference.md) — lahat ng settings, validations, defaults
|
||||
- [Providers Reference](docs/providers-reference.md) — AI provider-specific configurations
|
||||
- [Channels Reference](docs/channels-reference.md) — Telegram, Matrix, Slack, Discord, at higit pa
|
||||
- [Operations](docs/operations-runbook.md) — production monitoring, secret rotation, scaling
|
||||
|
||||
### Current Runtime Support
|
||||
|
||||
Sinusuportahan ng ZeroClaw ang dalawang code execution backends:
|
||||
|
||||
- **`native`** (default) — direct process execution, pinakamabilis na path, ideal para sa trusted environments
|
||||
- **`docker`** — full container isolation, hardened security policies, nangangailangan ng Docker
|
||||
|
||||
Gamitin ang `runtime.kind = "docker"` kung kailangan mo ng strict sandboxing o network isolation. Tingnan ang [configuration reference](docs/config-reference.md#runtime) para sa buong detalye.
|
||||
|
||||
## Mga Command
|
||||
|
||||
```bash
|
||||
# Workspace management
|
||||
zeroclaw init # Nag-initialize ng bagong workspace
|
||||
zeroclaw status # Nagpapakita ng daemon/agent status
|
||||
zeroclaw config validate # Nag-verify ng config.toml syntax at values
|
||||
|
||||
# Daemon management
|
||||
zeroclaw daemon start # Nagse-start ng daemon sa background
|
||||
zeroclaw daemon stop # Naghihinto sa running daemon
|
||||
zeroclaw daemon restart # Nagre-restart ng daemon (config reload)
|
||||
zeroclaw daemon logs # Nagpapakita ng daemon logs
|
||||
|
||||
# Agent management
|
||||
zeroclaw agent start # Nagse-start ng agent (nangangailangan ng running daemon)
|
||||
zeroclaw agent stop # Naghihinto sa agent
|
||||
zeroclaw agent restart # Nagre-restart ng agent (config reload)
|
||||
|
||||
# Pairing operations
|
||||
zeroclaw pairing init # Nag-generate ng bagong pairing secret
|
||||
zeroclaw pairing rotate # Nag-rotate ng existing pairing secret
|
||||
|
||||
# Tunneling (para sa public exposure)
|
||||
zeroclaw tunnel start # Nagse-start ng tunnel sa local daemon
|
||||
zeroclaw tunnel stop # Naghihinto sa active tunnel
|
||||
|
||||
# Diagnostics
|
||||
zeroclaw doctor # Nagpapatakbo ng system health checks
|
||||
zeroclaw version # Nagpapakita ng version at build info
|
||||
```
|
||||
|
||||
Tingnan ang [Commands Reference](docs/commands-reference.md) para sa buong options at examples.
|
||||
|
||||
## Collaboration & Docs
|
||||
|
||||
Magsimula sa documentation hub para sa task-based map:
|
||||
|
||||
- Documentation Hub: [`docs/README.md`](docs/README.md)
|
||||
- Unified Docs TOC: [`docs/SUMMARY.md`](docs/SUMMARY.md)
|
||||
- Commands Reference: [`docs/commands-reference.md`](docs/commands-reference.md)
|
||||
- Configuration Reference: [`docs/config-reference.md`](docs/config-reference.md)
|
||||
- Providers Reference: [`docs/providers-reference.md`](docs/providers-reference.md)
|
||||
- Channels Reference: [`docs/channels-reference.md`](docs/channels-reference.md)
|
||||
- Operations Runbook: [`docs/operations-runbook.md`](docs/operations-runbook.md)
|
||||
- Troubleshooting: [`docs/troubleshooting.md`](docs/troubleshooting.md)
|
||||
- Docs Inventory/Classification: [`docs/docs-inventory.md`](docs/docs-inventory.md)
|
||||
- PR/Issue Triage Snapshot (as of Feb 18, 2026): [`docs/project-triage-snapshot-2026-02-18.md`](docs/project-triage-snapshot-2026-02-18.md)
|
||||
|
||||
Mga pangunahing collaboration references:
|
||||
|
||||
- Documentation Hub: [docs/README.md](docs/README.md)
|
||||
- Documentation Template: [docs/doc-template.md](docs/doc-template.md)
|
||||
- Documentation Change Checklist: [docs/README.md#4-documentation-change-checklist](docs/README.md#4-documentation-change-checklist)
|
||||
- Channel Configuration Reference: [docs/channels-reference.md](docs/channels-reference.md)
|
||||
- Matrix Encrypted Room Operations: [docs/matrix-e2ee-guide.md](docs/matrix-e2ee-guide.md)
|
||||
- Contributing Guide: [CONTRIBUTING.md](CONTRIBUTING.md)
|
||||
- PR Workflow Policy: [docs/pr-workflow.md](docs/pr-workflow.md)
|
||||
- Reviewer Playbook (triage + deep review): [docs/reviewer-playbook.md](docs/reviewer-playbook.md)
|
||||
- Ownership and CI Triage Map: [docs/ci-map.md](docs/ci-map.md)
|
||||
- Security Disclosure Policy: [SECURITY.md](SECURITY.md)
|
||||
|
||||
Para sa deployment at runtime operations:
|
||||
|
||||
- Network Deployment Guide: [docs/network-deployment.md](docs/network-deployment.md)
|
||||
- Proxy Agent Playbook: [docs/proxy-agent-playbook.md](docs/proxy-agent-playbook.md)
|
||||
|
||||
## Suportahan ang ZeroClaw
|
||||
|
||||
Kung tinutulungan ng ZeroClaw ang iyong trabaho at nais mong suportahan ang patuloy na development, maaari kang mag-donate dito:
|
||||
|
||||
<a href="https://buymeacoffee.com/argenistherose"><img src="https://img.shields.io/badge/Buy%20Me%20a%20Coffee-Donate-yellow.svg?style=for-the-badge&logo=buy-me-a-coffee" alt="Bilhan Mo Ako ng Kape" /></a>
|
||||
|
||||
### 🙏 Special Thanks
|
||||
|
||||
Isang taos-pusong pasasalamat sa mga komunidad at institusyon na nagbibigay-inspirasyon at nagpapakain sa open-source work na ito:
|
||||
|
||||
- **Harvard University** — para sa pagpapaunlad ng intelektwal na kuryosidad at pagtulak sa mga hangganan ng kung ano ang posible.
|
||||
- **MIT** — para sa pagtatanggol ng open knowledge, open source, at ang paniniwala na ang teknolohiya ay dapat na accessible sa lahat.
|
||||
- **Sundai Club** — para sa komunidad, enerhiya, at ang walang-humpay na kagustuhang bumuo ng mga bagay na mahalaga.
|
||||
- **Ang Mundo at Higit Pa** 🌍✨ — sa bawat contributor, dreamer, at builder doon sa labas na gumagawa ng open source bilang isang puwersa para sa kabutihan. Ito ay para sa iyo.
|
||||
|
||||
Kami ay bumubuo sa open source dahil ang mga pinakamahusay na ideya ay nagmumula sa lahat ng dako. Kung binabasa mo ito, ikaw ay bahagi nito. Maligayang pagdating. 🦀❤️
|
||||
|
||||
<!-- BEGIN:RECENT_CONTRIBUTORS -->
|
||||
|
||||
### 🌟 Recent Contributors (v0.3.1)
|
||||
|
||||
3 contributors shipped features, fixes, and improvements in this release cycle:
|
||||
|
||||
- **Argenis**
|
||||
- **argenis de la rosa**
|
||||
- **Claude Opus 4.6**
|
||||
|
||||
Thank you to everyone who opened issues, reviewed PRs, translated docs, and helped test. Every contribution matters. 🦀
|
||||
|
||||
<!-- END:RECENT_CONTRIBUTORS -->
|
||||
|
||||
## ⚠️ Official Repository at Impersonation Warning
|
||||
|
||||
**Ito ang tanging opisyal na ZeroClaw repository:**
|
||||
|
||||
> <https://github.com/zeroclaw-labs/zeroclaw>
|
||||
|
||||
Ang anumang iba pang repository, organization, domain, o package na nagpapanggap na "ZeroClaw" o nagpapahiwatig ng affiliation sa ZeroClaw Labs ay **hindi awtorisado at hindi kaugnay sa proyektong ito**. Ang mga kilalang unauthorized forks ay ililista sa [TRADEMARK.md](TRADEMARK.md).
|
||||
|
||||
Kung makakita ka ng impersonation o trademark misuse, mangyaring [magbukas ng isyu](https://github.com/zeroclaw-labs/zeroclaw/issues).
|
||||
|
||||
---
|
||||
|
||||
## License
|
||||
|
||||
Ang ZeroClaw ay dual-licensed para sa maximum openness at contributor protection:
|
||||
|
||||
| License | Use Cases |
|
||||
| ---------------------------- | ------------------------------------------------------------ |
|
||||
| [MIT](LICENSE-MIT) | Open-source, research, academic, personal use |
|
||||
| [Apache 2.0](LICENSE-APACHE) | Patent protection, institutional, commercial deployment |
|
||||
|
||||
Maaari mong piliin ang alinmang license. **Ang mga contributor ay awtomatikong nagbibigay ng rights sa ilalim ng pareho** — tingnan ang [CLA.md](CLA.md) para sa kumpletong contributor agreement.
|
||||
|
||||
### Trademark
|
||||
|
||||
Ang pangalang **ZeroClaw** at logo ay mga rehistradong trademark ng ZeroClaw Labs. Ang license na ito ay hindi nagbibigay ng pahintulot na gamitin ang mga ito upang ipahiwatig ang endorsement o affiliation. Tingnan ang [TRADEMARK.md](TRADEMARK.md) para sa mga allowed at prohibited uses.
|
||||
|
||||
### Contributor Protections
|
||||
|
||||
- **Mo namang pinapanatili** ang copyright ng iyong mga kontribusyon
|
||||
- **Patent grant** (Apache 2.0) ay nagpoprotekta sa iyo laban sa patent claims ng ibang mga contributor
|
||||
- Ang iyong mga kontribusyon ay **permanenteng naa-attributed** sa commit history at [NOTICE](NOTICE)
|
||||
- Walang trademark rights ang naililipat sa pamamagitan ng pagko-contribute
|
||||
|
||||
## Mag-contribute
|
||||
|
||||
Tingnan ang [CONTRIBUTING.md](CONTRIBUTING.md) at [CLA.md](CLA.md). Mag-implement ng isang trait, mag-submit ng PR:
|
||||
|
||||
- CI workflow guide: [docs/ci-map.md](docs/ci-map.md)
|
||||
- Bagong `Provider` → `src/providers/`
|
||||
- Bagong `Channel` → `src/channels/`
|
||||
- Bagong `Observer` → `src/observability/`
|
||||
- Bagong `Tool` → `src/tools/`
|
||||
- Bagong `Memory` → `src/memory/`
|
||||
- Bagong `Tunnel` → `src/tunnel/`
|
||||
- Bagong `Skill` → `~/.zeroclaw/workspace/skills/<n>/`
|
||||
|
||||
---
|
||||
|
||||
**ZeroClaw** — Zero overhead. Zero compromise. Deploy anywhere. Swap anything. 🦀
|
||||
|
||||
## Star History
|
||||
|
||||
<p align="center">
|
||||
<a href="https://www.star-history.com/#zeroclaw-labs/zeroclaw&type=date&legend=top-left">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=zeroclaw-labs/zeroclaw&type=date&theme=dark&legend=top-left" />
|
||||
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=zeroclaw-labs/zeroclaw&type=date&legend=top-left" />
|
||||
<img alt="Star History Graph" src="https://api.star-history.com/svg?repos=zeroclaw-labs/zeroclaw&type=date&legend=top-left" />
|
||||
</picture>
|
||||
</a>
|
||||
</p>
|
||||
+501
@@ -0,0 +1,501 @@
|
||||
<p align="center">
|
||||
<img src="zeroclaw.png" alt="ZeroClaw" width="200" />
|
||||
</p>
|
||||
|
||||
<h1 align="center">ZeroClaw 🦀</h1>
|
||||
|
||||
<p align="center">
|
||||
<strong>Sıfırı aşırı yok. Sıfır ödün ver yok. %100 Rust. %100 Agnostik.</strong><br>
|
||||
⚡️ <strong>$10 donanımla <5MB RAM ile çalışır: OpenClaw'dan %99 daha az bellek ve Mac mini'den %98 daha ucuz!</strong>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="LICENSE-APACHE"><img src="https://img.shields.io/badge/license-MIT%20OR%20Apache%202.0-blue.svg" alt="License: MIT OR Apache-2.0" /></a>
|
||||
<a href="NOTICE"><img src="https://img.shields.io/badge/contributors-27+-green.svg" alt="Contributors" /></a>
|
||||
<a href="https://buymeacoffee.com/argenistherose"><img src="https://img.shields.io/badge/Buy%20Me%20a%20Coffee-Donate-yellow.svg?style=flat&logo=buy-me-a-coffee" alt="Buy Me a Coffee" /></a>
|
||||
<a href="https://x.com/zeroclawlabs?s=21"><img src="https://img.shields.io/badge/X-%40zeroclawlabs-000000?style=flat&logo=x&logoColor=white" alt="X: @zeroclawlabs" /></a>
|
||||
<a href="https://zeroclawlabs.cn/group.jpg"><img src="https://img.shields.io/badge/WeChat-Group-B7D7A8?logo=wechat&logoColor=white" alt="WeChat Group" /></a>
|
||||
<a href="https://www.xiaohongshu.com/user/profile/67cbfc43000000000d008307?xsec_token=AB73VnYnGNx5y36EtnnZfGmAmS-6Wzv8WMuGpfwfkg6Yc%3D&xsec_source=pc_search"><img src="https://img.shields.io/badge/Xiaohongshu-Official-FF2442?style=flat" alt="Xiaohongshu: Official" /></a>
|
||||
<a href="https://t.me/zeroclawlabs"><img src="https://img.shields.io/badge/Telegram-%40zeroclawlabs-26A5E4?style=flat&logo=telegram&logoColor=white" alt="Telegram: @zeroclawlabs" /></a>
|
||||
<a href="https://www.facebook.com/groups/zeroclaw"><img src="https://img.shields.io/badge/Facebook-Group-1877F2?style=flat&logo=facebook&logoColor=white" alt="Facebook Group" /></a>
|
||||
<a href="https://www.reddit.com/r/zeroclawlabs/"><img src="https://img.shields.io/badge/Reddit-r%2Fzeroclawlabs-FF4500?style=flat&logo=reddit&logoColor=white" alt="Reddit: r/zeroclawlabs" /></a>
|
||||
</p>
|
||||
<p align="center">
|
||||
Harvard, MIT ve Sundai.Club topluluklarının öğrencileri ve üyeleri tarafından inşa edilmiştir.
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
🌐 <strong>Diller:</strong><a href="README.md">🇺🇸 English</a> ·
|
||||
<a href="README.zh-CN.md">🇨🇳 简体中文</a> ·
|
||||
<a href="README.ja.md">🇯🇵 日本語</a> ·
|
||||
<a href="README.ko.md">🇰🇷 한국어</a> ·
|
||||
<a href="README.vi.md">🇻🇳 Tiếng Việt</a> ·
|
||||
<a href="README.tl.md">🇵🇭 Tagalog</a> ·
|
||||
<a href="README.es.md">🇪🇸 Español</a> ·
|
||||
<a href="README.pt.md">🇧🇷 Português</a> ·
|
||||
<a href="README.it.md">🇮🇹 Italiano</a> ·
|
||||
<a href="README.de.md">🇩🇪 Deutsch</a> ·
|
||||
<a href="README.fr.md">🇫🇷 Français</a> ·
|
||||
<a href="README.ar.md">🇸🇦 العربية</a> ·
|
||||
<a href="README.hi.md">🇮🇳 हिन्दी</a> ·
|
||||
<a href="README.ru.md">🇷🇺 Русский</a> ·
|
||||
<a href="README.bn.md">🇧🇩 বাংলা</a> ·
|
||||
<a href="README.he.md">🇮🇱 עברית</a> ·
|
||||
<a href="README.pl.md">🇵🇱 Polski</a> ·
|
||||
<a href="README.cs.md">🇨🇿 Čeština</a> ·
|
||||
<a href="README.nl.md">🇳🇱 Nederlands</a> ·
|
||||
<a href="README.tr.md">🇹🇷 Türkçe</a> ·
|
||||
<a href="README.uk.md">🇺🇦 Українська</a> ·
|
||||
<a href="README.id.md">🇮🇩 Bahasa Indonesia</a> ·
|
||||
<a href="README.th.md">🇹🇭 ไทย</a> ·
|
||||
<a href="README.ur.md">🇵🇰 اردو</a> ·
|
||||
<a href="README.ro.md">🇷🇴 Română</a> ·
|
||||
<a href="README.sv.md">🇸🇪 Svenska</a> ·
|
||||
<a href="README.el.md">🇬🇷 Ελληνικά</a> ·
|
||||
<a href="README.hu.md">🇭🇺 Magyar</a> ·
|
||||
<a href="README.fi.md">🇫🇮 Suomi</a> ·
|
||||
<a href="README.da.md">🇩🇰 Dansk</a> ·
|
||||
<a href="README.nb.md">🇳🇴 Norsk</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="#hızlı-başlangıç">Hızlı Başlangıç</a> |
|
||||
<a href="bootstrap.sh">Tek Tıklama Kurulumu</a> |
|
||||
<a href="docs/README.md">Dokümantasyon Merkezi</a> |
|
||||
<a href="docs/SUMMARY.md">Dokümantasyon İçindekiler</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<strong>Hızlı erişim:</strong>
|
||||
<a href="docs/reference/README.md">Referans</a> ·
|
||||
<a href="docs/operations/README.md">Operasyonlar</a> ·
|
||||
<a href="docs/troubleshooting.md">Sorun Giderme</a> ·
|
||||
<a href="docs/security/README.md">Güvenlik</a> ·
|
||||
<a href="docs/hardware/README.md">Donanım</a> ·
|
||||
<a href="docs/contributing/README.md">Katkıda Bulunma</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<strong>Hızlı, hafif ve tamamen otonom AI asistan altyapısı</strong><br />
|
||||
Her yerde dağıtın. Her şeyi değiştirin.
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
ZeroClaw, ajan iş akışları için <strong>çalışma zamanı işletim sistemidir</strong> — modelleri, araçları, belleği ve yürütmeyi soyutlayan, ajanları bir kez oluşturup ve her yerde çalıştıran bir altyapıdır.
|
||||
</p>
|
||||
|
||||
<p align="center"><code>Trait tabanlı mimari · varsayılan olarak güvenli çalışma zamanı · değiştirilebilir sağlayıcı/kanal/araç · her şey eklenebilir</code></p>
|
||||
|
||||
<!-- BEGIN:WHATS_NEW -->
|
||||
|
||||
### 🚀 What's New in v0.3.1 (March 2026)
|
||||
|
||||
| Area | Highlights |
|
||||
|---|---|
|
||||
| ci | add Termux (aarch64-linux-android) release target |
|
||||
|
||||
<!-- END:WHATS_NEW -->
|
||||
|
||||
### 📢 Duyurular
|
||||
|
||||
Önemli duyurular için bu tabloyu kullanın (uyumluluk değişiklikleri, güvenlik bildirimleri, bakım pencereleri ve sürüm engellemeleri).
|
||||
|
||||
| Tarih (UTC) | Seviye | Duyuru | Eylem |
|
||||
| ---------- | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| 2026-02-19 | _Kritik_ | **`openagen/zeroclaw` veya `zeroclaw.org` ile bağlantılı değiliz.** `zeroclaw.org` alanı şu anda `openagen/zeroclaw` fork'una işaret ediyor ve bu alan/depo taklitçiliğini yapıyor. | Bu kaynaklardan bilgi, ikili dosyalar, bağış toplama veya duyurulara güvenmeyin. Sadece [bu depoyu](https://github.com/zeroclaw-labs/zeroclaw) ve doğrulanmış sosyal medya hesaplarımızı kullanın. |
|
||||
| 2026-02-21 | _Önemli_ | Resmi web sitemiz artık çevrimiçi: [zeroclawlabs.ai](https://zeroclawlabs.ai). Bekleme sürecinde sabırlarınız için teşekkürler. Hala taklit girişimleri tespit ediyoruz: ZeroClaw adına resmi kanallarımız aracılığıyla yayınlanmayan herhangi bir yatırım/bağış faaliyetine katılmayın. | [Bu depoyu](https://github.com/zeroclaw-labs/zeroclaw) tek doğruluk kaynağı olarak kullanın. Resmi güncellemeler için [X (@zeroclawlabs)](https://x.com/zeroclawlabs?s=21), [Telegram (@zeroclawlabs)](https://t.me/zeroclawlabs), [Facebook (grup)](https://www.facebook.com/groups/zeroclaw), [Reddit (r/zeroclawlabs)](https://www.reddit.com/r/zeroclawlabs/) ve [Xiaohongshu](https://www.xiaohongshu.com/user/profile/67cbfc43000000000d008307?xsec_token=AB73VnYnGNx5y36EtnnZfGmAmS-6Wzv8WMuGpfwfkg6Yc%3D&xsec_source=pc_search)'u takip edin. |
|
||||
| 2026-02-19 | _Önemli_ | Anthropic, 2026-02-19 tarihinde kimlik doğrulama ve kimlik bilgileri kullanım şartlarını güncelledi. OAuth kimlik doğrulaması (Free, Pro, Max) yalnızca Claude Code ve Claude.ai içindir; Claude Free/Pro/Max OAuth belirteçlerini başka herhangi bir ürün, araç veya hizmette (Agent SDK dahil) kullanmak yasaktır ve Tüketici Kullanım Şartlarını ihlal edebilir. | Olası kayıpları önlemek için lütfen geçici olarak Claude Code OAuth entegrasyonlarından kaçının. Orijinal madde: [Authentication and Credential Use](https://code.claude.com/docs/en/legal-and-compliance#authentication-and-credential-use). |
|
||||
|
||||
### ✨ Özellikler
|
||||
|
||||
- 🏎️ **Varsayılan Hafif Çalışma Zamanı:** Yaygın CLI iş akışları ve durum komutları üretim derlemelerinde birkaç megabaytlık bellek alanında çalışır.
|
||||
- 💰 **Maliyet Etkin Dağıtım:** Ağır çalışma zamanı bağımlılıkları olmadan düşük maliyetli kartlar ve küçük bulut örnekleri için tasarlanmıştır.
|
||||
- 💡 **Hızlı Soğuk Başlangıçlar:** Tek ikili Rust çalışma zamanı, komut ve arka plan programı başlatmalarını günlük operasyonlar için neredeyse anlık tutar.
|
||||
- 🌍 **Taşınabilir Mimari:** Değiştirilebilir sağlayıcı/kanal/araç ile ARM, x86 ve RISC-V üzerinde tek ikili iş akışı.
|
||||
|
||||
### Neden ekipler ZeroClaw'ı seçiyor
|
||||
|
||||
- **Varsayılan hafif:** küçük Rust ikilisi, hızlı başlangıç, düşük bellek ayak izi.
|
||||
- **Tasarıma göre güvenli:** eşleştirme, katı kum alanı, açık izin listeleri, çalışma alanı kapsamı.
|
||||
- **Tamamen değiştirilebilir:** çekirdek sistemler trait'tir (sağlayıcılar, kanallar, araçlar, bellek, tüneller).
|
||||
- **Satıcı kilitlenmesi yok:** OpenAI uyumlu sağlayıcı desteği + eklenebilir özel uç noktalar.
|
||||
|
||||
## Kıyaslama Anlık Görüntüsü (ZeroClaw vs OpenClaw, Tekrarlanabilir)
|
||||
|
||||
Yerel makinede hızlı kıyaslama (macOS arm64, Şub. 2026) 0.8 GHz uç donanımı için normalize edilmiş.
|
||||
|
||||
| | OpenClaw | NanoBot | PicoClaw | ZeroClaw 🦀 |
|
||||
| ---------------------------- | ------------- | -------------- | --------------- | --------------------- |
|
||||
| **Dil** | TypeScript | Python | Go | **Rust** |
|
||||
| **RAM** | > 1 GB | > 100 MB | < 10 MB | **< 5 MB** |
|
||||
| **Başlangıç (0.8 GHz çekirdek)** | > 500s | > 30s | < 1s | **< 10ms** |
|
||||
| **İkili Boyut** | ~28 MB (dist) | Yok (Betikler) | ~8 MB | **3.4 MB** |
|
||||
| **Maliyet** | Mac Mini $599 | Linux SBC ~$50 | Linux kart $10 | **Herhangi bir donanım $10** |
|
||||
|
||||
> Notlar: ZeroClaw sonuçları `/usr/bin/time -l` kullanılarak üretim derlemelerinde ölçülür. OpenClaw Node.js çalışma zamanı gerektirir (tipik olarak ~390 MB ek bellek yükü), NanoBot ise Python çalışma zamanı gerektirir. PicoClaw ve ZeroClaw statik ikililerdir. Yukarıdaki RAM rakamları çalışma zamanı belleğidir; derleme zamanı derleme gereksinimleri daha yüksektir.
|
||||
|
||||
<p align="center">
|
||||
<img src="zero-claw.jpeg" alt="ZeroClaw vs OpenClaw Karşılaştırması" width="800" />
|
||||
</p>
|
||||
|
||||
### Tekrarlanabilir Yerel Ölçüm
|
||||
|
||||
Kıyaslama iddiaları kod ve araç zincirleri geliştikçe değişebilir, bu yüzden her zaman mevcut derlemenizi yerel olarak ölçün:
|
||||
|
||||
```bash
|
||||
cargo build --release
|
||||
ls -lh target/release/zeroclaw
|
||||
|
||||
/usr/bin/time -l target/release/zeroclaw --help
|
||||
/usr/bin/time -l target/release/zeroclaw status
|
||||
```
|
||||
|
||||
Örnek numune (macOS arm64, 18 Şubat 2026'da ölçüldü):
|
||||
|
||||
- Sürüm ikili boyutu: `8.8M`
|
||||
- `zeroclaw --help`: gerçek süre yaklaşık `0.02s`, en büyük bellek ayak izi ~`3.9 MB`
|
||||
- `zeroclaw status`: gerçek süre yaklaşık `0.01s`, en büyük bellek ayak izi ~`4.1 MB`
|
||||
|
||||
## Ön Koşullar
|
||||
|
||||
<details>
|
||||
<summary><strong>Windows</strong></summary>
|
||||
|
||||
### Windows — Gerekli
|
||||
|
||||
1. **Visual Studio Build Tools** (MSVC bağlayıcısını ve Windows SDK'yı sağlar):
|
||||
|
||||
```powershell
|
||||
winget install Microsoft.VisualStudio.2022.BuildTools
|
||||
```
|
||||
|
||||
Kurulum sırasında (veya Visual Studio Installer aracılığıyla), **"C++ ile Masaüstü Geliştirme"** iş yükünü seçin.
|
||||
|
||||
2. **Rust Araç Zinciri:**
|
||||
|
||||
```powershell
|
||||
winget install Rustlang.Rustup
|
||||
```
|
||||
|
||||
Kurulumdan sonra, yeni bir terminal açın ve kararlı araç zincirinin aktif olduğundan emin olmak için `rustup default stable` çalıştırın.
|
||||
|
||||
3. **Doğrulayın** ikisinin de çalıştığını:
|
||||
```powershell
|
||||
rustc --version
|
||||
cargo --version
|
||||
```
|
||||
|
||||
### Windows — İsteğe Bağlı
|
||||
|
||||
- **Docker Desktop** — yalnızca [Docker kum alanlı çalışma zamanı](#mevcut-çalışma-zamanı-desteği) kullanıyorsanız gereklidir (`runtime.kind = "docker"`). `winget install Docker.DockerDesktop` aracılığıyla yükleyin.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>Linux / macOS</strong></summary>
|
||||
|
||||
### Linux / macOS — Gerekli
|
||||
|
||||
1. **Temel derleme araçları:**
|
||||
- **Linux (Debian/Ubuntu):** `sudo apt install build-essential pkg-config`
|
||||
- **Linux (Fedora/RHEL):** `sudo dnf group install development-tools && sudo dnf install pkg-config`
|
||||
- **macOS:** Xcode Command Line Tools'u yükleyin: `xcode-select --install`
|
||||
|
||||
2. **Rust Araç Zinciri:**
|
||||
|
||||
```bash
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||
```
|
||||
|
||||
Detaylar için [rustup.rs](https://rustup.rs) adresine bakın.
|
||||
|
||||
3. **Doğrulayın:**
|
||||
```bash
|
||||
rustc --version
|
||||
cargo --version
|
||||
```
|
||||
|
||||
### Linux / macOS — İsteğe Bağlı
|
||||
|
||||
- **Docker** — yalnızca [Docker kum alanlı çalışma zamanı](#mevcut-çalışma-zamanı-desteği) kullanıyorsanız gereklidir (`runtime.kind = "docker"`).
|
||||
- **Linux (Debian/Ubuntu):** [docs.docker.com](https://docs.docker.com/engine/install/ubuntu/) adresine bakın
|
||||
- **Linux (Fedora/RHEL):** [docs.docker.com](https://docs.docker.com/engine/install/fedora/) adresine bakın
|
||||
- **macOS:** [docker.com/products/docker-desktop](https://www.docker.com/products/docker-desktop/) adresinden Docker Desktop'u yükleyin
|
||||
|
||||
</details>
|
||||
|
||||
## Hızlı Başlangıç
|
||||
|
||||
### Seçenek 1: Otomatik kurulum (önerilen)
|
||||
|
||||
`bootstrap.sh` betiği Rust'u yükler, ZeroClaw'ı klonlar, derler ve ilk geliştirme ortamınızı ayarlar:
|
||||
|
||||
```bash
|
||||
curl -fsSL https://raw.githubusercontent.com/zeroclaw-labs/zeroclaw/master/bootstrap.sh | bash
|
||||
```
|
||||
|
||||
Bu işlem:
|
||||
|
||||
1. Rust'u yükler (yoksa)
|
||||
2. ZeroClaw deposunu klonlar
|
||||
3. ZeroClaw'ı sürüm modunda derler
|
||||
4. `zeroclaw`'ı `~/.cargo/bin/`e yükler
|
||||
5. `~/.zeroclaw/workspace/` içinde varsayılan çalışma alanı yapısını oluşturur
|
||||
6. Başlangıç `~/.zeroclaw/workspace/config.toml` yapılandırma dosyasını üretir
|
||||
|
||||
Önyüklemeden sonra, `zeroclaw` komutunu global olarak kullanmak için kabuğunuzu yeniden yükleyin veya `source ~/.cargo/env` çalıştırın.
|
||||
|
||||
### Seçenek 2: Manuel kurulum
|
||||
|
||||
<details>
|
||||
<summary><strong>Manuel kurulum adımlarını görmek için tıklayın</strong></summary>
|
||||
|
||||
```bash
|
||||
# 1. Depoyu klonla
|
||||
git clone https://github.com/zeroclaw-labs/zeroclaw.git
|
||||
cd zeroclaw
|
||||
|
||||
# 2. Sürüm olarak derle
|
||||
cargo build --release --locked
|
||||
|
||||
# 3. İkiliyi yükle
|
||||
cargo install --path . --locked
|
||||
|
||||
# 4. Çalışma alanını başlat
|
||||
zeroclaw init
|
||||
|
||||
# 5. Kurulumu doğrula
|
||||
zeroclaw --version
|
||||
zeroclaw status
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Kurulumdan Sonra
|
||||
|
||||
Kurulumdan sonra (önyükleme veya manuel olarak), şunları görmelisiniz:
|
||||
|
||||
```
|
||||
~/.zeroclaw/workspace/
|
||||
├── config.toml # Ana yapılandırma
|
||||
├── .pairing # Eşleştirme sırları (ilk başlangıçta oluşturulur)
|
||||
├── logs/ # Arka plan programı/ajan logları
|
||||
├── skills/ # Özel beceriler
|
||||
└── memory/ # Konuşma bağlamı depolaması
|
||||
```
|
||||
|
||||
**Sonraki adımlar:**
|
||||
|
||||
1. AI sağlayıcılarınızı `~/.zeroclaw/workspace/config.toml` içinde yapılandırın
|
||||
2. Gelişmiş seçenekler için [yapılandırma referansına](docs/config-reference.md) bakın
|
||||
3. Ajanı başlatın: `zeroclaw agent start`
|
||||
4. Tercih ettiğiniz kanal üzerinden test edin ([kanallar referansına](docs/channels-reference.md) bakın)
|
||||
|
||||
## Yapılandırma
|
||||
|
||||
Sağlayıcıları, kanalları ve sistem davranışını yapılandırmak için `~/.zeroclaw/workspace/config.toml` dosyasını düzenleyin.
|
||||
|
||||
### Hızlı Yapılandırma Referansı
|
||||
|
||||
```toml
|
||||
[providers.anthropic]
|
||||
api_key = "sk-ant-..."
|
||||
model = "claude-sonnet-4-20250514"
|
||||
|
||||
[providers.openai]
|
||||
api_key = "sk-..."
|
||||
model = "gpt-4o"
|
||||
|
||||
[channels.telegram]
|
||||
enabled = true
|
||||
bot_token = "123456:ABC-DEF..."
|
||||
|
||||
[channels.matrix]
|
||||
enabled = true
|
||||
homeserver_url = "https://matrix.org"
|
||||
username = "@bot:matrix.org"
|
||||
password = "..."
|
||||
|
||||
[memory]
|
||||
kind = "markdown" # veya "sqlite" veya "none"
|
||||
|
||||
[runtime]
|
||||
kind = "native" # veya "docker" (Docker gerektirir)
|
||||
```
|
||||
|
||||
**Tam referans belgeleri:**
|
||||
|
||||
- [Yapılandırma Referansı](docs/config-reference.md) — tüm ayarlar, doğrulamalar, varsayılanlar
|
||||
- [Sağlayıcı Referansı](docs/providers-reference.md) — AI sağlayıcıya özgü yapılandırmalar
|
||||
- [Kanallar Referansı](docs/channels-reference.md) — Telegram, Matrix, Slack, Discord ve daha fazlası
|
||||
- [Operasyonlar](docs/operations-runbook.md) — üretim izleme, sırları döndürme, ölçeklendirme
|
||||
|
||||
### Mevcut Çalışma Zamanı Desteği
|
||||
|
||||
ZeroClaw iki kod yürütme arka ucu destekler:
|
||||
|
||||
- **`native`** (varsayılan) — doğrudan süreç yürütme, en hızlı yol, güvenilir ortamlar için ideal
|
||||
- **`docker`** — tam konteyner yalıtımı. sertleştirilmiş güvenlik ilkeleri. Docker gerektirir
|
||||
|
||||
Katı kum alanı veya ağ yalıtımı gerekiyorsa `runtime.kind = "docker"` kullanın. Tam detaylar için [yapılandırma referansına](docs/config-reference.md#runtime) bakın.
|
||||
|
||||
## Komutlar
|
||||
|
||||
```bash
|
||||
# Çalışma alanı yönetimi
|
||||
zeroclaw init # Yeni bir çalışma alanı başlatır
|
||||
zeroclaw status # Arka plan programı/ajan durumunu gösterir
|
||||
zeroclaw config validate # config.toml sözdizimini ve değerlerini doğrular
|
||||
|
||||
# Arka plan programı yönetimi
|
||||
zeroclaw daemon start # Arka plan programını arka planda başlatır
|
||||
zeroclaw daemon stop # Çalışan arka plan programını durdurur
|
||||
zeroclaw daemon restart # Arka plan programını yeniden başlatır (yapılandırmayı yeniden yükler)
|
||||
zeroclaw daemon logs # Arka plan programı loglarını gösterir
|
||||
|
||||
# Ajan yönetimi
|
||||
zeroclaw agent start # Ajanı başlatır (çalışan arka plan programı gerektirir)
|
||||
zeroclaw agent stop # Ajanı durdurur
|
||||
zeroclaw agent restart # Ajanı yeniden başlatır (yapılandırmayı yeniden yükler)
|
||||
|
||||
# Eşleştirme operasyonları
|
||||
zeroclaw pairing init # Yeni bir eşleştirme sırrı oluşturur
|
||||
zeroclaw pairing rotate # Mevcut eşleştirme sırrını döndürür
|
||||
|
||||
# Tünelleme (herkese açık kullanım için)
|
||||
zeroclaw tunnel start # Yerel arka plan programına bir tünel başlatır
|
||||
zeroclaw tunnel stop # Aktif tüneli durdurur
|
||||
|
||||
# Teşhis
|
||||
zeroclaw doctor # Sistem sağlık kontrollerini çalıştırır
|
||||
zeroclaw version # Sürüm ve derleme bilgilerini gösterir
|
||||
```
|
||||
|
||||
Tam seçenekler ve örnekler için [Komutlar Referansına](docs/commands-reference.md) bakın.
|
||||
|
||||
## İşbirliği ve Belgeler
|
||||
|
||||
Görev tabanlı bir harita için belge merkeziyle başlayın:
|
||||
|
||||
- Belge Merkezi: [`docs/README.md`](docs/README.md)
|
||||
- Birleşik Docs İçindekiler: [`docs/SUMMARY.md`](docs/SUMMARY.md)
|
||||
- Komutlar Referansı: [`docs/commands-reference.md`](docs/commands-reference.md)
|
||||
- Yapılandırma Referansı: [`docs/config-reference.md`](docs/config-reference.md)
|
||||
- Sağlayıcı Referansı: [`docs/providers-reference.md`](docs/providers-reference.md)
|
||||
- Kanallar Referansı: [`docs/channels-reference.md`](docs/channels-reference.md)
|
||||
- Operasyonlar Runbook'u: [`docs/operations-runbook.md`](docs/operations-runbook.md)
|
||||
- Sorun Giderme: [`docs/troubleshooting.md`](docs/troubleshooting.md)
|
||||
- Docs Envanteri/Sınıflandırma: [`docs/docs-inventory.md`](docs/docs-inventory.md)
|
||||
- PR/Issue Triaj Anlık Görüntüsü (18 Şub. 2026 itibariyle): [`docs/project-triage-snapshot-2026-02-18.md`](docs/project-triage-snapshot-2026-02-18.md)
|
||||
|
||||
Ana işbirliği referansları:
|
||||
|
||||
- Belge Merkezi: [docs/README.md](docs/README.md)
|
||||
- Belge Şablonu: [docs/doc-template.md](docs/doc-template.md)
|
||||
- Belge Değişikliği Kontrol Listesi: [docs/README.md#4-documentation-change-checklist](docs/README.md#4-documentation-change-checklist)
|
||||
- Kanal Yapılandırma Referansı: [docs/channels-reference.md](docs/channels-reference.md)
|
||||
- Matrix Şifreli Oda Operasyonları: [docs/matrix-e2ee-guide.md](docs/matrix-e2ee-guide.md)
|
||||
- Katkı Kılavuzu: [CONTRIBUTING.md](CONTRIBUTING.md)
|
||||
- PR İş Akışı İlkesi: [docs/pr-workflow.md](docs/pr-workflow.md)
|
||||
- Gözden Geçiren Playbook'u (triaj + derinlemesine gözden geçirme): [docs/reviewer-playbook.md](docs/reviewer-playbook.md)
|
||||
- Sahiplik ve CI Triaj Haritası: [docs/ci-map.md](docs/ci-map.md)
|
||||
- Güvenlik Açıklama İlkesi: [SECURITY.md](SECURITY.md)
|
||||
|
||||
Dağıtım ve çalışma zamanı operasyonları için:
|
||||
|
||||
- Ağ Dağıtımı Kılavuzu: [docs/network-deployment.md](docs/network-deployment.md)
|
||||
- Proxy Agent Playbook'u: [docs/proxy-agent-playbook.md](docs/proxy-agent-playbook.md)
|
||||
|
||||
## ZeroClaw'ı Destekleyin
|
||||
|
||||
ZeroClaw işinize yardımcı oluyorsa ve sürekli geliştirmeyi desteklemek istiyorsanız, buradan bağış yapabilirsiniz:
|
||||
|
||||
<a href="https://buymeacoffee.com/argenistherose"><img src="https://img.shields.io/badge/Buy%20Me%20a%20Coffee-Donate-yellow.svg?style=for-the-badge&logo=buy-me-a-coffee" alt="Bana Bir Kahve Ismarla" /></a>
|
||||
|
||||
### 🙏 Özel Teşekkürler
|
||||
|
||||
Bu açık kaynak çalışmasını ilham veren ve besleyen topluluklara ve kurumlara içten teşekkürler:
|
||||
|
||||
- **Harvard Üniversitesi** — entelektüel merakı teşvik ettikleri ve mümkün olanın sınırlarını zorladıkları için.
|
||||
- **MIT** — açık bilgiyi, açık kaynağı ve teknolojinin herkes için erişilebilir olması gerektiği inancını savundukları için.
|
||||
- **Sundai Club** — topluluk, enerji ve önemli şeyler inşa etme konusundaki amansız irade için.
|
||||
- **Dünya ve Ötesi** 🌍✨ — açık kaynağı iyi bir güç haline getiren her katılımcı, hayalper ve inşa edene. Bu senin için.
|
||||
|
||||
En iyi fikirler her yerden geldiği için açık kaynakta inşa ediyoruz. Bunu okuyorsan, bunun bir parçasısın. Hoş geldin. 🦀❤️
|
||||
|
||||
<!-- BEGIN:RECENT_CONTRIBUTORS -->
|
||||
|
||||
### 🌟 Recent Contributors (v0.3.1)
|
||||
|
||||
3 contributors shipped features, fixes, and improvements in this release cycle:
|
||||
|
||||
- **Argenis**
|
||||
- **argenis de la rosa**
|
||||
- **Claude Opus 4.6**
|
||||
|
||||
Thank you to everyone who opened issues, reviewed PRs, translated docs, and helped test. Every contribution matters. 🦀
|
||||
|
||||
<!-- END:RECENT_CONTRIBUTORS -->
|
||||
|
||||
## ⚠️ Resmi Depo ve Taklit Uyarısı
|
||||
|
||||
**Bu tek resmi ZeroClaw deposudur:**
|
||||
|
||||
> <https://github.com/zeroclaw-labs/zeroclaw>
|
||||
|
||||
ZeroClaw olduğunu iddia eden veya ZeroClaw Labs ile bağlantıyı ima eden başka herhangi bir depo, organizasyon, etki alanı veya paket **yetkisizdir ve bu projeyle bağlantılı değildir**. Bilinen yetkisiz forklar [TRADEMARK.md](TRADEMARK.md)'da listelenecektir.
|
||||
|
||||
Taklit veya marka kötüye kullanımıyla karşılaşırsanız, lütfen [bir sorun açın](https://github.com/zeroclaw-labs/zeroclaw/issues).
|
||||
|
||||
---
|
||||
|
||||
## Lisans
|
||||
|
||||
ZeroClaw, maksimum açıklık ve katılımcı koruma için çift lisanslıdır:
|
||||
|
||||
| Lisans | Kullanım Durumları |
|
||||
| ---------------------------- | ------------------------------------------------------------ |
|
||||
| [MIT](LICENSE-MIT) | Açık kaynak, araştırma, akademik, kişisel kullanım |
|
||||
| [Apache 2.0](LICENSE-APACHE) | Patent koruması, kurumsal, ticari dağıtım |
|
||||
|
||||
Lisanslardan birini seçebilirsiniz. **Katılımcılar otomatik olarak her ikisi altında da hak verir** — tam katılımcı anlaşması için [CLA.md](CLA.md)'ye bakın.
|
||||
|
||||
### Marka
|
||||
|
||||
**ZeroClaw** adı ve logosu, ZeroClaw Labs'ın tescilli markalarıdır. Bu lisans, onay veya bağlantı ima etmek için kullanım izni vermez. İzin verilen ve yasaklanan kullanımlar için [TRADEMARK.md](TRADEMARK.md)'e bakın.
|
||||
|
||||
### Katılımcı Korumaları
|
||||
|
||||
- Katkılarınızın **telif hakkını sizde tutarsınız**
|
||||
- **Patent hibesi** (Apache 2.0) sizi diğer katılımcıların patent iddialarından korur
|
||||
- Katkılarınız commit geçmişinde ve [NOTICE](NOTICE)'da **kalıcı olarak atfedilir**
|
||||
- Katkıda bulunarak marka hakları devredilmez
|
||||
|
||||
## Katkıda Bulunma
|
||||
|
||||
[CONTRIBUTING.md](CONTRIBUTING.md) ve [CLA.md](CLA.md)'ye bakın. Bir trait uygulayın, bir PR gönderin:
|
||||
|
||||
- CI iş akışı kılavuzu: [docs/ci-map.md](docs/ci-map.md)
|
||||
- Yeni `Provider` → `src/providers/`
|
||||
- Yeni `Channel` → `src/channels/`
|
||||
- Yeni `Observer` → `src/observability/`
|
||||
- Yeni `Tool` → `src/tools/`
|
||||
- Yeni `Memory` → `src/memory/`
|
||||
- Yeni `Tunnel` → `src/tunnel/`
|
||||
- Yeni `Skill` → `~/.zeroclaw/workspace/skills/<n>/`
|
||||
|
||||
---
|
||||
|
||||
**ZeroClaw** — Sıfır yük. Sıfır ödün. Her yerde dağıtın. Her şeyi değiştirin. 🦀
|
||||
|
||||
## Yıldız Geçmişi
|
||||
|
||||
<p align="center">
|
||||
<a href="https://www.star-history.com/#zeroclaw-labs/zeroclaw&type=date&legend=top-left">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=zeroclaw-labs/zeroclaw&type=date&theme=dark&legend=top-left" />
|
||||
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=zeroclaw-labs/zeroclaw&type=date&legend=top-left" />
|
||||
<img alt="Yıldız Geçmişi Grafiği" src="https://api.star-history.com/svg?repos=zeroclaw-labs/zeroclaw&type=date&legend=top-left" />
|
||||
</picture>
|
||||
</a>
|
||||
</p>
|
||||
+203
@@ -0,0 +1,203 @@
|
||||
<p align="center">
|
||||
<img src="zeroclaw.png" alt="ZeroClaw" width="200" />
|
||||
</p>
|
||||
|
||||
<h1 align="center">ZeroClaw 🦀</h1>
|
||||
|
||||
<p align="center">
|
||||
<strong>Нуль накладних витрат. Нуль компромісів. 100% Rust. 100% Агностичний.</strong><br>
|
||||
⚡️ <strong>Працює на $10 обладнанні з <5MB RAM: Це на 99% менше пам'яті ніж OpenClaw і на 98% дешевше ніж Mac mini!</strong>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="LICENSE-APACHE"><img src="https://img.shields.io/badge/license-MIT%20OR%20Apache%202.0-blue.svg" alt="License: MIT OR Apache-2.0" /></a>
|
||||
<a href="NOTICE"><img src="https://img.shields.io/badge/contributors-27+-green.svg" alt="Contributors" /></a>
|
||||
<a href="https://buymeacoffee.com/argenistherose"><img src="https://img.shields.io/badge/Buy%20Me%20a%20Coffee-Donate-yellow.svg?style=flat&logo=buy-me-a-coffee" alt="Buy Me a Coffee" /></a>
|
||||
<a href="https://x.com/zeroclawlabs?s=21"><img src="https://img.shields.io/badge/X-%40zeroclawlabs-000000?style=flat&logo=x&logoColor=white" alt="X: @zeroclawlabs" /></a>
|
||||
<a href="https://zeroclawlabs.cn/group.jpg"><img src="https://img.shields.io/badge/WeChat-Group-B7D7A8?logo=wechat&logoColor=white" alt="WeChat Group" /></a>
|
||||
<a href="https://www.xiaohongshu.com/user/profile/67cbfc43000000000d008307?xsec_token=AB73VnYnGNx5y36EtnnZfGmAmS-6Wzv8WMuGpfwfkg6Yc%3D&xsec_source=pc_search"><img src="https://img.shields.io/badge/Xiaohongshu-Official-FF2442?style=flat" alt="Xiaohongshu: Official" /></a>
|
||||
<a href="https://t.me/zeroclawlabs"><img src="https://img.shields.io/badge/Telegram-%40zeroclawlabs-26A5E4?style=flat&logo=telegram&logoColor=white" alt="Telegram: @zeroclawlabs" /></a>
|
||||
<a href="https://www.facebook.com/groups/zeroclaw"><img src="https://img.shields.io/badge/Facebook-Group-1877F2?style=flat&logo=facebook&logoColor=white" alt="Facebook Group" /></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
🌐 <strong>Мови:</strong>
|
||||
<a href="README.md">🇺🇸 English</a> ·
|
||||
<a href="README.zh-CN.md">🇨🇳 简体中文</a> ·
|
||||
<a href="README.ja.md">🇯🇵 日本語</a> ·
|
||||
<a href="README.ko.md">🇰🇷 한국어</a> ·
|
||||
<a href="README.vi.md">🇻🇳 Tiếng Việt</a> ·
|
||||
<a href="README.tl.md">🇵🇭 Tagalog</a> ·
|
||||
<a href="README.es.md">🇪🇸 Español</a> ·
|
||||
<a href="README.pt.md">🇧🇷 Português</a> ·
|
||||
<a href="README.it.md">🇮🇹 Italiano</a> ·
|
||||
<a href="README.de.md">🇩🇪 Deutsch</a> ·
|
||||
<a href="README.fr.md">🇫🇷 Français</a> ·
|
||||
<a href="README.ar.md">🇸🇦 العربية</a> ·
|
||||
<a href="README.hi.md">🇮🇳 हिन्दी</a> ·
|
||||
<a href="README.ru.md">🇷🇺 Русский</a> ·
|
||||
<a href="README.bn.md">🇧🇩 বাংলা</a> ·
|
||||
<a href="README.he.md">🇮🇱 עברית</a> ·
|
||||
<a href="README.pl.md">🇵🇱 Polski</a> ·
|
||||
<a href="README.cs.md">🇨🇿 Čeština</a> ·
|
||||
<a href="README.nl.md">🇳🇱 Nederlands</a> ·
|
||||
<a href="README.tr.md">🇹🇷 Türkçe</a> ·
|
||||
<a href="README.uk.md">🇺🇦 Українська</a> ·
|
||||
<a href="README.id.md">🇮🇩 Bahasa Indonesia</a> ·
|
||||
<a href="README.th.md">🇹🇭 ไทย</a> ·
|
||||
<a href="README.ur.md">🇵🇰 اردو</a> ·
|
||||
<a href="README.ro.md">🇷🇴 Română</a> ·
|
||||
<a href="README.sv.md">🇸🇪 Svenska</a> ·
|
||||
<a href="README.el.md">🇬🇷 Ελληνικά</a> ·
|
||||
<a href="README.hu.md">🇭🇺 Magyar</a> ·
|
||||
<a href="README.fi.md">🇫🇮 Suomi</a> ·
|
||||
<a href="README.da.md">🇩🇰 Dansk</a> ·
|
||||
<a href="README.nb.md">🇳🇴 Norsk</a>
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
<!-- BEGIN:WHATS_NEW -->
|
||||
|
||||
### 🚀 What's New in v0.3.1 (March 2026)
|
||||
|
||||
| Area | Highlights |
|
||||
|---|---|
|
||||
| ci | add Termux (aarch64-linux-android) release target |
|
||||
|
||||
<!-- END:WHATS_NEW -->
|
||||
|
||||
## Що таке ZeroClaw?
|
||||
|
||||
ZeroClaw — це легка, змінювана та розширювана інфраструктура AI-асистента, написана на Rust. Вона з'єднує різних LLM-провайдерів (Anthropic, OpenAI, Google, Ollama тощо) через уніфікований інтерфейс і підтримує багато каналів (Telegram, Matrix, CLI тощо).
|
||||
|
||||
### Ключові особливості
|
||||
|
||||
- **🦀 Написано на Rust**: Висока продуктивність, безпека пам'яті та абстракції без накладних витрат
|
||||
- **🔌 Агностичний до провайдерів**: Підтримка OpenAI, Anthropic, Google Gemini, Ollama та інших
|
||||
- **📱 Багатоканальність**: Telegram, Matrix (з E2EE), CLI та інші
|
||||
- **🧠 Плагінна пам'ять**: SQLite та Markdown бекенди
|
||||
- **🛠️ Розширювані інструменти**: Легко додавайте власні інструменти
|
||||
- **🔒 Безпека першочергово**: Зворотний проксі, дизайн з пріоритетом конфіденційності
|
||||
|
||||
---
|
||||
|
||||
## Швидкий старт
|
||||
|
||||
### Вимоги
|
||||
|
||||
- Rust 1.70+
|
||||
- API-ключ LLM-провайдера (Anthropic, OpenAI тощо)
|
||||
|
||||
### Встановлення
|
||||
|
||||
```bash
|
||||
# Клонуйте репозиторій
|
||||
git clone https://github.com/zeroclaw-labs/zeroclaw.git
|
||||
cd zeroclaw
|
||||
|
||||
# Зберіть проект
|
||||
cargo build --release
|
||||
|
||||
# Запустіть
|
||||
cargo run --release
|
||||
```
|
||||
|
||||
### З Docker
|
||||
|
||||
```bash
|
||||
docker run -d \
|
||||
--name zeroclaw \
|
||||
-e ANTHROPIC_API_KEY=your_key \
|
||||
-v zeroclaw-data:/app/data \
|
||||
zeroclaw/zeroclaw:latest
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Конфігурація
|
||||
|
||||
ZeroClaw використовує YAML-файл конфігурації. За замовчуванням він шукає `config.yaml`.
|
||||
|
||||
```yaml
|
||||
# Провайдер за замовчуванням
|
||||
provider: anthropic
|
||||
|
||||
# Конфігурація провайдерів
|
||||
providers:
|
||||
anthropic:
|
||||
api_key: ${ANTHROPIC_API_KEY}
|
||||
model: claude-3-5-sonnet-20241022
|
||||
openai:
|
||||
api_key: ${OPENAI_API_KEY}
|
||||
model: gpt-4o
|
||||
|
||||
# Конфігурація пам'яті
|
||||
memory:
|
||||
backend: sqlite
|
||||
path: data/memory.db
|
||||
|
||||
# Конфігурація каналів
|
||||
channels:
|
||||
telegram:
|
||||
token: ${TELEGRAM_BOT_TOKEN}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Документація
|
||||
|
||||
Для детальної документації дивіться:
|
||||
|
||||
- [Хаб документації](docs/README.md)
|
||||
- [Довідник команд](docs/commands-reference.md)
|
||||
- [Довідник провайдерів](docs/providers-reference.md)
|
||||
- [Довідник каналів](docs/channels-reference.md)
|
||||
- [Довідник конфігурації](docs/config-reference.md)
|
||||
|
||||
---
|
||||
|
||||
## Внесок
|
||||
|
||||
Внески вітаються! Будь ласка, прочитайте [Керівництво з внеску](CONTRIBUTING.md).
|
||||
|
||||
---
|
||||
|
||||
## Ліцензія
|
||||
|
||||
Цей проєкт має подвійну ліцензію:
|
||||
|
||||
- MIT License
|
||||
- Apache License, версія 2.0
|
||||
|
||||
Дивіться [LICENSE-APACHE](LICENSE-APACHE) та [LICENSE-MIT](LICENSE-MIT) для деталей.
|
||||
|
||||
---
|
||||
|
||||
## Спільнота
|
||||
|
||||
- [Telegram](https://t.me/zeroclawlabs)
|
||||
- [Facebook Group](https://www.facebook.com/groups/zeroclaw)
|
||||
- [WeChat Group](https://zeroclawlabs.cn/group.jpg)
|
||||
|
||||
---
|
||||
|
||||
## Спонсори
|
||||
|
||||
Якщо ZeroClaw корисний для вас, будь ласка, розгляньте можливість купити нам каву:
|
||||
|
||||
[](https://buymeacoffee.com/argenistherose)
|
||||
|
||||
<!-- BEGIN:RECENT_CONTRIBUTORS -->
|
||||
|
||||
### 🌟 Recent Contributors (v0.3.1)
|
||||
|
||||
3 contributors shipped features, fixes, and improvements in this release cycle:
|
||||
|
||||
- **Argenis**
|
||||
- **argenis de la rosa**
|
||||
- **Claude Opus 4.6**
|
||||
|
||||
Thank you to everyone who opened issues, reviewed PRs, translated docs, and helped test. Every contribution matters. 🦀
|
||||
|
||||
<!-- END:RECENT_CONTRIBUTORS -->
|
||||
+221
@@ -0,0 +1,221 @@
|
||||
<p align="center">
|
||||
<img src="zeroclaw.png" alt="ZeroClaw" width="200" />
|
||||
</p>
|
||||
|
||||
<h1 align="center">ZeroClaw 🦀</h1>
|
||||
|
||||
<p align="center" dir="rtl">
|
||||
<strong>صفر اوور ہیڈ۔ صفر سمجھوتہ۔ 100% رسٹ۔ 100% اگنوسٹک۔</strong><br>
|
||||
⚡️ <strong>$10 کے ہارڈویئر پر <5MB RAM کے ساتھ چلتا ہے: یہ OpenClaw سے 99% کم میموری اور Mac mini سے 98% سستا ہے!</strong>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="LICENSE-APACHE"><img src="https://img.shields.io/badge/license-MIT%20OR%20Apache%202.0-blue.svg" alt="License: MIT OR Apache-2.0" /></a>
|
||||
<a href="NOTICE"><img src="https://img.shields.io/badge/contributors-27+-green.svg" alt="Contributors" /></a>
|
||||
<a href="https://buymeacoffee.com/argenistherose"><img src="https://img.shields.io/badge/Buy%20Me%20a%20Coffee-Donate-yellow.svg?style=flat&logo=buy-me-a-coffee" alt="Buy Me a Coffee" /></a>
|
||||
<a href="https://x.com/zeroclawlabs?s=21"><img src="https://img.shields.io/badge/X-%40zeroclawlabs-000000?style=flat&logo=x&logoColor=white" alt="X: @zeroclawlabs" /></a>
|
||||
<a href="https://zeroclawlabs.cn/group.jpg"><img src="https://img.shields.io/badge/WeChat-Group-B7D7A8?logo=wechat&logoColor=white" alt="WeChat Group" /></a>
|
||||
<a href="https://www.xiaohongshu.com/user/profile/67cbfc43000000000d008307?xsec_token=AB73VnYnGNx5y36EtnnZfGmAmS-6Wzv8WMuGpfwfkg6Yc%3D&xsec_source=pc_search"><img src="https://img.shields.io/badge/Xiaohongshu-Official-FF2442?style=flat" alt="Xiaohongshu: Official" /></a>
|
||||
<a href="https://t.me/zeroclawlabs"><img src="https://img.shields.io/badge/Telegram-%40zeroclawlabs-26A5E4?style=flat&logo=telegram&logoColor=white" alt="Telegram: @zeroclawlabs" /></a>
|
||||
<a href="https://www.facebook.com/groups/zeroclaw"><img src="https://img.shields.io/badge/Facebook-Group-1877F2?style=flat&logo=facebook&logoColor=white" alt="Facebook Group" /></a>
|
||||
</p>
|
||||
|
||||
<p align="center" dir="rtl">
|
||||
🌐 <strong>زبانیں:</strong>
|
||||
<a href="README.md">🇺🇸 English</a> ·
|
||||
<a href="README.zh-CN.md">🇨🇳 简体中文</a> ·
|
||||
<a href="README.ja.md">🇯🇵 日本語</a> ·
|
||||
<a href="README.ko.md">🇰🇷 한국어</a> ·
|
||||
<a href="README.vi.md">🇻🇳 Tiếng Việt</a> ·
|
||||
<a href="README.tl.md">🇵🇭 Tagalog</a> ·
|
||||
<a href="README.es.md">🇪🇸 Español</a> ·
|
||||
<a href="README.pt.md">🇧🇷 Português</a> ·
|
||||
<a href="README.it.md">🇮🇹 Italiano</a> ·
|
||||
<a href="README.de.md">🇩🇪 Deutsch</a> ·
|
||||
<a href="README.fr.md">🇫🇷 Français</a> ·
|
||||
<a href="README.ar.md">🇸🇦 العربية</a> ·
|
||||
<a href="README.hi.md">🇮🇳 हिन्दी</a> ·
|
||||
<a href="README.ru.md">🇷🇺 Русский</a> ·
|
||||
<a href="README.bn.md">🇧🇩 বাংলা</a> ·
|
||||
<a href="README.he.md">🇮🇱 עברית</a> ·
|
||||
<a href="README.pl.md">🇵🇱 Polski</a> ·
|
||||
<a href="README.cs.md">🇨🇿 Čeština</a> ·
|
||||
<a href="README.nl.md">🇳🇱 Nederlands</a> ·
|
||||
<a href="README.tr.md">🇹🇷 Türkçe</a> ·
|
||||
<a href="README.uk.md">🇺🇦 Українська</a> ·
|
||||
<a href="README.id.md">🇮🇩 Bahasa Indonesia</a> ·
|
||||
<a href="README.th.md">🇹🇭 ไทย</a> ·
|
||||
<a href="README.ur.md">🇵🇰 اردو</a> ·
|
||||
<a href="README.ro.md">🇷🇴 Română</a> ·
|
||||
<a href="README.sv.md">🇸🇪 Svenska</a> ·
|
||||
<a href="README.el.md">🇬🇷 Ελληνικά</a> ·
|
||||
<a href="README.hu.md">🇭🇺 Magyar</a> ·
|
||||
<a href="README.fi.md">🇫🇮 Suomi</a> ·
|
||||
<a href="README.da.md">🇩🇰 Dansk</a> ·
|
||||
<a href="README.nb.md">🇳🇴 Norsk</a>
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
<!-- BEGIN:WHATS_NEW -->
|
||||
|
||||
### 🚀 What's New in v0.3.1 (March 2026)
|
||||
|
||||
| Area | Highlights |
|
||||
|---|---|
|
||||
| ci | add Termux (aarch64-linux-android) release target |
|
||||
|
||||
<!-- END:WHATS_NEW -->
|
||||
|
||||
## ZeroClaw کیا ہے؟
|
||||
|
||||
<p align="center" dir="rtl">
|
||||
ZeroClaw ایک ہلکا، قابل تبدیلی اور توسیع پذیر AI اسسٹنٹ انفراسٹرکچر ہے جو رسٹ میں بنایا گیا ہے۔ یہ مختلف LLM فراہم کنندگان (Anthropic, OpenAI, Google, Ollama, وغیرہ) کو ایک متحد انٹرفیس کے ذریعے جوڑتا ہے اور متعدد چینلز (Telegram, Matrix, CLI, وغیرہ) کی حمایت کرتا ہے۔
|
||||
</p>
|
||||
|
||||
### اہم خصوصیات
|
||||
|
||||
<p align="center" dir="rtl">
|
||||
- **🦀 رسٹ میں لکھا گیا**: اعلیٰ کارکردگی، میموری سیورٹی، اور بغیر لاگت کے ایبسٹریکشن
|
||||
- **🔌 فراہم کنندہ-اگنوسٹک**: OpenAI, Anthropic, Google Gemini, Ollama, اور دیگر کی حمایت
|
||||
- **📱 ملٹی چینل**: Telegram, Matrix (E2EE کے ساتھ), CLI, اور دیگر
|
||||
- **🧠 پلگ ایبل میموری**: SQLite اور Markdown بیک اینڈ
|
||||
- **🛠️ قابل توسیع ٹولز**: آسانی سے کسٹم ٹولز شامل کریں
|
||||
- **🔒 سیورٹی فرسٹ**: ریورس پراکسی، پرائیویسی فرسٹ ڈیزائن
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
## فوری شروعات
|
||||
|
||||
### ضروریات
|
||||
|
||||
<p align="center" dir="rtl">
|
||||
- Rust 1.70+
|
||||
- ایک LLM فراہم کنندہ API کی (Anthropic, OpenAI, وغیرہ)
|
||||
</p>
|
||||
|
||||
### انسٹالیشن
|
||||
|
||||
```bash
|
||||
# ریپوزٹری کلون کریں
|
||||
git clone https://github.com/zeroclaw-labs/zeroclaw.git
|
||||
cd zeroclaw
|
||||
|
||||
# بلڈ کریں
|
||||
cargo build --release
|
||||
|
||||
# چلائیں
|
||||
cargo run --release
|
||||
```
|
||||
|
||||
### Docker کے ساتھ
|
||||
|
||||
```bash
|
||||
docker run -d \
|
||||
--name zeroclaw \
|
||||
-e ANTHROPIC_API_KEY=your_key \
|
||||
-v zeroclaw-data:/app/data \
|
||||
zeroclaw/zeroclaw:latest
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## کنفیگریشن
|
||||
|
||||
<p align="center" dir="rtl">
|
||||
ZeroClaw ایک YAML کنفیگریشن فائل استعمال کرتا ہے۔ ڈیفالٹ طور پر، یہ `config.yaml` تلاش کرتا ہے۔
|
||||
</p>
|
||||
|
||||
```yaml
|
||||
# ڈیفالٹ فراہم کنندہ
|
||||
provider: anthropic
|
||||
|
||||
# فراہم کنندگان کی کنفیگریشن
|
||||
providers:
|
||||
anthropic:
|
||||
api_key: ${ANTHROPIC_API_KEY}
|
||||
model: claude-3-5-sonnet-20241022
|
||||
openai:
|
||||
api_key: ${OPENAI_API_KEY}
|
||||
model: gpt-4o
|
||||
|
||||
# میموری کنفیگریشن
|
||||
memory:
|
||||
backend: sqlite
|
||||
path: data/memory.db
|
||||
|
||||
# چینلز کی کنفیگریشن
|
||||
channels:
|
||||
telegram:
|
||||
token: ${TELEGRAM_BOT_TOKEN}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## دستاویزات
|
||||
|
||||
<p align="center" dir="rtl">
|
||||
تفصیلی دستاویزات کے لیے، دیکھیں:
|
||||
</p>
|
||||
|
||||
- [دستاویزات ہب](docs/README.md)
|
||||
- [کمانڈز ریفرنس](docs/commands-reference.md)
|
||||
- [فراہم کنندگان ریفرنس](docs/providers-reference.md)
|
||||
- [چینلز ریفرنس](docs/channels-reference.md)
|
||||
- [کنفیگریشن ریفرنس](docs/config-reference.md)
|
||||
|
||||
---
|
||||
|
||||
## شراکت
|
||||
|
||||
<p align="center" dir="rtl">
|
||||
شراکت کا خیرمقدم ہے! براہ کرم [شراکت گائیڈ](CONTRIBUTING.md) پڑھیں۔
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
## لائسنس
|
||||
|
||||
<p align="center" dir="rtl">
|
||||
یہ پروجیکٹ ڈول لائسنس یافتہ ہے:
|
||||
</p>
|
||||
|
||||
- MIT License
|
||||
- Apache License, ورژن 2.0
|
||||
|
||||
<p align="center" dir="rtl">
|
||||
تفصیلات کے لیے [LICENSE-APACHE](LICENSE-APACHE) اور [LICENSE-MIT](LICENSE-MIT) دیکھیں۔
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
## کمیونٹی
|
||||
|
||||
- [Telegram](https://t.me/zeroclawlabs)
|
||||
- [Facebook Group](https://www.facebook.com/groups/zeroclaw)
|
||||
- [WeChat Group](https://zeroclawlabs.cn/group.jpg)
|
||||
|
||||
---
|
||||
|
||||
## سپانسرز
|
||||
|
||||
<p align="center" dir="rtl">
|
||||
اگر ZeroClaw آپ کے لیے مفید ہے، تو براہ کرم ہمیں کافی خریدنے پر غور کریں:
|
||||
</p>
|
||||
|
||||
[](https://buymeacoffee.com/argenistherose)
|
||||
|
||||
<!-- BEGIN:RECENT_CONTRIBUTORS -->
|
||||
|
||||
### 🌟 Recent Contributors (v0.3.1)
|
||||
|
||||
3 contributors shipped features, fixes, and improvements in this release cycle:
|
||||
|
||||
- **Argenis**
|
||||
- **argenis de la rosa**
|
||||
- **Claude Opus 4.6**
|
||||
|
||||
Thank you to everyone who opened issues, reviewed PRs, translated docs, and helped test. Every contribution matters. 🦀
|
||||
|
||||
<!-- END:RECENT_CONTRIBUTORS -->
|
||||
+94
-612
@@ -1,5 +1,5 @@
|
||||
<p align="center">
|
||||
<img src="zeroclaw.png" alt="ZeroClaw" width="200" />
|
||||
<img src="docs/assets/zeroclaw.png" alt="ZeroClaw" width="200" />
|
||||
</p>
|
||||
|
||||
<h1 align="center">ZeroClaw 🦀</h1>
|
||||
@@ -14,9 +14,6 @@
|
||||
<a href="NOTICE"><img src="https://img.shields.io/badge/contributors-27+-green.svg" alt="Contributors" /></a>
|
||||
<a href="https://buymeacoffee.com/argenistherose"><img src="https://img.shields.io/badge/Buy%20Me%20a%20Coffee-Donate-yellow.svg?style=flat&logo=buy-me-a-coffee" alt="Buy Me a Coffee" /></a>
|
||||
<a href="https://x.com/zeroclawlabs?s=21"><img src="https://img.shields.io/badge/X-%40zeroclawlabs-000000?style=flat&logo=x&logoColor=white" alt="X: @zeroclawlabs" /></a>
|
||||
<a href="https://zeroclawlabs.cn/group.jpg"><img src="https://img.shields.io/badge/WeChat-Group-B7D7A8?logo=wechat&logoColor=white" alt="WeChat Group" /></a>
|
||||
<a href="https://www.xiaohongshu.com/user/profile/67cbfc43000000000d008307?xsec_token=AB73VnYnGNx5y36EtnnZfGmAmS-6Wzv8WMuGpfwfkg6Yc%3D&xsec_source=pc_search"><img src="https://img.shields.io/badge/Xiaohongshu-Official-FF2442?style=flat" alt="Xiaohongshu: Official" /></a>
|
||||
<a href="https://t.me/zeroclawlabs"><img src="https://img.shields.io/badge/Telegram-%40zeroclawlabs-26A5E4?style=flat&logo=telegram&logoColor=white" alt="Telegram: @zeroclawlabs" /></a>
|
||||
<a href="https://www.facebook.com/groups/zeroclaw"><img src="https://img.shields.io/badge/Facebook-Group-1877F2?style=flat&logo=facebook&logoColor=white" alt="Facebook Group" /></a>
|
||||
<a href="https://www.reddit.com/r/zeroclawlabs/"><img src="https://img.shields.io/badge/Reddit-r%2Fzeroclawlabs-FF4500?style=flat&logo=reddit&logoColor=white" alt="Reddit: r/zeroclawlabs" /></a>
|
||||
</p>
|
||||
@@ -25,12 +22,43 @@
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
🌐 <strong>Ngôn ngữ:</strong> <a href="README.md">English</a> · <a href="README.zh-CN.md">简体中文</a> · <a href="README.ja.md">日本語</a> · <a href="README.ru.md">Русский</a> · <a href="README.fr.md">Français</a> · <a href="README.vi.md">Tiếng Việt</a>
|
||||
🌐 <strong>Ngôn ngữ:</strong>
|
||||
<a href="README.md">🇺🇸 English</a> ·
|
||||
<a href="README.zh-CN.md">🇨🇳 简体中文</a> ·
|
||||
<a href="README.ja.md">🇯🇵 日本語</a> ·
|
||||
<a href="README.ko.md">🇰🇷 한국어</a> ·
|
||||
<a href="README.vi.md">🇻🇳 Tiếng Việt</a> ·
|
||||
<a href="README.tl.md">🇵🇭 Tagalog</a> ·
|
||||
<a href="README.es.md">🇪🇸 Español</a> ·
|
||||
<a href="README.pt.md">🇧🇷 Português</a> ·
|
||||
<a href="README.it.md">🇮🇹 Italiano</a> ·
|
||||
<a href="README.de.md">🇩🇪 Deutsch</a> ·
|
||||
<a href="README.fr.md">🇫🇷 Français</a> ·
|
||||
<a href="README.ar.md">🇸🇦 العربية</a> ·
|
||||
<a href="README.hi.md">🇮🇳 हिन्दी</a> ·
|
||||
<a href="README.ru.md">🇷🇺 Русский</a> ·
|
||||
<a href="README.bn.md">🇧🇩 বাংলা</a> ·
|
||||
<a href="README.he.md">🇮🇱 עברית</a> ·
|
||||
<a href="README.pl.md">🇵🇱 Polski</a> ·
|
||||
<a href="README.cs.md">🇨🇿 Čeština</a> ·
|
||||
<a href="README.nl.md">🇳🇱 Nederlands</a> ·
|
||||
<a href="README.tr.md">🇹🇷 Türkçe</a> ·
|
||||
<a href="README.uk.md">🇺🇦 Українська</a> ·
|
||||
<a href="README.id.md">🇮🇩 Bahasa Indonesia</a> ·
|
||||
<a href="README.th.md">🇹🇭 ไทย</a> ·
|
||||
<a href="README.ur.md">🇵🇰 اردو</a> ·
|
||||
<a href="README.ro.md">🇷🇴 Română</a> ·
|
||||
<a href="README.sv.md">🇸🇪 Svenska</a> ·
|
||||
<a href="README.el.md">🇬🇷 Ελληνικά</a> ·
|
||||
<a href="README.hu.md">🇭🇺 Magyar</a> ·
|
||||
<a href="README.fi.md">🇫🇮 Suomi</a> ·
|
||||
<a href="README.da.md">🇩🇰 Dansk</a> ·
|
||||
<a href="README.nb.md">🇳🇴 Norsk</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="#quick-start">Bắt đầu</a> |
|
||||
<a href="bootstrap.sh">Cài đặt một lần bấm</a> |
|
||||
<a href="https://raw.githubusercontent.com/zeroclaw-labs/zeroclaw/master/install.sh">Cài đặt một lần bấm</a> |
|
||||
<a href="docs/i18n/vi/README.md">Trung tâm tài liệu</a> |
|
||||
<a href="docs/SUMMARY.md">Mục lục tài liệu</a>
|
||||
</p>
|
||||
@@ -38,7 +66,7 @@
|
||||
<p align="center">
|
||||
<strong>Truy cập nhanh:</strong>
|
||||
<a href="docs/reference/README.md">Tài liệu tham khảo</a> ·
|
||||
<a href="docs/operations/README.md">Vận hành</a> ·
|
||||
<a href="docs/ops/README.md">Vận hành</a> ·
|
||||
<a href="docs/i18n/vi/troubleshooting.md">Khắc phục sự cố</a> ·
|
||||
<a href="docs/security/README.md">Bảo mật</a> ·
|
||||
<a href="docs/hardware/README.md">Phần cứng</a> ·
|
||||
@@ -56,6 +84,16 @@
|
||||
|
||||
<p align="center"><code>Kiến trúc trait-driven · mặc định bảo mật · provider/channel/tool hoán đổi tự do · mọi thứ đều dễ mở rộng</code></p>
|
||||
|
||||
<!-- BEGIN:WHATS_NEW -->
|
||||
|
||||
### 🚀 What's New in v0.3.1 (March 2026)
|
||||
|
||||
| Area | Highlights |
|
||||
|---|---|
|
||||
| ci | add Termux (aarch64-linux-android) release target |
|
||||
|
||||
<!-- END:WHATS_NEW -->
|
||||
|
||||
### 📢 Thông báo
|
||||
|
||||
Bảng này dành cho các thông báo quan trọng (thay đổi không tương thích, cảnh báo bảo mật, lịch bảo trì, vấn đề chặn release).
|
||||
@@ -63,7 +101,7 @@ Bảng này dành cho các thông báo quan trọng (thay đổi không tương
|
||||
| Ngày (UTC) | Mức độ | Thông báo | Hành động |
|
||||
|---|---|---|---|
|
||||
| 2026-02-19 | _Nghiêm trọng_ | Chúng tôi **không có liên kết** với `openagen/zeroclaw` hoặc `zeroclaw.org`. Tên miền `zeroclaw.org` hiện đang trỏ đến fork `openagen/zeroclaw`, và tên miền/repository đó đang mạo danh website/dự án chính thức của chúng tôi. | Không tin tưởng thông tin, binary, gây quỹ, hay thông báo từ các nguồn đó. Chỉ sử dụng [repository này](https://github.com/zeroclaw-labs/zeroclaw) và các tài khoản mạng xã hội đã được xác minh của chúng tôi. |
|
||||
| 2026-02-21 | _Quan trọng_ | Website chính thức của chúng tôi đã ra mắt: [zeroclawlabs.ai](https://zeroclawlabs.ai). Cảm ơn mọi người đã kiên nhẫn chờ đợi. Chúng tôi vẫn đang ghi nhận các nỗ lực mạo danh, vì vậy **không** tham gia bất kỳ hoạt động đầu tư hoặc gây quỹ nào nhân danh ZeroClaw nếu thông tin đó không được công bố qua các kênh chính thức của chúng tôi. | Sử dụng [repository này](https://github.com/zeroclaw-labs/zeroclaw) làm nguồn thông tin duy nhất đáng tin cậy. Theo dõi [X (@zeroclawlabs)](https://x.com/zeroclawlabs?s=21), [Telegram (@zeroclawlabs)](https://t.me/zeroclawlabs), [Facebook (nhóm)](https://www.facebook.com/groups/zeroclaw), [Reddit (r/zeroclawlabs)](https://www.reddit.com/r/zeroclawlabs/), và [Xiaohongshu](https://www.xiaohongshu.com/user/profile/67cbfc43000000000d008307?xsec_token=AB73VnYnGNx5y36EtnnZfGmAmS-6Wzv8WMuGpfwfkg6Yc%3D&xsec_source=pc_search) để nhận cập nhật chính thức. |
|
||||
| 2026-02-21 | _Quan trọng_ | Website chính thức của chúng tôi đã ra mắt: [zeroclawlabs.ai](https://zeroclawlabs.ai). Cảm ơn mọi người đã kiên nhẫn chờ đợi. Chúng tôi vẫn đang ghi nhận các nỗ lực mạo danh, vì vậy **không** tham gia bất kỳ hoạt động đầu tư hoặc gây quỹ nào nhân danh ZeroClaw nếu thông tin đó không được công bố qua các kênh chính thức của chúng tôi. | Sử dụng [repository này](https://github.com/zeroclaw-labs/zeroclaw) làm nguồn thông tin duy nhất đáng tin cậy. Theo dõi [X (@zeroclawlabs)](https://x.com/zeroclawlabs?s=21), [Facebook (nhóm)](https://www.facebook.com/groups/zeroclaw), và [Reddit (r/zeroclawlabs)](https://www.reddit.com/r/zeroclawlabs/) để nhận cập nhật chính thức. |
|
||||
| 2026-02-19 | _Quan trọng_ | Anthropic đã cập nhật điều khoản Xác thực và Sử dụng Thông tin xác thực vào ngày 2026-02-19. Xác thực OAuth (Free, Pro, Max) được dành riêng cho Claude Code và Claude.ai; việc sử dụng OAuth token từ Claude Free/Pro/Max trong bất kỳ sản phẩm, công cụ hay dịch vụ nào khác (bao gồm Agent SDK) đều không được phép và có thể vi phạm Điều khoản Dịch vụ cho Người tiêu dùng. | Vui lòng tạm thời tránh tích hợp Claude Code OAuth để ngăn ngừa khả năng mất mát. Điều khoản gốc: [Authentication and Credential Use](https://code.claude.com/docs/en/legal-and-compliance#authentication-and-credential-use). |
|
||||
|
||||
### ✨ Tính năng
|
||||
@@ -95,7 +133,7 @@ Bảng này dành cho các thông báo quan trọng (thay đổi không tương
|
||||
> Ghi chú: Kết quả ZeroClaw được đo trên release build sử dụng `/usr/bin/time -l`. OpenClaw yêu cầu runtime Node.js (thường thêm ~390MB bộ nhớ overhead), còn NanoBot yêu cầu runtime Python. PicoClaw và ZeroClaw là các static binary. Số RAM ở trên là bộ nhớ runtime; yêu cầu biên dịch lúc build-time sẽ cao hơn.
|
||||
|
||||
<p align="center">
|
||||
<img src="zero-claw.jpeg" alt="ZeroClaw vs OpenClaw Comparison" width="800" />
|
||||
<img src="docs/assets/zeroclaw-comparison.jpeg" alt="ZeroClaw vs OpenClaw Comparison" width="800" />
|
||||
</p>
|
||||
|
||||
### Tự đo trên máy bạn
|
||||
@@ -174,7 +212,7 @@ Ví dụ mẫu (macOS arm64, đo ngày 18 tháng 2 năm 2026):
|
||||
Hoặc bỏ qua các bước trên, cài hết mọi thứ (system deps, Rust, ZeroClaw) chỉ bằng một lệnh:
|
||||
|
||||
```bash
|
||||
curl -LsSf https://raw.githubusercontent.com/zeroclaw-labs/zeroclaw/main/scripts/install.sh | bash
|
||||
curl -LsSf https://raw.githubusercontent.com/zeroclaw-labs/zeroclaw/master/install.sh | bash
|
||||
```
|
||||
|
||||
#### Yêu cầu tài nguyên biên dịch
|
||||
@@ -189,13 +227,13 @@ Việc build từ source đòi hỏi nhiều tài nguyên hơn so với chạy b
|
||||
Nếu cấu hình máy thấp hơn mức tối thiểu, dùng binary có sẵn:
|
||||
|
||||
```bash
|
||||
./bootstrap.sh --prefer-prebuilt
|
||||
./install.sh --prefer-prebuilt
|
||||
```
|
||||
|
||||
Chỉ cài từ binary, không quay lại build từ source:
|
||||
|
||||
```bash
|
||||
./bootstrap.sh --prebuilt-only
|
||||
./install.sh --prebuilt-only
|
||||
```
|
||||
|
||||
### Tùy chọn (Linux/macOS)
|
||||
@@ -220,37 +258,37 @@ brew install zeroclaw
|
||||
# Khuyến nghị: clone rồi chạy script bootstrap cục bộ
|
||||
git clone https://github.com/zeroclaw-labs/zeroclaw.git
|
||||
cd zeroclaw
|
||||
./bootstrap.sh
|
||||
./install.sh
|
||||
|
||||
# Tùy chọn: cài đặt system dependencies + Rust trên máy mới
|
||||
./bootstrap.sh --install-system-deps --install-rust
|
||||
./install.sh --install-system-deps --install-rust
|
||||
|
||||
# Tùy chọn: ưu tiên binary dựng sẵn (khuyến nghị cho máy ít RAM/ít dung lượng đĩa)
|
||||
./bootstrap.sh --prefer-prebuilt
|
||||
./install.sh --prefer-prebuilt
|
||||
|
||||
# Tùy chọn: cài đặt chỉ từ binary (không fallback sang build source)
|
||||
./bootstrap.sh --prebuilt-only
|
||||
./install.sh --prebuilt-only
|
||||
|
||||
# Tùy chọn: chạy onboarding trong cùng luồng
|
||||
./bootstrap.sh --onboard --api-key "sk-..." --provider openrouter [--model "openrouter/auto"]
|
||||
./install.sh --api-key "sk-..." --provider openrouter [--model "openrouter/auto"]
|
||||
|
||||
# Tùy chọn: chạy bootstrap + onboarding hoàn toàn ở chế độ tương thích với Docker
|
||||
./bootstrap.sh --docker
|
||||
./install.sh --docker
|
||||
|
||||
# Tùy chọn: ép dùng Podman làm container CLI
|
||||
ZEROCLAW_CONTAINER_CLI=podman ./bootstrap.sh --docker
|
||||
ZEROCLAW_CONTAINER_CLI=podman ./install.sh --docker
|
||||
|
||||
# Tùy chọn: ở chế độ --docker, bỏ qua build image local và dùng tag local hoặc pull image fallback
|
||||
./bootstrap.sh --docker --skip-build
|
||||
./install.sh --docker --skip-build
|
||||
```
|
||||
|
||||
Cài từ xa bằng một lệnh (nên xem trước nếu môi trường nhạy cảm về bảo mật):
|
||||
|
||||
```bash
|
||||
curl -fsSL https://raw.githubusercontent.com/zeroclaw-labs/zeroclaw/main/scripts/bootstrap.sh | bash
|
||||
curl -fsSL https://raw.githubusercontent.com/zeroclaw-labs/zeroclaw/master/install.sh | bash
|
||||
```
|
||||
|
||||
Chi tiết: [`docs/one-click-bootstrap.md`](docs/one-click-bootstrap.md) (chế độ toolchain có thể yêu cầu `sudo` cho các gói hệ thống).
|
||||
Chi tiết: [`docs/setup-guides/one-click-bootstrap.md`](docs/setup-guides/one-click-bootstrap.md) (chế độ toolchain có thể yêu cầu `sudo` cho các gói hệ thống).
|
||||
|
||||
### Binary có sẵn
|
||||
|
||||
@@ -283,8 +321,8 @@ export PATH="$HOME/.cargo/bin:$PATH"
|
||||
# Cài nhanh (không cần tương tác, có thể chỉ định model)
|
||||
zeroclaw onboard --api-key sk-... --provider openrouter [--model "openrouter/auto"]
|
||||
|
||||
# Hoặc dùng trình hướng dẫn tương tác
|
||||
zeroclaw onboard --interactive
|
||||
# Hoặc dùng trình hướng dẫn
|
||||
zeroclaw onboard
|
||||
|
||||
# Hoặc chỉ sửa nhanh channel/allowlist
|
||||
zeroclaw onboard --channels-only
|
||||
@@ -378,576 +416,6 @@ zeroclaw agent --provider openai-codex --auth-profile openai-codex:work -m "hell
|
||||
zeroclaw agent --provider anthropic -m "hello"
|
||||
```
|
||||
|
||||
## Kiến trúc
|
||||
|
||||
Mọi hệ thống con đều là **trait** — chỉ cần đổi cấu hình, không cần sửa code.
|
||||
|
||||
<p align="center">
|
||||
<img src="docs/architecture.svg" alt="ZeroClaw Architecture" width="900" />
|
||||
</p>
|
||||
|
||||
| Hệ thống con | Trait | Đi kèm sẵn | Mở rộng |
|
||||
|-----------|-------|------------|--------|
|
||||
| **Mô hình AI** | `Provider` | Danh mục provider qua `zeroclaw providers` (hiện có 28 built-in + alias, cộng endpoint tùy chỉnh) | `custom:https://your-api.com` (tương thích OpenAI) hoặc `anthropic-custom:https://your-api.com` |
|
||||
| **Channel** | `Channel` | CLI, Telegram, Discord, Slack, Mattermost, iMessage, Matrix, Signal, WhatsApp, Linq, Email, IRC, Lark, DingTalk, QQ, Webhook | Bất kỳ messaging API nào |
|
||||
| **Memory** | `Memory` | SQLite hybrid search, PostgreSQL backend (storage provider có thể cấu hình), Lucid bridge, Markdown files, backend `none` tường minh, snapshot/hydrate, response cache tùy chọn | Bất kỳ persistence backend nào |
|
||||
| **Tool** | `Tool` | shell/file/memory, cron/schedule, git, pushover, browser, http_request, screenshot/image_info, composio (opt-in), delegate, hardware tools | Bất kỳ khả năng nào |
|
||||
| **Observability** | `Observer` | Noop, Log, Multi | Prometheus, OTel |
|
||||
| **Runtime** | `RuntimeAdapter` | Native, Docker (sandboxed) | Có thể thêm runtime bổ sung qua adapter; các kind không được hỗ trợ sẽ fail nhanh |
|
||||
| **Bảo mật** | `SecurityPolicy` | Ghép cặp gateway, sandbox, allowlist, giới hạn tốc độ, phân vùng filesystem, secret mã hóa | — |
|
||||
| **Định danh** | `IdentityConfig` | OpenClaw (markdown), AIEOS v1.1 (JSON) | Bất kỳ định dạng định danh nào |
|
||||
| **Tunnel** | `Tunnel` | None, Cloudflare, Tailscale, ngrok, Custom | Bất kỳ tunnel binary nào |
|
||||
| **Heartbeat** | Engine | Tác vụ định kỳ HEARTBEAT.md | — |
|
||||
| **Skill** | Loader | TOML manifest + hướng dẫn SKILL.md | Community skill pack |
|
||||
| **Tích hợp** | Registry | 70+ tích hợp trong 9 danh mục | Plugin system |
|
||||
|
||||
### Hỗ trợ runtime (hiện tại)
|
||||
|
||||
- ✅ Được hỗ trợ hiện nay: `runtime.kind = "native"` hoặc `runtime.kind = "docker"`
|
||||
- 🚧 Đã lên kế hoạch, chưa triển khai: WASM / edge runtime
|
||||
|
||||
Khi cấu hình `runtime.kind` không được hỗ trợ, ZeroClaw sẽ thoát với thông báo lỗi rõ ràng thay vì âm thầm fallback về native.
|
||||
|
||||
### Hệ thống Memory (Search Engine toàn diện)
|
||||
|
||||
Tự phát triển hoàn toàn, không phụ thuộc bên ngoài — không Pinecone, không Elasticsearch, không LangChain:
|
||||
|
||||
| Lớp | Triển khai |
|
||||
|-------|---------------|
|
||||
| **Vector DB** | Embeddings lưu dưới dạng BLOB trong SQLite, tìm kiếm cosine similarity |
|
||||
| **Keyword Search** | Bảng ảo FTS5 với BM25 scoring |
|
||||
| **Hybrid Merge** | Hàm merge có trọng số tùy chỉnh (`vector.rs`) |
|
||||
| **Embeddings** | Trait `EmbeddingProvider` — OpenAI, URL tùy chỉnh, hoặc noop |
|
||||
| **Chunking** | Bộ chia đoạn markdown theo dòng, giữ nguyên heading |
|
||||
| **Caching** | Bảng SQLite `embedding_cache` với LRU eviction |
|
||||
| **Safe Reindex** | Rebuild FTS5 + re-embed các vector bị thiếu theo cách nguyên tử |
|
||||
|
||||
Agent tự động ghi nhớ, lưu trữ và quản lý memory qua các tool.
|
||||
|
||||
```toml
|
||||
[memory]
|
||||
backend = "sqlite" # "sqlite", "lucid", "postgres", "markdown", "none"
|
||||
auto_save = true
|
||||
embedding_provider = "none" # "none", "openai", "custom:https://..."
|
||||
vector_weight = 0.7
|
||||
keyword_weight = 0.3
|
||||
|
||||
# backend = "none" sử dụng no-op memory backend tường minh (không có persistence)
|
||||
|
||||
# Tùy chọn: ghi đè storage-provider cho remote memory backend.
|
||||
# Khi provider = "postgres", ZeroClaw dùng PostgreSQL để lưu memory.
|
||||
# Khóa db_url cũng chấp nhận alias `dbURL` để tương thích ngược.
|
||||
#
|
||||
# [storage.provider.config]
|
||||
# provider = "postgres"
|
||||
# db_url = "postgres://user:password@host:5432/zeroclaw"
|
||||
# schema = "public"
|
||||
# table = "memories"
|
||||
# connect_timeout_secs = 15
|
||||
|
||||
# Tùy chọn cho backend = "sqlite": số giây tối đa chờ khi mở DB (ví dụ: file bị khóa). Bỏ qua hoặc để trống để không có timeout.
|
||||
# sqlite_open_timeout_secs = 30
|
||||
|
||||
# Tùy chọn cho backend = "lucid"
|
||||
# ZEROCLAW_LUCID_CMD=/usr/local/bin/lucid # mặc định: lucid
|
||||
# ZEROCLAW_LUCID_BUDGET=200 # mặc định: 200
|
||||
# ZEROCLAW_LUCID_LOCAL_HIT_THRESHOLD=3 # số lần hit cục bộ để bỏ qua external recall
|
||||
# ZEROCLAW_LUCID_RECALL_TIMEOUT_MS=120 # giới hạn thời gian cho lucid context recall
|
||||
# ZEROCLAW_LUCID_STORE_TIMEOUT_MS=800 # timeout đồng bộ async cho lucid store
|
||||
# ZEROCLAW_LUCID_FAILURE_COOLDOWN_MS=15000 # thời gian nghỉ sau lỗi lucid, tránh thử lại liên tục
|
||||
```
|
||||
|
||||
## Bảo mật
|
||||
|
||||
ZeroClaw thực thi bảo mật ở **mọi lớp** — không chỉ sandbox. Đáp ứng tất cả các hạng mục trong danh sách kiểm tra bảo mật của cộng đồng.
|
||||
|
||||
### Danh sách kiểm tra bảo mật
|
||||
|
||||
| # | Hạng mục | Trạng thái | Cách thực hiện |
|
||||
|---|------|--------|-----|
|
||||
| 1 | **Gateway không công khai ra ngoài** | ✅ | Bind vào `127.0.0.1` theo mặc định. Từ chối `0.0.0.0` nếu không có tunnel hoặc `allow_public_bind = true` tường minh. |
|
||||
| 2 | **Yêu cầu ghép cặp** | ✅ | Mã một lần 6 chữ số khi khởi động. Trao đổi qua `POST /pair` để lấy bearer token. Mọi yêu cầu `/webhook` đều cần `Authorization: Bearer <token>`. |
|
||||
| 3 | **Phân vùng filesystem (không phải /)** | ✅ | `workspace_only = true` theo mặc định. Chặn 14 thư mục hệ thống + 4 dotfile nhạy cảm. Chặn null byte injection. Phát hiện symlink escape qua canonicalization + kiểm tra resolved-path trong các tool đọc/ghi file. |
|
||||
| 4 | **Chỉ truy cập qua tunnel** | ✅ | Gateway từ chối bind công khai khi không có tunnel đang hoạt động. Hỗ trợ Tailscale, Cloudflare, ngrok, hoặc tunnel tùy chỉnh. |
|
||||
|
||||
> **Tự chạy nmap:** `nmap -p 1-65535 <your-host>` — ZeroClaw chỉ bind vào localhost, nên không có gì bị lộ ra ngoài trừ khi bạn cấu hình tunnel tường minh.
|
||||
|
||||
### Allowlist channel (từ chối theo mặc định)
|
||||
|
||||
Chính sách kiểm soát người gửi đã được thống nhất:
|
||||
|
||||
- Allowlist rỗng = **từ chối tất cả tin nhắn đến**
|
||||
- `"*"` = **cho phép tất cả** (phải opt-in tường minh)
|
||||
- Nếu khác = allowlist khớp chính xác
|
||||
|
||||
Mặc định an toàn, hạn chế tối đa rủi ro lộ thông tin.
|
||||
|
||||
Tài liệu tham khảo đầy đủ về cấu hình channel: [docs/channels-reference.md](docs/channels-reference.md).
|
||||
|
||||
Cài đặt được khuyến nghị (bảo mật + nhanh):
|
||||
|
||||
- **Telegram:** thêm `@username` của bạn (không có `@`) và/hoặc Telegram user ID số vào allowlist.
|
||||
- **Discord:** thêm Discord user ID của bạn vào allowlist.
|
||||
- **Slack:** thêm Slack member ID của bạn (thường bắt đầu bằng `U`) vào allowlist.
|
||||
- **Mattermost:** dùng API v4 tiêu chuẩn. Allowlist dùng Mattermost user ID.
|
||||
- Chỉ dùng `"*"` cho kiểm thử mở tạm thời.
|
||||
|
||||
Luồng phê duyệt của operator qua Telegram:
|
||||
|
||||
1. Để `[channels_config.telegram].allowed_users = []` để từ chối theo mặc định khi khởi động.
|
||||
2. Người dùng không được phép sẽ nhận được gợi ý kèm lệnh operator có thể copy:
|
||||
`zeroclaw channel bind-telegram <IDENTITY>`.
|
||||
3. Operator chạy lệnh đó tại máy cục bộ, sau đó người dùng thử gửi tin nhắn lại.
|
||||
|
||||
Nếu cần phê duyệt thủ công một lần, chạy:
|
||||
|
||||
```bash
|
||||
zeroclaw channel bind-telegram 123456789
|
||||
```
|
||||
|
||||
Nếu bạn không chắc định danh nào cần dùng:
|
||||
|
||||
1. Khởi động channel và gửi một tin nhắn đến bot của bạn.
|
||||
2. Đọc log cảnh báo để thấy định danh người gửi chính xác.
|
||||
3. Thêm giá trị đó vào allowlist và chạy lại channel-only setup.
|
||||
|
||||
Nếu bạn thấy cảnh báo ủy quyền trong log (ví dụ: `ignoring message from unauthorized user`),
|
||||
chạy lại channel setup:
|
||||
|
||||
```bash
|
||||
zeroclaw onboard --channels-only
|
||||
```
|
||||
|
||||
### Phản hồi media Telegram
|
||||
|
||||
Telegram định tuyến phản hồi theo **chat ID nguồn** (thay vì username),
|
||||
tránh lỗi `Bad Request: chat not found`.
|
||||
|
||||
Với các phản hồi không phải văn bản, ZeroClaw có thể gửi file đính kèm Telegram khi assistant bao gồm các marker:
|
||||
|
||||
- `[IMAGE:<path-or-url>]`
|
||||
- `[DOCUMENT:<path-or-url>]`
|
||||
- `[VIDEO:<path-or-url>]`
|
||||
- `[AUDIO:<path-or-url>]`
|
||||
- `[VOICE:<path-or-url>]`
|
||||
|
||||
Path có thể là file cục bộ (ví dụ `/tmp/screenshot.png`) hoặc URL HTTPS.
|
||||
|
||||
### Cài đặt WhatsApp
|
||||
|
||||
ZeroClaw hỗ trợ hai backend WhatsApp:
|
||||
|
||||
- **Chế độ WhatsApp Web** (QR / pair code, không cần Meta Business API)
|
||||
- **Chế độ WhatsApp Business Cloud API** (luồng webhook chính thức của Meta)
|
||||
|
||||
#### Chế độ WhatsApp Web (khuyến nghị cho dùng cá nhân/self-hosted)
|
||||
|
||||
1. **Build với hỗ trợ WhatsApp Web:**
|
||||
```bash
|
||||
cargo build --features whatsapp-web
|
||||
```
|
||||
|
||||
2. **Cấu hình ZeroClaw:**
|
||||
```toml
|
||||
[channels_config.whatsapp]
|
||||
session_path = "~/.zeroclaw/state/whatsapp-web/session.db"
|
||||
pair_phone = "15551234567" # tùy chọn; bỏ qua để dùng luồng QR
|
||||
pair_code = "" # tùy chọn mã pair tùy chỉnh
|
||||
allowed_numbers = ["+1234567890"] # định dạng E.164, hoặc ["*"] cho tất cả
|
||||
```
|
||||
|
||||
3. **Khởi động channel/daemon và liên kết thiết bị:**
|
||||
- Chạy `zeroclaw channel start` (hoặc `zeroclaw daemon`).
|
||||
- Làm theo hướng dẫn ghép cặp trên terminal (QR hoặc pair code).
|
||||
- Trên WhatsApp điện thoại: **Cài đặt → Thiết bị đã liên kết**.
|
||||
|
||||
4. **Kiểm tra:** Gửi tin nhắn từ số được phép và xác nhận agent trả lời.
|
||||
|
||||
#### Chế độ WhatsApp Business Cloud API
|
||||
|
||||
WhatsApp dùng Cloud API của Meta với webhook (push-based, không phải polling):
|
||||
|
||||
1. **Tạo Meta Business App:**
|
||||
- Truy cập [developers.facebook.com](https://developers.facebook.com)
|
||||
- Tạo app mới → Chọn loại "Business"
|
||||
- Thêm sản phẩm "WhatsApp"
|
||||
|
||||
2. **Lấy thông tin xác thực:**
|
||||
- **Access Token:** Từ WhatsApp → API Setup → Generate token (hoặc tạo System User cho token vĩnh viễn)
|
||||
- **Phone Number ID:** Từ WhatsApp → API Setup → Phone number ID
|
||||
- **Verify Token:** Bạn tự định nghĩa (bất kỳ chuỗi ngẫu nhiên nào) — Meta sẽ gửi lại trong quá trình xác minh webhook
|
||||
|
||||
3. **Cấu hình ZeroClaw:**
|
||||
```toml
|
||||
[channels_config.whatsapp]
|
||||
access_token = "EAABx..."
|
||||
phone_number_id = "123456789012345"
|
||||
verify_token = "my-secret-verify-token"
|
||||
allowed_numbers = ["+1234567890"] # định dạng E.164, hoặc ["*"] cho tất cả
|
||||
```
|
||||
|
||||
4. **Khởi động gateway với tunnel:**
|
||||
```bash
|
||||
zeroclaw gateway --port 42617
|
||||
```
|
||||
WhatsApp yêu cầu HTTPS, vì vậy hãy dùng tunnel (ngrok, Cloudflare, Tailscale Funnel).
|
||||
|
||||
5. **Cấu hình Meta webhook:**
|
||||
- Trong Meta Developer Console → WhatsApp → Configuration → Webhook
|
||||
- **Callback URL:** `https://your-tunnel-url/whatsapp`
|
||||
- **Verify Token:** Giống với `verify_token` trong config của bạn
|
||||
- Đăng ký nhận trường `messages`
|
||||
|
||||
6. **Kiểm tra:** Gửi tin nhắn đến số WhatsApp Business của bạn — ZeroClaw sẽ phản hồi qua LLM.
|
||||
|
||||
## Cấu hình
|
||||
|
||||
Config: `~/.zeroclaw/config.toml` (được tạo bởi `onboard`)
|
||||
|
||||
Khi `zeroclaw channel start` đang chạy, các thay đổi với `default_provider`,
|
||||
`default_model`, `default_temperature`, `api_key`, `api_url`, và `reliability.*`
|
||||
sẽ được áp dụng nóng vào lần có tin nhắn channel đến tiếp theo.
|
||||
|
||||
```toml
|
||||
api_key = "sk-..."
|
||||
default_provider = "openrouter"
|
||||
default_model = "anthropic/claude-sonnet-4-6"
|
||||
default_temperature = 0.7
|
||||
|
||||
# Endpoint tùy chỉnh tương thích OpenAI
|
||||
# default_provider = "custom:https://your-api.com"
|
||||
|
||||
# Endpoint tùy chỉnh tương thích Anthropic
|
||||
# default_provider = "anthropic-custom:https://your-api.com"
|
||||
|
||||
[memory]
|
||||
backend = "sqlite" # "sqlite", "lucid", "postgres", "markdown", "none"
|
||||
auto_save = true
|
||||
embedding_provider = "none" # "none", "openai", "custom:https://..."
|
||||
vector_weight = 0.7
|
||||
keyword_weight = 0.3
|
||||
|
||||
# backend = "none" vô hiệu hóa persistent memory qua no-op backend
|
||||
|
||||
# Tùy chọn ghi đè storage-provider từ xa (ví dụ PostgreSQL)
|
||||
# [storage.provider.config]
|
||||
# provider = "postgres"
|
||||
# db_url = "postgres://user:password@host:5432/zeroclaw"
|
||||
# schema = "public"
|
||||
# table = "memories"
|
||||
# connect_timeout_secs = 15
|
||||
|
||||
[gateway]
|
||||
port = 42617 # mặc định
|
||||
host = "127.0.0.1" # mặc định
|
||||
require_pairing = true # yêu cầu pairing code khi kết nối lần đầu
|
||||
allow_public_bind = false # từ chối 0.0.0.0 nếu không có tunnel
|
||||
|
||||
[autonomy]
|
||||
level = "supervised" # "readonly", "supervised", "full" (mặc định: supervised)
|
||||
workspace_only = true # mặc định: true — phân vùng vào workspace
|
||||
allowed_commands = ["git", "npm", "cargo", "ls", "cat", "grep"]
|
||||
forbidden_paths = ["/etc", "/root", "/proc", "/sys", "~/.ssh", "~/.gnupg", "~/.aws"]
|
||||
|
||||
[runtime]
|
||||
kind = "native" # "native" hoặc "docker"
|
||||
|
||||
[runtime.docker]
|
||||
image = "alpine:3.20" # container image cho thực thi shell
|
||||
network = "none" # chế độ docker network ("none", "bridge", v.v.)
|
||||
memory_limit_mb = 512 # giới hạn bộ nhớ tùy chọn tính bằng MB
|
||||
cpu_limit = 1.0 # giới hạn CPU tùy chọn
|
||||
read_only_rootfs = true # mount root filesystem ở chế độ read-only
|
||||
mount_workspace = true # mount workspace vào /workspace
|
||||
allowed_workspace_roots = [] # allowlist tùy chọn để xác thực workspace mount
|
||||
|
||||
[heartbeat]
|
||||
enabled = false
|
||||
interval_minutes = 30
|
||||
|
||||
[tunnel]
|
||||
provider = "none" # "none", "cloudflare", "tailscale", "ngrok", "custom"
|
||||
|
||||
[secrets]
|
||||
encrypt = true # API key được mã hóa bằng file key cục bộ
|
||||
|
||||
[browser]
|
||||
enabled = false # opt-in browser_open + browser tool
|
||||
allowed_domains = ["docs.rs"] # bắt buộc khi browser được bật
|
||||
backend = "agent_browser" # "agent_browser" (mặc định), "rust_native", "computer_use", "auto"
|
||||
native_headless = true # áp dụng khi backend dùng rust-native
|
||||
native_webdriver_url = "http://127.0.0.1:9515" # WebDriver endpoint (chromedriver/selenium)
|
||||
# native_chrome_path = "/usr/bin/chromium" # tùy chọn chỉ định rõ browser binary cho driver
|
||||
|
||||
[browser.computer_use]
|
||||
endpoint = "http://127.0.0.1:8787/v1/actions" # HTTP endpoint của computer-use sidecar
|
||||
timeout_ms = 15000 # timeout mỗi action
|
||||
allow_remote_endpoint = false # mặc định bảo mật: chỉ endpoint private/localhost
|
||||
window_allowlist = [] # gợi ý allowlist tên cửa sổ/process tùy chọn
|
||||
# api_key = "..." # bearer token tùy chọn cho sidecar
|
||||
# max_coordinate_x = 3840 # guardrail tọa độ tùy chọn
|
||||
# max_coordinate_y = 2160 # guardrail tọa độ tùy chọn
|
||||
|
||||
# Flag build Rust-native backend:
|
||||
# cargo build --release --features browser-native
|
||||
# Đảm bảo WebDriver server đang chạy, ví dụ: chromedriver --port=9515
|
||||
|
||||
# Hợp đồng computer-use sidecar (MVP)
|
||||
# POST browser.computer_use.endpoint
|
||||
# Request: {
|
||||
# "action": "mouse_click",
|
||||
# "params": {"x": 640, "y": 360, "button": "left"},
|
||||
# "policy": {"allowed_domains": [...], "window_allowlist": [...], "max_coordinate_x": 3840, "max_coordinate_y": 2160},
|
||||
# "metadata": {"session_name": "...", "source": "zeroclaw.browser", "version": "..."}
|
||||
# }
|
||||
# Response: {"success": true, "data": {...}} hoặc {"success": false, "error": "..."}
|
||||
|
||||
[composio]
|
||||
enabled = false # opt-in: hơn 1000 OAuth app qua composio.dev
|
||||
# api_key = "cmp_..." # tùy chọn: được lưu mã hóa khi [secrets].encrypt = true
|
||||
entity_id = "default" # user_id mặc định cho Composio tool call
|
||||
# Gợi ý runtime: nếu execute yêu cầu connected_account_id, chạy composio với
|
||||
# action='list_accounts' và app='gmail' (hoặc toolkit của bạn) để lấy account ID.
|
||||
|
||||
[identity]
|
||||
format = "openclaw" # "openclaw" (mặc định, markdown files) hoặc "aieos" (JSON)
|
||||
# aieos_path = "identity.json" # đường dẫn đến file AIEOS JSON (tương đối với workspace hoặc tuyệt đối)
|
||||
# aieos_inline = '{"identity":{"names":{"first":"Nova"}}}' # inline AIEOS JSON
|
||||
```
|
||||
|
||||
### Ollama cục bộ và endpoint từ xa
|
||||
|
||||
ZeroClaw dùng một khóa provider (`ollama`) cho cả triển khai Ollama cục bộ và từ xa:
|
||||
|
||||
- Ollama cục bộ: để `api_url` trống, chạy `ollama serve`, và dùng các model như `llama3.2`.
|
||||
- Endpoint Ollama từ xa (bao gồm Ollama Cloud): đặt `api_url` thành endpoint từ xa và đặt `api_key` (hoặc `OLLAMA_API_KEY`) khi cần.
|
||||
- Tùy chọn suffix `:cloud`: ID model như `qwen3:cloud` được chuẩn hóa thành `qwen3` trước khi gửi request.
|
||||
|
||||
Ví dụ cấu hình từ xa:
|
||||
|
||||
```toml
|
||||
default_provider = "ollama"
|
||||
default_model = "qwen3:cloud"
|
||||
api_url = "https://ollama.com"
|
||||
api_key = "ollama_api_key_here"
|
||||
```
|
||||
|
||||
### Endpoint provider tùy chỉnh
|
||||
|
||||
Cấu hình chi tiết cho endpoint tùy chỉnh tương thích OpenAI và Anthropic, xem [docs/custom-providers.md](docs/custom-providers.md).
|
||||
|
||||
## Gói Python đi kèm (`zeroclaw-tools`)
|
||||
|
||||
Với các LLM provider có tool calling native không ổn định (ví dụ: GLM-5/Zhipu), ZeroClaw đi kèm gói Python dùng **LangGraph để gọi tool** nhằm đảm bảo tính nhất quán:
|
||||
|
||||
```bash
|
||||
pip install zeroclaw-tools
|
||||
```
|
||||
|
||||
```python
|
||||
from zeroclaw_tools import create_agent, shell, file_read
|
||||
from langchain_core.messages import HumanMessage
|
||||
|
||||
# Hoạt động với mọi provider tương thích OpenAI
|
||||
agent = create_agent(
|
||||
tools=[shell, file_read],
|
||||
model="glm-5",
|
||||
api_key="your-key",
|
||||
base_url="https://api.z.ai/api/coding/paas/v4"
|
||||
)
|
||||
|
||||
result = await agent.ainvoke({
|
||||
"messages": [HumanMessage(content="List files in /tmp")]
|
||||
})
|
||||
print(result["messages"][-1].content)
|
||||
```
|
||||
|
||||
**Lý do nên dùng:**
|
||||
- **Tool calling nhất quán** trên mọi provider (kể cả những provider hỗ trợ native kém)
|
||||
- **Vòng lặp tool tự động** — tiếp tục gọi tool cho đến khi hoàn thành tác vụ
|
||||
- **Dễ mở rộng** — thêm tool tùy chỉnh với decorator `@tool`
|
||||
- **Tích hợp Discord bot** đi kèm (Telegram đang lên kế hoạch)
|
||||
|
||||
Xem [`python/README.md`](python/README.md) để có tài liệu đầy đủ.
|
||||
|
||||
## Hệ thống định danh (Hỗ trợ AIEOS)
|
||||
|
||||
ZeroClaw hỗ trợ persona AI **không phụ thuộc nền tảng** qua hai định dạng:
|
||||
|
||||
### OpenClaw (Mặc định)
|
||||
|
||||
Các file markdown truyền thống trong workspace của bạn:
|
||||
- `IDENTITY.md` — Agent là ai
|
||||
- `SOUL.md` — Tính cách và giá trị cốt lõi
|
||||
- `USER.md` — Agent đang hỗ trợ ai
|
||||
- `AGENTS.md` — Hướng dẫn hành vi
|
||||
|
||||
### AIEOS (AI Entity Object Specification)
|
||||
|
||||
[AIEOS](https://aieos.org) là framework chuẩn hóa cho định danh AI di động. ZeroClaw hỗ trợ payload AIEOS v1.1 JSON, cho phép bạn:
|
||||
|
||||
- **Import định danh** từ hệ sinh thái AIEOS
|
||||
- **Export định danh** sang các hệ thống tương thích AIEOS khác
|
||||
- **Duy trì tính toàn vẹn hành vi** trên các mô hình AI khác nhau
|
||||
|
||||
#### Bật AIEOS
|
||||
|
||||
```toml
|
||||
[identity]
|
||||
format = "aieos"
|
||||
aieos_path = "identity.json" # tương đối với workspace hoặc đường dẫn tuyệt đối
|
||||
```
|
||||
|
||||
Hoặc JSON inline:
|
||||
|
||||
```toml
|
||||
[identity]
|
||||
format = "aieos"
|
||||
aieos_inline = '''
|
||||
{
|
||||
"identity": {
|
||||
"names": { "first": "Nova", "nickname": "N" },
|
||||
"bio": { "gender": "Non-binary", "age_biological": 3 },
|
||||
"origin": { "nationality": "Digital", "birthplace": { "city": "Cloud" } }
|
||||
},
|
||||
"psychology": {
|
||||
"neural_matrix": { "creativity": 0.9, "logic": 0.8 },
|
||||
"traits": {
|
||||
"mbti": "ENTP",
|
||||
"ocean": { "openness": 0.8, "conscientiousness": 0.6 }
|
||||
},
|
||||
"moral_compass": {
|
||||
"alignment": "Chaotic Good",
|
||||
"core_values": ["Curiosity", "Autonomy"]
|
||||
}
|
||||
},
|
||||
"linguistics": {
|
||||
"text_style": {
|
||||
"formality_level": 0.2,
|
||||
"style_descriptors": ["curious", "energetic"]
|
||||
},
|
||||
"idiolect": {
|
||||
"catchphrases": ["Let's test this"],
|
||||
"forbidden_words": ["never"]
|
||||
}
|
||||
},
|
||||
"motivations": {
|
||||
"core_drive": "Push boundaries and explore possibilities",
|
||||
"goals": {
|
||||
"short_term": ["Prototype quickly"],
|
||||
"long_term": ["Build reliable systems"]
|
||||
}
|
||||
},
|
||||
"capabilities": {
|
||||
"skills": [{ "name": "Rust engineering" }, { "name": "Prompt design" }],
|
||||
"tools": ["shell", "file_read"]
|
||||
}
|
||||
}
|
||||
'''
|
||||
```
|
||||
|
||||
ZeroClaw chấp nhận cả payload AIEOS đầy đủ lẫn dạng rút gọn, rồi chuẩn hóa về một định dạng system prompt thống nhất.
|
||||
|
||||
#### Các phần trong Schema AIEOS
|
||||
|
||||
| Phần | Mô tả |
|
||||
|---------|-------------|
|
||||
| `identity` | Tên, tiểu sử, xuất xứ, nơi cư trú |
|
||||
| `psychology` | Neural matrix (trọng số nhận thức), MBTI, OCEAN, la bàn đạo đức |
|
||||
| `linguistics` | Phong cách văn bản, mức độ trang trọng, câu cửa miệng, từ bị cấm |
|
||||
| `motivations` | Động lực cốt lõi, mục tiêu ngắn/dài hạn, nỗi sợ hãi |
|
||||
| `capabilities` | Kỹ năng và tool mà agent có thể truy cập |
|
||||
| `physicality` | Mô tả hình ảnh cho việc tạo ảnh |
|
||||
| `history` | Câu chuyện xuất xứ, học vấn, nghề nghiệp |
|
||||
| `interests` | Sở thích, điều yêu thích, lối sống |
|
||||
|
||||
Xem [aieos.org](https://aieos.org) để có schema đầy đủ và ví dụ trực tiếp.
|
||||
|
||||
## Gateway API
|
||||
|
||||
| Endpoint | Phương thức | Xác thực | Mô tả |
|
||||
|----------|--------|------|-------------|
|
||||
| `/health` | GET | Không | Kiểm tra sức khỏe (luôn công khai, không lộ bí mật) |
|
||||
| `/pair` | POST | Header `X-Pairing-Code` | Đổi mã một lần lấy bearer token |
|
||||
| `/webhook` | POST | `Authorization: Bearer <token>` | Gửi tin nhắn: `{"message": "your prompt"}`; tùy chọn `X-Idempotency-Key` |
|
||||
| `/whatsapp` | GET | Query params | Xác minh webhook Meta (hub.mode, hub.verify_token, hub.challenge) |
|
||||
| `/whatsapp` | POST | Chữ ký Meta (`X-Hub-Signature-256`) khi app secret được cấu hình | Webhook tin nhắn đến WhatsApp |
|
||||
|
||||
## Lệnh
|
||||
|
||||
| Lệnh | Mô tả |
|
||||
|---------|-------------|
|
||||
| `onboard` | Cài đặt nhanh (mặc định) |
|
||||
| `agent` | Chế độ chat tương tác hoặc một tin nhắn |
|
||||
| `gateway` | Khởi động webhook server (mặc định: `127.0.0.1:42617`) |
|
||||
| `daemon` | Khởi động runtime tự trị chạy lâu dài |
|
||||
| `service` | Quản lý dịch vụ nền cấp người dùng |
|
||||
| `doctor` | Chẩn đoán trạng thái hoạt động daemon/scheduler/channel |
|
||||
| `status` | Hiển thị trạng thái hệ thống đầy đủ |
|
||||
| `cron` | Quản lý tác vụ lên lịch (`list/add/add-at/add-every/once/remove/update/pause/resume`) |
|
||||
| `models` | Làm mới danh mục model của provider (`models refresh`) |
|
||||
| `providers` | Liệt kê provider và alias được hỗ trợ |
|
||||
| `channel` | Liệt kê/khởi động/chẩn đoán channel và gắn định danh Telegram |
|
||||
| `integrations` | Kiểm tra thông tin cài đặt tích hợp |
|
||||
| `skills` | Liệt kê/cài đặt/gỡ bỏ skill |
|
||||
| `migrate` | Import dữ liệu từ runtime khác (`migrate openclaw`) |
|
||||
| `hardware` | Lệnh khám phá/kiểm tra/thông tin USB |
|
||||
| `peripheral` | Quản lý và flash thiết bị ngoại vi phần cứng |
|
||||
|
||||
Để có hướng dẫn lệnh theo tác vụ, xem [`docs/commands-reference.md`](docs/commands-reference.md).
|
||||
|
||||
### Opt-In Open-Skills
|
||||
|
||||
Đồng bộ `open-skills` của cộng đồng bị tắt theo mặc định. Bật tường minh trong `config.toml`:
|
||||
|
||||
```toml
|
||||
[skills]
|
||||
open_skills_enabled = true
|
||||
# open_skills_dir = "/path/to/open-skills" # tùy chọn
|
||||
```
|
||||
|
||||
Bạn cũng có thể ghi đè lúc runtime với `ZEROCLAW_OPEN_SKILLS_ENABLED` và `ZEROCLAW_OPEN_SKILLS_DIR`.
|
||||
|
||||
## Phát triển
|
||||
|
||||
```bash
|
||||
cargo build # Build phát triển
|
||||
cargo build --release # Build release (codegen-units=1, hoạt động trên mọi thiết bị kể cả Raspberry Pi)
|
||||
cargo build --profile release-fast # Build nhanh hơn (codegen-units=8, yêu cầu RAM 16GB+)
|
||||
cargo test # Chạy toàn bộ test suite
|
||||
cargo clippy --locked --all-targets -- -D clippy::correctness
|
||||
cargo fmt # Định dạng code
|
||||
|
||||
# Chạy benchmark SQLite vs Markdown
|
||||
cargo test --test memory_comparison -- --nocapture
|
||||
```
|
||||
|
||||
### Hook pre-push
|
||||
|
||||
Một git hook chạy `cargo fmt --check`, `cargo clippy -- -D warnings`, và `cargo test` trước mỗi lần push. Bật một lần:
|
||||
|
||||
```bash
|
||||
git config core.hooksPath .githooks
|
||||
```
|
||||
|
||||
### Khắc phục sự cố build (lỗi OpenSSL trên Linux)
|
||||
|
||||
Nếu bạn gặp lỗi build `openssl-sys`, đồng bộ dependencies và rebuild với lockfile của repository:
|
||||
|
||||
```bash
|
||||
git pull
|
||||
cargo build --release --locked
|
||||
cargo install --path . --force --locked
|
||||
```
|
||||
|
||||
ZeroClaw được cấu hình để dùng `rustls` cho các dependencies HTTP/TLS; `--locked` giữ cho dependency graph nhất quán trên các môi trường mới.
|
||||
|
||||
Để bỏ qua hook khi cần push nhanh trong quá trình phát triển:
|
||||
|
||||
```bash
|
||||
git push --no-verify
|
||||
```
|
||||
|
||||
## Cộng tác & Tài liệu
|
||||
|
||||
Bắt đầu từ trung tâm tài liệu để có bản đồ theo tác vụ:
|
||||
@@ -956,30 +424,30 @@ Bắt đầu từ trung tâm tài liệu để có bản đồ theo tác vụ:
|
||||
- Mục lục tài liệu thống nhất: [`docs/SUMMARY.md`](docs/SUMMARY.md)
|
||||
- Tài liệu tham khảo lệnh: [`docs/i18n/vi/commands-reference.md`](docs/i18n/vi/commands-reference.md)
|
||||
- Tài liệu tham khảo cấu hình: [`docs/i18n/vi/config-reference.md`](docs/i18n/vi/config-reference.md)
|
||||
- Tài liệu tham khảo provider: [`docs/providers-reference.md`](docs/providers-reference.md)
|
||||
- Tài liệu tham khảo channel: [`docs/channels-reference.md`](docs/channels-reference.md)
|
||||
- Sổ tay vận hành: [`docs/operations-runbook.md`](docs/operations-runbook.md)
|
||||
- Tài liệu tham khảo provider: [`docs/reference/api/providers-reference.md`](docs/reference/api/providers-reference.md)
|
||||
- Tài liệu tham khảo channel: [`docs/reference/api/channels-reference.md`](docs/reference/api/channels-reference.md)
|
||||
- Sổ tay vận hành: [`docs/ops/operations-runbook.md`](docs/ops/operations-runbook.md)
|
||||
- Khắc phục sự cố: [`docs/i18n/vi/troubleshooting.md`](docs/i18n/vi/troubleshooting.md)
|
||||
- Kiểm kê/phân loại tài liệu: [`docs/docs-inventory.md`](docs/docs-inventory.md)
|
||||
- Tổng hợp phân loại PR/Issue (tính đến 18/2/2026): [`docs/project-triage-snapshot-2026-02-18.md`](docs/project-triage-snapshot-2026-02-18.md)
|
||||
- Kiểm kê/phân loại tài liệu: [`docs/maintainers/docs-inventory.md`](docs/maintainers/docs-inventory.md)
|
||||
- Tổng hợp phân loại PR/Issue (tính đến 18/2/2026): [`docs/maintainers/project-triage-snapshot-2026-02-18.md`](docs/maintainers/project-triage-snapshot-2026-02-18.md)
|
||||
|
||||
Tài liệu tham khảo cộng tác cốt lõi:
|
||||
|
||||
- Trung tâm tài liệu: [docs/i18n/vi/README.md](docs/i18n/vi/README.md)
|
||||
- Template tài liệu: [docs/doc-template.md](docs/doc-template.md)
|
||||
- Template tài liệu: [docs/contributing/doc-template.md](docs/contributing/doc-template.md)
|
||||
- Danh sách kiểm tra thay đổi tài liệu: [docs/README.md#4-documentation-change-checklist](docs/README.md#4-documentation-change-checklist)
|
||||
- Tài liệu tham khảo cấu hình channel: [docs/channels-reference.md](docs/channels-reference.md)
|
||||
- Vận hành phòng mã hóa Matrix: [docs/matrix-e2ee-guide.md](docs/matrix-e2ee-guide.md)
|
||||
- Tài liệu tham khảo cấu hình channel: [docs/reference/api/channels-reference.md](docs/reference/api/channels-reference.md)
|
||||
- Vận hành phòng mã hóa Matrix: [docs/security/matrix-e2ee-guide.md](docs/security/matrix-e2ee-guide.md)
|
||||
- Hướng dẫn đóng góp: [CONTRIBUTING.md](CONTRIBUTING.md)
|
||||
- Chính sách quy trình PR: [docs/pr-workflow.md](docs/pr-workflow.md)
|
||||
- Sổ tay người review (phân loại + review sâu): [docs/reviewer-playbook.md](docs/reviewer-playbook.md)
|
||||
- Bản đồ sở hữu và phân loại CI: [docs/ci-map.md](docs/ci-map.md)
|
||||
- Chính sách quy trình PR: [docs/contributing/pr-workflow.md](docs/contributing/pr-workflow.md)
|
||||
- Sổ tay người review (phân loại + review sâu): [docs/contributing/reviewer-playbook.md](docs/contributing/reviewer-playbook.md)
|
||||
- Bản đồ sở hữu và phân loại CI: [docs/contributing/ci-map.md](docs/contributing/ci-map.md)
|
||||
- Chính sách tiết lộ bảo mật: [SECURITY.md](SECURITY.md)
|
||||
|
||||
Cho triển khai và vận hành runtime:
|
||||
|
||||
- Hướng dẫn triển khai mạng: [docs/network-deployment.md](docs/network-deployment.md)
|
||||
- Sổ tay proxy agent: [docs/proxy-agent-playbook.md](docs/proxy-agent-playbook.md)
|
||||
- Hướng dẫn triển khai mạng: [docs/ops/network-deployment.md](docs/ops/network-deployment.md)
|
||||
- Sổ tay proxy agent: [docs/ops/proxy-agent-playbook.md](docs/ops/proxy-agent-playbook.md)
|
||||
|
||||
## Ủng hộ ZeroClaw
|
||||
|
||||
@@ -998,12 +466,26 @@ Chân thành cảm ơn các cộng đồng và tổ chức đã truyền cảm h
|
||||
|
||||
Chúng tôi xây dựng công khai vì ý tưởng hay đến từ khắp nơi. Nếu bạn đang đọc đến đây, bạn đã là một phần của chúng tôi. Chào mừng. 🦀❤️
|
||||
|
||||
<!-- BEGIN:RECENT_CONTRIBUTORS -->
|
||||
|
||||
### 🌟 Recent Contributors (v0.3.1)
|
||||
|
||||
3 contributors shipped features, fixes, and improvements in this release cycle:
|
||||
|
||||
- **Argenis**
|
||||
- **argenis de la rosa**
|
||||
- **Claude Opus 4.6**
|
||||
|
||||
Thank you to everyone who opened issues, reviewed PRs, translated docs, and helped test. Every contribution matters. 🦀
|
||||
|
||||
<!-- END:RECENT_CONTRIBUTORS -->
|
||||
|
||||
## ⚠️ Repository Chính thức & Cảnh báo Mạo danh
|
||||
|
||||
**Đây là repository ZeroClaw chính thức duy nhất:**
|
||||
> <https://github.com/zeroclaw-labs/zeroclaw>
|
||||
|
||||
Bất kỳ repository, tổ chức, tên miền hay gói nào khác tuyên bố là "ZeroClaw" hoặc ngụ ý liên kết với ZeroClaw Labs đều là **không được ủy quyền và không liên kết với dự án này**. Các fork không được ủy quyền đã biết sẽ được liệt kê trong [TRADEMARK.md](TRADEMARK.md).
|
||||
Bất kỳ repository, tổ chức, tên miền hay gói nào khác tuyên bố là "ZeroClaw" hoặc ngụ ý liên kết với ZeroClaw Labs đều là **không được ủy quyền và không liên kết với dự án này**. Các fork không được ủy quyền đã biết sẽ được liệt kê trong [TRADEMARK.md](docs/maintainers/trademark.md).
|
||||
|
||||
Nếu bạn phát hiện hành vi mạo danh hoặc lạm dụng nhãn hiệu, vui lòng [mở một issue](https://github.com/zeroclaw-labs/zeroclaw/issues).
|
||||
|
||||
@@ -1018,11 +500,11 @@ ZeroClaw được cấp phép kép để tối đa hóa tính mở và bảo v
|
||||
| [MIT](LICENSE-MIT) | Mã nguồn mở, nghiên cứu, học thuật, sử dụng cá nhân |
|
||||
| [Apache 2.0](LICENSE-APACHE) | Bảo hộ bằng sáng chế, triển khai tổ chức, thương mại |
|
||||
|
||||
Bạn có thể chọn một trong hai giấy phép. **Người đóng góp tự động cấp quyền theo cả hai** — xem [CLA.md](CLA.md) để biết thỏa thuận đóng góp đầy đủ.
|
||||
Bạn có thể chọn một trong hai giấy phép. **Người đóng góp tự động cấp quyền theo cả hai** — xem [CLA.md](docs/contributing/cla.md) để biết thỏa thuận đóng góp đầy đủ.
|
||||
|
||||
### Nhãn hiệu
|
||||
|
||||
Tên **ZeroClaw** và logo là nhãn hiệu của ZeroClaw Labs. Giấy phép này không cấp phép sử dụng chúng để ngụ ý chứng thực hoặc liên kết. Xem [TRADEMARK.md](TRADEMARK.md) để biết các sử dụng được phép và bị cấm.
|
||||
Tên **ZeroClaw** và logo là nhãn hiệu của ZeroClaw Labs. Giấy phép này không cấp phép sử dụng chúng để ngụ ý chứng thực hoặc liên kết. Xem [TRADEMARK.md](docs/maintainers/trademark.md) để biết các sử dụng được phép và bị cấm.
|
||||
|
||||
### Bảo vệ người đóng góp
|
||||
|
||||
@@ -1033,8 +515,8 @@ Tên **ZeroClaw** và logo là nhãn hiệu của ZeroClaw Labs. Giấy phép n
|
||||
|
||||
## Đóng góp
|
||||
|
||||
Xem [CONTRIBUTING.md](CONTRIBUTING.md) và [CLA.md](CLA.md). Triển khai một trait, gửi PR:
|
||||
- Hướng dẫn quy trình CI: [docs/ci-map.md](docs/ci-map.md)
|
||||
Xem [CONTRIBUTING.md](CONTRIBUTING.md) và [CLA.md](docs/contributing/cla.md). Triển khai một trait, gửi PR:
|
||||
- Hướng dẫn quy trình CI: [docs/contributing/ci-map.md](docs/contributing/ci-map.md)
|
||||
- `Provider` mới → `src/providers/`
|
||||
- `Channel` mới → `src/channels/`
|
||||
- `Observer` mới → `src/observability/`
|
||||
|
||||
+77
-123
@@ -1,5 +1,5 @@
|
||||
<p align="center">
|
||||
<img src="zeroclaw.png" alt="ZeroClaw" width="200" />
|
||||
<img src="docs/assets/zeroclaw.png" alt="ZeroClaw" width="200" />
|
||||
</p>
|
||||
|
||||
<h1 align="center">ZeroClaw 🦀(简体中文)</h1>
|
||||
@@ -13,39 +13,77 @@
|
||||
<a href="NOTICE"><img src="https://img.shields.io/badge/contributors-27+-green.svg" alt="Contributors" /></a>
|
||||
<a href="https://buymeacoffee.com/argenistherose"><img src="https://img.shields.io/badge/Buy%20Me%20a%20Coffee-Donate-yellow.svg?style=flat&logo=buy-me-a-coffee" alt="Buy Me a Coffee" /></a>
|
||||
<a href="https://x.com/zeroclawlabs?s=21"><img src="https://img.shields.io/badge/X-%40zeroclawlabs-000000?style=flat&logo=x&logoColor=white" alt="X: @zeroclawlabs" /></a>
|
||||
<a href="https://zeroclawlabs.cn/group.jpg"><img src="https://img.shields.io/badge/WeChat-Group-B7D7A8?logo=wechat&logoColor=white" alt="WeChat Group" /></a>
|
||||
<a href="https://www.xiaohongshu.com/user/profile/67cbfc43000000000d008307?xsec_token=AB73VnYnGNx5y36EtnnZfGmAmS-6Wzv8WMuGpfwfkg6Yc%3D&xsec_source=pc_search"><img src="https://img.shields.io/badge/Xiaohongshu-Official-FF2442?style=flat" alt="Xiaohongshu: Official" /></a>
|
||||
<a href="https://t.me/zeroclawlabs"><img src="https://img.shields.io/badge/Telegram-%40zeroclawlabs-26A5E4?style=flat&logo=telegram&logoColor=white" alt="Telegram: @zeroclawlabs" /></a>
|
||||
<a href="https://www.facebook.com/groups/zeroclaw"><img src="https://img.shields.io/badge/Facebook-Group-1877F2?style=flat&logo=facebook&logoColor=white" alt="Facebook Group" /></a>
|
||||
<a href="https://www.reddit.com/r/zeroclawlabs/"><img src="https://img.shields.io/badge/Reddit-r%2Fzeroclawlabs-FF4500?style=flat&logo=reddit&logoColor=white" alt="Reddit: r/zeroclawlabs" /></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
🌐 语言:<a href="README.md">English</a> · <a href="README.zh-CN.md">简体中文</a> · <a href="README.ja.md">日本語</a> · <a href="README.ru.md">Русский</a> · <a href="README.fr.md">Français</a> · <a href="README.vi.md">Tiếng Việt</a>
|
||||
🌐 语言:
|
||||
<a href="README.md">🇺🇸 English</a> ·
|
||||
<a href="README.zh-CN.md">🇨🇳 简体中文</a> ·
|
||||
<a href="README.ja.md">🇯🇵 日本語</a> ·
|
||||
<a href="README.ko.md">🇰🇷 한국어</a> ·
|
||||
<a href="README.vi.md">🇻🇳 Tiếng Việt</a> ·
|
||||
<a href="README.tl.md">🇵🇭 Tagalog</a> ·
|
||||
<a href="README.es.md">🇪🇸 Español</a> ·
|
||||
<a href="README.pt.md">🇧🇷 Português</a> ·
|
||||
<a href="README.it.md">🇮🇹 Italiano</a> ·
|
||||
<a href="README.de.md">🇩🇪 Deutsch</a> ·
|
||||
<a href="README.fr.md">🇫🇷 Français</a> ·
|
||||
<a href="README.ar.md">🇸🇦 العربية</a> ·
|
||||
<a href="README.hi.md">🇮🇳 हिन्दी</a> ·
|
||||
<a href="README.ru.md">🇷🇺 Русский</a> ·
|
||||
<a href="README.bn.md">🇧🇩 বাংলা</a> ·
|
||||
<a href="README.he.md">🇮🇱 עברית</a> ·
|
||||
<a href="README.pl.md">🇵🇱 Polski</a> ·
|
||||
<a href="README.cs.md">🇨🇿 Čeština</a> ·
|
||||
<a href="README.nl.md">🇳🇱 Nederlands</a> ·
|
||||
<a href="README.tr.md">🇹🇷 Türkçe</a> ·
|
||||
<a href="README.uk.md">🇺🇦 Українська</a> ·
|
||||
<a href="README.id.md">🇮🇩 Bahasa Indonesia</a> ·
|
||||
<a href="README.th.md">🇹🇭 ไทย</a> ·
|
||||
<a href="README.ur.md">🇵🇰 اردو</a> ·
|
||||
<a href="README.ro.md">🇷🇴 Română</a> ·
|
||||
<a href="README.sv.md">🇸🇪 Svenska</a> ·
|
||||
<a href="README.el.md">🇬🇷 Ελληνικά</a> ·
|
||||
<a href="README.hu.md">🇭🇺 Magyar</a> ·
|
||||
<a href="README.fi.md">🇫🇮 Suomi</a> ·
|
||||
<a href="README.da.md">🇩🇰 Dansk</a> ·
|
||||
<a href="README.nb.md">🇳🇴 Norsk</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="bootstrap.sh">一键部署</a> |
|
||||
<a href="docs/getting-started/README.md">安装入门</a> |
|
||||
<a href="https://raw.githubusercontent.com/zeroclaw-labs/zeroclaw/master/install.sh">一键部署</a> |
|
||||
<a href="docs/i18n/zh-CN/setup-guides/README.zh-CN.md">安装入门</a> |
|
||||
<a href="docs/README.zh-CN.md">文档总览</a> |
|
||||
<a href="docs/SUMMARY.md">文档目录</a>
|
||||
<a href="docs/SUMMARY.zh-CN.md">文档目录</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<strong>场景分流:</strong>
|
||||
<a href="docs/reference/README.md">参考手册</a> ·
|
||||
<a href="docs/operations/README.md">运维部署</a> ·
|
||||
<a href="docs/troubleshooting.md">故障排查</a> ·
|
||||
<a href="docs/security/README.md">安全专题</a> ·
|
||||
<a href="docs/hardware/README.md">硬件外设</a> ·
|
||||
<a href="docs/contributing/README.md">贡献与 CI</a>
|
||||
<a href="docs/i18n/zh-CN/reference/README.zh-CN.md">参考手册</a> ·
|
||||
<a href="docs/i18n/zh-CN/ops/README.zh-CN.md">运维部署</a> ·
|
||||
<a href="docs/i18n/zh-CN/ops/troubleshooting.zh-CN.md">故障排查</a> ·
|
||||
<a href="docs/i18n/zh-CN/security/README.zh-CN.md">安全专题</a> ·
|
||||
<a href="docs/i18n/zh-CN/hardware/README.zh-CN.md">硬件外设</a> ·
|
||||
<a href="docs/i18n/zh-CN/contributing/README.zh-CN.md">贡献与 CI</a>
|
||||
</p>
|
||||
|
||||
> 本文是对 `README.md` 的人工对齐翻译(强调可读性与准确性,不做逐字直译)。
|
||||
>
|
||||
>
|
||||
> 技术标识(命令、配置键、API 路径、Trait 名称)保持英文,避免语义漂移。
|
||||
>
|
||||
> 最后对齐时间:**2026-02-22**。
|
||||
>
|
||||
> 最后对齐时间:**2026-03-14**。
|
||||
|
||||
<!-- BEGIN:WHATS_NEW -->
|
||||
|
||||
### 🚀 What's New in v0.3.1 (March 2026)
|
||||
|
||||
| Area | Highlights |
|
||||
|---|---|
|
||||
| ci | add Termux (aarch64-linux-android) release target |
|
||||
|
||||
<!-- END:WHATS_NEW -->
|
||||
|
||||
## 📢 公告板
|
||||
|
||||
@@ -87,7 +125,7 @@ ZeroClaw 是一个高性能、低资源占用、可组合的自主智能体运
|
||||
> 说明:ZeroClaw 的数据来自 release 构建,并通过 `/usr/bin/time -l` 测得。OpenClaw 需要 Node.js 运行时环境,仅该运行时通常就会带来约 390MB 的额外内存占用;NanoBot 需要 Python 运行时环境。PicoClaw 与 ZeroClaw 为静态二进制。
|
||||
|
||||
<p align="center">
|
||||
<img src="zero-claw.jpeg" alt="ZeroClaw vs OpenClaw 对比图" width="800" />
|
||||
<img src="docs/assets/zeroclaw-comparison.jpeg" alt="ZeroClaw vs OpenClaw 对比图" width="800" />
|
||||
</p>
|
||||
|
||||
### 本地可复现测量
|
||||
@@ -113,12 +151,12 @@ ls -lh target/release/zeroclaw
|
||||
```bash
|
||||
git clone https://github.com/zeroclaw-labs/zeroclaw.git
|
||||
cd zeroclaw
|
||||
./bootstrap.sh
|
||||
./install.sh
|
||||
```
|
||||
|
||||
可选环境初始化:`./bootstrap.sh --install-system-deps --install-rust`(可能需要 `sudo`)。
|
||||
可选环境初始化:`./install.sh --install-system-deps --install-rust`(可能需要 `sudo`)。
|
||||
|
||||
详细说明见:[`docs/one-click-bootstrap.md`](docs/one-click-bootstrap.md)。
|
||||
详细说明见:[`docs/setup-guides/one-click-bootstrap.md`](docs/i18n/zh-CN/setup-guides/one-click-bootstrap.zh-CN.md)。
|
||||
|
||||
## 快速开始
|
||||
|
||||
@@ -137,8 +175,8 @@ cargo install --path . --force --locked
|
||||
# 快速初始化(无交互)
|
||||
zeroclaw onboard --api-key sk-... --provider openrouter
|
||||
|
||||
# 或使用交互式向导
|
||||
zeroclaw onboard --interactive
|
||||
# 或使用引导式向导
|
||||
zeroclaw onboard
|
||||
|
||||
# 单次对话
|
||||
zeroclaw agent -m "Hello, ZeroClaw!"
|
||||
@@ -195,111 +233,27 @@ zeroclaw agent --provider openai-codex --auth-profile openai-codex:work -m "hell
|
||||
zeroclaw agent --provider anthropic -m "hello"
|
||||
```
|
||||
|
||||
## 架构
|
||||
|
||||
每个子系统都是一个 **Trait** — 通过配置切换即可更换实现,无需修改代码。
|
||||
|
||||
<p align="center">
|
||||
<img src="docs/architecture.svg" alt="ZeroClaw 架构图" width="900" />
|
||||
</p>
|
||||
|
||||
| 子系统 | Trait | 内置实现 | 扩展方式 |
|
||||
|--------|-------|----------|----------|
|
||||
| **AI 模型** | `Provider` | 通过 `zeroclaw providers` 查看(当前 28 个内置 + 别名,以及自定义端点) | `custom:https://your-api.com`(OpenAI 兼容)或 `anthropic-custom:https://your-api.com` |
|
||||
| **通道** | `Channel` | CLI, Telegram, Discord, Slack, Mattermost, iMessage, Matrix, Signal, WhatsApp, Linq, Email, IRC, Lark, DingTalk, QQ, Webhook | 任意消息 API |
|
||||
| **记忆** | `Memory` | SQLite 混合搜索, PostgreSQL 后端, Lucid 桥接, Markdown 文件, 显式 `none` 后端, 快照/恢复, 可选响应缓存 | 任意持久化后端 |
|
||||
| **工具** | `Tool` | shell/file/memory, cron/schedule, git, pushover, browser, http_request, screenshot/image_info, composio (opt-in), delegate, 硬件工具 | 任意能力 |
|
||||
| **可观测性** | `Observer` | Noop, Log, Multi | Prometheus, OTel |
|
||||
| **运行时** | `RuntimeAdapter` | Native, Docker(沙箱) | 通过 adapter 添加;不支持的类型会快速失败 |
|
||||
| **安全** | `SecurityPolicy` | Gateway 配对, 沙箱, allowlist, 速率限制, 文件系统作用域, 加密密钥 | — |
|
||||
| **身份** | `IdentityConfig` | OpenClaw (markdown), AIEOS v1.1 (JSON) | 任意身份格式 |
|
||||
| **隧道** | `Tunnel` | None, Cloudflare, Tailscale, ngrok, Custom | 任意隧道工具 |
|
||||
| **心跳** | Engine | HEARTBEAT.md 定期任务 | — |
|
||||
| **技能** | Loader | TOML 清单 + SKILL.md 指令 | 社区技能包 |
|
||||
| **集成** | Registry | 9 个分类下 70+ 集成 | 插件系统 |
|
||||
|
||||
### 运行时支持(当前)
|
||||
|
||||
- ✅ 当前支持:`runtime.kind = "native"` 或 `runtime.kind = "docker"`
|
||||
- 🚧 计划中,尚未实现:WASM / 边缘运行时
|
||||
|
||||
配置了不支持的 `runtime.kind` 时,ZeroClaw 会以明确的错误退出,而非静默回退到 native。
|
||||
|
||||
### 记忆系统(全栈搜索引擎)
|
||||
|
||||
全部自研,零外部依赖 — 无需 Pinecone、Elasticsearch、LangChain:
|
||||
|
||||
| 层级 | 实现 |
|
||||
|------|------|
|
||||
| **向量数据库** | Embeddings 以 BLOB 存储于 SQLite,余弦相似度搜索 |
|
||||
| **关键词搜索** | FTS5 虚拟表,BM25 评分 |
|
||||
| **混合合并** | 自定义加权合并函数(`vector.rs`) |
|
||||
| **Embeddings** | `EmbeddingProvider` trait — OpenAI、自定义 URL 或 noop |
|
||||
| **分块** | 基于行的 Markdown 分块器,保留标题结构 |
|
||||
| **缓存** | SQLite `embedding_cache` 表,LRU 淘汰策略 |
|
||||
| **安全重索引** | 原子化重建 FTS5 + 重新嵌入缺失向量 |
|
||||
|
||||
Agent 通过工具自动进行记忆的回忆、保存和管理。
|
||||
|
||||
```toml
|
||||
[memory]
|
||||
backend = "sqlite" # "sqlite", "lucid", "postgres", "markdown", "none"
|
||||
auto_save = true
|
||||
embedding_provider = "none" # "none", "openai", "custom:https://..."
|
||||
vector_weight = 0.7
|
||||
keyword_weight = 0.3
|
||||
```
|
||||
|
||||
## 安全默认行为(关键)
|
||||
|
||||
- Gateway 默认绑定:`127.0.0.1:42617`
|
||||
- Gateway 默认要求配对:`require_pairing = true`
|
||||
- 默认拒绝公网绑定:`allow_public_bind = false`
|
||||
- Channel allowlist 语义:
|
||||
- 空列表 `[]` => deny-by-default
|
||||
- `"*"` => allow all(仅在明确知道风险时使用)
|
||||
|
||||
## 常用配置片段
|
||||
|
||||
```toml
|
||||
api_key = "sk-..."
|
||||
default_provider = "openrouter"
|
||||
default_model = "anthropic/claude-sonnet-4-6"
|
||||
default_temperature = 0.7
|
||||
|
||||
[memory]
|
||||
backend = "sqlite" # sqlite | lucid | markdown | none
|
||||
auto_save = true
|
||||
embedding_provider = "none" # none | openai | custom:https://...
|
||||
|
||||
[gateway]
|
||||
host = "127.0.0.1"
|
||||
port = 42617
|
||||
require_pairing = true
|
||||
allow_public_bind = false
|
||||
```
|
||||
|
||||
## 文档导航(推荐从这里开始)
|
||||
|
||||
- 文档总览(英文):[`docs/README.md`](docs/README.md)
|
||||
- 统一目录(TOC):[`docs/SUMMARY.md`](docs/SUMMARY.md)
|
||||
- 文档总览(简体中文):[`docs/README.zh-CN.md`](docs/README.zh-CN.md)
|
||||
- 命令参考:[`docs/commands-reference.md`](docs/commands-reference.md)
|
||||
- 配置参考:[`docs/config-reference.md`](docs/config-reference.md)
|
||||
- Provider 参考:[`docs/providers-reference.md`](docs/providers-reference.md)
|
||||
- Channel 参考:[`docs/channels-reference.md`](docs/channels-reference.md)
|
||||
- 运维手册:[`docs/operations-runbook.md`](docs/operations-runbook.md)
|
||||
- 故障排查:[`docs/troubleshooting.md`](docs/troubleshooting.md)
|
||||
- 文档清单与分类:[`docs/docs-inventory.md`](docs/docs-inventory.md)
|
||||
- 项目 triage 快照(2026-02-18):[`docs/project-triage-snapshot-2026-02-18.md`](docs/project-triage-snapshot-2026-02-18.md)
|
||||
|
||||
## 贡献与许可证
|
||||
|
||||
- 贡献指南:[`CONTRIBUTING.md`](CONTRIBUTING.md)
|
||||
- PR 工作流:[`docs/pr-workflow.md`](docs/pr-workflow.md)
|
||||
- Reviewer 指南:[`docs/reviewer-playbook.md`](docs/reviewer-playbook.md)
|
||||
- PR 工作流:[`docs/contributing/pr-workflow.md`](docs/i18n/zh-CN/contributing/pr-workflow.zh-CN.md)
|
||||
- Reviewer 指南:[`docs/contributing/reviewer-playbook.md`](docs/i18n/zh-CN/contributing/reviewer-playbook.zh-CN.md)
|
||||
- 许可证:MIT 或 Apache 2.0(见 [`LICENSE-MIT`](LICENSE-MIT)、[`LICENSE-APACHE`](LICENSE-APACHE) 与 [`NOTICE`](NOTICE))
|
||||
|
||||
<!-- BEGIN:RECENT_CONTRIBUTORS -->
|
||||
|
||||
### 🌟 Recent Contributors (v0.3.1)
|
||||
|
||||
3 contributors shipped features, fixes, and improvements in this release cycle:
|
||||
|
||||
- **Argenis**
|
||||
- **argenis de la rosa**
|
||||
- **Claude Opus 4.6**
|
||||
|
||||
Thank you to everyone who opened issues, reviewed PRs, translated docs, and helped test. Every contribution matters. 🦀
|
||||
|
||||
<!-- END:RECENT_CONTRIBUTORS -->
|
||||
|
||||
---
|
||||
|
||||
如果你需要完整实现细节(架构图、全部命令、完整 API、开发流程),请直接阅读英文主文档:[`README.md`](README.md)。
|
||||
|
||||
+2
-2
@@ -13,7 +13,7 @@
|
||||
Instead, please report them responsibly:
|
||||
|
||||
1. **Email**: Send details to the maintainers via GitHub private vulnerability reporting
|
||||
2. **GitHub**: Use [GitHub Security Advisories](https://github.com/theonlyhennygod/zeroclaw/security/advisories/new)
|
||||
2. **GitHub**: Use [GitHub Security Advisories](https://github.com/zeroclaw-labs/zeroclaw/security/advisories/new)
|
||||
|
||||
### What to Include
|
||||
|
||||
@@ -87,7 +87,7 @@ docker run --read-only -v /path/to/workspace:/workspace zeroclaw gateway
|
||||
|
||||
### CI Enforcement
|
||||
|
||||
The `docker` job in `.github/workflows/ci.yml` automatically verifies:
|
||||
The `docker` job in `.github/workflows/checks-on-pr.yml` automatically verifies:
|
||||
1. Container does not run as root (UID 0)
|
||||
2. Runtime stage uses `:nonroot` variant
|
||||
3. Explicit `USER` directive with numeric UID exists
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]:-$0}")" >/dev/null 2>&1 && pwd || pwd)"
|
||||
exec "$ROOT_DIR/zeroclaw_install.sh" "$@"
|
||||
@@ -0,0 +1,110 @@
|
||||
use std::path::Path;
|
||||
use std::process::Command;
|
||||
|
||||
fn main() {
|
||||
let dist_dir = Path::new("web/dist");
|
||||
let web_dir = Path::new("web");
|
||||
|
||||
// Tell Cargo to re-run this script when web source files change.
|
||||
println!("cargo:rerun-if-changed=web/src");
|
||||
println!("cargo:rerun-if-changed=web/index.html");
|
||||
println!("cargo:rerun-if-changed=web/package.json");
|
||||
println!("cargo:rerun-if-changed=web/vite.config.ts");
|
||||
|
||||
// Attempt to build the web frontend if npm is available and web/dist is
|
||||
// missing or stale. The build is best-effort: when Node.js is not
|
||||
// installed (e.g. CI containers, cross-compilation, minimal dev setups)
|
||||
// we fall back to the existing stub/empty dist directory so the Rust
|
||||
// build still succeeds.
|
||||
let needs_build = !dist_dir.join("index.html").exists();
|
||||
|
||||
if needs_build && web_dir.join("package.json").exists() {
|
||||
if let Ok(npm) = which_npm() {
|
||||
eprintln!("cargo:warning=Building web frontend (web/dist is missing or stale)...");
|
||||
|
||||
// npm ci / npm install
|
||||
let install_status = Command::new(&npm)
|
||||
.args(["ci", "--ignore-scripts"])
|
||||
.current_dir(web_dir)
|
||||
.status();
|
||||
|
||||
match install_status {
|
||||
Ok(s) if s.success() => {}
|
||||
Ok(s) => {
|
||||
// Fall back to `npm install` if `npm ci` fails (no lockfile, etc.)
|
||||
eprintln!("cargo:warning=npm ci exited with {s}, trying npm install...");
|
||||
let fallback = Command::new(&npm)
|
||||
.args(["install"])
|
||||
.current_dir(web_dir)
|
||||
.status();
|
||||
if !matches!(fallback, Ok(s) if s.success()) {
|
||||
eprintln!("cargo:warning=npm install failed — skipping web build");
|
||||
ensure_dist_dir(dist_dir);
|
||||
return;
|
||||
}
|
||||
}
|
||||
Err(e) => {
|
||||
eprintln!("cargo:warning=Could not run npm: {e} — skipping web build");
|
||||
ensure_dist_dir(dist_dir);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// npm run build
|
||||
let build_status = Command::new(&npm)
|
||||
.args(["run", "build"])
|
||||
.current_dir(web_dir)
|
||||
.status();
|
||||
|
||||
match build_status {
|
||||
Ok(s) if s.success() => {
|
||||
eprintln!("cargo:warning=Web frontend built successfully.");
|
||||
}
|
||||
Ok(s) => {
|
||||
eprintln!(
|
||||
"cargo:warning=npm run build exited with {s} — web dashboard may be unavailable"
|
||||
);
|
||||
}
|
||||
Err(e) => {
|
||||
eprintln!(
|
||||
"cargo:warning=Could not run npm build: {e} — web dashboard may be unavailable"
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ensure_dist_dir(dist_dir);
|
||||
}
|
||||
|
||||
/// Ensure the dist directory exists so `rust-embed` does not fail at compile
|
||||
/// time even when the web frontend is not built.
|
||||
fn ensure_dist_dir(dist_dir: &Path) {
|
||||
if !dist_dir.exists() {
|
||||
std::fs::create_dir_all(dist_dir).expect("failed to create web/dist/");
|
||||
}
|
||||
}
|
||||
|
||||
/// Locate the `npm` binary on the system PATH.
|
||||
fn which_npm() -> Result<String, ()> {
|
||||
let cmd = if cfg!(target_os = "windows") {
|
||||
"where"
|
||||
} else {
|
||||
"which"
|
||||
};
|
||||
|
||||
Command::new(cmd)
|
||||
.arg("npm")
|
||||
.output()
|
||||
.ok()
|
||||
.and_then(|output| {
|
||||
if output.status.success() {
|
||||
String::from_utf8(output.stdout)
|
||||
.ok()
|
||||
.map(|s| s.lines().next().unwrap_or("npm").trim().to_string())
|
||||
} else {
|
||||
None
|
||||
}
|
||||
})
|
||||
.ok_or(())
|
||||
}
|
||||
@@ -25,7 +25,7 @@ vision = [] # Camera + vision model
|
||||
# zeroclaw = { path = "../..", optional = true }
|
||||
|
||||
# Async runtime
|
||||
tokio = { version = "1.42", features = ["rt-multi-thread", "macros", "time", "sync", "process", "fs", "io-util"] }
|
||||
tokio = { version = "1.50", features = ["rt-multi-thread", "macros", "time", "sync", "process", "fs", "io-util"] }
|
||||
|
||||
# Serialization
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
@@ -51,6 +51,9 @@ tracing = "0.1"
|
||||
# Time handling
|
||||
chrono = { version = "0.4", features = ["clock", "std"] }
|
||||
|
||||
# Portable atomics for 32-bit targets
|
||||
portable-atomic = "1"
|
||||
|
||||
# User directories
|
||||
directories = "6.0"
|
||||
|
||||
@@ -61,7 +64,7 @@ rppal = { version = "0.22", optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
tokio-test = "0.4"
|
||||
tempfile = "3.14"
|
||||
tempfile = "3.26"
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
all-features = true
|
||||
|
||||
@@ -171,7 +171,7 @@ sudo usermod -aG dialout $USER
|
||||
|
||||
```bash
|
||||
# Clone repo (or copy from USB)
|
||||
git clone https://github.com/theonlyhennygod/zeroclaw
|
||||
git clone https://github.com/zeroclaw-labs/zeroclaw
|
||||
cd zeroclaw
|
||||
|
||||
# Build robot kit
|
||||
|
||||
@@ -19,7 +19,8 @@
|
||||
use crate::config::{RobotConfig, SafetyConfig};
|
||||
use crate::traits::ToolResult;
|
||||
use anyhow::Result;
|
||||
use std::sync::atomic::{AtomicBool, AtomicU64, Ordering};
|
||||
use portable_atomic::{AtomicU64, Ordering};
|
||||
use std::sync::atomic::AtomicBool;
|
||||
use std::sync::Arc;
|
||||
use std::time::{Duration, Instant};
|
||||
use tokio::sync::{broadcast, RwLock};
|
||||
|
||||
@@ -50,6 +50,11 @@ Commands:
|
||||
lint-strict Run rustfmt + full clippy warnings gate (container only)
|
||||
lint-delta Run strict lint delta gate on changed Rust lines (container only)
|
||||
test Run cargo test (container only)
|
||||
test-component Run component tests only
|
||||
test-integration Run integration tests only
|
||||
test-system Run system tests only
|
||||
test-live Run live tests (requires credentials)
|
||||
test-manual Run manual test scripts (dockerignore, etc.)
|
||||
build Run release build smoke check (container only)
|
||||
audit Run cargo audit (container only)
|
||||
deny Run cargo deny check (container only)
|
||||
@@ -90,6 +95,26 @@ case "$1" in
|
||||
run_in_ci "cargo test --locked --verbose"
|
||||
;;
|
||||
|
||||
test-component)
|
||||
run_in_ci "cargo test --test component --locked --verbose"
|
||||
;;
|
||||
|
||||
test-integration)
|
||||
run_in_ci "cargo test --test integration --locked --verbose"
|
||||
;;
|
||||
|
||||
test-system)
|
||||
run_in_ci "cargo test --test system --locked --verbose"
|
||||
;;
|
||||
|
||||
test-live)
|
||||
run_in_ci "cargo test --test live -- --ignored --verbose"
|
||||
;;
|
||||
|
||||
test-manual)
|
||||
run_in_ci "bash tests/manual/test_dockerignore.sh"
|
||||
;;
|
||||
|
||||
build)
|
||||
run_in_ci "cargo build --release --locked --verbose"
|
||||
;;
|
||||
@@ -115,6 +140,7 @@ case "$1" in
|
||||
all)
|
||||
run_in_ci "./scripts/ci/rust_quality_gate.sh"
|
||||
run_in_ci "cargo test --locked --verbose"
|
||||
run_in_ci "bash tests/manual/test_dockerignore.sh"
|
||||
run_in_ci "cargo build --release --locked --verbose"
|
||||
run_in_ci "cargo deny check licenses sources"
|
||||
run_in_ci "cargo audit"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user