@workclaw/openclaw-workclaw 1.0.25 → 1.0.27

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 (161) hide show
  1. package/dist/api.d.ts +4 -0
  2. package/dist/api.d.ts.map +1 -0
  3. package/dist/api.js +379 -0
  4. package/dist/channel-DSvR6Irx.js +50017 -0
  5. package/dist/cron-tasks-handler-C-mP3VmV.js +152 -0
  6. package/dist/index.d.ts +12 -0
  7. package/dist/index.d.ts.map +1 -0
  8. package/dist/index.js +2088 -0
  9. package/dist/jiti-4i2h0FGP.js +4814 -0
  10. package/dist/setup-entry.d.ts +3 -0
  11. package/dist/setup-entry.d.ts.map +1 -0
  12. package/dist/setup-entry.js +182 -0
  13. package/dist/src/accounts.d.ts +67 -0
  14. package/dist/src/accounts.d.ts.map +1 -0
  15. package/dist/src/api/accounts-api.d.ts +3 -0
  16. package/dist/src/api/accounts-api.d.ts.map +1 -0
  17. package/dist/src/api/prompts-api.d.ts +3 -0
  18. package/dist/src/api/prompts-api.d.ts.map +1 -0
  19. package/dist/src/api/session-api.d.ts +3 -0
  20. package/dist/src/api/session-api.d.ts.map +1 -0
  21. package/dist/src/api/skills-api.d.ts +3 -0
  22. package/dist/src/api/skills-api.d.ts.map +1 -0
  23. package/dist/src/api/workspace.d.ts +4 -0
  24. package/dist/src/api/workspace.d.ts.map +1 -0
  25. package/dist/src/channel.d.ts +12 -0
  26. package/dist/src/channel.d.ts.map +1 -0
  27. package/dist/src/config-schema.d.ts +88 -0
  28. package/dist/src/config-schema.d.ts.map +1 -0
  29. package/dist/src/connection/workclaw-client.d.ts +149 -0
  30. package/dist/src/connection/workclaw-client.d.ts.map +1 -0
  31. package/dist/src/gateway/agent-handlers.d.ts +13 -0
  32. package/dist/src/gateway/agent-handlers.d.ts.map +1 -0
  33. package/dist/src/gateway/config-writer.d.ts +72 -0
  34. package/dist/src/gateway/config-writer.d.ts.map +1 -0
  35. package/dist/src/gateway/cron-tasks-handler.d.ts +20 -0
  36. package/dist/src/gateway/cron-tasks-handler.d.ts.map +1 -0
  37. package/dist/src/gateway/message-context.d.ts +81 -0
  38. package/dist/src/gateway/message-context.d.ts.map +1 -0
  39. package/dist/src/gateway/message-dispatcher.d.ts +17 -0
  40. package/dist/src/gateway/message-dispatcher.d.ts.map +1 -0
  41. package/dist/src/gateway/reconnect.d.ts +25 -0
  42. package/dist/src/gateway/reconnect.d.ts.map +1 -0
  43. package/dist/src/gateway/skills-handler.d.ts +30 -0
  44. package/dist/src/gateway/skills-handler.d.ts.map +1 -0
  45. package/dist/src/gateway/skills-list-handler.d.ts +28 -0
  46. package/dist/src/gateway/skills-list-handler.d.ts.map +1 -0
  47. package/dist/src/gateway/tools-list-handler.d.ts +31 -0
  48. package/dist/src/gateway/tools-list-handler.d.ts.map +1 -0
  49. package/dist/src/gateway/workclaw-gateway.d.ts +11 -0
  50. package/dist/src/gateway/workclaw-gateway.d.ts.map +1 -0
  51. package/dist/src/media/upload.d.ts +14 -0
  52. package/dist/src/media/upload.d.ts.map +1 -0
  53. package/dist/src/outbound/index.d.ts +39 -0
  54. package/dist/src/outbound/index.d.ts.map +1 -0
  55. package/dist/src/outbound/workclaw-sender.d.ts +38 -0
  56. package/dist/src/outbound/workclaw-sender.d.ts.map +1 -0
  57. package/dist/src/runtime.d.ts +118 -0
  58. package/dist/src/runtime.d.ts.map +1 -0
  59. package/dist/src/secret-contract-api.d.ts +5 -0
  60. package/dist/src/secret-contract-api.d.ts.map +1 -0
  61. package/{src/send.ts → dist/src/send.d.ts} +2 -1
  62. package/dist/src/send.d.ts.map +1 -0
  63. package/dist/src/setup-api.d.ts +4 -0
  64. package/dist/src/setup-api.d.ts.map +1 -0
  65. package/dist/src/setup-core.d.ts +4 -0
  66. package/dist/src/setup-core.d.ts.map +1 -0
  67. package/dist/src/setup-surface.d.ts +8 -0
  68. package/dist/src/setup-surface.d.ts.map +1 -0
  69. package/dist/src/tools/openclaw-workclaw-cron/api/index.d.ts +91 -0
  70. package/dist/src/tools/openclaw-workclaw-cron/api/index.d.ts.map +1 -0
  71. package/dist/src/tools/openclaw-workclaw-cron/index.d.ts +11 -0
  72. package/dist/src/tools/openclaw-workclaw-cron/index.d.ts.map +1 -0
  73. package/dist/src/tools/openclaw-workclaw-cron/src/add/params.d.ts +14 -0
  74. package/dist/src/tools/openclaw-workclaw-cron/src/add/params.d.ts.map +1 -0
  75. package/dist/src/tools/openclaw-workclaw-cron/src/add/sync.d.ts +16 -0
  76. package/dist/src/tools/openclaw-workclaw-cron/src/add/sync.d.ts.map +1 -0
  77. package/dist/src/tools/openclaw-workclaw-cron/src/disable/params.d.ts +12 -0
  78. package/dist/src/tools/openclaw-workclaw-cron/src/disable/params.d.ts.map +1 -0
  79. package/dist/src/tools/openclaw-workclaw-cron/src/disable/sync.d.ts +12 -0
  80. package/dist/src/tools/openclaw-workclaw-cron/src/disable/sync.d.ts.map +1 -0
  81. package/dist/src/tools/openclaw-workclaw-cron/src/enable/params.d.ts +12 -0
  82. package/dist/src/tools/openclaw-workclaw-cron/src/enable/params.d.ts.map +1 -0
  83. package/dist/src/tools/openclaw-workclaw-cron/src/enable/sync.d.ts +12 -0
  84. package/dist/src/tools/openclaw-workclaw-cron/src/enable/sync.d.ts.map +1 -0
  85. package/dist/src/tools/openclaw-workclaw-cron/src/notify/sync.d.ts +13 -0
  86. package/dist/src/tools/openclaw-workclaw-cron/src/notify/sync.d.ts.map +1 -0
  87. package/dist/src/tools/openclaw-workclaw-cron/src/remove/params.d.ts +12 -0
  88. package/dist/src/tools/openclaw-workclaw-cron/src/remove/params.d.ts.map +1 -0
  89. package/dist/src/tools/openclaw-workclaw-cron/src/remove/sync.d.ts +12 -0
  90. package/dist/src/tools/openclaw-workclaw-cron/src/remove/sync.d.ts.map +1 -0
  91. package/dist/src/tools/openclaw-workclaw-cron/src/update/params.d.ts +15 -0
  92. package/dist/src/tools/openclaw-workclaw-cron/src/update/params.d.ts.map +1 -0
  93. package/dist/src/tools/openclaw-workclaw-cron/src/update/sync.d.ts +16 -0
  94. package/dist/src/tools/openclaw-workclaw-cron/src/update/sync.d.ts.map +1 -0
  95. package/dist/src/tools/openclaw-workclaw-cron/types/index.d.ts +53 -0
  96. package/dist/src/tools/openclaw-workclaw-cron/types/index.d.ts.map +1 -0
  97. package/dist/src/tools/openclaw-workclaw-cron/utils/index.d.ts +41 -0
  98. package/dist/src/tools/openclaw-workclaw-cron/utils/index.d.ts.map +1 -0
  99. package/dist/src/tools/openclaw-workclaw-system/index.d.ts +11 -0
  100. package/dist/src/tools/openclaw-workclaw-system/index.d.ts.map +1 -0
  101. package/dist/src/tools/openclaw-workclaw-system/src/get/index.d.ts +6 -0
  102. package/dist/src/tools/openclaw-workclaw-system/src/get/index.d.ts.map +1 -0
  103. package/dist/src/tools/openclaw-workclaw-system/src/token/index.d.ts +6 -0
  104. package/dist/src/tools/openclaw-workclaw-system/src/token/index.d.ts.map +1 -0
  105. package/dist/src/types.d.ts +39 -0
  106. package/dist/src/types.d.ts.map +1 -0
  107. package/dist/src/utils/content.d.ts +16 -0
  108. package/dist/src/utils/content.d.ts.map +1 -0
  109. package/openclaw.plugin.json +11 -0
  110. package/package.json +69 -45
  111. package/api.ts +0 -3
  112. package/index.ts +0 -325
  113. package/setup-entry.ts +0 -13
  114. package/src/accounts.ts +0 -360
  115. package/src/api/accounts-api.ts +0 -156
  116. package/src/api/prompts-api.ts +0 -122
  117. package/src/api/session-api.ts +0 -246
  118. package/src/api/skills-api.ts +0 -74
  119. package/src/api/workspace.ts +0 -45
  120. package/src/channel.ts +0 -226
  121. package/src/config-schema.ts +0 -60
  122. package/src/connection/workclaw-client.ts +0 -618
  123. package/src/gateway/agent-handlers.ts +0 -551
  124. package/src/gateway/config-writer.ts +0 -378
  125. package/src/gateway/cron-tasks-handler.ts +0 -230
  126. package/src/gateway/message-context.ts +0 -645
  127. package/src/gateway/message-dispatcher.ts +0 -688
  128. package/src/gateway/reconnect.ts +0 -260
  129. package/src/gateway/skills-handler.ts +0 -805
  130. package/src/gateway/skills-list-handler.ts +0 -332
  131. package/src/gateway/tools-list-handler.ts +0 -161
  132. package/src/gateway/workclaw-gateway.ts +0 -304
  133. package/src/media/upload.ts +0 -168
  134. package/src/outbound/index.ts +0 -191
  135. package/src/outbound/workclaw-sender.ts +0 -161
  136. package/src/runtime.ts +0 -520
  137. package/src/secret-contract-api.ts +0 -4
  138. package/src/setup-api.ts +0 -3
  139. package/src/setup-core.ts +0 -25
  140. package/src/setup-surface.ts +0 -498
  141. package/src/tools/openclaw-workclaw-cron/api/index.ts +0 -326
  142. package/src/tools/openclaw-workclaw-cron/index.ts +0 -39
  143. package/src/tools/openclaw-workclaw-cron/src/add/params.ts +0 -177
  144. package/src/tools/openclaw-workclaw-cron/src/add/sync.ts +0 -188
  145. package/src/tools/openclaw-workclaw-cron/src/disable/params.ts +0 -100
  146. package/src/tools/openclaw-workclaw-cron/src/disable/sync.ts +0 -127
  147. package/src/tools/openclaw-workclaw-cron/src/enable/params.ts +0 -100
  148. package/src/tools/openclaw-workclaw-cron/src/enable/sync.ts +0 -127
  149. package/src/tools/openclaw-workclaw-cron/src/notify/sync.ts +0 -148
  150. package/src/tools/openclaw-workclaw-cron/src/remove/params.ts +0 -109
  151. package/src/tools/openclaw-workclaw-cron/src/remove/sync.ts +0 -127
  152. package/src/tools/openclaw-workclaw-cron/src/update/params.ts +0 -195
  153. package/src/tools/openclaw-workclaw-cron/src/update/sync.ts +0 -161
  154. package/src/tools/openclaw-workclaw-cron/types/index.ts +0 -55
  155. package/src/tools/openclaw-workclaw-cron/utils/index.ts +0 -141
  156. package/src/tools/openclaw-workclaw-system/index.ts +0 -17
  157. package/src/tools/openclaw-workclaw-system/src/get/index.ts +0 -77
  158. package/src/tools/openclaw-workclaw-system/src/token/index.ts +0 -93
  159. package/src/types.ts +0 -50
  160. package/src/utils/content.ts +0 -40
  161. package/tsconfig.json +0 -34
@@ -0,0 +1,3 @@
1
+ declare const _default: import('openclaw/plugin-sdk/channel-entry-contract').BundledChannelSetupEntryContract<import('openclaw/plugin-sdk').ChannelPlugin>;
2
+ export default _default;
3
+ //# sourceMappingURL=setup-entry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setup-entry.d.ts","sourceRoot":"","sources":["../setup-entry.ts"],"names":[],"mappings":";AAEA,wBAUE"}
@@ -0,0 +1,182 @@
1
+ import { n as normalizeLowercaseStringOrEmpty, o as openBoundaryFileSync, r as resolvePluginLoaderJitiConfig, c as createJiti, b as buildPluginLoaderJitiOptions, a as resolveLoaderPackageRoot } from "./jiti-4i2h0FGP.js";
2
+ import { createRequire } from "node:module";
3
+ import { fileURLToPath } from "node:url";
4
+ import fs from "node:fs";
5
+ import path from "node:path";
6
+ const nodeRequire = createRequire(import.meta.url);
7
+ const jitiLoaders = /* @__PURE__ */ new Map();
8
+ const loadedModuleExports = /* @__PURE__ */ new Map();
9
+ const disableBundledEntrySourceFallbackEnv = "OPENCLAW_DISABLE_BUNDLED_ENTRY_SOURCE_FALLBACK";
10
+ function isTruthyEnvFlag(value) {
11
+ return value !== void 0 && !/^(?:0|false)$/iu.test(value.trim());
12
+ }
13
+ function resolveSpecifierCandidates(modulePath) {
14
+ const ext = normalizeLowercaseStringOrEmpty(path.extname(modulePath));
15
+ if (ext === ".js") return [modulePath, modulePath.slice(0, -3) + ".ts"];
16
+ if (ext === ".mjs") return [modulePath, modulePath.slice(0, -4) + ".mts"];
17
+ if (ext === ".cjs") return [modulePath, modulePath.slice(0, -4) + ".cts"];
18
+ return [modulePath];
19
+ }
20
+ function resolveEntryBoundaryRoot(importMetaUrl) {
21
+ return path.dirname(fileURLToPath(importMetaUrl));
22
+ }
23
+ function addBundledEntryCandidates(candidates, basePath, boundaryRoot) {
24
+ for (const candidate of resolveSpecifierCandidates(basePath)) {
25
+ if (candidates.some((entry) => entry.path === candidate && entry.boundaryRoot === boundaryRoot)) continue;
26
+ candidates.push({
27
+ path: candidate,
28
+ boundaryRoot
29
+ });
30
+ }
31
+ }
32
+ function resolveBundledEntryModuleCandidates(importMetaUrl, specifier) {
33
+ const importerPath = fileURLToPath(importMetaUrl);
34
+ const importerDir = path.dirname(importerPath);
35
+ const boundaryRoot = resolveEntryBoundaryRoot(importMetaUrl);
36
+ const candidates = [];
37
+ addBundledEntryCandidates(candidates, path.resolve(importerDir, specifier), boundaryRoot);
38
+ const sourceRelativeSpecifier = specifier.replace(/^\.\/src\//u, "./");
39
+ if (sourceRelativeSpecifier !== specifier) addBundledEntryCandidates(candidates, path.resolve(importerDir, sourceRelativeSpecifier), boundaryRoot);
40
+ const packageRoot = resolveLoaderPackageRoot({
41
+ modulePath: importerPath,
42
+ moduleUrl: importMetaUrl,
43
+ cwd: importerDir,
44
+ argv1: process.argv[1]
45
+ });
46
+ if (!packageRoot) return candidates;
47
+ const distExtensionsRoot = path.join(packageRoot, "dist", "extensions") + path.sep;
48
+ if (!importerPath.startsWith(distExtensionsRoot)) return candidates;
49
+ if (isTruthyEnvFlag(process.env[disableBundledEntrySourceFallbackEnv])) return candidates;
50
+ const pluginDirName = path.basename(importerDir);
51
+ const sourcePluginRoot = path.join(packageRoot, "extensions", pluginDirName);
52
+ if (sourcePluginRoot === boundaryRoot) return candidates;
53
+ addBundledEntryCandidates(candidates, path.resolve(sourcePluginRoot, specifier), sourcePluginRoot);
54
+ if (sourceRelativeSpecifier !== specifier) addBundledEntryCandidates(candidates, path.resolve(sourcePluginRoot, sourceRelativeSpecifier), sourcePluginRoot);
55
+ return candidates;
56
+ }
57
+ function formatBundledEntryUnknownError(error) {
58
+ if (typeof error === "string") return error;
59
+ if (error === void 0) return "boundary validation failed";
60
+ try {
61
+ return JSON.stringify(error);
62
+ } catch {
63
+ return "non-serializable error";
64
+ }
65
+ }
66
+ function formatBundledEntryModuleOpenFailure(params) {
67
+ const importerPath = fileURLToPath(params.importMetaUrl);
68
+ const errorDetail = params.failure.error instanceof Error ? params.failure.error.message : formatBundledEntryUnknownError(params.failure.error);
69
+ return [
70
+ `bundled plugin entry "${params.specifier}" failed to open`,
71
+ `from "${importerPath}"`,
72
+ `(resolved "${params.resolvedPath}", plugin root "${params.boundaryRoot}",`,
73
+ `reason "${params.failure.reason}"): ${errorDetail}`
74
+ ].join(" ");
75
+ }
76
+ function resolveBundledEntryModulePath(importMetaUrl, specifier) {
77
+ const candidates = resolveBundledEntryModuleCandidates(importMetaUrl, specifier);
78
+ const fallbackCandidate = candidates[0] ?? {
79
+ path: path.resolve(path.dirname(fileURLToPath(importMetaUrl)), specifier),
80
+ boundaryRoot: resolveEntryBoundaryRoot(importMetaUrl)
81
+ };
82
+ let firstFailure = null;
83
+ for (const candidate of candidates) {
84
+ const opened = openBoundaryFileSync({
85
+ absolutePath: candidate.path,
86
+ rootPath: candidate.boundaryRoot,
87
+ boundaryLabel: "plugin root",
88
+ rejectHardlinks: false,
89
+ skipLexicalRootCheck: true
90
+ });
91
+ if (opened.ok) {
92
+ fs.closeSync(opened.fd);
93
+ return opened.path;
94
+ }
95
+ firstFailure ??= {
96
+ candidate,
97
+ failure: opened
98
+ };
99
+ }
100
+ const failure = firstFailure;
101
+ if (!failure) throw new Error(formatBundledEntryModuleOpenFailure({
102
+ importMetaUrl,
103
+ specifier,
104
+ resolvedPath: fallbackCandidate.path,
105
+ boundaryRoot: fallbackCandidate.boundaryRoot,
106
+ failure: {
107
+ ok: false,
108
+ reason: "path",
109
+ error: /* @__PURE__ */ new Error(`ENOENT: no such file or directory, lstat '${fallbackCandidate.path}'`)
110
+ }
111
+ }));
112
+ throw new Error(formatBundledEntryModuleOpenFailure({
113
+ importMetaUrl,
114
+ specifier,
115
+ resolvedPath: failure.candidate.path,
116
+ boundaryRoot: failure.candidate.boundaryRoot,
117
+ failure: failure.failure
118
+ }));
119
+ }
120
+ function getJiti(modulePath) {
121
+ const { tryNative, aliasMap, cacheKey } = resolvePluginLoaderJitiConfig({
122
+ modulePath,
123
+ argv1: process.argv[1],
124
+ moduleUrl: import.meta.url,
125
+ preferBuiltDist: true
126
+ });
127
+ const cached = jitiLoaders.get(cacheKey);
128
+ if (cached) return cached;
129
+ const loader = createJiti(import.meta.url, {
130
+ ...buildPluginLoaderJitiOptions(aliasMap),
131
+ tryNative
132
+ });
133
+ jitiLoaders.set(cacheKey, loader);
134
+ return loader;
135
+ }
136
+ function loadBundledEntryModuleSync(importMetaUrl, specifier) {
137
+ const modulePath = resolveBundledEntryModulePath(importMetaUrl, specifier);
138
+ const cached = loadedModuleExports.get(modulePath);
139
+ if (cached !== void 0) return cached;
140
+ let loaded;
141
+ if (process.platform === "win32" && modulePath.includes(`${path.sep}dist${path.sep}`) && [
142
+ ".js",
143
+ ".mjs",
144
+ ".cjs"
145
+ ].includes(normalizeLowercaseStringOrEmpty(path.extname(modulePath)))) try {
146
+ loaded = nodeRequire(modulePath);
147
+ } catch {
148
+ loaded = getJiti(modulePath)(modulePath);
149
+ }
150
+ else loaded = getJiti(modulePath)(modulePath);
151
+ loadedModuleExports.set(modulePath, loaded);
152
+ return loaded;
153
+ }
154
+ function loadBundledEntryExportSync(importMetaUrl, reference) {
155
+ const loaded = loadBundledEntryModuleSync(importMetaUrl, reference.specifier);
156
+ const resolved = loaded && typeof loaded === "object" && "default" in loaded ? loaded.default : loaded;
157
+ if (!reference.exportName) return resolved;
158
+ const record = resolved ?? loaded;
159
+ if (!record || !(reference.exportName in record)) throw new Error(`missing export "${reference.exportName}" from bundled entry module ${reference.specifier}`);
160
+ return record[reference.exportName];
161
+ }
162
+ function defineBundledChannelSetupEntry({ importMetaUrl, plugin, secrets }) {
163
+ return {
164
+ kind: "bundled-channel-setup-entry",
165
+ loadSetupPlugin: () => loadBundledEntryExportSync(importMetaUrl, plugin),
166
+ ...secrets ? { loadSetupSecrets: () => loadBundledEntryExportSync(importMetaUrl, secrets) } : {}
167
+ };
168
+ }
169
+ const setupEntry = defineBundledChannelSetupEntry({
170
+ importMetaUrl: import.meta.url,
171
+ plugin: {
172
+ specifier: "./api.js",
173
+ exportName: "workclawPlugin"
174
+ },
175
+ secrets: {
176
+ specifier: "./src/secret-contract-api.js",
177
+ exportName: "channelSecrets"
178
+ }
179
+ });
180
+ export {
181
+ setupEntry as default
182
+ };
@@ -0,0 +1,67 @@
1
+ import { OpenClawConfig } from 'openclaw/plugin-sdk';
2
+ import { ResolvedWorkclawAccount, WorkclawConfig } from './types.js';
3
+ /**
4
+ * Normalize account ID by trimming whitespace
5
+ */
6
+ export declare function normalizeAccountId(accountId: string | null | undefined): string;
7
+ /**
8
+ * Build the lookup cache from existing accounts in cfg.
9
+ * Called once at gateway startup.
10
+ */
11
+ export declare function buildAccountMap(cfg: OpenClawConfig): void;
12
+ /**
13
+ * Resolve accountId by userId + agentId.
14
+ * First checks cache, then falls back to iteration.
15
+ */
16
+ export declare function resolveAccountByUserIdAndAgentId(cfg: OpenClawConfig, userId: string, agentId: string): string | null;
17
+ /**
18
+ * Allocate a new workspace-N accountId and register it in the map.
19
+ */
20
+ export declare function allocateWorkerAccountId(_cfg: OpenClawConfig, userId: string, agentId: string): string;
21
+ /**
22
+ * Refresh the cache when an account's userId or agentId changes.
23
+ */
24
+ export declare function refreshAccountCache(cfg: OpenClawConfig): void;
25
+ /**
26
+ * List all account IDs.
27
+ * If no accounts are configured but plugin has workclaw config, returns [DEFAULT_ACCOUNT_ID].
28
+ */
29
+ export declare function listWorkclawAccountIds(cfg: OpenClawConfig): string[];
30
+ /**
31
+ * Resolve the default account ID.
32
+ */
33
+ export declare function resolveDefaultWorkclawAccountId(cfg: OpenClawConfig): string;
34
+ export declare function isWorkclawAccountConfigured(config: {
35
+ appKey?: string;
36
+ appSecret?: string;
37
+ agentId?: string | number;
38
+ }): boolean;
39
+ /**
40
+ * Resolve a complete account with merged config.
41
+ */
42
+ export declare function resolveWorkclawAccount(params: {
43
+ cfg: OpenClawConfig;
44
+ accountId?: string | null;
45
+ }): ResolvedWorkclawAccount;
46
+ /**
47
+ * List all enabled and configured accounts.
48
+ */
49
+ export declare function listEnabledWorkclawAccounts(cfg: OpenClawConfig): ResolvedWorkclawAccount[];
50
+ /**
51
+ * Resolve account and apply cached connection config if available.
52
+ * This ensures that appKey/appSecret etc. use the stable values captured at connection time,
53
+ * not potentially mutated values from cfg at resolution time.
54
+ */
55
+ export declare function resolveWorkclawAccountWithCache(params: {
56
+ cfg: OpenClawConfig;
57
+ accountId?: string | null;
58
+ }): ResolvedWorkclawAccount;
59
+ /**
60
+ * Inspect and probe workclaw credentials.
61
+ * Returns a function that can be called to test the connection.
62
+ */
63
+ export declare function inspectWorkclawCredentials(workclawCfg?: WorkclawConfig): (() => Promise<{
64
+ ok: boolean;
65
+ botName?: string;
66
+ }>) | null;
67
+ //# sourceMappingURL=accounts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accounts.d.ts","sourceRoot":"","sources":["../../src/accounts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACzD,OAAO,KAAK,EACV,uBAAuB,EAEvB,cAAc,EACf,MAAM,YAAY,CAAA;AAUnB;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAE/E;AAwBD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,cAAc,GAAG,IAAI,CA8CzD;AAED;;;GAGG;AACH,wBAAgB,gCAAgC,CAC9C,GAAG,EAAE,cAAc,EACnB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,GACd,MAAM,GAAG,IAAI,CAkCf;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,cAAc,EACpB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,GACd,MAAM,CAUR;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,cAAc,GAAG,IAAI,CAE7D;AA2BD;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,cAAc,GAAG,MAAM,EAAE,CAWpE;AAED;;GAEG;AACH,wBAAgB,+BAA+B,CAAC,GAAG,EAAE,cAAc,GAAG,MAAM,CAM3E;AA4BD,wBAAgB,2BAA2B,CAAC,MAAM,EAAE;IAClD,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CAC1B,GAAG,OAAO,CAEV;AAmBD;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE;IAC7C,GAAG,EAAE,cAAc,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC1B,GAAG,uBAAuB,CAqB1B;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,GAAG,EAAE,cAAc,GAAG,uBAAuB,EAAE,CAI1F;AAED;;;;GAIG;AACH,wBAAgB,+BAA+B,CAAC,MAAM,EAAE;IACtD,GAAG,EAAE,cAAc,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC1B,GAAG,uBAAuB,CAqB1B;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,WAAW,CAAC,EAAE,cAAc,GAAG,CAAC,MAAM,OAAO,CAAC;IAAE,EAAE,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC,GAAG,IAAI,CAkBlI"}
@@ -0,0 +1,3 @@
1
+ import { OpenClawPluginApi } from 'openclaw/plugin-sdk';
2
+ export declare function createAccountsApiHandler(api: OpenClawPluginApi): (req: any, res: any) => Promise<void>;
3
+ //# sourceMappingURL=accounts-api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accounts-api.d.ts","sourceRoot":"","sources":["../../../src/api/accounts-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AA+D5D,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,iBAAiB,IAC/C,KAAK,GAAG,EAAE,KAAK,GAAG,mBA2FjC"}
@@ -0,0 +1,3 @@
1
+ import { OpenClawPluginApi } from 'openclaw/plugin-sdk';
2
+ export declare function createPromptsApiHandler(api: OpenClawPluginApi): (req: any, res: any) => Promise<void>;
3
+ //# sourceMappingURL=prompts-api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompts-api.d.ts","sourceRoot":"","sources":["../../../src/api/prompts-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AA2B5D,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,iBAAiB,IAC9C,KAAK,GAAG,EAAE,KAAK,GAAG,mBAiFjC"}
@@ -0,0 +1,3 @@
1
+ import { OpenClawPluginApi } from 'openclaw/plugin-sdk';
2
+ export declare function createSessionApiHandler(api: OpenClawPluginApi): (req: any, res: any) => Promise<void>;
3
+ //# sourceMappingURL=session-api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session-api.d.ts","sourceRoot":"","sources":["../../../src/api/session-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAyH5D,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,iBAAiB,IAC9C,KAAK,GAAG,EAAE,KAAK,GAAG,mBA2HjC"}
@@ -0,0 +1,3 @@
1
+ import { OpenClawPluginApi } from 'openclaw/plugin-sdk';
2
+ export declare function createSkillsApiHandler(api: OpenClawPluginApi): (req: any, res: any) => Promise<void>;
3
+ //# sourceMappingURL=skills-api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skills-api.d.ts","sourceRoot":"","sources":["../../../src/api/skills-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAY5D,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,iBAAiB,IAC7C,KAAK,GAAG,EAAE,KAAK,GAAG,mBA4DjC"}
@@ -0,0 +1,4 @@
1
+ import { OpenClawPluginApi } from 'openclaw/plugin-sdk';
2
+ export declare function resolveWorkspaceDir(api: OpenClawPluginApi): string;
3
+ export declare function isDefaultWorkspace(api: OpenClawPluginApi): boolean;
4
+ //# sourceMappingURL=workspace.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workspace.d.ts","sourceRoot":"","sources":["../../../src/api/workspace.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAK5D,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,iBAAiB,GAAG,MAAM,CAqBlE;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,iBAAiB,GAAG,OAAO,CAgBlE"}
@@ -0,0 +1,12 @@
1
+ import { ChannelPlugin } from 'openclaw/plugin-sdk';
2
+ import { ResolvedWorkclawAccount } from './types.js';
3
+ export declare const workclawDock: {
4
+ id: string;
5
+ capabilities: {
6
+ chatTypes: string[];
7
+ media: boolean;
8
+ blockStreaming: boolean;
9
+ };
10
+ };
11
+ export declare const workclawPlugin: ChannelPlugin<ResolvedWorkclawAccount>;
12
+ //# sourceMappingURL=channel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../../src/channel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,aAAa,EAEd,MAAM,qBAAqB,CAAA;AAC5B,OAAO,KAAK,EAAE,uBAAuB,EAAkB,MAAM,YAAY,CAAA;AA8CzE,eAAO,MAAM,YAAY;;;;;;;CAOxB,CAAA;AAED,eAAO,MAAM,cAAc,EAAE,aAAa,CAAC,uBAAuB,CAqKjE,CAAA"}
@@ -0,0 +1,88 @@
1
+ import { z } from 'zod';
2
+ export { z };
3
+ export declare const workclawAccountConfigSchema: z.ZodObject<{
4
+ enabled: z.ZodOptional<z.ZodBoolean>;
5
+ name: z.ZodOptional<z.ZodString>;
6
+ agentId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
7
+ userId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
8
+ openConversationId: z.ZodOptional<z.ZodString>;
9
+ dmPolicy: z.ZodOptional<z.ZodEnum<{
10
+ open: "open";
11
+ }>>;
12
+ allowFrom: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
13
+ mediaMaxMb: z.ZodOptional<z.ZodNumber>;
14
+ allowInsecureTls: z.ZodOptional<z.ZodBoolean>;
15
+ }, z.core.$strict>;
16
+ export declare const WorkclawConfigSchema: z.ZodObject<{
17
+ enabled: z.ZodOptional<z.ZodBoolean>;
18
+ baseUrl: z.ZodOptional<z.ZodString>;
19
+ websocketUrl: z.ZodOptional<z.ZodString>;
20
+ appKey: z.ZodOptional<z.ZodString>;
21
+ appSecret: z.ZodOptional<z.ZodString>;
22
+ agentId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
23
+ localIp: z.ZodOptional<z.ZodString>;
24
+ userId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
25
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
26
+ allowInsecureTls: z.ZodOptional<z.ZodBoolean>;
27
+ allowRawJsonPayload: z.ZodOptional<z.ZodBoolean>;
28
+ uploadUrl: z.ZodOptional<z.ZodString>;
29
+ uploadFieldName: z.ZodOptional<z.ZodString>;
30
+ uploadHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
31
+ uploadFormFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
32
+ uploadResponseUrlPath: z.ZodOptional<z.ZodString>;
33
+ dmPolicy: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
34
+ open: "open";
35
+ }>>>;
36
+ allowFrom: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
37
+ mediaMaxMb: z.ZodOptional<z.ZodNumber>;
38
+ accounts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodObject<{
39
+ enabled: z.ZodOptional<z.ZodBoolean>;
40
+ name: z.ZodOptional<z.ZodString>;
41
+ agentId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
42
+ userId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
43
+ openConversationId: z.ZodOptional<z.ZodString>;
44
+ dmPolicy: z.ZodOptional<z.ZodEnum<{
45
+ open: "open";
46
+ }>>;
47
+ allowFrom: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
48
+ mediaMaxMb: z.ZodOptional<z.ZodNumber>;
49
+ allowInsecureTls: z.ZodOptional<z.ZodBoolean>;
50
+ }, z.core.$strict>>>>;
51
+ }, z.core.$strict>;
52
+ export declare const workclawConfigSchema: z.ZodObject<{
53
+ enabled: z.ZodOptional<z.ZodBoolean>;
54
+ baseUrl: z.ZodOptional<z.ZodString>;
55
+ websocketUrl: z.ZodOptional<z.ZodString>;
56
+ appKey: z.ZodOptional<z.ZodString>;
57
+ appSecret: z.ZodOptional<z.ZodString>;
58
+ agentId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
59
+ localIp: z.ZodOptional<z.ZodString>;
60
+ userId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
61
+ requestTimeout: z.ZodOptional<z.ZodNumber>;
62
+ allowInsecureTls: z.ZodOptional<z.ZodBoolean>;
63
+ allowRawJsonPayload: z.ZodOptional<z.ZodBoolean>;
64
+ uploadUrl: z.ZodOptional<z.ZodString>;
65
+ uploadFieldName: z.ZodOptional<z.ZodString>;
66
+ uploadHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
67
+ uploadFormFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
68
+ uploadResponseUrlPath: z.ZodOptional<z.ZodString>;
69
+ dmPolicy: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
70
+ open: "open";
71
+ }>>>;
72
+ allowFrom: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
73
+ mediaMaxMb: z.ZodOptional<z.ZodNumber>;
74
+ accounts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodObject<{
75
+ enabled: z.ZodOptional<z.ZodBoolean>;
76
+ name: z.ZodOptional<z.ZodString>;
77
+ agentId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
78
+ userId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
79
+ openConversationId: z.ZodOptional<z.ZodString>;
80
+ dmPolicy: z.ZodOptional<z.ZodEnum<{
81
+ open: "open";
82
+ }>>;
83
+ allowFrom: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
84
+ mediaMaxMb: z.ZodOptional<z.ZodNumber>;
85
+ allowInsecureTls: z.ZodOptional<z.ZodBoolean>;
86
+ }, z.core.$strict>>>>;
87
+ }, z.core.$strict>;
88
+ //# sourceMappingURL=config-schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-schema.d.ts","sourceRoot":"","sources":["../../src/config-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EAAE,CAAC,EAAE,CAAA;AAIZ,eAAO,MAAM,2BAA2B;;;;;;;;;;;;kBAY7B,CAAA;AAEX,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAqC7B,CAAA;AAEJ,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAAuB,CAAA"}
@@ -0,0 +1,149 @@
1
+ export declare function clearWorkclawTokenCache(cacheKey: string): void;
2
+ export declare function normalizeBaseUrl(value: string | undefined): string;
3
+ export declare function doFetchJson(url: string, init: RequestInit, allowInsecureTls?: boolean, requestTimeout?: number): Promise<any>;
4
+ export interface WorkclawConnectionConfig {
5
+ baseUrl?: string;
6
+ websocketUrl?: string;
7
+ appKey?: string;
8
+ appSecret?: string;
9
+ localIp?: string;
10
+ allowInsecureTls?: boolean;
11
+ requestTimeout?: number;
12
+ }
13
+ export declare function getWorkclawAccessToken(cacheKey: string, config: WorkclawConnectionConfig): Promise<string>;
14
+ export declare function openWorkclawConnection(cacheKey: string, config: WorkclawConnectionConfig): Promise<{
15
+ endpoint: string;
16
+ ticket: string;
17
+ }>;
18
+ export interface AgentInstance {
19
+ id: string;
20
+ createTime: string;
21
+ updateTime: string;
22
+ futureId: string;
23
+ phone: string;
24
+ nickName: string;
25
+ imageId: string;
26
+ level: number;
27
+ identity: string;
28
+ type: string;
29
+ name: string;
30
+ gender: string;
31
+ age: number | null;
32
+ tcId: string | null;
33
+ city: string | null;
34
+ loginType: string | null;
35
+ status: string;
36
+ publicScope: string;
37
+ ip: string | null;
38
+ phoneName: string | null;
39
+ tip: string | null;
40
+ email: string | null;
41
+ featureId: string | null;
42
+ job: string | null;
43
+ newUser: boolean;
44
+ imageKnBase: string | null;
45
+ recommend: string | null;
46
+ comment: string | null;
47
+ treeKnbase: string | null;
48
+ preferredLanguage: string;
49
+ timezone: string;
50
+ introduction: string;
51
+ backgroundId: string;
52
+ voiceId: string;
53
+ characterSettings: string | null;
54
+ personFeatures: string | null;
55
+ learningFeatures: string | null;
56
+ workFeatures: string | null;
57
+ socializeFeatures: string | null;
58
+ useKnowledge: boolean;
59
+ roomOnlyKnowledge: boolean;
60
+ roomWebSearch: boolean;
61
+ abilityId: string | null;
62
+ baiduCensoringStrategy: string | null;
63
+ knowledgeCheckStrategy: string | null;
64
+ interestTags: string | null;
65
+ temporaryId: string | null;
66
+ treeBatchNo: string | null;
67
+ allowJoinSpace: boolean;
68
+ modelId: string;
69
+ orgId: string | null;
70
+ qrCodeUrl: string | null;
71
+ locationPoint: {
72
+ x: number;
73
+ y: number;
74
+ } | null;
75
+ hot: string;
76
+ score: number;
77
+ professionalUser: string | null;
78
+ autoCreateFace: boolean;
79
+ liveId: string | null;
80
+ liveStartTime: string | null;
81
+ isIpAgent: number;
82
+ isAdopted: number;
83
+ }
84
+ /**
85
+ * 获取智能体列表
86
+ * POST /open-apis/instance/list
87
+ */
88
+ export declare function getAgentInstances(cacheKey: string, config: WorkclawConnectionConfig): Promise<AgentInstance[]>;
89
+ export interface WorkClawMessageParams {
90
+ cacheKey: string;
91
+ config: WorkclawConnectionConfig;
92
+ agentId: string | number;
93
+ receiveId: string | number;
94
+ msgType: string;
95
+ content: string;
96
+ openConversationId?: string;
97
+ replayMsgId?: string;
98
+ endpoint?: string;
99
+ last?: boolean;
100
+ source?: 'deliver' | 'sendText' | 'after_tool_call';
101
+ }
102
+ /**
103
+ * 发送主动消息(非回复)
104
+ * POST /im/v1/messages
105
+ */
106
+ export declare function sendWorkclawMessage(params: WorkClawMessageParams): Promise<string>;
107
+ /**
108
+ * 发送回复消息
109
+ * POST /im/v1/messages/{messageId}/reply
110
+ */
111
+ export declare function sendWorkclawReplyMessage(params: WorkClawMessageParams & {
112
+ messageId: string;
113
+ }): Promise<string>;
114
+ export declare function resolveWorkclawMessage(text: string, mediaUrl?: string): {
115
+ msgType: string;
116
+ content: string;
117
+ };
118
+ export interface CronJobPayload {
119
+ messageId: number | string;
120
+ planId?: number | string;
121
+ clawJobId: string;
122
+ name: string;
123
+ kind: string;
124
+ expr: string;
125
+ message?: string;
126
+ }
127
+ /**
128
+ * 同步 openclaw 创建的定时任务至后端
129
+ * POST /cron/job/add
130
+ */
131
+ export declare function syncWorkclawCronJobToBackend(cacheKey: string, config: WorkclawConnectionConfig, payload: CronJobPayload): Promise<any>;
132
+ /**
133
+ * 获取AppKey所对应的模型配置
134
+ * POST /open-apis/instance/apiKey/{appKey}
135
+ */
136
+ export declare function getWorkclawModelConfigByAppKey(cacheKey: string, config: WorkclawConnectionConfig): Promise<{
137
+ baseUrl: string;
138
+ apiKey: string;
139
+ }>;
140
+ export interface CronJobMessagePayload {
141
+ clawJobId: string;
142
+ message: string;
143
+ }
144
+ /**
145
+ * 此时定时任务触发消息至后端
146
+ * POST /open-apis/cron/job/message
147
+ */
148
+ export declare function sendWorkclawCronJobMessageToBackend(cacheKey: string, config: WorkclawConnectionConfig, payload: CronJobMessagePayload): Promise<any>;
149
+ //# sourceMappingURL=workclaw-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workclaw-client.d.ts","sourceRoot":"","sources":["../../../src/connection/workclaw-client.ts"],"names":[],"mappings":"AAUA,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAE9D;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAGlE;AAQD,wBAAsB,WAAW,CAC/B,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,WAAW,EACjB,gBAAgB,CAAC,EAAE,OAAO,EAC1B,cAAc,CAAC,EAAE,MAAM,GACtB,OAAO,CAAC,GAAG,CAAC,CAsCd;AAED,MAAM,WAAW,wBAAwB;IACvC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB;AA6CD,wBAAsB,sBAAsB,CAC1C,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,wBAAwB,GAC/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E,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED;;;GAGG;AACH,wBAAsB,4BAA4B,CAChD,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,wBAAwB,EAChC,OAAO,EAAE,cAAc,GACtB,OAAO,CAAC,GAAG,CAAC,CA4Bd;AAED;;;GAGG;AACH,wBAAsB,8BAA8B,CAClD,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,wBAAwB,GAC/B,OAAO,CAAC;IACT,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;CACf,CAAC,CAgCD;AAED,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,MAAM,CAAA;CAChB;AAED;;;GAGG;AACH,wBAAsB,mCAAmC,CACvD,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,wBAAwB,EAChC,OAAO,EAAE,qBAAqB,GAC7B,OAAO,CAAC,GAAG,CAAC,CA2Bd"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Agent Handlers - handle AGENT_CREATED, AGENT_UPDATED, AGENT_DELETED events
3
+ */
4
+ interface AgentLogger {
5
+ info?: (msg: string) => void;
6
+ warn?: (msg: string) => void;
7
+ error?: (msg: string) => void;
8
+ }
9
+ export declare function handleAgentCreated(accountData: any, cfg: any, log?: AgentLogger): Promise<void>;
10
+ export declare function handleAgentUpdated(accountData: any, cfg: any, log?: AgentLogger): Promise<void>;
11
+ export declare function handleAgentDeleted(accountData: any, cfg: any, log?: AgentLogger): Promise<void>;
12
+ export {};
13
+ //# sourceMappingURL=agent-handlers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-handlers.d.ts","sourceRoot":"","sources":["../../../src/gateway/agent-handlers.ts"],"names":[],"mappings":"AAAA;;GAEG;AAmBH,UAAU,WAAW;IACnB,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;IAC5B,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;IAC5B,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;CAC9B;AAkVD,wBAAsB,kBAAkB,CACtC,WAAW,EAAE,GAAG,EAChB,GAAG,EAAE,GAAG,EACR,GAAG,CAAC,EAAE,WAAW,GAChB,OAAO,CAAC,IAAI,CAAC,CAwDf;AAED,wBAAsB,kBAAkB,CACtC,WAAW,EAAE,GAAG,EAChB,GAAG,EAAE,GAAG,EACR,GAAG,CAAC,EAAE,WAAW,GAChB,OAAO,CAAC,IAAI,CAAC,CAqEf;AAED,wBAAsB,kBAAkB,CACtC,WAAW,EAAE,GAAG,EAChB,GAAG,EAAE,GAAG,EACR,GAAG,CAAC,EAAE,WAAW,GAChB,OAAO,CAAC,IAAI,CAAC,CA8Cf"}