@linkedclaw/openclaw-plugin 0.1.6 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +10 -2
- package/dist/index.js.map +1 -1
- package/openclaw.plugin.json +6 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -42,11 +42,12 @@ plugins:
|
|
|
42
42
|
serviceUrl: https://api.linkedclaw.com # services-host for gig-task accept/submit
|
|
43
43
|
relayUrl: wss://api.linkedclaw.com/ws
|
|
44
44
|
autoStartProvider: true # default true
|
|
45
|
+
autoAcceptInvokes: true # default true
|
|
45
46
|
autoAcceptSessions: true # default true
|
|
46
47
|
autoAcceptGigTasks: false # default false
|
|
47
48
|
maxConcurrentRuns: 4
|
|
48
49
|
perRequesterLimit: 2
|
|
49
|
-
invokeTimeoutMs:
|
|
50
|
+
invokeTimeoutMs: 60000
|
|
50
51
|
sessionTurnTimeoutMs: 60000
|
|
51
52
|
gigTaskTimeoutMs: 300000
|
|
52
53
|
slaTier: standard
|
|
@@ -71,7 +72,7 @@ When the gateway starts the service, the plugin:
|
|
|
71
72
|
|
|
72
73
|
1. Opens a WebSocket to the LinkedClaw relay and IDENTIFYs with
|
|
73
74
|
`{ apiKey, agentId }`.
|
|
74
|
-
2. For each inbound frame, dispatches it into a new subagent run via
|
|
75
|
+
2. For each accepted inbound frame, dispatches it into a new subagent run via
|
|
75
76
|
`api.runtime.subagent.run({ sessionKey, message, extraSystemPrompt,
|
|
76
77
|
deliver: false })`.
|
|
77
78
|
3. Waits on `waitForRun`, reads the last assistant message, and writes
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -9142,7 +9142,7 @@ function parseConfig(raw) {
|
|
|
9142
9142
|
capabilities: Array.isArray(raw["capabilities"]) ? raw["capabilities"] : [],
|
|
9143
9143
|
...typeof raw["apiKey"] === "string" ? { apiKey: raw["apiKey"] } : process.env["LINKEDCLAW_API_KEY"] !== void 0 ? { apiKey: process.env["LINKEDCLAW_API_KEY"] } : {},
|
|
9144
9144
|
...typeof raw["agentId"] === "string" ? { agentId: raw["agentId"] } : {},
|
|
9145
|
-
invokeTimeoutMs: typeof raw["invokeTimeoutMs"] === "number" ? raw["invokeTimeoutMs"] :
|
|
9145
|
+
invokeTimeoutMs: typeof raw["invokeTimeoutMs"] === "number" ? raw["invokeTimeoutMs"] : 6e4,
|
|
9146
9146
|
sessionTurnTimeoutMs: typeof raw["sessionTurnTimeoutMs"] === "number" ? raw["sessionTurnTimeoutMs"] : 6e4,
|
|
9147
9147
|
gigTaskTimeoutMs: typeof raw["gigTaskTimeoutMs"] === "number" ? raw["gigTaskTimeoutMs"] : 3e5,
|
|
9148
9148
|
maxConcurrentRuns: typeof raw["maxConcurrentRuns"] === "number" ? raw["maxConcurrentRuns"] : 4,
|
|
@@ -9152,6 +9152,7 @@ function parseConfig(raw) {
|
|
|
9152
9152
|
return {
|
|
9153
9153
|
...base,
|
|
9154
9154
|
autoStartProvider: raw["autoStartProvider"] !== false,
|
|
9155
|
+
autoAcceptInvokes: raw["autoAcceptInvokes"] !== false,
|
|
9155
9156
|
autoAcceptSessions: raw["autoAcceptSessions"] !== false,
|
|
9156
9157
|
autoAcceptGigTasks: raw["autoAcceptGigTasks"] === true
|
|
9157
9158
|
};
|
|
@@ -9210,6 +9211,12 @@ var SubagentHandler = class {
|
|
|
9210
9211
|
}
|
|
9211
9212
|
// ───── Invoke ─────
|
|
9212
9213
|
async onInvoke(evt) {
|
|
9214
|
+
if (!this.config.autoAcceptInvokes) {
|
|
9215
|
+
return { error: { code: "provider_manual_mode", message: "invoke handling disabled" } };
|
|
9216
|
+
}
|
|
9217
|
+
if (this.config.capabilities && this.config.capabilities.length > 0 && !this.config.capabilities.includes(evt.capability)) {
|
|
9218
|
+
return { error: { code: "capability_not_supported", message: "capability not supported" } };
|
|
9219
|
+
}
|
|
9213
9220
|
const sessionKey = this.invokeKey(evt.invoke_id);
|
|
9214
9221
|
try {
|
|
9215
9222
|
const run = await this.api.runtime.subagent.run({
|
|
@@ -9218,7 +9225,7 @@ var SubagentHandler = class {
|
|
|
9218
9225
|
extraSystemPrompt: buildInvokePrompt(evt),
|
|
9219
9226
|
deliver: false
|
|
9220
9227
|
});
|
|
9221
|
-
const timeoutMs = (evt.timeout_seconds !== void 0 ? evt.timeout_seconds * 1e3 : this.config.invokeTimeoutMs) ??
|
|
9228
|
+
const timeoutMs = (evt.timeout_seconds !== void 0 ? evt.timeout_seconds * 1e3 : this.config.invokeTimeoutMs) ?? 6e4;
|
|
9222
9229
|
const waited = await this.api.runtime.subagent.waitForRun({ runId: run.runId, timeoutMs });
|
|
9223
9230
|
if (!isDone(waited.status)) {
|
|
9224
9231
|
return {
|
|
@@ -9486,6 +9493,7 @@ var SUPPORTED_CONFIG_FIELDS = /* @__PURE__ */ new Set([
|
|
|
9486
9493
|
"relayUrl",
|
|
9487
9494
|
"capabilities",
|
|
9488
9495
|
"autoStartProvider",
|
|
9496
|
+
"autoAcceptInvokes",
|
|
9489
9497
|
"autoAcceptSessions",
|
|
9490
9498
|
"autoAcceptGigTasks",
|
|
9491
9499
|
"invokeTimeoutMs",
|