Merge origin/main (licence manager on the bus, issue 1409) into feat/47-G-join9
claude-code's and mesh-vault's manifests take both sides' additions (G's seat reads and findings-asked, main's licence seat verbs and events); claude-code's manifest test lists both. mesh-vault's licence-bindings follower still uses the removed views.FindingWriter: fixed after. Builds: design 47 G §610 Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
This commit is contained in:
@@ -4,7 +4,74 @@
|
||||
"slug": "licmgr",
|
||||
"requires": [
|
||||
"postgres-database",
|
||||
"secret"
|
||||
"secret",
|
||||
{
|
||||
"name": "licences",
|
||||
"storage": "key-value",
|
||||
"template": "state",
|
||||
"options": {
|
||||
"history": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "bindings",
|
||||
"storage": "key-value",
|
||||
"template": "state",
|
||||
"options": {
|
||||
"history": 8
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "leases",
|
||||
"storage": "key-value",
|
||||
"template": "state",
|
||||
"options": {
|
||||
"history": 1,
|
||||
"key-ttl": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "offered",
|
||||
"storage": "key-value",
|
||||
"template": "state",
|
||||
"options": {
|
||||
"history": 1,
|
||||
"key-ttl": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "usage",
|
||||
"storage": "stream",
|
||||
"template": "log",
|
||||
"options": {
|
||||
"max-age-days": 35,
|
||||
"max-mib": 256
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "audit",
|
||||
"storage": "stream",
|
||||
"template": "log",
|
||||
"options": {
|
||||
"max-mib": 64
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "carried",
|
||||
"storage": "key-value",
|
||||
"template": "state",
|
||||
"options": {
|
||||
"history": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "conditions",
|
||||
"storage": "key-value",
|
||||
"template": "state",
|
||||
"options": {
|
||||
"history": 1
|
||||
}
|
||||
}
|
||||
],
|
||||
"contributes": {
|
||||
"postgres-database": {
|
||||
@@ -24,6 +91,15 @@
|
||||
"grant-key": "${dir:state}/grant.key"
|
||||
}
|
||||
},
|
||||
"uses": [
|
||||
"operator-channel"
|
||||
],
|
||||
"invokes": [
|
||||
"seat:operator-channel.tell",
|
||||
"seat:mesh-vault.licence-put",
|
||||
"seat:mesh-vault.get",
|
||||
"seat:mesh-config.config"
|
||||
],
|
||||
"seats": [
|
||||
{
|
||||
"name": "anthropic-licence-manager",
|
||||
@@ -63,18 +139,14 @@
|
||||
"emits": [
|
||||
"licence.adopted",
|
||||
"licence.refused",
|
||||
"licence.bound",
|
||||
"licence.switched",
|
||||
"licence.released",
|
||||
"licence.rotated",
|
||||
"licence.failing",
|
||||
"usage.read"
|
||||
"usage.read",
|
||||
"binding.changed",
|
||||
"holdings.asked"
|
||||
],
|
||||
"state": [
|
||||
"bindings"
|
||||
],
|
||||
"reads": [
|
||||
"claude-code.holdings"
|
||||
"consumes": [
|
||||
"claude-code.holdings-changed"
|
||||
],
|
||||
"config": {
|
||||
"cadence_minutes": {
|
||||
@@ -111,6 +183,52 @@
|
||||
"minimum": 0,
|
||||
"trusted": true,
|
||||
"default": 3
|
||||
},
|
||||
"switch_auto": {
|
||||
"type": "boolean",
|
||||
"description": "Whether the manager moves every consumer off a licence whose session or weekly usage reaches switch_at_pct, to the licence with the most room; off, it still raises its no-room and near-limit conditions.",
|
||||
"trusted": true,
|
||||
"default": true
|
||||
},
|
||||
"switch_at_pct": {
|
||||
"type": "number",
|
||||
"description": "The session or weekly usage of a licence, in percent, at which its consumers are moved to the licence with the most room.",
|
||||
"minimum": 1,
|
||||
"maximum": 100,
|
||||
"trusted": true,
|
||||
"default": 99
|
||||
},
|
||||
"room_below_pct": {
|
||||
"type": "number",
|
||||
"description": "What both the session and the weekly usage of a licence must be below, in percent, for it to be a target of a switch.",
|
||||
"minimum": 1,
|
||||
"maximum": 100,
|
||||
"trusted": true,
|
||||
"default": 90
|
||||
},
|
||||
"warn_at_pct": {
|
||||
"type": "number",
|
||||
"description": "The session or weekly usage of a licence with consumers, in percent, at which it is warned about once.",
|
||||
"minimum": 1,
|
||||
"maximum": 100,
|
||||
"trusted": true,
|
||||
"default": 90
|
||||
},
|
||||
"usage_minutes": {
|
||||
"type": "number",
|
||||
"description": "How often each subscription's usage is read, in minutes.",
|
||||
"minimum": 1,
|
||||
"maximum": 60,
|
||||
"trusted": true,
|
||||
"default": 5
|
||||
},
|
||||
"usage_stale_minutes": {
|
||||
"type": "number",
|
||||
"description": "How old a subscription's last successful usage reading may grow before its room is not known and it is said, in minutes.",
|
||||
"minimum": 5,
|
||||
"maximum": 180,
|
||||
"trusted": true,
|
||||
"default": 15
|
||||
}
|
||||
},
|
||||
"resources": [
|
||||
@@ -133,28 +251,33 @@
|
||||
"type": "file",
|
||||
"path": "${dir:state}/settings.json",
|
||||
"mode": "0600",
|
||||
"takes-config": ["cadence_minutes", "floor_minutes", "failures_to_notify", "cooldown_hours", "refresh_warn_days"],
|
||||
"takes-config": [
|
||||
"cadence_minutes",
|
||||
"floor_minutes",
|
||||
"failures_to_notify",
|
||||
"cooldown_hours",
|
||||
"refresh_warn_days",
|
||||
"switch_auto",
|
||||
"switch_at_pct",
|
||||
"room_below_pct",
|
||||
"warn_at_pct",
|
||||
"usage_minutes",
|
||||
"usage_stale_minutes"
|
||||
],
|
||||
"merge": "json",
|
||||
"template": "files/settings.json"
|
||||
},
|
||||
{
|
||||
"id": "prepare",
|
||||
"type": "process",
|
||||
"name": "claude-licence-manager-prepare",
|
||||
"artifact": "code",
|
||||
"run": [
|
||||
"./claude-licence-manager",
|
||||
"prepare"
|
||||
],
|
||||
"run-once": true,
|
||||
"env": {
|
||||
"DATABASE_URL_FILE": "${dir:state}/database.url"
|
||||
},
|
||||
"restart-on": [
|
||||
"database-url"
|
||||
]
|
||||
}
|
||||
],
|
||||
"tools": [
|
||||
"licences_switches",
|
||||
"licences_read_usage",
|
||||
"licences_switch_now",
|
||||
"licences_settings",
|
||||
"licences_kept",
|
||||
"licences_resync",
|
||||
"licences_conditions",
|
||||
"licences_carried"
|
||||
],
|
||||
"build": {
|
||||
"artifacts": [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user