evolcore 0.0.42 → 0.0.43-test.0
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 +29 -0
- package/bin/ec-safe-output.js +4 -1
- package/dist/ability/application-service.js +882 -0
- package/dist/ability/authorization.js +70 -0
- package/dist/ability/command-contract.js +105 -0
- package/dist/ability/daemon.js +137 -0
- package/dist/ability/development.js +450 -0
- package/dist/ability/environment.js +75 -0
- package/dist/ability/interop-v1.js +547 -0
- package/dist/ability/management.js +79 -0
- package/dist/ability/package.js +264 -0
- package/dist/ability/provider.js +73 -0
- package/dist/ability/publication.js +107 -0
- package/dist/ability/resources.js +106 -0
- package/dist/ability/runtime.js +212 -0
- package/dist/ability/secrets.js +47 -0
- package/dist/ability/store.js +112 -0
- package/dist/ability/toolchain.js +69 -0
- package/dist/ability/types.js +14 -0
- package/dist/ability/versions.js +32 -0
- package/dist/agents/baseagent.js +2 -2
- package/dist/agents/claude-runner.js +4 -0
- package/dist/agents/codex-runner.js +81 -17
- package/dist/agents/ecagent-plugin-lazy.js +41 -0
- package/dist/agents/ecagent-runner.js +18 -11
- package/dist/aun/ability-device-routing.js +12 -1
- package/dist/aun/aid/agentmd.js +2 -2
- package/dist/aun/aid/identity.js +45 -0
- package/dist/aun/aid/index.js +1 -0
- package/dist/aun/aid/managed-operation.js +73 -2
- package/dist/channels/aun.js +64 -18
- package/dist/channels/builtin-plugins.js +14 -0
- package/dist/channels/dingtalk.js +78 -26
- package/dist/channels/feishu.js +89 -14
- package/dist/channels/qqbot.js +84 -19
- package/dist/channels/wechat.js +77 -19
- package/dist/channels/wecom.js +67 -22
- package/dist/cli/ability-command.js +92 -0
- package/dist/cli/aun-commands.js +124 -85
- package/dist/cli/daemon-commands.js +37 -85
- package/dist/cli/index.js +14 -0
- package/dist/cli/init.js +11 -13
- package/dist/cli/managed-command-guard.js +6 -0
- package/dist/cli/model.js +101 -104
- package/dist/cli/provider-command.js +6 -4
- package/dist/cli/restart-monitor.js +52 -11
- package/dist/cli/upgrade-command.js +102 -0
- package/dist/cli/version.js +1 -1
- package/dist/config/access-policy.js +4 -2
- package/dist/config/builtin-roles.js +1 -0
- package/dist/config/config-field-policy.js +4 -0
- package/dist/config/config-manager.js +7 -0
- package/dist/config/provider-ipc-service.js +10 -0
- package/dist/config/providers-config.js +12 -3
- package/dist/config/providers-management.js +45 -9
- package/dist/config/schema-migration.js +40 -22
- package/dist/contracts/ecweb-service-protocol.js +2 -1
- package/dist/core/auth/agent-delegation.js +21 -5
- package/dist/core/auth/auth-gateway.js +31 -9
- package/dist/core/auth/authorization-audit.js +52 -4
- package/dist/core/auth/delegation-authorization.js +140 -4
- package/dist/core/auth/operation-authorizer.js +114 -13
- package/dist/core/auth/operation-catalog.js +118 -4
- package/dist/core/baseagent-loader.js +14 -1
- package/dist/core/channel-loader.js +47 -9
- package/dist/core/channel-runtime.js +1 -1
- package/dist/core/command/agent-storage-menu.js +1 -1
- package/dist/core/command/cli-intent-parser.js +26 -13
- package/dist/core/command/command-handler.js +232 -76
- package/dist/core/command/connect-menu.js +10 -4
- package/dist/core/command/daemon-diagnostics.js +3 -3
- package/dist/core/command/data-root-resolver.js +2 -3
- package/dist/core/command/menu-catalog.js +10 -3
- package/dist/core/command/menu-handler.js +321 -46
- package/dist/core/command/menu-protocol.js +53 -7
- package/dist/core/command/pa-workspace-calendar.js +1 -2
- package/dist/core/command/pa-workspace-items.js +486 -0
- package/dist/core/command/pa-workspace-store.js +10 -1
- package/dist/core/command/slash-gate.js +2 -2
- package/dist/core/command/slash-handler.js +67 -25
- package/dist/core/contact-bind-registry.js +27 -0
- package/dist/core/daemon-control.js +3 -3
- package/dist/core/daemon-lifecycle.js +2 -1
- package/dist/core/event-bus.js +9 -2
- package/dist/core/handoff/ipc-registration.js +1 -0
- package/dist/core/host-snapshot.js +1 -2
- package/dist/core/initialization/service.js +32 -11
- package/dist/core/ipc-registration.js +18 -5
- package/dist/core/memory/consolidation-context.js +2 -2
- package/dist/core/message/aun-request-registry.js +99 -18
- package/dist/core/message/im-renderer.js +16 -11
- package/dist/core/message/message-admission.js +25 -20
- package/dist/core/message/message-bridge.js +21 -47
- package/dist/core/message/message-queue.js +3 -0
- package/dist/core/message/response-engine.js +7 -5
- package/dist/core/model/catalog-service.js +1 -1
- package/dist/core/permission/ec-command-parser.js +41 -9
- package/dist/core/permission/permission-result.js +1 -0
- package/dist/core/permission/protected-paths.js +25 -14
- package/dist/core/permission/tool-policy.js +108 -107
- package/dist/core/plugin-lifecycle.js +133 -0
- package/dist/core/runner-reload-transaction.js +4 -1
- package/dist/core/system-session/memory.js +16 -3
- package/dist/core/task/task-activity-store.js +50 -0
- package/dist/core/task/task-image-resources.js +140 -0
- package/dist/core/thread/ipc-operation.js +1 -1
- package/dist/core/thread/thread-service.js +0 -1
- package/dist/directory/canonical-digest.js +5 -3
- package/dist/directory/owner-directory-admission.js +22 -2
- package/dist/directory/owner-directory-cache.js +394 -60
- package/dist/directory/owner-directory-markdown.js +29 -2
- package/dist/directory/owner-directory-scope.js +35 -16
- package/dist/ecweb/basic-settings-service.js +4 -1
- package/dist/ecweb/pairing.js +41 -0
- package/dist/ecweb/providers-service.js +8 -1
- package/dist/{utils/ecweb-utils.js → ecweb/runtime/launch.js} +3 -27
- package/dist/ecweb/runtime/lifecycle.js +184 -0
- package/dist/{utils/ecweb-supervisor.js → ecweb/runtime/supervisor.js} +32 -27
- package/dist/index.js +34 -25
- package/dist/ipc.js +124 -7
- package/dist/response-system/engines/v1/proactive-flow.js +1 -1
- package/dist/trigger/authorization.js +2 -2
- package/dist/utils/atomic-write.js +24 -0
- package/dist/utils/avatar-upload.js +3 -1
- package/dist/utils/cross-platform.js +31 -2
- package/dist/utils/host-info.js +36 -0
- package/dist/utils/instance-registry.js +38 -11
- package/dist/utils/logger.js +9 -0
- package/dist/utils/{process-tree-stats.js → process-tree.js} +29 -0
- package/dist/utils/tool-summary.js +9 -1
- package/dist/utils/upgrade-jobs.js +96 -15
- package/dist/utils/windows-autostart.js +1 -1
- package/ecagent/README.md +19 -0
- package/ecagent/dist/harness/agent-harness.js +9 -0
- package/ecagent/dist/harness/env/nodejs.js +71 -11
- package/ecagent/dist/harness/env/windows-shell.d.ts +7 -0
- package/ecagent/dist/harness/env/windows-shell.js +132 -0
- package/kits/docs/aun/ABILITY_CALLING.md +38 -9
- package/kits/docs/evolcore/INDEX.md +5 -1
- package/kits/docs/evolcore/ability.md +181 -0
- package/kits/docs/evolcore/aid.md +20 -0
- package/kits/docs/evolcore/config.md +10 -6
- package/kits/docs/evolcore/menu-protocol.md +40 -1
- package/kits/docs/evolcore/provider.md +2 -2
- package/kits/docs/evolcore/tool-authorization.md +270 -0
- package/kits/runtime/ability-job.ps1 +41 -0
- package/kits/runtime/ability-runner.mjs +67 -0
- package/kits/runtime/ability-secret.ps1 +59 -0
- package/kits/runtime/ability-templates/go/main.go +59 -0
- package/kits/runtime/ability-templates/java/Json.java +67 -0
- package/kits/runtime/ability-templates/java/Runner.java +42 -0
- package/kits/runtime/ability-templates/python/runner.py +48 -0
- package/kits/runtime/ability-templates/rust/json.rs +87 -0
- package/kits/runtime/ability-templates/rust/runner.rs +35 -0
- package/kits/schemas/_meta.json +12 -1
- package/kits/schemas/ability-plugin.schema.1.json +107 -0
- package/kits/schemas/ability-project.schema.1.json +31 -0
- package/kits/schemas/agent-config.schema.16.json +20 -0
- package/kits/schemas/agent-config.schema.17.json +20 -0
- package/kits/schemas/agent-config.schema.18.json +917 -0
- package/kits/skills/.switches.json +4 -0
- package/kits/skills/aid-ability/SKILL.md +5 -4
- package/kits/skills/ec-ability/SKILL.md +67 -0
- package/kits/skills/ec-ability/references/contract-checklist.md +37 -0
- package/kits/skills/ec-ability/references/development.md +104 -0
- package/kits/skills/ec-ability/references/management.md +117 -0
- package/kits/skills/ec-ability/references/recovery.md +27 -0
- package/kits/skills/ec-ability/references/runtime-protocol.md +109 -0
- package/kits/skills/ec-ability/references/workflows.md +15 -0
- package/kits/skills/ec-service-proxy/SKILL.md +12 -0
- package/kits/skills/personal-assistant/SKILL.md +240 -6
- package/kits/skills/personal-assistant/references/02-bootstrap.md +78 -4
- package/kits/skills/personal-assistant/scripts/clean.mjs +397 -0
- package/kits/skills/personal-assistant/scripts/init.mjs +113 -25
- package/kits/skills/personal-assistant/scripts/lock.mjs +189 -0
- package/kits/skills/personal-assistant/scripts/migrate.mjs +35 -10
- package/kits/skills/personal-assistant/scripts/verify.mjs +2 -1
- package/kits/skills/personal-assistant/templates/persona-section.md +54 -0
- package/kits/skills/personal-assistant/triggers/ingest-daily.json +1 -1
- package/kits/templates/memory-consolidation/notes.md +1 -1
- package/kits/templates/system-fragments/channel.md +2 -1
- package/kits/templates/system-fragments/commands.md +1 -0
- package/package.json +4 -2
- package/dist/core/command/data-root-error.js +0 -10
- package/dist/utils/machine-info.js +0 -46
- package/dist/utils/process-tree-worker.js +0 -31
- package/dist/utils/windows-output.js +0 -36
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"""Readiness example. Keep protocol output on stdout and logs on stderr."""
|
|
2
|
+
import json
|
|
3
|
+
import sys
|
|
4
|
+
|
|
5
|
+
PROTOCOL = "evolcore.ability-runtime/1"
|
|
6
|
+
handlers = {"getReadiness": lambda params: {"ready": True}}
|
|
7
|
+
ready = False
|
|
8
|
+
config = {}
|
|
9
|
+
|
|
10
|
+
for line in sys.stdin:
|
|
11
|
+
frame = json.loads(line)
|
|
12
|
+
if frame.get("protocol") != PROTOCOL or not isinstance(frame.get("id"), str):
|
|
13
|
+
sys.exit(70)
|
|
14
|
+
if "method" not in frame: # Replies to optional outbound Broker calls.
|
|
15
|
+
continue
|
|
16
|
+
method = frame["method"]
|
|
17
|
+
params = frame.get("params", {})
|
|
18
|
+
response = {"protocol": PROTOCOL, "id": frame["id"]}
|
|
19
|
+
try:
|
|
20
|
+
if method == "initialize":
|
|
21
|
+
if ready or sorted(params["handlers"]) != sorted(handlers):
|
|
22
|
+
raise ValueError("Handler set differs from Manifest")
|
|
23
|
+
if "migration" in params:
|
|
24
|
+
raise ValueError("Implement data migration before upgrading data schemas")
|
|
25
|
+
config = params["config"]
|
|
26
|
+
ready = True
|
|
27
|
+
result = {"ready": True, "handlers": list(handlers)}
|
|
28
|
+
elif method == "health":
|
|
29
|
+
result = {"ready": ready}
|
|
30
|
+
elif method == "invoke":
|
|
31
|
+
if not ready:
|
|
32
|
+
raise ValueError("Runner is not ready")
|
|
33
|
+
result = handlers[params["handler"]](params["params"])
|
|
34
|
+
elif method == "cancel":
|
|
35
|
+
result = {"cancelled": False} # Readiness finishes synchronously.
|
|
36
|
+
elif method == "shutdown":
|
|
37
|
+
ready = False
|
|
38
|
+
result = {"stopped": True}
|
|
39
|
+
else:
|
|
40
|
+
raise ValueError("Unsupported method")
|
|
41
|
+
response["result"] = result
|
|
42
|
+
except Exception as error:
|
|
43
|
+
print(str(error), file=sys.stderr)
|
|
44
|
+
response["error"] = {"code": "PLUGIN_FAILED", "message": "Plugin handler failed"}
|
|
45
|
+
sys.stdout.write(json.dumps(response, ensure_ascii=False) + "\n")
|
|
46
|
+
sys.stdout.flush()
|
|
47
|
+
if method == "shutdown":
|
|
48
|
+
break
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
// Minimal JSON value codec for this standalone example. No downloaded crates.
|
|
2
|
+
use std::collections::BTreeMap;
|
|
3
|
+
|
|
4
|
+
#[derive(Debug, PartialEq)]
|
|
5
|
+
pub enum Json { Null, Bool(bool), Number(String), String(String), Array(Vec<Json>), Object(BTreeMap<String, Json>) }
|
|
6
|
+
impl Json {
|
|
7
|
+
pub fn text(&self) -> Option<&str> { if let Json::String(s) = self { Some(s) } else { None } }
|
|
8
|
+
pub fn get(&self, key: &str) -> &Json { if let Json::Object(map) = self { map.get(key).unwrap_or(&Json::Null) } else { &Json::Null } }
|
|
9
|
+
pub fn has(&self, key: &str) -> bool { if let Json::Object(map) = self { map.contains_key(key) } else { false } }
|
|
10
|
+
pub fn parse(text: &str) -> Result<Json, &'static str> {
|
|
11
|
+
let mut parser = Parser { bytes: text.as_bytes(), at: 0 }; let result = parser.value(0)?; parser.space();
|
|
12
|
+
if parser.at != parser.bytes.len() { Err("Trailing JSON data") } else { Ok(result) }
|
|
13
|
+
}
|
|
14
|
+
pub fn encode(&self) -> String {
|
|
15
|
+
match self {
|
|
16
|
+
Json::Null => "null".into(), Json::Bool(v) => v.to_string(), Json::Number(v) => v.clone(),
|
|
17
|
+
Json::String(v) => {
|
|
18
|
+
let mut out = String::from("\"");
|
|
19
|
+
for c in v.chars() { match c { '"' => out.push_str("\\\""), '\\' => out.push_str("\\\\"), c if c < ' ' => out.push_str(&format!("\\u{:04x}", c as u32)), _ => out.push(c) } }
|
|
20
|
+
out.push('"'); out
|
|
21
|
+
},
|
|
22
|
+
Json::Array(v) => format!("[{}]", v.iter().map(Json::encode).collect::<Vec<_>>().join(",")),
|
|
23
|
+
Json::Object(v) => format!("{{{}}}", v.iter().map(|(k,v)| format!("{}:{}", Json::String(k.clone()).encode(), v.encode())).collect::<Vec<_>>().join(",")),
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
struct Parser<'a> { bytes: &'a [u8], at: usize }
|
|
28
|
+
impl Parser<'_> {
|
|
29
|
+
fn space(&mut self) { while self.at < self.bytes.len() && b" \r\n\t".contains(&self.bytes[self.at]) { self.at += 1; } }
|
|
30
|
+
fn take(&mut self) -> Result<u8, &'static str> { let c = *self.bytes.get(self.at).ok_or("Incomplete JSON")?; self.at += 1; Ok(c) }
|
|
31
|
+
fn eat(&mut self, c: u8) -> bool { self.space(); if self.bytes.get(self.at) == Some(&c) { self.at += 1; true } else { false } }
|
|
32
|
+
fn need(&mut self, c: u8) -> Result<(), &'static str> { if self.eat(c) { Ok(()) } else { Err("Expected separator") } }
|
|
33
|
+
fn hex(&mut self) -> Result<u32, &'static str> {
|
|
34
|
+
let mut n = 0; for _ in 0..4 { n = n * 16 + (self.take()? as char).to_digit(16).ok_or("Invalid Unicode escape")?; } Ok(n)
|
|
35
|
+
}
|
|
36
|
+
fn string(&mut self) -> Result<String, &'static str> {
|
|
37
|
+
if self.take()? != b'"' { return Err("Expected string"); }
|
|
38
|
+
let mut out = Vec::new();
|
|
39
|
+
loop { let c = self.take()?; match c {
|
|
40
|
+
b'"' => return String::from_utf8(out).map_err(|_| "Invalid UTF-8"),
|
|
41
|
+
0..=31 => return Err("Invalid string"),
|
|
42
|
+
b'\\' => match self.take()? {
|
|
43
|
+
b'"' => out.push(b'"'), b'\\' => out.push(b'\\'), b'/' => out.push(b'/'), b'b' => out.push(8), b'f' => out.push(12), b'n' => out.push(10), b'r' => out.push(13), b't' => out.push(9),
|
|
44
|
+
b'u' => {
|
|
45
|
+
let mut point = self.hex()?;
|
|
46
|
+
if (0xd800..=0xdbff).contains(&point) {
|
|
47
|
+
if self.take()? != b'\\' || self.take()? != b'u' { return Err("Missing low surrogate"); }
|
|
48
|
+
let low = self.hex()?; if !(0xdc00..=0xdfff).contains(&low) { return Err("Invalid surrogate"); }
|
|
49
|
+
point = 0x10000 + ((point - 0xd800) << 10) + low - 0xdc00;
|
|
50
|
+
}
|
|
51
|
+
let c = char::from_u32(point).ok_or("Invalid code point")?; let mut buf = [0u8;4]; out.extend_from_slice(c.encode_utf8(&mut buf).as_bytes());
|
|
52
|
+
}, _ => return Err("Invalid escape"),
|
|
53
|
+
}, _ => out.push(c),
|
|
54
|
+
}}
|
|
55
|
+
}
|
|
56
|
+
fn value(&mut self, depth: usize) -> Result<Json, &'static str> {
|
|
57
|
+
if depth > 128 { return Err("JSON depth exceeded"); } self.space();
|
|
58
|
+
match *self.bytes.get(self.at).ok_or("Missing value")? {
|
|
59
|
+
b'"' => Ok(Json::String(self.string()?)),
|
|
60
|
+
b'{' => {
|
|
61
|
+
self.at += 1; let mut values = BTreeMap::new(); if self.eat(b'}') { return Ok(Json::Object(values)); }
|
|
62
|
+
loop { self.space(); let key = self.string()?; self.need(b':')?; values.insert(key, self.value(depth+1)?); if !self.eat(b',') { break; } }
|
|
63
|
+
self.need(b'}')?; Ok(Json::Object(values))
|
|
64
|
+
},
|
|
65
|
+
b'[' => {
|
|
66
|
+
self.at += 1; let mut values = Vec::new(); if self.eat(b']') { return Ok(Json::Array(values)); }
|
|
67
|
+
loop { values.push(self.value(depth+1)?); if !self.eat(b',') { break; } } self.need(b']')?; Ok(Json::Array(values))
|
|
68
|
+
},
|
|
69
|
+
b'n' | b't' | b'f' => {
|
|
70
|
+
for (literal, value) in [("null", Json::Null), ("true", Json::Bool(true)), ("false", Json::Bool(false))] {
|
|
71
|
+
if self.bytes[self.at..].starts_with(literal.as_bytes()) { self.at += literal.len(); return Ok(value); }
|
|
72
|
+
} Err("Invalid literal")
|
|
73
|
+
},
|
|
74
|
+
_ => {
|
|
75
|
+
let start = self.at; if self.bytes.get(self.at) == Some(&b'-') { self.at += 1; }
|
|
76
|
+
if self.bytes.get(self.at) == Some(&b'0') { self.at += 1; } else {
|
|
77
|
+
if !matches!(self.bytes.get(self.at), Some(b'1'..=b'9')) { return Err("Invalid number"); }
|
|
78
|
+
while matches!(self.bytes.get(self.at), Some(b'0'..=b'9')) { self.at += 1; }
|
|
79
|
+
}
|
|
80
|
+
if self.bytes.get(self.at) == Some(&b'.') { self.at += 1; self.digits()?; }
|
|
81
|
+
if matches!(self.bytes.get(self.at), Some(b'e' | b'E')) { self.at += 1; if matches!(self.bytes.get(self.at), Some(b'+' | b'-')) { self.at += 1; } self.digits()?; }
|
|
82
|
+
Ok(Json::Number(String::from_utf8(self.bytes[start..self.at].to_vec()).map_err(|_| "Invalid number")?))
|
|
83
|
+
},
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
fn digits(&mut self) -> Result<(), &'static str> { let start = self.at; while matches!(self.bytes.get(self.at), Some(b'0'..=b'9')) { self.at += 1; } if start == self.at { Err("Missing digits") } else { Ok(()) } }
|
|
87
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// Dependency-free readiness example. Keep logs on stderr.
|
|
2
|
+
mod json;
|
|
3
|
+
use json::Json;
|
|
4
|
+
use std::io::{self, BufRead, Write};
|
|
5
|
+
|
|
6
|
+
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|
7
|
+
let protocol = "evolcore.ability-runtime/1";
|
|
8
|
+
let mut ready = false;
|
|
9
|
+
let mut output = io::BufWriter::new(io::stdout());
|
|
10
|
+
for line in io::stdin().lock().lines() {
|
|
11
|
+
let frame = Json::parse(&line?).map_err(|e| io::Error::new(io::ErrorKind::InvalidData, e))?;
|
|
12
|
+
if frame.get("protocol").text() != Some(protocol) || frame.get("id").text().is_none() { std::process::exit(70); }
|
|
13
|
+
let method = match frame.get("method").text() { Some(method) => method, None => continue };
|
|
14
|
+
let params = frame.get("params");
|
|
15
|
+
let result = match method {
|
|
16
|
+
"initialize" => {
|
|
17
|
+
if ready || params.get("handlers") != &Json::Array(vec![Json::String("getReadiness".into())]) || params.has("migration") { None }
|
|
18
|
+
else { ready = true; Some("{\"ready\":true,\"handlers\":[\"getReadiness\"]}") }
|
|
19
|
+
},
|
|
20
|
+
"health" => Some(if ready { "{\"ready\":true}" } else { "{\"ready\":false}" }),
|
|
21
|
+
"invoke" if ready && params.get("handler").text() == Some("getReadiness") => Some("{\"ready\":true}"),
|
|
22
|
+
"cancel" => Some("{\"cancelled\":false}"),
|
|
23
|
+
"shutdown" => { ready = false; Some("{\"stopped\":true}") },
|
|
24
|
+
_ => None,
|
|
25
|
+
};
|
|
26
|
+
let reply = match result { Some(result) => format!("\"result\":{}", result), None => {
|
|
27
|
+
eprintln!("Unknown handler, migration, method or invalid lifecycle state");
|
|
28
|
+
"\"error\":{\"code\":\"PLUGIN_FAILED\",\"message\":\"Plugin handler failed\"}".into()
|
|
29
|
+
}};
|
|
30
|
+
writeln!(output, "{{\"protocol\":\"{}\",\"id\":{}, {}}}", protocol, frame.get("id").encode(), reply)?;
|
|
31
|
+
output.flush()?;
|
|
32
|
+
if method == "shutdown" { break; }
|
|
33
|
+
}
|
|
34
|
+
Ok(())
|
|
35
|
+
}
|
package/kits/schemas/_meta.json
CHANGED
|
@@ -11,8 +11,13 @@
|
|
|
11
11
|
"history": []
|
|
12
12
|
},
|
|
13
13
|
"agent-config": {
|
|
14
|
-
"currentVersion":
|
|
14
|
+
"currentVersion": 18,
|
|
15
15
|
"history": [
|
|
16
|
+
{
|
|
17
|
+
"version": 18,
|
|
18
|
+
"date": "2026-11-01",
|
|
19
|
+
"description": "allowStrangerContacts 改名为 allowAllContacts 并升格为总开关:压过名录三档与名录不可用,仍在本地拉黑与 deniedAids 之后"
|
|
20
|
+
},
|
|
16
21
|
{
|
|
17
22
|
"version": 17,
|
|
18
23
|
"date": "2026-10-31",
|
|
@@ -49,6 +54,12 @@
|
|
|
49
54
|
}
|
|
50
55
|
},
|
|
51
56
|
"history": [
|
|
57
|
+
{
|
|
58
|
+
"schema": "agent-config",
|
|
59
|
+
"version": 18,
|
|
60
|
+
"date": "2026-11-01",
|
|
61
|
+
"description": "allowStrangerContacts → allowAllContacts;由第三档开关升格为压过三档的总开关"
|
|
62
|
+
},
|
|
52
63
|
{
|
|
53
64
|
"schema": "agent-config",
|
|
54
65
|
"version": 17,
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "urn:evolcore:schema:ability-plugin:v1",
|
|
4
|
+
"title": "EvolCore Ability Plugin Manifest v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"schemaVersion", "id", "version", "name", "description", "license",
|
|
9
|
+
"engines", "runtime", "targets", "platforms", "configSchema",
|
|
10
|
+
"permissions", "limits", "abilities"
|
|
11
|
+
],
|
|
12
|
+
"properties": {
|
|
13
|
+
"schemaVersion": { "const": "evolcore.ability-plugin/v1" },
|
|
14
|
+
"id": { "type": "string", "pattern": "^@[a-z0-9][a-z0-9._-]*/[a-z0-9][a-z0-9._-]*$", "maxLength": 128 },
|
|
15
|
+
"version": { "type": "string", "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$", "maxLength": 128 },
|
|
16
|
+
"name": { "type": "string", "minLength": 1, "maxLength": 120 },
|
|
17
|
+
"description": { "type": "string", "minLength": 1, "maxLength": 2000 },
|
|
18
|
+
"license": { "type": "string", "minLength": 1, "maxLength": 128 },
|
|
19
|
+
"engines": {
|
|
20
|
+
"type": "object", "additionalProperties": false,
|
|
21
|
+
"required": ["evolcore"],
|
|
22
|
+
"properties": {
|
|
23
|
+
"evolcore": { "type": "string", "minLength": 1, "maxLength": 128 },
|
|
24
|
+
"node": { "type": "string", "minLength": 1, "maxLength": 128 },
|
|
25
|
+
"python": { "type": "string", "minLength": 1, "maxLength": 128 },
|
|
26
|
+
"java": { "type": "string", "minLength": 1, "maxLength": 128 },
|
|
27
|
+
"go": { "type": "string", "minLength": 1, "maxLength": 128 },
|
|
28
|
+
"rust": { "type": "string", "minLength": 1, "maxLength": 128 },
|
|
29
|
+
"custom": { "type": "string", "minLength": 1, "maxLength": 128 }
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"runtime": {
|
|
33
|
+
"oneOf": [
|
|
34
|
+
{
|
|
35
|
+
"type": "object", "additionalProperties": false,
|
|
36
|
+
"required": ["kind", "apiVersion", "entry"],
|
|
37
|
+
"properties": {
|
|
38
|
+
"kind": { "const": "node-subprocess" },
|
|
39
|
+
"apiVersion": { "const": "1" },
|
|
40
|
+
"entry": { "$ref": "#/definitions/packagePath" },
|
|
41
|
+
"language": { "const": "node" }
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"type": "object", "additionalProperties": false,
|
|
46
|
+
"required": ["kind", "apiVersion", "language"],
|
|
47
|
+
"anyOf": [{ "required": ["entry"] }, { "required": ["command"] }],
|
|
48
|
+
"properties": {
|
|
49
|
+
"kind": { "const": "process-rpc" },
|
|
50
|
+
"apiVersion": { "const": "1" },
|
|
51
|
+
"language": { "enum": ["node", "python", "java", "go", "rust", "custom"] },
|
|
52
|
+
"entry": { "$ref": "#/definitions/packagePath" },
|
|
53
|
+
"command": {
|
|
54
|
+
"type": "array", "minItems": 1, "maxItems": 32, "items": { "type": "string", "minLength": 1, "maxLength": 512 }
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
},
|
|
60
|
+
"targets": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "enum": ["agent", "host"] } },
|
|
61
|
+
"platforms": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "enum": ["win32", "linux", "darwin"] } },
|
|
62
|
+
"architectures": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "enum": ["x64", "arm64", "ia32", "arm", "riscv64", "s390x", "ppc64", "loong64"] } },
|
|
63
|
+
"configSchema": { "$ref": "#/definitions/packagePath" },
|
|
64
|
+
"data": {
|
|
65
|
+
"type": "object", "additionalProperties": false, "required": ["schemaVersion"],
|
|
66
|
+
"properties": { "schemaVersion": { "type": "integer", "minimum": 1, "maximum": 2147483647 } }
|
|
67
|
+
},
|
|
68
|
+
"permissions": {
|
|
69
|
+
"type": "object", "additionalProperties": false,
|
|
70
|
+
"required": ["networkOrigins", "workspace", "secretSlots"],
|
|
71
|
+
"properties": {
|
|
72
|
+
"networkOrigins": { "type": "array", "uniqueItems": true, "maxItems": 32, "items": { "type": "string", "pattern": "^https://[^/]+$", "maxLength": 512 } },
|
|
73
|
+
"workspace": { "enum": ["none", "read", "read-write"] },
|
|
74
|
+
"secretSlots": { "type": "array", "uniqueItems": true, "maxItems": 32, "items": { "type": "string", "pattern": "^[a-z][a-z0-9_-]{0,63}$" } }
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"limits": {
|
|
78
|
+
"type": "object", "additionalProperties": false,
|
|
79
|
+
"required": ["executionTimeoutMs", "maxConcurrency", "maxParamsBytes", "maxResultBytes", "maxLogBytesPerMinute"],
|
|
80
|
+
"properties": {
|
|
81
|
+
"executionTimeoutMs": { "type": "integer", "minimum": 100, "maximum": 3600000 },
|
|
82
|
+
"maxConcurrency": { "type": "integer", "minimum": 1, "maximum": 64 },
|
|
83
|
+
"maxParamsBytes": { "type": "integer", "minimum": 1024, "maximum": 1048576 },
|
|
84
|
+
"maxResultBytes": { "type": "integer", "minimum": 1024, "maximum": 1048576 },
|
|
85
|
+
"maxLogBytesPerMinute": { "type": "integer", "minimum": 1024, "maximum": 1048576 }
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"abilities": {
|
|
89
|
+
"type": "array", "minItems": 1, "maxItems": 128,
|
|
90
|
+
"items": {
|
|
91
|
+
"type": "object", "additionalProperties": false,
|
|
92
|
+
"required": ["handler", "definition", "usage"],
|
|
93
|
+
"properties": {
|
|
94
|
+
"handler": {
|
|
95
|
+
"type": "string", "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$",
|
|
96
|
+
"not": { "enum": ["initialize", "health", "shutdown", "invoke", "cancel", "log", "broker", "constructor", "prototype", "__proto__"] }
|
|
97
|
+
},
|
|
98
|
+
"definition": { "$ref": "#/definitions/packagePath" },
|
|
99
|
+
"usage": { "$ref": "#/definitions/packagePath" }
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"definitions": {
|
|
105
|
+
"packagePath": { "type": "string", "pattern": "^(?!/)(?!.*//)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*\\\\)[A-Za-z0-9._/-]+$", "maxLength": 240 }
|
|
106
|
+
}
|
|
107
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "urn:evolcore:schema:ability-project:v1",
|
|
4
|
+
"title": "EvolCore Ability Development Project v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "entry", "handlers", "pendingHandlers", "files"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": "evolcore.ability-project/v1" },
|
|
10
|
+
"language": { "enum": ["node", "python", "java", "go", "rust", "custom"] },
|
|
11
|
+
"build": {
|
|
12
|
+
"type": "object", "additionalProperties": false, "required": ["kind", "sources", "output"],
|
|
13
|
+
"properties": {
|
|
14
|
+
"kind": { "enum": ["java", "go", "rust", "command"] },
|
|
15
|
+
"sources": { "type": "array", "minItems": 1, "maxItems": 128, "uniqueItems": true, "items": { "type": "string", "minLength": 1, "maxLength": 240 } },
|
|
16
|
+
"output": { "type": "string", "minLength": 1, "maxLength": 240 },
|
|
17
|
+
"mainClass": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*$", "maxLength": 128 },
|
|
18
|
+
"command": { "type": "array", "minItems": 1, "maxItems": 64, "items": { "type": "string", "minLength": 1, "maxLength": 2048 } }
|
|
19
|
+
},
|
|
20
|
+
"allOf": [{ "if": { "properties": { "kind": { "const": "command" } } }, "then": { "required": ["command"] } }]
|
|
21
|
+
},
|
|
22
|
+
"entry": { "type": "string", "pattern": "^[A-Za-z0-9._/-]+$", "maxLength": 240 },
|
|
23
|
+
"handlers": {
|
|
24
|
+
"type": "object", "minProperties": 1, "maxProperties": 128,
|
|
25
|
+
"propertyNames": { "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$" },
|
|
26
|
+
"additionalProperties": { "type": "string", "pattern": "^[A-Za-z0-9._/-]+$", "maxLength": 240 }
|
|
27
|
+
},
|
|
28
|
+
"pendingHandlers": { "type": "array", "uniqueItems": true, "maxItems": 128, "items": { "type": "string" } },
|
|
29
|
+
"files": { "type": "array", "uniqueItems": true, "maxItems": 4096, "items": { "type": "string", "minLength": 1, "maxLength": 240 } }
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -620,6 +620,26 @@
|
|
|
620
620
|
"x-merge": "dict",
|
|
621
621
|
"description": "Agent 能力开关及能力参数"
|
|
622
622
|
},
|
|
623
|
+
"ability": {
|
|
624
|
+
"type": "object",
|
|
625
|
+
"x-merge": "dict",
|
|
626
|
+
"additionalProperties": false,
|
|
627
|
+
"properties": {
|
|
628
|
+
"codeApproval": {
|
|
629
|
+
"type": "object",
|
|
630
|
+
"x-merge": "dict",
|
|
631
|
+
"additionalProperties": false,
|
|
632
|
+
"properties": {
|
|
633
|
+
"enabled": {
|
|
634
|
+
"type": "boolean",
|
|
635
|
+
"default": true,
|
|
636
|
+
"description": "Whether the target Agent Owner may submit trusted ability code approval requests; defaults to enabled"
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
},
|
|
641
|
+
"description": "Agent ability plugin management policy"
|
|
642
|
+
},
|
|
623
643
|
"baseagentSkills": {
|
|
624
644
|
"type": "boolean",
|
|
625
645
|
"x-merge": "scalar",
|
|
@@ -620,6 +620,26 @@
|
|
|
620
620
|
"x-merge": "dict",
|
|
621
621
|
"description": "Agent 能力开关及能力参数"
|
|
622
622
|
},
|
|
623
|
+
"ability": {
|
|
624
|
+
"type": "object",
|
|
625
|
+
"x-merge": "dict",
|
|
626
|
+
"additionalProperties": false,
|
|
627
|
+
"properties": {
|
|
628
|
+
"codeApproval": {
|
|
629
|
+
"type": "object",
|
|
630
|
+
"x-merge": "dict",
|
|
631
|
+
"additionalProperties": false,
|
|
632
|
+
"properties": {
|
|
633
|
+
"enabled": {
|
|
634
|
+
"type": "boolean",
|
|
635
|
+
"default": true,
|
|
636
|
+
"description": "Whether the target Agent Owner may submit trusted ability code approval requests; defaults to enabled"
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
},
|
|
641
|
+
"description": "Agent ability plugin management policy"
|
|
642
|
+
},
|
|
623
643
|
"baseagentSkills": {
|
|
624
644
|
"type": "boolean",
|
|
625
645
|
"x-merge": "scalar",
|