evolcore 0.0.22 → 0.0.24

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 (117) hide show
  1. package/CHANGELOG.md +74 -14
  2. package/README.md +4 -0
  3. package/bin/codex-managed-acl.ps1 +160 -0
  4. package/bin/codex-managed-hook.mjs +127 -10
  5. package/bin/ec-safe-output.js +85 -3
  6. package/bin/install-codex-managed-hooks.mjs +384 -95
  7. package/dist/agents/baseagent-availability.js +48 -0
  8. package/dist/agents/baseagent.js +30 -2
  9. package/dist/agents/claude-runner.js +179 -240
  10. package/dist/agents/{codex-app-server-client.js → codex/app-server-client.js} +90 -20
  11. package/dist/{utils/codex-app-server-registry.js → agents/codex/app-server-registry.js} +2 -2
  12. package/dist/agents/codex/catalog.js +70 -0
  13. package/dist/agents/codex/diagnostics.js +369 -0
  14. package/dist/agents/codex-runner.js +839 -192
  15. package/dist/agents/ecagent-runner.js +27 -34
  16. package/dist/agents/gemini-runner.js +62 -8
  17. package/dist/agents/runner-types.js +1 -1
  18. package/dist/aun/aid/managed-operation.js +28 -6
  19. package/dist/aun/aid/store.js +43 -0
  20. package/dist/aun/menu-client.js +272 -0
  21. package/dist/aun/msg/group.js +65 -4
  22. package/dist/aun/msg/index.js +1 -1
  23. package/dist/aun/msg/managed-operation.js +57 -5
  24. package/dist/aun/outbox.js +56 -18
  25. package/dist/aun/rpc/client.js +7 -1
  26. package/dist/channels/aun.js +178 -77
  27. package/dist/channels/daemon.js +7 -1
  28. package/dist/channels/dingtalk.js +1 -0
  29. package/dist/channels/feishu.js +10 -4
  30. package/dist/channels/wechat.js +81 -10
  31. package/dist/channels/wecom.js +2 -1
  32. package/dist/cli/agent-command.js +29 -3
  33. package/dist/cli/agent-create.js +538 -0
  34. package/dist/cli/agent.js +26 -675
  35. package/dist/cli/aun-commands.js +108 -24
  36. package/dist/cli/command-log.js +21 -2
  37. package/dist/cli/ctl-command.js +2 -0
  38. package/dist/cli/daemon-commands.js +289 -61
  39. package/dist/cli/index.js +22 -2
  40. package/dist/cli/init.js +2 -10
  41. package/dist/cli/managed-command-guard.js +3 -0
  42. package/dist/cli/menu-client.js +95 -0
  43. package/dist/cli/model.js +23 -8
  44. package/dist/cli/restart-monitor.js +432 -8
  45. package/dist/cli/stats.js +110 -0
  46. package/dist/cli/task-context.js +12 -2
  47. package/dist/cli/trigger-command.js +9 -1
  48. package/dist/config/builtin-roles.js +2 -0
  49. package/dist/config/schema-migration.js +14 -2
  50. package/dist/core/auth/agent-delegation.js +10 -7
  51. package/dist/core/auth/auth-gateway.js +3 -2
  52. package/dist/core/auth/authorization-audit.js +75 -18
  53. package/dist/core/auth/operation-authorizer.js +63 -3
  54. package/dist/core/auth/operation-catalog.js +14 -2
  55. package/dist/core/auth/remote-access-store.js +136 -0
  56. package/dist/core/baseagent-loader.js +4 -4
  57. package/dist/core/bootstrap-messages.js +39 -18
  58. package/dist/core/bootstrap-service.js +32 -26
  59. package/dist/core/capability/capability-manager.js +8 -4
  60. package/dist/core/capability/providers/codex-capability-provider.js +1 -1
  61. package/dist/core/command/agent-control.js +7 -2
  62. package/dist/core/command/command-handler.js +128 -30
  63. package/dist/core/command/daemon-diagnostics.js +448 -0
  64. package/dist/core/command/menu-catalog.js +6 -1
  65. package/dist/core/command/menu-handler.js +410 -98
  66. package/dist/core/command/menu-protocol.js +123 -0
  67. package/dist/core/command/slash-gate.js +4 -6
  68. package/dist/core/command/slash-handler.js +199 -70
  69. package/dist/core/data-migration.js +5 -15
  70. package/dist/core/event-catalog.js +3 -0
  71. package/dist/core/handoff/runtime.js +3 -1
  72. package/dist/core/handoff/store.js +7 -1
  73. package/dist/core/message/im-renderer.js +13 -6
  74. package/dist/core/message/message-bridge.js +5 -36
  75. package/dist/core/message/message-queue.js +20 -15
  76. package/dist/core/message/message-utils.js +6 -3
  77. package/dist/core/message/response-engine.js +147 -94
  78. package/dist/core/model/catalog-service.js +310 -0
  79. package/dist/core/model/model-catalog.js +134 -334
  80. package/dist/core/model/model-diagnostics.js +4 -5
  81. package/dist/core/model/model-fallback.js +9 -16
  82. package/dist/core/model/model-permission.js +5 -2
  83. package/dist/core/permission/approval-gateway.js +183 -32
  84. package/dist/core/permission/protected-paths.js +63 -4
  85. package/dist/core/permission/sandbox-runtime.js +4 -2
  86. package/dist/core/permission/tool-policy.js +257 -31
  87. package/dist/core/runtime-lock.js +13 -8
  88. package/dist/core/session/adapters/codex-session-file-adapter.js +71 -3
  89. package/dist/core/session/session-manager.js +49 -13
  90. package/dist/core/session/session-renew.js +1 -0
  91. package/dist/index.js +214 -57
  92. package/dist/ipc.js +191 -102
  93. package/dist/paths.js +23 -1
  94. package/dist/stats/billing.js +18 -4
  95. package/dist/trigger/manager.js +3 -1
  96. package/dist/trigger/parser.js +77 -13
  97. package/dist/trigger/patch.js +104 -1
  98. package/dist/utils/atomic-write.js +26 -2
  99. package/dist/utils/cross-platform.js +436 -1
  100. package/dist/utils/ecweb-supervisor.js +11 -2
  101. package/dist/utils/ecweb-utils.js +8 -26
  102. package/dist/utils/error-utils.js +16 -2
  103. package/dist/utils/model-prices.jsonl +23 -20
  104. package/dist/utils/npm-ops.js +70 -15
  105. package/dist/utils/windows-autostart.js +1 -1
  106. package/kits/docs/evolcore/INDEX.md +1 -0
  107. package/kits/docs/evolcore/agent-create.md +13 -0
  108. package/kits/docs/evolcore/group-collaboration.md +7 -2
  109. package/kits/docs/evolcore/menu-client.md +34 -0
  110. package/kits/migrations/migrate-contact-book-v2.mjs +9 -1
  111. package/kits/migrations/migrate-role-config-v4.mjs +11 -5
  112. package/kits/migrations/migrate-role-config-v5.mjs +8 -2
  113. package/kits/templates/roles/admin.json +2 -0
  114. package/kits/templates/roles/visitor.json +1 -0
  115. package/kits/templates/system-fragments/bootstrap.md +8 -1
  116. package/package.json +16 -4
  117. package/dist/utils/codex-cli.js +0 -43
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "evolcore",
3
- "version": "0.0.22",
3
+ "version": "0.0.24",
4
4
  "description": "AI Agent gateway connecting Claude, Codex, Gemini, and the bundled ecagent runner to messaging channels with multi-project session management",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -24,6 +24,7 @@
24
24
  "kits/",
25
25
  "!kits/.kits-version",
26
26
  "*.md",
27
+ "!AGENTS.md",
27
28
  "!CLAUDE.md",
28
29
  "!COMPLETED.md",
29
30
  "!DECISIONS_PENDING.md",
@@ -39,7 +40,7 @@
39
40
  "predev": "npm run build:ecagent",
40
41
  "dev": "tsx watch src/index.ts",
41
42
  "build:ecagent": "npm --prefix ecagent run build",
42
- "build": "npm run build:ecagent && node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && tsc && node -e \"const f='dist/cli/index.js',c=require('fs').readFileSync(f,'utf8');if(!c.startsWith('#!'))require('fs').writeFileSync(f,'#!/usr/bin/env node\\n'+c)\" && node -e \"try{require('child_process').execFileSync('chmod',['+x','dist/cli/index.js'])}catch{}\" && node -e \"require('fs').copyFileSync('src/utils/error-dict.json','dist/utils/error-dict.json');require('fs').copyFileSync('src/utils/model-prices.jsonl','dist/utils/model-prices.jsonl')\" && npm --prefix ecweb run build",
43
+ "build": "npm run build:ecagent && node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && tsc && node -e \"const f='dist/cli/index.js',c=require('fs').readFileSync(f,'utf8');if(!c.startsWith('#!'))require('fs').writeFileSync(f,'#!/usr/bin/env node\\n'+c)\" && node -e \"try{require('child_process').execFileSync('chmod',['+x','dist/cli/index.js'])}catch{}\" && node -e \"for(const f of ['error-dict.json','model-prices.jsonl'])require('fs').copyFileSync('src/utils/'+f,'dist/utils/'+f)\" && npm --prefix ecweb run build",
43
44
  "start": "node dist/index.js",
44
45
  "test": "npm run build && vitest run",
45
46
  "test:watch": "vitest",
@@ -48,7 +49,7 @@
48
49
  "prepublishOnly": "npm test"
49
50
  },
50
51
  "dependencies": {
51
- "@agentunion/fastaun": "0.5.11",
52
+ "@agentunion/fastaun": "0.5.14",
52
53
  "@anthropic-ai/claude-agent-sdk": "0.3.220",
53
54
  "@modelcontextprotocol/sdk": "^1.29.0",
54
55
  "ajv": "^8.20.0",
@@ -58,6 +59,7 @@
58
59
  "image-type": "^6.0.0",
59
60
  "partial-json": "0.1.7",
60
61
  "qrcode-terminal": "^0.12.0",
62
+ "smol-toml": "1.8.0",
61
63
  "typebox": "1.1.38",
62
64
  "ws": "^8.21.0",
63
65
  "yaml": "2.9.0",
@@ -70,6 +72,9 @@
70
72
  "form-data": "^4.0.5",
71
73
  "pure-qqbot": "^2.0.0"
72
74
  },
75
+ "overrides": {
76
+ "qs": "6.16.0"
77
+ },
73
78
  "devDependencies": {
74
79
  "@types/form-data": "^2.2.1",
75
80
  "@types/node": "24.12.4",
@@ -82,5 +87,12 @@
82
87
  },
83
88
  "engines": {
84
89
  "node": ">=22.16.0"
85
- }
90
+ },
91
+ "directories": {
92
+ "doc": "docs",
93
+ "test": "tests"
94
+ },
95
+ "keywords": [],
96
+ "author": "",
97
+ "license": "ISC"
86
98
  }
@@ -1,43 +0,0 @@
1
- import { execFileSync } from 'child_process';
2
- import { isWindows, resolveCommandPath } from './cross-platform.js';
3
- /**
4
- * Resolve the installed Codex CLI entrypoint. npm creates a `.cmd` shim on
5
- * Windows, which is not the same executable as the extensionless Unix shim.
6
- */
7
- export function resolveCodexCliPath() {
8
- return resolveCommandPath('codex');
9
- }
10
- /**
11
- * Build a child-process invocation that works for npm's Windows command shim.
12
- * The options are injectable so platform-specific behavior can be tested on
13
- * non-Windows CI hosts.
14
- */
15
- export function resolveCodexLaunchCommand(args, options = {}) {
16
- const windows = options.isWindows ?? isWindows;
17
- const commandPath = options.commandPath !== undefined
18
- ? options.commandPath
19
- : resolveCodexCliPath();
20
- if (!commandPath)
21
- return null;
22
- if (windows && /\.(cmd|bat)$/i.test(commandPath)) {
23
- return {
24
- command: options.comSpec ?? process.env.ComSpec ?? 'cmd.exe',
25
- args: ['/d', '/s', '/c', commandPath, ...args],
26
- };
27
- }
28
- return { command: commandPath, args };
29
- }
30
- /** Execute a Codex CLI command using the resolved npm shim/path. */
31
- export function execCodexCliSync(args, options) {
32
- const commandPath = resolveCodexCliPath();
33
- if (!commandPath)
34
- throw new Error('Codex CLI not found');
35
- const launchCommand = resolveCodexLaunchCommand(args, { commandPath });
36
- if (!launchCommand)
37
- throw new Error('Codex CLI not found');
38
- return execFileSync(launchCommand.command, launchCommand.args, {
39
- ...(options ?? {}),
40
- // Keep the Windows console policy authoritative for every Codex CLI call.
41
- windowsHide: process.platform === 'win32',
42
- });
43
- }