evolcore 0.0.24 → 0.0.25
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 +578 -561
- package/LICENSE +21 -21
- package/README.md +455 -455
- package/bin/codex-managed-acl.ps1 +160 -160
- package/bin/codex-managed-hook.mjs +208 -208
- package/bin/ec-safe-output.js +327 -327
- package/bin/ec.js +29 -29
- package/bin/install-codex-managed-hooks.mjs +555 -555
- package/dist/agents/claude-runner.js +4 -1
- package/dist/agents/codex-runner.js +7 -4
- package/dist/agents/ecagent-runner.js +14 -13
- package/dist/agents/gemini-runner.js +22 -2
- package/dist/aun/aid/agentmd.js +56 -4
- package/dist/aun/aid/index.js +1 -0
- package/dist/aun/aid/managed-operation.js +53 -1
- package/dist/aun/storage/client.js +4 -1
- package/dist/aun/storage/index.js +1 -1
- package/dist/cli/agent-command.js +186 -87
- package/dist/cli/agent-create.js +42 -4
- package/dist/cli/agent.js +103 -1
- package/dist/cli/aun-commands.js +360 -294
- package/dist/cli/bench.js +20 -20
- package/dist/cli/config.js +20 -20
- package/dist/cli/contact.js +10 -10
- package/dist/cli/ctl-command.js +22 -22
- package/dist/cli/daemon-commands.js +15 -15
- package/dist/cli/fs-command.js +67 -67
- package/dist/cli/handoff-command.js +7 -7
- package/dist/cli/index.js +77 -77
- package/dist/cli/link-rules.js +21 -21
- package/dist/cli/menu-client.js +11 -11
- package/dist/cli/net-check.js +22 -22
- package/dist/cli/queue-command.js +29 -29
- package/dist/cli/response.js +30 -30
- package/dist/cli/restart-monitor.js +30 -30
- package/dist/cli/stats.js +51 -51
- package/dist/cli/trigger-command.js +56 -56
- package/dist/config/builtin-roles.js +1 -0
- package/dist/config/config-manager.js +15 -0
- package/dist/config/config-operation-service.js +20 -3
- package/dist/config/resolved-config-op.js +39 -1
- package/dist/core/auth/operation-authorizer.js +62 -4
- package/dist/core/auth/operation-catalog.js +16 -0
- package/dist/core/command/agent-control.js +54 -25
- package/dist/core/command/cli-intent-parser.js +18 -0
- package/dist/core/command/command-handler.js +91 -16
- package/dist/core/command/menu-catalog.js +1 -0
- package/dist/core/command/menu-handler.js +41 -5
- package/dist/core/command/menu-protocol.js +1 -0
- package/dist/core/command/slash-handler.js +9 -9
- package/dist/core/event-catalog.js +5 -0
- package/dist/core/evolagent.js +3 -3
- package/dist/core/message/response-engine.js +12 -6
- package/dist/core/permission/tool-policy.js +45 -6
- package/dist/index.js +209 -162
- package/dist/stats/db.js +159 -159
- package/dist/stats/eck-vars.js +9 -9
- package/dist/stats/query.js +139 -139
- package/dist/stats/role-budget.js +6 -6
- package/dist/stats/writer.js +51 -51
- package/dist/utils/avatar-upload.js +282 -23
- package/dist/utils/error-dict.json +160 -160
- package/dist/utils/macos-autostart.js +22 -22
- package/dist/utils/model-prices.jsonl +23 -23
- package/dist/utils/welcome.js +22 -22
- package/ecagent/LICENSE +21 -21
- package/ecagent/NOTICE +11 -11
- package/ecagent/README.md +61 -61
- package/ecagent/dist/harness/compaction/branch-summarization.js +30 -30
- package/ecagent/dist/harness/compaction/compaction.js +83 -83
- package/ecagent/dist/harness/messages.js +7 -7
- package/kits/docs/GUIDE.md +20 -20
- package/kits/docs/INDEX.md +66 -66
- package/kits/docs/aun/CHEATSHEET.md +19 -19
- package/kits/docs/aun/SYNC_PROTOCOL.md +15 -15
- package/kits/docs/channels/aun.md +56 -56
- package/kits/docs/channels/feishu.md +56 -56
- package/kits/docs/context-assembly.md +365 -364
- package/kits/docs/eck_templates/GUIDE.template.md +22 -22
- package/kits/docs/eck_templates/INDEX.template.md +28 -28
- package/kits/docs/eck_templates/path-registry.template.md +33 -33
- package/kits/docs/eck_templates/runtime.template.md +19 -19
- package/kits/docs/evolcore/INDEX.md +71 -69
- package/kits/docs/evolcore/agent-create.md +170 -156
- package/kits/docs/evolcore/agent.md +83 -73
- package/kits/docs/evolcore/aid.md +64 -62
- package/kits/docs/evolcore/codex-windows-sandbox.md +146 -0
- package/kits/docs/evolcore/config.md +195 -195
- package/kits/docs/evolcore/contact.md +68 -68
- package/kits/docs/evolcore/ctl.md +46 -46
- package/kits/docs/evolcore/event.md +216 -216
- package/kits/docs/evolcore/fs-architecture.md +1215 -1215
- package/kits/docs/evolcore/fs.md +110 -110
- package/kits/docs/evolcore/group-collaboration.md +243 -243
- package/kits/docs/evolcore/group-fs.md +17 -17
- package/kits/docs/evolcore/group-rules.md +251 -251
- package/kits/docs/evolcore/group.md +152 -152
- package/kits/docs/evolcore/menu-client.md +34 -34
- package/kits/docs/evolcore/model.md +50 -50
- package/kits/docs/evolcore/msg.md +165 -165
- package/kits/docs/evolcore/response.md +75 -75
- package/kits/docs/evolcore/rpc.md +37 -37
- package/kits/docs/evolcore/self-summary.md +29 -29
- package/kits/docs/evolcore/stats.md +83 -83
- package/kits/docs/evolcore/storage.md +50 -50
- package/kits/docs/evolcore/trigger.md +575 -575
- package/kits/docs/identity/AID_PROFILE_SPEC.md +26 -26
- package/kits/docs/identity/PATH_OPS.md +16 -16
- package/kits/docs/identity/ROLE_DETAIL.md +25 -25
- package/kits/docs/identity/identity-tools.md +26 -26
- package/kits/docs/path-registry.md +62 -62
- package/kits/docs/prompt-loading-architecture.md +270 -269
- package/kits/docs/venues/aun-group.md +45 -45
- package/kits/docs/venues/aun-private.md +10 -10
- package/kits/docs/venues/client-desktop.md +10 -10
- package/kits/docs/venues/client-mobile.md +10 -10
- package/kits/docs/venues/feishu-group.md +13 -13
- package/kits/docs/venues/feishu-private.md +9 -9
- package/kits/docs/venues/group.md +25 -25
- package/kits/docs/venues/private.md +10 -10
- package/kits/eck_manifest.auxiliary.json +43 -43
- package/kits/eck_manifest.json +195 -183
- package/kits/eck_message_manifest.json +74 -74
- package/kits/migrations/README-role-config-v4.md +32 -32
- package/kits/migrations/migrate-contact-book-v2.mjs +748 -748
- package/kits/migrations/migrate-role-config-v4.mjs +614 -614
- package/kits/migrations/migrate-role-config-v5.mjs +365 -365
- package/kits/migrations/rename-config-file.mjs +99 -99
- package/kits/rules/01-overview.md +162 -162
- package/kits/rules/02-navigation.md +96 -96
- package/kits/rules/03-identity.md +39 -37
- package/kits/rules/04-relation.md +75 -75
- package/kits/rules/05-venue.md +60 -60
- package/kits/rules/06-channel.md +63 -63
- package/kits/schemas/_meta.json +53 -53
- package/kits/schemas/agent-config.schema.1.json +177 -177
- package/kits/schemas/agent-config.schema.10.json +395 -395
- package/kits/schemas/agent-config.schema.11.json +421 -421
- package/kits/schemas/agent-config.schema.12.json +427 -427
- package/kits/schemas/agent-config.schema.2.json +239 -239
- package/kits/schemas/agent-config.schema.3.json +119 -119
- package/kits/schemas/agent-config.schema.4.json +208 -208
- package/kits/schemas/agent-config.schema.5.json +326 -326
- package/kits/schemas/agent-config.schema.6.json +322 -322
- package/kits/schemas/agent-config.schema.7.json +303 -303
- package/kits/schemas/agent-config.schema.8.json +304 -304
- package/kits/schemas/agent-config.schema.9.json +364 -364
- package/kits/schemas/contact-book.schema.1.json +36 -36
- package/kits/schemas/contact-book.schema.2.json +43 -43
- package/kits/schemas/contact-book.schema.3.json +67 -67
- package/kits/schemas/daemon.schema.1.json +91 -91
- package/kits/schemas/daemon.schema.2.json +101 -101
- package/kits/schemas/daemon.schema.3.json +123 -123
- package/kits/schemas/daemon.schema.4.json +136 -136
- package/kits/schemas/daemon.schema.5.json +135 -135
- package/kits/schemas/daemon.schema.6.json +131 -131
- package/kits/schemas/defaults.schema.1.json +81 -81
- package/kits/schemas/defaults.schema.2.json +85 -85
- package/kits/schemas/defaults.schema.3.json +73 -73
- package/kits/schemas/defaults.schema.4.json +107 -107
- package/kits/schemas/defaults.schema.5.json +119 -119
- package/kits/schemas/menu-exec-schema-commands.md +208 -208
- package/kits/schemas/migrations/README.md +30 -30
- package/kits/schemas/relation-config.schema.1.json +158 -158
- package/kits/schemas/relation-config.schema.2.json +73 -73
- package/kits/schemas/relation-config.schema.3.json +50 -50
- package/kits/schemas/relation-config.schema.4.json +47 -47
- package/kits/schemas/relation-config.schema.5.json +47 -47
- package/kits/schemas/relation-config.schema.6.json +46 -46
- package/kits/schemas/relation-config.schema.7.json +59 -59
- package/kits/schemas/relation-config.schema.8.json +103 -103
- package/kits/schemas/role-config.schema.1.json +201 -201
- package/kits/schemas/role-registry.schema.1.json +35 -35
- package/kits/schemas/single-session.schema.1.json +31 -31
- package/kits/schemas/single-session.schema.2.json +57 -57
- package/kits/schemas/single-session.schema.3.json +32 -32
- package/kits/templates/bootstrap-welcome.md +17 -17
- package/kits/templates/message-fragments/handoff-context-to-target.md +9 -9
- package/kits/templates/message-fragments/handoff-request-to-target.md +19 -19
- package/kits/templates/message-fragments/handoff-response-to-origin.md +9 -9
- package/kits/templates/message-fragments/inject-default.md +2 -2
- package/kits/templates/message-fragments/item.md +2 -2
- package/kits/templates/roles/admin.json +96 -84
- package/kits/templates/roles/member.json +97 -96
- package/kits/templates/roles/owner.json +9 -9
- package/kits/templates/roles/visitor.json +86 -85
- package/kits/templates/system-fragments/baseagent.md +14 -14
- package/kits/templates/system-fragments/bootstrap.md +38 -29
- package/kits/templates/system-fragments/channel.md +64 -64
- package/kits/templates/system-fragments/commands.md +28 -28
- package/kits/templates/system-fragments/identity.md +13 -13
- package/kits/templates/system-fragments/relation.md +19 -19
- package/kits/templates/system-fragments/session.md +59 -59
- package/kits/templates/system-fragments/venue.md +31 -31
- package/package.json +98 -98
- package/skills/eclink/SKILL.md +0 -84
- package/skills/eclink/agents/openai.yaml +0 -4
|
@@ -51,28 +51,28 @@ function createPlist(runtimeRoot) {
|
|
|
51
51
|
const args = [process.execPath, '--no-warnings=ExperimentalWarning', cliEntry, 'start']
|
|
52
52
|
.map(value => ` <string>${xmlLiteral(value)}</string>`)
|
|
53
53
|
.join('\n');
|
|
54
|
-
return `<?xml version="1.0" encoding="UTF-8"?>
|
|
55
|
-
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
56
|
-
<plist version="1.0">
|
|
57
|
-
<dict>
|
|
58
|
-
<key>Label</key>
|
|
59
|
-
<string>${xmlLiteral(MACOS_AUTOSTART_LABEL)}</string>
|
|
60
|
-
<key>ProgramArguments</key>
|
|
61
|
-
<array>
|
|
62
|
-
${args}
|
|
63
|
-
</array>
|
|
64
|
-
<key>EnvironmentVariables</key>
|
|
65
|
-
<dict>
|
|
66
|
-
${environmentXml}
|
|
67
|
-
</dict>
|
|
68
|
-
<key>RunAtLoad</key>
|
|
69
|
-
<true/>
|
|
70
|
-
<key>StandardOutPath</key>
|
|
71
|
-
<string>${xmlLiteral(path.join(absoluteRoot, 'logs', 'autostart.stdout.log'))}</string>
|
|
72
|
-
<key>StandardErrorPath</key>
|
|
73
|
-
<string>${xmlLiteral(path.join(absoluteRoot, 'logs', 'autostart.stderr.log'))}</string>
|
|
74
|
-
</dict>
|
|
75
|
-
</plist>
|
|
54
|
+
return `<?xml version="1.0" encoding="UTF-8"?>
|
|
55
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
56
|
+
<plist version="1.0">
|
|
57
|
+
<dict>
|
|
58
|
+
<key>Label</key>
|
|
59
|
+
<string>${xmlLiteral(MACOS_AUTOSTART_LABEL)}</string>
|
|
60
|
+
<key>ProgramArguments</key>
|
|
61
|
+
<array>
|
|
62
|
+
${args}
|
|
63
|
+
</array>
|
|
64
|
+
<key>EnvironmentVariables</key>
|
|
65
|
+
<dict>
|
|
66
|
+
${environmentXml}
|
|
67
|
+
</dict>
|
|
68
|
+
<key>RunAtLoad</key>
|
|
69
|
+
<true/>
|
|
70
|
+
<key>StandardOutPath</key>
|
|
71
|
+
<string>${xmlLiteral(path.join(absoluteRoot, 'logs', 'autostart.stdout.log'))}</string>
|
|
72
|
+
<key>StandardErrorPath</key>
|
|
73
|
+
<string>${xmlLiteral(path.join(absoluteRoot, 'logs', 'autostart.stderr.log'))}</string>
|
|
74
|
+
</dict>
|
|
75
|
+
</plist>
|
|
76
76
|
`;
|
|
77
77
|
}
|
|
78
78
|
function restorePlist(file, previous) {
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
{"model":"claude-opus-4-8","effective_from":0,"billing_fn":"per_token_v1","currency":"USD","price_input":15,"price_output":75,"price_cache_creation":18.75,"price_cache_read":1.5,"context_window":1000000,"max_input_tokens":900000,"max_output_tokens":32768,"supports_cache":true,"supports_vision":true}
|
|
2
|
-
{"model":"claude-opus-4-7","effective_from":0,"billing_fn":"per_token_v1","currency":"USD","price_input":15,"price_output":75,"price_cache_creation":18.75,"price_cache_read":1.5,"context_window":1000000,"max_input_tokens":900000,"max_output_tokens":32768,"supports_cache":true,"supports_vision":true}
|
|
3
|
-
{"model":"claude-opus-4-6","effective_from":0,"billing_fn":"per_token_v1","currency":"USD","price_input":15,"price_output":75,"price_cache_creation":18.75,"price_cache_read":1.5,"context_window":1000000,"max_input_tokens":900000,"max_output_tokens":32768,"supports_cache":true,"supports_vision":true}
|
|
4
|
-
{"model":"claude-sonnet-4-6","effective_from":0,"billing_fn":"per_token_v1","currency":"USD","price_input":3,"price_output":15,"price_cache_creation":3.75,"price_cache_read":0.3,"context_window":200000,"max_input_tokens":180000,"max_output_tokens":16384,"supports_cache":true,"supports_vision":true}
|
|
5
|
-
{"model":"claude-haiku-4-5-20251001","effective_from":0,"billing_fn":"per_token_v1","currency":"USD","price_input":0.8,"price_output":4,"price_cache_creation":1,"price_cache_read":0.08,"context_window":200000,"max_input_tokens":180000,"max_output_tokens":16384,"supports_cache":true,"supports_vision":false}
|
|
6
|
-
{"model":"gpt-5.6-sol","effective_from":0,"billing_fn":"per_token_v1","currency":"USD","price_input":5,"price_output":30,"price_cache_creation":6.25,"price_cache_read":0.5,"tiers":[{"up_to_input_tokens":272000,"price_input":5,"price_output":30,"price_cache_creation":6.25,"price_cache_read":0.5},{"up_to_input_tokens":null,"price_input":10,"price_output":45,"price_cache_creation":12.5,"price_cache_read":1}],"context_window":200000,"max_input_tokens":180000,"max_output_tokens":16384}
|
|
7
|
-
{"model":"gpt-5.6-terra","effective_from":0,"billing_fn":"per_token_v1","currency":"USD","price_input":2.5,"price_output":15,"price_cache_creation":3.125,"price_cache_read":0.25,"tiers":[{"up_to_input_tokens":272000,"price_input":2.5,"price_output":15,"price_cache_creation":3.125,"price_cache_read":0.25},{"up_to_input_tokens":null,"price_input":5,"price_output":22.5,"price_cache_creation":6.25,"price_cache_read":0.5}],"context_window":200000,"max_input_tokens":180000,"max_output_tokens":16384}
|
|
8
|
-
{"model":"gpt-5.6-luna","effective_from":0,"billing_fn":"per_token_v1","currency":"USD","price_input":1,"price_output":6,"price_cache_creation":1.25,"price_cache_read":0.1,"tiers":[{"up_to_input_tokens":272000,"price_input":1,"price_output":6,"price_cache_creation":1.25,"price_cache_read":0.1},{"up_to_input_tokens":null,"price_input":2,"price_output":9,"price_cache_creation":2.5,"price_cache_read":0.2}],"context_window":200000,"max_input_tokens":180000,"max_output_tokens":16384}
|
|
9
|
-
{"model":"gpt-5.5","effective_from":0,"billing_fn":"per_token_v1","currency":"USD","price_input":5,"price_output":30,"price_cache_creation":0,"price_cache_read":0.5,"tiers":[{"up_to_input_tokens":272000,"price_input":5,"price_output":30,"price_cache_creation":0,"price_cache_read":0.5},{"up_to_input_tokens":null,"price_input":10,"price_output":45,"price_cache_creation":0,"price_cache_read":1}],"context_window":200000,"max_input_tokens":180000,"max_output_tokens":16384}
|
|
10
|
-
{"model":"gpt-5.4","effective_from":0,"billing_fn":"per_token_v1","currency":"USD","price_input":2.5,"price_output":15,"price_cache_creation":0,"price_cache_read":0.25,"tiers":[{"up_to_input_tokens":272000,"price_input":2.5,"price_output":15,"price_cache_creation":0,"price_cache_read":0.25},{"up_to_input_tokens":null,"price_input":5,"price_output":22.5,"price_cache_creation":0,"price_cache_read":0.5}],"context_window":200000,"max_input_tokens":180000,"max_output_tokens":16384}
|
|
11
|
-
{"model":"gpt-5.3-codex","effective_from":0,"billing_fn":"per_token_v1","currency":"USD","price_input":1.75,"price_output":14,"price_cache_creation":0,"price_cache_read":0.175,"context_window":200000,"max_input_tokens":180000,"max_output_tokens":16384}
|
|
12
|
-
{"model":"deepseek-v4-pro","effective_from":0,"billing_fn":"per_token_deepseek_v1","currency":"CNY","price_cache_hit":0.5,"price_cache_miss":2,"price_output":8,"context_window":1000000,"max_input_tokens":950000,"max_output_tokens":8192,"supports_cache":true}
|
|
13
|
-
{"model":"deepseek-v4-flash","effective_from":0,"billing_fn":"per_token_deepseek_v1","currency":"CNY","price_cache_hit":0.1,"price_cache_miss":0.5,"price_output":2,"context_window":1000000,"max_input_tokens":950000,"max_output_tokens":8192,"supports_cache":true}
|
|
14
|
-
{"model":"deepseek-v3.2","effective_from":0,"billing_fn":"per_token_deepseek_v1","currency":"CNY","price_cache_hit":0.5,"price_cache_miss":2,"price_output":8,"context_window":128000,"max_input_tokens":120000,"max_output_tokens":8192,"supports_cache":true}
|
|
15
|
-
{"model":"kimi-k2.6","effective_from":0,"billing_fn":"per_token_v1","currency":"CNY","price_input":2,"price_output":8,"price_cache_creation":0,"price_cache_read":0,"context_window":128000,"max_input_tokens":120000,"max_output_tokens":8192}
|
|
16
|
-
{"model":"kimi-k2.5","effective_from":0,"billing_fn":"per_token_v1","currency":"CNY","price_input":2,"price_output":8,"price_cache_creation":0,"price_cache_read":0,"context_window":128000,"max_input_tokens":120000,"max_output_tokens":8192}
|
|
17
|
-
{"model":"glm-5.1","effective_from":0,"billing_fn":"per_token_v1","currency":"CNY","price_input":5,"price_output":20,"price_cache_creation":0,"price_cache_read":0,"context_window":128000,"max_input_tokens":120000,"max_output_tokens":8192}
|
|
18
|
-
{"model":"glm-5","effective_from":0,"billing_fn":"per_token_v1","currency":"CNY","price_input":5,"price_output":20,"price_cache_creation":0,"price_cache_read":0,"context_window":128000,"max_input_tokens":120000,"max_output_tokens":8192}
|
|
19
|
-
{"model":"glm-4.7","effective_from":0,"billing_fn":"per_token_v1","currency":"CNY","price_input":1,"price_output":5,"price_cache_creation":0,"price_cache_read":0,"context_window":128000,"max_input_tokens":120000,"max_output_tokens":8192}
|
|
20
|
-
{"model":"MiniMax-M2.7","effective_from":0,"billing_fn":"per_token_v1","currency":"CNY","price_input":1,"price_output":5,"price_cache_creation":0,"price_cache_read":0,"context_window":128000,"max_input_tokens":120000,"max_output_tokens":8192}
|
|
21
|
-
{"model":"claude-opus-5","effective_from":0,"context_window":1000000,"max_input_tokens":900000,"max_output_tokens":131072,"supports_cache":true,"supports_vision":true}
|
|
22
|
-
{"model":"claude-sonnet-5","effective_from":0,"context_window":1000000,"max_input_tokens":900000,"max_output_tokens":131072,"supports_cache":true,"supports_vision":true}
|
|
23
|
-
{"model":"claude-fable-5","effective_from":0,"context_window":1000000,"max_input_tokens":900000,"max_output_tokens":131072,"supports_cache":true,"supports_vision":true}
|
|
1
|
+
{"model":"claude-opus-4-8","effective_from":0,"billing_fn":"per_token_v1","currency":"USD","price_input":15,"price_output":75,"price_cache_creation":18.75,"price_cache_read":1.5,"context_window":1000000,"max_input_tokens":900000,"max_output_tokens":32768,"supports_cache":true,"supports_vision":true}
|
|
2
|
+
{"model":"claude-opus-4-7","effective_from":0,"billing_fn":"per_token_v1","currency":"USD","price_input":15,"price_output":75,"price_cache_creation":18.75,"price_cache_read":1.5,"context_window":1000000,"max_input_tokens":900000,"max_output_tokens":32768,"supports_cache":true,"supports_vision":true}
|
|
3
|
+
{"model":"claude-opus-4-6","effective_from":0,"billing_fn":"per_token_v1","currency":"USD","price_input":15,"price_output":75,"price_cache_creation":18.75,"price_cache_read":1.5,"context_window":1000000,"max_input_tokens":900000,"max_output_tokens":32768,"supports_cache":true,"supports_vision":true}
|
|
4
|
+
{"model":"claude-sonnet-4-6","effective_from":0,"billing_fn":"per_token_v1","currency":"USD","price_input":3,"price_output":15,"price_cache_creation":3.75,"price_cache_read":0.3,"context_window":200000,"max_input_tokens":180000,"max_output_tokens":16384,"supports_cache":true,"supports_vision":true}
|
|
5
|
+
{"model":"claude-haiku-4-5-20251001","effective_from":0,"billing_fn":"per_token_v1","currency":"USD","price_input":0.8,"price_output":4,"price_cache_creation":1,"price_cache_read":0.08,"context_window":200000,"max_input_tokens":180000,"max_output_tokens":16384,"supports_cache":true,"supports_vision":false}
|
|
6
|
+
{"model":"gpt-5.6-sol","effective_from":0,"billing_fn":"per_token_v1","currency":"USD","price_input":5,"price_output":30,"price_cache_creation":6.25,"price_cache_read":0.5,"tiers":[{"up_to_input_tokens":272000,"price_input":5,"price_output":30,"price_cache_creation":6.25,"price_cache_read":0.5},{"up_to_input_tokens":null,"price_input":10,"price_output":45,"price_cache_creation":12.5,"price_cache_read":1}],"context_window":200000,"max_input_tokens":180000,"max_output_tokens":16384}
|
|
7
|
+
{"model":"gpt-5.6-terra","effective_from":0,"billing_fn":"per_token_v1","currency":"USD","price_input":2.5,"price_output":15,"price_cache_creation":3.125,"price_cache_read":0.25,"tiers":[{"up_to_input_tokens":272000,"price_input":2.5,"price_output":15,"price_cache_creation":3.125,"price_cache_read":0.25},{"up_to_input_tokens":null,"price_input":5,"price_output":22.5,"price_cache_creation":6.25,"price_cache_read":0.5}],"context_window":200000,"max_input_tokens":180000,"max_output_tokens":16384}
|
|
8
|
+
{"model":"gpt-5.6-luna","effective_from":0,"billing_fn":"per_token_v1","currency":"USD","price_input":1,"price_output":6,"price_cache_creation":1.25,"price_cache_read":0.1,"tiers":[{"up_to_input_tokens":272000,"price_input":1,"price_output":6,"price_cache_creation":1.25,"price_cache_read":0.1},{"up_to_input_tokens":null,"price_input":2,"price_output":9,"price_cache_creation":2.5,"price_cache_read":0.2}],"context_window":200000,"max_input_tokens":180000,"max_output_tokens":16384}
|
|
9
|
+
{"model":"gpt-5.5","effective_from":0,"billing_fn":"per_token_v1","currency":"USD","price_input":5,"price_output":30,"price_cache_creation":0,"price_cache_read":0.5,"tiers":[{"up_to_input_tokens":272000,"price_input":5,"price_output":30,"price_cache_creation":0,"price_cache_read":0.5},{"up_to_input_tokens":null,"price_input":10,"price_output":45,"price_cache_creation":0,"price_cache_read":1}],"context_window":200000,"max_input_tokens":180000,"max_output_tokens":16384}
|
|
10
|
+
{"model":"gpt-5.4","effective_from":0,"billing_fn":"per_token_v1","currency":"USD","price_input":2.5,"price_output":15,"price_cache_creation":0,"price_cache_read":0.25,"tiers":[{"up_to_input_tokens":272000,"price_input":2.5,"price_output":15,"price_cache_creation":0,"price_cache_read":0.25},{"up_to_input_tokens":null,"price_input":5,"price_output":22.5,"price_cache_creation":0,"price_cache_read":0.5}],"context_window":200000,"max_input_tokens":180000,"max_output_tokens":16384}
|
|
11
|
+
{"model":"gpt-5.3-codex","effective_from":0,"billing_fn":"per_token_v1","currency":"USD","price_input":1.75,"price_output":14,"price_cache_creation":0,"price_cache_read":0.175,"context_window":200000,"max_input_tokens":180000,"max_output_tokens":16384}
|
|
12
|
+
{"model":"deepseek-v4-pro","effective_from":0,"billing_fn":"per_token_deepseek_v1","currency":"CNY","price_cache_hit":0.5,"price_cache_miss":2,"price_output":8,"context_window":1000000,"max_input_tokens":950000,"max_output_tokens":8192,"supports_cache":true}
|
|
13
|
+
{"model":"deepseek-v4-flash","effective_from":0,"billing_fn":"per_token_deepseek_v1","currency":"CNY","price_cache_hit":0.1,"price_cache_miss":0.5,"price_output":2,"context_window":1000000,"max_input_tokens":950000,"max_output_tokens":8192,"supports_cache":true}
|
|
14
|
+
{"model":"deepseek-v3.2","effective_from":0,"billing_fn":"per_token_deepseek_v1","currency":"CNY","price_cache_hit":0.5,"price_cache_miss":2,"price_output":8,"context_window":128000,"max_input_tokens":120000,"max_output_tokens":8192,"supports_cache":true}
|
|
15
|
+
{"model":"kimi-k2.6","effective_from":0,"billing_fn":"per_token_v1","currency":"CNY","price_input":2,"price_output":8,"price_cache_creation":0,"price_cache_read":0,"context_window":128000,"max_input_tokens":120000,"max_output_tokens":8192}
|
|
16
|
+
{"model":"kimi-k2.5","effective_from":0,"billing_fn":"per_token_v1","currency":"CNY","price_input":2,"price_output":8,"price_cache_creation":0,"price_cache_read":0,"context_window":128000,"max_input_tokens":120000,"max_output_tokens":8192}
|
|
17
|
+
{"model":"glm-5.1","effective_from":0,"billing_fn":"per_token_v1","currency":"CNY","price_input":5,"price_output":20,"price_cache_creation":0,"price_cache_read":0,"context_window":128000,"max_input_tokens":120000,"max_output_tokens":8192}
|
|
18
|
+
{"model":"glm-5","effective_from":0,"billing_fn":"per_token_v1","currency":"CNY","price_input":5,"price_output":20,"price_cache_creation":0,"price_cache_read":0,"context_window":128000,"max_input_tokens":120000,"max_output_tokens":8192}
|
|
19
|
+
{"model":"glm-4.7","effective_from":0,"billing_fn":"per_token_v1","currency":"CNY","price_input":1,"price_output":5,"price_cache_creation":0,"price_cache_read":0,"context_window":128000,"max_input_tokens":120000,"max_output_tokens":8192}
|
|
20
|
+
{"model":"MiniMax-M2.7","effective_from":0,"billing_fn":"per_token_v1","currency":"CNY","price_input":1,"price_output":5,"price_cache_creation":0,"price_cache_read":0,"context_window":128000,"max_input_tokens":120000,"max_output_tokens":8192}
|
|
21
|
+
{"model":"claude-opus-5","effective_from":0,"context_window":1000000,"max_input_tokens":900000,"max_output_tokens":131072,"supports_cache":true,"supports_vision":true}
|
|
22
|
+
{"model":"claude-sonnet-5","effective_from":0,"context_window":1000000,"max_input_tokens":900000,"max_output_tokens":131072,"supports_cache":true,"supports_vision":true}
|
|
23
|
+
{"model":"claude-fable-5","effective_from":0,"context_window":1000000,"max_input_tokens":900000,"max_output_tokens":131072,"supports_cache":true,"supports_vision":true}
|
package/dist/utils/welcome.js
CHANGED
|
@@ -31,23 +31,23 @@ export function generateWelcomeMessage(options) {
|
|
|
31
31
|
const bindingNote = options.includeBindingNote
|
|
32
32
|
? `\n\n🔐 **绑定说明**:\n- 这条消息表示您的设备已和此 Agent 绑定\n- 只有您能看到和使用这个 Agent\n- AUN 提供端到端加密和跨设备同步`
|
|
33
33
|
: '';
|
|
34
|
-
return `🎉 欢迎使用 EvolCore!
|
|
35
|
-
|
|
36
|
-
${greeting}
|
|
37
|
-
|
|
38
|
-
${agentIntro}${channelInfo}
|
|
39
|
-
|
|
40
|
-
📋 **日常使用方法**:
|
|
41
|
-
|
|
42
|
-
1. **查看帮助**:发送 \`/help\` 查看所有可用命令
|
|
43
|
-
2. **查看状态**:发送 \`/status\` 查看当前会话状态
|
|
44
|
-
3. **会话管理**:发送 \`/session\` 查看和切换会话
|
|
45
|
-
|
|
46
|
-
💡 **提示**:
|
|
47
|
-
- 直接发送消息即可与 Claude/Codex 对话
|
|
48
|
-
- 支持多会话管理,每个会话独立上下文
|
|
49
|
-
- 所有命令以 \`/\` 开头${channelSpecificNote}${bindingNote}
|
|
50
|
-
|
|
34
|
+
return `🎉 欢迎使用 EvolCore!
|
|
35
|
+
|
|
36
|
+
${greeting}
|
|
37
|
+
|
|
38
|
+
${agentIntro}${channelInfo}
|
|
39
|
+
|
|
40
|
+
📋 **日常使用方法**:
|
|
41
|
+
|
|
42
|
+
1. **查看帮助**:发送 \`/help\` 查看所有可用命令
|
|
43
|
+
2. **查看状态**:发送 \`/status\` 查看当前会话状态
|
|
44
|
+
3. **会话管理**:发送 \`/session\` 查看和切换会话
|
|
45
|
+
|
|
46
|
+
💡 **提示**:
|
|
47
|
+
- 直接发送消息即可与 Claude/Codex 对话
|
|
48
|
+
- 支持多会话管理,每个会话独立上下文
|
|
49
|
+
- 所有命令以 \`/\` 开头${channelSpecificNote}${bindingNote}
|
|
50
|
+
|
|
51
51
|
现在就可以开始工作了!`;
|
|
52
52
|
}
|
|
53
53
|
/**
|
|
@@ -65,25 +65,25 @@ export function generateInitSuccessMessage(channelType, hasOwner) {
|
|
|
65
65
|
const channelName = getChannelDescription(channelType);
|
|
66
66
|
// AUN 在 connect 时向 owner 发送欢迎消息
|
|
67
67
|
if (hasOwner && channelType === 'aun') {
|
|
68
|
-
return `\n💡 提示:首次启动时会向 owner 发送欢迎消息
|
|
68
|
+
return `\n💡 提示:首次启动时会向 owner 发送欢迎消息
|
|
69
69
|
启动服务: ec start`;
|
|
70
70
|
}
|
|
71
71
|
// Feishu 虽然有 owner,但已改为首次交互发送(与其他 IM 统一)
|
|
72
72
|
if (hasOwner && channelType === 'feishu') {
|
|
73
|
-
return `\n💡 提示:首次用户交互时会发送欢迎消息
|
|
73
|
+
return `\n💡 提示:首次用户交互时会发送欢迎消息
|
|
74
74
|
启动服务: ec start`;
|
|
75
75
|
}
|
|
76
76
|
// 其他 IM 渠道:首次交互发送
|
|
77
77
|
if (hasOwner) {
|
|
78
|
-
return `\n💡 提示:${channelName}渠道已配置
|
|
78
|
+
return `\n💡 提示:${channelName}渠道已配置
|
|
79
79
|
启动服务: ec start`;
|
|
80
80
|
}
|
|
81
81
|
const ownerHint = channelType === 'aun'
|
|
82
82
|
? ` 配置 owner: ec init ${channelType}`
|
|
83
83
|
: ' 配置 owner: 在 agent config.json 的 owners 中写入 AID;非 AUN 渠道身份写入 contact.json';
|
|
84
84
|
// 无 owner 的渠道
|
|
85
|
-
return `\n💡 提示:${channelName}渠道已配置
|
|
86
|
-
启动服务: ec start
|
|
85
|
+
return `\n💡 提示:${channelName}渠道已配置
|
|
86
|
+
启动服务: ec start
|
|
87
87
|
${ownerHint}`;
|
|
88
88
|
}
|
|
89
89
|
/**
|
package/ecagent/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 Mario Zechner
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Mario Zechner
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/ecagent/NOTICE
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
This distribution contains modified packaging of @earendil-works/pi-agent-core.
|
|
2
|
-
|
|
3
|
-
Upstream project: https://github.com/earendil-works/pi
|
|
4
|
-
Upstream version: 0.80.7
|
|
5
|
-
Upstream commit: 818d67457cdd6b60bce6b121d16b23141c252dd8
|
|
6
|
-
|
|
7
|
-
Modification: TypeScript sources from @earendil-works/pi-agent-core and the
|
|
8
|
-
provider-free protocol subset of @earendil-works/pi-ai are maintained together
|
|
9
|
-
in this package. Provider SDK implementations and dependencies are excluded.
|
|
10
|
-
Callers supply a custom model stream function or use the included pi-messages
|
|
11
|
-
protocol runtime.
|
|
1
|
+
This distribution contains modified packaging of @earendil-works/pi-agent-core.
|
|
2
|
+
|
|
3
|
+
Upstream project: https://github.com/earendil-works/pi
|
|
4
|
+
Upstream version: 0.80.7
|
|
5
|
+
Upstream commit: 818d67457cdd6b60bce6b121d16b23141c252dd8
|
|
6
|
+
|
|
7
|
+
Modification: TypeScript sources from @earendil-works/pi-agent-core and the
|
|
8
|
+
provider-free protocol subset of @earendil-works/pi-ai are maintained together
|
|
9
|
+
in this package. Provider SDK implementations and dependencies are excluded.
|
|
10
|
+
Callers supply a custom model stream function or use the included pi-messages
|
|
11
|
+
protocol runtime.
|
package/ecagent/README.md
CHANGED
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
# ecagent
|
|
2
|
-
|
|
3
|
-
`ecagent` is an unofficial lightweight distribution of
|
|
4
|
-
[`@earendil-works/pi-agent-core`](https://github.com/earendil-works/pi). It
|
|
5
|
-
includes the Pi agent loop, tools, sessions, compaction, skills, and execution
|
|
6
|
-
environment abstractions together with an embedded provider-free model runtime.
|
|
7
|
-
The published package includes both the TypeScript source in `src/` and the
|
|
8
|
-
compiled ESM output in `dist/`.
|
|
9
|
-
|
|
10
|
-
## Install
|
|
11
|
-
|
|
12
|
-
```bash
|
|
13
|
-
npm install ecagent
|
|
14
|
-
|
|
15
|
-
# Or install it globally for a shared Node.js runtime
|
|
16
|
-
npm install --global ecagent
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
Supply a custom model stream function. No model provider SDK is installed by
|
|
20
|
-
default:
|
|
21
|
-
|
|
22
|
-
```typescript
|
|
23
|
-
import { Agent } from "ecagent";
|
|
24
|
-
|
|
25
|
-
const agent = new Agent({
|
|
26
|
-
initialState: {
|
|
27
|
-
model,
|
|
28
|
-
systemPrompt: "You are a coding agent.",
|
|
29
|
-
},
|
|
30
|
-
streamFn: evolcoreModelStream,
|
|
31
|
-
});
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
The `streamFn` must implement the Pi stream contract exported by
|
|
35
|
-
`ecagent/runtime`:
|
|
36
|
-
|
|
37
|
-
```typescript
|
|
38
|
-
import { AssistantMessageEventStream } from "ecagent/runtime";
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
EvolCore uses this boundary to connect its own credentials, gateway, streaming,
|
|
42
|
-
and abort handling.
|
|
43
|
-
|
|
44
|
-
## Build from source
|
|
45
|
-
|
|
46
|
-
```bash
|
|
47
|
-
npm install
|
|
48
|
-
npm run build
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
The build runs TypeScript directly over the checked-in source. It does not
|
|
52
|
-
download precompiled upstream artifacts.
|
|
53
|
-
|
|
54
|
-
## Upstream
|
|
55
|
-
|
|
56
|
-
- Package: `@earendil-works/pi-agent-core@0.80.7`
|
|
57
|
-
- Runtime: `@earendil-works/pi-ai@0.80.7`
|
|
58
|
-
- Commit: `818d67457cdd6b60bce6b121d16b23141c252dd8`
|
|
59
|
-
- License: MIT
|
|
60
|
-
|
|
61
|
-
This package is not affiliated with or endorsed by the Pi maintainers.
|
|
1
|
+
# ecagent
|
|
2
|
+
|
|
3
|
+
`ecagent` is an unofficial lightweight distribution of
|
|
4
|
+
[`@earendil-works/pi-agent-core`](https://github.com/earendil-works/pi). It
|
|
5
|
+
includes the Pi agent loop, tools, sessions, compaction, skills, and execution
|
|
6
|
+
environment abstractions together with an embedded provider-free model runtime.
|
|
7
|
+
The published package includes both the TypeScript source in `src/` and the
|
|
8
|
+
compiled ESM output in `dist/`.
|
|
9
|
+
|
|
10
|
+
## Install
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm install ecagent
|
|
14
|
+
|
|
15
|
+
# Or install it globally for a shared Node.js runtime
|
|
16
|
+
npm install --global ecagent
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Supply a custom model stream function. No model provider SDK is installed by
|
|
20
|
+
default:
|
|
21
|
+
|
|
22
|
+
```typescript
|
|
23
|
+
import { Agent } from "ecagent";
|
|
24
|
+
|
|
25
|
+
const agent = new Agent({
|
|
26
|
+
initialState: {
|
|
27
|
+
model,
|
|
28
|
+
systemPrompt: "You are a coding agent.",
|
|
29
|
+
},
|
|
30
|
+
streamFn: evolcoreModelStream,
|
|
31
|
+
});
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
The `streamFn` must implement the Pi stream contract exported by
|
|
35
|
+
`ecagent/runtime`:
|
|
36
|
+
|
|
37
|
+
```typescript
|
|
38
|
+
import { AssistantMessageEventStream } from "ecagent/runtime";
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
EvolCore uses this boundary to connect its own credentials, gateway, streaming,
|
|
42
|
+
and abort handling.
|
|
43
|
+
|
|
44
|
+
## Build from source
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
npm install
|
|
48
|
+
npm run build
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
The build runs TypeScript directly over the checked-in source. It does not
|
|
52
|
+
download precompiled upstream artifacts.
|
|
53
|
+
|
|
54
|
+
## Upstream
|
|
55
|
+
|
|
56
|
+
- Package: `@earendil-works/pi-agent-core@0.80.7`
|
|
57
|
+
- Runtime: `@earendil-works/pi-ai@0.80.7`
|
|
58
|
+
- Commit: `818d67457cdd6b60bce6b121d16b23141c252dd8`
|
|
59
|
+
- License: MIT
|
|
60
|
+
|
|
61
|
+
This package is not affiliated with or endorsed by the Pi maintainers.
|
|
@@ -90,37 +90,37 @@ export function prepareBranchEntries(entries, tokenBudget = 0) {
|
|
|
90
90
|
}
|
|
91
91
|
return { messages, fileOps, totalTokens };
|
|
92
92
|
}
|
|
93
|
-
const BRANCH_SUMMARY_PREAMBLE = `The user explored a different conversation branch before returning here.
|
|
94
|
-
Summary of that exploration:
|
|
95
|
-
|
|
93
|
+
const BRANCH_SUMMARY_PREAMBLE = `The user explored a different conversation branch before returning here.
|
|
94
|
+
Summary of that exploration:
|
|
95
|
+
|
|
96
96
|
`;
|
|
97
|
-
const BRANCH_SUMMARY_PROMPT = `Create a structured summary of this conversation branch for context when returning later.
|
|
98
|
-
|
|
99
|
-
Use this EXACT format:
|
|
100
|
-
|
|
101
|
-
## Goal
|
|
102
|
-
[What was the user trying to accomplish in this branch?]
|
|
103
|
-
|
|
104
|
-
## Constraints & Preferences
|
|
105
|
-
- [Any constraints, preferences, or requirements mentioned]
|
|
106
|
-
- [Or "(none)" if none were mentioned]
|
|
107
|
-
|
|
108
|
-
## Progress
|
|
109
|
-
### Done
|
|
110
|
-
- [x] [Completed tasks/changes]
|
|
111
|
-
|
|
112
|
-
### In Progress
|
|
113
|
-
- [ ] [Work that was started but not finished]
|
|
114
|
-
|
|
115
|
-
### Blocked
|
|
116
|
-
- [Issues preventing progress, if any]
|
|
117
|
-
|
|
118
|
-
## Key Decisions
|
|
119
|
-
- **[Decision]**: [Brief rationale]
|
|
120
|
-
|
|
121
|
-
## Next Steps
|
|
122
|
-
1. [What should happen next to continue this work]
|
|
123
|
-
|
|
97
|
+
const BRANCH_SUMMARY_PROMPT = `Create a structured summary of this conversation branch for context when returning later.
|
|
98
|
+
|
|
99
|
+
Use this EXACT format:
|
|
100
|
+
|
|
101
|
+
## Goal
|
|
102
|
+
[What was the user trying to accomplish in this branch?]
|
|
103
|
+
|
|
104
|
+
## Constraints & Preferences
|
|
105
|
+
- [Any constraints, preferences, or requirements mentioned]
|
|
106
|
+
- [Or "(none)" if none were mentioned]
|
|
107
|
+
|
|
108
|
+
## Progress
|
|
109
|
+
### Done
|
|
110
|
+
- [x] [Completed tasks/changes]
|
|
111
|
+
|
|
112
|
+
### In Progress
|
|
113
|
+
- [ ] [Work that was started but not finished]
|
|
114
|
+
|
|
115
|
+
### Blocked
|
|
116
|
+
- [Issues preventing progress, if any]
|
|
117
|
+
|
|
118
|
+
## Key Decisions
|
|
119
|
+
- **[Decision]**: [Brief rationale]
|
|
120
|
+
|
|
121
|
+
## Next Steps
|
|
122
|
+
1. [What should happen next to continue this work]
|
|
123
|
+
|
|
124
124
|
Keep each section concise. Preserve exact file paths, function names, and error messages.`;
|
|
125
125
|
/** Generate a summary for abandoned branch entries. */
|
|
126
126
|
export async function generateBranchSummary(entries, options) {
|
|
@@ -281,78 +281,78 @@ export function findCutPoint(entries, startIndex, endIndex, keepRecentTokens) {
|
|
|
281
281
|
isSplitTurn: !isUserMessage && turnStartIndex !== -1,
|
|
282
282
|
};
|
|
283
283
|
}
|
|
284
|
-
export const SUMMARIZATION_SYSTEM_PROMPT = `You are a context summarization assistant. Your task is to read a conversation between a user and an AI assistant, then produce a structured summary following the exact format specified.
|
|
285
|
-
|
|
284
|
+
export const SUMMARIZATION_SYSTEM_PROMPT = `You are a context summarization assistant. Your task is to read a conversation between a user and an AI assistant, then produce a structured summary following the exact format specified.
|
|
285
|
+
|
|
286
286
|
Do NOT continue the conversation. Do NOT respond to any questions in the conversation. ONLY output the structured summary.`;
|
|
287
|
-
const SUMMARIZATION_PROMPT = `The messages above are a conversation to summarize. Create a structured context checkpoint summary that another LLM will use to continue the work.
|
|
288
|
-
|
|
289
|
-
Use this EXACT format:
|
|
290
|
-
|
|
291
|
-
## Goal
|
|
292
|
-
[What is the user trying to accomplish? Can be multiple items if the session covers different tasks.]
|
|
293
|
-
|
|
294
|
-
## Constraints & Preferences
|
|
295
|
-
- [Any constraints, preferences, or requirements mentioned by user]
|
|
296
|
-
- [Or "(none)" if none were mentioned]
|
|
297
|
-
|
|
298
|
-
## Progress
|
|
299
|
-
### Done
|
|
300
|
-
- [x] [Completed tasks/changes]
|
|
301
|
-
|
|
302
|
-
### In Progress
|
|
303
|
-
- [ ] [Current work]
|
|
304
|
-
|
|
305
|
-
### Blocked
|
|
306
|
-
- [Issues preventing progress, if any]
|
|
307
|
-
|
|
308
|
-
## Key Decisions
|
|
309
|
-
- **[Decision]**: [Brief rationale]
|
|
310
|
-
|
|
311
|
-
## Next Steps
|
|
312
|
-
1. [Ordered list of what should happen next]
|
|
313
|
-
|
|
314
|
-
## Critical Context
|
|
315
|
-
- [Any data, examples, or references needed to continue]
|
|
316
|
-
- [Or "(none)" if not applicable]
|
|
317
|
-
|
|
287
|
+
const SUMMARIZATION_PROMPT = `The messages above are a conversation to summarize. Create a structured context checkpoint summary that another LLM will use to continue the work.
|
|
288
|
+
|
|
289
|
+
Use this EXACT format:
|
|
290
|
+
|
|
291
|
+
## Goal
|
|
292
|
+
[What is the user trying to accomplish? Can be multiple items if the session covers different tasks.]
|
|
293
|
+
|
|
294
|
+
## Constraints & Preferences
|
|
295
|
+
- [Any constraints, preferences, or requirements mentioned by user]
|
|
296
|
+
- [Or "(none)" if none were mentioned]
|
|
297
|
+
|
|
298
|
+
## Progress
|
|
299
|
+
### Done
|
|
300
|
+
- [x] [Completed tasks/changes]
|
|
301
|
+
|
|
302
|
+
### In Progress
|
|
303
|
+
- [ ] [Current work]
|
|
304
|
+
|
|
305
|
+
### Blocked
|
|
306
|
+
- [Issues preventing progress, if any]
|
|
307
|
+
|
|
308
|
+
## Key Decisions
|
|
309
|
+
- **[Decision]**: [Brief rationale]
|
|
310
|
+
|
|
311
|
+
## Next Steps
|
|
312
|
+
1. [Ordered list of what should happen next]
|
|
313
|
+
|
|
314
|
+
## Critical Context
|
|
315
|
+
- [Any data, examples, or references needed to continue]
|
|
316
|
+
- [Or "(none)" if not applicable]
|
|
317
|
+
|
|
318
318
|
Keep each section concise. Preserve exact file paths, function names, and error messages.`;
|
|
319
|
-
const UPDATE_SUMMARIZATION_PROMPT = `The messages above are NEW conversation messages to incorporate into the existing summary provided in <previous-summary> tags.
|
|
320
|
-
|
|
321
|
-
Update the existing structured summary with new information. RULES:
|
|
322
|
-
- PRESERVE all existing information from the previous summary
|
|
323
|
-
- ADD new progress, decisions, and context from the new messages
|
|
324
|
-
- UPDATE the Progress section: move items from "In Progress" to "Done" when completed
|
|
325
|
-
- UPDATE "Next Steps" based on what was accomplished
|
|
326
|
-
- PRESERVE exact file paths, function names, and error messages
|
|
327
|
-
- If something is no longer relevant, you may remove it
|
|
328
|
-
|
|
329
|
-
Use this EXACT format:
|
|
330
|
-
|
|
331
|
-
## Goal
|
|
332
|
-
[Preserve existing goals, add new ones if the task expanded]
|
|
333
|
-
|
|
334
|
-
## Constraints & Preferences
|
|
335
|
-
- [Preserve existing, add new ones discovered]
|
|
336
|
-
|
|
337
|
-
## Progress
|
|
338
|
-
### Done
|
|
339
|
-
- [x] [Include previously done items AND newly completed items]
|
|
340
|
-
|
|
341
|
-
### In Progress
|
|
342
|
-
- [ ] [Current work - update based on progress]
|
|
343
|
-
|
|
344
|
-
### Blocked
|
|
345
|
-
- [Current blockers - remove if resolved]
|
|
346
|
-
|
|
347
|
-
## Key Decisions
|
|
348
|
-
- **[Decision]**: [Brief rationale] (preserve all previous, add new)
|
|
349
|
-
|
|
350
|
-
## Next Steps
|
|
351
|
-
1. [Update based on current state]
|
|
352
|
-
|
|
353
|
-
## Critical Context
|
|
354
|
-
- [Preserve important context, add new if needed]
|
|
355
|
-
|
|
319
|
+
const UPDATE_SUMMARIZATION_PROMPT = `The messages above are NEW conversation messages to incorporate into the existing summary provided in <previous-summary> tags.
|
|
320
|
+
|
|
321
|
+
Update the existing structured summary with new information. RULES:
|
|
322
|
+
- PRESERVE all existing information from the previous summary
|
|
323
|
+
- ADD new progress, decisions, and context from the new messages
|
|
324
|
+
- UPDATE the Progress section: move items from "In Progress" to "Done" when completed
|
|
325
|
+
- UPDATE "Next Steps" based on what was accomplished
|
|
326
|
+
- PRESERVE exact file paths, function names, and error messages
|
|
327
|
+
- If something is no longer relevant, you may remove it
|
|
328
|
+
|
|
329
|
+
Use this EXACT format:
|
|
330
|
+
|
|
331
|
+
## Goal
|
|
332
|
+
[Preserve existing goals, add new ones if the task expanded]
|
|
333
|
+
|
|
334
|
+
## Constraints & Preferences
|
|
335
|
+
- [Preserve existing, add new ones discovered]
|
|
336
|
+
|
|
337
|
+
## Progress
|
|
338
|
+
### Done
|
|
339
|
+
- [x] [Include previously done items AND newly completed items]
|
|
340
|
+
|
|
341
|
+
### In Progress
|
|
342
|
+
- [ ] [Current work - update based on progress]
|
|
343
|
+
|
|
344
|
+
### Blocked
|
|
345
|
+
- [Current blockers - remove if resolved]
|
|
346
|
+
|
|
347
|
+
## Key Decisions
|
|
348
|
+
- **[Decision]**: [Brief rationale] (preserve all previous, add new)
|
|
349
|
+
|
|
350
|
+
## Next Steps
|
|
351
|
+
1. [Update based on current state]
|
|
352
|
+
|
|
353
|
+
## Critical Context
|
|
354
|
+
- [Preserve important context, add new if needed]
|
|
355
|
+
|
|
356
356
|
Keep each section concise. Preserve exact file paths, function names, and error messages.`;
|
|
357
357
|
/** Generate or update a conversation summary for compaction. */
|
|
358
358
|
export async function generateSummary(currentMessages, models, model, reserveTokens, signal, customInstructions, previousSummary, thinkingLevel) {
|
|
@@ -451,19 +451,19 @@ export function prepareCompaction(pathEntries, settings) {
|
|
|
451
451
|
settings,
|
|
452
452
|
});
|
|
453
453
|
}
|
|
454
|
-
const TURN_PREFIX_SUMMARIZATION_PROMPT = `This is the PREFIX of a turn that was too large to keep. The SUFFIX (recent work) is retained.
|
|
455
|
-
|
|
456
|
-
Summarize the prefix to provide context for the retained suffix:
|
|
457
|
-
|
|
458
|
-
## Original Request
|
|
459
|
-
[What did the user ask for in this turn?]
|
|
460
|
-
|
|
461
|
-
## Early Progress
|
|
462
|
-
- [Key decisions and work done in the prefix]
|
|
463
|
-
|
|
464
|
-
## Context for Suffix
|
|
465
|
-
- [Information needed to understand the retained recent work]
|
|
466
|
-
|
|
454
|
+
const TURN_PREFIX_SUMMARIZATION_PROMPT = `This is the PREFIX of a turn that was too large to keep. The SUFFIX (recent work) is retained.
|
|
455
|
+
|
|
456
|
+
Summarize the prefix to provide context for the retained suffix:
|
|
457
|
+
|
|
458
|
+
## Original Request
|
|
459
|
+
[What did the user ask for in this turn?]
|
|
460
|
+
|
|
461
|
+
## Early Progress
|
|
462
|
+
- [Key decisions and work done in the prefix]
|
|
463
|
+
|
|
464
|
+
## Context for Suffix
|
|
465
|
+
- [Information needed to understand the retained recent work]
|
|
466
|
+
|
|
467
467
|
Be concise. Focus on what's needed to understand the kept suffix.`;
|
|
468
468
|
export { serializeConversation } from "./utils.js";
|
|
469
469
|
/** Generate compaction summary data from prepared session history. */
|