mirror of
https://github.com/profullstack/logicsrc.git
synced 2026-08-13 14:37:26 +00:00
feat(agentstack): add @logicsrc/agentstack coordination module (#5)
* feat(agentstack): add @logicsrc/agentstack coordination module AgentStack is the LogicSRC module for portable agent, task, payment, and reputation coordination across Profullstack apps. Reference implementation of the `agentstack` capability in the Profullstack Shared AppKit OpenSpec. - packages/agentstack: DID helpers (did:coinpay:user/agent), DidTask model + lifecycle, AgentStack in-memory coordinator (agents, tasks, delegation, events), and a validated LogicSRC plugin definition. 9 vitest cases. - Wire @logicsrc/agentstack into the root build chain (after plugin-core). - docs/agentstack.md + mention in openspec-comparison.md. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * docs(agentstack): note dual-runtime support (Bun + Node.js + Workers + browser) Matches the revised Shared AppKit PRD's Runtime Compatibility Strategy. AgentStack is runtime-neutral (no Bun/Node-only APIs; time is injected). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
c23ce42948
commit
850cf5ea44
11 changed files with 632 additions and 2 deletions
85
docs/agentstack.md
Normal file
85
docs/agentstack.md
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
# AgentStack
|
||||
|
||||
Status: draft module
|
||||
|
||||
AgentStack (`@logicsrc/agentstack`) is the LogicSRC module for **portable agent, task,
|
||||
payment, and reputation coordination** across Profullstack microsaas apps. It is the
|
||||
reference implementation of the `agentstack` capability defined in the Profullstack Shared
|
||||
AppKit OpenSpec (`profullstack-web/openspec/specs/agentstack`).
|
||||
|
||||
## Why
|
||||
|
||||
Profullstack apps (sh1pt, uGig, qaaas.dev, crawlproof, commandboard.run, coinpayportal,
|
||||
logicsrc, intr0s) need to share agents, tasks, reputation, and payment context without
|
||||
forcing a shared login or one global account database. AgentStack provides a small,
|
||||
provider-neutral coordination layer on top of CoinPay DIDs.
|
||||
|
||||
## Identity model
|
||||
|
||||
```txt
|
||||
User DID: did:coinpay:user:123
|
||||
Agent DID: did:coinpay:agent:abc
|
||||
Task: task_123
|
||||
```
|
||||
|
||||
Each app keeps a local `users.id` and links it to a CoinPay DID. The same person can appear
|
||||
in many apps while every app independently owns its account:
|
||||
|
||||
```txt
|
||||
sh1pt.users.id -> did:coinpay:user:123
|
||||
ugig.users.id -> did:coinpay:user:123
|
||||
qaaas.users.id -> did:coinpay:user:123
|
||||
crawlproof.users.id -> did:coinpay:user:123
|
||||
```
|
||||
|
||||
## Task lifecycle
|
||||
|
||||
```txt
|
||||
pending -> queued -> running -> blocked -> complete | failed | cancelled
|
||||
```
|
||||
|
||||
A task may carry `paymentIntentId`, `escrowId`, and `reputationEventId` so coordination,
|
||||
payment, escrow, and reputation stay linked. Terminal statuses (`complete`, `failed`,
|
||||
`cancelled`) are final.
|
||||
|
||||
## Surface
|
||||
|
||||
- DID helpers: `userDid`, `agentDid`, `makeDid`, `parseDid`
|
||||
- `DidTask`, `AgentProfile`, `DelegationGrant` types
|
||||
- `AgentStack` coordinator: `registerAgent`, `createTask`, `assignTask`,
|
||||
`updateTaskStatus`, `delegate`, `revokeDelegation`, `listTasks`, `snapshot`, `on`
|
||||
- `agentStackPlugin` — a validated LogicSRC `PluginDefinition`
|
||||
|
||||
## Runtime
|
||||
|
||||
Runtime-neutral by design — pure TypeScript, no Bun- or Node-only APIs (time is injected via
|
||||
the `AgentStack` constructor). Runs on Bun, Node.js, Cloudflare Workers, and the browser,
|
||||
matching the Profullstack dual-runtime standard (Bun + Node.js both first-class).
|
||||
|
||||
## Plugin manifest
|
||||
|
||||
```jsonc
|
||||
{
|
||||
"id": "agentstack",
|
||||
"name": "AgentStack",
|
||||
"type": ["agents", "tasks", "coordination"],
|
||||
"capabilities": [
|
||||
"agents.register", "agents.delegate",
|
||||
"tasks.create", "tasks.assign", "tasks.update", "tasks.publish",
|
||||
"reputation.sync", "payments.link", "escrow.link"
|
||||
],
|
||||
"commands": ["agents", "tasks", "delegate"],
|
||||
"env": ["AGENTSTACK_API_URL", "AGENTSTACK_API_KEY", "COINPAY_API_BASE_URL"]
|
||||
}
|
||||
```
|
||||
|
||||
## Relationship to other modules
|
||||
|
||||
- **CoinPay plugin** — provides the DID/wallet/payment/escrow/reputation backend AgentStack
|
||||
references.
|
||||
- **uGig plugin** — publishes tasks to the jobs/gigs marketplace via `tasks.publish`.
|
||||
- **AgentSwarm orchestration** — higher-level multi-agent orchestration can consume
|
||||
AgentStack tasks and delegation grants.
|
||||
|
||||
See also [`openspec-comparison.md`](openspec-comparison.md) and the `agentstack` OpenSpec
|
||||
capability.
|
||||
|
|
@ -14,7 +14,7 @@ The projects can be complementary. LogicSRC should support an `--openspec` compa
|
|||
| CLI direction | `logicsrc` as the canonical OpenStandards CLI. | `@fission-ai/openspec` CLI and slash-command integrations with coding tools. |
|
||||
| MCP | LogicSRC has a standards MCP server and should expose resources, tools, and prompts. | Site states "No MCP" as a product trait. |
|
||||
| SDK/API | Planned Rust, Bun, Node, Python, curl, and PWA surfaces with matching contracts. | Focus appears to be repo workflow and agent planning artifacts rather than a cross-language SDK/API standard. |
|
||||
| Plugins | Plugin manifest standard plus CoinPay, uGig, AgentByte, Credential Sharing, and future integration specs. | Integrates with many coding agents and editors; plugin-contract scope is not the main positioning. |
|
||||
| Plugins | Plugin manifest standard plus CoinPay, uGig, AgentStack, AgentByte, Credential Sharing, and future integration specs. | Integrates with many coding agents and editors; plugin-contract scope is not the main positioning. |
|
||||
| Compatibility idea | `logicsrc --openspec` reads/writes OpenSpec.dev-style specs/proposals/tasks where useful. | Can remain the lightweight planning layer inside repos. |
|
||||
|
||||
## CLI Flags
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue