vps-work 2.4.1 → 2.5.1

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 (125) hide show
  1. package/.well-known/skills/index.json +11 -0
  2. package/README.md +10 -0
  3. package/dist/packages/vps-work/src/bin/vps-work.js +271 -0
  4. package/dist/packages/vps-work/src/commands/agent/index.js +264 -0
  5. package/dist/packages/vps-work/src/commands/approval/index.js +7 -0
  6. package/dist/packages/vps-work/src/commands/approval/shortcuts.js +259 -0
  7. package/dist/packages/vps-work/src/commands/attendance/applications.js +21 -0
  8. package/dist/packages/vps-work/src/commands/attendance/index.js +9 -0
  9. package/dist/packages/vps-work/src/commands/attendance/scheduling.js +183 -0
  10. package/dist/packages/vps-work/src/commands/attendance/shortcuts.js +131 -0
  11. package/dist/packages/vps-work/src/commands/auth/check.js +34 -0
  12. package/dist/packages/vps-work/src/commands/auth/index.js +21 -0
  13. package/dist/packages/vps-work/src/commands/auth/list.js +50 -0
  14. package/dist/packages/vps-work/src/commands/auth/scopes.js +17 -0
  15. package/dist/packages/vps-work/src/commands/auth/status.js +127 -0
  16. package/dist/packages/vps-work/src/commands/auth/tenants.js +35 -0
  17. package/dist/packages/vps-work/src/commands/auth/use.js +40 -0
  18. package/dist/packages/vps-work/src/commands/calendar/index.js +7 -0
  19. package/dist/packages/vps-work/src/commands/calendar/shortcuts.js +598 -0
  20. package/dist/packages/vps-work/src/commands/catalog.js +29 -0
  21. package/dist/packages/vps-work/src/commands/cli-install.js +70 -0
  22. package/dist/packages/vps-work/src/commands/collab-invoke.js +19 -0
  23. package/dist/packages/vps-work/src/commands/corporate/index.js +204 -0
  24. package/dist/packages/vps-work/src/commands/creative/index.js +369 -0
  25. package/dist/packages/vps-work/src/commands/documents/index.js +991 -0
  26. package/dist/packages/vps-work/src/commands/drive/index.js +435 -0
  27. package/dist/packages/vps-work/src/commands/exec.js +46 -0
  28. package/dist/packages/vps-work/src/commands/hr/business.js +22 -0
  29. package/dist/packages/vps-work/src/commands/hr/data-view-shortcuts.js +519 -0
  30. package/dist/packages/vps-work/src/commands/hr/index.js +15 -0
  31. package/dist/packages/vps-work/src/commands/hr/job-responsibilities.js +266 -0
  32. package/dist/packages/vps-work/src/commands/hr/payslip.js +45 -0
  33. package/dist/packages/vps-work/src/commands/hr/shortcuts.js +146 -0
  34. package/dist/packages/vps-work/src/commands/im/im-message-payload.js +150 -0
  35. package/dist/packages/vps-work/src/commands/im/index.js +7 -0
  36. package/dist/packages/vps-work/src/commands/im/shortcuts.js +856 -0
  37. package/dist/packages/vps-work/src/commands/knowledge/index.js +36 -0
  38. package/dist/packages/vps-work/src/commands/login.js +52 -0
  39. package/dist/packages/vps-work/src/commands/logout.js +12 -0
  40. package/dist/packages/vps-work/src/commands/mail/email.js +132 -0
  41. package/dist/packages/vps-work/src/commands/mail/index.js +9 -0
  42. package/dist/packages/vps-work/src/commands/mail/shortcuts.js +43 -0
  43. package/dist/packages/vps-work/src/commands/meeting/index.js +7 -0
  44. package/dist/packages/vps-work/src/commands/meeting/shortcuts.js +120 -0
  45. package/dist/packages/vps-work/src/commands/odoo-invoke.js +21 -0
  46. package/dist/packages/vps-work/src/commands/odoo-leaf-registry.js +13 -0
  47. package/dist/packages/vps-work/src/commands/office/index.js +59 -0
  48. package/dist/packages/vps-work/src/commands/okr/index.js +7 -0
  49. package/dist/packages/vps-work/src/commands/okr/shortcuts.js +75 -0
  50. package/dist/packages/vps-work/src/commands/org-structure.js +347 -0
  51. package/dist/packages/vps-work/src/commands/popup/index.js +147 -0
  52. package/dist/packages/vps-work/src/commands/product/abnormal-statistics.js +250 -0
  53. package/dist/packages/vps-work/src/commands/product/data-view-shortcuts.js +253 -0
  54. package/dist/packages/vps-work/src/commands/product/index.js +11 -0
  55. package/dist/packages/vps-work/src/commands/purchase/index.js +45 -0
  56. package/dist/packages/vps-work/src/commands/reauth.js +127 -0
  57. package/dist/packages/vps-work/src/commands/report/index.js +7 -0
  58. package/dist/packages/vps-work/src/commands/report/missing-daily-reports.js +9 -0
  59. package/dist/packages/vps-work/src/commands/report/shortcuts.js +251 -0
  60. package/dist/packages/vps-work/src/commands/sales/index.js +11 -0
  61. package/dist/packages/vps-work/src/commands/sales/period-params.js +75 -0
  62. package/dist/packages/vps-work/src/commands/sales/shortcuts-personnel.js +124 -0
  63. package/dist/packages/vps-work/src/commands/sales/shortcuts.js +800 -0
  64. package/dist/packages/vps-work/src/commands/shortcut-common.js +88 -0
  65. package/dist/packages/vps-work/src/commands/shortcut-params.js +22 -0
  66. package/dist/packages/vps-work/src/commands/skill/index.js +136 -0
  67. package/dist/packages/vps-work/src/commands/skill/personal.js +167 -0
  68. package/dist/packages/vps-work/src/commands/store/index.js +82 -0
  69. package/dist/packages/vps-work/src/commands/task/index.js +7 -0
  70. package/dist/packages/vps-work/src/commands/task/task-center.js +595 -0
  71. package/dist/packages/vps-work/src/commands/tools/index.js +127 -0
  72. package/dist/packages/vps-work/src/commands/vemory/index.js +7 -0
  73. package/dist/packages/vps-work/src/commands/vemory/shortcuts.js +53 -0
  74. package/dist/packages/vps-work/src/commands/vertu-aisales.js +30 -0
  75. package/dist/packages/vps-work/src/commands/vertu-erp.js +30 -0
  76. package/dist/packages/vps-work/src/core/aisales-mcp-client.js +35 -0
  77. package/dist/packages/vps-work/src/core/auth.js +240 -0
  78. package/dist/packages/vps-work/src/core/cli-bin.js +11 -0
  79. package/dist/packages/vps-work/src/core/cli-root-help.js +190 -0
  80. package/dist/packages/vps-work/src/core/client.js +158 -0
  81. package/dist/packages/vps-work/src/core/config.js +183 -0
  82. package/dist/packages/vps-work/src/core/corporate-client.js +52 -0
  83. package/dist/packages/vps-work/src/core/creative-attachment-download.js +48 -0
  84. package/dist/packages/vps-work/src/core/documents-client.js +57 -0
  85. package/dist/packages/vps-work/src/core/endpoints.js +46 -0
  86. package/dist/packages/vps-work/src/core/erp-mcp-client.js +11 -0
  87. package/dist/packages/vps-work/src/core/errors.js +107 -0
  88. package/dist/packages/vps-work/src/core/execute-catalog-client.js +42 -0
  89. package/dist/packages/vps-work/src/core/hermes-client.js +70 -0
  90. package/dist/packages/vps-work/src/core/im-attachment-download.js +109 -0
  91. package/dist/packages/vps-work/src/core/im-client.js +64 -0
  92. package/dist/packages/vps-work/src/core/keychain.js +58 -0
  93. package/dist/packages/vps-work/src/core/mail-client.js +82 -0
  94. package/dist/packages/vps-work/src/core/mcp-client.js +129 -0
  95. package/dist/packages/vps-work/src/core/office-client.js +25 -0
  96. package/dist/packages/vps-work/src/core/office-files.js +82 -0
  97. package/dist/packages/vps-work/src/core/paths.js +70 -0
  98. package/dist/packages/vps-work/src/core/public-result.js +43 -0
  99. package/dist/packages/vps-work/src/core/sales-invoice-attachments-client.js +75 -0
  100. package/dist/packages/vps-work/src/core/sales-query-client.js +452 -0
  101. package/dist/packages/vps-work/src/core/skill-catalog.js +158 -0
  102. package/dist/packages/vps-work/src/core/skill-key.js +19 -0
  103. package/dist/packages/vps-work/src/core/v-drive-store.js +392 -0
  104. package/dist/packages/vps-work/src/core/vertu-agent-env.js +32 -0
  105. package/dist/packages/vps-work/src/core/vps-auth-scopes.js +73 -0
  106. package/dist/packages/vps-work/src/core/vps-service-auth.js +382 -0
  107. package/dist/packages/vps-work/src/core/vps-service-config.js +83 -0
  108. package/dist/packages/vps-work/src/core/vps-service-http.js +187 -0
  109. package/dist/packages/vps-work/src/utils/at-file.js +34 -0
  110. package/dist/packages/vps-work/src/utils/cli-option-helpers.js +52 -0
  111. package/dist/packages/vps-work/src/utils/frontmatter.js +26 -0
  112. package/dist/packages/vps-work/src/utils/normalize-argv.js +51 -0
  113. package/dist/packages/vps-work/src/utils/parse-json-arg.js +85 -0
  114. package/dist/packages/vps-work/src/utils/prompt.js +46 -0
  115. package/dist/packages/vps-work/src/utils/read-text.js +44 -0
  116. package/dist/packages/vps-work/src/utils/schema-to-options.js +307 -0
  117. package/dist/packages/vps-work/src/utils/unwrap-envelope.js +31 -0
  118. package/dist/shared/im-org-tree/index.js +200 -0
  119. package/dist/vps-work.cjs +246 -44
  120. package/package.json +1 -1
  121. package/scripts/package-desktop-runtime.mjs +43 -0
  122. package/skills/README.md +1 -0
  123. package/skills/vertu-aisales/SKILL.md +18 -0
  124. package/skills/vertu-erp/SKILL.md +17 -0
  125. package/skills/vps-dealer-ops/SKILL.md +92 -0
@@ -0,0 +1,50 @@
1
+ import { Command } from 'commander';
2
+ import { vpsServiceConfigFilePath } from '../../core/paths.js';
3
+ import { readVertuAgentEnvFromProcess } from '../../core/vertu-agent-env.js';
4
+ import { loadStoredAgentKey, resolveVpsAuthState } from '../../core/vps-service-auth.js';
5
+ import { readVpsServiceConfig } from '../../core/vps-service-config.js';
6
+ export function buildAuthListCommand() {
7
+ return new Command('list')
8
+ .description('列出本机已配置的 VPS 认证身份。')
9
+ .option('--json', '输出 JSON')
10
+ .action(async (opts) => {
11
+ const vps = await readVpsServiceConfig();
12
+ if (!vps.agentAppKey && vps.baseUrl && vps.agentAppId) {
13
+ vps.agentAppKey = await loadStoredAgentKey(vps.baseUrl, vps.agentAppId);
14
+ }
15
+ const env = readVertuAgentEnvFromProcess();
16
+ const vpsState = resolveVpsAuthState(vps, env);
17
+ const vpsEntry = vps.baseUrl
18
+ ? {
19
+ kind: 'vps-service',
20
+ base_url: vps.baseUrl,
21
+ login: vpsState.login,
22
+ session_active: vpsState.active,
23
+ auth_mode: vpsState.mode,
24
+ agent_app_id: vpsState.agentAppId,
25
+ config: vpsServiceConfigFilePath(),
26
+ }
27
+ : null;
28
+ const payload = { vps: vpsEntry };
29
+ if (opts.json) {
30
+ console.log(JSON.stringify(payload, null, 2));
31
+ return;
32
+ }
33
+ if (vpsEntry) {
34
+ const modeLabel = vpsEntry.auth_mode === 'session'
35
+ ? '账号会话'
36
+ : vpsEntry.auth_mode === 'agent'
37
+ ? '智能体密钥'
38
+ : '无/过期';
39
+ console.log('Vertu');
40
+ console.log(` 地址 ${vpsEntry.base_url}`);
41
+ console.log(` 账号 ${vpsEntry.login ?? '—'}`);
42
+ console.log(` 凭证 ${modeLabel}`);
43
+ console.log(` 智能体 ${vpsEntry.agent_app_id ?? '—'}`);
44
+ console.log('');
45
+ }
46
+ if (!vpsEntry) {
47
+ console.log('暂无本地认证配置。Agent/Bot/Hermes 请检查宿主注入的 app_key;仅人工用户可交互执行 vps-work auth login。');
48
+ }
49
+ });
50
+ }
@@ -0,0 +1,17 @@
1
+ import { Command } from 'commander';
2
+ import { fetchVpsUserScopes } from '../../core/vps-auth-scopes.js';
3
+ import { resolveVpsServiceUrl } from '../../core/sales-query-client.js';
4
+ export function buildAuthScopesCommand() {
5
+ return new Command('scopes')
6
+ .description('查询当前用户已授权的 API scope(resource:action,类似 lark-cli auth scopes)。')
7
+ .option('--base-url <url>', 'Vertu 服务地址')
8
+ .option('--json', '输出 JSON(默认开启)', true)
9
+ .action(async (opts, cmd) => {
10
+ const merged = cmd.optsWithGlobals();
11
+ const serviceUrl = resolveVpsServiceUrl(opts.baseUrl ?? merged.baseUrl);
12
+ console.error('Querying user scopes...\n');
13
+ const payload = await fetchVpsUserScopes(serviceUrl);
14
+ const { ok: _ok, ...view } = payload;
15
+ console.log(JSON.stringify(view, null, 2));
16
+ });
17
+ }
@@ -0,0 +1,127 @@
1
+ import { Command } from 'commander';
2
+ import { VertuError } from '../../core/errors.js';
3
+ import { publicBusinessErrorMessage } from '../../core/public-result.js';
4
+ import { vpsServiceConfigFilePath } from '../../core/paths.js';
5
+ import { readVertuAgentEnvFromProcess } from '../../core/vertu-agent-env.js';
6
+ import { fetchVpsServiceMe, loadStoredAgentKey, resolveVpsAuthState, } from '../../core/vps-service-auth.js';
7
+ import { readVpsServiceConfig } from '../../core/vps-service-config.js';
8
+ import { resolveVpsServiceUrl } from '../../core/sales-query-client.js';
9
+ function authModeLabel(mode) {
10
+ if (mode === 'session') {
11
+ return '账号会话';
12
+ }
13
+ if (mode === 'agent') {
14
+ return '智能体密钥';
15
+ }
16
+ return '未登录';
17
+ }
18
+ /**
19
+ * `auth status`:查看当前 Vertu 登录身份、凭证类型(账号会话 / 智能体密钥)与有效性。
20
+ *
21
+ * 鉴权统一由 VPS 服务处理;scope 列表请用 `auth scopes`,
22
+ * 单个 scope 校验请用 `auth check`。
23
+ */
24
+ export function buildAuthStatusCommand() {
25
+ return new Command('status')
26
+ .description('查看当前登录状态、凭证类型与有效性;scope 列表请用 auth scopes。')
27
+ .option('--json', '输出 JSON')
28
+ .action(async (opts) => {
29
+ const cfg = await readVpsServiceConfig();
30
+ if (!cfg.agentAppKey && cfg.baseUrl && cfg.agentAppId) {
31
+ cfg.agentAppKey = await loadStoredAgentKey(cfg.baseUrl, cfg.agentAppId);
32
+ }
33
+ const env = readVertuAgentEnvFromProcess();
34
+ const state = resolveVpsAuthState(cfg, env);
35
+ const effectiveBaseUrl = resolveVpsServiceUrl();
36
+ if (!effectiveBaseUrl || !state.active) {
37
+ if (opts.json) {
38
+ console.log(JSON.stringify({ logged_in: false }, null, 2));
39
+ return;
40
+ }
41
+ throw new VertuError('未认证。Agent/Bot/Hermes 请检查宿主注入的 app_key(Hermes 必须使用 app_id=vertu-hermes-agent);仅人工用户可交互执行 `vps-work auth login`。');
42
+ }
43
+ let me = null;
44
+ let credentialError = null;
45
+ if (state.token) {
46
+ try {
47
+ me = await fetchVpsServiceMe(effectiveBaseUrl, state.token);
48
+ }
49
+ catch (error) {
50
+ credentialError = publicBusinessErrorMessage(error instanceof Error ? error.message : String(error));
51
+ /* 服务不可达时跳过身份明细,仍展示本地凭证信息 */
52
+ }
53
+ }
54
+ const credentialRejected = credentialError ? /HTTP (401|403)\b/.test(credentialError) : false;
55
+ const department = me?.departmentPath ?? me?.departmentName ?? null;
56
+ const expiresLabel = state.mode === 'agent' && state.neverExpires ? '长效(永不过期)' : state.expiresAt;
57
+ if (opts.json) {
58
+ console.log(JSON.stringify({
59
+ logged_in: state.active,
60
+ auth_mode: state.mode,
61
+ base_url: effectiveBaseUrl,
62
+ configured_base_url: cfg.baseUrl ?? null,
63
+ login: state.login,
64
+ user_id: me?.userId ?? null,
65
+ tenant_id: me?.tenantId ?? null,
66
+ tenant_name: me?.tenantName ?? null,
67
+ tenant_type: me?.tenantType ?? null,
68
+ membership_id: me?.membershipId ?? null,
69
+ membership_role: me?.membershipRole ?? null,
70
+ product_profile: me?.productProfile ?? null,
71
+ session_active: state.active,
72
+ server_authorized: Boolean(me),
73
+ credential_rejected: credentialRejected,
74
+ credential_error: credentialError,
75
+ expires_at: state.expiresAt,
76
+ never_expires: state.neverExpires,
77
+ agent_app_id: state.agentAppId,
78
+ employee_name: me?.employeeName ?? null,
79
+ department,
80
+ role: me?.role ?? null,
81
+ config: vpsServiceConfigFilePath(),
82
+ }, null, 2));
83
+ return;
84
+ }
85
+ console.log('VPS');
86
+ console.log(` 地址 : ${effectiveBaseUrl}`);
87
+ if (cfg.baseUrl && cfg.baseUrl.replace(/\/+$/, '') !== effectiveBaseUrl.replace(/\/+$/, '')) {
88
+ console.log(` 配置地址: ${cfg.baseUrl}(已被环境变量覆盖)`);
89
+ }
90
+ console.log(` 账号 : ${state.login ?? '—'}`);
91
+ console.log(` 凭证 : ${authModeLabel(state.mode)}`);
92
+ if (me?.employeeName) {
93
+ console.log(` 姓名 : ${me.employeeName}`);
94
+ }
95
+ if (department) {
96
+ console.log(` 部门 : ${department}`);
97
+ }
98
+ if (me?.tenantName || me?.tenantType) {
99
+ console.log(` 企业 : ${me.tenantName ?? '—'}(${me.tenantType ?? 'unknown'})`);
100
+ }
101
+ if (me?.membershipRole) {
102
+ console.log(` 成员角色: ${me.membershipRole}`);
103
+ }
104
+ if (me?.productProfile) {
105
+ console.log(` 产品包 : ${me.productProfile}`);
106
+ }
107
+ if (me?.role) {
108
+ console.log(` 角色 : ${me.role}`);
109
+ }
110
+ if (credentialRejected) {
111
+ console.log(' 状态 : 服务端已拒绝该凭证;Agent/Bot/Hermes 请联系管理员刷新宿主 app_key,人工用户请交互重新登录');
112
+ }
113
+ else if (credentialError) {
114
+ console.log(` 状态 : 本地凭证存在,服务端验证失败(${credentialError})`);
115
+ }
116
+ if (expiresLabel) {
117
+ console.log(` 过期 : ${expiresLabel}`);
118
+ }
119
+ if (state.agentAppId) {
120
+ console.log(` 智能体 : ${state.agentAppId}`);
121
+ }
122
+ if (cfg.apiKey?.trim()) {
123
+ console.log(' API Key : 已配置(服务级)');
124
+ }
125
+ console.log(` 配置 : ${vpsServiceConfigFilePath()}`);
126
+ });
127
+ }
@@ -0,0 +1,35 @@
1
+ import { Command } from 'commander';
2
+ import { VertuError } from '../../core/errors.js';
3
+ import { readVertuAgentEnvFromProcess } from '../../core/vertu-agent-env.js';
4
+ import { fetchVpsServiceTenants, loadStoredAgentKey, resolveVpsAuthState, } from '../../core/vps-service-auth.js';
5
+ import { readVpsServiceConfig } from '../../core/vps-service-config.js';
6
+ import { resolveVpsServiceUrl } from '../../core/sales-query-client.js';
7
+ /** 列出当前账号加入的企业,供人工或 Agent 在执行前确认身份。 */
8
+ export function buildAuthTenantsCommand() {
9
+ return new Command('tenants')
10
+ .description('列出当前账号可切换的企业')
11
+ .option('--json', '机读输出')
12
+ .action(async (opts) => {
13
+ const cfg = await readVpsServiceConfig();
14
+ if (!cfg.agentAppKey && cfg.baseUrl && cfg.agentAppId) {
15
+ cfg.agentAppKey = await loadStoredAgentKey(cfg.baseUrl, cfg.agentAppId);
16
+ }
17
+ const state = resolveVpsAuthState(cfg, readVertuAgentEnvFromProcess());
18
+ if (!state.active || !state.token) {
19
+ throw new VertuError('未认证。请先 `vps-work auth login` 或检查宿主注入的 app_key。');
20
+ }
21
+ const tenants = await fetchVpsServiceTenants(resolveVpsServiceUrl(), state.token);
22
+ if (opts.json) {
23
+ console.log(JSON.stringify({ tenants }, null, 2));
24
+ return;
25
+ }
26
+ if (tenants.length === 0) {
27
+ console.log('当前账号没有可用企业。');
28
+ return;
29
+ }
30
+ for (const tenant of tenants) {
31
+ const mark = tenant.active ? '*' : ' ';
32
+ console.log(`${mark} ${tenant.name} ${tenant.type} ${tenant.id} ${tenant.role}`);
33
+ }
34
+ });
35
+ }
@@ -0,0 +1,40 @@
1
+ import { Command } from 'commander';
2
+ import { VertuError } from '../../core/errors.js';
3
+ import { DEFAULT_AGENT_APP_ID, VERTU_APP_ID_ENV, readVertuAgentEnvFromProcess } from '../../core/vertu-agent-env.js';
4
+ import { bindVpsServiceAgentCredential, loadStoredAgentKey, persistVpsServiceAgentCredential, persistVpsServiceSession, pickVpsServiceUserInfo, resolveVpsAuthState, switchVpsServiceTenant, } from '../../core/vps-service-auth.js';
5
+ import { readVpsServiceConfig } from '../../core/vps-service-config.js';
6
+ import { resolveVpsServiceUrl } from '../../core/sales-query-client.js';
7
+ /** 切换当前 membership;Agent 不得用 --tenant 冒充,只能由宿主或人工执行。 */
8
+ export function buildAuthUseCommand() {
9
+ return new Command('use')
10
+ .description('切换当前企业身份(人工或宿主执行;Agent 不得自行换企业)')
11
+ .requiredOption('--tenant <id>', '目标企业 UUID')
12
+ .action(async (opts) => {
13
+ const env = readVertuAgentEnvFromProcess();
14
+ if (env.appKey?.trim()) {
15
+ throw new VertuError('当前是宿主注入的 Agent 凭证,禁止在命令行切换企业。请由宿主按企业重新注入 app_key。');
16
+ }
17
+ const cfg = await readVpsServiceConfig();
18
+ if (!cfg.agentAppKey && cfg.baseUrl && cfg.agentAppId) {
19
+ cfg.agentAppKey = await loadStoredAgentKey(cfg.baseUrl, cfg.agentAppId);
20
+ }
21
+ const state = resolveVpsAuthState(cfg, env);
22
+ if (state.mode !== 'session' || !state.token) {
23
+ throw new VertuError('切换企业需要账号会话。请先 `vps-work auth login`。');
24
+ }
25
+ const base = resolveVpsServiceUrl();
26
+ const session = await switchVpsServiceTenant(base, state.token, opts.tenant.trim());
27
+ await persistVpsServiceSession(base, session);
28
+ const user = pickVpsServiceUserInfo(session.user);
29
+ console.log(`已切换到:${user.tenantName ?? opts.tenant}(${user.tenantType ?? 'unknown'})`);
30
+ const appId = cfg.agentAppId ?? process.env[VERTU_APP_ID_ENV]?.trim() ?? DEFAULT_AGENT_APP_ID;
31
+ try {
32
+ const bound = await bindVpsServiceAgentCredential(base, session.token, appId);
33
+ await persistVpsServiceAgentCredential(base, bound);
34
+ console.log(`Agent 密钥已按新企业轮换:${bound.appId}`);
35
+ }
36
+ catch (error) {
37
+ console.warn(`Agent 绑定跳过:${error.message}`);
38
+ }
39
+ });
40
+ }
@@ -0,0 +1,7 @@
1
+ import { Command } from 'commander';
2
+ import { attachCalendarShortcuts } from './shortcuts.js';
3
+ export function buildCalendarCommand() {
4
+ const calendar = new Command('calendar').description('日程与日历:我的日程、人员日程、指定日历和多人忙闲。');
5
+ attachCalendarShortcuts(calendar);
6
+ return calendar;
7
+ }