@nowcrew/daemon 0.6.64 → 0.6.66
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/dist/agent-ability/resolver.js +10 -7
- package/dist/main.js +0 -0
- package/package.json +9 -10
|
@@ -9,8 +9,8 @@ import { abilityWorkspaceProjectionPath, DaemonAbilityLockSchema, DaemonAbilityM
|
|
|
9
9
|
import { PROJECT_MANIFEST_SOURCE_PATH, ProjectDependencyManifestSchema, } from "../project-dependency-manifest.js";
|
|
10
10
|
const runFile = promisify(execFile);
|
|
11
11
|
const MAX_FILES = 5_000;
|
|
12
|
-
const
|
|
13
|
-
const
|
|
12
|
+
export const AGENT_ABILITY_MAX_TOTAL_BYTES = 200 * 1024 * 1024;
|
|
13
|
+
export const AGENT_ABILITY_MAX_FILE_BYTES = 100 * 1024 * 1024;
|
|
14
14
|
const MAX_INSTRUCTIONS_BYTES = 96 * 1024;
|
|
15
15
|
const MAX_MEMORY_BYTES = 64 * 1024;
|
|
16
16
|
const AUTHORING_ONLY_ROOTS = new Set([".claude"]);
|
|
@@ -114,10 +114,11 @@ export const collectAbilityFiles = async (root) => {
|
|
|
114
114
|
if (info.isDirectory())
|
|
115
115
|
await visit(absolute);
|
|
116
116
|
else if (info.isFile()) {
|
|
117
|
-
if (info.size >
|
|
117
|
+
if (info.size > AGENT_ABILITY_MAX_FILE_BYTES) {
|
|
118
118
|
throw new Error(`ability_file_size_exceeded:${relative(root, absolute)}`);
|
|
119
|
+
}
|
|
119
120
|
totalBytes += info.size;
|
|
120
|
-
if (totalBytes >
|
|
121
|
+
if (totalBytes > AGENT_ABILITY_MAX_TOTAL_BYTES)
|
|
121
122
|
throw new Error("ability_total_size_exceeded");
|
|
122
123
|
if (files.length >= MAX_FILES)
|
|
123
124
|
throw new Error("ability_file_count_exceeded");
|
|
@@ -251,7 +252,7 @@ export const validateAbilityDependencyDeclarations = (manifest, lock) => {
|
|
|
251
252
|
throw new Error("ability_lock_has_undeclared_dependency");
|
|
252
253
|
}
|
|
253
254
|
};
|
|
254
|
-
const
|
|
255
|
+
export const scanAbilityFiles = (files, manifest) => {
|
|
255
256
|
const findings = [];
|
|
256
257
|
const secrets = [
|
|
257
258
|
/-----BEGIN (?:RSA |EC |OPENSSH )?PRIVATE KEY-----/u,
|
|
@@ -259,7 +260,9 @@ const scan = (files, manifest) => {
|
|
|
259
260
|
/\bAK(?:ID|IA)[A-Z0-9]{12,}\b/u,
|
|
260
261
|
];
|
|
261
262
|
const executable = new Set([".exe", ".dll", ".dylib", ".so", ".bin", ".class", ".jar"]);
|
|
262
|
-
const allowedBinaryDocuments = new Set([
|
|
263
|
+
const allowedBinaryDocuments = new Set([
|
|
264
|
+
".pdf", ".png", ".jpg", ".jpeg", ".gif", ".webp", ".xlsx", ".xls", ".docx", ".pptx", ".ttf", ".otf",
|
|
265
|
+
]);
|
|
263
266
|
for (const file of files) {
|
|
264
267
|
let text;
|
|
265
268
|
try {
|
|
@@ -382,7 +385,7 @@ export async function resolveAbilityRelease(agentsRoot, command) {
|
|
|
382
385
|
}
|
|
383
386
|
const externalPaths = await verifyExternalDependencies(cacheRoot, resolved.root, lock);
|
|
384
387
|
files = await collectAbilityFiles(resolved.root);
|
|
385
|
-
const security =
|
|
388
|
+
const security = scanAbilityFiles(files, manifest);
|
|
386
389
|
const kinds = new Set(lock.assets.map((asset) => asset.kind));
|
|
387
390
|
const memory = [];
|
|
388
391
|
for (const [layer, mounts] of [["release-policy", manifest.spec.memory.policy], ["release-seed", manifest.spec.memory.seeds]]) {
|
package/dist/main.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nowcrew/daemon",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.66",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "crew daemon — 运行在用户机器:拉起/管理 agent 进程,注入 crew CLI,归一化 runtime 事件",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -16,14 +16,6 @@
|
|
|
16
16
|
"publishConfig": {
|
|
17
17
|
"access": "public"
|
|
18
18
|
},
|
|
19
|
-
"scripts": {
|
|
20
|
-
"daemon": "pnpm --filter @nowcrew/cli build && tsx src/main.ts",
|
|
21
|
-
"build": "tsc -p tsconfig.json",
|
|
22
|
-
"codex-home:migrate": "tsx src/runtimes/codex-home-migration-cli.ts",
|
|
23
|
-
"prepublishOnly": "pnpm build && node ../scripts/daemon-release-artifact.mjs --strict-registry",
|
|
24
|
-
"test": "vitest run",
|
|
25
|
-
"typecheck": "tsc --noEmit"
|
|
26
|
-
},
|
|
27
19
|
"dependencies": {
|
|
28
20
|
"@agentclientprotocol/sdk": "1.2.1",
|
|
29
21
|
"@nowcrew/cli": "^0.4.13",
|
|
@@ -42,5 +34,12 @@
|
|
|
42
34
|
"tsx": "^4.19.0",
|
|
43
35
|
"typescript": "^5.6.0",
|
|
44
36
|
"vitest": "^2.1.0"
|
|
37
|
+
},
|
|
38
|
+
"scripts": {
|
|
39
|
+
"daemon": "pnpm --filter @nowcrew/cli build && tsx src/main.ts",
|
|
40
|
+
"build": "tsc -p tsconfig.json",
|
|
41
|
+
"codex-home:migrate": "tsx src/runtimes/codex-home-migration-cli.ts",
|
|
42
|
+
"test": "vitest run",
|
|
43
|
+
"typecheck": "tsc --noEmit"
|
|
45
44
|
}
|
|
46
|
-
}
|
|
45
|
+
}
|