@agenshield/daemon 0.4.2 → 0.4.4
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/index.js +174 -89
- package/main.js +174 -89
- package/package.json +4 -4
- package/routes/activity.d.ts +6 -0
- package/routes/activity.d.ts.map +1 -0
- package/routes/index.d.ts.map +1 -1
- package/routes/marketplace.d.ts.map +1 -1
- package/routes/skills.d.ts.map +1 -1
- package/services/activity-log.d.ts +4 -0
- package/services/activity-log.d.ts.map +1 -1
- package/services/openclaw-config.d.ts.map +1 -1
- package/ui-assets/assets/{index-Chp3YFDr.js → index-gZFEJ5lI.js} +105 -105
- package/ui-assets/index.html +1 -1
package/main.js
CHANGED
|
@@ -4950,7 +4950,7 @@ async function agencoRoutes(app) {
|
|
|
4950
4950
|
// libs/shield-daemon/src/routes/skills.ts
|
|
4951
4951
|
import * as fs13 from "node:fs";
|
|
4952
4952
|
import * as path12 from "node:path";
|
|
4953
|
-
import { execSync as
|
|
4953
|
+
import { execSync as execSync8 } from "node:child_process";
|
|
4954
4954
|
import { parseSkillMd } from "@agenshield/sandbox";
|
|
4955
4955
|
|
|
4956
4956
|
// libs/shield-daemon/src/services/skill-analyzer.ts
|
|
@@ -5233,6 +5233,7 @@ function removeSkillPolicy(name) {
|
|
|
5233
5233
|
// libs/shield-daemon/src/services/openclaw-config.ts
|
|
5234
5234
|
import * as fs11 from "node:fs";
|
|
5235
5235
|
import * as path10 from "node:path";
|
|
5236
|
+
import { execSync as execSync7 } from "node:child_process";
|
|
5236
5237
|
function getOpenClawConfigPath() {
|
|
5237
5238
|
const agentHome = process.env["AGENSHIELD_AGENT_HOME"] || "/Users/ash_default_agent";
|
|
5238
5239
|
return path10.join(agentHome, ".openclaw", "openclaw.json");
|
|
@@ -5250,7 +5251,16 @@ function readConfig() {
|
|
|
5250
5251
|
}
|
|
5251
5252
|
function writeConfig(config) {
|
|
5252
5253
|
const configPath = getOpenClawConfigPath();
|
|
5254
|
+
fs11.mkdirSync(path10.dirname(configPath), { recursive: true });
|
|
5253
5255
|
fs11.writeFileSync(configPath, JSON.stringify(config, null, 2), "utf-8");
|
|
5256
|
+
const agentHome = process.env["AGENSHIELD_AGENT_HOME"] || "/Users/ash_default_agent";
|
|
5257
|
+
const brokerUser = path10.basename(agentHome) + "_broker";
|
|
5258
|
+
const socketGroup = process.env["AGENSHIELD_SOCKET_GROUP"] || "clawshield";
|
|
5259
|
+
try {
|
|
5260
|
+
execSync7(`chown ${brokerUser}:${socketGroup} "${configPath}"`, { stdio: "pipe" });
|
|
5261
|
+
execSync7(`chmod 664 "${configPath}"`, { stdio: "pipe" });
|
|
5262
|
+
} catch {
|
|
5263
|
+
}
|
|
5254
5264
|
}
|
|
5255
5265
|
function addSkillEntry(slug, env) {
|
|
5256
5266
|
const config = readConfig();
|
|
@@ -5704,23 +5714,45 @@ async function getCachedAnalysis2(skillName, publisher) {
|
|
|
5704
5714
|
}
|
|
5705
5715
|
|
|
5706
5716
|
// libs/shield-daemon/src/routes/skills.ts
|
|
5717
|
+
function readSkillDescription(skillDir) {
|
|
5718
|
+
try {
|
|
5719
|
+
const skillMdPath = path12.join(skillDir, "SKILL.md");
|
|
5720
|
+
if (!fs13.existsSync(skillMdPath)) return void 0;
|
|
5721
|
+
const content = fs13.readFileSync(skillMdPath, "utf-8");
|
|
5722
|
+
const parsed = parseSkillMd(content);
|
|
5723
|
+
return parsed?.metadata?.description ?? void 0;
|
|
5724
|
+
} catch {
|
|
5725
|
+
return void 0;
|
|
5726
|
+
}
|
|
5727
|
+
}
|
|
5707
5728
|
async function skillsRoutes(app) {
|
|
5708
5729
|
app.get("/skills", async (_request, reply) => {
|
|
5709
5730
|
const approved = listApproved();
|
|
5710
5731
|
const quarantined = listQuarantined();
|
|
5711
5732
|
const downloaded = listDownloadedSkills();
|
|
5733
|
+
const skillsDir2 = getSkillsDir();
|
|
5712
5734
|
const approvedNames = new Set(approved.map((a) => a.name));
|
|
5713
5735
|
const availableDownloads = downloaded.filter((d) => !approvedNames.has(d.slug));
|
|
5714
|
-
const
|
|
5736
|
+
const quarantinedNames = new Set(quarantined.map((q) => q.name));
|
|
5737
|
+
let onDiskNames = [];
|
|
5738
|
+
if (skillsDir2) {
|
|
5739
|
+
try {
|
|
5740
|
+
onDiskNames = fs13.readdirSync(skillsDir2, { withFileTypes: true }).filter((d) => d.isDirectory()).map((d) => d.name);
|
|
5741
|
+
} catch {
|
|
5742
|
+
}
|
|
5743
|
+
}
|
|
5744
|
+
const workspaceNames = onDiskNames.filter(
|
|
5745
|
+
(n) => !approvedNames.has(n) && !quarantinedNames.has(n)
|
|
5746
|
+
);
|
|
5715
5747
|
const data = [
|
|
5716
|
-
// Approved → active
|
|
5748
|
+
// Approved → active (with descriptions from SKILL.md)
|
|
5717
5749
|
...approved.map((a) => ({
|
|
5718
5750
|
name: a.name,
|
|
5719
5751
|
source: "user",
|
|
5720
5752
|
status: "active",
|
|
5721
5753
|
path: path12.join(skillsDir2 ?? "", a.name),
|
|
5722
5754
|
publisher: a.publisher,
|
|
5723
|
-
description: void 0
|
|
5755
|
+
description: skillsDir2 ? readSkillDescription(path12.join(skillsDir2, a.name)) : void 0
|
|
5724
5756
|
})),
|
|
5725
5757
|
// Quarantined
|
|
5726
5758
|
...quarantined.map((q) => ({
|
|
@@ -5730,6 +5762,14 @@ async function skillsRoutes(app) {
|
|
|
5730
5762
|
path: q.originalPath,
|
|
5731
5763
|
description: void 0
|
|
5732
5764
|
})),
|
|
5765
|
+
// Workspace: on disk but not approved or quarantined
|
|
5766
|
+
...workspaceNames.map((name) => ({
|
|
5767
|
+
name,
|
|
5768
|
+
source: "workspace",
|
|
5769
|
+
status: "workspace",
|
|
5770
|
+
path: path12.join(skillsDir2 ?? "", name),
|
|
5771
|
+
description: skillsDir2 ? readSkillDescription(path12.join(skillsDir2, name)) : void 0
|
|
5772
|
+
})),
|
|
5733
5773
|
// Downloaded (not installed) → available
|
|
5734
5774
|
...availableDownloads.map((d) => ({
|
|
5735
5775
|
name: d.slug,
|
|
@@ -5880,8 +5920,8 @@ async function skillsRoutes(app) {
|
|
|
5880
5920
|
fs13.writeFileSync(filePath, file.content, "utf-8");
|
|
5881
5921
|
}
|
|
5882
5922
|
try {
|
|
5883
|
-
|
|
5884
|
-
|
|
5923
|
+
execSync8(`chown -R root:${socketGroup} "${skillDir}"`, { stdio: "pipe" });
|
|
5924
|
+
execSync8(`chmod -R a+rX,go-w "${skillDir}"`, { stdio: "pipe" });
|
|
5885
5925
|
} catch {
|
|
5886
5926
|
}
|
|
5887
5927
|
createSkillWrapper(name, binDir);
|
|
@@ -5942,8 +5982,8 @@ async function skillsRoutes(app) {
|
|
|
5942
5982
|
fs13.writeFileSync(filePath, file.content, "utf-8");
|
|
5943
5983
|
}
|
|
5944
5984
|
try {
|
|
5945
|
-
|
|
5946
|
-
|
|
5985
|
+
execSync8(`chown -R root:${socketGroup} "${skillDir}"`, { stdio: "pipe" });
|
|
5986
|
+
execSync8(`chmod -R a+rX,go-w "${skillDir}"`, { stdio: "pipe" });
|
|
5947
5987
|
} catch {
|
|
5948
5988
|
}
|
|
5949
5989
|
createSkillWrapper(name, binDir);
|
|
@@ -6979,8 +7019,6 @@ async function marketplaceRoutes(app) {
|
|
|
6979
7019
|
if (brokerResult.wrapperPath) {
|
|
6980
7020
|
logs.push(`Wrapper created: ${brokerResult.wrapperPath}`);
|
|
6981
7021
|
}
|
|
6982
|
-
addSkillEntry(slug);
|
|
6983
|
-
logs.push("Config entry added");
|
|
6984
7022
|
addSkillPolicy(slug);
|
|
6985
7023
|
logs.push("Policy rule added");
|
|
6986
7024
|
emitSkillInstallProgress(slug, "local_analysis", "Running local analysis");
|
|
@@ -7055,6 +7093,120 @@ async function fsRoutes(app) {
|
|
|
7055
7093
|
});
|
|
7056
7094
|
}
|
|
7057
7095
|
|
|
7096
|
+
// libs/shield-daemon/src/services/activity-log.ts
|
|
7097
|
+
import * as fs17 from "node:fs";
|
|
7098
|
+
import * as path16 from "node:path";
|
|
7099
|
+
var ACTIVITY_FILE = "activity.jsonl";
|
|
7100
|
+
var MAX_SIZE_BYTES = 100 * 1024 * 1024;
|
|
7101
|
+
var MAX_AGE_MS = 24 * 60 * 60 * 1e3;
|
|
7102
|
+
var PRUNE_INTERVAL = 1e3;
|
|
7103
|
+
var instance = null;
|
|
7104
|
+
function getActivityLog() {
|
|
7105
|
+
if (!instance) {
|
|
7106
|
+
instance = new ActivityLog();
|
|
7107
|
+
}
|
|
7108
|
+
return instance;
|
|
7109
|
+
}
|
|
7110
|
+
var ActivityLog = class {
|
|
7111
|
+
filePath;
|
|
7112
|
+
writeCount = 0;
|
|
7113
|
+
unsubscribe;
|
|
7114
|
+
constructor() {
|
|
7115
|
+
this.filePath = path16.join(getConfigDir(), ACTIVITY_FILE);
|
|
7116
|
+
}
|
|
7117
|
+
/** Read historical events from the JSONL file, newest first */
|
|
7118
|
+
getHistory(limit = 500) {
|
|
7119
|
+
if (!fs17.existsSync(this.filePath)) return [];
|
|
7120
|
+
const content = fs17.readFileSync(this.filePath, "utf-8");
|
|
7121
|
+
const lines = content.split("\n").filter(Boolean);
|
|
7122
|
+
const events = [];
|
|
7123
|
+
for (const line of lines) {
|
|
7124
|
+
try {
|
|
7125
|
+
const evt = JSON.parse(line);
|
|
7126
|
+
if (evt.type === "heartbeat") continue;
|
|
7127
|
+
events.push(evt);
|
|
7128
|
+
} catch {
|
|
7129
|
+
}
|
|
7130
|
+
}
|
|
7131
|
+
events.reverse();
|
|
7132
|
+
return events.slice(0, limit);
|
|
7133
|
+
}
|
|
7134
|
+
start() {
|
|
7135
|
+
this.pruneOldEntries();
|
|
7136
|
+
this.unsubscribe = daemonEvents.subscribe((event) => {
|
|
7137
|
+
this.append(event);
|
|
7138
|
+
});
|
|
7139
|
+
}
|
|
7140
|
+
stop() {
|
|
7141
|
+
this.unsubscribe?.();
|
|
7142
|
+
}
|
|
7143
|
+
append(event) {
|
|
7144
|
+
const line = JSON.stringify(event) + "\n";
|
|
7145
|
+
fs17.appendFileSync(this.filePath, line, "utf-8");
|
|
7146
|
+
this.writeCount++;
|
|
7147
|
+
if (this.writeCount % PRUNE_INTERVAL === 0) {
|
|
7148
|
+
this.rotate();
|
|
7149
|
+
}
|
|
7150
|
+
}
|
|
7151
|
+
rotate() {
|
|
7152
|
+
try {
|
|
7153
|
+
const stat = fs17.statSync(this.filePath);
|
|
7154
|
+
if (stat.size > MAX_SIZE_BYTES) {
|
|
7155
|
+
this.truncateBySize();
|
|
7156
|
+
}
|
|
7157
|
+
} catch {
|
|
7158
|
+
}
|
|
7159
|
+
this.pruneOldEntries();
|
|
7160
|
+
}
|
|
7161
|
+
/** Keep newest half of lines when file exceeds size limit */
|
|
7162
|
+
truncateBySize() {
|
|
7163
|
+
const content = fs17.readFileSync(this.filePath, "utf-8");
|
|
7164
|
+
const lines = content.split("\n").filter(Boolean);
|
|
7165
|
+
const keep = lines.slice(Math.floor(lines.length / 2));
|
|
7166
|
+
fs17.writeFileSync(this.filePath, keep.join("\n") + "\n", "utf-8");
|
|
7167
|
+
}
|
|
7168
|
+
/** Remove entries older than 24 hours */
|
|
7169
|
+
pruneOldEntries() {
|
|
7170
|
+
if (!fs17.existsSync(this.filePath)) return;
|
|
7171
|
+
const content = fs17.readFileSync(this.filePath, "utf-8");
|
|
7172
|
+
const lines = content.split("\n").filter(Boolean);
|
|
7173
|
+
const cutoff = Date.now() - MAX_AGE_MS;
|
|
7174
|
+
const kept = lines.filter((line) => {
|
|
7175
|
+
try {
|
|
7176
|
+
const evt = JSON.parse(line);
|
|
7177
|
+
return new Date(evt.timestamp).getTime() >= cutoff;
|
|
7178
|
+
} catch {
|
|
7179
|
+
return false;
|
|
7180
|
+
}
|
|
7181
|
+
});
|
|
7182
|
+
if (kept.length < lines.length) {
|
|
7183
|
+
fs17.writeFileSync(this.filePath, kept.join("\n") + "\n", "utf-8");
|
|
7184
|
+
}
|
|
7185
|
+
}
|
|
7186
|
+
};
|
|
7187
|
+
|
|
7188
|
+
// libs/shield-daemon/src/routes/activity.ts
|
|
7189
|
+
async function activityRoutes(app) {
|
|
7190
|
+
app.get(
|
|
7191
|
+
"/activity",
|
|
7192
|
+
async (request) => {
|
|
7193
|
+
const authenticated = isAuthenticated(request);
|
|
7194
|
+
const raw = Number(request.query.limit) || 500;
|
|
7195
|
+
const limit = Math.min(Math.max(raw, 1), 1e4);
|
|
7196
|
+
const events = getActivityLog().getHistory(limit);
|
|
7197
|
+
if (authenticated) {
|
|
7198
|
+
return { data: events };
|
|
7199
|
+
}
|
|
7200
|
+
const stripped = events.map((e) => ({
|
|
7201
|
+
type: e.type,
|
|
7202
|
+
timestamp: e.timestamp,
|
|
7203
|
+
data: {}
|
|
7204
|
+
}));
|
|
7205
|
+
return { data: stripped };
|
|
7206
|
+
}
|
|
7207
|
+
);
|
|
7208
|
+
}
|
|
7209
|
+
|
|
7058
7210
|
// libs/shield-daemon/src/routes/rpc.ts
|
|
7059
7211
|
function globToRegex(pattern) {
|
|
7060
7212
|
const regexPattern = pattern.replace(/[.+^${}()|[\]\\]/g, "\\$&").replace(/\*\*/g, "{{GLOBSTAR}}").replace(/\*/g, "[^/]*").replace(/\?/g, ".").replace(/{{GLOBSTAR}}/g, ".*");
|
|
@@ -7253,7 +7405,7 @@ async function registerRoutes(app) {
|
|
|
7253
7405
|
});
|
|
7254
7406
|
app.addHook("onResponse", (request, reply, done) => {
|
|
7255
7407
|
if (!request.url.startsWith("/sse") && !request.url.startsWith("/rpc") && !request.url.includes(".") && !request.url.endsWith("/health")) {
|
|
7256
|
-
if (request.method === "GET" && request.url.startsWith("/api/status") && reply.statusCode === 200) {
|
|
7408
|
+
if (request.method === "GET" && (request.url.startsWith("/api/status") || request.url.startsWith("/api/activity")) && reply.statusCode === 200) {
|
|
7257
7409
|
done();
|
|
7258
7410
|
return;
|
|
7259
7411
|
}
|
|
@@ -7306,28 +7458,29 @@ async function registerRoutes(app) {
|
|
|
7306
7458
|
await api.register(secretsRoutes);
|
|
7307
7459
|
await api.register(marketplaceRoutes);
|
|
7308
7460
|
await api.register(fsRoutes);
|
|
7461
|
+
await api.register(activityRoutes);
|
|
7309
7462
|
},
|
|
7310
7463
|
{ prefix: API_PREFIX }
|
|
7311
7464
|
);
|
|
7312
7465
|
}
|
|
7313
7466
|
|
|
7314
7467
|
// libs/shield-daemon/src/static.ts
|
|
7315
|
-
import * as
|
|
7316
|
-
import * as
|
|
7468
|
+
import * as fs18 from "node:fs";
|
|
7469
|
+
import * as path17 from "node:path";
|
|
7317
7470
|
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
7318
7471
|
var __filename = fileURLToPath2(import.meta.url);
|
|
7319
|
-
var __dirname =
|
|
7472
|
+
var __dirname = path17.dirname(__filename);
|
|
7320
7473
|
function getUiAssetsPath() {
|
|
7321
|
-
const pkgRootPath =
|
|
7322
|
-
if (
|
|
7474
|
+
const pkgRootPath = path17.join(__dirname, "..", "ui-assets");
|
|
7475
|
+
if (fs18.existsSync(pkgRootPath)) {
|
|
7323
7476
|
return pkgRootPath;
|
|
7324
7477
|
}
|
|
7325
|
-
const bundledPath =
|
|
7326
|
-
if (
|
|
7478
|
+
const bundledPath = path17.join(__dirname, "ui-assets");
|
|
7479
|
+
if (fs18.existsSync(bundledPath)) {
|
|
7327
7480
|
return bundledPath;
|
|
7328
7481
|
}
|
|
7329
|
-
const devPath =
|
|
7330
|
-
if (
|
|
7482
|
+
const devPath = path17.join(__dirname, "..", "..", "..", "dist", "apps", "shield-ui");
|
|
7483
|
+
if (fs18.existsSync(devPath)) {
|
|
7331
7484
|
return devPath;
|
|
7332
7485
|
}
|
|
7333
7486
|
return null;
|
|
@@ -7386,74 +7539,6 @@ function stopSecurityWatcher() {
|
|
|
7386
7539
|
}
|
|
7387
7540
|
}
|
|
7388
7541
|
|
|
7389
|
-
// libs/shield-daemon/src/services/activity-log.ts
|
|
7390
|
-
import * as fs18 from "node:fs";
|
|
7391
|
-
import * as path17 from "node:path";
|
|
7392
|
-
var ACTIVITY_FILE = "activity.jsonl";
|
|
7393
|
-
var MAX_SIZE_BYTES = 100 * 1024 * 1024;
|
|
7394
|
-
var MAX_AGE_MS = 24 * 60 * 60 * 1e3;
|
|
7395
|
-
var PRUNE_INTERVAL = 1e3;
|
|
7396
|
-
var ActivityLog = class {
|
|
7397
|
-
filePath;
|
|
7398
|
-
writeCount = 0;
|
|
7399
|
-
unsubscribe;
|
|
7400
|
-
constructor() {
|
|
7401
|
-
this.filePath = path17.join(getConfigDir(), ACTIVITY_FILE);
|
|
7402
|
-
}
|
|
7403
|
-
start() {
|
|
7404
|
-
this.pruneOldEntries();
|
|
7405
|
-
this.unsubscribe = daemonEvents.subscribe((event) => {
|
|
7406
|
-
this.append(event);
|
|
7407
|
-
});
|
|
7408
|
-
}
|
|
7409
|
-
stop() {
|
|
7410
|
-
this.unsubscribe?.();
|
|
7411
|
-
}
|
|
7412
|
-
append(event) {
|
|
7413
|
-
const line = JSON.stringify(event) + "\n";
|
|
7414
|
-
fs18.appendFileSync(this.filePath, line, "utf-8");
|
|
7415
|
-
this.writeCount++;
|
|
7416
|
-
if (this.writeCount % PRUNE_INTERVAL === 0) {
|
|
7417
|
-
this.rotate();
|
|
7418
|
-
}
|
|
7419
|
-
}
|
|
7420
|
-
rotate() {
|
|
7421
|
-
try {
|
|
7422
|
-
const stat = fs18.statSync(this.filePath);
|
|
7423
|
-
if (stat.size > MAX_SIZE_BYTES) {
|
|
7424
|
-
this.truncateBySize();
|
|
7425
|
-
}
|
|
7426
|
-
} catch {
|
|
7427
|
-
}
|
|
7428
|
-
this.pruneOldEntries();
|
|
7429
|
-
}
|
|
7430
|
-
/** Keep newest half of lines when file exceeds size limit */
|
|
7431
|
-
truncateBySize() {
|
|
7432
|
-
const content = fs18.readFileSync(this.filePath, "utf-8");
|
|
7433
|
-
const lines = content.split("\n").filter(Boolean);
|
|
7434
|
-
const keep = lines.slice(Math.floor(lines.length / 2));
|
|
7435
|
-
fs18.writeFileSync(this.filePath, keep.join("\n") + "\n", "utf-8");
|
|
7436
|
-
}
|
|
7437
|
-
/** Remove entries older than 24 hours */
|
|
7438
|
-
pruneOldEntries() {
|
|
7439
|
-
if (!fs18.existsSync(this.filePath)) return;
|
|
7440
|
-
const content = fs18.readFileSync(this.filePath, "utf-8");
|
|
7441
|
-
const lines = content.split("\n").filter(Boolean);
|
|
7442
|
-
const cutoff = Date.now() - MAX_AGE_MS;
|
|
7443
|
-
const kept = lines.filter((line) => {
|
|
7444
|
-
try {
|
|
7445
|
-
const evt = JSON.parse(line);
|
|
7446
|
-
return new Date(evt.timestamp).getTime() >= cutoff;
|
|
7447
|
-
} catch {
|
|
7448
|
-
return false;
|
|
7449
|
-
}
|
|
7450
|
-
});
|
|
7451
|
-
if (kept.length < lines.length) {
|
|
7452
|
-
fs18.writeFileSync(this.filePath, kept.join("\n") + "\n", "utf-8");
|
|
7453
|
-
}
|
|
7454
|
-
}
|
|
7455
|
-
};
|
|
7456
|
-
|
|
7457
7542
|
// libs/shield-daemon/src/server.ts
|
|
7458
7543
|
async function createServer(config) {
|
|
7459
7544
|
const app = Fastify({
|
|
@@ -7492,7 +7577,7 @@ async function startServer(config) {
|
|
|
7492
7577
|
onQuarantined: (info) => emitSkillQuarantined(info.name, info.reason),
|
|
7493
7578
|
onApproved: (name) => emitSkillApproved(name)
|
|
7494
7579
|
}, 3e4);
|
|
7495
|
-
const activityLog =
|
|
7580
|
+
const activityLog = getActivityLog();
|
|
7496
7581
|
activityLog.start();
|
|
7497
7582
|
try {
|
|
7498
7583
|
const vault = getVault();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agenshield/daemon",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "AgenShield HTTP daemon server with embedded UI",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
],
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@agenshield/ipc": "0.4.
|
|
28
|
-
"@agenshield/broker": "0.4.
|
|
29
|
-
"@agenshield/sandbox": "0.4.
|
|
27
|
+
"@agenshield/ipc": "0.4.4",
|
|
28
|
+
"@agenshield/broker": "0.4.4",
|
|
29
|
+
"@agenshield/sandbox": "0.4.4",
|
|
30
30
|
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
31
31
|
"fastify": "^5.7.0",
|
|
32
32
|
"zod": "^4.3.6",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"activity.d.ts","sourceRoot":"","sources":["../../src/routes/activity.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAkB,MAAM,SAAS,CAAC;AAI/D,wBAAsB,cAAc,CAAC,GAAG,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAuBxE"}
|
package/routes/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/routes/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/routes/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAqB/C;;GAEG;AACH,wBAAsB,cAAc,CAAC,GAAG,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAuFxE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"marketplace.d.ts","sourceRoot":"","sources":["../../src/routes/marketplace.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,KAAK,EAAE,eAAe,EAAgC,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"marketplace.d.ts","sourceRoot":"","sources":["../../src/routes/marketplace.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,KAAK,EAAE,eAAe,EAAgC,MAAM,SAAS,CAAC;AAkC7E,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAoX3E"}
|
package/routes/skills.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skills.d.ts","sourceRoot":"","sources":["../../src/routes/skills.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,KAAK,EAAE,eAAe,EAAgC,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"skills.d.ts","sourceRoot":"","sources":["../../src/routes/skills.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,KAAK,EAAE,eAAe,EAAgC,MAAM,SAAS,CAAC;AA0D7E;;GAEG;AACH,wBAAsB,YAAY,CAAC,GAAG,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CA+ZtE"}
|
|
@@ -4,11 +4,15 @@
|
|
|
4
4
|
* Appends every daemon event as JSONL to ~/.agenshield/activity.jsonl.
|
|
5
5
|
* Rotation: max 100 MB file size (keep newest half), max 24 h retention.
|
|
6
6
|
*/
|
|
7
|
+
import { type DaemonEvent } from '../events/emitter';
|
|
8
|
+
export declare function getActivityLog(): ActivityLog;
|
|
7
9
|
export declare class ActivityLog {
|
|
8
10
|
private filePath;
|
|
9
11
|
private writeCount;
|
|
10
12
|
private unsubscribe?;
|
|
11
13
|
constructor();
|
|
14
|
+
/** Read historical events from the JSONL file, newest first */
|
|
15
|
+
getHistory(limit?: number): DaemonEvent[];
|
|
12
16
|
start(): void;
|
|
13
17
|
stop(): void;
|
|
14
18
|
private append;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activity-log.d.ts","sourceRoot":"","sources":["../../src/services/activity-log.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"activity-log.d.ts","sourceRoot":"","sources":["../../src/services/activity-log.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAgB,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAUnE,wBAAgB,cAAc,IAAI,WAAW,CAK5C;AAED,qBAAa,WAAW;IACtB,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,UAAU,CAAK;IACvB,OAAO,CAAC,WAAW,CAAC,CAAa;;IAMjC,+DAA+D;IAC/D,UAAU,CAAC,KAAK,SAAM,GAAG,WAAW,EAAE;IAmBtC,KAAK,IAAI,IAAI;IAOb,IAAI,IAAI,IAAI;IAIZ,OAAO,CAAC,MAAM;IAWd,OAAO,CAAC,MAAM;IAYd,6DAA6D;IAC7D,OAAO,CAAC,cAAc;IAOtB,yCAAyC;IACzC,OAAO,CAAC,eAAe;CAiBxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openclaw-config.d.ts","sourceRoot":"","sources":["../../src/services/openclaw-config.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"openclaw-config.d.ts","sourceRoot":"","sources":["../../src/services/openclaw-config.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAiDH;;GAEG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAiB9E;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAQnD"}
|