@agentic-kit/harness 0.10.1 → 0.11.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.
|
@@ -38,6 +38,13 @@ export type ConfirmGateDeps = {
|
|
|
38
38
|
* preview can't be built.
|
|
39
39
|
*/
|
|
40
40
|
resolveTemplatePreview(cwd: string, blueprintName: string | undefined, displayName: string): Promise<ConfirmPreview | undefined>;
|
|
41
|
+
/**
|
|
42
|
+
* Tool names that require a human decision. The policy belongs to the host,
|
|
43
|
+
* not the harness: Desktop/CLI gate Constructive's mutating db tools, a
|
|
44
|
+
* remote coding host gates a different set. Defaults to
|
|
45
|
+
* `MUTATING_DB_TOOLS`.
|
|
46
|
+
*/
|
|
47
|
+
gatedTools?: ReadonlySet<string>;
|
|
41
48
|
};
|
|
42
49
|
export type ConfirmGate = {
|
|
43
50
|
onAgentStart: () => void;
|
|
@@ -2,6 +2,7 @@ import { buildDeclineReason, createDeclineGuard } from './decline-guard';
|
|
|
2
2
|
import { buildConfirmPrompt, MUTATING_DB_TOOLS } from './prompts';
|
|
3
3
|
export function createConfirmGate(deps) {
|
|
4
4
|
const declineGuard = createDeclineGuard();
|
|
5
|
+
const gatedTools = deps.gatedTools ?? MUTATING_DB_TOOLS;
|
|
5
6
|
async function confirmOrDecline(event, host, input, preview) {
|
|
6
7
|
const { title, message, preview: basePreview } = buildConfirmPrompt(event.toolName, input);
|
|
7
8
|
const approved = await host.confirmTool(event.toolCallId, title, message, preview ?? basePreview);
|
|
@@ -18,7 +19,7 @@ export function createConfirmGate(deps) {
|
|
|
18
19
|
return {
|
|
19
20
|
onAgentStart: () => declineGuard.clear(),
|
|
20
21
|
onToolCall: async (event, host, cwd) => {
|
|
21
|
-
if (!
|
|
22
|
+
if (!gatedTools.has(event.toolName))
|
|
22
23
|
return;
|
|
23
24
|
const input = event.input;
|
|
24
25
|
// manage_entity_types multiplexes read + write actions behind one tool
|
package/gating/confirm-gate.d.ts
CHANGED
|
@@ -38,6 +38,13 @@ export type ConfirmGateDeps = {
|
|
|
38
38
|
* preview can't be built.
|
|
39
39
|
*/
|
|
40
40
|
resolveTemplatePreview(cwd: string, blueprintName: string | undefined, displayName: string): Promise<ConfirmPreview | undefined>;
|
|
41
|
+
/**
|
|
42
|
+
* Tool names that require a human decision. The policy belongs to the host,
|
|
43
|
+
* not the harness: Desktop/CLI gate Constructive's mutating db tools, a
|
|
44
|
+
* remote coding host gates a different set. Defaults to
|
|
45
|
+
* `MUTATING_DB_TOOLS`.
|
|
46
|
+
*/
|
|
47
|
+
gatedTools?: ReadonlySet<string>;
|
|
41
48
|
};
|
|
42
49
|
export type ConfirmGate = {
|
|
43
50
|
onAgentStart: () => void;
|
package/gating/confirm-gate.js
CHANGED
|
@@ -5,6 +5,7 @@ const decline_guard_1 = require("./decline-guard");
|
|
|
5
5
|
const prompts_1 = require("./prompts");
|
|
6
6
|
function createConfirmGate(deps) {
|
|
7
7
|
const declineGuard = (0, decline_guard_1.createDeclineGuard)();
|
|
8
|
+
const gatedTools = deps.gatedTools ?? prompts_1.MUTATING_DB_TOOLS;
|
|
8
9
|
async function confirmOrDecline(event, host, input, preview) {
|
|
9
10
|
const { title, message, preview: basePreview } = (0, prompts_1.buildConfirmPrompt)(event.toolName, input);
|
|
10
11
|
const approved = await host.confirmTool(event.toolCallId, title, message, preview ?? basePreview);
|
|
@@ -21,7 +22,7 @@ function createConfirmGate(deps) {
|
|
|
21
22
|
return {
|
|
22
23
|
onAgentStart: () => declineGuard.clear(),
|
|
23
24
|
onToolCall: async (event, host, cwd) => {
|
|
24
|
-
if (!
|
|
25
|
+
if (!gatedTools.has(event.toolName))
|
|
25
26
|
return;
|
|
26
27
|
const input = event.input;
|
|
27
28
|
// manage_entity_types multiplexes read + write actions behind one tool
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentic-kit/harness",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"author": "Dan Lynch <pyramation@gmail.com>",
|
|
5
5
|
"description": "Host-agnostic Constructive harness core — skill overlay resolution, materialization, and on-disk layout for harness hosts (desktop, CLI, MCP)",
|
|
6
6
|
"main": "index.js",
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"@types/semver": "^7.8.0"
|
|
39
39
|
},
|
|
40
40
|
"keywords": [],
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "4839d3c123304735a7aa74fb4e45af41cf947567"
|
|
42
42
|
}
|