@corenel/harness 0.7.5 → 0.9.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/conversation.d.ts +15 -0
- package/dist/conversation.d.ts.map +1 -1
- package/dist/conversation.js +13 -1
- package/dist/conversation.js.map +1 -1
- package/dist/core/compactHistory.d.ts +84 -0
- package/dist/core/compactHistory.d.ts.map +1 -0
- package/dist/core/compactHistory.js +206 -0
- package/dist/core/compactHistory.js.map +1 -0
- package/dist/core/contextPressure.d.ts +45 -0
- package/dist/core/contextPressure.d.ts.map +1 -0
- package/dist/core/contextPressure.js +69 -0
- package/dist/core/contextPressure.js.map +1 -0
- package/dist/core/loop.d.ts +25 -0
- package/dist/core/loop.d.ts.map +1 -1
- package/dist/core/loop.js +176 -13
- package/dist/core/loop.js.map +1 -1
- package/dist/core/pricing.d.ts +30 -1
- package/dist/core/pricing.d.ts.map +1 -1
- package/dist/core/pricing.js +50 -21
- package/dist/core/pricing.js.map +1 -1
- package/dist/core/summarize.d.ts +10 -0
- package/dist/core/summarize.d.ts.map +1 -0
- package/dist/core/summarize.js +66 -0
- package/dist/core/summarize.js.map +1 -0
- package/dist/guardrail/builtins.d.ts.map +1 -1
- package/dist/guardrail/builtins.js +9 -3
- package/dist/guardrail/builtins.js.map +1 -1
- package/dist/guardrail/validate.d.ts.map +1 -1
- package/dist/guardrail/validate.js +6 -2
- package/dist/guardrail/validate.js.map +1 -1
- package/dist/prompts/host.d.ts +23 -0
- package/dist/prompts/host.d.ts.map +1 -1
- package/dist/prompts/host.js.map +1 -1
- package/dist/prompts/index.d.ts +14 -0
- package/dist/prompts/index.d.ts.map +1 -1
- package/dist/prompts/index.js +43 -2
- package/dist/prompts/index.js.map +1 -1
- package/dist/prompts/library/defaults.generated.js +5 -5
- package/dist/prompts/library/defaults.generated.js.map +1 -1
- package/dist/providers/contextWindow.d.ts +23 -4
- package/dist/providers/contextWindow.d.ts.map +1 -1
- package/dist/providers/contextWindow.js +25 -0
- package/dist/providers/contextWindow.js.map +1 -1
- package/dist/sessions/checkpointStore.d.ts +12 -0
- package/dist/sessions/checkpointStore.d.ts.map +1 -0
- package/dist/sessions/checkpointStore.js +48 -0
- package/dist/sessions/checkpointStore.js.map +1 -0
- package/dist/sessions/fileSessionStore.d.ts +4 -0
- package/dist/sessions/fileSessionStore.d.ts.map +1 -1
- package/dist/sessions/fileSessionStore.js +28 -2
- package/dist/sessions/fileSessionStore.js.map +1 -1
- package/dist/skillSource.d.ts +36 -0
- package/dist/skillSource.d.ts.map +1 -0
- package/dist/skillSource.js +105 -0
- package/dist/skillSource.js.map +1 -0
- package/dist/skills.d.ts +38 -2
- package/dist/skills.d.ts.map +1 -1
- package/dist/skills.js +64 -9
- package/dist/skills.js.map +1 -1
- package/dist/tools/builtins.d.ts.map +1 -1
- package/dist/tools/builtins.js +50 -2
- package/dist/tools/builtins.js.map +1 -1
- package/dist/tools/project.d.ts +11 -0
- package/dist/tools/project.d.ts.map +1 -0
- package/dist/tools/project.js +133 -0
- package/dist/tools/project.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { AgentTool, ToolContext } from '@corenel/protocol';
|
|
2
|
+
/** Folder → name for every project in the workspace. */
|
|
3
|
+
export declare function findProjects(ctx: ToolContext): Promise<{
|
|
4
|
+
root: string;
|
|
5
|
+
name: string;
|
|
6
|
+
}[]>;
|
|
7
|
+
/** The app's slug rule, kept identical so a project made here and one made in
|
|
8
|
+
* the rail land in the same folder for the same name. */
|
|
9
|
+
export declare function projectSlug(name: string): string;
|
|
10
|
+
export declare const startProjectTool: AgentTool;
|
|
11
|
+
//# sourceMappingURL=project.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../tools/project.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAQhE,wDAAwD;AACxD,wBAAsB,YAAY,CAAC,GAAG,EAAE,WAAW,GAAG,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EAAE,CAAC,CAgB9F;AAED;yDACyD;AACzD,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAGhD;AAWD,eAAO,MAAM,gBAAgB,EAAE,SA6F9B,CAAC"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { stateDirName, flattenFiles } from '@corenel/protocol';
|
|
2
|
+
const manifestSuffix = () => `${stateDirName()}/craft/project.json`;
|
|
3
|
+
/** Folder → name for every project in the workspace. */
|
|
4
|
+
export async function findProjects(ctx) {
|
|
5
|
+
const files = ctx.files;
|
|
6
|
+
if (!files)
|
|
7
|
+
return [];
|
|
8
|
+
const suffix = manifestSuffix();
|
|
9
|
+
const nodes = await files.list().catch(() => []);
|
|
10
|
+
const out = [];
|
|
11
|
+
for (const node of flattenFiles(nodes)) {
|
|
12
|
+
const p = node.path;
|
|
13
|
+
const root = p === suffix ? '' : p.endsWith(`/${suffix}`) ? p.slice(0, -(suffix.length + 1)) : null;
|
|
14
|
+
if (root === null)
|
|
15
|
+
continue;
|
|
16
|
+
try {
|
|
17
|
+
const m = JSON.parse(await files.read(p));
|
|
18
|
+
if (m && m.version === 1 && typeof m.name === 'string')
|
|
19
|
+
out.push({ root, name: m.name });
|
|
20
|
+
}
|
|
21
|
+
catch { /* an unreadable manifest is not a project */ }
|
|
22
|
+
}
|
|
23
|
+
return out;
|
|
24
|
+
}
|
|
25
|
+
/** The app's slug rule, kept identical so a project made here and one made in
|
|
26
|
+
* the rail land in the same folder for the same name. */
|
|
27
|
+
export function projectSlug(name) {
|
|
28
|
+
const s = name.trim().toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-+|-+$/g, '').slice(0, 64);
|
|
29
|
+
return s || 'project';
|
|
30
|
+
}
|
|
31
|
+
/** First free folder for this name — `notes`, then `notes-2`, … */
|
|
32
|
+
async function freeRoot(ctx, name) {
|
|
33
|
+
const files = ctx.files;
|
|
34
|
+
const base = projectSlug(name);
|
|
35
|
+
let root = base;
|
|
36
|
+
for (let i = 2; files && (await files.stat(root)) !== null; i++)
|
|
37
|
+
root = `${base}-${i}`;
|
|
38
|
+
return root;
|
|
39
|
+
}
|
|
40
|
+
export const startProjectTool = {
|
|
41
|
+
name: 'start_project',
|
|
42
|
+
/* DECLARED, like ask_user's, and for the same reason: its whole effect is to
|
|
43
|
+
* put a choice in front of someone who is already there, and the write it
|
|
44
|
+
* may then make is the thing they just chose. A permission prompt on top of
|
|
45
|
+
* the choice is two dialogs for one decision. */
|
|
46
|
+
permission: 'allow',
|
|
47
|
+
noOffload: true,
|
|
48
|
+
description: 'Use when the person asks for a DOCUMENT (a memo, report, deck, spreadsheet, diagram, page) and the system '
|
|
49
|
+
+ 'context says no project is open. Documents live inside a project, where they are versioned and shown beside '
|
|
50
|
+
+ 'the conversation; a file written outside one is invisible in this surface. Propose a short project name '
|
|
51
|
+
+ 'derived from what they asked for — the person confirms it, picks an existing project instead, or declines. '
|
|
52
|
+
+ 'This call WAITS for their answer and returns the folder to write into, or that they declined. Write the '
|
|
53
|
+
+ 'document inside that folder with the ordinary file tools. Do NOT use this for ordinary code or repository '
|
|
54
|
+
+ 'files, which belong where they already are.',
|
|
55
|
+
parameters: {
|
|
56
|
+
type: 'object',
|
|
57
|
+
properties: {
|
|
58
|
+
name: { type: 'string', description: 'Proposed project name, 2-4 words, derived from the request.' },
|
|
59
|
+
reason: { type: 'string', description: 'One short line: what is about to be written into it.' },
|
|
60
|
+
},
|
|
61
|
+
required: ['name'],
|
|
62
|
+
},
|
|
63
|
+
async run(args, ctx) {
|
|
64
|
+
const files = ctx.files;
|
|
65
|
+
if (!files)
|
|
66
|
+
return 'start_project is unavailable: no file workspace is connected.';
|
|
67
|
+
if (!ctx.ask)
|
|
68
|
+
return 'start_project is unavailable in this environment (nobody can be asked).';
|
|
69
|
+
if (!files.writable)
|
|
70
|
+
return 'This workspace is read-only, so no project can be created in it.';
|
|
71
|
+
const proposed = (typeof args.name === 'string' ? args.name : '').trim() || 'Untitled project';
|
|
72
|
+
const existing = await findProjects(ctx);
|
|
73
|
+
/* The proposal FIRST, so the one-tap path is the first thing under the
|
|
74
|
+
* cursor, then up to three existing projects. Three is the cap because
|
|
75
|
+
* ask_user takes 2-4 options and the proposal owns one of them; a long
|
|
76
|
+
* list here would be a project picker, which is the rail's job. */
|
|
77
|
+
const createLabel = `Create "${proposed}"`;
|
|
78
|
+
const options = [
|
|
79
|
+
{ label: createLabel, description: typeof args.reason === 'string' && args.reason ? args.reason : 'A new project for this work.' },
|
|
80
|
+
...existing.slice(0, 3).map((p) => ({ label: p.name, description: `Put it in the existing project at ${p.root || 'the workspace root'}.` })),
|
|
81
|
+
];
|
|
82
|
+
if (options.length < 2)
|
|
83
|
+
options.push({ label: 'Not now', description: 'Write nothing; the document has nowhere to live yet.' });
|
|
84
|
+
/* TWO questions in one card when the conversation can come along.
|
|
85
|
+
*
|
|
86
|
+
* The chat that asks for a document is the chat that project is FOR, and
|
|
87
|
+
* being asked afterwards, in a separate banner, to bring along the
|
|
88
|
+
* conversation you are already in is a second decision about the same
|
|
89
|
+
* thing. Asked here it is one card: where does this go, and does this
|
|
90
|
+
* conversation go with it.
|
|
91
|
+
*
|
|
92
|
+
* Only offered when the host can actually do it (ctx.moveSessionToProject
|
|
93
|
+
* is absent on a surface with no projects), and only phrased as a question
|
|
94
|
+
* when there is something to move it INTO. */
|
|
95
|
+
const canMove = !!ctx.moveSessionToProject;
|
|
96
|
+
const questions = [
|
|
97
|
+
{ header: 'Project', question: 'Documents live in a project. Where should this one go?', options },
|
|
98
|
+
...(canMove
|
|
99
|
+
? [{
|
|
100
|
+
header: 'This chat',
|
|
101
|
+
question: 'Bring this conversation into the project too?',
|
|
102
|
+
options: [
|
|
103
|
+
{ label: 'Yes, move it', description: 'The transcript moves with the work, and this chat carries on.' },
|
|
104
|
+
{ label: 'Keep it loose', description: 'The document goes in the project; this chat stays where it is.' },
|
|
105
|
+
],
|
|
106
|
+
}]
|
|
107
|
+
: []),
|
|
108
|
+
];
|
|
109
|
+
const answers = await ctx.ask(questions);
|
|
110
|
+
const picked = answers ? answers.Project?.[0] : undefined;
|
|
111
|
+
const move = answers ? answers['This chat']?.[0] === 'Yes, move it' : false;
|
|
112
|
+
if (!picked)
|
|
113
|
+
return 'The person did not choose a project. Do not write the document; say what you were about to write and that it needs a project.';
|
|
114
|
+
if (picked === 'Not now')
|
|
115
|
+
return 'The person declined to start a project. Do not write the document.';
|
|
116
|
+
/* The move is reported back as its own sentence, appended to the answer:
|
|
117
|
+
* the model has to know where this conversation now lives before it says
|
|
118
|
+
* what it did. */
|
|
119
|
+
const moved = async (root) => (move && ctx.moveSessionToProject ? ` ${await ctx.moveSessionToProject(root)}` : '');
|
|
120
|
+
const hit = existing.find((p) => p.name === picked);
|
|
121
|
+
if (hit)
|
|
122
|
+
return `Use the existing project "${hit.name}". Write the document inside ${hit.root || 'the workspace root'}/.${await moved(hit.root)}`;
|
|
123
|
+
/* Anything else is the create option, or a name they typed themselves --
|
|
124
|
+
* ask_user lets the person write their own answer, and a typed name is a
|
|
125
|
+
* name, not an error. */
|
|
126
|
+
const name = picked === createLabel ? proposed : picked;
|
|
127
|
+
const root = await freeRoot(ctx, name);
|
|
128
|
+
const manifest = { name, createdAt: Date.now(), version: 1 };
|
|
129
|
+
await files.write(`${root}/${manifestSuffix()}`, JSON.stringify(manifest, null, 2));
|
|
130
|
+
return `Created the project "${name}" at ${root}/. Write the document inside ${root}/ with the ordinary file tools; it will be versioned and shown beside this conversation.${await moved(root)}`;
|
|
131
|
+
},
|
|
132
|
+
};
|
|
133
|
+
//# sourceMappingURL=project.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project.js","sourceRoot":"","sources":["../../tools/project.ts"],"names":[],"mappings":"AAwBA,OAAO,E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,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC;QACpD,IAAI,GAAG;YAAE,OAAO,6BAA6B,GAAG,CAAC,IAAI,gCAAgC,GAAG,CAAC,IAAI,IAAI,oBAAoB,KAAK,MAAM,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;QAElJ;;iCAEyB;QACzB,MAAM,IAAI,GAAG,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC;QACxD,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QACvC,MAAM,QAAQ,GAAoB,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;QAC9E,MAAM,KAAK,CAAC,KAAK,CAAC,GAAG,IAAI,IAAI,cAAc,EAAE,EAAE,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QACpF,OAAO,wBAAwB,IAAI,QAAQ,IAAI,gCAAgC,IAAI,2FAA2F,MAAM,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;IACpM,CAAC;CACF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@corenel/harness",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"license": "Elastic-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Corenel — host-agnostic agent harness (kernel). The app resolves it via the `corenel` path alias (bypasses these exports entirely); vitest aliases it to source too. Everything else — node consumers like @corenel/cli, @corenel/term, @corenel/sidecar — resolves it through this workspace package via the exports map below, which points at dist/ unconditionally (not just at publish) so in-repo and published resolution are identical: a bundle that treats @corenel/harness as external (see packages/term/build.mjs) must see the SAME module instance node sees when it later resolves this package at runtime, and plain node cannot execute the raw .ts sources at all. Run `pnpm build` here (or let a dependent's prebuild do it) before relying on this package outside the app/vitest. NOTE: @xyflow/react and dagre are NOT dependencies here at all — this package has no .tsx files and imports neither. `react` IS a real (small) runtime dependency: `todos.ts` uses `useSyncExternalStore`. It is declared below as an OPTIONAL peer, not a hard dependency, so node-only consumers (cli/term/sidecar) aren't forced to install react; node consumers hoist it today only because something else in the tree happens to pull it in. Do not add @xyflow/react or dagre as dependencies/peers without testing a packed install end to end — an earlier attempt at that (before this package had any .tsx files) failed npm's peer resolution with ERESOLVE.",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"openai": "^4.77.0",
|
|
31
31
|
"yaml": "^2.8.3",
|
|
32
|
-
"@corenel/protocol": "0.
|
|
32
|
+
"@corenel/protocol": "0.8.0"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"react": "^18.0.0 || ^19.0.0"
|