agent-afk 5.240.1 → 5.241.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/agent/facets/index.d.ts +1 -1
- package/dist/agent/facets/schema.d.ts +14 -1
- package/dist/agent/facets/yield-probe.d.ts +11 -0
- package/dist/agent/hooks.d.ts +1 -0
- package/dist/agent/session/provider-type-mappers.d.ts +6 -0
- package/dist/agent/subagent/fork-budget.d.ts +5 -0
- package/dist/agent/subagent/fork-lifecycle.d.ts +8 -0
- package/dist/agent/subagent/fork-types.d.ts +1 -0
- package/dist/agent/subagent.d.ts +1 -0
- package/dist/agent/tools/subagent-executor.lite-snapshot.d.ts +2 -1
- package/dist/cli/commands/interactive/bg-result-notifier.d.ts +1 -0
- package/dist/cli/input/input-surface.d.ts +1 -0
- package/dist/cli.mjs +348 -347
- package/dist/index.mjs +116 -116
- package/dist/skills/mint/_phases/_fork-phase.d.ts +2 -0
- package/dist/skills/mint/_phases/build.d.ts +2 -1
- package/dist/skills/mint/_phases/heal.d.ts +2 -1
- package/dist/skills/mint/_phases/parallelize-dispatch.d.ts +2 -1
- package/dist/skills/mint/_phases/verify.d.ts +2 -1
- package/dist/skills/skill-types.d.ts +1 -0
- package/dist/telegram.mjs +165 -164
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { FACET_VERSION, SessionFacetSchema, StoredSessionInputSchema, FacetOutcomeSchema, SubagentPersistenceSchema, SubagentInvocationSchema, WorldChangesSchema, TokenBreakdownSchema, ParallelDispatchStatsSchema, type SessionFacet, type StoredSessionInput, type ToolEventInput, type FacetOutcome, type SubagentInvocation, type WorldChanges, type TokenBreakdown, type ParallelDispatchStats, } from './schema.js';
|
|
1
|
+
export { FACET_VERSION, SessionFacetSchema, StoredSessionInputSchema, FacetOutcomeSchema, SubagentPersistenceSchema, SubagentInvocationSchema, WorldChangesSchema, TokenBreakdownSchema, ParallelDispatchStatsSchema, YieldTrackingSchema, type SessionFacet, type StoredSessionInput, type ToolEventInput, type FacetOutcome, type SubagentInvocation, type WorldChanges, type TokenBreakdown, type ParallelDispatchStats, type YieldTracking, } from './schema.js';
|
|
2
2
|
export { deriveSessionFacet, type DeriveOptions } from './derive.js';
|
|
3
3
|
export { getOrDeriveFacet, loadStoredSession, listSessionIds, type FacetStoreOptions, } from './store.js';
|
|
4
4
|
export { createFacetSessionEndHook } from './session-end-hook.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const FACET_VERSION =
|
|
2
|
+
export declare const FACET_VERSION = 5;
|
|
3
3
|
export declare const ToolEventInputSchema: z.ZodObject<{
|
|
4
4
|
toolName: z.ZodString;
|
|
5
5
|
toolUseId: z.ZodOptional<z.ZodString>;
|
|
@@ -27,6 +27,7 @@ export declare const StoredSessionInputSchema: z.ZodObject<{
|
|
|
27
27
|
source: z.ZodOptional<z.ZodEnum<{
|
|
28
28
|
cli: "cli";
|
|
29
29
|
telegram: "telegram";
|
|
30
|
+
daemon: "daemon";
|
|
30
31
|
web: "web";
|
|
31
32
|
}>>;
|
|
32
33
|
telegramChatId: z.ZodOptional<z.ZodNumber>;
|
|
@@ -94,12 +95,19 @@ export declare const ParallelDispatchStatsSchema: z.ZodObject<{
|
|
|
94
95
|
ratio: z.ZodNullable<z.ZodNumber>;
|
|
95
96
|
}, z.core.$strip>;
|
|
96
97
|
export type ParallelDispatchStats = z.infer<typeof ParallelDispatchStatsSchema>;
|
|
98
|
+
export declare const YieldTrackingSchema: z.ZodObject<{
|
|
99
|
+
is_scheduled_session: z.ZodBoolean;
|
|
100
|
+
produced_pr: z.ZodNullable<z.ZodBoolean>;
|
|
101
|
+
pr_merged: z.ZodNullable<z.ZodBoolean>;
|
|
102
|
+
}, z.core.$strip>;
|
|
103
|
+
export type YieldTracking = z.infer<typeof YieldTrackingSchema>;
|
|
97
104
|
export declare const SessionFacetSchema: z.ZodObject<{
|
|
98
105
|
facet_version: z.ZodNumber;
|
|
99
106
|
session_id: z.ZodString;
|
|
100
107
|
source: z.ZodEnum<{
|
|
101
108
|
cli: "cli";
|
|
102
109
|
telegram: "telegram";
|
|
110
|
+
daemon: "daemon";
|
|
103
111
|
web: "web";
|
|
104
112
|
unknown: "unknown";
|
|
105
113
|
}>;
|
|
@@ -163,6 +171,11 @@ export declare const SessionFacetSchema: z.ZodObject<{
|
|
|
163
171
|
tool_turns: z.ZodNumber;
|
|
164
172
|
ratio: z.ZodNullable<z.ZodNumber>;
|
|
165
173
|
}, z.core.$strip>;
|
|
174
|
+
yield_tracking: z.ZodObject<{
|
|
175
|
+
is_scheduled_session: z.ZodBoolean;
|
|
176
|
+
produced_pr: z.ZodNullable<z.ZodBoolean>;
|
|
177
|
+
pr_merged: z.ZodNullable<z.ZodBoolean>;
|
|
178
|
+
}, z.core.$strip>;
|
|
166
179
|
decisions: z.ZodArray<z.ZodString>;
|
|
167
180
|
evidence_pointers: z.ZodArray<z.ZodString>;
|
|
168
181
|
}, z.core.$loose>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type ExecFnYield = (file: string, args: string[], opts?: {
|
|
2
|
+
cwd?: string;
|
|
3
|
+
timeout?: number;
|
|
4
|
+
}) => Promise<{
|
|
5
|
+
stdout: string;
|
|
6
|
+
stderr: string;
|
|
7
|
+
}>;
|
|
8
|
+
export declare function getCurrentBranch(execFn: ExecFnYield, cwd?: string): Promise<string | null>;
|
|
9
|
+
export declare function queryPrState(execFn: ExecFnYield, branch: string, cwd?: string): Promise<'merged' | 'open' | 'closed' | 'none' | 'error'>;
|
|
10
|
+
export declare function patchYieldFields(sessionId: string, produced_pr: boolean, pr_merged: boolean | null, cacheDir?: string): void;
|
|
11
|
+
export declare function writeFacetYield(sessionId: string, execFn: ExecFnYield, cwd?: string): Promise<void>;
|
package/dist/agent/hooks.d.ts
CHANGED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { AgentInfo, McpServerStatus, ModelInfo, SDKControlGetContextUsageResponse } from '../types.js';
|
|
2
|
+
import type { ProviderAgentInfo, ProviderContextUsage, ProviderModelInfo, ProviderMcpServerStatus } from '../provider.js';
|
|
3
|
+
export declare function toModelInfo(p: ProviderModelInfo): ModelInfo;
|
|
4
|
+
export declare function toAgentInfo(p: ProviderAgentInfo): AgentInfo;
|
|
5
|
+
export declare function toContextUsageResponse(p: ProviderContextUsage): SDKControlGetContextUsageResponse;
|
|
6
|
+
export declare function toMcpServerStatus(p: ProviderMcpServerStatus): McpServerStatus;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { DelegationBudget, SpawnReceipt } from '../tools/delegation-budget.js';
|
|
2
|
+
export { SpawnReceipt };
|
|
3
|
+
export type { DelegationBudget };
|
|
4
|
+
export declare function admitFork(budget: DelegationBudget | undefined, parentId: string): SpawnReceipt | undefined;
|
|
5
|
+
export declare function wrapTerminalWithRelease(base: () => void, receipt: SpawnReceipt | undefined): () => void;
|
|
@@ -20,3 +20,11 @@ export interface AppendForkTelemetryArgs {
|
|
|
20
20
|
effectiveResolvedAgentType: string | undefined;
|
|
21
21
|
}
|
|
22
22
|
export declare function appendForkTelemetry(args: AppendForkTelemetryArgs): Promise<void>;
|
|
23
|
+
export interface EmitSubagentStartedEventArgs {
|
|
24
|
+
subagentId: string;
|
|
25
|
+
effectiveChildModel: AgentModelInput;
|
|
26
|
+
effectiveAgentType: string | undefined;
|
|
27
|
+
promptHead: string | undefined;
|
|
28
|
+
parentId: string | undefined;
|
|
29
|
+
}
|
|
30
|
+
export declare function emitSubagentStartedEvent(sink: ((event: import('../types/session-types.js').OutputEvent) => void) | undefined, args: EmitSubagentStartedEventArgs): void;
|
package/dist/agent/subagent.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ export declare class SubagentManager {
|
|
|
29
29
|
private readonly parentAbortSignal;
|
|
30
30
|
private readonly workspaceStore;
|
|
31
31
|
private readonly sessionLabel;
|
|
32
|
+
private readonly delegationBudget;
|
|
32
33
|
private readonly abortGraph;
|
|
33
34
|
private readonly rootId;
|
|
34
35
|
private rootController;
|
|
@@ -10,6 +10,7 @@ export interface SubagentsLite {
|
|
|
10
10
|
status: 'running' | 'completed' | 'failed' | 'cancelled';
|
|
11
11
|
startedAt: string;
|
|
12
12
|
label: string | null;
|
|
13
|
+
recentActivity?: string;
|
|
13
14
|
}>;
|
|
14
15
|
}
|
|
15
|
-
export declare function buildSubagentsLite(subagentManager: SubagentManager, backgroundRegistry: BackgroundAgentRegistry | undefined): SubagentsLite;
|
|
16
|
+
export declare function buildSubagentsLite(subagentManager: SubagentManager, backgroundRegistry: BackgroundAgentRegistry | undefined, callerSessionId?: string): SubagentsLite;
|
|
@@ -51,6 +51,7 @@ export declare class InputSurface {
|
|
|
51
51
|
private softStopHandler;
|
|
52
52
|
private taskViewHandler;
|
|
53
53
|
private pauseInterruptHandler;
|
|
54
|
+
onAwaitingInput: (() => void) | null;
|
|
54
55
|
private pendingReadReject;
|
|
55
56
|
private pendingReadResolve;
|
|
56
57
|
private readonly slashRegistryView;
|