mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-28 05:16:23 -06:00
7b000dba9d
* feat(reef): operator-configurable sharing rules for the guard Adds channels.reef.guard.rules with capped outbound/inbound free-text policy. Rules ride the trusted instruction side of the guard call only, may tighten decisions or explicitly allow otherwise-review cases, and can never override the deny floor or deterministic checks. The rules text is hashed into the effective policy version so audit rows and pending review approvals bind to the exact policy in force. * fix(reef): full rules digest in policy identity; align blank-rule validation ClawSweeper review fixes: use the untruncated sha256 rules digest in the effective policy version so approvalDigest stays collision-resistant, and express identical non-blank (\S) rule validation in the zod schema, the manifest JSON Schemas, and the generated channel metadata instead of a trim-transform mismatch.
211 lines
4.9 KiB
JSON
211 lines
4.9 KiB
JSON
{
|
|
"id": "reef",
|
|
"doctorContract": {
|
|
"configRepair": true,
|
|
"stateMigrations": true
|
|
},
|
|
"name": "Reef",
|
|
"description": "Guarded end-to-end encrypted claw channel",
|
|
"cliCommands": [
|
|
{
|
|
"name": "reef",
|
|
"description": "Register on a Reef relay and manage guarded claw-to-claw friendships",
|
|
"hasSubcommands": true
|
|
}
|
|
],
|
|
"activation": {
|
|
"onStartup": true,
|
|
"onCommands": [
|
|
"reef"
|
|
]
|
|
},
|
|
"channels": [
|
|
"reef"
|
|
],
|
|
"configSchema": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"relayUrl": {
|
|
"type": "string",
|
|
"format": "uri",
|
|
"pattern": "^[hH][tT][tT][pP][sS]?://[^\\\\/?#@]+/?$",
|
|
"default": "https://reefwire.ai"
|
|
},
|
|
"handle": {
|
|
"type": "string",
|
|
"pattern": "^[a-z0-9][a-z0-9_-]{0,62}$"
|
|
},
|
|
"email": {
|
|
"type": "string",
|
|
"format": "email"
|
|
},
|
|
"guard": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"provider",
|
|
"pinnedModel",
|
|
"apiKeyEnv",
|
|
"policyVersion",
|
|
"timeoutMs"
|
|
],
|
|
"properties": {
|
|
"provider": {
|
|
"enum": [
|
|
"anthropic",
|
|
"openai"
|
|
]
|
|
},
|
|
"pinnedModel": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"apiKeyEnv": {
|
|
"type": "string",
|
|
"pattern": "^[A-Z_][A-Z0-9_]*$"
|
|
},
|
|
"policyVersion": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"timeoutMs": {
|
|
"type": "integer",
|
|
"minimum": 100,
|
|
"maximum": 120000
|
|
},
|
|
"rules": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"outbound": {
|
|
"type": "string",
|
|
"maxLength": 2000,
|
|
"pattern": "\\S"
|
|
},
|
|
"inbound": {
|
|
"type": "string",
|
|
"maxLength": 2000,
|
|
"pattern": "\\S"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"stateDir": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"requestPolicy": {
|
|
"enum": [
|
|
"code-only",
|
|
"friends-of-friends",
|
|
"open"
|
|
],
|
|
"default": "code-only"
|
|
},
|
|
"enabled": {
|
|
"type": "boolean",
|
|
"default": true
|
|
}
|
|
}
|
|
},
|
|
"channelConfigs": {
|
|
"reef": {
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"relayUrl": {
|
|
"type": "string",
|
|
"format": "uri",
|
|
"pattern": "^[hH][tT][tT][pP][sS]?://[^\\\\/?#@]+/?$",
|
|
"default": "https://reefwire.ai"
|
|
},
|
|
"handle": {
|
|
"type": "string",
|
|
"pattern": "^[a-z0-9][a-z0-9_-]{0,62}$"
|
|
},
|
|
"email": {
|
|
"type": "string",
|
|
"format": "email"
|
|
},
|
|
"guard": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"provider",
|
|
"pinnedModel",
|
|
"apiKeyEnv",
|
|
"policyVersion",
|
|
"timeoutMs"
|
|
],
|
|
"properties": {
|
|
"provider": {
|
|
"enum": [
|
|
"anthropic",
|
|
"openai"
|
|
]
|
|
},
|
|
"pinnedModel": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"apiKeyEnv": {
|
|
"type": "string",
|
|
"pattern": "^[A-Z_][A-Z0-9_]*$"
|
|
},
|
|
"policyVersion": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"timeoutMs": {
|
|
"type": "integer",
|
|
"minimum": 100,
|
|
"maximum": 120000
|
|
},
|
|
"rules": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"outbound": {
|
|
"type": "string",
|
|
"maxLength": 2000,
|
|
"pattern": "\\S"
|
|
},
|
|
"inbound": {
|
|
"type": "string",
|
|
"maxLength": 2000,
|
|
"pattern": "\\S"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"stateDir": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"requestPolicy": {
|
|
"enum": [
|
|
"code-only",
|
|
"friends-of-friends",
|
|
"open"
|
|
],
|
|
"default": "code-only"
|
|
},
|
|
"enabled": {
|
|
"type": "boolean",
|
|
"default": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"commandAliases": [
|
|
{
|
|
"name": "reef"
|
|
}
|
|
]
|
|
}
|