weaver-work-cli 0.1.29 → 0.1.31

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 (185) hide show
  1. package/dist/chunks/archive-U766FTFH.js +2537 -0
  2. package/dist/chunks/archive-oa-DMWEKX3L.js +1317 -0
  3. package/dist/chunks/asset-TCR7VDEV.js +2109 -0
  4. package/dist/chunks/attachment-content-AQNX5N3S.js +23 -0
  5. package/dist/chunks/blog-EVZWGDVM.js +2157 -0
  6. package/dist/chunks/caizhilian-JOWS6SL5.js +10087 -0
  7. package/dist/chunks/calendar-5WNCV66Q.js +1195 -0
  8. package/dist/chunks/chunk-2DUV44UX.js +15606 -0
  9. package/dist/chunks/chunk-324YPTC2.js +1607 -0
  10. package/dist/chunks/chunk-65QMVWHS.js +231 -0
  11. package/dist/chunks/chunk-6V7ZLF34.js +387 -0
  12. package/dist/chunks/chunk-AC7KJWC5.js +358 -0
  13. package/dist/chunks/chunk-AJ62BGAW.js +29 -0
  14. package/dist/chunks/chunk-BUSC6UAE.js +43 -0
  15. package/dist/chunks/chunk-CVZ2JOSW.js +62 -0
  16. package/dist/chunks/chunk-D4LTJSJD.js +477 -0
  17. package/dist/chunks/chunk-EG6ZU444.js +654 -0
  18. package/dist/chunks/chunk-EZALDOQH.js +383 -0
  19. package/dist/chunks/chunk-FMPJJYYI.js +106 -0
  20. package/dist/chunks/chunk-G2JSIUWF.js +769 -0
  21. package/dist/chunks/chunk-GCG2NMWR.js +703 -0
  22. package/dist/chunks/chunk-GPMFD4RD.js +75 -0
  23. package/dist/chunks/chunk-H3WDBYJW.js +508 -0
  24. package/dist/chunks/chunk-H6XSTSLM.js +2357 -0
  25. package/dist/chunks/chunk-J7RJTZSV.js +5556 -0
  26. package/dist/chunks/chunk-LUSPKZKY.js +53 -0
  27. package/dist/chunks/chunk-NIAJ5ZCG.js +73 -0
  28. package/dist/chunks/chunk-NOODWMCL.js +584 -0
  29. package/dist/chunks/chunk-OOUTBLZ4.js +51 -0
  30. package/dist/chunks/chunk-P26ZWSKU.js +73 -0
  31. package/dist/chunks/chunk-QWY6PGL6.js +3472 -0
  32. package/dist/chunks/chunk-R2IJAK7T.js +464 -0
  33. package/dist/chunks/chunk-R7O5PUWO.js +205 -0
  34. package/dist/chunks/chunk-RCGYCOMG.js +6962 -0
  35. package/dist/chunks/chunk-VZTXRG6X.js +403 -0
  36. package/dist/chunks/chunk-WHD4XMRP.js +161 -0
  37. package/dist/chunks/chunk-YLCYX7LE.js +371 -0
  38. package/dist/chunks/chunk-ZEDWSH32.js +68 -0
  39. package/dist/chunks/continuation-2CKSBLA6.js +11 -0
  40. package/dist/chunks/continuation-HZIZRZBX.js +13 -0
  41. package/dist/chunks/continuation-NLECEJPX.js +11 -0
  42. package/dist/chunks/ebuilder-form-NJ4YK6CC.js +2276 -0
  43. package/dist/chunks/ehr-MMYN36VA.js +5241 -0
  44. package/dist/chunks/employee-SAK2QYXX.js +11 -0
  45. package/dist/chunks/esb-HIWHOU7Q.js +141 -0
  46. package/dist/chunks/fna-KBACQTA5.js +1444 -0
  47. package/dist/chunks/host-3OHS5QUX.js +21 -0
  48. package/dist/chunks/host-IG6KEH5Q.js +19 -0
  49. package/dist/chunks/host-KQL5N4HO.js +23 -0
  50. package/dist/chunks/host-LLSZQCWR.js +17 -0
  51. package/dist/chunks/hrm-LYEC67ZQ.js +244 -0
  52. package/dist/chunks/im-RN2UKAEU.js +252 -0
  53. package/dist/chunks/invoice-EEPHLAF6.js +5179 -0
  54. package/dist/chunks/jiuchuanhui-WVVZYSJE.js +1940 -0
  55. package/dist/chunks/lazy-dispatch-MDOFFL2S.js +28 -0
  56. package/dist/chunks/mail-LNQLTF6L.js +2695 -0
  57. package/dist/chunks/meeting-XSD3BDVQ.js +504 -0
  58. package/dist/chunks/msg-parse-4GSQ2WTO.js +41 -0
  59. package/dist/chunks/okr-TMWTIU2K.js +2482 -0
  60. package/dist/chunks/plan-A2FSFA7T.js +2025 -0
  61. package/dist/chunks/project-T26QLBQF.js +1361 -0
  62. package/dist/chunks/registry-2VLUAESA.js +14 -0
  63. package/dist/chunks/registry-JCFEYXOE.js +18 -0
  64. package/dist/chunks/registry-NYPYMZXG.js +16 -0
  65. package/dist/chunks/registry-Q7OQJ3SU.js +19 -0
  66. package/dist/chunks/registry-ZJMJVWFA.js +19 -0
  67. package/dist/chunks/room-recommend-UR4ZDZS6.js +20 -0
  68. package/dist/chunks/schedule-5L2PM4M6.js +24 -0
  69. package/dist/chunks/state-Y2XBP6YE.js +15 -0
  70. package/dist/chunks/workflow-TR6PG2SL.js +245 -0
  71. package/dist/cmd/argv.js +45 -0
  72. package/dist/cmd/docs/index.js +3 -3
  73. package/dist/cmd/lazy-dispatch.js +20 -0
  74. package/dist/cmd/root.js +2 -4
  75. package/dist/cmd/setup/index.js +2 -2
  76. package/dist/cmd/skills/index.js +2 -2
  77. package/dist/core/package-paths.js +47 -0
  78. package/dist/index.js +163 -7
  79. package/dist/internal/e10/auth/xiaoe.js +3 -3
  80. package/dist/internal/e10/request-runtime.js +18 -62
  81. package/dist/internal/skills/detector.js +2 -2
  82. package/dist/shortcuts/contract/data/performance-catalog.js +1306 -0
  83. package/dist/shortcuts/contract/host.js +91 -35
  84. package/dist/shortcuts/contract/index.js +213 -0
  85. package/dist/shortcuts/contract/manifest.js +928 -0
  86. package/dist/shortcuts/contract/ooxml/docx.js +295 -0
  87. package/dist/shortcuts/contract/ooxml/xlsx.js +221 -0
  88. package/dist/shortcuts/contract/ooxml/zip.js +158 -0
  89. package/dist/shortcuts/contract/operations/assistant.js +1156 -0
  90. package/dist/shortcuts/contract/operations/clause-library.js +522 -0
  91. package/dist/shortcuts/contract/operations/compare.js +193 -0
  92. package/dist/shortcuts/contract/operations/credit-page.js +34 -0
  93. package/dist/shortcuts/contract/operations/flow.js +98 -0
  94. package/dist/shortcuts/contract/operations/page.js +66 -0
  95. package/dist/shortcuts/contract/operations/performance.js +733 -0
  96. package/dist/shortcuts/contract/operations/quote.js +557 -0
  97. package/dist/shortcuts/contract/operations/recommend.js +78 -0
  98. package/dist/shortcuts/contract/operations/registry.js +18 -0
  99. package/dist/shortcuts/contract/operations/review.js +83 -0
  100. package/dist/shortcuts/contract/operations/shared.js +37 -0
  101. package/dist/shortcuts/contract/operations/upload.js +108 -0
  102. package/dist/shortcuts/contract/operations/write.js +3 -2
  103. package/dist/shortcuts/index.js +140 -40
  104. package/dist/shortcuts/invoice/manifest.js +34 -11
  105. package/dist/shortcuts/invoice/operations/reim-auto.js +9 -0
  106. package/dist/shortcuts/invoice/operations/reim.js +81 -5
  107. package/dist/shortcuts/invoice/operations/shared.js +12 -5
  108. package/dist/shortcuts/meeting/host.js +45 -3
  109. package/dist/shortcuts/meeting/invitation/docx.js +442 -0
  110. package/dist/shortcuts/meeting/operations/attachment-content.js +418 -0
  111. package/dist/shortcuts/meeting/operations/attachment.js +442 -0
  112. package/dist/shortcuts/meeting/operations/eb/cache.js +57 -0
  113. package/dist/shortcuts/meeting/operations/eb/catalog.js +343 -28
  114. package/dist/shortcuts/meeting/operations/eb/conflict.js +372 -11
  115. package/dist/shortcuts/meeting/operations/eb/create-flow.js +710 -0
  116. package/dist/shortcuts/meeting/operations/eb/decision.js +47 -1
  117. package/dist/shortcuts/meeting/operations/eb/factory.js +129 -11
  118. package/dist/shortcuts/meeting/operations/eb/index.js +122 -2
  119. package/dist/shortcuts/meeting/operations/eb/room-recommend.js +378 -0
  120. package/dist/shortcuts/meeting/operations/eb/room-summary.js +84 -0
  121. package/dist/shortcuts/meeting/operations/eb/schedule.js +450 -0
  122. package/dist/shortcuts/meeting/operations/from-group-chat.js +576 -0
  123. package/dist/shortcuts/meeting/operations/invitation.js +458 -0
  124. package/dist/shortcuts/meeting/operations/minute-content.js +266 -0
  125. package/dist/shortcuts/meeting/operations/pipeline.js +489 -0
  126. package/dist/shortcuts/meeting/operations/qrcode.js +131 -0
  127. package/dist/shortcuts/meeting/operations/receipts.js +1 -1
  128. package/dist/shortcuts/meeting/operations/registry.js +18 -0
  129. package/dist/shortcuts/meeting/operations/summary.js +276 -0
  130. package/dist/shortcuts/meeting/operations/task-notify.js +325 -0
  131. package/dist/shortcuts/meeting/operations.js +42 -1
  132. package/dist/shortcuts/meeting/qr/encoder.js +427 -0
  133. package/dist/shortcuts/meeting/qr/render.js +103 -0
  134. package/dist/shortcuts/workflow/operations/form.js +17 -5
  135. package/docs/contract.md +39 -4
  136. package/docs/invoice.md +5 -5
  137. package/package.json +3 -2
  138. package/scripts/bundle.mjs +63 -0
  139. package/skill-template/business-info.json +25 -4
  140. package/skill-template/domains/jinchengda.md +16 -3
  141. package/skill-template/domains/yepiaotong.md +1 -1
  142. package/skills/weaver-e10-jinchengda/SKILL.md +111 -31
  143. package/skills/weaver-e10-jinchengda/references/contract-agent-entry.md +7 -13
  144. package/skills/weaver-e10-jinchengda/references/contract-ai-assistant.md +150 -0
  145. package/skills/weaver-e10-jinchengda/references/contract-ai-review.md +87 -0
  146. package/skills/weaver-e10-jinchengda/references/contract-clause-library-crud.md +111 -0
  147. package/skills/weaver-e10-jinchengda/references/contract-clause-recommender.md +0 -15
  148. package/skills/weaver-e10-jinchengda/references/contract-clause-reference-save.md +0 -13
  149. package/skills/weaver-e10-jinchengda/references/contract-credit-page.md +50 -0
  150. package/skills/weaver-e10-jinchengda/references/contract-disabled-capabilities.md +4 -2
  151. package/skills/weaver-e10-jinchengda/references/contract-doc-compare.md +74 -0
  152. package/skills/weaver-e10-jinchengda/references/contract-flow-launch.md +84 -0
  153. package/skills/weaver-e10-jinchengda/references/contract-performance-query.md +29 -0
  154. package/skills/weaver-e10-jinchengda/references/contract-quote-to-contract.md +28 -0
  155. package/skills/weaver-e10-jinchengda/references/contract-request-status.md +2 -21
  156. package/skills/weaver-e10-jinchengda/references/contract-request-write.md +0 -24
  157. package/skills/weaver-e10-jinchengda/references/contract-signing-subjects.md +0 -15
  158. package/skills/weaver-e10-jinchengda/references/contract-subject-create.md +0 -17
  159. package/skills/weaver-e10-jinchengda/references/contract-template-recommend.md +70 -0
  160. package/skills/weaver-e10-jinchengda/references/contract-template-selector.md +0 -15
  161. package/skills/weaver-e10-jinchengda/references/contract-workflow-discovery.md +0 -15
  162. package/skills/weaver-e10-jinchengda/references/source-manifest.json +1168 -152
  163. package/skills/weaver-e10-meeting/SKILL.md +493 -17
  164. package/skills/weaver-e10-meeting/references/meeting-change.md +4 -4
  165. package/skills/weaver-e10-meeting/references/meeting-create.md +6 -6
  166. package/skills/weaver-e10-meeting/references/meeting-eb.md +503 -27
  167. package/skills/weaver-e10-meeting/references/meeting-invitation.md +113 -0
  168. package/skills/weaver-e10-meeting/references/meeting-lifecycle.md +6 -6
  169. package/skills/weaver-e10-meeting/references/meeting-minute-file.md +425 -0
  170. package/skills/weaver-e10-meeting/references/meeting-queries.md +4 -4
  171. package/skills/weaver-e10-meeting/references/meeting-receipts-signs.md +15 -15
  172. package/skills/weaver-e10-meeting/references/meeting-verification.md +19 -11
  173. package/skills/weaver-e10-meeting.zip +0 -0
  174. package/skills/weaver-e10-yepiaotong/SKILL.md +9 -5
  175. package/skills/weaver-e10-yepiaotong/references/invoice-enterprise-list.md +1 -1
  176. package/skills/weaver-e10-yepiaotong/references/invoice-personal-list.md +6 -5
  177. package/skills/weaver-e10-yepiaotong/references/invoice-reim.md +14 -11
  178. package/skills/weaver-e10-yepiaotong/references/reim-api-reference.md +97 -56
  179. package/skills/weaver-e10-yepiaotong/references/reim-examples.md +84 -60
  180. package/skills/weaver-e10-yepiaotong/references/reim-form-fill-rules.md +142 -105
  181. package/skills/weaver-e10-yepiaotong/references/reim-matching-rules.md +53 -194
  182. package/skills/weaver-e10-yepiaotong/references/reim-phone-subsidy-rules.md +7 -7
  183. package/skills/weaver-e10-yepiaotong/references/reim-workflow.md +164 -72
  184. package/skills/weaver-e10-yepiaotong/references/source-manifest.json +6 -0
  185. package/templates/meeting/invitation.docx +0 -0
@@ -0,0 +1,231 @@
1
+ import { createRequire as __esbuildCreateRequire } from 'node:module';
2
+ const require = __esbuildCreateRequire(import.meta.url);
3
+ import {
4
+ workflowApiError,
5
+ workflowAuthError,
6
+ workflowNetworkError
7
+ } from "./chunk-FMPJJYYI.js";
8
+ import {
9
+ createE10RequestRuntime,
10
+ requireE10Session
11
+ } from "./chunk-H3WDBYJW.js";
12
+ import {
13
+ E10_SESSION_EXPIRED_MESSAGE,
14
+ getActiveProfile
15
+ } from "./chunk-324YPTC2.js";
16
+
17
+ // src/shortcuts/workflow/host.ts
18
+ var DEFAULT_TIMEOUT_MS = 3e4;
19
+ var LOGIN_EXPIRED_WORDS = [
20
+ "\u672A\u767B\u5F55",
21
+ "\u8BF7\u767B\u5F55",
22
+ "\u767B\u5F55\u5931\u6548",
23
+ "\u767B\u5F55\u8D85\u65F6",
24
+ "\u4F1A\u8BDD\u8FC7\u671F",
25
+ "\u8BA4\u8BC1\u5931\u8D25",
26
+ "\u8EAB\u4EFD\u8BA4\u8BC1\u5931\u8D25",
27
+ "token\u5931\u6548",
28
+ "token\u8D85\u65F6",
29
+ "token\u8FC7\u671F",
30
+ "token expired",
31
+ "token timeout",
32
+ "token invalid",
33
+ "session expired",
34
+ "login required",
35
+ "not login",
36
+ "not logged"
37
+ ];
38
+ function responseRawText(value) {
39
+ if (typeof value === "string") return value;
40
+ if (value === void 0 || value === null) return "";
41
+ try {
42
+ return JSON.stringify(value);
43
+ } catch {
44
+ return String(value);
45
+ }
46
+ }
47
+ function payloadTexts(value) {
48
+ const texts = [];
49
+ if (typeof value === "string") {
50
+ texts.push(value);
51
+ return texts;
52
+ }
53
+ if (!value || typeof value !== "object") return texts;
54
+ const record = value;
55
+ for (const key of ["code", "status", "message", "msg", "error", "errorMsg", "rawText"]) {
56
+ const item = record[key];
57
+ if (item !== void 0 && item !== null) texts.push(String(item));
58
+ }
59
+ const data = record.data;
60
+ if (data && typeof data === "object") {
61
+ const nested = data;
62
+ for (const key of ["code", "status", "message", "msg", "error", "errorMsg"]) {
63
+ const item = nested[key];
64
+ if (item !== void 0 && item !== null) texts.push(String(item));
65
+ }
66
+ }
67
+ return texts;
68
+ }
69
+ function isAtustRedirect(status, value) {
70
+ if (status === void 0 || !(status >= 300 && status < 400)) return false;
71
+ return responseRawText(value).toLowerCase().includes("atrust");
72
+ }
73
+ function isLoginExpired(value, httpStatus) {
74
+ if (httpStatus === 401 || httpStatus === 403) return true;
75
+ if (isAtustRedirect(httpStatus, value)) return true;
76
+ const joined = payloadTexts(value).join("\n").toLowerCase();
77
+ if (joined.includes("login.jsp")) return true;
78
+ if (joined.includes("<input") && joined.includes("password")) return true;
79
+ return LOGIN_EXPIRED_WORDS.some((word) => joined.includes(word.toLowerCase()));
80
+ }
81
+ function extractApiBusinessError(payload) {
82
+ if (!payload || typeof payload !== "object") return "";
83
+ const record = payload;
84
+ const message = record.message;
85
+ if (message && typeof message === "object") {
86
+ const info = message;
87
+ const errcode = String(info.errcode ?? "").trim();
88
+ const errmsg = String(info.errmsg ?? "").trim();
89
+ if (errcode && !["0", "200"].includes(errcode)) {
90
+ return errmsg || `\u63A5\u53E3\u9519\u8BEF\u7801 ${errcode}`;
91
+ }
92
+ }
93
+ if (record.fail === true || record.status === false) {
94
+ for (const key of ["msg", "message", "error", "errorMsg"]) {
95
+ const value = record[key];
96
+ if (typeof value === "string" && value.trim()) return value.trim();
97
+ }
98
+ if (record.code !== void 0 && record.code !== null) {
99
+ return `\u63A5\u53E3\u8FD4\u56DE\u72B6\u6001\u5F02\u5E38\uFF0Ccode=${String(record.code)}`;
100
+ }
101
+ }
102
+ return "";
103
+ }
104
+ function createWorkflowHost(ctx, dependencies = {}) {
105
+ let session = null;
106
+ let sessionContext = null;
107
+ const requireSession = dependencies.requireSession || ((innerCtx) => requireE10Session(innerCtx, { skipProfileEnrichment: true }));
108
+ async function ensureSession() {
109
+ if (!session) {
110
+ session = await requireSession(ctx);
111
+ const options = ctx.getGlobalOptions();
112
+ sessionContext = {
113
+ baseUrl: session.getBaseUrl(),
114
+ profile: options.profile || getActiveProfile(),
115
+ userId: session.userId,
116
+ agentType: session.agentType,
117
+ ...session.version ? { version: session.version } : {},
118
+ ...session.tenantKey ? { tenantKey: session.tenantKey } : {},
119
+ ...session.tenantName ? { tenantName: session.tenantName } : {},
120
+ ...session.department ? { department: session.department } : {},
121
+ ...session.subcompany ? { subcompany: session.subcompany } : {},
122
+ ...session.position ? { position: session.position } : {}
123
+ };
124
+ }
125
+ return session;
126
+ }
127
+ async function getSession() {
128
+ await ensureSession();
129
+ return sessionContext;
130
+ }
131
+ async function run(request, responseType) {
132
+ const {
133
+ method = "POST",
134
+ path,
135
+ query,
136
+ headers,
137
+ body,
138
+ form,
139
+ formData,
140
+ operation,
141
+ timeoutMs = DEFAULT_TIMEOUT_MS
142
+ } = request;
143
+ const runtime = createE10RequestRuntime(ctx, await ensureSession(), {
144
+ interceptors: dependencies.interceptors,
145
+ fetch: dependencies.fetch,
146
+ // 流程侧是唯一开启"请求带上网关会话票据(ZT_SESSION)"的调用方:登录时已把票存进 auth
147
+ // (`ztSession`),带上可让网关不再为每个请求重发票。没有票或票已过期时不附加,请求头与从前一致。
148
+ attachSessionTicket: true
149
+ });
150
+ let response;
151
+ try {
152
+ const base = { method, path, query, headers, body, form, formData, operation, timeoutMs, module: "workflow" };
153
+ response = responseType === "binary" ? await runtime.requestBinary(base) : await runtime.requestJson(base);
154
+ } catch (error) {
155
+ const structured = error;
156
+ if (structured?.type === "network") {
157
+ throw workflowNetworkError(
158
+ structured.subtype || "transport",
159
+ structured.message || "\u7F51\u7EDC\u8BF7\u6C42\u5931\u8D25",
160
+ { retryable: false, details: structured.details }
161
+ );
162
+ }
163
+ throw error;
164
+ }
165
+ if ("content" in response) {
166
+ if (isLoginExpired({}, response.status)) {
167
+ throw workflowAuthError("session_expired", E10_SESSION_EXPIRED_MESSAGE, { httpStatus: response.status });
168
+ }
169
+ return {
170
+ status: response.status,
171
+ value: {},
172
+ content: response.content,
173
+ contentType: response.contentType
174
+ };
175
+ }
176
+ if (isLoginExpired(response.value, response.status)) {
177
+ throw workflowAuthError("session_expired", E10_SESSION_EXPIRED_MESSAGE, {
178
+ httpStatus: response.status,
179
+ details: { endpointKey: operation, response: response.value }
180
+ });
181
+ }
182
+ if (response.parseError) {
183
+ if (response.status < 200 || response.status >= 300) {
184
+ throw workflowApiError("http_error", `OA \u63A5\u53E3 HTTP ${response.status}`, {
185
+ code: response.status,
186
+ details: { status: response.status }
187
+ });
188
+ }
189
+ throw workflowNetworkError("protocol", `\u63A5\u53E3\u8FD4\u56DE\u4E0D\u662F\u5408\u6CD5 JSON\uFF08HTTP ${response.status}\uFF09`, { retryable: false });
190
+ }
191
+ if (response.status < 200 || response.status >= 300) {
192
+ throw workflowApiError("http_error", `OA \u63A5\u53E3 HTTP ${response.status}`, {
193
+ code: response.status,
194
+ details: { status: response.status }
195
+ });
196
+ }
197
+ if (request.tolerateBusinessError !== true) {
198
+ const businessError = extractApiBusinessError(response.value);
199
+ if (businessError) {
200
+ throw workflowApiError(
201
+ "business_error",
202
+ `OA \u63A5\u53E3\u8FD4\u56DE\u9519\u8BEF\uFF0C\u672C\u6B21\u64CD\u4F5C\u5DF2\u505C\u6B62\u3002\u63A5\u53E3\u63D0\u793A\uFF1A${businessError}\u3002\u5982\u679C\u60A8\u65E0\u6CD5\u5904\u7406\uFF0C\u8BF7\u8054\u7CFB\u7CFB\u7EDF\u7BA1\u7406\u5458\u3002`,
203
+ { details: { endpointKey: operation, businessError } }
204
+ );
205
+ }
206
+ }
207
+ return { status: response.status, value: response.value };
208
+ }
209
+ return {
210
+ async workflowRequest(request) {
211
+ const result = await run(request, "json");
212
+ return result.value;
213
+ },
214
+ async workflowBinaryRequest(request) {
215
+ const result = await run(request, "binary");
216
+ return {
217
+ content: result.content,
218
+ contentType: result.contentType || "application/octet-stream",
219
+ status: result.status
220
+ };
221
+ },
222
+ getSession
223
+ };
224
+ }
225
+
226
+ export {
227
+ isAtustRedirect,
228
+ isLoginExpired,
229
+ extractApiBusinessError,
230
+ createWorkflowHost
231
+ };
@@ -0,0 +1,387 @@
1
+ import { createRequire as __esbuildCreateRequire } from 'node:module';
2
+ const require = __esbuildCreateRequire(import.meta.url);
3
+ import {
4
+ isEsbFlowUnavailable
5
+ } from "./chunk-R7O5PUWO.js";
6
+ import {
7
+ esbValidationError
8
+ } from "./chunk-GPMFD4RD.js";
9
+
10
+ // src/shortcuts/esb/manifest.ts
11
+ var flowId = { type: "string", pattern: "^\\d+$", minLength: 1, maxLength: 32 };
12
+ var customParams = {
13
+ type: "object",
14
+ minProperties: 1,
15
+ properties: {
16
+ mainTable: { type: "object" }
17
+ },
18
+ required: ["mainTable"],
19
+ description: "\u52A8\u4F5C\u6D41\u81EA\u5B9A\u4E49\u8F93\u5165\u53C2\u6570\uFF0C\u987B\u5305\u542B mainTable\uFF1B\u4E3B\u8868\u4E0E\u660E\u7EC6\u8868\u5B57\u6BB5\u4EE5 esb.input-format \u8FD4\u56DE\u7684\u6A21\u677F\u4E3A\u51C6"
20
+ };
21
+ var triggerProperties = {
22
+ esbFlowId: { ...flowId, description: "\u666E\u901A\u89E6\u53D1\uFF1A\u52A8\u4F5C\u6D41 ID\uFF08esbFlowId\uFF09" },
23
+ uniqueIndent: {
24
+ type: "string",
25
+ minLength: 1,
26
+ maxLength: 128,
27
+ description: "\u552F\u4E00\u503C\u89E6\u53D1\uFF1A\u52A8\u4F5C\u6D41\u552F\u4E00\u503C\uFF0C\u53D6\u503C\u4E3A esb_application.primary_key\uFF08\u9700\u5728 esb_setting \u5E93\u67E5\u5F97\u540E\u4F20\u5165\uFF09"
28
+ },
29
+ employeeId: { type: "string", minLength: 1, maxLength: 64, description: "\u89E6\u53D1\u4EBA\u5458 ID\uFF08\u5FC5\u586B\uFF09" },
30
+ customParams,
31
+ moduleSource: { type: "string", minLength: 1, maxLength: 64, description: "\u89E6\u53D1\u6765\u6E90\u6807\u8BC6\uFF0C\u9ED8\u8BA4\u4E0D\u8981\u4F20\uFF1B\u4EC5\u4E8C\u5F00\u573A\u666F\u4F20 ecode" }
32
+ };
33
+ var esbOperations = [
34
+ {
35
+ name: "esb.input-format",
36
+ summary: "\u6309 applicationId \u83B7\u53D6\u81EA\u5B9A\u4E49\u89E6\u53D1\u52A8\u4F5C\u6D41\u7684\u5165\u53C2\u6A21\u677F\uFF08\u53EA\u8BFB\uFF0C\u65E0\u526F\u4F5C\u7528\uFF09",
37
+ risk: "read",
38
+ inputSchema: {
39
+ type: "object",
40
+ additionalProperties: false,
41
+ properties: {
42
+ applicationId: { ...flowId, description: "\u52A8\u4F5C\u6D41 ID\uFF08\u4E0E\u89E6\u53D1\u63A5\u53E3\u7684 esbFlowId \u6307\u5411\u540C\u4E00\u52A8\u4F5C\u6D41\uFF09" }
43
+ },
44
+ required: ["applicationId"]
45
+ }
46
+ },
47
+ {
48
+ name: "esb.trigger.prepare",
49
+ summary: "\u89E6\u53D1\u524D\u7684\u53EA\u8BFB\u56DE\u67E5\u4E0E\u8BF7\u6C42\u4F53\u7EC4\u88C5\uFF0C\u7B7E\u53D1 apply \u6240\u9700\u7684 continuation\uFF08\u4E0D\u4EA7\u751F\u4E1A\u52A1\u526F\u4F5C\u7528\uFF09",
50
+ risk: "read-before-write",
51
+ inputSchema: {
52
+ type: "object",
53
+ additionalProperties: false,
54
+ properties: triggerProperties,
55
+ required: ["employeeId", "customParams"],
56
+ oneOf: [{ required: ["esbFlowId"] }, { required: ["uniqueIndent"] }]
57
+ }
58
+ },
59
+ {
60
+ name: "esb.trigger.apply",
61
+ summary: "\u6309 continuation \u6267\u884C\u52A8\u4F5C\u6D41\u89E6\u53D1\uFF08\u9AD8\u98CE\u9669\u5199\u64CD\u4F5C\uFF0C\u53EF\u80FD\u4EA7\u751F\u4E1A\u52A1\u526F\u4F5C\u7528\uFF09",
62
+ risk: "high-risk-write",
63
+ inputSchema: {
64
+ type: "object",
65
+ additionalProperties: false,
66
+ properties: {
67
+ continuation: { type: "string", minLength: 1, description: "esb.trigger.prepare \u8FD4\u56DE\u7684 continuation\uFF0C\u6709\u6548\u671F 10 \u5206\u949F" },
68
+ confirm: { const: true, description: "\u5FC5\u987B\u663E\u5F0F\u4E3A true\uFF0C\u8868\u793A\u7528\u6237\u5DF2\u786E\u8BA4\u6267\u884C\u8BE5\u52A8\u4F5C\u6D41" }
69
+ },
70
+ required: ["continuation", "confirm"]
71
+ }
72
+ }
73
+ ];
74
+ var esbManifest = {
75
+ schemaVersion: 1,
76
+ name: "esb",
77
+ title: "\u6CDB\u5FAEE10 ESB\u52A8\u4F5C\u6D41\u6267\u884C",
78
+ version: "0.1.0",
79
+ host: "e10-esb",
80
+ status: "builtin",
81
+ sourceSkill: "weaver-e10-customesb-execute",
82
+ operations: esbOperations,
83
+ withheldOperations: [
84
+ {
85
+ name: "esb.actionflow.resolve",
86
+ reason: "\u6309\u52A8\u4F5C\u6D41\u540D\u79F0\u89E3\u6790 esbFlowId \u9700\u8981 ESB \u4E2D\u5FC3\u52A8\u4F5C\u6D41\u5217\u8868\u67E5\u8BE2\u63A5\u53E3\uFF0C\u6E90\u8D44\u6599\u672A\u7ED9\u51FA\u8BE5\u63A5\u53E3\u7684\u8DEF\u5F84\u3001\u8BF7\u6C42\u5B57\u6BB5\u4E0E\u8FD4\u56DE\u7ED3\u6784\uFF0C\u65E0\u6CD5\u5B89\u5168\u5B9E\u73B0\uFF1B\u8BF7\u7528\u6237\u76F4\u63A5\u63D0\u4F9B\u52A8\u4F5C\u6D41 ID\u3002"
87
+ },
88
+ {
89
+ name: "esb.unique-indent.resolve",
90
+ reason: "\u552F\u4E00\u503C\u89E6\u53D1\u6240\u9700\u7684 primary_key \u9700\u76F4\u63A5\u67E5\u8BE2 esb_setting \u5E93\uFF08SELECT primary_key FROM esb_application WHERE id = ?\uFF09\uFF0CCLI \u6CA1\u6709\u6570\u636E\u5E93\u901A\u9053\uFF0C\u53EA\u80FD\u7531\u8C03\u7528\u65B9\u67E5\u5F97\u540E\u901A\u8FC7 uniqueIndent \u4F20\u5165\u3002"
91
+ }
92
+ ]
93
+ };
94
+
95
+ // src/shortcuts/esb/operations/types.ts
96
+ function esbSuccess(action, data, meta, warnings = []) {
97
+ const payload = { ok: true, action, data };
98
+ if (meta && Object.keys(meta).length > 0) payload.meta = meta;
99
+ if (warnings.length > 0) payload.warnings = warnings;
100
+ return payload;
101
+ }
102
+
103
+ // src/shortcuts/esb/operations/shared.ts
104
+ var FORBIDDEN_KEYS = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);
105
+ function asObject(value, field = "input") {
106
+ if (!value || typeof value !== "object" || Array.isArray(value)) {
107
+ throw esbValidationError("input_not_object", `${field} \u5FC5\u987B\u662F JSON \u5BF9\u8C61`);
108
+ }
109
+ return value;
110
+ }
111
+ function assertNoForbiddenKeys(input) {
112
+ for (const key of Object.keys(input)) {
113
+ if (FORBIDDEN_KEYS.has(key)) {
114
+ throw esbValidationError("forbidden_key", `\u8F93\u5165\u5305\u542B\u975E\u6CD5\u5B57\u6BB5\uFF1A${key}`);
115
+ }
116
+ }
117
+ }
118
+ function assertKnownKeys(input, allowed, operation) {
119
+ const unknown = Object.keys(input).filter((key) => !allowed.includes(key));
120
+ if (unknown.length > 0) {
121
+ throw esbValidationError("unknown_field", `${operation} \u4E0D\u652F\u6301\u5B57\u6BB5\uFF1A${unknown.join("\u3001")}`, { unknown });
122
+ }
123
+ }
124
+ function isFilled(value) {
125
+ return value !== void 0 && value !== null && value !== "";
126
+ }
127
+ function requiredString(value, field) {
128
+ if (!isFilled(value)) {
129
+ throw esbValidationError("field_required", `${field} \u5FC5\u586B`);
130
+ }
131
+ if (typeof value === "object") {
132
+ throw esbValidationError("field_invalid", `${field} \u5FC5\u987B\u662F\u5B57\u7B26\u4E32`);
133
+ }
134
+ return String(value);
135
+ }
136
+ function flowIdString(value, field) {
137
+ const text = requiredString(value, field);
138
+ if (!/^\d+$/.test(text)) {
139
+ throw esbValidationError("field_invalid", `${field} \u5FC5\u987B\u662F\u6570\u5B57 ID\uFF08\u957F\u6574\u578B\u6309\u5B57\u7B26\u4E32\u4F20\u9012\uFF09`);
140
+ }
141
+ return text;
142
+ }
143
+ function normalizeTriggerInput(input) {
144
+ const hasFlowId = isFilled(input.esbFlowId);
145
+ const hasUniqueIndent = isFilled(input.uniqueIndent);
146
+ if (!hasFlowId && !hasUniqueIndent) {
147
+ throw esbValidationError(
148
+ "trigger_target_missing",
149
+ "esbFlowId \u4E0E uniqueIndent \u4E8C\u9009\u4E00\u5FC5\u586B\uFF1A\u666E\u901A\u89E6\u53D1\u4F20 esbFlowId\uFF0C\u552F\u4E00\u503C\u89E6\u53D1\u4F20 uniqueIndent"
150
+ );
151
+ }
152
+ if (hasFlowId && hasUniqueIndent) {
153
+ throw esbValidationError("trigger_target_conflict", "esbFlowId \u4E0E uniqueIndent \u4E0D\u80FD\u540C\u65F6\u4F20\u5165\uFF0C\u8BF7\u4E8C\u9009\u4E00");
154
+ }
155
+ const employeeId = requiredString(input.employeeId, "employeeId");
156
+ const customParams2 = asObject(input.customParams, "customParams");
157
+ const mainTable = customParams2.mainTable;
158
+ if (!mainTable || typeof mainTable !== "object" || Array.isArray(mainTable)) {
159
+ throw esbValidationError("custom_params_invalid", "customParams.mainTable \u5FC5\u987B\u662F JSON \u5BF9\u8C61");
160
+ }
161
+ const moduleSource = isFilled(input.moduleSource) ? requiredString(input.moduleSource, "moduleSource") : void 0;
162
+ return {
163
+ mode: hasFlowId ? "esbFlowId" : "uniqueIndent",
164
+ ...hasFlowId ? { esbFlowId: flowIdString(input.esbFlowId, "esbFlowId") } : {},
165
+ ...hasUniqueIndent ? { uniqueIndent: requiredString(input.uniqueIndent, "uniqueIndent") } : {},
166
+ employeeId,
167
+ customParams: customParams2,
168
+ ...moduleSource === void 0 ? {} : { moduleSource }
169
+ };
170
+ }
171
+ function buildTriggerPayload(target) {
172
+ return {
173
+ customParams: target.customParams,
174
+ ...target.moduleSource === void 0 ? {} : { moduleSource: target.moduleSource },
175
+ ...target.esbFlowId === void 0 ? {} : { esbFlowId: target.esbFlowId },
176
+ ...target.uniqueIndent === void 0 ? {} : { uniqueIndent: target.uniqueIndent },
177
+ employeeId: target.employeeId
178
+ };
179
+ }
180
+ var MAX_PLACEHOLDERS = 100;
181
+ function collectPlaceholders(value, prefix = "", collected = []) {
182
+ if (collected.length >= MAX_PLACEHOLDERS) return collected;
183
+ if (Array.isArray(value)) {
184
+ value.forEach((item, index) => collectPlaceholders(item, `${prefix}[${index}]`, collected));
185
+ return collected;
186
+ }
187
+ if (value && typeof value === "object") {
188
+ for (const [key, item] of Object.entries(value)) {
189
+ collectPlaceholders(item, prefix ? `${prefix}.${key}` : key, collected);
190
+ if (collected.length >= MAX_PLACEHOLDERS) break;
191
+ }
192
+ return collected;
193
+ }
194
+ if (typeof value === "string" && value.trim() === "#\u53EF\u9009") collected.push(prefix);
195
+ return collected;
196
+ }
197
+ var PAGE_ACTIONS = {
198
+ 0: "\u65E0\u9700\u9875\u9762\u64CD\u4F5C",
199
+ 1: "\u5237\u65B0\u9875\u9762",
200
+ 2: "\u5173\u95ED\u9875\u9762",
201
+ 3: "\u8DF3\u8F6C\u9875\u9762"
202
+ };
203
+ var REMINDERS = {
204
+ 0: "\u65E0\u63D0\u9192",
205
+ 1: "\u63D0\u9192",
206
+ 2: "\u786E\u8BA4",
207
+ 3: "\u8B66\u544A",
208
+ 4: "\u9519\u8BEF"
209
+ };
210
+ function asRecord(value) {
211
+ return value && typeof value === "object" && !Array.isArray(value) ? value : {};
212
+ }
213
+ function summarizeTriggerResult(value) {
214
+ const record = asRecord(value);
215
+ const actionData = asRecord(record.actionData);
216
+ const pageAction = Number(actionData.pageAction ?? 0);
217
+ const reminder = Number(actionData.reminder ?? 0);
218
+ const hasData = Number(actionData.hasData ?? 0);
219
+ const followUp = [];
220
+ if (pageAction !== 0) followUp.push(PAGE_ACTIONS[pageAction] || `\u9875\u9762\u52A8\u4F5C ${pageAction}`);
221
+ if (reminder !== 0) {
222
+ const reminderMsg = typeof actionData.reminderMsg === "string" && actionData.reminderMsg.trim() ? actionData.reminderMsg.trim() : void 0;
223
+ followUp.push(`${REMINDERS[reminder] || `\u63D0\u9192 ${reminder}`}${reminderMsg ? `\uFF1A${reminderMsg}` : ""}`);
224
+ }
225
+ if (hasData === 1) followUp.push("\u52A8\u4F5C\u6D41\u8FD4\u56DE\u4E86\u4E1A\u52A1\u6570\u636E\uFF0C\u89C1 actionData.responseData");
226
+ if (followUp.length === 0) followUp.push("\u52A8\u4F5C\u6D41\u5DF2\u6267\u884C\u5B8C\u6210\uFF0C\u65E0\u9700\u989D\u5916\u9875\u9762\u52A8\u4F5C");
227
+ return {
228
+ resultCode: 200,
229
+ resultMsg: typeof record.resultMsg === "string" ? record.resultMsg : "",
230
+ ...record.resultData === void 0 ? {} : { resultData: record.resultData },
231
+ ...record.nextAction === void 0 ? {} : { nextAction: record.nextAction },
232
+ actionData,
233
+ followUp
234
+ };
235
+ }
236
+
237
+ // src/shortcuts/esb/operations/input-format.ts
238
+ function normalizeTemplate(raw, applicationId) {
239
+ const record = raw && typeof raw === "object" && !Array.isArray(raw) ? raw : {};
240
+ const customParams2 = record.customParams ?? null;
241
+ const esbFlowId = record.esbFlowId === void 0 || record.esbFlowId === null ? applicationId : String(record.esbFlowId);
242
+ const moduleSource = typeof record.moduleSource === "string" && record.moduleSource.trim() ? record.moduleSource.trim() : "AISKILL";
243
+ const optionalFields = collectPlaceholders(customParams2);
244
+ const warnings = [];
245
+ if (customParams2 === null) {
246
+ warnings.push("\u63A5\u53E3\u672A\u8FD4\u56DE customParams\uFF1A\u8BF7\u786E\u8BA4\u8BE5\u52A8\u4F5C\u6D41\u662F\u5426\u914D\u7F6E\u4E86\u81EA\u5B9A\u4E49\u5165\u53C2\u6A21\u677F\uFF0C\u672A\u914D\u7F6E\u65F6\u6309\u76EE\u6807\u52A8\u4F5C\u6D41\u8981\u6C42\u76F4\u63A5\u7EC4\u88C5 mainTable");
247
+ }
248
+ if (optionalFields.length > 0) {
249
+ warnings.push(`\u6A21\u677F\u542B ${optionalFields.length} \u4E2A #\u53EF\u9009 \u5360\u4F4D\u5B57\u6BB5\uFF0C\u89E6\u53D1\u65F6\u66FF\u6362\u4E3A\u771F\u5B9E\u4E1A\u52A1\u503C\u6216\u5220\u9664\u4E0D\u9700\u8981\u7684\u5B57\u6BB5`);
250
+ }
251
+ return {
252
+ template: { applicationId, esbFlowId, moduleSource, customParams: customParams2, optionalFields },
253
+ warnings
254
+ };
255
+ }
256
+ var esbInputFormatHandlers = {
257
+ "esb.input-format": async (input, { host }) => {
258
+ const applicationId = flowIdString(input.applicationId, "applicationId");
259
+ const { template, warnings } = normalizeTemplate(await host.inputFormat(applicationId), applicationId);
260
+ return esbSuccess("esb.input-format", template, { status: "COMPLETE" }, warnings);
261
+ }
262
+ };
263
+
264
+ // src/shortcuts/esb/operations/trigger.ts
265
+ function describeLookupFailure(error) {
266
+ if (error && typeof error === "object") {
267
+ const structured = error;
268
+ const subtype = typeof structured.subtype === "string" ? structured.subtype : "unknown";
269
+ return `subtype=${subtype}`;
270
+ }
271
+ return "cause=unknown";
272
+ }
273
+ var esbTriggerHandlers = {
274
+ "esb.trigger.prepare": async (input, { host, continuation }) => {
275
+ const target = normalizeTriggerInput(input);
276
+ const warnings = [];
277
+ let templateFields = null;
278
+ if (target.mode === "esbFlowId") {
279
+ const esbFlowId = target.esbFlowId;
280
+ try {
281
+ const raw = await host.inputFormat(esbFlowId);
282
+ const record = raw && typeof raw === "object" && !Array.isArray(raw) ? raw : {};
283
+ templateFields = collectPlaceholders(record.customParams ?? null);
284
+ } catch (error) {
285
+ if (isEsbFlowUnavailable(error)) throw error;
286
+ warnings.push(`\u76EE\u6807\u52A8\u4F5C\u6D41\u5165\u53C2\u6A21\u677F\u56DE\u67E5\u672A\u6210\u529F\uFF08${describeLookupFailure(error)}\uFF09\uFF0C\u5DF2\u8DF3\u8FC7\u56DE\u67E5\uFF1B\u89E6\u53D1\u662F\u5426\u53EF\u7528\u4EE5 apply \u8FD4\u56DE\u4E3A\u51C6`);
287
+ }
288
+ } else {
289
+ warnings.push("\u552F\u4E00\u503C\u89E6\u53D1\u65E0\u6CD5\u6309 applicationId \u56DE\u67E5\uFF1A\u540C\u4E00\u79DF\u6237\u4E0B\u5B58\u5728\u76F8\u540C\u552F\u4E00\u503C\u7684\u591A\u6761\u52A8\u4F5C\u6D41\u65F6\uFF0C\u7CFB\u7EDF\u53EA\u6267\u884C create_time \u6700\u65B0\u7684\u4E00\u6761");
290
+ }
291
+ const payload = buildTriggerPayload(target);
292
+ const session = await host.getSession();
293
+ const token = await continuation.issue({
294
+ operation: "esb.trigger.apply",
295
+ target: { mode: target.mode, value: target.esbFlowId ?? target.uniqueIndent },
296
+ actor: { userId: session.userId, tenantKey: session.tenantKey, profile: session.profile },
297
+ payload
298
+ });
299
+ return esbSuccess(
300
+ "esb.trigger.prepare",
301
+ {
302
+ target: {
303
+ mode: target.mode,
304
+ esbFlowId: target.esbFlowId ?? null,
305
+ uniqueIndent: target.uniqueIndent ?? null,
306
+ employeeId: target.employeeId
307
+ },
308
+ requestPreview: payload,
309
+ templateFields,
310
+ continuation: token,
311
+ expiresInSeconds: 600
312
+ },
313
+ { status: "PREPARED" },
314
+ warnings
315
+ );
316
+ },
317
+ "esb.trigger.apply": async (input, { host, continuation }) => {
318
+ if (input.confirm !== true) {
319
+ throw esbValidationError("confirm_required", "\u89E6\u53D1\u52A8\u4F5C\u6D41\u662F\u9AD8\u98CE\u9669\u5199\u64CD\u4F5C\uFF1A\u5FC5\u987B\u663E\u5F0F\u4F20 confirm: true \u8868\u793A\u7528\u6237\u5DF2\u786E\u8BA4\u6267\u884C");
320
+ }
321
+ const record = await continuation.verify(requiredString(input.continuation, "continuation"), "esb.trigger.apply");
322
+ const session = await host.getSession();
323
+ const actor = record.actor && typeof record.actor === "object" ? record.actor : {};
324
+ if (actor.userId !== session.userId || actor.tenantKey !== session.tenantKey) {
325
+ throw esbValidationError(
326
+ "continuation_actor_changed",
327
+ "continuation \u7B7E\u53D1\u65F6\u7684\u767B\u5F55\u8EAB\u4EFD\u4E0E\u5F53\u524D\u4F1A\u8BDD\u4E0D\u4E00\u81F4\uFF0C\u8BF7\u91CD\u65B0\u6267\u884C esb.trigger.prepare \u540E\u518D\u786E\u8BA4"
328
+ );
329
+ }
330
+ const payload = asObject(record.payload, "continuation.payload");
331
+ const mainTable = payload.customParams?.mainTable;
332
+ if (!mainTable || typeof mainTable !== "object" || Array.isArray(mainTable)) {
333
+ throw esbValidationError("continuation_payload_invalid", "continuation \u4E2D\u7684 customParams.mainTable \u7F3A\u5931\uFF0C\u8BF7\u91CD\u65B0\u6267\u884C esb.trigger.prepare");
334
+ }
335
+ const result = await host.trigger(payload);
336
+ return esbSuccess("esb.trigger.apply", summarizeTriggerResult(result), { status: "COMPLETE" });
337
+ }
338
+ };
339
+
340
+ // src/shortcuts/esb/operations/registry.ts
341
+ function mergeHandlers(maps) {
342
+ const merged = {};
343
+ for (const map of maps) {
344
+ for (const [name, handler] of Object.entries(map)) {
345
+ if (merged[name]) throw new Error(`duplicate esb operation handler: ${name}`);
346
+ merged[name] = handler;
347
+ }
348
+ }
349
+ return merged;
350
+ }
351
+ var esbHandlers = mergeHandlers([esbInputFormatHandlers, esbTriggerHandlers]);
352
+ function buildRegistry() {
353
+ const registry = /* @__PURE__ */ new Map();
354
+ for (const contract of esbManifest.operations) {
355
+ const handler = esbHandlers[contract.name];
356
+ if (!handler) throw new Error(`esb operation ${contract.name} has no handler`);
357
+ registry.set(contract.name, { ...contract, handler });
358
+ }
359
+ for (const name of Object.keys(esbHandlers)) {
360
+ if (!registry.has(name)) throw new Error(`esb handler ${name} is not declared in manifest`);
361
+ }
362
+ return registry;
363
+ }
364
+ var esbOperationRegistry = buildRegistry();
365
+ function esbOperationDefinitions() {
366
+ return [...esbOperationRegistry.values()];
367
+ }
368
+ function getEsbOperation(operation) {
369
+ const definition = esbOperationRegistry.get(operation);
370
+ if (!definition) {
371
+ throw esbValidationError("operation_unknown", `ESB \u52A8\u4F5C\u6D41\u4E0D\u652F\u6301\u64CD\u4F5C\uFF1A${operation}`);
372
+ }
373
+ return definition;
374
+ }
375
+ function hasEsbOperation(operation) {
376
+ return esbOperationRegistry.has(operation);
377
+ }
378
+
379
+ export {
380
+ esbManifest,
381
+ asObject,
382
+ assertNoForbiddenKeys,
383
+ assertKnownKeys,
384
+ esbOperationDefinitions,
385
+ getEsbOperation,
386
+ hasEsbOperation
387
+ };