Scaffold LogicSRC and CommandBoard plugins

This commit is contained in:
Anthony Ettinger 2026-06-06 11:24:02 +00:00
parent 59927e140c
commit 5c9ea821f6
67 changed files with 5958 additions and 0 deletions

11
plugins/coinpay/README.md Normal file
View file

@ -0,0 +1,11 @@
# CoinPay Plugin
CoinPay is the default CommandBoard.run plugin for DID authentication, wallet connection, task escrow, payment release, refunds, tips, agent payouts, payment webhooks, and payment-backed reputation events.
Required environment:
```txt
COINPAY_API_URL
COINPAY_API_KEY
COINPAY_WEBHOOK_SECRET
```

View file

@ -0,0 +1,18 @@
{
"name": "@logicsrc/plugin-coinpay",
"version": "0.1.0",
"description": "Default CommandBoard.run DID, wallet, payment, and escrow plugin.",
"type": "module",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"scripts": {
"build": "tsc -p tsconfig.json",
"test": "vitest run src --passWithNoTests"
},
"dependencies": {
"@logicsrc/plugin-core": "file:../../packages/plugin-core"
},
"devDependencies": {
"vitest": "^4.0.8"
}
}

View file

@ -0,0 +1,33 @@
import type { PluginDefinition } from "@logicsrc/plugin-core";
import { coinPayManifest } from "./manifest.js";
export const coinPayPlugin: PluginDefinition = {
manifest: coinPayManifest,
configDefaults: {
enabled: true,
default_payment_provider: true,
default_identity_provider: true,
api_url: "${COINPAY_API_URL}",
api_key: "${COINPAY_API_KEY}",
webhook_secret: "${COINPAY_WEBHOOK_SECRET}"
},
routes: [
{ method: "POST", path: "/api/plugins/coinpay/did/auth", capability: "did.auth" },
{ method: "POST", path: "/api/plugins/coinpay/escrows", capability: "escrow.create" },
{ method: "POST", path: "/api/plugins/coinpay/webhooks/payment-status", capability: "webhook.payment_status" }
],
events: [
{ event: "task.approved", capability: "escrow.release" },
{ event: "payment.released", capability: "reputation.payment_event" }
],
permissions: [
"payments:read",
"payments:request",
"payments:release",
"escrows:create",
"escrows:refund"
],
tuiPanels: [{ id: "coinpay-status", title: "CoinPay" }]
};
export { coinPayManifest };

View file

@ -0,0 +1,23 @@
import type { PluginManifest } from "@logicsrc/plugin-core";
export const coinPayManifest: PluginManifest = {
id: "coinpay",
name: "CoinPay",
version: "1.0.0",
type: ["payment", "identity", "escrow"],
default: true,
capabilities: [
"did.auth",
"wallet.connect",
"payment.request",
"payment.send",
"escrow.create",
"escrow.fund",
"escrow.release",
"escrow.refund",
"webhook.payment_status",
"reputation.payment_event"
],
commands: ["wallet", "escrow", "pay", "tip"],
env: ["COINPAY_API_URL", "COINPAY_API_KEY", "COINPAY_WEBHOOK_SECRET"]
};

View file

@ -0,0 +1,8 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "dist"
},
"include": ["src/**/*.ts"]
}