@corenel/term 0.2.4 → 0.2.5
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/{chunk-F4ENQXQQ.js → chunk-6HFZCNQ4.js} +2 -2
- package/dist/{chunk-2D7G4YW2.js → chunk-FTTTCFRO.js} +9 -2
- package/dist/{chunk-IK4ZANNW.js → chunk-TYP4MMO7.js} +1 -1
- package/dist/describe.d.ts +4 -0
- package/dist/describe.d.ts.map +1 -1
- package/dist/describe.js +1 -1
- package/dist/ink/index.js +3 -3
- package/dist/persist.js +2 -2
- package/dist/session.js +3 -3
- package/package.json +4 -4
|
@@ -12,13 +12,13 @@ import {
|
|
|
12
12
|
import {
|
|
13
13
|
committedFromMessages,
|
|
14
14
|
titleFrom
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-TYP4MMO7.js";
|
|
16
16
|
import {
|
|
17
17
|
capPreview,
|
|
18
18
|
describeToolCall,
|
|
19
19
|
formatPolicy,
|
|
20
20
|
formatTools
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-FTTTCFRO.js";
|
|
22
22
|
|
|
23
23
|
// src/session.ts
|
|
24
24
|
import { runAgent } from "@corenel/harness/core/loop";
|
|
@@ -36,7 +36,13 @@ function formatTools(tools) {
|
|
|
36
36
|
const w = Math.max(...tools.map((t) => t.name.length));
|
|
37
37
|
const line = (t) => ` ${t.name.padEnd(w)} ${t.mutates ? "*" : " "} ${t.means ?? t.description.split(". ")[0]}`;
|
|
38
38
|
return [
|
|
39
|
-
|
|
39
|
+
/* "*" is what CHANGES things, which is not the same as what ASKS. A tool
|
|
40
|
+
* that writes only the agent's own memory plane (save_memory,
|
|
41
|
+
* forget_memory) changes something and is allowed without a prompt unless a
|
|
42
|
+
* policy names it -- see PermissionService.resolveBaseLevel. Saying "will
|
|
43
|
+
* ask first" here would be a promise this legend cannot keep; `/policy`
|
|
44
|
+
* shows the real level per namespace. */
|
|
45
|
+
`${tools.length} tools available (* = can change things; /policy shows what each one needs):`,
|
|
40
46
|
...[...tools].sort((a, b) => a.name.localeCompare(b.name)).map(line)
|
|
41
47
|
].join("\n");
|
|
42
48
|
}
|
|
@@ -64,7 +70,8 @@ function formatPolicy(policy, source, tools) {
|
|
|
64
70
|
name: t.name,
|
|
65
71
|
address: toolAddress(t),
|
|
66
72
|
...t.mutates !== void 0 ? { mutates: t.mutates } : {},
|
|
67
|
-
...t.permission ? { permission: t.permission } : {}
|
|
73
|
+
...t.permission ? { permission: t.permission } : {},
|
|
74
|
+
...t.roomSafe !== void 0 ? { roomSafe: t.roomSafe } : {}
|
|
68
75
|
};
|
|
69
76
|
return permission.resolveLevel(subject);
|
|
70
77
|
}));
|
package/dist/describe.d.ts
CHANGED
|
@@ -34,6 +34,10 @@ export declare function formatTools(tools: ToolFact[]): string;
|
|
|
34
34
|
export interface PolicyFormatTool extends NamespacedTool {
|
|
35
35
|
mutates?: boolean;
|
|
36
36
|
permission?: PermissionLevel;
|
|
37
|
+
/** Writes nothing outside the agent's own memory plane. `resolveBaseLevel`
|
|
38
|
+
* allows a `roomSafe` mutating tool that no policy names, so `/policy` has to
|
|
39
|
+
* carry it or it reports a level the gate does not apply. */
|
|
40
|
+
roomSafe?: boolean;
|
|
37
41
|
}
|
|
38
42
|
/**
|
|
39
43
|
* `/policy` — how this session is actually governed, in plain text (no
|
package/dist/describe.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"describe.d.ts","sourceRoot":"","sources":["../src/describe.ts"],"names":[],"mappings":"AAGA,OAAO,EAAmD,KAAK,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACzH,OAAO,KAAK,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAAqB,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEtE;8DAC8D;AAC9D,eAAO,MAAM,aAAa,IAAI,CAAC;AAC/B,eAAO,MAAM,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,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,MAAM,CAerD;AAED;0EAC0E;AAC1E,MAAM,WAAW,gBAAiB,SAAQ,cAAc;IACtD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B;;iEAE6D;IAC7D,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAID;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,KAAK,EAAE,SAAS,gBAAgB,EAAE,GAAG,MAAM,CA4C7G"}
|
package/dist/describe.js
CHANGED
package/dist/ink/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TermSession,
|
|
3
3
|
parseMarkdown
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-6HFZCNQ4.js";
|
|
5
5
|
import "../chunk-OSJFMQCW.js";
|
|
6
6
|
import {
|
|
7
7
|
filterCommands,
|
|
@@ -11,10 +11,10 @@ import "../chunk-M44CET5L.js";
|
|
|
11
11
|
import {
|
|
12
12
|
formatEndingChange
|
|
13
13
|
} from "../chunk-I44FC7PE.js";
|
|
14
|
-
import "../chunk-
|
|
14
|
+
import "../chunk-TYP4MMO7.js";
|
|
15
15
|
import {
|
|
16
16
|
formatOrd
|
|
17
|
-
} from "../chunk-
|
|
17
|
+
} from "../chunk-FTTTCFRO.js";
|
|
18
18
|
import {
|
|
19
19
|
sourceLabel
|
|
20
20
|
} from "../chunk-CB5RFNB4.js";
|
package/dist/persist.js
CHANGED
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
committedFromMessages,
|
|
3
3
|
createSessionPersistence,
|
|
4
4
|
titleFrom
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-TYP4MMO7.js";
|
|
6
|
+
import "./chunk-FTTTCFRO.js";
|
|
7
7
|
import "./chunk-CB5RFNB4.js";
|
|
8
8
|
export {
|
|
9
9
|
committedFromMessages,
|
package/dist/session.js
CHANGED
|
@@ -2,13 +2,13 @@ import {
|
|
|
2
2
|
DELTA_FLUSH_MS,
|
|
3
3
|
TOOL_DELTA_CAP,
|
|
4
4
|
TermSession
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-6HFZCNQ4.js";
|
|
6
6
|
import "./chunk-OSJFMQCW.js";
|
|
7
7
|
import "./chunk-VTJEWHM3.js";
|
|
8
8
|
import "./chunk-M44CET5L.js";
|
|
9
9
|
import "./chunk-I44FC7PE.js";
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-TYP4MMO7.js";
|
|
11
|
+
import "./chunk-FTTTCFRO.js";
|
|
12
12
|
import "./chunk-CB5RFNB4.js";
|
|
13
13
|
export {
|
|
14
14
|
DELTA_FLUSH_MS,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@corenel/term",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Corenel's terminal face — a headless chat controller plus its Ink views. `./session` is ink-free and shared with the CLI's readline fallback; only `./ink` pulls React. dist/ is bundled (see build.mjs), but @corenel/harness and @corenel/protocol stay EXTERNAL to that bundle — they are real runtime dependencies, declared below, so the CLI and term share exactly one harness module instance (see build.mjs for why two instances is a governance hole, not a cosmetic bug).",
|
|
6
6
|
"exports": {
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"ink-text-input": "^6.0.0",
|
|
47
47
|
"openai": "^4.77.0",
|
|
48
48
|
"react": "^18.3.1",
|
|
49
|
-
"@corenel/harness": "0.7.
|
|
50
|
-
"@corenel/protocol": "0.7.
|
|
49
|
+
"@corenel/harness": "0.7.1",
|
|
50
|
+
"@corenel/protocol": "0.7.1"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@types/node": "^24.13.1",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"esbuild": "^0.21.5",
|
|
56
56
|
"ink-testing-library": "^4.0.0",
|
|
57
57
|
"typescript": "^5.9.3",
|
|
58
|
-
"@corenel/tools-node": "0.3.
|
|
58
|
+
"@corenel/tools-node": "0.3.3"
|
|
59
59
|
},
|
|
60
60
|
"license": "Elastic-2.0",
|
|
61
61
|
"engines": {
|