weaver-work-cli 0.1.48 → 0.1.49

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 (96) hide show
  1. package/dist/chunks/{archive-oa-EDJDU3V4.js → archive-oa-57R2FYHV.js} +111 -12
  2. package/dist/chunks/{attachment-content-4KSNBPRO.js → attachment-content-MU2LPI5P.js} +3 -3
  3. package/dist/chunks/{chunk-WMSAWAWZ.js → chunk-3NV2ETZR.js} +6 -6
  4. package/dist/chunks/{chunk-PSPOFLSU.js → chunk-3X7VOSBA.js} +1 -1
  5. package/dist/chunks/chunk-5QYE52LG.js +223 -0
  6. package/dist/chunks/{chunk-FEP6ELMR.js → chunk-6GWU63YF.js} +1 -1
  7. package/dist/chunks/{chunk-3YV7PKRL.js → chunk-6QYNE6HE.js} +12 -212
  8. package/dist/chunks/{chunk-EFOUMXIX.js → chunk-BRRW7CWA.js} +25 -25
  9. package/dist/chunks/{chunk-5B5JXTY2.js → chunk-D2QRZUW4.js} +209 -25
  10. package/dist/chunks/{chunk-OCYRVZGN.js → chunk-EJVA5ZVB.js} +2 -2
  11. package/dist/chunks/{chunk-BCACE6VV.js → chunk-GEOMANP7.js} +3 -3
  12. package/dist/chunks/{chunk-O6CMPO65.js → chunk-IW7A2IQY.js} +16 -146
  13. package/dist/chunks/chunk-JEQHNNSS.js +158 -0
  14. package/dist/chunks/{chunk-NK74RE5F.js → chunk-K3BT54CU.js} +3 -3
  15. package/dist/chunks/{chunk-R2HHLJNN.js → chunk-KV5SOWMS.js} +4 -4
  16. package/dist/chunks/{chunk-SVFG6EMV.js → chunk-ZKEUGS2U.js} +5 -5
  17. package/dist/chunks/{conflict-APGSD5E7.js → conflict-6347A7YK.js} +2 -2
  18. package/dist/chunks/{create-flow-5TXFOC7X.js → create-flow-7WG7LVX5.js} +6 -6
  19. package/dist/chunks/data-QO7QWOIV.js +2525 -0
  20. package/dist/chunks/{employee-NOHNXC46.js → employee-DR5Y64TI.js} +2 -1
  21. package/dist/chunks/{env-B6GKA2J3.js → env-LHRKSLG6.js} +2 -2
  22. package/dist/chunks/{factory-MFCKLUT6.js → factory-2H7Z4RWJ.js} +1 -1
  23. package/dist/chunks/{group-chat-YE7WIBFO.js → group-chat-EW6PNDDT.js} +3 -3
  24. package/dist/chunks/{hrm-UNKCCCGP.js → hrm-YGIR3HGF.js} +4 -2
  25. package/dist/chunks/{meeting-RYZV2JTQ.js → meeting-N2FQBHXI.js} +10 -10
  26. package/dist/chunks/org-NFE7X7FK.js +12 -0
  27. package/dist/chunks/{reception-VL6TKVAW.js → reception-MYOKJULO.js} +429 -94
  28. package/dist/chunks/{recruit-stage-ERZD3ZNB.js → recruit-stage-FKWS5UQF.js} +66 -13
  29. package/dist/chunks/{registry-VWXWPVAG.js → registry-3UGIWH53.js} +4 -2
  30. package/dist/chunks/{registry-22O6UG4I.js → registry-CKUVBS53.js} +10 -10
  31. package/dist/chunks/{room-recommend-IMZPJMYB.js → room-recommend-MBCYENQ2.js} +4 -4
  32. package/dist/chunks/{schedule-SPPAHER2.js → schedule-5IFMCXME.js} +4 -4
  33. package/dist/index.js +12 -7
  34. package/dist/shortcuts/archive-oa/operations/contract-modules.js +57 -0
  35. package/dist/shortcuts/archive-oa/operations/contract.js +23 -8
  36. package/dist/shortcuts/archive-oa/operations/registry.js +4 -1
  37. package/dist/shortcuts/archive-oa/operations/shared.js +41 -5
  38. package/dist/shortcuts/data/errors.js +64 -0
  39. package/dist/shortcuts/data/host.js +140 -0
  40. package/dist/shortcuts/data/index.js +429 -0
  41. package/dist/shortcuts/data/manifest.js +133 -0
  42. package/dist/shortcuts/data/operations/attend.js +62 -0
  43. package/dist/shortcuts/data/operations/conf.js +384 -0
  44. package/dist/shortcuts/data/operations/ds.js +686 -0
  45. package/dist/shortcuts/data/operations/field.js +68 -0
  46. package/dist/shortcuts/data/operations/index.js +65 -0
  47. package/dist/shortcuts/data/operations/module.js +383 -0
  48. package/dist/shortcuts/data/operations/noun.js +102 -0
  49. package/dist/shortcuts/data/operations/query.js +85 -0
  50. package/dist/shortcuts/data/operations/scene.js +235 -0
  51. package/dist/shortcuts/data/operations/shared.js +279 -0
  52. package/dist/shortcuts/ehr/recruit-stage/operations/interview-arrange.js +12 -5
  53. package/dist/shortcuts/ehr/recruit-stage/operations/resume-import.js +21 -13
  54. package/dist/shortcuts/ehr/recruit-stage/shared.js +57 -0
  55. package/dist/shortcuts/index.js +5 -0
  56. package/dist/shortcuts/meeting/operations/eb/member-expand.js +200 -0
  57. package/dist/shortcuts/meeting/operations/registry.js +2 -0
  58. package/dist/shortcuts/reception/constants.js +11 -0
  59. package/dist/shortcuts/reception/index.js +3 -1
  60. package/dist/shortcuts/reception/manifest.js +3 -2
  61. package/dist/shortcuts/reception/operations/ask.js +20 -2
  62. package/dist/shortcuts/reception/operations/compose.js +11 -0
  63. package/dist/shortcuts/reception/operations/doc.js +59 -0
  64. package/dist/shortcuts/reception/operations/docrender.js +25 -1
  65. package/dist/shortcuts/reception/operations/leads.js +1 -1
  66. package/dist/shortcuts/reception/operations/panels.js +84 -21
  67. package/dist/shortcuts/reception/operations/render.js +40 -0
  68. package/dist/shortcuts/reception/operations/restaurant.js +17 -4
  69. package/dist/shortcuts/recruit-stage/operations/interview-arrange.js +12 -5
  70. package/dist/shortcuts/recruit-stage/operations/resume-import.js +21 -13
  71. package/dist/shortcuts/recruit-stage/shared.js +57 -0
  72. package/docs/SKILL.md +1 -0
  73. package/docs/_catalog.md +3 -0
  74. package/docs/data.md +149 -0
  75. package/docs/reception.md +59 -5
  76. package/package.json +1 -1
  77. package/scripts/check-skill-sync.mjs +188 -0
  78. package/scripts/package-skill.mjs +17 -3
  79. package/skill-template/business-info.json +23 -0
  80. package/skill-template/domains/data.md +15 -0
  81. package/skills/weaver-e10-archive-oa/SKILL.md +7 -6
  82. package/skills/weaver-e10-archive-oa/references/contract-search.md +83 -14
  83. package/skills/weaver-e10-archive-oa/references/disabled-capabilities.md +1 -1
  84. package/skills/weaver-e10-archive-oa/references/qys-contract-search.md +35 -11
  85. package/skills/weaver-e10-data/SKILL.md +118 -0
  86. package/skills/weaver-e10-data/references/config-center.md +90 -0
  87. package/skills/weaver-e10-data/references/datasource.md +136 -0
  88. package/skills/weaver-e10-data/references/scene-and-misc.md +82 -0
  89. package/skills/weaver-e10-meeting/SKILL.md +39 -7
  90. package/skills/weaver-e10-reception-flow/SKILL.md +30 -16
  91. package/skills/weaver-e10-reception-flow/references/guide.md +4 -3
  92. package/skills/weaver-e10-reception-flow/scripts/render.py +5 -3
  93. package/skills/weaver-e10-recruit-stage/agents/openai.yaml +26 -6
  94. package/skills/weaver-e10-recruit-stage/references/recruit-utterance-glossary.md +53 -11
  95. package/dist/chunks/{ebuilder-form-I5ZIX4WO.js → ebuilder-form-CBYI6CQ6.js} +4 -4
  96. package/dist/chunks/{workflow-WVEFJ6KC.js → workflow-2TRU2ZSP.js} +3 -3
@@ -0,0 +1,158 @@
1
+ import { createRequire as __esbuildCreateRequire } from 'node:module';
2
+ const require = __esbuildCreateRequire(import.meta.url);
3
+ import {
4
+ hrmValidationError
5
+ } from "./chunk-56EZERK4.js";
6
+
7
+ // src/shortcuts/hrm/operations/types.ts
8
+ var READ = "read";
9
+ function hrmSuccess(action, data, meta) {
10
+ const payload = { ok: true, action, data };
11
+ if (meta && Object.keys(meta).length > 0) payload.meta = meta;
12
+ return payload;
13
+ }
14
+ function schemaOf(properties, options = {}) {
15
+ return {
16
+ type: "object",
17
+ additionalProperties: false,
18
+ properties,
19
+ ...options.required?.length ? { required: options.required } : {},
20
+ ...options.description ? { description: options.description } : {}
21
+ };
22
+ }
23
+ var SCHEMA_ID = { oneOf: [{ type: "integer" }, { type: "string", pattern: "^\\d+$" }] };
24
+ var SCHEMA_ID_LIST = { type: "array", items: SCHEMA_ID };
25
+ var SCHEMA_PAGE = {
26
+ current: SCHEMA_ID,
27
+ pageSize: SCHEMA_ID
28
+ };
29
+
30
+ // src/shortcuts/hrm/operations/shared.ts
31
+ var FORBIDDEN_KEYS = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);
32
+ function asObject(value) {
33
+ if (!value || typeof value !== "object" || Array.isArray(value)) {
34
+ throw hrmValidationError("input_not_object", "\u8F93\u5165\u5FC5\u987B\u662F JSON \u5BF9\u8C61");
35
+ }
36
+ return value;
37
+ }
38
+ function assertNoForbiddenKeys(input) {
39
+ for (const key of Object.keys(input)) {
40
+ if (FORBIDDEN_KEYS.has(key)) {
41
+ throw hrmValidationError("forbidden_key", `\u8F93\u5165\u5305\u542B\u975E\u6CD5\u5B57\u6BB5\uFF1A${key}`);
42
+ }
43
+ }
44
+ }
45
+ function toNumber(value, field) {
46
+ if (value === void 0 || value === null || value === "") return void 0;
47
+ const numeric = Number(value);
48
+ if (!Number.isFinite(numeric)) {
49
+ throw hrmValidationError("number_invalid", `${field} \u5FC5\u987B\u662F\u6570\u5B57`);
50
+ }
51
+ return numeric;
52
+ }
53
+ function toPositiveInt(value, field) {
54
+ if (value === void 0 || value === null || value === "") return void 0;
55
+ const numeric = Number(value);
56
+ if (!Number.isFinite(numeric)) {
57
+ throw hrmValidationError("number_invalid", `${field} \u5FC5\u987B\u662F\u6570\u5B57`);
58
+ }
59
+ const truncated = Math.trunc(numeric);
60
+ if (truncated !== numeric || truncated <= 0) {
61
+ throw hrmValidationError("number_invalid", `${field} \u5FC5\u987B\u662F\u6B63\u6574\u6570`);
62
+ }
63
+ return truncated;
64
+ }
65
+ function toStringIdList(value, field) {
66
+ if (value === void 0 || value === null) return void 0;
67
+ const list = Array.isArray(value) ? value : [value];
68
+ if (list.length === 0) return void 0;
69
+ return list.map((item, index) => {
70
+ if (item === void 0 || item === null || item === "") {
71
+ throw hrmValidationError("id_list_invalid", `${field}[${index}] \u4E0D\u80FD\u4E3A\u7A7A`);
72
+ }
73
+ const text = String(item);
74
+ if (!/^\d+$/.test(text)) {
75
+ throw hrmValidationError("id_list_invalid", `${field}[${index}] \u5FC5\u987B\u662F\u6570\u5B57 ID`);
76
+ }
77
+ return text;
78
+ });
79
+ }
80
+ function pickDefined(value, keys) {
81
+ const result = {};
82
+ for (const key of keys) {
83
+ if (value[key] !== void 0) result[key] = value[key];
84
+ }
85
+ return result;
86
+ }
87
+ function browserBaseBody() {
88
+ return {
89
+ browserMultiple: true,
90
+ authWecahtBook: false,
91
+ wxDepNeedConvertCount: 0,
92
+ wxEmpNeedConvertCount: 0,
93
+ wxTotalNeedConvertCount: 0
94
+ };
95
+ }
96
+ function personLink(baseUrl, id) {
97
+ return `${baseUrl}/sp/hrm/profileInfo/${String(id)}`;
98
+ }
99
+ function orgLink(baseUrl, id) {
100
+ return `${baseUrl}/sp/hrm/orgCard/${String(id)}`;
101
+ }
102
+ function positionLink(baseUrl, id) {
103
+ return `${baseUrl}/sp/hrm/positionCard/${String(id)}`;
104
+ }
105
+ function inferEmployeeField(target) {
106
+ if (/@/.test(target)) return { key: "email", value: target };
107
+ if (/^\d{11}$/.test(target)) return { key: "mobile", value: target };
108
+ if (/^\d+$/.test(target) || /^[A-Za-z][A-Za-z0-9]*\d[A-Za-z0-9]*$/.test(target)) {
109
+ return { key: "job_num", value: target };
110
+ }
111
+ return { key: "username", value: target };
112
+ }
113
+ async function resolveDepartmentIdByName(host, name) {
114
+ const resp = await host.request({
115
+ method: "POST",
116
+ path: "/api/hrm/common/browser/data/department",
117
+ body: {
118
+ ...browserBaseBody(),
119
+ virtualType: "ALL",
120
+ cmd: "list",
121
+ current: 1,
122
+ pageSize: 200,
123
+ formDatas: { name: [{ nameCondition: { id: "eq", content: "\u7B49\u4E8E", disabled: false }, name }] },
124
+ quickSearchDatas: {},
125
+ type: "and",
126
+ stopDepartment: false
127
+ }
128
+ });
129
+ const rows = resp?.data?.data ?? [];
130
+ if (rows.length === 0) {
131
+ throw hrmValidationError("dept_not_found", `\u672A\u627E\u5230\u90E8\u95E8\uFF1A${name}\uFF08\u8BF7\u786E\u8BA4\u90E8\u95E8\u540D\u79F0\uFF09`);
132
+ }
133
+ if (rows.length > 1) {
134
+ throw hrmValidationError("dept_ambiguous", `\u90E8\u95E8\u91CD\u540D\uFF08${rows.length} \u4E2A\u5019\u9009\uFF09\uFF1A${rows.map((x) => x.name).join("\u3001")}\uFF0C\u8BF7\u6539\u7528\u90E8\u95E8 id`);
135
+ }
136
+ return rows[0];
137
+ }
138
+
139
+ export {
140
+ READ,
141
+ hrmSuccess,
142
+ schemaOf,
143
+ SCHEMA_ID,
144
+ SCHEMA_ID_LIST,
145
+ SCHEMA_PAGE,
146
+ asObject,
147
+ assertNoForbiddenKeys,
148
+ toNumber,
149
+ toPositiveInt,
150
+ toStringIdList,
151
+ pickDefined,
152
+ browserBaseBody,
153
+ personLink,
154
+ orgLink,
155
+ positionLink,
156
+ inferEmployeeField,
157
+ resolveDepartmentIdByName
158
+ };
@@ -1562,7 +1562,7 @@ async function buildPersonnelText(env, data) {
1562
1562
  if (ids.length === 0) return {};
1563
1563
  const names = /* @__PURE__ */ new Map();
1564
1564
  try {
1565
- const { hrmEmployeeOperations } = await import("./employee-NOHNXC46.js");
1565
+ const { hrmEmployeeOperations } = await import("./employee-DR5Y64TI.js");
1566
1566
  const batch = hrmEmployeeOperations.find((operation) => operation.name === "hrm.employee.batch");
1567
1567
  if (batch) {
1568
1568
  const result = await batch.handler({ ids: [...new Set(ids)] }, env);
@@ -2220,7 +2220,7 @@ function buildWriteInputSchema(endpoint, includeConfirm) {
2220
2220
  }
2221
2221
  async function lookupEmployeeDepartmentId(env, userId) {
2222
2222
  try {
2223
- const { hrmEmployeeOperations } = await import("./employee-NOHNXC46.js");
2223
+ const { hrmEmployeeOperations } = await import("./employee-DR5Y64TI.js");
2224
2224
  const batch = hrmEmployeeOperations.find((operation) => operation.name === "hrm.employee.batch");
2225
2225
  if (!batch) return null;
2226
2226
  const result = await batch.handler({ ids: [userId] }, env);
@@ -2329,7 +2329,7 @@ function buildWriteOperations(endpoint, preflight, afterWrite) {
2329
2329
  );
2330
2330
  }
2331
2331
  if (endpoint.interfacePk === "create_meeting") {
2332
- const { fetchEbAppSettings, assertEbCreatePathAllowed } = await import("./conflict-APGSD5E7.js");
2332
+ const { fetchEbAppSettings, assertEbCreatePathAllowed } = await import("./conflict-6347A7YK.js");
2333
2333
  assertEbCreatePathAllowed(await fetchEbAppSettings(env, applyName));
2334
2334
  }
2335
2335
  const pkQuery = writePkQuery(endpoint, payload);
@@ -4,7 +4,7 @@ import {
4
4
  cacheScopeSuffix,
5
5
  readCache,
6
6
  writeCache
7
- } from "./chunk-PSPOFLSU.js";
7
+ } from "./chunk-3X7VOSBA.js";
8
8
  import {
9
9
  EB_BASE,
10
10
  SCHEMA_DATETIME_MINUTE,
@@ -13,7 +13,7 @@ import {
13
13
  meetingSuccess,
14
14
  queryBody,
15
15
  schemaOf
16
- } from "./chunk-NK74RE5F.js";
16
+ } from "./chunk-K3BT54CU.js";
17
17
 
18
18
  // src/shortcuts/meeting/operations/eb/usage-cache.ts
19
19
  var USAGE_TTL_MS = 5 * 60 * 1e3;
@@ -88,7 +88,7 @@ async function clearCache(env, key) {
88
88
  try {
89
89
  const { rm } = await import("node:fs/promises");
90
90
  const { join } = await import("node:path");
91
- const { meetingStateDir } = await import("./env-B6GKA2J3.js");
91
+ const { meetingStateDir } = await import("./env-LHRKSLG6.js");
92
92
  await rm(join(meetingStateDir(env.ctx), "cache", `${key}.json`), { force: true });
93
93
  } catch {
94
94
  }
@@ -221,7 +221,7 @@ async function loadFrequentRooms(env, options = {}) {
221
221
  const counts = /* @__PURE__ */ new Map();
222
222
  let requests = 0;
223
223
  try {
224
- const { getMeetingOperation } = await import("./registry-22O6UG4I.js");
224
+ const { getMeetingOperation } = await import("./registry-CKUVBS53.js");
225
225
  const listOp = getMeetingOperation("meeting.eb.meeting.list");
226
226
  let seen = 0;
227
227
  let total = 0;
@@ -12,7 +12,7 @@ import {
12
12
  meetingValidationError,
13
13
  queryBody,
14
14
  toIdCsv
15
- } from "./chunk-NK74RE5F.js";
15
+ } from "./chunk-K3BT54CU.js";
16
16
 
17
17
  // src/shortcuts/meeting/operations/eb/conflict.ts
18
18
  var ACTIVE_MT_STATUS = "1,2,8,9";
@@ -296,7 +296,7 @@ var ebMeetingWritePreflight = async ({ endpoint, payload, args, env, extras }) =
296
296
  const items = rawMembers.split(/[,;,;]+/u).map((item) => item.trim()).filter((item) => item !== "");
297
297
  const nameLike = items.filter((item) => !/^\d+$/u.test(item));
298
298
  if (nameLike.length > 0) {
299
- const { resolveMemberIdsByName } = await import("./schedule-SPPAHER2.js");
299
+ const { resolveMemberIdsByName } = await import("./schedule-5IFMCXME.js");
300
300
  const idsByName = await resolveMemberIdsByName(env, nameLike);
301
301
  const resolved = items.map((item) => idsByName.get(item) ?? item);
302
302
  payload.mainTable.hrm_members = [...new Set(resolved)].join(",");
@@ -429,7 +429,7 @@ var ebConflictRoom = {
429
429
  let addressId = String(args.address ?? "").trim();
430
430
  let resolvedRoom = null;
431
431
  if (!addressId && String(args.room_name ?? "").trim()) {
432
- const { resolveAddressRoom } = await import("./create-flow-5TXFOC7X.js");
432
+ const { resolveAddressRoom } = await import("./create-flow-7WG7LVX5.js");
433
433
  const resolved = await resolveAddressRoom(env, String(args.room_name));
434
434
  if (!resolved?.id) {
435
435
  throw meetingValidationError(
@@ -564,7 +564,7 @@ async function resolveMemberNames(env, ids) {
564
564
  const unique = [...new Set(ids.filter((id) => id !== ""))];
565
565
  if (unique.length === 0) return map;
566
566
  try {
567
- const { hrmEmployeeOperations } = await import("./employee-NOHNXC46.js");
567
+ const { hrmEmployeeOperations } = await import("./employee-DR5Y64TI.js");
568
568
  const batch = hrmEmployeeOperations.find((operation) => operation.name === "hrm.employee.batch");
569
569
  if (!batch) return map;
570
570
  const result = await batch.handler({ ids: unique }, env);
@@ -639,7 +639,7 @@ async function findCommonFreeSlots(env, input) {
639
639
  const scheduleItems = [];
640
640
  if (includeSchedule) {
641
641
  try {
642
- const { runScheduleConflictFlow, parseScheduleConflictMessage, resolveMemberIdsByName } = await import("./schedule-SPPAHER2.js");
642
+ const { runScheduleConflictFlow, parseScheduleConflictMessage, resolveMemberIdsByName } = await import("./schedule-5IFMCXME.js");
643
643
  const dayBegin = new Date(rangeStart.getFullYear(), rangeStart.getMonth(), rangeStart.getDate(), 0, 0, 0, 0);
644
644
  const dayEnd = new Date(rangeStart.getFullYear(), rangeStart.getMonth(), rangeStart.getDate(), 23, 59, 0, 0);
645
645
  const flow = await runScheduleConflictFlow(env, {
@@ -7,8 +7,8 @@ import {
7
7
  findCommonFreeSlots,
8
8
  meetingEbConflictOperations,
9
9
  runEbConflictCheck
10
- } from "./chunk-SVFG6EMV.js";
11
- import "./chunk-NK74RE5F.js";
10
+ } from "./chunk-ZKEUGS2U.js";
11
+ import "./chunk-K3BT54CU.js";
12
12
  import "./chunk-7BDPM5ST.js";
13
13
  import "./chunk-UG5G54VL.js";
14
14
  import "./chunk-BUSC6UAE.js";
@@ -22,12 +22,12 @@ import {
22
22
  resolveWorkflowId,
23
23
  shapeBrowserValues,
24
24
  shouldAutoPickFlow
25
- } from "./chunk-EFOUMXIX.js";
26
- import "./chunk-SVFG6EMV.js";
27
- import "./chunk-R2HHLJNN.js";
28
- import "./chunk-PSPOFLSU.js";
29
- import "./chunk-FEP6ELMR.js";
30
- import "./chunk-NK74RE5F.js";
25
+ } from "./chunk-BRRW7CWA.js";
26
+ import "./chunk-ZKEUGS2U.js";
27
+ import "./chunk-KV5SOWMS.js";
28
+ import "./chunk-3X7VOSBA.js";
29
+ import "./chunk-6GWU63YF.js";
30
+ import "./chunk-K3BT54CU.js";
31
31
  import "./chunk-7BDPM5ST.js";
32
32
  import "./chunk-UG5G54VL.js";
33
33
  import "./chunk-BUSC6UAE.js";