agent-afk 5.302.9 → 5.302.11

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.
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- export declare const FACET_VERSION = 9;
2
+ export declare const FACET_VERSION = 10;
3
3
  export declare const ToolEventInputSchema: z.ZodObject<{
4
4
  toolName: z.ZodString;
5
5
  toolUseId: z.ZodOptional<z.ZodString>;
@@ -84,6 +84,12 @@ export declare const FacetOutcomeSourceSchema: z.ZodEnum<{
84
84
  structural: "structural";
85
85
  }>;
86
86
  export type FacetOutcomeSource = z.infer<typeof FacetOutcomeSourceSchema>;
87
+ export declare const FacetOutcomeDowngradeReasonSchema: z.ZodEnum<{
88
+ deferred_items: "deferred_items";
89
+ no_corroborating_evidence: "no_corroborating_evidence";
90
+ compose_partial_nodes: "compose_partial_nodes";
91
+ }>;
92
+ export type FacetOutcomeDowngradeReason = z.infer<typeof FacetOutcomeDowngradeReasonSchema>;
87
93
  export declare const SubagentPersistenceSchema: z.ZodEnum<{
88
94
  unknown: "unknown";
89
95
  not_persisted: "not_persisted";
@@ -188,6 +194,11 @@ export declare const SessionFacetSchema: z.ZodObject<{
188
194
  terminal_state: "terminal_state";
189
195
  structural: "structural";
190
196
  }>;
197
+ outcome_downgrade_reason: z.ZodOptional<z.ZodEnum<{
198
+ deferred_items: "deferred_items";
199
+ no_corroborating_evidence: "no_corroborating_evidence";
200
+ compose_partial_nodes: "compose_partial_nodes";
201
+ }>>;
191
202
  primary_success: z.ZodString;
192
203
  world_changes: z.ZodObject<{
193
204
  files_written: z.ZodNumber;
@@ -1,2 +1,8 @@
1
1
  export type PeerInboundMode = 'accept' | 'hold' | 'off';
2
+ export interface PeerInboundModeConfig {
3
+ mode: PeerInboundMode;
4
+ invalid: boolean;
5
+ rawTruncated?: string;
6
+ }
2
7
  export declare function resolvePeerInboundMode(): PeerInboundMode;
8
+ export declare function getPeerInboundModeConfig(): PeerInboundModeConfig;
@@ -1,4 +1,6 @@
1
1
  import type { BackgroundAgentRegistry, BackgroundJob } from '../../../agent/background-registry.js';
2
+ import type { DetachableToolRegistry } from '../../../agent/tools/detach-registry.js';
3
+ import type { ToolEvent } from '../../slash/types.js';
2
4
  export declare const MAX_INJECTION_BYTES: number;
3
5
  export interface PendingBgAgentNotification {
4
6
  job: BackgroundJob;
@@ -13,7 +15,10 @@ export declare class BgResultNotifier {
13
15
  private pendingNotifications;
14
16
  onInjectable: (() => void) | null;
15
17
  private readonly onSettled;
16
- constructor(registry: BackgroundAgentRegistry);
18
+ private readonly detachedTools;
19
+ constructor(registry: BackgroundAgentRegistry, detachRegistry?: DetachableToolRegistry);
20
+ observeToolEvent(event: ToolEvent): void;
21
+ drainToolNotices(): string[];
17
22
  drainInjections(): string;
18
23
  drainNotifications(): readonly PendingBgAgentNotification[];
19
24
  reset(): void;
@@ -0,0 +1,18 @@
1
+ import type { DetachableToolRegistry, DetachedToolResult } from '../../../agent/tools/detach-registry.js';
2
+ import type { ToolEvent } from '../../slash/types.js';
3
+ export declare function buildDetachedToolInjection(result: DetachedToolResult): string;
4
+ export declare class DetachedToolNotifier {
5
+ private readonly registry;
6
+ private readonly tracked;
7
+ private injections;
8
+ private notices;
9
+ onInjectable: (() => void) | null;
10
+ private readonly onSettled;
11
+ constructor(registry: DetachableToolRegistry);
12
+ observe(event: ToolEvent): void;
13
+ hasPendingInjections(): boolean;
14
+ drainInjections(): string;
15
+ drainNotices(): string[];
16
+ reset(): void;
17
+ dispose(): void;
18
+ }
@@ -128,6 +128,7 @@ export interface TurnHandles {
128
128
  setBackgroundHandler?(handler: (() => void) | null): void;
129
129
  subagentControl?: SubagentControl;
130
130
  detachRegistry?: DetachableToolRegistry;
131
+ onToolEvent?(event: import('../../slash/types.js').ToolEvent): void;
131
132
  setSoftStopHandler?(handler: (() => void) | null): void;
132
133
  setTaskViewHandler?(handler: (() => boolean) | null): void;
133
134
  setPausedState?(paused: boolean): void;
@@ -23,6 +23,7 @@ export interface ToolEvent {
23
23
  result?: string;
24
24
  isError?: boolean;
25
25
  incomplete?: boolean;
26
+ incompleteReason?: string;
26
27
  partialNodeCount?: number;
27
28
  resultTail?: string;
28
29
  }