mirror of
https://github.com/profullstack/logicsrc.git
synced 2026-10-02 12:54:03 +00:00
release: prepare OpenFleet and OpenWall public contracts
This commit is contained in:
parent
b68109fd46
commit
b1556ed4a0
8 changed files with 73 additions and 18 deletions
34
packages/sdk/README.md
Normal file
34
packages/sdk/README.md
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
# @logicsrc/sdk
|
||||
|
||||
LogicSRC contract types and constructors for tasks, AgentSwarm sessions and
|
||||
OpenFleet descriptors. These helpers construct documents; they do not start
|
||||
agents, resolve remote identities or initiate payments.
|
||||
|
||||
```sh
|
||||
npm install @logicsrc/sdk @logicsrc/validators
|
||||
```
|
||||
|
||||
```ts
|
||||
import { createOpenFleet } from "@logicsrc/sdk";
|
||||
import { validate } from "@logicsrc/validators";
|
||||
|
||||
const fleet = createOpenFleet({
|
||||
id: "https://example.com/fleets/research",
|
||||
name: "Research",
|
||||
owner_did: "operator.coinpay",
|
||||
members: [{
|
||||
kind: "openagent",
|
||||
id: "analyst.coinpay",
|
||||
url: "https://example.com/agents/analyst.json"
|
||||
}]
|
||||
});
|
||||
|
||||
const result = validate("openfleet", fleet);
|
||||
if (!result.ok) throw new Error(JSON.stringify(result.errors));
|
||||
```
|
||||
|
||||
Use `@logicsrc/validators` 0.1.1 or newer for OpenFleet validation. See the
|
||||
[OpenFleet specification](https://logicsrc.com/docs/openfleet) for member
|
||||
bindings, exact decimal rental rates and CoinPay settlement metadata.
|
||||
|
||||
MIT © Profullstack, Inc.
|
||||
|
|
@ -11,5 +11,19 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"vitest": "^4.0.8"
|
||||
},
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/profullstack/logicsrc.git",
|
||||
"directory": "packages/sdk"
|
||||
},
|
||||
"homepage": "https://github.com/profullstack/logicsrc/tree/master/packages/sdk",
|
||||
"files": [
|
||||
"dist",
|
||||
"!dist/*.test.*"
|
||||
],
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue