@corenel/cli 0.11.0 → 0.12.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/dist/main.js +17 -4
- package/package.json +8 -8
package/dist/main.js
CHANGED
|
@@ -33366,6 +33366,7 @@ import { resolveContextWindow as resolveContextWindow3, resolveContextWindowWith
|
|
|
33366
33366
|
import { basename as basename5 } from "node:path";
|
|
33367
33367
|
import { randomUUID } from "node:crypto";
|
|
33368
33368
|
import { allTools as allTools3 } from "@corenel/harness/tools/builtins";
|
|
33369
|
+
import { splitByTier as splitByTier2 } from "@corenel/harness/tools/toolSearch";
|
|
33369
33370
|
import { registerGuard as registerGuard2 } from "@corenel/harness/guards";
|
|
33370
33371
|
import { setPromptHost } from "@corenel/harness/prompts/host";
|
|
33371
33372
|
import { composeAgentSystem as composeAgentSystem3 } from "@corenel/harness/prompts";
|
|
@@ -33387,6 +33388,7 @@ import { PermissionService as PermissionService6 } from "@corenel/harness/guardr
|
|
|
33387
33388
|
// src/nodeContext.ts
|
|
33388
33389
|
import { ROOT_NODE_ID } from "@corenel/protocol";
|
|
33389
33390
|
import { makeSpawn } from "@corenel/harness/core/spawn";
|
|
33391
|
+
import { isDeferredTool } from "@corenel/harness/tools/toolSearch";
|
|
33390
33392
|
function inMemoryMemory() {
|
|
33391
33393
|
const items = /* @__PURE__ */ new Map();
|
|
33392
33394
|
return {
|
|
@@ -33470,6 +33472,8 @@ function nodeToolCtx(signal, opts = {}) {
|
|
|
33470
33472
|
policy: opts.spawn.policy,
|
|
33471
33473
|
permission: opts.spawn.permission,
|
|
33472
33474
|
compression: opts.spawn.compression,
|
|
33475
|
+
// A sub-agent defers the same tools its parent does.
|
|
33476
|
+
deferTool: isDeferredTool,
|
|
33473
33477
|
nodeId: ROOT_NODE_ID
|
|
33474
33478
|
// No onNodeEvent: the CLI has no DAG canvas to forward sub-agent progress
|
|
33475
33479
|
// to. A sub-agent's own tool-call/assistant events are invisible on this
|
|
@@ -33697,6 +33701,7 @@ function parsePolicyYaml(text2, agentName) {
|
|
|
33697
33701
|
const rawPush = raw.pushWaitMs;
|
|
33698
33702
|
const pushWaitMs = typeof rawPush === "number" && Number.isFinite(rawPush) && rawPush > 0 ? rawPush : void 0;
|
|
33699
33703
|
const skills = Array.isArray(raw.skills) ? raw.skills.filter((s) => typeof s === "string" && s.trim() !== "").map((s) => s.trim()) : void 0;
|
|
33704
|
+
const workflows = Array.isArray(raw.workflows) ? raw.workflows.filter((s) => typeof s === "string" && s.trim() !== "").map((s) => s.trim()) : void 0;
|
|
33700
33705
|
const donts = asDonts(raw.donts);
|
|
33701
33706
|
const dontsModel = typeof raw.donts_model === "string" && raw.donts_model.trim() ? raw.donts_model.trim() : void 0;
|
|
33702
33707
|
const policy = {
|
|
@@ -33727,6 +33732,7 @@ function parsePolicyYaml(text2, agentName) {
|
|
|
33727
33732
|
parkTimeoutMs,
|
|
33728
33733
|
...pushWaitMs !== void 0 ? { pushWaitMs } : {},
|
|
33729
33734
|
...skills && skills.length ? { skills } : {},
|
|
33735
|
+
...workflows && workflows.length ? { workflows } : {},
|
|
33730
33736
|
...donts ? { donts } : {},
|
|
33731
33737
|
...dontsModel ? { donts_model: dontsModel } : {}
|
|
33732
33738
|
};
|
|
@@ -34304,6 +34310,7 @@ function serializePolicy(policy) {
|
|
|
34304
34310
|
if (policy.mutatingDefault) ordered.mutatingDefault = policy.mutatingDefault;
|
|
34305
34311
|
if (policy.permissions && Object.keys(policy.permissions).length) ordered.permissions = policy.permissions;
|
|
34306
34312
|
if (policy.skills && policy.skills.length) ordered.skills = policy.skills;
|
|
34313
|
+
if (policy.workflows && policy.workflows.length) ordered.workflows = policy.workflows;
|
|
34307
34314
|
if (policy.donts && policy.donts.length) ordered.donts = policy.donts;
|
|
34308
34315
|
if (policy.donts_model) ordered.donts_model = policy.donts_model;
|
|
34309
34316
|
if (policy.tools) ordered.tools = policy.tools;
|
|
@@ -34436,6 +34443,7 @@ async function writeCrewAgentAt(files, root, def) {
|
|
|
34436
34443
|
async function copyCrewAgentAt(files, root, from, to) {
|
|
34437
34444
|
if (!isValidAgentName(to)) throw new Error(`invalid crew agent name: ${to}`);
|
|
34438
34445
|
if (await crewAgentPresent(files, root, to)) throw new Error(`crew agent ${to} already exists`);
|
|
34446
|
+
if (!await crewAgentPresent(files, root, from)) throw new Error(`crew agent ${from} is no longer here`);
|
|
34439
34447
|
const def = await loadCrewAgentAt(files, root, from);
|
|
34440
34448
|
const locked2 = isManaged(def) ? MANAGED_LOCKED : await managedLockReason(files, root, from);
|
|
34441
34449
|
if (locked2) throw new Error(`crew agent ${from} ${locked2}`);
|
|
@@ -34494,6 +34502,7 @@ import { saveCustomPolicy } from "@corenel/harness/guardrail";
|
|
|
34494
34502
|
import { allTools } from "@corenel/harness/tools/builtins";
|
|
34495
34503
|
import { registerSyncConfig, readConfigSyncRendered } from "@corenel/harness/prompts/syncConfig";
|
|
34496
34504
|
import { promptHost } from "@corenel/harness/prompts/host";
|
|
34505
|
+
import { FIT_THE_PROJECT } from "@corenel/harness/prompts/fitProject";
|
|
34497
34506
|
import { makeOrchestrationTools } from "@corenel/harness/tools/orchestrationSet";
|
|
34498
34507
|
|
|
34499
34508
|
// ../crew/delegates.ts
|
|
@@ -34582,7 +34591,8 @@ function identityBlock() {
|
|
|
34582
34591
|
You are a ${app} agent, one member of a crew of specialized agents serving the user. What follows defines your role in that crew.`;
|
|
34583
34592
|
}
|
|
34584
34593
|
function buildSystemExtra(def, memoryLocation) {
|
|
34585
|
-
const parts = [identityBlock()
|
|
34594
|
+
const parts = [identityBlock(), `--- Working in a project ---
|
|
34595
|
+
${FIT_THE_PROJECT}`];
|
|
34586
34596
|
if (def.jobTitle?.trim()) parts.push(`--- Role ---
|
|
34587
34597
|
${def.jobTitle.trim()}`);
|
|
34588
34598
|
if (def.soul.trim()) parts.push(`--- Soul ---
|
|
@@ -36071,6 +36081,7 @@ async function resolveCliApiBase(explicit, opts = {}) {
|
|
|
36071
36081
|
|
|
36072
36082
|
// src/runAgent.ts
|
|
36073
36083
|
import { allTools as allTools2 } from "@corenel/harness/tools/builtins";
|
|
36084
|
+
import { splitByTier } from "@corenel/harness/tools/toolSearch";
|
|
36074
36085
|
import { registerGuard } from "@corenel/harness/guards";
|
|
36075
36086
|
import { composeAgentSystem } from "@corenel/harness/prompts";
|
|
36076
36087
|
init_tools_node();
|
|
@@ -36180,7 +36191,8 @@ ${extra}` : base;
|
|
|
36180
36191
|
model: opts.model ?? def.settings.model ?? "gpt-4o-mini",
|
|
36181
36192
|
system,
|
|
36182
36193
|
messages: [{ role: "user", content: opts.input }],
|
|
36183
|
-
tools
|
|
36194
|
+
// Loaded tools ride every request; Listed and MCP tools are found with tool_search.
|
|
36195
|
+
...splitByTier(tools),
|
|
36184
36196
|
skills,
|
|
36185
36197
|
permission,
|
|
36186
36198
|
// Cause-aware refusal text -- see cli.ts's `run()` for why the kernel's
|
|
@@ -38146,7 +38158,7 @@ import { loadModes, loadPersonas } from "@corenel/harness/prompts/config";
|
|
|
38146
38158
|
import { composeAgentSystem as composeAgentSystem2 } from "@corenel/harness/prompts";
|
|
38147
38159
|
import { listSkills, readSkillInstructions, stripFrontmatter } from "@corenel/harness/skills";
|
|
38148
38160
|
function createIdentityState() {
|
|
38149
|
-
return { mode: "auto", persona: "" };
|
|
38161
|
+
return { mode: "auto", persona: "senior-dev" };
|
|
38150
38162
|
}
|
|
38151
38163
|
function makeSystemSource(state, tools) {
|
|
38152
38164
|
return async () => {
|
|
@@ -40016,7 +40028,8 @@ async function run(argv) {
|
|
|
40016
40028
|
model,
|
|
40017
40029
|
system,
|
|
40018
40030
|
messages: [{ role: "user", content: prompt }],
|
|
40019
|
-
tools
|
|
40031
|
+
// Loaded tools ride every request; Listed and MCP tools are found with tool_search.
|
|
40032
|
+
...splitByTier2(tools),
|
|
40020
40033
|
skills,
|
|
40021
40034
|
permission,
|
|
40022
40035
|
// Cause-aware refusal text: nobody was asked, so "denied by the user" would
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@corenel/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Corenel CLI — runs the harness in node, in-proc, no transport. The headless proof the kernel is host-agnostic. (corenel run/ask/chat/login + start --sidecar to follow.)",
|
|
6
6
|
"bin": {
|
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"openai": "^4.77.0",
|
|
11
11
|
"ws": "^8.18.0",
|
|
12
|
-
"@corenel/config": "0.8.
|
|
13
|
-
"@corenel/harness": "0.
|
|
14
|
-
"@corenel/mcp": "0.6.
|
|
15
|
-
"@corenel/protocol": "0.
|
|
16
|
-
"@corenel/term": "0.
|
|
12
|
+
"@corenel/config": "0.8.1",
|
|
13
|
+
"@corenel/harness": "0.21.0",
|
|
14
|
+
"@corenel/mcp": "0.6.6",
|
|
15
|
+
"@corenel/protocol": "0.19.0",
|
|
16
|
+
"@corenel/term": "0.9.0"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"esbuild": "^0.21.5",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"@types/ws": "^8.5.13",
|
|
22
22
|
"tsx": "^4.19.2",
|
|
23
23
|
"typescript": "^5.9.3",
|
|
24
|
-
"@corenel/
|
|
25
|
-
"@corenel/
|
|
24
|
+
"@corenel/tools-node": "0.11.0",
|
|
25
|
+
"@corenel/crew": "0.0.0"
|
|
26
26
|
},
|
|
27
27
|
"publishConfig": {
|
|
28
28
|
"access": "public"
|