@nowcrew/daemon 0.6.11 → 0.6.12
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.
|
@@ -440,8 +440,6 @@ const materializeWorkspaceTraining = async (agentsRoot, handle, ability) => {
|
|
|
440
440
|
for (const mount of mounts) {
|
|
441
441
|
const sources = verified.files.filter((file) => file.path.endsWith(".md")
|
|
442
442
|
&& (file.path === mount.path || file.path.startsWith(`${mount.path}/`)));
|
|
443
|
-
if (sources.length === 0)
|
|
444
|
-
throw new Error(`ability_memory_mount_empty:${mount.path}`);
|
|
445
443
|
for (const source of sources) {
|
|
446
444
|
const relativePath = source.path === mount.path
|
|
447
445
|
? source.path.split("/").at(-1)
|
|
@@ -467,7 +465,10 @@ const materializeWorkspaceTraining = async (agentsRoot, handle, ability) => {
|
|
|
467
465
|
: join(sourceRoot, asset.source);
|
|
468
466
|
await cp(source, target, { recursive: true, preserveTimestamps: true });
|
|
469
467
|
}
|
|
470
|
-
const evalPaths = [
|
|
468
|
+
const evalPaths = [
|
|
469
|
+
...(verified.manifest.spec.evals.policy === undefined ? [] : [verified.manifest.spec.evals.policy]),
|
|
470
|
+
...verified.manifest.spec.evals.cases,
|
|
471
|
+
];
|
|
471
472
|
for (const path of evalPaths) {
|
|
472
473
|
const target = join(staging, "evals", layerRelativePath(path, "evals"));
|
|
473
474
|
await mkdir(dirname(target), { recursive: true });
|
|
@@ -253,9 +253,19 @@ const scan = (files, manifest) => {
|
|
|
253
253
|
if (executable.has(extname(file.path).toLowerCase()))
|
|
254
254
|
findings.push({ code: "executable_asset", path: file.path });
|
|
255
255
|
}
|
|
256
|
-
const required = new Set(["instructions"
|
|
256
|
+
const required = new Set(["instructions"]);
|
|
257
257
|
if (manifest.spec.skills.length > 0)
|
|
258
258
|
required.add("skills");
|
|
259
|
+
if (manifest.spec.memory.policy.length > 0)
|
|
260
|
+
required.add("memory-policy");
|
|
261
|
+
if (manifest.spec.memory.seeds.length > 0)
|
|
262
|
+
required.add("memory-seed");
|
|
263
|
+
if (manifest.spec.workspace.assets.length > 0)
|
|
264
|
+
required.add("workspace");
|
|
265
|
+
if (manifest.spec.evals.policy !== undefined)
|
|
266
|
+
required.add("eval-policy");
|
|
267
|
+
if (manifest.spec.evals.cases.length > 0)
|
|
268
|
+
required.add("eval-cases");
|
|
259
269
|
return { findings, required };
|
|
260
270
|
};
|
|
261
271
|
const lockedManifestPaths = (manifest) => [
|
|
@@ -264,7 +274,7 @@ const lockedManifestPaths = (manifest) => [
|
|
|
264
274
|
...manifest.spec.memory.policy.map((entry) => entry.path),
|
|
265
275
|
...manifest.spec.memory.seeds.map((entry) => entry.path),
|
|
266
276
|
...manifest.spec.workspace.assets.map((entry) => entry.source),
|
|
267
|
-
manifest.spec.evals.policy,
|
|
277
|
+
...(manifest.spec.evals.policy === undefined ? [] : [manifest.spec.evals.policy]),
|
|
268
278
|
...manifest.spec.evals.cases,
|
|
269
279
|
];
|
|
270
280
|
export const evaluateAbilityCases = (files, manifest, lock, memory) => {
|
|
@@ -367,7 +377,7 @@ export async function resolveAbilityRelease(agentsRoot, command) {
|
|
|
367
377
|
const assertions = [
|
|
368
378
|
{ name: "manifest_lock_verified", passed: true },
|
|
369
379
|
{ name: "manifest_asset_paths_locked", passed: lockedManifestPaths(manifest).every((path) => lockedPaths.has(path)) },
|
|
370
|
-
{ name: "
|
|
380
|
+
{ name: "declared_layers_resolvable", passed: [...security.required].every((kind) => kind === "skills" ? kinds.has(kind) || (manifest.spec.skills.length > 0 && lock.dependencies.length > 0) : kinds.has(kind)) },
|
|
371
381
|
{ name: "dependencies_pinned", passed: lock.dependencies.every((dependency) => /^[a-f0-9]{40}$/u.test(dependency.commit)) },
|
|
372
382
|
{ name: "security_scan_clear", passed: security.findings.length === 0 },
|
|
373
383
|
...evaluateAbilityCases(files, manifest, lock, memory),
|
|
@@ -61,16 +61,20 @@ export const DaemonAbilityManifestSchema = z.object({
|
|
|
61
61
|
skills: z.array(z.object({
|
|
62
62
|
name: z.string().min(1).max(128), source: z.union([LocalSkillSchema, GitSkillSchema]),
|
|
63
63
|
mount: SafeAbilityPathSchema, mode: ModeSchema, trust: z.string().max(128).optional(),
|
|
64
|
-
}).strict()).max(500),
|
|
64
|
+
}).strict()).max(500).default([]),
|
|
65
65
|
memory: z.object({
|
|
66
|
-
policy: z.array(z.object({ path: SafeAbilityPathSchema, mode: ModeSchema, mergeKey: z.string().optional() }).strict()).max(100),
|
|
67
|
-
seeds: z.array(z.object({ path: SafeAbilityPathSchema, mode: ModeSchema, mergeKey: z.string().optional() }).strict()).max(1_000),
|
|
68
|
-
runtime: z.object({ store: z.literal("nowcrew-managed"), promotion: z.literal("pull-request"), retentionDays: z.number().int().positive().optional() }).strict()
|
|
69
|
-
|
|
66
|
+
policy: z.array(z.object({ path: SafeAbilityPathSchema, mode: ModeSchema, mergeKey: z.string().optional() }).strict()).max(100).default([]),
|
|
67
|
+
seeds: z.array(z.object({ path: SafeAbilityPathSchema, mode: ModeSchema, mergeKey: z.string().optional() }).strict()).max(1_000).default([]),
|
|
68
|
+
runtime: z.object({ store: z.literal("nowcrew-managed"), promotion: z.literal("pull-request"), retentionDays: z.number().int().positive().optional() }).strict()
|
|
69
|
+
.default({ store: "nowcrew-managed", promotion: "pull-request" }),
|
|
70
|
+
}).strict().default({ policy: [], seeds: [], runtime: { store: "nowcrew-managed", promotion: "pull-request" } }),
|
|
70
71
|
workspace: z.object({ assets: z.array(z.object({
|
|
71
72
|
source: SafeAbilityPathSchema, target: WorkspaceAbilityTargetSchema, mode: ModeSchema,
|
|
72
|
-
}).strict()).max(1_000) }).strict(),
|
|
73
|
-
evals: z.object({
|
|
73
|
+
}).strict()).max(1_000).default([]) }).strict().default({ assets: [] }),
|
|
74
|
+
evals: z.object({
|
|
75
|
+
policy: SafeAbilityPathSchema.optional(),
|
|
76
|
+
cases: z.array(SafeAbilityPathSchema).max(1_000).default([]),
|
|
77
|
+
}).strict().default({ cases: [] }),
|
|
74
78
|
compatibility: z.object({
|
|
75
79
|
providers: z.array(z.enum(["claude", "codex", "kimi", "hermes", "opencode", "deepseek-harness"])).min(1),
|
|
76
80
|
minNowCrewVersion: z.string().regex(/^\d+\.\d+\.\d+$/u),
|
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.12",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "crew daemon — 运行在用户机器:拉起/管理 agent 进程,注入 crew CLI,归一化 runtime 事件",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -16,13 +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
|
-
"prepublishOnly": "pnpm build && node ../scripts/daemon-release-artifact.mjs --strict-registry",
|
|
23
|
-
"test": "vitest run",
|
|
24
|
-
"typecheck": "tsc --noEmit"
|
|
25
|
-
},
|
|
26
19
|
"dependencies": {
|
|
27
20
|
"@agentclientprotocol/sdk": "1.2.1",
|
|
28
21
|
"@nowcrew/cli": "^0.4.14",
|
|
@@ -41,5 +34,11 @@
|
|
|
41
34
|
"tsx": "^4.19.0",
|
|
42
35
|
"typescript": "^5.6.0",
|
|
43
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
|
+
"test": "vitest run",
|
|
42
|
+
"typecheck": "tsc --noEmit"
|
|
44
43
|
}
|
|
45
|
-
}
|
|
44
|
+
}
|