@zhivex-ai/harness 0.10.0 → 0.11.1

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.
@@ -22,6 +22,7 @@ export declare const createHarnessSubagents: (options: {
22
22
  store: AgentRunStore;
23
23
  memory?: AgentMemoryStore;
24
24
  onTelemetryEvent?: AgentTelemetryObserver;
25
+ contextInstructions?: string;
25
26
  }) => HarnessSubagentRuntime;
26
27
  export interface HarnessReviewGroupResult {
27
28
  schemaVersion: 1;
@@ -0,0 +1,48 @@
1
+ import type { AgentApprovalRequest, AgentApprovalResponse, AgentStreamEvent } from "@zhivex-ai/agents";
2
+ export declare const DEFAULT_APPROVAL_SUMMARY_CHARACTERS = 1200;
3
+ /**
4
+ * Make model- or provider-controlled text inert before writing it to a terminal.
5
+ * Newlines and tabs remain readable; cursor controls, ANSI/OSC introducers, C1
6
+ * controls, and bidirectional overrides are rendered as visible escapes.
7
+ */
8
+ export declare const sanitizeTerminalText: (value: string) => string;
9
+ export interface ApprovalFormatOptions {
10
+ detail?: "summary" | "full";
11
+ maxSummaryCharacters?: number;
12
+ }
13
+ /**
14
+ * Render an approval without trusting its provider-controlled labels or input.
15
+ * Built-in mutation and execution tools retain their complete reviewed payload.
16
+ * Unknown/provider tools get a bounded default card and an explicit full view.
17
+ */
18
+ export declare const formatApproval: (approval: AgentApprovalRequest, options?: ApprovalFormatOptions) => string;
19
+ export interface TerminalApprovalResolverOptions {
20
+ ask(question: string): Promise<string>;
21
+ write(text: string): void;
22
+ maxSummaryCharacters?: number;
23
+ approvedReason?: string;
24
+ deniedReason?: string;
25
+ }
26
+ /**
27
+ * Resolve approvals one at a time. Returning undefined deliberately leaves the
28
+ * complete durable approval batch pending; earlier answers are never returned
29
+ * as a partial resolution when the operator quits or the prompt closes.
30
+ */
31
+ export declare const resolveTerminalApprovals: (approvals: readonly AgentApprovalRequest[], options: TerminalApprovalResolverOptions) => Promise<readonly AgentApprovalResponse[] | undefined>;
32
+ export interface TerminalAppearanceOptions {
33
+ color?: boolean;
34
+ }
35
+ export declare const terminalSupportsColor: (isTTY: boolean, env?: Readonly<Record<string, string | undefined>>) => boolean;
36
+ /**
37
+ * Produce a compact activity line from a redacted event subset. Tool inputs,
38
+ * outputs, provider payloads, repository text, and raw errors are never read.
39
+ */
40
+ export declare const formatTerminalEvent: (event: AgentStreamEvent, options?: TerminalAppearanceOptions) => string | undefined;
41
+ export interface TerminalHeaderInput {
42
+ version: string;
43
+ provider: string;
44
+ model: string;
45
+ sessionId: string;
46
+ sessionTitle?: string;
47
+ }
48
+ export declare const formatTerminalHeader: (input: TerminalHeaderInput, options?: TerminalAppearanceOptions) => string;