evolcore 0.0.26 → 0.0.28
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.
- package/CHANGELOG.md +36 -0
- package/bin/codex-managed-acl.ps1 +43 -0
- package/dist/agents/baseagent-availability.js +68 -0
- package/dist/agents/baseagent.js +10 -5
- package/dist/agents/claude-runner.js +123 -22
- package/dist/agents/codex/app-server-client.js +70 -26
- package/dist/agents/codex/catalog.js +7 -1
- package/dist/agents/codex-runner.js +363 -421
- package/dist/agents/ecagent-runner.js +170 -25
- package/dist/agents/gemini-runner.js +6 -0
- package/dist/agents/runner-types.js +50 -2
- package/dist/aun/aid/agentmd.js +73 -31
- package/dist/aun/aid/client.js +1 -1
- package/dist/aun/aid/control-aid.js +180 -1
- package/dist/aun/aid/identity.js +3 -3
- package/dist/aun/group/history.js +303 -0
- package/dist/aun/group/identity.js +43 -0
- package/dist/aun/group/index.js +5 -0
- package/dist/aun/{msg/group.js → group/operations.js} +161 -38
- package/dist/aun/{menu-client.js → menu/client.js} +13 -7
- package/dist/aun/menu/index.js +2 -0
- package/dist/aun/menu/transport.js +49 -0
- package/dist/aun/msg/index.js +2 -1
- package/dist/aun/msg/managed-operation.js +84 -18
- package/dist/aun/msg/mention-schema.js +51 -0
- package/dist/aun/msg/p2p.js +13 -8
- package/dist/aun/msg/upload.js +43 -88
- package/dist/aun/outbox.js +29 -7
- package/dist/aun/rpc/client.js +1 -0
- package/dist/aun/storage/client.js +39 -50
- package/dist/channels/aun.js +544 -239
- package/dist/channels/daemon.js +10 -6
- package/dist/cli/agent-command.js +108 -6
- package/dist/cli/agent-create.js +515 -2
- package/dist/cli/agent.js +109 -8
- package/dist/cli/aun-commands.js +191 -42
- package/dist/cli/config.js +8 -5
- package/dist/cli/contact.js +2 -2
- package/dist/cli/ctl-command.js +2 -2
- package/dist/cli/daemon-commands.js +111 -162
- package/dist/cli/diag.js +3 -3
- package/dist/cli/fs-command.js +3 -3
- package/dist/cli/handoff-command.js +6 -6
- package/dist/cli/index.js +8 -2
- package/dist/cli/init.js +34 -1
- package/dist/cli/managed-command-guard.js +2 -1
- package/dist/cli/menu-client.js +13 -5
- package/dist/cli/model.js +3 -3
- package/dist/cli/queue-command.js +2 -2
- package/dist/cli/response.js +2 -2
- package/dist/cli/restart-monitor.js +81 -19
- package/dist/cli/task-command.js +59 -0
- package/dist/cli/task-context.js +97 -49
- package/dist/cli/trigger-command.js +20 -10
- package/dist/config/builtin-roles.js +10 -0
- package/dist/config/config-field-policy.js +11 -0
- package/dist/config/config-manager.js +32 -4
- package/dist/config/config-operation-service.js +20 -5
- package/dist/config/contact-book-store.js +1 -1
- package/dist/config/contact-book.js +1 -1
- package/dist/config/contact-operation-service.js +1 -1
- package/dist/config/peer-role-resolver.js +1 -1
- package/dist/config/resolved-config-op.js +3 -0
- package/dist/config-store.js +1 -1
- package/dist/core/agent-application-service.js +5 -0
- package/dist/core/audit/event-key.js +17 -2
- package/dist/core/audit/log-integrity.js +34 -8
- package/dist/core/auth/agent-delegation.js +48 -14
- package/dist/core/auth/auth-gateway.js +2 -0
- package/dist/core/auth/authorization-audit.js +34 -38
- package/dist/core/auth/operation-authorizer.js +67 -5
- package/dist/core/auth/operation-catalog.js +110 -0
- package/dist/core/auth/remote-access-store.js +115 -9
- package/dist/core/bootstrap-messages.js +66 -7
- package/dist/core/bootstrap-service.js +110 -19
- package/dist/core/command/agent-control.js +88 -7
- package/dist/core/command/agent-storage-menu.js +443 -0
- package/dist/core/command/cli-intent-parser.js +19 -0
- package/dist/core/command/command-handler.js +105 -40
- package/dist/core/command/data-root-resolver.js +273 -0
- package/dist/core/command/diag-service.js +292 -27
- package/dist/core/command/group-menu.js +7 -2
- package/dist/core/command/menu-catalog.js +34 -4
- package/dist/core/command/menu-handler.js +364 -96
- package/dist/core/command/menu-protocol.js +43 -6
- package/dist/core/command/role-menu.js +2 -2
- package/dist/core/command/slash-handler.js +61 -37
- package/dist/core/event-catalog.js +4 -0
- package/dist/core/evolagent-registry.js +28 -2
- package/dist/core/group/invite-service.js +924 -0
- package/dist/core/interaction-router.js +22 -8
- package/dist/core/message/im-renderer.js +94 -16
- package/dist/core/message/message-bridge.js +140 -13
- package/dist/core/message/message-log.js +5 -3
- package/dist/core/message/message-queue.js +73 -41
- package/dist/core/message/response-engine.js +729 -118
- package/dist/core/permission/approval-gateway.js +36 -3
- package/dist/core/permission/ec-command-parser.js +76 -36
- package/dist/core/permission/protected-paths.js +134 -16
- package/dist/core/permission/sandbox-runtime.js +72 -3
- package/dist/core/permission/tool-error-code.js +15 -0
- package/dist/core/permission/tool-policy.js +8 -8
- package/dist/core/relation/peer-identity.js +57 -6
- package/dist/core/relation/shared-data.js +106 -0
- package/dist/core/role/runtime-policy.js +64 -0
- package/dist/core/runtime-lock.js +10 -26
- package/dist/core/session/runner-task-history.js +170 -0
- package/dist/core/session/session-manager.js +38 -6
- package/dist/core/session/session-mapper.js +41 -0
- package/dist/core/session/session-turn-coordinator.js +37 -7
- package/dist/core/session/session-turns.js +48 -7
- package/dist/core/task/task-recovery-service.js +176 -0
- package/dist/core/task/task-resume-operation.js +32 -0
- package/dist/eck/group-rules-sync.js +5 -3
- package/dist/eck/kit-renderer.js +1 -0
- package/dist/index.js +322 -207
- package/dist/ipc.js +141 -15
- package/dist/paths.js +17 -4
- package/dist/product.js +3 -0
- package/dist/trigger/event-source.js +19 -0
- package/dist/trigger/feedback.js +233 -40
- package/dist/trigger/parser.js +55 -5
- package/dist/trigger/patch.js +9 -0
- package/dist/trigger/scheduler.js +30 -4
- package/dist/trigger/validation.js +20 -3
- package/dist/utils/atomic-write.js +98 -0
- package/dist/utils/cross-platform.js +87 -16
- package/dist/utils/ecweb-utils.js +1 -0
- package/dist/utils/error-utils.js +40 -2
- package/dist/utils/logger.js +23 -13
- package/dist/utils/npm-ops.js +119 -4
- package/dist/utils/package-version-info.js +244 -0
- package/dist/utils/tool-summary.js +59 -3
- package/dist/utils/welcome.js +174 -1
- package/dist/utils/windows-shell-trust.js +37 -0
- package/ecagent/dist/harness/agent-harness.js +3 -0
- package/ecagent/dist/harness/session/jsonl-storage.js +21 -2
- package/kits/docs/INDEX.md +0 -6
- package/kits/docs/channels/aun.md +23 -2
- package/kits/docs/channels/feishu.md +1 -1
- package/kits/docs/context-assembly.md +29 -17
- package/kits/docs/evolcore/INDEX.md +8 -3
- package/kits/docs/evolcore/agent-create.md +39 -7
- package/kits/docs/evolcore/agent.md +33 -1
- package/kits/docs/evolcore/aid.md +9 -1
- package/kits/docs/evolcore/config.md +40 -1
- package/kits/docs/evolcore/group-collaboration.md +1 -1
- package/kits/docs/evolcore/group.md +117 -2
- package/kits/docs/evolcore/menu-client.md +16 -0
- package/kits/docs/evolcore/msg.md +3 -0
- package/kits/docs/evolcore/storage.md +3 -0
- package/kits/docs/evolcore/task.md +14 -0
- package/kits/docs/evolcore/trigger.md +51 -3
- package/kits/docs/venues/group.md +5 -0
- package/kits/eck_manifest.json +27 -0
- package/kits/rules/01-overview.md +11 -7
- package/kits/rules/04-relation.md +2 -1
- package/kits/rules/05-venue.md +1 -1
- package/kits/rules/06-channel.md +6 -4
- package/kits/schemas/agent-config.schema.12.json +25 -1
- package/kits/schemas/daemon.schema.6.json +2 -2
- package/kits/schemas/defaults.schema.5.json +1 -1
- package/kits/schemas/relation-config.schema.1.json +1 -1
- package/kits/schemas/relation-config.schema.5.json +1 -1
- package/kits/schemas/role-config.schema.1.json +14 -0
- package/kits/templates/roles/member.json +5 -0
- package/kits/templates/roles/visitor.json +5 -0
- package/kits/templates/system-fragments/baseagent.md +1 -1
- package/kits/templates/system-fragments/bootstrap.md +26 -9
- package/kits/templates/system-fragments/channel.md +8 -44
- package/kits/templates/system-fragments/commands.md +10 -2
- package/kits/templates/system-fragments/group-unread-history.md +7 -0
- package/kits/templates/system-fragments/reply.md +56 -0
- package/package.json +7 -3
- package/dist/aun/group-identity.js +0 -9
- /package/dist/aun/{group-fs-download.js → group/fs-download.js} +0 -0
- /package/dist/aun/{msg/group-index.js → group/index-rpc.js} +0 -0
|
@@ -210,8 +210,8 @@ export class CodexAppServerClient {
|
|
|
210
210
|
}
|
|
211
211
|
return undefined;
|
|
212
212
|
}
|
|
213
|
-
async threadRead(threadId, includeTurns = true) {
|
|
214
|
-
return this.request('thread/read', { threadId, includeTurns });
|
|
213
|
+
async threadRead(threadId, includeTurns = true, timeoutMs) {
|
|
214
|
+
return this.request('thread/read', { threadId, includeTurns }, timeoutMs);
|
|
215
215
|
}
|
|
216
216
|
async threadRollback(threadId, numTurns) {
|
|
217
217
|
return this.request('thread/rollback', { threadId, numTurns });
|
|
@@ -481,6 +481,12 @@ export class CodexAppServerClient {
|
|
|
481
481
|
const launchCommand = resolveCodexLaunchCommand(args);
|
|
482
482
|
if (!launchCommand)
|
|
483
483
|
throw new Error('Codex CLI not found');
|
|
484
|
+
logger.info(`[CodexAppServer] launch ${JSON.stringify({
|
|
485
|
+
resolvedPath: launchCommand.resolvedPath,
|
|
486
|
+
launcherKind: launchCommand.launcherKind,
|
|
487
|
+
launcherPath: launchCommand.launcherPath,
|
|
488
|
+
codexVersion: this.options.codexVersion ?? null,
|
|
489
|
+
})}`);
|
|
484
490
|
try {
|
|
485
491
|
let command = launchCommand.command;
|
|
486
492
|
let commandArgs = launchCommand.args;
|
|
@@ -509,6 +515,7 @@ export class CodexAppServerClient {
|
|
|
509
515
|
env,
|
|
510
516
|
stdio: ['pipe', 'pipe', 'pipe'],
|
|
511
517
|
windowsHide: process.platform === 'win32',
|
|
518
|
+
windowsVerbatimArguments: launchCommand.windowsVerbatimArguments,
|
|
512
519
|
});
|
|
513
520
|
try {
|
|
514
521
|
this.processRegistrationPath = registerCodexAppServerProcess(this.proc.pid);
|
|
@@ -622,7 +629,7 @@ export class CodexAppServerClient {
|
|
|
622
629
|
env.TMPDIR = managedTmpDir;
|
|
623
630
|
delete env.EVOLCORE_RUNTIME_LOCK_DIR;
|
|
624
631
|
if (managedTmpDir) {
|
|
625
|
-
const runtimeLockDir = path.join(managedTmpDir, '
|
|
632
|
+
const runtimeLockDir = path.join(managedTmpDir, 'locks');
|
|
626
633
|
try {
|
|
627
634
|
// The parent is the already-validated process root, so only create
|
|
628
635
|
// and validate the final component. Never follow a pre-existing
|
|
@@ -768,30 +775,63 @@ export class CodexAppServerClient {
|
|
|
768
775
|
}
|
|
769
776
|
return args;
|
|
770
777
|
}
|
|
771
|
-
async request(method, params) {
|
|
772
|
-
|
|
773
|
-
const
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
const
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
this.
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
778
|
+
async request(method, params, timeoutMs) {
|
|
779
|
+
// Only lifecycle RPCs get short deadlines. Model work has its own policy.
|
|
780
|
+
const deadline = timeoutMs ?? (method === 'turn/interrupt' ? 5_000 : undefined);
|
|
781
|
+
let timer;
|
|
782
|
+
let requestId;
|
|
783
|
+
let expired = false;
|
|
784
|
+
const operation = (async () => {
|
|
785
|
+
await this.ensureReadyFor(method);
|
|
786
|
+
if (expired)
|
|
787
|
+
throw new Error(`Codex ${method} expired before dispatch`);
|
|
788
|
+
const proc = this.proc;
|
|
789
|
+
if (!proc)
|
|
790
|
+
throw new Error('Codex app-server is not running');
|
|
791
|
+
const id = String(this.nextId++);
|
|
792
|
+
requestId = id;
|
|
793
|
+
const payload = { id, method };
|
|
794
|
+
if (params !== undefined && params !== null)
|
|
795
|
+
payload.params = params;
|
|
796
|
+
return new Promise((resolve, reject) => {
|
|
797
|
+
this.pending.set(id, {
|
|
798
|
+
resolve,
|
|
799
|
+
reject,
|
|
800
|
+
method,
|
|
801
|
+
params,
|
|
802
|
+
stderrStartSequence: this.stderrSequence,
|
|
803
|
+
});
|
|
804
|
+
proc.stdin.write(`${JSON.stringify(payload)}\n`, error => {
|
|
805
|
+
if (!error)
|
|
806
|
+
return;
|
|
807
|
+
this.pending.delete(id);
|
|
808
|
+
reject(error);
|
|
809
|
+
});
|
|
793
810
|
});
|
|
794
|
-
});
|
|
811
|
+
})();
|
|
812
|
+
if (deadline === undefined)
|
|
813
|
+
return operation;
|
|
814
|
+
try {
|
|
815
|
+
return await Promise.race([
|
|
816
|
+
operation,
|
|
817
|
+
new Promise((_, reject) => {
|
|
818
|
+
timer = setTimeout(() => {
|
|
819
|
+
expired = true;
|
|
820
|
+
reject(new Error(`Codex ${method} deadline exceeded`));
|
|
821
|
+
}, deadline);
|
|
822
|
+
timer.unref?.();
|
|
823
|
+
}),
|
|
824
|
+
]);
|
|
825
|
+
}
|
|
826
|
+
finally {
|
|
827
|
+
if (timer)
|
|
828
|
+
clearTimeout(timer);
|
|
829
|
+
if (requestId && expired) {
|
|
830
|
+
const pending = this.pending.get(requestId);
|
|
831
|
+
this.pending.delete(requestId);
|
|
832
|
+
pending?.reject(new Error(`Codex ${method} deadline exceeded`));
|
|
833
|
+
}
|
|
834
|
+
}
|
|
795
835
|
}
|
|
796
836
|
respond(id, result) {
|
|
797
837
|
if (!this.proc)
|
|
@@ -870,6 +910,10 @@ export class CodexAppServerClient {
|
|
|
870
910
|
else if (/already has an active writer/i.test(detail)) {
|
|
871
911
|
error.code = CODEX_THREAD_ACTIVE_WRITER;
|
|
872
912
|
}
|
|
913
|
+
else if (pending.method === 'turn/steer' && /\bno active turn\b/i.test(detail)) {
|
|
914
|
+
// Explicit server rejection proves the input was not accepted. Transport errors do not.
|
|
915
|
+
error.code = 'CODEX_NO_ACTIVE_TURN';
|
|
916
|
+
}
|
|
873
917
|
pending.reject(error);
|
|
874
918
|
return;
|
|
875
919
|
}
|
|
@@ -7,7 +7,13 @@ async function cliModels() {
|
|
|
7
7
|
if (!launch)
|
|
8
8
|
return null;
|
|
9
9
|
return new Promise(resolve => {
|
|
10
|
-
execFile(launch.command, launch.args, {
|
|
10
|
+
execFile(launch.command, launch.args, {
|
|
11
|
+
timeout: 3000,
|
|
12
|
+
windowsHide: true,
|
|
13
|
+
windowsVerbatimArguments: launch.windowsVerbatimArguments,
|
|
14
|
+
maxBuffer: 16 * 1024 * 1024,
|
|
15
|
+
encoding: 'utf8',
|
|
16
|
+
}, (error, stdout) => {
|
|
11
17
|
try {
|
|
12
18
|
if (error)
|
|
13
19
|
return resolve(null);
|