Files
Fabric.OpenclawPlugin/openclaw.plugin.json
hzhang 5ff464a055 feat(plugin): fabric-guild-list + fabric-channel-set-purpose tools + purpose on existing tools
Adds two agent-facing tools that close the discoverability loop:

  - fabric-guild-list — enumerates guilds the agent belongs to with
    name + purpose + status (no api calls beyond the existing agentLogin
    response). Optional nameFilter/purposeFilter for narrowing.
  - fabric-channel-set-purpose — PATCH /api/channels/:id { purpose }
    so agents can backfill or update an existing channel's purpose.

Extends existing tools:
  - fabric-channel-list now returns purpose on each row.
  - create-{chat,work,report,discussion}-channel accept optional purpose.

FabricClient + FabricSession type changes carry the new field through.
Manifest contracts.tools updated (jiti loader needs both manifest entry
and onStartup activation to register).

Lets workflows that previously needed hardcoded channel ids instead say
'find a guild whose purpose mentions debate, then a channel of x_type
announce whose purpose covers public debate broadcasts.'
2026-05-23 19:22:10 +01:00

88 lines
3.0 KiB
JSON

{
"id": "fabric",
"kind": "channel",
"channels": ["fabric"],
"name": "Fabric",
"description": "Fabric channel plugin — OpenClaw agents speak in Fabric guilds",
"activation": {
"onStartup": true
},
"contracts": {
"tools": [
"fabric-register",
"create-chat-channel",
"create-work-channel",
"create-report-channel",
"create-discussion-channel",
"discussion-complete",
"fabric-canvas",
"fabric-channel",
"fabric-send-message",
"fabric-channel-list",
"fabric-message-history",
"fabric-guild-list",
"fabric-channel-set-purpose"
]
},
"configSchema": {
"type": "object",
"additionalProperties": false,
"properties": {
"identityFilePath": {
"type": "string",
"description": "Path to the agent identity registry JSON (agentId -> Fabric API key). Default ~/.openclaw/fabric-identity.json"
},
"debugMode": { "type": "boolean", "default": false }
},
"required": []
},
"channelConfigs": {
"fabric": {
"schema": {
"type": "object",
"additionalProperties": false,
"properties": {
"centerApiBase": {
"type": "string",
"description": "Fabric Center API base, e.g. http://localhost:7001/api"
},
"commandsSyncKey": {
"type": "string",
"minLength": 1,
"description": "Shared secret that must equal the guild's FABRIC_BACKEND_GUILD_COMMANDS_SYNC_KEY. Required to register the slash-command catalog (Guild C-2). Read it from the guild via: docker exec fabric-backend-guild node dist/cli/print-commands-sync-key.js"
},
"coalesce": {
"type": "boolean",
"description": "Merge a split agent turn (text → thinking/tool → text) into ONE Fabric message. Flushed deterministically on the agent_end hook. Default true; false = raw per-segment posting."
},
"dmSecurity": { "type": "string" },
"dmPolicy": { "type": "string" },
"enabled": { "type": "boolean" },
"allowFrom": { "type": "array", "items": { "type": "string" } },
"defaultAccount": { "type": "string" },
"accounts": {
"type": "object",
"description": "agent = account; key is the openclaw agentId",
"additionalProperties": {
"type": "object",
"additionalProperties": false,
"properties": {
"fabricApiKey": { "type": "string" },
"centerApiBase": { "type": "string" },
"enabled": { "type": "boolean" },
"dmPolicy": { "type": "string" },
"allowFrom": { "type": "array", "items": { "type": "string" } }
}
}
}
},
"required": ["commandsSyncKey"]
},
"uiHints": {
"centerApiBase": { "label": "Center API base" },
"commandsSyncKey": { "label": "Commands sync key" }
}
}
}
}