@crewhaus/target-crew 0.2.2 → 0.2.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/dist/index.js +14 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -150,6 +150,18 @@ function renderPermissionsField(ir) {
|
|
|
150
150
|
}
|
|
151
151
|
return `\n${lines.join("\n")}`;
|
|
152
152
|
}
|
|
153
|
+
/**
|
|
154
|
+
* Section 55 / item 23 — render the `failureTaxonomy` crew RunOptions field.
|
|
155
|
+
* The orchestrator threads it into every role's runChatLoop (same crew-wide
|
|
156
|
+
* scope as permissionMode/permissionRules). Empty when the spec omits the
|
|
157
|
+
* block (mirror: target-cli + target-channel-bot render the same field).
|
|
158
|
+
*/
|
|
159
|
+
function renderFailureTaxonomyField(ir) {
|
|
160
|
+
const taxonomy = ir.failureTaxonomy;
|
|
161
|
+
if (taxonomy === undefined || taxonomy.length === 0)
|
|
162
|
+
return "";
|
|
163
|
+
return `\n failureTaxonomy: ${JSON.stringify(taxonomy)},`;
|
|
164
|
+
}
|
|
153
165
|
// ---------------------------------------------------------------------------
|
|
154
166
|
// File: agent_<role>.ts — exports the role's RoleDefinition.
|
|
155
167
|
// ---------------------------------------------------------------------------
|
|
@@ -227,6 +239,7 @@ function renderDaemon(ir) {
|
|
|
227
239
|
? `import { BUILTIN_DEFAULT_RULES } from "@crewhaus/permission-engine";\n`
|
|
228
240
|
: "";
|
|
229
241
|
const permField = renderPermissionsField(ir);
|
|
242
|
+
const taxonomyField = renderFailureTaxonomyField(ir);
|
|
230
243
|
return `#!/usr/bin/env bun
|
|
231
244
|
// Generated by crewhaus. DO NOT EDIT.
|
|
232
245
|
// Source spec: ${escapeJsonString(ir.name)} (target: crew, ir version: ${ir.version}, file: daemon.ts)
|
|
@@ -240,7 +253,7 @@ async function main(): Promise<void> {
|
|
|
240
253
|
process.stderr.write("[crew] no input on stdin\\n");
|
|
241
254
|
process.exit(2);
|
|
242
255
|
}
|
|
243
|
-
const opts: Parameters<typeof crew.run>[1] = {${permField}
|
|
256
|
+
const opts: Parameters<typeof crew.run>[1] = {${permField}${taxonomyField}
|
|
244
257
|
};
|
|
245
258
|
let lastFinalOutput = "";
|
|
246
259
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crewhaus/target-crew",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Codegen for the CRW target — emits a daemon + per-role agent files driven by crew-orchestrator (Section 22)",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
"test": "bun test src"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@crewhaus/errors": "0.2.
|
|
19
|
-
"@crewhaus/infra-utils": "0.2.
|
|
20
|
-
"@crewhaus/ir": "0.2.
|
|
18
|
+
"@crewhaus/errors": "0.2.4",
|
|
19
|
+
"@crewhaus/infra-utils": "0.2.4",
|
|
20
|
+
"@crewhaus/ir": "0.2.4"
|
|
21
21
|
},
|
|
22
22
|
"license": "Apache-2.0",
|
|
23
23
|
"author": {
|