@buz-extensions/buz 1.0.0-beta.3 → 1.0.0-beta.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.
Files changed (2) hide show
  1. package/index.ts +23 -12
  2. package/package.json +2 -2
package/index.ts CHANGED
@@ -85,20 +85,31 @@ export const buzChannelPlugin = {
85
85
  resolveSessionTarget: ({ id }: any) => id,
86
86
  },
87
87
  setupWizard: {
88
- steps: [
89
- {
90
- id: "serverAddress",
91
- type: "text",
92
- label: "Server Address",
93
- placeholder: "e.g. grpc.buz.ai:443",
88
+ channel: "buz",
89
+ status: {
90
+ configuredLabel: "configured",
91
+ unconfiguredLabel: "needs server + secret",
92
+ configuredHint: "configured",
93
+ unconfiguredHint: "needs server + secret",
94
+ configuredScore: 1,
95
+ unconfiguredScore: 0,
96
+ resolveConfigured: ({ cfg }: any) => {
97
+ const channelConfig = cfg?.channels?.["buz"];
98
+ const accounts = channelConfig?.accounts || {};
99
+ return Object.values(accounts).some((acc: any) =>
100
+ acc?.serverAddress && acc?.secretKey
101
+ ) || (channelConfig?.serverAddress && channelConfig?.secretKey);
94
102
  },
95
- {
96
- id: "secretKey",
97
- type: "password",
98
- label: "Secret Key",
99
- placeholder: "Enter your IM Secret Key",
103
+ resolveStatusLines: ({ cfg, configured }: any) => {
104
+ const accountCount = Object.keys(cfg?.channels?.["buz"]?.accounts || {}).length;
105
+ return [`buz: ${configured ? "configured" : "needs server + secret"}`, `Accounts: ${accountCount || 0}`];
100
106
  },
101
- ],
107
+ },
108
+ credentials: [],
109
+ finalize: async ({ cfg, accountId, credentialValues, prompter }: any) => {
110
+ // buz uses setup adapter for configuration
111
+ return { cfg };
112
+ },
102
113
  },
103
114
  setup: {
104
115
  validateInput: async (params: any) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@buz-extensions/buz",
3
- "version": "1.0.0-beta.3",
3
+ "version": "1.0.0-beta.5",
4
4
  "description": "OpenClaw buz channel plugin",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -27,7 +27,7 @@
27
27
  "dependencies": {
28
28
  "@grpc/grpc-js": "^1.10.0",
29
29
  "@grpc/proto-loader": "^0.7.10",
30
- "zod": "^3.25.76"
30
+ "zod": "^4.3.6"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "openclaw": "*"