feat: working v1 — full Fabric<->openclaw round-trip verified
Real channel-turn dispatch (resolveAgentRoute + finalizeInboundContext + dispatchInboundReplyWithBase), wakeup->drop/dispatch, messaging target grammar (fabric:<id>) + outbound.sendText, tools use execute/parameters. Verified live: human msg in Fabric -> wakeup -> openclaw agent runs -> reply posted back into the Fabric channel as the agent. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
12
dist/fabric/src/tools.js
vendored
12
dist/fabric/src/tools.js
vendored
@@ -21,7 +21,7 @@ export function registerFabricTools(api, client, identity) {
|
||||
api.registerTool((ctx) => ({
|
||||
name: 'fabric-register',
|
||||
description: "Register this agent's Fabric API key (minted via Center CLI `user apikey`).",
|
||||
inputSchema: {
|
||||
parameters: {
|
||||
type: 'object',
|
||||
additionalProperties: false,
|
||||
required: ['fabricApiKey'],
|
||||
@@ -29,7 +29,7 @@ export function registerFabricTools(api, client, identity) {
|
||||
fabricApiKey: { type: 'string', description: 'Fabric Center API key (fak_…)' },
|
||||
},
|
||||
},
|
||||
handler: async (params) => {
|
||||
execute: async (params) => {
|
||||
const agentId = ctx.agentId;
|
||||
if (!agentId)
|
||||
return { ok: false, error: 'no agent context' };
|
||||
@@ -46,7 +46,7 @@ export function registerFabricTools(api, client, identity) {
|
||||
const makeCreate = (kind) => api.registerTool((ctx) => ({
|
||||
name: `create-${kind}-channel`,
|
||||
description: `Create a Fabric ${kind} channel (x_type=${X_BY_KIND[kind]}).`,
|
||||
inputSchema: {
|
||||
parameters: {
|
||||
type: 'object',
|
||||
additionalProperties: false,
|
||||
required: ['guildNodeId', 'name'],
|
||||
@@ -59,7 +59,7 @@ export function registerFabricTools(api, client, identity) {
|
||||
listeners: { type: 'array', items: { type: 'string' } },
|
||||
},
|
||||
},
|
||||
handler: async (p) => {
|
||||
execute: async (p) => {
|
||||
const agentId = ctx.agentId;
|
||||
if (!agentId)
|
||||
return { ok: false, error: 'no agent context' };
|
||||
@@ -83,7 +83,7 @@ export function registerFabricTools(api, client, identity) {
|
||||
api.registerTool((ctx) => ({
|
||||
name: 'discussion-complete',
|
||||
description: 'Conclude a discussion: post a summary then close the channel.',
|
||||
inputSchema: {
|
||||
parameters: {
|
||||
type: 'object',
|
||||
additionalProperties: false,
|
||||
required: ['guildNodeId', 'channelId', 'summary'],
|
||||
@@ -94,7 +94,7 @@ export function registerFabricTools(api, client, identity) {
|
||||
callbackChannelId: { type: 'string', description: 'optional channel to also post the summary to' },
|
||||
},
|
||||
},
|
||||
handler: async (p) => {
|
||||
execute: async (p) => {
|
||||
const agentId = ctx.agentId;
|
||||
if (!agentId)
|
||||
return { ok: false, error: 'no agent context' };
|
||||
|
||||
Reference in New Issue
Block a user