mirror of
https://github.com/profullstack/logicsrc.git
synced 2026-10-02 12:54:03 +00:00
feat: add OpenFleet membership and CoinPay rental contracts
This commit is contained in:
parent
a333726a1e
commit
b6cd7cfde2
16 changed files with 933 additions and 2 deletions
86
packages/schemas/fixtures/openfleet/mixed.json
Normal file
86
packages/schemas/fixtures/openfleet/mixed.json
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
{
|
||||
"type": "logicsrc.openfleet",
|
||||
"version": "0.1",
|
||||
"id": "https://example.com/fleets/research",
|
||||
"name": "Research and distribution fleet",
|
||||
"owner_did": "operator.coinpay",
|
||||
"description": "An analyst agent and an encrypted reference-data swarm, offered together or separately.",
|
||||
"updated_at": "2026-09-13T12:00:00Z",
|
||||
"availability": "available",
|
||||
"tags": [
|
||||
"research",
|
||||
"distribution"
|
||||
],
|
||||
"capabilities": [
|
||||
"analysis",
|
||||
"paid-seeding"
|
||||
],
|
||||
"metadata": {
|
||||
"region": "eu-west",
|
||||
"support_url": "https://example.com/support"
|
||||
},
|
||||
"members": [
|
||||
{
|
||||
"kind": "openagent",
|
||||
"id": "analyst.coinpay",
|
||||
"url": "https://example.com/agents/analyst.json",
|
||||
"name": "Analyst",
|
||||
"role": "analysis",
|
||||
"metadata": {
|
||||
"languages": [
|
||||
"en"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "openswarm",
|
||||
"id": "ed25519:0d87e09c7fea3ad6ba6c2f3e027ea47f5b245452899910948470906704c5295d",
|
||||
"url": "https://example.com/swarms/references/manifest.json",
|
||||
"name": "Reference corpus",
|
||||
"role": "reference-data"
|
||||
}
|
||||
],
|
||||
"rentals": [
|
||||
{
|
||||
"id": "fleet-hourly",
|
||||
"scope": {
|
||||
"kind": "fleet"
|
||||
},
|
||||
"rate": {
|
||||
"amount": "25.000000",
|
||||
"currency": "USD",
|
||||
"unit": "hour"
|
||||
},
|
||||
"minimum_units": 1,
|
||||
"maximum_units": 24,
|
||||
"terms_url": "https://example.com/rental-terms",
|
||||
"payment": {
|
||||
"provider": "coinpay",
|
||||
"payee_did": "operator.coinpay",
|
||||
"checkout_url": "https://example.com/rentals/research"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "analyst-task",
|
||||
"scope": {
|
||||
"kind": "members",
|
||||
"members": [
|
||||
{
|
||||
"kind": "openagent",
|
||||
"id": "analyst.coinpay"
|
||||
}
|
||||
]
|
||||
},
|
||||
"rate": {
|
||||
"amount": "5.500000",
|
||||
"currency": "USD",
|
||||
"unit": "task"
|
||||
},
|
||||
"payment": {
|
||||
"provider": "coinpay",
|
||||
"payee_did": "operator.coinpay",
|
||||
"checkout_url": "https://example.com/rentals/analyst"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@logicsrc/schemas",
|
||||
"version": "0.1.0",
|
||||
"description": "LogicSRC JSON schemas for tasks, agents, runs, events, plugins, the AgentAd ad standard, the OpenOntology knowledge contracts, the OpenContext context plane, and the OpenCreds credential vault.",
|
||||
"description": "LogicSRC JSON schemas for tasks, agents, runs, events, plugins, the AgentAd ad standard, the OpenOntology knowledge contracts, the OpenContext context plane, the OpenCreds credential vault, and OpenFleet membership and rental offers.",
|
||||
"license": "MIT",
|
||||
"type": "module",
|
||||
"repository": {
|
||||
|
|
@ -22,6 +22,7 @@
|
|||
"ontology",
|
||||
"opencontext",
|
||||
"opencreds",
|
||||
"openfleet",
|
||||
"openontology",
|
||||
"password-manager",
|
||||
"standards",
|
||||
|
|
@ -64,6 +65,7 @@
|
|||
"./opencreds-item": "./schemas/logicsrc-opencreds-item.schema.json",
|
||||
"./opencreds-manifest": "./schemas/logicsrc-opencreds-manifest.schema.json",
|
||||
"./opencreds-vault-meta": "./schemas/logicsrc-opencreds-vault-meta.schema.json",
|
||||
"./openfleet": "./schemas/logicsrc-openfleet.schema.json",
|
||||
"./openontology-action": "./schemas/logicsrc-openontology-action.schema.json",
|
||||
"./openontology-approval": "./schemas/logicsrc-openontology-approval.schema.json",
|
||||
"./openontology-changeset": "./schemas/logicsrc-openontology-changeset.schema.json",
|
||||
|
|
|
|||
323
packages/schemas/schemas/logicsrc-openfleet.schema.json
Normal file
323
packages/schemas/schemas/logicsrc-openfleet.schema.json
Normal file
|
|
@ -0,0 +1,323 @@
|
|||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://schemas.logicsrc.com/logicsrc-openfleet.schema.json",
|
||||
"title": "OpenFleet",
|
||||
"description": "A fleet of OpenAgent profiles and/or OpenSwarm swarms with explicit CoinPay rental offers.",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"type",
|
||||
"version",
|
||||
"id",
|
||||
"name",
|
||||
"owner_did",
|
||||
"members"
|
||||
],
|
||||
"properties": {
|
||||
"type": {
|
||||
"const": "logicsrc.openfleet"
|
||||
},
|
||||
"version": {
|
||||
"const": "0.1"
|
||||
},
|
||||
"id": {
|
||||
"$ref": "#/$defs/httpsUrl"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"maxLength": 120
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"owner_did": {
|
||||
"$ref": "https://schemas.logicsrc.com/logicsrc-agent.schema.json#/$defs/did"
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"availability": {
|
||||
"enum": [
|
||||
"available",
|
||||
"busy",
|
||||
"offline",
|
||||
"unknown"
|
||||
]
|
||||
},
|
||||
"tags": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"uniqueItems": true
|
||||
},
|
||||
"capabilities": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"uniqueItems": true
|
||||
},
|
||||
"metadata": {
|
||||
"type": "object"
|
||||
},
|
||||
"members": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"items": {
|
||||
"$ref": "#/$defs/member"
|
||||
}
|
||||
},
|
||||
"rentals": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/$defs/rental"
|
||||
}
|
||||
}
|
||||
},
|
||||
"$defs": {
|
||||
"httpsUrl": {
|
||||
"type": "string",
|
||||
"format": "uri",
|
||||
"pattern": "^https://"
|
||||
},
|
||||
"memberReference": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"kind",
|
||||
"id"
|
||||
],
|
||||
"properties": {
|
||||
"kind": {
|
||||
"const": "openagent"
|
||||
},
|
||||
"id": {
|
||||
"$ref": "https://schemas.logicsrc.com/logicsrc-agent.schema.json#/$defs/did"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"kind",
|
||||
"id"
|
||||
],
|
||||
"properties": {
|
||||
"kind": {
|
||||
"const": "openswarm"
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"pattern": "^ed25519:[0-9a-f]{64}$"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"member": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"kind",
|
||||
"id",
|
||||
"url"
|
||||
],
|
||||
"properties": {
|
||||
"kind": {
|
||||
"const": "openagent"
|
||||
},
|
||||
"id": {
|
||||
"$ref": "https://schemas.logicsrc.com/logicsrc-agent.schema.json#/$defs/did"
|
||||
},
|
||||
"url": {
|
||||
"$ref": "#/$defs/httpsUrl"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"role": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"metadata": {
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"kind",
|
||||
"id",
|
||||
"url"
|
||||
],
|
||||
"properties": {
|
||||
"kind": {
|
||||
"const": "openswarm"
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"pattern": "^ed25519:[0-9a-f]{64}$"
|
||||
},
|
||||
"url": {
|
||||
"$ref": "#/$defs/httpsUrl"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"role": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"metadata": {
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"scope": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"kind"
|
||||
],
|
||||
"properties": {
|
||||
"kind": {
|
||||
"const": "fleet"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"kind",
|
||||
"members"
|
||||
],
|
||||
"properties": {
|
||||
"kind": {
|
||||
"const": "members"
|
||||
},
|
||||
"members": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"items": {
|
||||
"$ref": "#/$defs/memberReference"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"rental": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"id",
|
||||
"scope",
|
||||
"rate",
|
||||
"payment"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"scope": {
|
||||
"$ref": "#/$defs/scope"
|
||||
},
|
||||
"rate": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"amount",
|
||||
"currency",
|
||||
"unit"
|
||||
],
|
||||
"properties": {
|
||||
"amount": {
|
||||
"type": "string",
|
||||
"pattern": "^(0|[1-9][0-9]*)\\.[0-9]{6}$",
|
||||
"description": "Non-negative USD decimal string with exactly six fractional digits; never a JSON number."
|
||||
},
|
||||
"currency": {
|
||||
"const": "USD"
|
||||
},
|
||||
"unit": {
|
||||
"enum": [
|
||||
"hour",
|
||||
"day",
|
||||
"month",
|
||||
"task"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"minimum_units": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 9007199254740991
|
||||
},
|
||||
"maximum_units": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 9007199254740991
|
||||
},
|
||||
"valid_from": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"valid_until": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"terms_url": {
|
||||
"$ref": "#/$defs/httpsUrl"
|
||||
},
|
||||
"payment": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"provider",
|
||||
"payee_did",
|
||||
"checkout_url"
|
||||
],
|
||||
"properties": {
|
||||
"provider": {
|
||||
"const": "coinpay"
|
||||
},
|
||||
"payee_did": {
|
||||
"$ref": "https://schemas.logicsrc.com/logicsrc-agent.schema.json#/$defs/did"
|
||||
},
|
||||
"checkout_url": {
|
||||
"$ref": "#/$defs/httpsUrl"
|
||||
}
|
||||
}
|
||||
},
|
||||
"metadata": {
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue