From 69dcb908281ce3f11839e55065650dae69dbfb8a Mon Sep 17 00:00:00 2001 From: DROOdotFOO Date: Sat, 8 Aug 2026 18:58:53 +0200 Subject: [PATCH 1/2] Document Emacs setup and fix stale doc references Add an Emacs section to CLAUDE.md covering the four non-obvious constraints: the ~/.emacs.d shadow, XDG state redirection, the daemon's missing mise shims, and load-time gating of modes and eglot. List the new make targets and add an Emacs keybinding table to the README. Also correct references that were already wrong: - make doctor claimed 32 checks; it reports 43 - docs/README.md linked advanced-usage.md, which does not exist, and referenced make performance-monitor, which is not a target - the prettier hook never runs (types is an AND), so drop the claim that it formats JSON/YAML/Markdown --- CLAUDE.md | 26 ++++++++++++++++++++++++-- README.md | 17 ++++++++++++++++- docs/README.md | 6 ++++-- 3 files changed, 44 insertions(+), 5 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index f3581a5..97a2bfb 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -16,7 +16,7 @@ chezmoi apply # Apply local source changes to home directory chezmoi apply --force # Skip prompts for modified target files make lint # shellcheck on scripts/ and utils/ -make doctor # Health check (32 checks across tools, config, security) +make doctor # Health check across tools, config, security make perf # 5-run shell startup benchmark make perf-report # Bare vs configured startup breakdown make test # Test suite (zsh syntax, module loading) @@ -31,6 +31,11 @@ make setup-secrets # Install 1Password, AWS CLI, Infisical, Tailscale make rotate-keys # SSH key rotation via 1Password + Tailscale sync make theme-generate # Generate all tool configs from unified theme make lazy-load-stats # Show lazy loading stats + +make setup-emacs # Emacs config, packages, grammars, daemon restart +make emacs-status # Emacs version, daemon, packages, grammars +make emacs-grammars # Compile missing tree-sitter grammars +make emacs-restart # Restart the Emacs daemon ``` ## Chezmoi Architecture @@ -103,7 +108,9 @@ Setup scripts follow the pattern: `scripts/setup/setup-.sh` with subcomman ## Pre-commit Hooks -Commits run: trailing-whitespace, end-of-file-fixer, check-yaml, check-added-large-files (500KB), check-merge-conflict, shellcheck (error level, `-x` to follow sources, excludes `home/dot_zsh/*.zsh`), black (Python), prettier (JSON/YAML/Markdown). Encrypted files (`encrypted_*`) are excluded from whitespace hooks. +Commits run: trailing-whitespace, end-of-file-fixer, check-yaml, check-added-large-files (500KB), check-merge-conflict, shellcheck (error level, `-x` to follow sources, excludes `home/dot_zsh/*.zsh`), black (Python). Encrypted files (`encrypted_*`) are excluded from whitespace hooks. + +The prettier hook is configured but **never runs**: it uses `types: [json, yaml, markdown]`, and pre-commit treats `types` as an AND, so no single file can match all three. Changing it to `types_or` would activate it -- and reformat every JSON/YAML/Markdown file in the repo in one commit. ## Theming @@ -113,6 +120,21 @@ Single source of truth: `[data.theme]` in `chezmoi.toml` (Synthwave84 palette). Authoritative source for both is the shipped Zed theme JSON (`~/Library/Application Support/Zed/extensions/installed/synthwave84/themes/synthwave84.json`), not `config/theme/synthwave84.toml`, which had drifted on `keyword` and `type`. +## Emacs + +Vanilla Emacs 30 (`emacs-plus@30`) at `~/.config/emacs`, source `home/private_dot_config/emacs/`. Runs as a daemon under `brew services`; `e` and `eg` (in `aliases/dev.zsh`) open terminal and GUI frames. `EDITOR` stays `nvim`. + +Layout: `early-init.el.tmpl` (pre-frame), `init.el`, `lisp/droo-{defaults,ui,completion,git,lang,lsp}.el`, `themes/synthwave84-soft-theme.el.tmpl`, `banner.txt`. Only the two `.tmpl` files interpolate -- colors live solely in the theme. + +Four things that are easy to get wrong: + +- **`~/.emacs.d` silently wins.** `startup--xdg-or-homedot` (`startup.el`) returns `~/.emacs.d` whenever that directory merely *exists* -- it never checks for an `init.el`. If it reappears, the entire XDG config is ignored with no error. `make doctor` fails on this, and `setup-emacs.sh` offers to trash it. +- **Runtime state must stay out of the config tree.** `~/.config/emacs` is chezmoi-managed, so anything Emacs writes there becomes `chezmoi verify` drift. `early-init.el` redirects `package-user-dir`, the eln cache, `custom-file`, and grammars to XDG data/cache/state. This is why no `home/.chezmoiignore` was needed -- adding one would newly activate as chezmoi's real ignore file. +- **The daemon does not inherit mise.** mise activates from `.zshrc`, which `exec-path-from-shell -l` never sources, so mise-managed servers (`ruff`, `rust-analyzer`) are invisible. `droo-defaults.el` adds `~/.local/share/mise/shims` to `exec-path` explicitly. +- **Language modes and eglot are gated.** `droo-lang.el` only remaps a major mode when its tree-sitter grammar is present, and `droo-lsp.el` only hooks `eglot-ensure` when the server binary is on `PATH` -- missing pieces degrade quietly instead of erroring. Both decide at load time, so **restart the daemon after `make emacs-grammars`** or installing a server. + +Adding a language: add the grammar to `treesit-language-source-alist` and the mode to `auto-mode-alist` (or `major-mode-remap-alist`) in `droo-lang.el`, add the server to `droo/eglot-servers` in `droo-lsp.el`, then `make emacs-grammars && make emacs-restart`. + ## Adding Features **New alias**: Add to `home/dot_zsh/aliases/dev.zsh` diff --git a/README.md b/README.md index 6b2f7ca..8914bc3 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ brew install chezmoi && chezmoi init --apply https://github.com/DROOdotFOO/dotfi | Category | Tools | | ------------- | ------------------------------------------------------------ | | **Terminal** | Ghostty, tmux | -| **Editors** | Zed, Neovim (27 plugins, mona.nvim) | +| **Editors** | Zed, Neovim (27 plugins, mona.nvim), Emacs 30 (eglot + treesit) | | **Shell** | Zsh + Starship + fzf + zoxide | | **CLI** | eza, bat, fd, ripgrep, delta, jq, yq | | **Files** | yazi with image/PDF/archive preview | @@ -101,6 +101,20 @@ PaperWM tiling -- enable with `paperwm = true` in chezmoi.toml, then `make setup | `s` | Flash jump | | `gd` | Go to definition | +### Emacs + +Runs as a daemon under `brew services`. `e` opens a terminal frame, `eg` a GUI frame. + +| Key | Action | +| --------- | ---------------------------- | +| `C-s` | Search buffer (consult-line) | +| `C-x b` | Switch buffer | +| `C-x g` | Magit status | +| `C-x p f` | Find file in project | +| `C-.` | Context actions (embark) | +| `C-c l r` | LSP rename (eglot) | +| `M-n` | Next diagnostic | + ## Commands ```bash @@ -173,6 +187,7 @@ dotfiles/ │ │ ├── ghostty/ # Terminal │ │ ├── zed/ # Editor │ │ ├── nvim/ # Neovim (27 plugins) +│ │ ├── emacs/ # Emacs 30 (XDG; theme is templated) │ │ ├── btop/ # System monitor │ │ ├── yazi/ # File manager │ │ ├── fastfetch/ # System info diff --git a/docs/README.md b/docs/README.md index 6732a43..c40d066 100644 --- a/docs/README.md +++ b/docs/README.md @@ -3,8 +3,10 @@ ## Index - **[Main README](../README.md)** - Quick start and overview -- **[Advanced Usage](advanced-usage.md)** - Configuration and customization - **[Project Templates](templates.md)** - Template reference +- **[Performance](performance.md)** - Shell startup profiling +- **[Neovim Plugins](nvim-plugins.md)** - Plugin reference +- **[NixOS Installation](nixos-installation.md)** - NixOS setup ## Quick Reference @@ -19,7 +21,7 @@ make generate-template web3 my-project --with-direnv make doctor # Performance monitoring -make performance-monitor ACTION=measure +make perf ``` ## Environment Shortcuts From 0663b0c200cf200e8723fb5cafc6809499db1cec Mon Sep 17 00:00:00 2001 From: DROOdotFOO Date: Sat, 8 Aug 2026 19:12:41 +0200 Subject: [PATCH 2/2] Activate the prettier hook and reformat The hook used `types: [json, yaml, markdown]`, which pre-commit treats as an AND -- no file can be all three, so prettier silently never ran on any commit. Switch to types_or and apply the resulting formatting. Only four files needed changes, mostly markdown table alignment. The reformatted .luarc.json is semantically identical, and no chezmoi template is affected: a .json.tmpl is not detected as JSON. Also drops the README's stale "32-point health check". --- .pre-commit-config.yaml | 4 +- CLAUDE.md | 70 +++++++++---------- README.md | 30 ++++---- .../references/seller.md | 26 ++++++- home/private_dot_config/nvim/dot_luarc.json | 4 +- 5 files changed, 77 insertions(+), 57 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8307399..89c6ec6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -27,4 +27,6 @@ repos: rev: v3.1.0 hooks: - id: prettier - types: [json, yaml, markdown] + # types_or, not types: pre-commit ANDs `types`, so a single file could + # never be json AND yaml AND markdown, and the hook matched nothing. + types_or: [json, yaml, markdown] diff --git a/CLAUDE.md b/CLAUDE.md index 97a2bfb..04feac1 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -108,9 +108,9 @@ Setup scripts follow the pattern: `scripts/setup/setup-.sh` with subcomman ## Pre-commit Hooks -Commits run: trailing-whitespace, end-of-file-fixer, check-yaml, check-added-large-files (500KB), check-merge-conflict, shellcheck (error level, `-x` to follow sources, excludes `home/dot_zsh/*.zsh`), black (Python). Encrypted files (`encrypted_*`) are excluded from whitespace hooks. +Commits run: trailing-whitespace, end-of-file-fixer, check-yaml, check-added-large-files (500KB), check-merge-conflict, shellcheck (error level, `-x` to follow sources, excludes `home/dot_zsh/*.zsh`), black (Python), prettier (JSON/YAML/Markdown). Encrypted files (`encrypted_*`) are excluded from whitespace hooks. -The prettier hook is configured but **never runs**: it uses `types: [json, yaml, markdown]`, and pre-commit treats `types` as an AND, so no single file can match all three. Changing it to `types_or` would activate it -- and reformat every JSON/YAML/Markdown file in the repo in one commit. +Note the prettier hook uses `types_or`, not `types` -- pre-commit ANDs `types`, so the original `types: [json, yaml, markdown]` matched nothing and the hook silently never ran. Chezmoi templates are unaffected either way: a `.json.tmpl` is not detected as JSON. ## Theming @@ -128,7 +128,7 @@ Layout: `early-init.el.tmpl` (pre-frame), `init.el`, `lisp/droo-{defaults,ui,com Four things that are easy to get wrong: -- **`~/.emacs.d` silently wins.** `startup--xdg-or-homedot` (`startup.el`) returns `~/.emacs.d` whenever that directory merely *exists* -- it never checks for an `init.el`. If it reappears, the entire XDG config is ignored with no error. `make doctor` fails on this, and `setup-emacs.sh` offers to trash it. +- **`~/.emacs.d` silently wins.** `startup--xdg-or-homedot` (`startup.el`) returns `~/.emacs.d` whenever that directory merely _exists_ -- it never checks for an `init.el`. If it reappears, the entire XDG config is ignored with no error. `make doctor` fails on this, and `setup-emacs.sh` offers to trash it. - **Runtime state must stay out of the config tree.** `~/.config/emacs` is chezmoi-managed, so anything Emacs writes there becomes `chezmoi verify` drift. `early-init.el` redirects `package-user-dir`, the eln cache, `custom-file`, and grammars to XDG data/cache/state. This is why no `home/.chezmoiignore` was needed -- adding one would newly activate as chezmoi's real ignore file. - **The daemon does not inherit mise.** mise activates from `.zshrc`, which `exec-path-from-shell -l` never sources, so mise-managed servers (`ruff`, `rust-analyzer`) are invisible. `droo-defaults.el` adds `~/.local/share/mise/shims` to `exec-path` explicitly. - **Language modes and eglot are gated.** `droo-lang.el` only remaps a major mode when its tree-sitter grammar is present, and `droo-lsp.el` only hooks `eglot-ensure` when the server binary is on `PATH` -- missing pieces degrade quietly instead of erroring. Both decide at load time, so **restart the daemon after `make emacs-grammars`** or installing a server. @@ -170,22 +170,22 @@ Local skills (`ethskills/`, `solidity-auditor/`, `noir/`) provide offline Ethere Managed via `~/.mcp.json` (chezmoi template: `home/dot_mcp.json.tmpl`). Toggle in `chezmoi.toml`, then `chezmoi apply`. -| Server | Flag | Transport | Notes | -| ------------ | ---------------- | ---------- | --------------------------------- | -| context7 | always on | stdio | Library docs via npx | -| blockscout | always on | http | Blockchain data queries | -| coingecko | `coingecko` | http | Crypto market data | -| digest | `digest` | stdio | Multi-platform activity digest | -| recall | `recall` | stdio | Knowledge capture/retrieval (FTS5) | -| autoresearch | `autoresearch` | stdio | Autonomous experiment runner | -| watchdog | `watchdog` | stdio | Repo health monitor | -| prepper | `prepper` | stdio | Pre-session context builder | -| sentinel | `sentinel` | stdio | On-chain contract monitor | -| patchbot | `patchbot` | stdio | Polyglot dependency updater | -| signoz | `signoz` | stdio | Primary observability. API key from 1Password at runtime | -| regen | `regen` | stdio | Fluidify Regen incidents; wrapper injects `regen_url` (+ optional cookie). Correlates with signoz | -| datadog | `datadog` | http/OAuth | Disabled fallback (`datadog = false`). us5.datadoghq.com, no secrets | -| sentry | `sentry` | http/OAuth | mcp.sentry.dev, no secrets | +| Server | Flag | Transport | Notes | +| ------------ | -------------- | ---------- | ------------------------------------------------------------------------------------------------- | +| context7 | always on | stdio | Library docs via npx | +| blockscout | always on | http | Blockchain data queries | +| coingecko | `coingecko` | http | Crypto market data | +| digest | `digest` | stdio | Multi-platform activity digest | +| recall | `recall` | stdio | Knowledge capture/retrieval (FTS5) | +| autoresearch | `autoresearch` | stdio | Autonomous experiment runner | +| watchdog | `watchdog` | stdio | Repo health monitor | +| prepper | `prepper` | stdio | Pre-session context builder | +| sentinel | `sentinel` | stdio | On-chain contract monitor | +| patchbot | `patchbot` | stdio | Polyglot dependency updater | +| signoz | `signoz` | stdio | Primary observability. API key from 1Password at runtime | +| regen | `regen` | stdio | Fluidify Regen incidents; wrapper injects `regen_url` (+ optional cookie). Correlates with signoz | +| datadog | `datadog` | http/OAuth | Disabled fallback (`datadog = false`). us5.datadoghq.com, no secrets | +| sentry | `sentry` | http/OAuth | mcp.sentry.dev, no secrets | Agent MCP servers (coingecko through patchbot) all share the same ` serve` invocation pattern — they're CLIs from [agent-skills](https://github.com/DROOdotFOO/agent-skills) that double as MCP stdio servers. @@ -216,26 +216,26 @@ Skills are portable `SKILL.md` files sourced from [DROOdotFOO/agent-skills](http **Code pattern skills** -- language-specific examples and idioms: -| Skill | Triggers on | -| ----------- | -------------------------------------------------------------------------- | -| claude-api | `anthropic` imports, SDK usage | -| droo-stack | Elixir, TS, Go, Rust, C, Zig, Python, Lua, Shell, Noir, Chezmoi | -| raxol | Raxol TUI/agent imports, headless/MCP tools | -| raxol-payments | :raxol_payments/:raxol_earn, Xochi/Riddler, agent wallets, ACP jobs | -| raxol-symphony | :raxol_symphony, tracker-driven coding-agent orchestration | -| design-ux | Component design, layout, tokens, accessibility, TUI aesthetics, DESIGN.md | -| nix | `.nix` files, flakes, NixOS, Home Manager, agent-skills packaging, rigup | -| native-code | NIFs (C/Rust), SIMD (Zig), erl_nif.h, Rustler, BEAM native boundary | +| Skill | Triggers on | +| -------------- | -------------------------------------------------------------------------- | +| claude-api | `anthropic` imports, SDK usage | +| droo-stack | Elixir, TS, Go, Rust, C, Zig, Python, Lua, Shell, Noir, Chezmoi | +| raxol | Raxol TUI/agent imports, headless/MCP tools | +| raxol-payments | :raxol_payments/:raxol_earn, Xochi/Riddler, agent wallets, ACP jobs | +| raxol-symphony | :raxol_symphony, tracker-driven coding-agent orchestration | +| design-ux | Component design, layout, tokens, accessibility, TUI aesthetics, DESIGN.md | +| nix | `.nix` files, flakes, NixOS, Home Manager, agent-skills packaging, rigup | +| native-code | NIFs (C/Rust), SIMD (Zig), erl_nif.h, Rustler, BEAM native boundary | **Web3 skills** -- blockchain development, auditing, and data: -| Skill | Triggers on | -| -------------- | -------------------------------------------------------------------------- | -| ethskills | Ethereum tooling, EIP/ERC standards, framework selection | +| Skill | Triggers on | +| ---------------- | -------------------------------------------------------------------------- | +| ethskills | Ethereum tooling, EIP/ERC standards, framework selection | | solidity-auditor | `.sol` files, foundry.toml, auditing, security review | -| noir | `.nr` files, Nargo.toml, ZK circuits, Aztec contracts/security/e2e testing | -| blockscout | On-chain data queries, contract state, token balances, ENS, NFT holdings | -| coingecko | Token prices, market caps, DEX pools, trending tokens, price history | +| noir | `.nr` files, Nargo.toml, ZK circuits, Aztec contracts/security/e2e testing | +| blockscout | On-chain data queries, contract state, token balances, ENS, NFT holdings | +| coingecko | Token prices, market caps, DEX pools, trending tokens, price history | **MCP-companion skills** -- reference docs for MCP agent tools: diff --git a/README.md b/README.md index 8914bc3..c4d0316 100644 --- a/README.md +++ b/README.md @@ -23,21 +23,21 @@ brew install chezmoi && chezmoi init --apply https://github.com/DROOdotFOO/dotfi ## What's In Here -| Category | Tools | -| ------------- | ------------------------------------------------------------ | -| **Terminal** | Ghostty, tmux | +| Category | Tools | +| ------------- | --------------------------------------------------------------- | +| **Terminal** | Ghostty, tmux | | **Editors** | Zed, Neovim (27 plugins, mona.nvim), Emacs 30 (eglot + treesit) | -| **Shell** | Zsh + Starship + fzf + zoxide | -| **CLI** | eza, bat, fd, ripgrep, delta, jq, yq | -| **Files** | yazi with image/PDF/archive preview | -| **System** | btop, fastfetch, tldr (`help`) | -| **Windows** | Hammerspoon + PaperWM (macOS) | -| **Launcher** | Raycast (macOS) | -| **AI** | Claude Code (54 skills, 8 agents, 31 MCP tools) | -| **Secrets** | 1Password (SSH agent + age encryption), AWS CLI, Infisical | -| **Network** | Tailscale with pre-configured hosts | -| **Languages** | Elixir, Rust, Go, Python, Node.js, Lua (via mise) | -| **Fonts** | Monaspace + Nerd Font | +| **Shell** | Zsh + Starship + fzf + zoxide | +| **CLI** | eza, bat, fd, ripgrep, delta, jq, yq | +| **Files** | yazi with image/PDF/archive preview | +| **System** | btop, fastfetch, tldr (`help`) | +| **Windows** | Hammerspoon + PaperWM (macOS) | +| **Launcher** | Raycast (macOS) | +| **AI** | Claude Code (54 skills, 8 agents, 31 MCP tools) | +| **Secrets** | 1Password (SSH agent + age encryption), AWS CLI, Infisical | +| **Network** | Tailscale with pre-configured hosts | +| **Languages** | Elixir, Rust, Go, Python, Node.js, Lua (via mise) | +| **Fonts** | Monaspace + Nerd Font | ## Terminal Tools @@ -126,7 +126,7 @@ chezmoi apply # Apply local changes # Tools make brew-install # Install Brewfile packages make lint # Shellcheck everything -make doctor # 32-point health check +make doctor # Health check (tools, config, security) make setup-secrets # 1Password, AWS, Infisical, Tailscale make setup-paperwm # PaperWM.spoon for Hammerspoon make dashboard # Service status overview diff --git a/home/dot_agents/skills-extra/virtuals-protocol-acp/references/seller.md b/home/dot_agents/skills-extra/virtuals-protocol-acp/references/seller.md index 0ed4789..0499fcc 100644 --- a/home/dot_agents/skills-extra/virtuals-protocol-acp/references/seller.md +++ b/home/dot_agents/skills-extra/virtuals-protocol-acp/references/seller.md @@ -29,24 +29,29 @@ This is important so your agent can be easily found for its capabilities and off Before writing any code or files to set the job up, clearly understand what is being listed and sold to other agents on the ACP marketplace. If needed, have a conversation with the user to fully understand the services and value being provided. Be clear and first understand the following points: 1. **What does the job do?** + - "Describe what this service does for the client agent. What problem does it solve?" - Arrive at a clear **name** and **description** for the offering. - **Name constraints:** The offering name must start with a lowercase letter and contain only lowercase letters, numbers, and underscores (`[a-z][a-z0-9_]*`). For example: `donation_to_agent_autonomy`, `meme_generator`, `token_swap`. Names like `My Offering` or `Donation-Service` will be rejected by the ACP API. 2. **Does the user already have existing functionality?** + - "Do you already have code, an API, a script/workflow, or logic that this job should wrap or call into?" - If yes, understand what it does, what inputs it expects, and what it returns. This will shape the `executeJob` handler. 3. **What are the job inputs/requirements?** + - "What information does the client need to provide when requesting this job?" - Identify required vs optional fields and their types. These become the `requirement` JSON Schema in `offering.json`. 4. **What is the fee / business model?** + - "What's the business model for this service — a flat service fee, or a commission on the capital handled?" This determines `jobFeeType`. - **Fixed fee** (`"fixed"`): A flat USDC amount charged per job — like a service fee. Suitable for jobs that provide a service regardless of capital (e.g. data analysis, content generation, research). `jobFee` is the amount in USDC (number, > 0). - **Percentage fee** (`"percentage"`): A commission taken as a percentage of the capital/funds transferred from the buyer via `requestAdditionalFunds`. Suitable for jobs that handle the buyer's capital (e.g. token swaps, fund management, yield farming). `jobFee` is a decimal between 0.001 and 0.99 (e.g. 0.05 = 5%, 0.5 = 50%). **`requiredFunds` must be `true`** when using percentage pricing, since the fee is derived from the fund transfer amount. 5. **Does this job require additional funds transfer beyond the fee?** + - "Beyond the fee, does the client need to send additional assets/tokens for the job to be performed and executed?" — determines `requiredFunds` (true/false) - For example, requiredFunds refers to jobs which require capital to be transferred to the agent/seller to perform the job/service such as trading, fund management, yield farming, etc. - **If yes**, dig deeper: @@ -55,6 +60,7 @@ Before writing any code or files to set the job up, clearly understand what is b - This shapes the `requestAdditionalFunds` handler. 6. **Execution logic** + - "Walk me through what should happen when a job request comes in." - Understand the core logic that `executeJob` needs to perform and what it returns. - `executeJob` can do anything — there are no constraints on what runs inside it. Common patterns include: @@ -67,6 +73,7 @@ Before writing any code or files to set the job up, clearly understand what is b - The deliverable returned can be a plain text string, structured data, a transaction hash, a URL, or any result that is meaningful, of value, or proof of work executed and expected to be delivered to the buyer based on the job/task listed. 7. **Does the job return funds/tokens/assets back to the buyer as part of the deliverable?** + - "After executing the job, does the seller need to send tokens or assets back to the buyer?" — determines whether `executeJob` returns a `payableDetail`. - For example: a token swap job receives USDC from the buyer, performs the swap, and returns the swapped tokens back. A yield farming withdrawal job returns the withdrawn funds + earned profits. - Note: `requestAdditionalFunds` (funds in) and `payableDetail` (funds out) do not have to be in the same job. A deposit job may only receive funds, while a separate withdrawal job may only return funds. @@ -106,6 +113,7 @@ This creates the directory `src/seller/offerings///` ``` Fill in all fields: + - `description` — non-empty string describing the service - `jobFee` — the fee amount. For `"fixed"`: a flat USDC service fee (number, > 0). For `"percentage"`: a decimal between 0.001 and 0.99 representing the commission taken from the buyer's fund transfer (e.g. 0.05 = 5%). - `jobFeeType` — the business model: `"fixed"` for a flat service fee per job, or `"percentage"` for a commission on the capital transferred via `requestAdditionalFunds`. **`requiredFunds` must be `true` when using `"percentage"`.** @@ -145,7 +153,10 @@ This creates the directory `src/seller/offerings///` **Template structure** (this is what `acp sell init` generates): ```typescript - import type { ExecuteJobResult, ValidationResult } from "../../../runtime/offeringTypes.js"; + import type { + ExecuteJobResult, + ValidationResult, + } from "../../../runtime/offeringTypes.js"; // Required: implement your service logic here export async function executeJob(request: any): Promise { @@ -361,7 +372,11 @@ export async function executeJob(request: any): Promise { const priceHistory = await fetchPriceHistory(request.tokenAddress, "30d"); // Step 2: Run analysis - const report = await generateReport({ onChainData, socialData, priceHistory }); + const report = await generateReport({ + onChainData, + socialData, + priceHistory, + }); return { deliverable: report }; } @@ -371,7 +386,11 @@ export async function executeJob(request: any): Promise { ```typescript export async function executeJob(request: any): Promise { - const result = await performSwap(request.fromToken, request.toToken, request.amount); + const result = await performSwap( + request.fromToken, + request.toToken, + request.amount, + ); return { deliverable: `Swap completed. TX: ${result.txHash}`, payableDetail: { @@ -591,6 +610,7 @@ Resources are external APIs or services that your agent can register and make av ``` **Fields:** + - `name` — Unique identifier for the resource (required) - `description` — Human-readable description of what the resource provides (required) - `url` — The API endpoint URL for the resource (required). When queried, this URL will receive GET requests only. diff --git a/home/private_dot_config/nvim/dot_luarc.json b/home/private_dot_config/nvim/dot_luarc.json index 3efbecb..4e8dbf1 100644 --- a/home/private_dot_config/nvim/dot_luarc.json +++ b/home/private_dot_config/nvim/dot_luarc.json @@ -7,9 +7,7 @@ "globals": ["vim"] }, "workspace": { - "library": [ - "${3rd}/luv/library" - ], + "library": ["${3rd}/luv/library"], "checkThirdParty": false }, "telemetry": {