weaver-work-cli 0.1.47 → 0.1.48

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 (181) hide show
  1. package/dist/chunks/{archive-oa-BBDP7AKJ.js → archive-oa-EDJDU3V4.js} +454 -5
  2. package/dist/chunks/{attachment-content-MCXQBD6N.js → attachment-content-4KSNBPRO.js} +3 -3
  3. package/dist/chunks/{chunk-J2VEB5K3.js → chunk-2BQESR2U.js} +2 -2
  4. package/dist/chunks/{chunk-727FH2NI.js → chunk-2IGZUMNG.js} +15 -2
  5. package/dist/chunks/{chunk-76H3IKH6.js → chunk-5B5JXTY2.js} +35 -35
  6. package/dist/chunks/{chunk-Q4OYAQYH.js → chunk-72MI3MBX.js} +4 -0
  7. package/dist/chunks/{chunk-4RWS2YYL.js → chunk-BCACE6VV.js} +2 -2
  8. package/dist/chunks/{chunk-AD46OMQK.js → chunk-EFOUMXIX.js} +119 -44
  9. package/dist/chunks/{chunk-IRMIEDXN.js → chunk-FEP6ELMR.js} +1 -1
  10. package/dist/chunks/{chunk-LIEQJIGM.js → chunk-GR76ZDDX.js} +0 -3
  11. package/dist/chunks/{chunk-JB34OE7R.js → chunk-NBEWUR7L.js} +1 -1
  12. package/dist/chunks/{chunk-6V5ZPKHV.js → chunk-NK74RE5F.js} +2 -2
  13. package/dist/chunks/{chunk-GSZTA43P.js → chunk-OCYRVZGN.js} +2 -2
  14. package/dist/chunks/{chunk-OXHHJWNC.js → chunk-PSPOFLSU.js} +1 -1
  15. package/dist/chunks/{chunk-6AXKWFKG.js → chunk-R2HHLJNN.js} +4 -4
  16. package/dist/chunks/{chunk-PSOMGA3U.js → chunk-SVFG6EMV.js} +35 -6
  17. package/dist/chunks/{chunk-IP4CWQCF.js → chunk-WMSAWAWZ.js} +8 -8
  18. package/dist/chunks/{conflict-H7EHQXYY.js → conflict-APGSD5E7.js} +2 -2
  19. package/dist/chunks/{contract-3QLAGYQL.js → contract-N6P2HIIE.js} +425 -187
  20. package/dist/chunks/{create-flow-VRVJEOBX.js → create-flow-5TXFOC7X.js} +6 -6
  21. package/dist/chunks/{ehr-SH2LM3NK.js → ehr-XI4BIVR2.js} +16 -5
  22. package/dist/chunks/{env-66FPSJDV.js → env-B6GKA2J3.js} +2 -2
  23. package/dist/chunks/{factory-UH2TZBVA.js → factory-MFCKLUT6.js} +1 -1
  24. package/dist/chunks/{group-chat-CAKMMV7K.js → group-chat-YE7WIBFO.js} +3 -3
  25. package/dist/chunks/{im-NJB7ZYMH.js → im-3RCNL5GT.js} +107 -1
  26. package/dist/chunks/{invoice-UEAHSYAE.js → invoice-FXWH5GPO.js} +2 -71
  27. package/dist/chunks/{lazy-dispatch-25XGTXLM.js → lazy-dispatch-XSAHDK6Z.js} +3 -3
  28. package/dist/chunks/{meeting-VTBFW4HI.js → meeting-RYZV2JTQ.js} +10 -10
  29. package/dist/chunks/{reception-5WITA44R.js → reception-VL6TKVAW.js} +480 -26
  30. package/dist/chunks/{recruit-stage-CAKZTUA7.js → recruit-stage-ERZD3ZNB.js} +52 -16
  31. package/dist/chunks/{registry-JVQBLFQ5.js → registry-22O6UG4I.js} +10 -10
  32. package/dist/chunks/{registry-AQVGHUM6.js → registry-7VZ6YJUF.js} +2 -2
  33. package/dist/chunks/{registry-PVUZQDDQ.js → registry-BUTEDK3C.js} +1 -1
  34. package/dist/chunks/{room-recommend-5U55FMXZ.js → room-recommend-IMZPJMYB.js} +4 -4
  35. package/dist/chunks/{schedule-IDETODCA.js → schedule-SPPAHER2.js} +4 -4
  36. package/dist/chunks/{workflow-BSYT5TGL.js → workflow-WVEFJ6KC.js} +2 -2
  37. package/dist/core/refs.js +19 -2
  38. package/dist/index.js +14 -14
  39. package/dist/shortcuts/archive-oa/constants.js +42 -0
  40. package/dist/shortcuts/archive-oa/host.js +2 -2
  41. package/dist/shortcuts/archive-oa/index.js +38 -0
  42. package/dist/shortcuts/archive-oa/operations/borrow-car.js +117 -3
  43. package/dist/shortcuts/archive-oa/operations/my-borrow-contract.js +271 -0
  44. package/dist/shortcuts/archive-oa/operations/registry.js +5 -3
  45. package/dist/shortcuts/contract/index.js +9 -1
  46. package/dist/shortcuts/contract/manifest.js +14 -2
  47. package/dist/shortcuts/contract/operations/card.js +231 -0
  48. package/dist/shortcuts/contract/operations/registry.js +2 -0
  49. package/dist/shortcuts/contract/operations/review.js +16 -5
  50. package/dist/shortcuts/contract/operations/summary.js +25 -17
  51. package/dist/shortcuts/ehr/operations/recruit-write.js +22 -5
  52. package/dist/shortcuts/ehr/recruit-stage/operations/interview-arrange.js +17 -8
  53. package/dist/shortcuts/ehr/recruit-stage/shared.js +33 -8
  54. package/dist/shortcuts/im/index.js +128 -0
  55. package/dist/shortcuts/im/operations/session.js +6 -0
  56. package/dist/shortcuts/invoice/host.js +0 -3
  57. package/dist/shortcuts/invoice/manifest.js +0 -1
  58. package/dist/shortcuts/invoice/operations/reim-subsidy.js +1 -71
  59. package/dist/shortcuts/meeting/operations/eb/conflict.js +26 -3
  60. package/dist/shortcuts/meeting/operations/eb/continuation-alias.js +63 -0
  61. package/dist/shortcuts/meeting/operations/eb/create-flow.js +71 -12
  62. package/dist/shortcuts/meeting/operations/eb/factory.js +5 -3
  63. package/dist/shortcuts/reception/host.js +33 -1
  64. package/dist/shortcuts/reception/index.js +19 -0
  65. package/dist/shortcuts/reception/manifest.js +53 -1
  66. package/dist/shortcuts/reception/operations/ask.js +18 -0
  67. package/dist/shortcuts/reception/operations/compose.js +113 -3
  68. package/dist/shortcuts/reception/operations/leads.js +245 -0
  69. package/dist/shortcuts/reception/operations/markdown.js +22 -0
  70. package/dist/shortcuts/reception/operations/registry.js +2 -0
  71. package/dist/shortcuts/reception/operations/render.js +36 -3
  72. package/dist/shortcuts/reception/operations/restaurant-rooms.js +118 -0
  73. package/dist/shortcuts/reception/operations/restaurant.js +251 -0
  74. package/dist/shortcuts/reception/operations/restaurantrooms.js +42 -0
  75. package/dist/shortcuts/reception/operations/schedule.js +7 -1
  76. package/dist/shortcuts/reception/upload.js +22 -6
  77. package/dist/shortcuts/recruit-stage/operations/interview-arrange.js +17 -8
  78. package/dist/shortcuts/recruit-stage/shared.js +42 -14
  79. package/docs/archive-oa.md +4 -2
  80. package/package.json +1 -1
  81. package/skill-template/domains/archive-oa.md +2 -1
  82. package/skill-template/master-skill-template.md +1 -0
  83. package/skill-template/skill-template.md +1 -0
  84. package/skills/weaver-e10-archive-oa/SKILL.md +33 -6
  85. package/skills/weaver-e10-archive-oa/references/borrow-car.md +32 -7
  86. package/skills/weaver-e10-archive-oa/references/contract-search.md +32 -0
  87. package/skills/weaver-e10-archive-oa/references/disabled-capabilities.md +1 -1
  88. package/skills/weaver-e10-archive-oa/references/my-borrow-contract.md +97 -0
  89. package/skills/weaver-e10-archive-oa/references/my-borrow.md +6 -1
  90. package/skills/weaver-e10-archive-oa/references/qys-contract-search.md +22 -0
  91. package/skills/weaver-e10-calendar/SKILL.md +1 -1
  92. package/skills/weaver-e10-calendar/references/calendar-query.md +1 -1
  93. package/skills/weaver-e10-calendar/references/calendar-write.md +9 -9
  94. package/skills/weaver-e10-cowork/SKILL.md +9 -6
  95. package/skills/weaver-e10-jinchengda/SKILL.md +10 -7
  96. package/skills/weaver-e10-jinchengda/references/contract-action-card-template.html +17 -0
  97. package/skills/weaver-e10-jinchengda/references/contract-action-card.md +263 -35
  98. package/skills/weaver-e10-jinchengda/references/contract-action-engine.md +8 -5
  99. package/skills/weaver-e10-jinchengda/references/contract-ai-assistant.md +1 -1
  100. package/skills/weaver-e10-jinchengda/references/contract-ai-review.md +175 -22
  101. package/skills/weaver-e10-jinchengda/references/contract-command-index.md +2 -2
  102. package/skills/weaver-e10-jinchengda/references/contract-credit-page.md +1 -1
  103. package/skills/weaver-e10-jinchengda/references/contract-doc-compare.md +1 -1
  104. package/skills/weaver-e10-jinchengda/references/contract-doc-triage.md +124 -19
  105. package/skills/weaver-e10-jinchengda/references/contract-element-extract.md +2 -2
  106. package/skills/weaver-e10-jinchengda/references/contract-execution-rules.md +4 -4
  107. package/skills/weaver-e10-jinchengda/references/contract-field-extract-other-flows.md +6 -0
  108. package/skills/weaver-e10-jinchengda/references/contract-flow-launch.md +1 -1
  109. package/skills/weaver-e10-jinchengda/references/contract-performance-query.md +1 -1
  110. package/skills/weaver-e10-jinchengda/references/contract-quote-to-contract.md +1 -1
  111. package/skills/weaver-e10-jinchengda/references/contract-risk-report-template.html +178 -0
  112. package/skills/weaver-e10-jinchengda/references/contract-template-recommend.md +1 -1
  113. package/skills/weaver-e10-jinchengda/references/orchestration.md +7 -7
  114. package/skills/weaver-e10-jinchengda/scripts/plan_actions.py +279 -0
  115. package/skills/weaver-e10-jinchengda/scripts/render_action_card.py +450 -0
  116. package/skills/weaver-e10-jinchengda/scripts/render_risk_report.py +358 -0
  117. package/skills/weaver-e10-jinchengda/scripts/validate_action_card.py +505 -0
  118. package/skills/weaver-e10-jucailin/SKILL.md +7 -4
  119. package/skills/weaver-e10-jucailin/references/recruit-create.md +3 -2
  120. package/skills/weaver-e10-jucailin/references/recruit-read.md +2 -1
  121. package/skills/weaver-e10-jucailin/references/recruit-stage-ops.md +3 -3
  122. package/skills/weaver-e10-jucailin/references/safety-boundaries.md +30 -2
  123. package/skills/weaver-e10-mail/SKILL.md +17 -4
  124. package/skills/weaver-e10-meeting/SKILL.md +94 -409
  125. package/skills/weaver-e10-meeting/references/create-flow.md +188 -0
  126. package/skills/weaver-e10-meeting/references/create-guardrails.md +234 -0
  127. package/skills/weaver-e10-meeting/references/pitfalls.md +40 -0
  128. package/skills/weaver-e10-reception-flow/SKILL.md +62 -18
  129. package/skills/weaver-e10-reception-flow/data/fields-snapshot.json +628 -26
  130. package/skills/weaver-e10-reception-flow/references/fields-snapshot.md +96 -26
  131. package/skills/weaver-e10-reception-flow/scripts/render.py +81 -2
  132. package/skills/weaver-e10-recruit-stage/SKILL.md +45 -12
  133. package/skills/weaver-e10-recruit-stage/agents/openai.yaml +58 -8
  134. package/skills/weaver-e10-recruit-stage/references/position-templates.md +5 -0
  135. package/skills/weaver-e10-recruit-stage/references/recruit-arrange-interview.md +1 -1
  136. package/skills/weaver-e10-recruit-stage/references/recruit-edit-interview-feedback.md +1 -1
  137. package/skills/weaver-e10-recruit-stage/references/recruit-jd-create.md +40 -11
  138. package/skills/weaver-e10-recruit-stage/references/recruit-list-candidate.md +1 -1
  139. package/skills/weaver-e10-recruit-stage/references/recruit-list-interview.md +1 -1
  140. package/skills/weaver-e10-recruit-stage/references/recruit-match-candidates.md +1 -1
  141. package/skills/weaver-e10-recruit-stage/references/recruit-resume-import.md +16 -0
  142. package/skills/weaver-e10-recruit-stage/references/recruit-resume-parse.md +1 -1
  143. package/skills/weaver-e10-recruit-stage/references/recruit-search-candidate.md +1 -1
  144. package/skills/weaver-e10-recruit-stage/references/recruit-urge-feedback.md +1 -1
  145. package/skills/weaver-e10-recruit-stage/references/recruit-utterance-glossary.md +127 -0
  146. package/skills/weaver-e10-shijingran/SKILL.md +6 -2
  147. package/skills/weaver-e10-shijingran/references/source-manifest.json +5 -4
  148. package/skills/weaver-e10-workflow/SKILL.md +1 -1
  149. package/skills/weaver-e10-yepiaotong/SKILL.md +8 -4
  150. package/skills/weaver-e10-yepiaotong/references/invoice-issuing-workflow.md +1 -1
  151. package/skills/weaver-e10-yepiaotong/references/invoice-reim.md +1 -1
  152. package/skills/weaver-e10-yepiaotong/references/reim-api-reference.md +2 -2
  153. package/skills/weaver-e10-yepiaotong/references/reim-form-fill-rules.md +1 -1
  154. package/skills/weaver-e10-yepiaotong/references/reim-phone-subsidy-rules.md +1 -1
  155. package/skills/weaver-e10-yepiaotong/references/reim-workflow.md +1 -0
  156. package/skills/weaver-e10-yimiaoban/SKILL.md +2 -1
  157. package/skills/weaver-e10-yimiaoban/references/msg-write.md +32 -0
  158. package/skills/weaver-e10-yimiaoban/references/session-sysmsg.md +3 -0
  159. package/skills/weaver-e10-yimiaoban/references/source-manifest.json +11 -11
  160. package/dist/chunks/{ebuilder-form-GWDTKEI2.js → ebuilder-form-I5ZIX4WO.js} +3 -3
  161. /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-README.md +0 -0
  162. /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-SKILL.md +0 -0
  163. /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-openai.yaml +0 -0
  164. /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-position-templates.md +0 -0
  165. /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-arrange-interview.md +0 -0
  166. /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-capability-check.md +0 -0
  167. /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-check-install.md +0 -0
  168. /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-detail-process.md +0 -0
  169. /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-edit-interview-feedback.md +0 -0
  170. /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-jd-create.md +0 -0
  171. /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-jd-template.md +0 -0
  172. /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-list-candidate.md +0 -0
  173. /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-list-interview.md +0 -0
  174. /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-match-candidates.md +0 -0
  175. /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-output-links.md +0 -0
  176. /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-resolve-creator.md +0 -0
  177. /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-resolve-metadata.md +0 -0
  178. /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-resume-import.md +0 -0
  179. /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-resume-parse.md +0 -0
  180. /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-search-candidate.md +0 -0
  181. /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-urge-feedback.md +0 -0
@@ -240,6 +240,7 @@ function createArchiveOaHost(ctx, dependencies = {}) {
240
240
  path,
241
241
  query,
242
242
  body,
243
+ formData,
243
244
  operation,
244
245
  headers: extraHeaders = {},
245
246
  timeoutMs = 6e4,
@@ -257,7 +258,7 @@ function createArchiveOaHost(ctx, dependencies = {}) {
257
258
  method: resolvedMethod,
258
259
  path,
259
260
  query: omitEmptyQueryValues(query),
260
- body,
261
+ ...formData ? { formData } : { body },
261
262
  headers: { "X-Requested-With": "XMLHttpRequest", ...extraHeaders },
262
263
  timeoutMs
263
264
  }).catch((error) => mapRuntimeNetworkError(error));
@@ -348,8 +349,43 @@ var QYS_ESB_ADD = {
348
349
  listId: "1190611964371984450",
349
350
  successText: "\u3010\u5951\u7EA6\u9501\u52A0\u5165\u501F\u9605\u8F66\u3011\u6267\u884C\u6210\u529F\uFF01"
350
351
  };
352
+ var WEAVER_ESB_REMOVE = {
353
+ source: "weaver",
354
+ esbActionIds: "882413705640943619",
355
+ objId: "882393476189437952",
356
+ listId: "882393480417296390",
357
+ successText: "\u3010\u79FB\u51FA\u501F\u9605\u8F66\u3011\u6267\u884C\u6210\u529F\uFF01"
358
+ };
359
+ var QYS_ESB_REMOVE = {
360
+ source: "qys",
361
+ esbActionIds: "882413705640943619",
362
+ objId: "882393476189437952",
363
+ listId: "883819516961857839",
364
+ successText: "\u3010\u5951\u7EA6\u9501\u79FB\u51FA\u501F\u9605\u8F66\u3011\u6267\u884C\u6210\u529F\uFF01"
365
+ };
351
366
  var QYS_DEFAULT_ARCHIVED_FIELD = "cljd";
352
367
  var QYS_DEFAULT_ARCHIVED_VALUE = "\u5DF2\u5F52\u6863";
368
+ var MY_BORROW_CONTRACT = {
369
+ source: "weaver",
370
+ pageAppId: "100002780000000542",
371
+ pageId: "1335759383610105964",
372
+ compId: "c922aecea25d4f538d8cb4d89320e916",
373
+ refPluginPackageId: "933846626099339271",
374
+ objId: "1335759383610105884",
375
+ archiveAppId: "2c109885898d48c19e49edd4cfd2bf2f",
376
+ fields: {
377
+ applyDate: "11738424152292925447525441107052728320",
378
+ requestId: "11738424152292925447525434968495886336",
379
+ customer: "11738424152292925447525437940097355783",
380
+ contractNo: "11738424152292925447525437940101550081",
381
+ archiveId: "11738424152292925447525437940101550084",
382
+ applicant: "11738424152292925447525436635463290880",
383
+ expireDate: "11738424152292925447525436280084107264"
384
+ }
385
+ };
386
+ var MY_BORROW_ARCHIVE_OPEN_PATH = "/sp/integration/loginSingle";
387
+ var MY_BORROW_FLOW_VIEW_PATH = "/sp/workflow/flowpage/view";
388
+ var MY_BORROW_EXPIRE_MAX = "2099-12-31";
353
389
 
354
390
  // src/shortcuts/archive-oa/operations/types.ts
355
391
  var READ = "read";
@@ -751,8 +787,139 @@ function makeAddOperations(carProfile, esb) {
751
787
  };
752
788
  return [prepare, apply];
753
789
  }
754
- function createBorrowCarOperations(carProfile, esb) {
755
- return [makeListOperation(carProfile), ...makeAddOperations(carProfile, esb)];
790
+ function makeRemoveOperations(carProfile, esb) {
791
+ const prepareName = `${prefix(carProfile.source)}.remove.prepare`;
792
+ const applyName = `${prefix(carProfile.source)}.remove.apply`;
793
+ const prepare = {
794
+ name: prepareName,
795
+ resource: "borrow-car",
796
+ method: "remove",
797
+ action: prepareName,
798
+ summary: `\u628A${esb.source === "qys" ? "\u5951\u7EA6\u9501" : "\u6CDB\u5FAE"}\u501F\u9605\u8F66\u8BB0\u5F55\u79FB\u51FA\u501F\u9605\u8F66\uFF1A\u6821\u9A8C\u6761\u6570\u5E76\u56DE\u67E5\u501F\u9605\u8F66\u73B0\u72B6\uFF08\u4E0D\u5199\u6570\u636E\uFF09`,
799
+ capability: "borrow-car",
800
+ risk: READ_BEFORE_WRITE,
801
+ inputSchema: schemaOf(
802
+ {
803
+ dataIds: {
804
+ ...SCHEMA_ID_LIST,
805
+ maxItems: MAX_BORROW_ITEMS,
806
+ description: `\u501F\u9605\u8F66\u884C id \u6570\u7EC4\uFF0C\u6765\u81EA borrow-car.list \u7684 rows[].id\uFF0C\u6700\u591A ${MAX_BORROW_ITEMS} \u6761`
807
+ }
808
+ },
809
+ { required: ["dataIds"], description: "\u79FB\u51FA\u501F\u9605\u8F66\u9884\u68C0" }
810
+ ),
811
+ handler: async (args, env) => {
812
+ const dataIds = requireIdList(args.dataIds, "dataIds", MAX_BORROW_ITEMS);
813
+ const current = await env.host.request({
814
+ method: "POST",
815
+ path: CONTRACT_LIST_PATH,
816
+ operation: prepareName,
817
+ query: { passid: carProfile.passId, cid: carProfile.passId, sf_request_type: "ajax" },
818
+ body: {
819
+ current: 1,
820
+ requiredMatch: 1,
821
+ mapResult: "1",
822
+ recheckQuery: "1",
823
+ cusMenuId: carProfile.cusMenuId,
824
+ urlPageTitle: carProfile.urlPageTitle,
825
+ searchParamData: { searchType: "2", type: "and", commonSearchFields: {}, groupFields: {} },
826
+ listId: carProfile.listId,
827
+ isFollow: 0,
828
+ isShareToMe: 0,
829
+ filterCondition: {},
830
+ browser: "Chrome"
831
+ }
832
+ });
833
+ const { rows } = normalizeListResult(prepareName, current, carProfile.source);
834
+ const existing = new Set(rows.map((row) => String(row.id ?? row.form_data_id ?? "")));
835
+ const notInBorrowCar = dataIds.filter((id) => !existing.has(id));
836
+ const { continuation, expiresInMs } = await issueLease(env, applyName, {
837
+ dataIds,
838
+ esbActionIds: esb.esbActionIds,
839
+ objId: esb.objId,
840
+ listId: esb.listId
841
+ });
842
+ return archiveOaSuccess(
843
+ prepareName,
844
+ {
845
+ preview: {
846
+ source: carProfile.source,
847
+ count: dataIds.length,
848
+ dataIds,
849
+ borrowCarBefore: rows.length,
850
+ notInBorrowCar
851
+ },
852
+ hint: `\u786E\u8BA4\u540E\u8C03\u7528 ${applyName}\uFF08CLI\uFF1Aarchive-oa borrow-car remove-apply --continuation <token> --yes\uFF09`,
853
+ continuation
854
+ },
855
+ { requiresConfirmation: true, expiresInMs }
856
+ );
857
+ }
858
+ };
859
+ const apply = {
860
+ name: applyName,
861
+ resource: "borrow-car",
862
+ method: "remove",
863
+ action: applyName,
864
+ summary: `\u628A${esb.source === "qys" ? "\u5951\u7EA6\u9501" : "\u6CDB\u5FAE"}\u501F\u9605\u8F66\u8BB0\u5F55\u79FB\u51FA\u501F\u9605\u8F66\uFF08\u5199\u64CD\u4F5C\uFF09\uFF1A\u6267\u884C ESB \u52A8\u4F5C`,
865
+ capability: "borrow-car",
866
+ risk: HIGH_RISK_WRITE,
867
+ requiresConfirmation: true,
868
+ inputSchema: schemaOf(
869
+ {
870
+ continuation: { type: "string", description: "prepare \u8FD4\u56DE\u7684\u786E\u8BA4\u7968\u636E" },
871
+ confirm: { type: "boolean", description: "\u5FC5\u987B\u4E3A true\uFF08CLI --yes\uFF09" }
872
+ },
873
+ { required: ["continuation", "confirm"], description: "\u79FB\u51FA\u501F\u9605\u8F66" }
874
+ ),
875
+ handler: async (args, env) => {
876
+ const lease = await verifyLease(args, applyName, env);
877
+ assertLeaseTarget(lease, args, ["dataIds"], applyName);
878
+ const dataIds = Array.isArray(lease.dataIds) ? lease.dataIds.map(String) : [];
879
+ if (dataIds.length === 0 || dataIds.length > MAX_BORROW_ITEMS) {
880
+ throw new Error("continuation \u7F3A\u5C11\u5408\u6CD5\u7684 dataIds");
881
+ }
882
+ const response = await env.host.request({
883
+ method: "POST",
884
+ path: RUN_ESB_PATH,
885
+ operation: applyName,
886
+ query: { sf_request_type: "ajax" },
887
+ body: {
888
+ dataIds: dataIds.join(","),
889
+ esbActionIds: String(lease.esbActionIds ?? esb.esbActionIds),
890
+ objId: String(lease.objId ?? esb.objId),
891
+ listId: String(lease.listId ?? esb.listId)
892
+ }
893
+ });
894
+ const data = unwrapData(response) ?? {};
895
+ const failNum = Number(data.failNum ?? 0);
896
+ if (failNum > 0) {
897
+ throw archiveOaPartialError(
898
+ `\u79FB\u51FA\u501F\u9605\u8F66\u90E8\u5206\u5931\u8D25\uFF1A\u6210\u529F ${data.successNum ?? 0} \u6761\uFF0C\u5931\u8D25 ${failNum} \u6761`,
899
+ { successNum: data.successNum ?? 0, failNum, failIds: data.failIds ?? [] },
900
+ { dataIds, needRefresh: data.needRefresh === true }
901
+ );
902
+ }
903
+ return archiveOaSuccess(
904
+ applyName,
905
+ {
906
+ message: String(data.successMsg ?? esb.successText),
907
+ successNum: data.successNum ?? dataIds.length,
908
+ failNum,
909
+ needRefresh: data.needRefresh === true
910
+ },
911
+ { wrote: true, source: carProfile.source, count: dataIds.length }
912
+ );
913
+ }
914
+ };
915
+ return [prepare, apply];
916
+ }
917
+ function createBorrowCarOperations(carProfile, esb, esbRemove) {
918
+ return [
919
+ makeListOperation(carProfile),
920
+ ...makeAddOperations(carProfile, esb),
921
+ ...makeRemoveOperations(carProfile, esbRemove)
922
+ ];
756
923
  }
757
924
 
758
925
  // src/shortcuts/archive-oa/operations/borrow-url.ts
@@ -1039,16 +1206,274 @@ var archiveLocateOperation = {
1039
1206
  }
1040
1207
  };
1041
1208
 
1209
+ // src/shortcuts/archive-oa/operations/my-borrow-contract.ts
1210
+ import { randomBytes as randomBytes2 } from "node:crypto";
1211
+ var GET_DATA_PATH = "/api/ebuilder/form/eblist/getData";
1212
+ var GET_COUNT_PATH = "/api/ebuilder/form/eblist/getCount";
1213
+ var DEFAULT_PAGE_SIZE = 10;
1214
+ var MAX_PAGE_SIZE = 50;
1215
+ function filterableFields(profile) {
1216
+ return {
1217
+ customer: { id: profile.fields.customer, name: "qyf", kind: "text" },
1218
+ contractNo: { id: profile.fields.contractNo, name: "hth", kind: "text" },
1219
+ expireDate: { id: profile.fields.expireDate, name: "sqjsrq", kind: "date" }
1220
+ };
1221
+ }
1222
+ function today() {
1223
+ const now = /* @__PURE__ */ new Date();
1224
+ const pad = (value) => String(value).padStart(2, "0");
1225
+ return `${now.getFullYear()}-${pad(now.getMonth() + 1)}-${pad(now.getDate())}`;
1226
+ }
1227
+ function randomHex(byteLength = 16) {
1228
+ return randomBytes2(byteLength).toString("hex");
1229
+ }
1230
+ function assertDateText(value, field) {
1231
+ if (!/^\d{4}-\d{2}-\d{2}$/u.test(value)) {
1232
+ throw archiveOaValidationError("date_invalid", `${field} \u5FC5\u987B\u662F YYYY-MM-DD`);
1233
+ }
1234
+ return value;
1235
+ }
1236
+ function buildCondition(profile, field, funcType, value) {
1237
+ const isDate = field.kind === "date";
1238
+ return {
1239
+ conditionType: "and",
1240
+ dataType: "field",
1241
+ id: randomHex(),
1242
+ conditionComId: `${profile.compId}_advance_EXCLUDECACHE`,
1243
+ filterFields: [
1244
+ {
1245
+ compId: profile.compId,
1246
+ compType: isDate ? "DateComponent" : "Text",
1247
+ dataset: {
1248
+ isPhysical: true,
1249
+ relationDataset: {
1250
+ groupId: "690514401801175040",
1251
+ id: "1173842415229292544",
1252
+ type: "ETEAMS"
1253
+ },
1254
+ ebuilderDataConfig: { dataSetup: {}, datasetType: "sql", type: "FORM" },
1255
+ detailTable: false,
1256
+ groupId: "weaver-ebuilder-form-service",
1257
+ usage: "all",
1258
+ appId: profile.pageAppId,
1259
+ id: profile.objId,
1260
+ text: "\u6211\u501F\u9605\u7684\u5408\u540C\u6863\u6848",
1261
+ type: "LOGIC",
1262
+ objType: "vform"
1263
+ },
1264
+ fieldName: field.name,
1265
+ ...isDate ? { formatType: "4" } : {},
1266
+ id: field.id,
1267
+ objId: profile.objId,
1268
+ type: isDate ? "Date" : "String",
1269
+ text: field.name
1270
+ }
1271
+ ],
1272
+ funcType,
1273
+ value,
1274
+ customSelect: null
1275
+ };
1276
+ }
1277
+ function parseConditions(profile, fields, defaultCondition) {
1278
+ const aliases = filterableFields(profile);
1279
+ const conditions = [];
1280
+ let expireRange = null;
1281
+ if (fields !== void 0 && fields !== null) {
1282
+ if (!Array.isArray(fields)) {
1283
+ throw archiveOaValidationError("search_fields_invalid", "fields \u5FC5\u987B\u662F\u6570\u7EC4");
1284
+ }
1285
+ for (const [index, raw] of fields.entries()) {
1286
+ if (!raw || typeof raw !== "object" || Array.isArray(raw)) {
1287
+ throw archiveOaValidationError("search_fields_invalid", `fields[${index}] \u5FC5\u987B\u662F\u5BF9\u8C61`);
1288
+ }
1289
+ const item = raw;
1290
+ const name = String(item.field ?? "").trim();
1291
+ const meta = aliases[name];
1292
+ if (!meta) {
1293
+ throw archiveOaValidationError(
1294
+ "search_field_unknown",
1295
+ `fields[${index}].field \u53EA\u652F\u6301 ${Object.keys(aliases).join(" / ")}`
1296
+ );
1297
+ }
1298
+ if (item.value === void 0 || item.value === null || item.value === "") {
1299
+ throw archiveOaValidationError("search_value_required", `fields[${index}].value \u5FC5\u586B`);
1300
+ }
1301
+ if (meta.kind === "date") {
1302
+ if (Array.isArray(item.value) || typeof item.value === "object") {
1303
+ const range = Array.isArray(item.value) ? { min: String(item.value[0] ?? ""), max: String(item.value[1] ?? "") } : { min: String(item.value.min ?? ""), max: String(item.value.max ?? "") };
1304
+ const min = assertDateText(range.min, `fields[${index}].value.min`);
1305
+ const max = assertDateText(range.max, `fields[${index}].value.max`);
1306
+ conditions.push({ field: meta, funcType: "between", value: `${min},${max}` });
1307
+ if (name === "expireDate") expireRange = { min, max };
1308
+ continue;
1309
+ }
1310
+ const text = assertDateText(String(item.value).trim(), `fields[${index}].value`);
1311
+ conditions.push({ field: meta, funcType: "between", value: `${text},${text}` });
1312
+ if (name === "expireDate") expireRange = { min: text, max: text };
1313
+ continue;
1314
+ }
1315
+ if (typeof item.value !== "string") {
1316
+ throw archiveOaValidationError("search_value_invalid", `fields[${index}].value \u5FC5\u987B\u662F\u5B57\u7B26\u4E32`);
1317
+ }
1318
+ conditions.push({ field: meta, funcType: "like", value: item.value.trim() });
1319
+ }
1320
+ }
1321
+ if (defaultCondition && !expireRange) {
1322
+ const min = today();
1323
+ conditions.push({
1324
+ field: { id: profile.fields.expireDate, name: "sqjsrq", kind: "date" },
1325
+ funcType: "between",
1326
+ value: `${min},${MY_BORROW_EXPIRE_MAX}`
1327
+ });
1328
+ expireRange = { min, max: MY_BORROW_EXPIRE_MAX };
1329
+ }
1330
+ return { conditions, expireRange: expireRange ?? { min: "", max: "" } };
1331
+ }
1332
+ function buildFormData(profile, values) {
1333
+ const form = new FormData();
1334
+ for (const [key, value] of Object.entries(values)) form.append(key, value);
1335
+ return form;
1336
+ }
1337
+ var PAGE_FILTER = JSON.stringify({ filter: {}, filterIsNull: true, esbFilter: [] });
1338
+ function hasArchiveFile(raw) {
1339
+ const text = String(raw ?? "").trim();
1340
+ if (!text) return false;
1341
+ if (text === "0" || text === "-1") return false;
1342
+ if (text.toLowerCase() === "null" || text.toLowerCase() === "undefined") return false;
1343
+ if (text === "0_0") return false;
1344
+ return true;
1345
+ }
1346
+ function applicantName(value) {
1347
+ if (Array.isArray(value)) {
1348
+ return value.map((item) => item && typeof item === "object" ? String(item.name ?? "") : "").filter((name) => name.length > 0).join("\u3001");
1349
+ }
1350
+ return typeof value === "string" ? value : "";
1351
+ }
1352
+ var myBorrowListOperation = {
1353
+ name: "archive-oa.my-borrow.list",
1354
+ resource: "my-borrow",
1355
+ method: "list",
1356
+ action: "archive-oa.my-borrow.list",
1357
+ summary: "\u67E5\u8BE2\u300C\u6211\u501F\u9605\u7684\u5408\u540C\u6863\u6848\u300D\u53F0\u8D26\uFF08eBuilder \u5217\u8868\uFF09\uFF0C\u9ED8\u8BA4\u53EA\u770B\u672A\u8FC7\u671F",
1358
+ capability: "my-borrow",
1359
+ risk: READ,
1360
+ inputSchema: schemaOf(
1361
+ {
1362
+ pageNo: { ...SCHEMA_PAGE_NO, description: "\u9875\u7801\uFF0C\u4ECE 1 \u5F00\u59CB\uFF0C\u7F3A\u7701 1" },
1363
+ pageSize: {
1364
+ type: "integer",
1365
+ minimum: 1,
1366
+ maximum: MAX_PAGE_SIZE,
1367
+ description: `\u6BCF\u9875\u6761\u6570\uFF0C\u7F3A\u7701 ${DEFAULT_PAGE_SIZE}\uFF0C\u6700\u591A ${MAX_PAGE_SIZE}`
1368
+ },
1369
+ includeExpired: {
1370
+ type: "boolean",
1371
+ description: "\u4E3A true \u65F6\u53BB\u6389\u300C\u6388\u6743\u5230\u671F\u65E5\u671F\u300D\u65F6\u95F4\u6761\u4EF6\uFF0C\u8FD4\u56DE\u5168\u90E8\uFF08\u542B\u5DF2\u8FC7\u671F\uFF09\uFF1B\u7F3A\u7701 false"
1372
+ },
1373
+ fields: {
1374
+ ...SCHEMA_SEARCH_FIELDS,
1375
+ description: "\u9644\u52A0\u7B5B\u9009\uFF1Afield \u652F\u6301 customer\uFF08\u7B7E\u7EA6\u65B9 qyf\uFF0Clike\uFF09/ contractNo\uFF08\u5408\u540C\u53F7 hth\uFF0Clike\uFF09/ expireDate\uFF08\u6388\u6743\u5230\u671F\u65E5\u671F sqjsrq\uFF0Cbetween\uFF09"
1376
+ }
1377
+ },
1378
+ { description: "\u67E5\u8BE2\u6211\u501F\u9605\u7684\u5408\u540C\u6863\u6848" }
1379
+ ),
1380
+ handler: async (args, env) => {
1381
+ const profile = MY_BORROW_CONTRACT;
1382
+ const pageNo = positiveInt(args.pageNo, "pageNo", 1);
1383
+ const pageSize = positiveInt(args.pageSize, "pageSize", DEFAULT_PAGE_SIZE);
1384
+ if (pageSize > MAX_PAGE_SIZE) {
1385
+ throw archiveOaValidationError("number_invalid", `pageSize \u6700\u591A ${MAX_PAGE_SIZE}`);
1386
+ }
1387
+ const includeExpired = args.includeExpired === true;
1388
+ const { conditions, expireRange } = parseConditions(profile, args.fields, !includeExpired);
1389
+ const filter = conditions.map(
1390
+ (condition) => buildCondition(profile, condition.field, condition.funcType, condition.value)
1391
+ );
1392
+ const tableuid = randomHex();
1393
+ const session = await env.host.getSession();
1394
+ const dataResponse = await env.host.request({
1395
+ method: "POST",
1396
+ path: GET_DATA_PATH,
1397
+ operation: "archive-oa.my-borrow.list",
1398
+ formData: buildFormData(profile, {
1399
+ filter: JSON.stringify(filter),
1400
+ fieldFilter: "{}",
1401
+ pageFilter: PAGE_FILTER,
1402
+ pageAppId: profile.pageAppId,
1403
+ compId: profile.compId,
1404
+ pageId: profile.pageId,
1405
+ pageNo: String(pageNo),
1406
+ pageSize: String(pageSize),
1407
+ tableuid,
1408
+ refPluginPackageId: profile.refPluginPackageId
1409
+ })
1410
+ });
1411
+ const data = unwrapData(dataResponse) ?? {};
1412
+ const list = Array.isArray(data.list) ? data.list : [];
1413
+ const baseUrl = session.baseUrl.replace(/\/+$/u, "");
1414
+ const rows = list.map((row, index) => {
1415
+ const archiveId = String(row[profile.fields.archiveId] ?? "").trim();
1416
+ const available = hasArchiveFile(archiveId);
1417
+ const requestId = String(row[profile.fields.requestId] ?? "").trim();
1418
+ return {
1419
+ index: index + 1,
1420
+ applyDate: String(row[profile.fields.applyDate] ?? ""),
1421
+ requestId,
1422
+ flowUrl: requestId ? `${baseUrl}${MY_BORROW_FLOW_VIEW_PATH}/${encodeURIComponent(requestId)}` : "",
1423
+ customer: String(row[profile.fields.customer] ?? ""),
1424
+ contractNo: String(row[profile.fields.contractNo] ?? ""),
1425
+ archiveId,
1426
+ hasArchive: available,
1427
+ archiveUrl: available ? `${baseUrl}${MY_BORROW_ARCHIVE_OPEN_PATH}?appId=${profile.archiveAppId}&archiveId=${encodeURIComponent(archiveId)}` : "",
1428
+ expireDate: String(row[profile.fields.expireDate] ?? ""),
1429
+ applicant: applicantName(row[profile.fields.applicant])
1430
+ };
1431
+ });
1432
+ let total;
1433
+ try {
1434
+ const countResponse = await env.host.request({
1435
+ method: "POST",
1436
+ path: GET_COUNT_PATH,
1437
+ operation: "archive-oa.my-borrow.list",
1438
+ query: { passid: profile.objId },
1439
+ formData: buildFormData(profile, {
1440
+ tableuid,
1441
+ pageId: profile.pageId,
1442
+ compId: profile.compId,
1443
+ refPluginPackageId: profile.refPluginPackageId
1444
+ })
1445
+ });
1446
+ const countData = unwrapData(countResponse) ?? {};
1447
+ const parsed = Number(countData.total);
1448
+ if (Number.isFinite(parsed)) total = parsed;
1449
+ } catch {
1450
+ }
1451
+ return archiveOaSuccess(
1452
+ "archive-oa.my-borrow.list",
1453
+ { rows },
1454
+ {
1455
+ source: profile.source,
1456
+ pageNo,
1457
+ pageSize,
1458
+ total,
1459
+ includeExpired,
1460
+ expireRange: includeExpired ? void 0 : expireRange
1461
+ }
1462
+ );
1463
+ }
1464
+ };
1465
+
1042
1466
  // src/shortcuts/archive-oa/operations/registry.ts
1043
1467
  function buildRegistry() {
1044
1468
  const registry = /* @__PURE__ */ new Map();
1045
1469
  const definitions = [
1046
1470
  archiveLocateOperation,
1471
+ myBorrowListOperation,
1047
1472
  weaverContractFieldsOperation,
1048
1473
  weaverContractListOperation,
1049
1474
  qysContractListOperation,
1050
- ...createBorrowCarOperations(WEAVER_BORROW_CAR, WEAVER_ESB_ADD),
1051
- ...createBorrowCarOperations(QYS_BORROW_CAR, QYS_ESB_ADD),
1475
+ ...createBorrowCarOperations(WEAVER_BORROW_CAR, WEAVER_ESB_ADD, WEAVER_ESB_REMOVE),
1476
+ ...createBorrowCarOperations(QYS_BORROW_CAR, QYS_ESB_ADD, QYS_ESB_REMOVE),
1052
1477
  createBorrowStartUrlOperation(WEAVER_BORROW_CAR),
1053
1478
  createBorrowStartUrlOperation(QYS_BORROW_CAR)
1054
1479
  ];
@@ -1275,6 +1700,15 @@ var archiveOaShortcut = {
1275
1700
  contract.command("fields").description("List searchable fields of Weaver business contracts").action(action(async (ctx) => {
1276
1701
  await executeAndPrint(ctx, "archive-oa.contract.fields", {});
1277
1702
  }));
1703
+ const myBorrow = command.command("my-borrow").description("My borrowed contract archives (eBuilder list)");
1704
+ withJsonInputOptions(myBorrow.command("list").description("List contract archives I borrowed (default: not expired)").option("--page-no <page>", "page number, starts from 1").option("--page-size <size>", "page size, default 10, max 50").option("--include-expired", "include expired borrows (drop the expire-date filter)")).action(action(async (ctx, options) => {
1705
+ const opts = asOptions(options);
1706
+ await executeAndPrint(ctx, "archive-oa.my-borrow.list", await archiveOaInputFrom(options, {
1707
+ pageNo: intOption(opts.pageNo),
1708
+ pageSize: intOption(opts.pageSize),
1709
+ includeExpired: opts.includeExpired === true ? true : void 0
1710
+ }));
1711
+ }));
1278
1712
  const qys = command.command("qys").description("Qiyuesuo (case) contract commands");
1279
1713
  withJsonInputOptions(qys.command("list").description("Query Qiyuesuo collaboration contracts (default archived only)").option("--page-no <page>", "page number, starts from 1")).action(action(async (ctx, options) => {
1280
1714
  const opts = asOptions(options);
@@ -1305,6 +1739,21 @@ var archiveOaShortcut = {
1305
1739
  confirm: opts.yes === true ? true : void 0
1306
1740
  }));
1307
1741
  }));
1742
+ withJsonInputOptions(borrowCar.command("remove-prepare").description("Prepare removing entries from the borrow car (max 6)").option("--source <source>", "weaver or qys, default weaver").option("--data-ids <ids>", "comma separated borrow car row ids")).action(action(async (ctx, options) => {
1743
+ const opts = asOptions(options);
1744
+ const source = resolveSource(opts.source);
1745
+ await executeAndPrint(ctx, borrowCarOperation("remove.prepare", source), await archiveOaInputFrom(options, {
1746
+ dataIds: stringListOption(opts.dataIds)
1747
+ }));
1748
+ }));
1749
+ withJsonInputOptions(borrowCar.command("remove-apply").description("Apply removing entries from the borrow car").option("--continuation <token>", "continuation token from prepare").option("--source <source>", "weaver or qys, default weaver").option("--yes", "confirm the write operation")).action(action(async (ctx, options) => {
1750
+ const opts = asOptions(options);
1751
+ const source = resolveSource(opts.source);
1752
+ await executeAndPrint(ctx, borrowCarOperation("remove.apply", source), await archiveOaInputFrom(options, {
1753
+ continuation: stringOption(opts.continuation),
1754
+ confirm: opts.yes === true ? true : void 0
1755
+ }));
1756
+ }));
1308
1757
  const borrow = command.command("borrow").description("Borrow workflow commands");
1309
1758
  withJsonInputOptions(borrow.command("start-url").description("Build the borrow workflow page URL from borrow car entries").option("--source <source>", "weaver or qys, default weaver").option("--contract-nos <nos>", "comma separated contract numbers from borrow car, max 6")).action(action(async (ctx, options) => {
1310
1759
  const opts = asOptions(options);
@@ -8,9 +8,9 @@ import {
8
8
  looksLikeFileId,
9
9
  meetingAttachmentContentOperations,
10
10
  parseFileIdList
11
- } from "./chunk-GSZTA43P.js";
12
- import "./chunk-IRMIEDXN.js";
13
- import "./chunk-6V5ZPKHV.js";
11
+ } from "./chunk-OCYRVZGN.js";
12
+ import "./chunk-FEP6ELMR.js";
13
+ import "./chunk-NK74RE5F.js";
14
14
  import "./chunk-7BDPM5ST.js";
15
15
  import "./chunk-UG5G54VL.js";
16
16
  import "./chunk-BUSC6UAE.js";
@@ -13,11 +13,11 @@ import {
13
13
  refMaxCount,
14
14
  resolveRefInput,
15
15
  resultThresholdBytes
16
- } from "./chunk-727FH2NI.js";
16
+ } from "./chunk-2IGZUMNG.js";
17
17
  import {
18
18
  Command,
19
19
  clearInvoiceTokenForSession
20
- } from "./chunk-LIEQJIGM.js";
20
+ } from "./chunk-GR76ZDDX.js";
21
21
  import {
22
22
  refsDir
23
23
  } from "./chunk-AJ62BGAW.js";
@@ -299,7 +299,20 @@ function pruneRefs(ctx, options = {}) {
299
299
  }
300
300
  function pickValue(value, path) {
301
301
  let cursor = value;
302
- for (const token of tokenizePath(path)) {
302
+ let tokens = tokenizePath(path);
303
+ const rootIsObject = cursor !== null && typeof cursor === "object" && !Array.isArray(cursor);
304
+ if (rootIsObject && typeof tokens[0] === "string" && !(tokens[0] in cursor)) {
305
+ const root = cursor;
306
+ if (tokens[0] === "data" && root.data === void 0) {
307
+ tokens = tokens.slice(1);
308
+ } else {
309
+ const data = root.data;
310
+ if (data !== null && typeof data === "object" && tokens[0] in data) {
311
+ cursor = data;
312
+ }
313
+ }
314
+ }
315
+ for (const token of tokens) {
303
316
  if (cursor === null || cursor === void 0) {
304
317
  throw new RefError("ref_pick_failed", `--pick \u8DEF\u5F84 ${path} \u5728 ${token} \u5904\u65E0\u6CD5\u7EE7\u7EED`);
305
318
  }
@@ -322,7 +335,7 @@ function pickValue(value, path) {
322
335
  return cursor;
323
336
  }
324
337
  function tokenizePath(path) {
325
- let cursor = path.trim().replace(/^\$/, "").replace(/^data\./, "");
338
+ const cursor = path.trim().replace(/^\$/, "");
326
339
  const tokens = [];
327
340
  const pattern = /([^.[\]]+)|\[(\d+)\]/g;
328
341
  let match;