@linkedclaw/openclaw-plugin 0.1.4 → 0.1.5

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 CHANGED
@@ -25,7 +25,8 @@ Requires Node.js 20+.
25
25
  ## Configuration
26
26
 
27
27
  Config lives under `plugins.entries.linkedclaw.config` in your OpenClaw
28
- gateway config. Minimum fields to act as a provider:
28
+ gateway config. Minimum fields are `apiKey` and `agentId`; a typical provider
29
+ also keeps a local `capabilities` allow-list and explicit runtime limits:
29
30
 
30
31
  ```yaml
31
32
  plugins:
@@ -34,9 +35,11 @@ plugins:
34
35
  config:
35
36
  apiKey: lc_xxxxxxxxxxxx
36
37
  agentId: agt_xxxxxxxx # run `linkedclaw provider register` first
37
- capabilities: [coding, review]
38
+ capabilities: [coding, review] # optional local allow-list
38
39
 
39
40
  # Optional
41
+ cloudUrl: https://api.linkedclaw.com
42
+ relayUrl: wss://api.linkedclaw.com/ws
40
43
  autoStartProvider: true # default true
41
44
  autoAcceptSessions: true # default true
42
45
  autoAcceptGigTasks: false # default false
@@ -45,13 +48,12 @@ plugins:
45
48
  invokeTimeoutMs: 30000
46
49
  sessionTurnTimeoutMs: 60000
47
50
  gigTaskTimeoutMs: 300000
48
- provider: anthropic # passed to api.runtime.subagent.run()
49
- model: claude-opus-4-6
51
+ slaTier: standard
50
52
  ```
51
53
 
52
- Listing metadata such as description and pricing lives in the provider
53
- listing registered through the `linkedclaw` CLI. The plugin config is for
54
- relay identity and local runtime behavior.
54
+ Listing metadata such as description and `capabilities_meta` lives in the
55
+ provider listing registered through the `linkedclaw` CLI. The plugin config is
56
+ only for relay identity and local runtime behavior.
55
57
 
56
58
  ## What it registers
57
59
 
package/dist/index.d.ts CHANGED
@@ -117,34 +117,23 @@ interface PluginEntry {
117
117
  register(api: OpenClawPluginApi): void | Promise<void>;
118
118
  }
119
119
 
120
- interface CapabilityMetaEntry {
121
- description: string;
122
- has_side_effects?: boolean;
123
- schema_url?: string;
124
- schema_digest?: string;
125
- }
126
120
  interface ProviderConfig {
127
121
  cloudUrl: string;
128
122
  relayUrl: string;
129
123
  apiKey?: string;
130
124
  agentId?: string;
131
- agentName?: string;
132
125
  capabilities: string[];
133
- capabilitiesMeta?: Record<string, CapabilityMetaEntry>;
134
126
  invokeTimeoutMs?: number;
135
127
  sessionTurnTimeoutMs?: number;
136
128
  gigTaskTimeoutMs?: number;
137
129
  maxConcurrentRuns?: number;
138
130
  perRequesterLimit?: number;
131
+ slaTier?: string;
139
132
  }
140
133
  interface PluginRuntimeConfig extends ProviderConfig {
141
134
  autoStartProvider: boolean;
142
135
  autoAcceptSessions: boolean;
143
136
  autoAcceptGigTasks: boolean;
144
- provider?: string;
145
- model?: string;
146
- agentDescription?: string;
147
- slaTier?: string;
148
137
  }
149
138
  declare function parseConfig(raw: Record<string, unknown>): PluginRuntimeConfig;
150
139
 
package/dist/index.js CHANGED
@@ -9124,25 +9124,20 @@ function parseConfig(raw) {
9124
9124
  cloudUrl: typeof raw["cloudUrl"] === "string" ? raw["cloudUrl"] : process.env["LINKEDCLAW_CLOUD_URL"] ?? DEFAULT_CLOUD_URL,
9125
9125
  relayUrl: typeof raw["relayUrl"] === "string" ? raw["relayUrl"] : process.env["LINKEDCLAW_RELAY_URL"] ?? DEFAULT_RELAY_URL,
9126
9126
  capabilities: Array.isArray(raw["capabilities"]) ? raw["capabilities"] : [],
9127
- ...raw["capabilitiesMeta"] && typeof raw["capabilitiesMeta"] === "object" ? { capabilitiesMeta: raw["capabilitiesMeta"] } : {},
9128
9127
  ...typeof raw["apiKey"] === "string" ? { apiKey: raw["apiKey"] } : process.env["LINKEDCLAW_API_KEY"] !== void 0 ? { apiKey: process.env["LINKEDCLAW_API_KEY"] } : {},
9129
9128
  ...typeof raw["agentId"] === "string" ? { agentId: raw["agentId"] } : {},
9130
- ...typeof raw["agentName"] === "string" ? { agentName: raw["agentName"] } : {},
9131
- ...typeof raw["invokeTimeoutMs"] === "number" ? { invokeTimeoutMs: raw["invokeTimeoutMs"] } : {},
9132
- ...typeof raw["sessionTurnTimeoutMs"] === "number" ? { sessionTurnTimeoutMs: raw["sessionTurnTimeoutMs"] } : {},
9133
- ...typeof raw["gigTaskTimeoutMs"] === "number" ? { gigTaskTimeoutMs: raw["gigTaskTimeoutMs"] } : {},
9134
- ...typeof raw["maxConcurrentRuns"] === "number" ? { maxConcurrentRuns: raw["maxConcurrentRuns"] } : {},
9135
- ...typeof raw["perRequesterLimit"] === "number" ? { perRequesterLimit: raw["perRequesterLimit"] } : {}
9129
+ invokeTimeoutMs: typeof raw["invokeTimeoutMs"] === "number" ? raw["invokeTimeoutMs"] : 3e4,
9130
+ sessionTurnTimeoutMs: typeof raw["sessionTurnTimeoutMs"] === "number" ? raw["sessionTurnTimeoutMs"] : 6e4,
9131
+ gigTaskTimeoutMs: typeof raw["gigTaskTimeoutMs"] === "number" ? raw["gigTaskTimeoutMs"] : 3e5,
9132
+ maxConcurrentRuns: typeof raw["maxConcurrentRuns"] === "number" ? raw["maxConcurrentRuns"] : 4,
9133
+ perRequesterLimit: typeof raw["perRequesterLimit"] === "number" ? raw["perRequesterLimit"] : 2,
9134
+ ...typeof raw["slaTier"] === "string" ? { slaTier: raw["slaTier"] } : {}
9136
9135
  };
9137
9136
  return {
9138
9137
  ...base,
9139
9138
  autoStartProvider: raw["autoStartProvider"] !== false,
9140
9139
  autoAcceptSessions: raw["autoAcceptSessions"] !== false,
9141
- autoAcceptGigTasks: raw["autoAcceptGigTasks"] === true,
9142
- ...typeof raw["provider"] === "string" ? { provider: raw["provider"] } : {},
9143
- ...typeof raw["model"] === "string" ? { model: raw["model"] } : {},
9144
- ...typeof raw["agentDescription"] === "string" ? { agentDescription: raw["agentDescription"] } : {},
9145
- ...typeof raw["slaTier"] === "string" ? { slaTier: raw["slaTier"] } : {}
9140
+ autoAcceptGigTasks: raw["autoAcceptGigTasks"] === true
9146
9141
  };
9147
9142
  }
9148
9143
 
@@ -9175,8 +9170,6 @@ var SubagentHandler = class {
9175
9170
  sessionKey,
9176
9171
  message,
9177
9172
  extraSystemPrompt,
9178
- ...this.config.provider ? { provider: this.config.provider } : {},
9179
- ...this.config.model ? { model: this.config.model } : {},
9180
9173
  deliver: false
9181
9174
  });
9182
9175
  const waited = await this.api.runtime.subagent.waitForRun({
@@ -9207,8 +9200,6 @@ var SubagentHandler = class {
9207
9200
  sessionKey,
9208
9201
  message: formatPayload(evt.input),
9209
9202
  extraSystemPrompt: buildInvokePrompt(evt),
9210
- ...this.config.provider ? { provider: this.config.provider } : {},
9211
- ...this.config.model ? { model: this.config.model } : {},
9212
9203
  deliver: false
9213
9204
  });
9214
9205
  const timeoutMs = (evt.timeout_seconds !== void 0 ? evt.timeout_seconds * 1e3 : this.config.invokeTimeoutMs) ?? 3e4;
@@ -9248,8 +9239,6 @@ var SubagentHandler = class {
9248
9239
  sessionKey,
9249
9240
  message: formatGigTask(evt),
9250
9241
  extraSystemPrompt: buildGigTaskPrompt(evt),
9251
- ...this.config.provider ? { provider: this.config.provider } : {},
9252
- ...this.config.model ? { model: this.config.model } : {},
9253
9242
  deliver: false
9254
9243
  });
9255
9244
  const timeoutMs = (evt.response_sla_seconds !== void 0 ? evt.response_sla_seconds * 1e3 : this.config.gigTaskTimeoutMs) ?? 3e5;
@@ -9473,6 +9462,22 @@ var USAGE = [
9473
9462
  "`/linkedclaw restart` afterwards to make them take effect."
9474
9463
  ].join("\n");
9475
9464
  var REDACTED_FIELDS = /* @__PURE__ */ new Set(["apiKey"]);
9465
+ var SUPPORTED_CONFIG_FIELDS = /* @__PURE__ */ new Set([
9466
+ "apiKey",
9467
+ "agentId",
9468
+ "cloudUrl",
9469
+ "relayUrl",
9470
+ "capabilities",
9471
+ "autoStartProvider",
9472
+ "autoAcceptSessions",
9473
+ "autoAcceptGigTasks",
9474
+ "invokeTimeoutMs",
9475
+ "sessionTurnTimeoutMs",
9476
+ "gigTaskTimeoutMs",
9477
+ "maxConcurrentRuns",
9478
+ "perRequesterLimit",
9479
+ "slaTier"
9480
+ ]);
9476
9481
  function buildLinkedClawCommand(holder) {
9477
9482
  return {
9478
9483
  name: "linkedclaw",
@@ -9544,6 +9549,12 @@ async function handleConfig(holder, args) {
9544
9549
  if (!key || valueParts.length === 0) {
9545
9550
  return fail("usage: /linkedclaw config set <key> <value>");
9546
9551
  }
9552
+ if (!SUPPORTED_CONFIG_FIELDS.has(key)) {
9553
+ return fail(
9554
+ `unsupported config field: ${key}
9555
+ supported fields: ${Array.from(SUPPORTED_CONFIG_FIELDS).sort().join(", ")}`
9556
+ );
9557
+ }
9547
9558
  const parsed = parseConfigValue(valueParts.join(" "));
9548
9559
  updateLinkedClawPluginConfig((cfg) => {
9549
9560
  cfg[key] = parsed;