odant-work 1.0.115 → 1.0.117

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 (86) hide show
  1. package/$server/$folder/$file/$task/handlers/pages/form/file/$handler/ui/panel.js +11 -2
  2. package/$server/$folder/lib/consultant/consultant.js +1 -1
  3. package/$server/$folder/lib/node-explorer/node-explorer.js +3 -0
  4. package/.graphifyignore +6 -0
  5. package/.graphifyrc +4 -0
  6. package/.opencode/commands/graphify.md +5 -0
  7. package/.opencode/commands/grill-me.md +7 -0
  8. package/.opencode/opencode.jsonc +11 -0
  9. package/.opencode/plugins/graphify.js +62 -0
  10. package/.opencode/skills/graphify/.graphify_version +1 -0
  11. package/.opencode/skills/graphify/SKILL.md +863 -0
  12. package/.opencode/skills/graphify/references/add-watch.md +56 -0
  13. package/.opencode/skills/graphify/references/exports.md +91 -0
  14. package/.opencode/skills/graphify/references/extraction-spec.md +86 -0
  15. package/.opencode/skills/graphify/references/github-and-merge.md +46 -0
  16. package/.opencode/skills/graphify/references/hooks.md +48 -0
  17. package/.opencode/skills/graphify/references/query.md +319 -0
  18. package/.opencode/skills/graphify/references/transcribe.md +52 -0
  19. package/.opencode/skills/graphify/references/update.md +233 -0
  20. package/.opencode/skills/grill-me/SKILL.md +31 -0
  21. package/.opencode/skills/grilling/SKILL.md +30 -0
  22. package/.well-known/appspecific/com.chrome.devtools.json +1 -1
  23. package/AGENTS.md +14 -0
  24. package/graphify-out/.graphify_analysis.json +11093 -0
  25. package/graphify-out/.graphify_build.json +1 -0
  26. package/graphify-out/.graphify_build_state.json +1 -0
  27. package/graphify-out/.graphify_detect.json +1 -0
  28. package/graphify-out/.graphify_labels.json +1 -0
  29. package/graphify-out/.graphify_labels.json.sig +1 -0
  30. package/graphify-out/.graphify_labels.pending.json +785 -0
  31. package/graphify-out/.graphify_python +1 -0
  32. package/graphify-out/.graphify_root +1 -0
  33. package/graphify-out/GRAPH_REPORT.md +1466 -0
  34. package/graphify-out/cache/.gfy-replace-bak-gci0at1b.tmp +1 -0
  35. package/graphify-out/cache/.gfy-replace-bak-jzyyumxe.tmp +1 -0
  36. package/graphify-out/cache/.gfy-replace-bak-zdzf7c5s.tmp +1 -0
  37. package/graphify-out/cache/ast/v0.9.108-s45-g460503b3f2a4/0362f8d78d0065532bbf3c258155da406e5d639fd8ab8b36f32aaec824797834.json +1 -0
  38. package/graphify-out/cache/ast/v0.9.108-s45-g460503b3f2a4/1279dd107c5cc425aebc191663bd8f5c44e6053b525cd4f5e06abac0427837b1.json +1 -0
  39. package/graphify-out/cache/ast/v0.9.108-s45-g460503b3f2a4/244d428606dc285d4e32c5930cf8126bfe4fe5fda192f8b9b5b1d932cfc8daea.json +1 -0
  40. package/graphify-out/cache/ast/v0.9.108-s45-g460503b3f2a4/2573255306d9de54325f188793d7dc7d76199a6017942e0a79f8ca9822da27ab.json +1 -0
  41. package/graphify-out/cache/ast/v0.9.108-s45-g460503b3f2a4/270cb0d9ad25da63476322ac8ba9a6eba1fdb21cd7a8b80fe1c33e7d13119d94.json +1 -0
  42. package/graphify-out/cache/ast/v0.9.108-s45-g460503b3f2a4/28a975c1a8d50bf16faf7dfc6b521bbeee5789a5ef49231541145d13f06ff722.json +1 -0
  43. package/graphify-out/cache/ast/v0.9.108-s45-g460503b3f2a4/2d64ab31df06d57558b3a282d06158dc8df565b36c0727c384645800b1168ef8.json +1 -0
  44. package/graphify-out/cache/ast/v0.9.108-s45-g460503b3f2a4/3e75114e18fd75627a71d987a27f2579779bd26f5b157f1e9f261f2467800a48.json +1 -0
  45. package/graphify-out/cache/ast/v0.9.108-s45-g460503b3f2a4/420740aeef9e97428bf0d87c10eb9c0f7819f004cee96d7d0faa2d1a5407d6e1.json +1 -0
  46. package/graphify-out/cache/ast/v0.9.108-s45-g460503b3f2a4/4c6bb77a1a9434986f0aac8251d69e42f45ef4c31775f7237be4bd0cf1eb8d9e.json +1 -0
  47. package/graphify-out/cache/ast/v0.9.108-s45-g460503b3f2a4/776c646738b485c922e7d3e9d8a3560f26e2ed133b142619313be1fdae4ffd05.json +1 -0
  48. package/graphify-out/cache/ast/v0.9.108-s45-g460503b3f2a4/7938cb04be94e0d03fe46b4ed7288c3224af872a3563e7f0e331ed1ad04acfc2.json +1 -0
  49. package/graphify-out/cache/ast/v0.9.108-s45-g460503b3f2a4/7af0aa1c83bfce5b5f81f06c5f3852af9035307fe749781868bb27b75906c2b0.json +1 -0
  50. package/graphify-out/cache/ast/v0.9.108-s45-g460503b3f2a4/8def1210ca7df1c5adaa6d61bf71f2e11ca01ebc3ff94fabacf709003f200b8b.json +1 -0
  51. package/graphify-out/cache/ast/v0.9.108-s45-g460503b3f2a4/900d4cdb722e1902c4290e90a974086c4eba207a774b7587a38b0ede1f57c103.json +1 -0
  52. package/graphify-out/cache/ast/v0.9.108-s45-g460503b3f2a4/921ccbb389bc155c99e169a4e5f468d8806266fd0e53754da101785025fc9fce.json +1 -0
  53. package/graphify-out/cache/ast/v0.9.108-s45-g460503b3f2a4/99df5157a64d630b4ce57b0ab9f361d128badc17950233f51d584d8ab4e508f5.json +1 -0
  54. package/graphify-out/cache/ast/v0.9.108-s45-g460503b3f2a4/9a22abb0c6e8377b47387564ed38cf500e4269a5a1f0d195cd6c998aed9a7b61.json +1 -0
  55. package/graphify-out/cache/ast/v0.9.108-s45-g460503b3f2a4/9b81fc1dd7bb2dd1a55f0ed0662f596c1143d82952e2ac130304148201459ac5.json +1 -0
  56. package/graphify-out/cache/ast/v0.9.108-s45-g460503b3f2a4/9e6d299cbc85dee4ebdc75fd63622ddb880fea951e7ab042d65f130f67cd909c.json +1 -0
  57. package/graphify-out/cache/ast/v0.9.108-s45-g460503b3f2a4/b0a6be035aa7e3542e91cc04e9a603cb36a365f07226eab1866912cc3b9e774e.json +1 -0
  58. package/graphify-out/cache/ast/v0.9.108-s45-g460503b3f2a4/c37392ffea17fa391016c1d44db36169f3a6563de1d272e7e9a32c7d3814035f.json +1 -0
  59. package/graphify-out/cache/ast/v0.9.108-s45-g460503b3f2a4/c698a4e0df28e868bf3ce3547cd5144ff5336dbded6fb92646c517950c2b7a32.json +1 -0
  60. package/graphify-out/cache/ast/v0.9.108-s45-g460503b3f2a4/e49652b2c1c4921d955e7e22364f928c79ff9fbe332982acbdc9caf8921bed8b.json +1 -0
  61. package/graphify-out/cache/ast/v0.9.108-s45-g460503b3f2a4/f057a3e4987d66fa18b0868dad26158ee152e0ff06790be37ff4e6e22ffd9cff.json +1 -0
  62. package/graphify-out/cache/ast/v0.9.108-s45-g460503b3f2a4/fb385b3957c22c09f9f6c2dde66f28f3193b56209c50bd062fa8d52fd3e1196a.json +1 -0
  63. package/graphify-out/cache/last_query_stamp +1 -0
  64. package/graphify-out/cache/stat-index.json +1 -0
  65. package/graphify-out/graph.html +477 -0
  66. package/graphify-out/graph.json +1 -0
  67. package/graphify-out/manifest.json +8146 -0
  68. package/oda/components/layouts/app-layout/app-layout.js +1 -1
  69. package/package.json +1 -1
  70. package/sources/host/auto-updater.js +0 -1
  71. package/sources/modules/agent/extensions.js +2 -0
  72. package/sources/modules/agent/index.js +4 -2
  73. package/sources/modules/agent/loop.js +3 -3
  74. package/sources/modules/agent/mcp-pool.js +2 -0
  75. package/sources/modules/agent/node-rules.js +1 -2
  76. package/sources/modules/agent/permissions.js +5 -5
  77. package/sources/modules/agent/scheduler.js +13 -2
  78. package/sources/modules/agent/scope.js +2 -2
  79. package/sources/modules/agent/session.js +5 -2
  80. package/sources/modules/agent/taint.js +4 -0
  81. package/sources/modules/agent/tools/browser.js +2 -1
  82. package/sources/modules/agent/tools/tool-groups.js +9 -9
  83. package/sources/modules/agent/triggers.js +5 -3
  84. package/sources/page.html +12 -2
  85. package/#system/auto-update.json.4727984.tmp +0 -15
  86. package/#system/license-base-WORK-PAK-BED9C508.lic.json.4714304.tmp +0 -0
@@ -429,7 +429,7 @@ ODA({is: 'app-tabs',
429
429
  .tab-action-btn {
430
430
  margin: 4px;
431
431
  flex-shrink: 0;
432
- overflow: visible;
432
+ overflow: hidden;
433
433
  text-overflow: ellipsis;
434
434
  }
435
435
  </style>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "odant-work",
3
- "version": "1.0.115",
3
+ "version": "1.0.117",
4
4
  "description": "ODANT-WORK — платформа цифровой организации (встроенная система учёта, документооборот, управление процессами и приватный мультимодальный ИИ)",
5
5
  "type": "module",
6
6
  "main": "sources/work.js",
@@ -524,7 +524,6 @@ const LEGACY_REMOVED_SYSTEM_PATHS = [
524
524
  '$server/$folder/$class/$structure/handlers/pages/form/scheduler',
525
525
  '$server/$folder/$class/$structure/handlers/pages/form/search',
526
526
  '$server/$folder/$class/$structure/handlers/pages/form/staff',
527
- '$server/$folder/$class/$structure/$server/handlers/pages/form/license',
528
527
  '$server/$folder/$class/$structure/$project/handlers/methods/archive',
529
528
  '$server/$folder/$class/$structure/$project/handlers/methods/archive',
530
529
  '$server/$folder/$class/$structure/$server/handlers/methods/npm',
@@ -417,6 +417,8 @@ export async function installExternalSkill(params = {}, ctx = {}) {
417
417
  const hit = hostSkills.find(s => s.id.toLowerCase() === hostId.toLowerCase());
418
418
  if (!hit)
419
419
  throw new Error(`Навык «${hostId}» не найден в локальных каталогах OpenCode / Claude`);
420
+ if (!SKILL_ID_RE.test(hit.id))
421
+ throw new Error('Некорректный идентификатор навыка: ' + hit.id);
420
422
 
421
423
  if (hit.isFolder) {
422
424
  const destFolder = path.join(target.dir, hit.id);
@@ -87,6 +87,7 @@ export function egressToolName(name) {
87
87
  return n === 'web_search' || n === 'web_fetch' || n === 'http_request' || n === 'connections'
88
88
  || n === 'connect_service' || n === 'disconnect_service' || n === 'a2a_call'
89
89
  || n === 'computer_network'
90
+ || n === 'mail_send' || n === 'install_skill' || n === 'git_push' || n === 'generate_image'
90
91
  || n.startsWith('browser_')
91
92
  || n.startsWith('chrome_')
92
93
  || n.startsWith('svc_')
@@ -536,8 +537,9 @@ export async function createEnv({ place, contextPath, session, host, tz, locatio
536
537
  'assign', 'escalate', 'delete',
537
538
  'twin_rule_list', 'twin_rule_save', 'twin_schedule_save', 'twin_system_save', 'twin_security_save',
538
539
  'mail_send', 'mail_draft', 'mail_refresh',
539
- 'dev_write', 'dev_edit', 'dev_patch', 'dev_git', 'dev_shell',
540
- 'shell', 'restart_server', 'os_write', 'os_rm',
540
+ 'write', 'append', 'edit', 'apply_patch',
541
+ 'git_commit', 'git_push', 'git_branch', 'git_checkout', 'lsp_rename', 'run_checks',
542
+ 'shell', 'restart_server', 'os_write', 'os_delete',
541
543
  ]);
542
544
  all = all.filter(t => !t.system && !TWIN_SERVICE_DENY.has(t.name));
543
545
  }
@@ -946,13 +946,13 @@ async function runOne({ entry, tool, it, host, llm, opts, preapproved }) {
946
946
  }
947
947
  entry.status = 'running';
948
948
  const t0 = Date.now();
949
+ // чужое содержимое (даже в ответе-ошибке сервиса): помечаем до вызова, чтобы и ошибка заражала ход
950
+ if (tool.untrusted)
951
+ entry.untrusted = true;
949
952
  await host.save();
950
953
  try {
951
954
  const value = await tool.run(entry.args || {}, ctx);
952
955
  throwIfStopped(host.signal);
953
- // чужое содержимое (даже в ответе-ошибке сервиса): в контексте оборачивается в <untrusted>, ход считается зараженным
954
- if (tool.untrusted)
955
- entry.untrusted = true;
956
956
  if (value && typeof value === 'object' && !Array.isArray(value) && value.error && Object.keys(value).length <= 3) {
957
957
  entry.status = 'error';
958
958
  entry.error = String(value.error);
@@ -104,6 +104,7 @@ function channel(child) {
104
104
  pending.clear();
105
105
  };
106
106
  child.on('error', failAll);
107
+ child.stdin?.on?.('error', () => {});
107
108
  child.on('exit', code => failAll(new Error('процесс MCP завершён (код ' + code + '); stderr: ' + (stderr.trim().slice(-300) || '—'))));
108
109
  function write(obj) {
109
110
  child.stdin.write(JSON.stringify(obj) + '\n');
@@ -125,6 +126,7 @@ function channel(child) {
125
126
  const id = seq++;
126
127
  const timer = setTimeout(() => {
127
128
  pending.delete(id);
129
+ try { child.kill(); } catch {}
128
130
  reject(new Error('таймаут ' + timeout + 'мс; stderr: ' + (stderr.trim().slice(-300) || '—')));
129
131
  }, timeout);
130
132
  pending.set(id, {
@@ -734,7 +734,7 @@ export async function runMailAutoRefresh({ nodes = null } = {}) {
734
734
  for (const item of items) {
735
735
  if (!item || item.id?.[0] === '$') continue;
736
736
  list.push(item);
737
- if (item.type === '$project' || item.type === '$project') {
737
+ if (item.type === '$project') {
738
738
  const sub = (await item.items) || [];
739
739
  for (const child of sub) {
740
740
  if (child && (child.type === '$structure' || child.DATA?.isDepartment) && child.id?.[0] !== '$')
@@ -744,7 +744,6 @@ export async function runMailAutoRefresh({ nodes = null } = {}) {
744
744
  }
745
745
  };
746
746
  await collectTargets('/PROJECTS');
747
- await collectTargets('/PROJECTS');
748
747
  await collectTargets('/USERS');
749
748
  }
750
749
 
@@ -244,6 +244,11 @@ export async function decide(tool, args, ctx) {
244
244
  }
245
245
  if (tool.planSafe)
246
246
  return { verdict: 'allow' };
247
+ const target = typeof tool.target === 'function' ? tool.target(args, ctx) : null;
248
+ const targets = (Array.isArray(target) ? target : [target]).filter(Boolean);
249
+ const hit = targets.find(isProtectedPath);
250
+ if (hit)
251
+ return { verdict: 'ask', noAlways: true, reason: 'изменение системы: ' + hit };
247
252
  const scope = resolveApprovalScope(tool, args, ctx);
248
253
  if (typeof tool.permission === 'function') {
249
254
  const custom = await tool.permission(args, ctx);
@@ -258,11 +263,6 @@ export async function decide(tool, args, ctx) {
258
263
  return custom;
259
264
  }
260
265
  }
261
- const target = typeof tool.target === 'function' ? tool.target(args, ctx) : null;
262
- const targets = (Array.isArray(target) ? target : [target]).filter(Boolean);
263
- const hit = targets.find(isProtectedPath);
264
- if (hit)
265
- return { verdict: 'ask', noAlways: true, reason: 'изменение системы: ' + hit };
266
266
  if (tool.risk === 'danger')
267
267
  return { verdict: 'ask', noAlways: true, reason: 'необратимое или внешнее действие' };
268
268
  if (allowedMatches(host, tool.name, scope))
@@ -471,9 +471,20 @@ export async function runDue(now = Date.now(), runner = defaultRunner) {
471
471
  const due = d.prepare('SELECT * FROM agent_schedules WHERE enabled = 1 AND next <= ? ORDER BY next LIMIT 20').all(now);
472
472
  const done = [];
473
473
  for (const r of due) {
474
- const rule = JSON.parse(r.rule);
475
- const next = nextRun(rule, r.tz, now);
474
+ let rule;
475
+ let next = null;
476
476
  let error = null;
477
+ try {
478
+ rule = JSON.parse(r.rule);
479
+ next = nextRun(rule, r.tz, now);
480
+ }
481
+ catch (e) {
482
+ error = 'Некорректное расписание: ' + String(e?.message || e).slice(0, 450);
483
+ d.prepare('UPDATE agent_schedules SET last = ?, last_error = ?, enabled = 0 WHERE id = ?')
484
+ .run(now, error, r.id);
485
+ done.push({ id: r.id, error });
486
+ continue;
487
+ }
477
488
  try {
478
489
  await runner(r);
479
490
  }
@@ -22,10 +22,10 @@ import { FS } from '../../server/index.js';
22
22
  /** Инструменты, всегда привязанные к корневому WORK (`/`). */
23
23
  const ROOT_ONLY_TOOLS = new Set([
24
24
  'shell', 'restart_server', 'agent_panel', 'plugin',
25
- 'dev_shell',
25
+ 'run_checks',
26
26
  ]);
27
27
 
28
- const ROOT_ONLY_PREFIXES = ['os_', 'net_', 'dev_git', 'dev_check', 'dev_lsp'];
28
+ const ROOT_ONLY_PREFIXES = ['os_', 'net_', 'git_', 'lsp_'];
29
29
 
30
30
  /** Инструменты, которые сами отвечают за диалог/эскалацию/перенос — их не перехватываем. */
31
31
  export const MOVE_EXEMPT_TOOLS = new Set([
@@ -553,7 +553,8 @@ export function taskOwnerUid(file) {
553
553
  * — владельцу задачи или админу WORK. Чтение ленты — как обычно, по правам роли.
554
554
  */
555
555
  async function assertTaskOwner(file, params) {
556
- const owner = taskOwnerUid(file);
556
+ const bodyOwner = String(file?.DATA?.owner || file?.body?.owner || '').toUpperCase();
557
+ const owner = bodyOwner || taskOwnerUid(file);
557
558
  if (!owner)
558
559
  return;
559
560
  const uid = String(params?.session?.uid || '').toUpperCase();
@@ -568,6 +569,8 @@ async function assertTaskOwner(file, params) {
568
569
  /** Запуск петли (фоном). Возвращает сразу; ход работы — событиями и сохранениями. */
569
570
  function start(s, session, file, licenseOpts = {}) {
570
571
  const body = s.body;
572
+ if (!body.owner && session?.uid)
573
+ body.owner = String(session.uid).toUpperCase();
571
574
  s.movedAway = false;
572
575
  s.controller = new AbortController();
573
576
  s.startedAt = Date.now();
@@ -666,8 +669,8 @@ function start(s, session, file, licenseOpts = {}) {
666
669
  body.items.push({ ...u, queued: undefined });
667
670
  }
668
671
  restart = rest.length > 0 && !aborted && body.status !== 'error';
669
- await save(s, session).catch(e => log.debug('task.finalSave', e));
670
672
  s.running = null;
673
+ await save(s, session).catch(e => log.debug('task.finalSave', e));
671
674
  }
672
675
  }
673
676
  if (movedAway)
@@ -31,6 +31,10 @@ export function wrapUntrusted(text, source, nonce = 'x') {
31
31
  /** Имена инструментов с внешним содержимым во всей ленте, включая вложенные ленты субагентов. */
32
32
  export function untrustedNames(items, out = new Set()) {
33
33
  for (const it of items || []) {
34
+ if (it?.type === 'summary' && it.untrusted) {
35
+ out.add('summary');
36
+ continue;
37
+ }
34
38
  if (it?.type !== 'assistant')
35
39
  continue;
36
40
  for (const t of it.tools || []) {
@@ -196,7 +196,8 @@ export const browserTools = [
196
196
  permission: (args, ctx) => {
197
197
  // первое использование секрета на этом компьютере — всегда с подтверждением
198
198
  const key = ownerOf(ctx) + '/' + computerName(args?.name) + '/' + String(args?.secret || '');
199
- if (secretApprovals.get(key) === currentDomain(ctx))
199
+ const dom = currentDomain(ctx);
200
+ if (dom && secretApprovals.get(key) === dom)
200
201
  return { verdict: 'allow' };
201
202
  return {
202
203
  verdict: 'ask', noAlways: true, hideArgs: true,
@@ -148,29 +148,29 @@ export function inferInitialGroups({ place, items } = {}) {
148
148
  .join('\n')
149
149
  .toLowerCase();
150
150
  if (userText) {
151
- if (/\b(?:git|grep|glob|патч|исходник|репозитор|коммит|тест[ыа]?|линтер|sources\/)\b/i.test(userText))
151
+ if (/(?<![а-яёa-z0-9_])(?:git|grep|glob|патч|исходник|репозитор|коммит|тест[ыа]?|линтер|sources\/)(?![а-яёa-z0-9_])/i.test(userText))
152
152
  groups.add('dev');
153
- if (/\b(?:почт|письм|писем|email|e-mail|календар|встреч|событи[еяй])\b/i.test(userText))
153
+ if (/(?<![а-яёa-z0-9_])(?:почт|письм|писем|email|e-mail|календар|встреч|событи[еяй])(?![а-яёa-z0-9_])/i.test(userText))
154
154
  groups.add('calendar_mail');
155
- if (/\b(?:экран|скриншот|песочниц|docker|докер|компьютер)\b/i.test(userText))
155
+ if (/(?<![а-яёa-z0-9_])(?:экран|скриншот|песочниц|docker|докер|компьютер)(?![а-яёa-z0-9_])/i.test(userText))
156
156
  groups.add('computer');
157
- if (/\b(?:браузер|chromium|chrome|хром|открой\s+сайт|на\s+сайте|веб-?страниц)\b/i.test(userText)) {
157
+ if (/(?<![а-яёa-z0-9_])(?:браузер|chromium|chrome|хром|открой\s+сайт|на\s+сайте|веб-?страниц)(?![а-яёa-z0-9_])/i.test(userText)) {
158
158
  groups.add('browser');
159
159
  groups.add('chrome');
160
160
  }
161
- if (/\b(?:excel|xlsx|docx|word|pdf|презентац|pptx|таблиц[уы]\s+импорт|отч[её]т\s+pdf)\b/i.test(userText))
161
+ if (/(?<![а-яёa-z0-9_])(?:excel|xlsx|docx|word|pdf|презентац|pptx|таблиц[уы]\s+импорт|отч[её]т\s+pdf)(?![а-яёa-z0-9_])/i.test(userText))
162
162
  groups.add('docs');
163
- if (/\b(?:класс[аы]?|реквизит|проводк|справочник|каталог|регистр|операци[юия])\b/i.test(userText)) {
163
+ if (/(?<![а-яёa-z0-9_])(?:класс[аы]?|реквизит|проводк|справочник|каталог|регистр|операци[юия])(?![а-яёa-z0-9_])/i.test(userText)) {
164
164
  groups.add('classes');
165
165
  groups.add('accounting');
166
166
  }
167
- if (/\b(?:mcp|1с|сервис|подключен|интеграц|http_request|api)\b/i.test(userText)) {
167
+ if (/(?<![а-яёa-z0-9_])(?:mcp|1с|сервис|подключен|интеграц|http_request|api)(?![а-яёa-z0-9_])/i.test(userText)) {
168
168
  groups.add('services');
169
169
  groups.add('connect');
170
170
  }
171
- if (/\b(?:процесс|порт|сервер|nginx|caddy|systemd|ip|подсет|принтер|сканер|shell|терминал)\b/i.test(userText))
171
+ if (/(?<![а-яёa-z0-9_])(?:процесс|порт|сервер|nginx|caddy|systemd|ip|подсет|принтер|сканер|shell|терминал)(?![а-яёa-z0-9_])/i.test(userText))
172
172
  groups.add('os');
173
- if (/\b(?:расписани|будильник|напомни|каждый\s+день|cron|фонов(?:ый|ую)\s+агент|плагин|навык|картинк|сгенерируй\s+изображ)\b/i.test(userText))
173
+ if (/(?<![а-яёa-z0-9_])(?:расписани|будильник|напомни|каждый\s+день|cron|фонов(?:ый|ую)\s+агент|плагин|навык|картинк|сгенерируй\s+изображ)(?![а-яёa-z0-9_])/i.test(userText))
174
174
  groups.add('agents');
175
175
  }
176
176
  return groups;
@@ -110,10 +110,12 @@ export function renderTriggerTemplate(tpl, scope = {}) {
110
110
  const docsCache = new Map();
111
111
  const DOCS_TTL = 60_000;
112
112
 
113
- export function resetTriggerCache() {
113
+ export function resetTriggerCache(all = false) {
114
114
  docsCache.clear();
115
- history.clear();
116
- cooldowns.clear();
115
+ if (all === true) {
116
+ history.clear();
117
+ cooldowns.clear();
118
+ }
117
119
  }
118
120
 
119
121
  async function cachedDocs(point) {
package/sources/page.html CHANGED
@@ -149,7 +149,7 @@
149
149
  <oda-button ~if="showDevMode && showRebootButton" :disabled="disableButton" raised icon="carbon:reset" :label="buttonText" @click="reboot"></oda-button>
150
150
  <span class="sep" ~if="showDevMode && showUnlicensed">·</span>
151
151
  <div ~if="showUnlicensed">ЛИЦЕНЗИЯ НЕ УСТАНОВЛЕНА (ИИ-агенты отключены)</div>
152
- <oda-button ~if="showUnlicensed" raised icon="carbon:certificate" label="Получить лицензию" @click="openLicenseView"></oda-button>
152
+ <oda-button ~if="showLicenseButton" raised icon="carbon:certificate" label="Получить лицензию" @click="openLicenseView"></oda-button>
153
153
  `,
154
154
  $item: null,
155
155
  disableButton: false,
@@ -200,13 +200,23 @@
200
200
  },
201
201
  async openLicenseView() {
202
202
  const root = this.$item || await WORK.get_item('/');
203
+ const nav = { view: 'system', tab: 'license' };
203
204
  if (typeof window.top?.execute === 'function') {
204
- await window.top.execute(root, { view: 'license' });
205
+ await window.top.execute(root, nav);
205
206
  }
206
207
  else {
208
+ try {
209
+ sessionStorage.setItem('work.form.nav:/', JSON.stringify(nav));
210
+ }
211
+ catch { /* ignore */ }
207
212
  window.top.location.hash = '#/~/handlers/pages/form';
208
213
  }
209
214
  },
215
+ get showLicenseButton() {
216
+ if (!this.showUnlicensed || !this.$item)
217
+ return false;
218
+ return Promise.resolve(this.$item.isBoss).catch(() => false);
219
+ },
210
220
  get showRebootButton(){
211
221
  // только реальный BOSS корня; в DEV права не обходятся — роли читаются напрямую
212
222
  if (!this.$item) return false;
@@ -1,15 +0,0 @@
1
- {
2
- "enabled": true,
3
- "packageName": "odant-work",
4
- "registryUrl": "https://registry.npmjs.org",
5
- "checkIntervalMinutes": 10,
6
- "lastCheckAt": 1796212376069,
7
- "lastUpdateAt": null,
8
- "lastVersionFrom": null,
9
- "lastVersionTo": null,
10
- "latestAvailableVersion": "1.0.97",
11
- "updateAvailable": false,
12
- "lastError": null,
13
- "lastReport": null,
14
- "checkIntervalHours": 6
15
- }