agent-afk 5.352.0 → 5.353.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/memory/index.d.ts +1 -1
- package/dist/agent/providers/openai-compatible/responses-translate.d.ts +1 -0
- package/dist/agent/providers/openai-compatible/translate.d.ts +1 -0
- package/dist/agent/session/ledger-lifecycle.d.ts +1 -0
- package/dist/agent/session/session-id-trace.d.ts +1 -1
- package/dist/agent/session/session-meta.d.ts +1 -0
- package/dist/agent/trace/events.d.ts +2 -0
- package/dist/agent/trace/events.session-phase.d.ts +1 -0
- package/dist/agent/trace/receipt.d.ts +1 -0
- package/dist/agent/trace/receipt.subagents-by-model.d.ts +11 -0
- package/dist/agent/trace/receipt.types.d.ts +2 -0
- package/dist/agent/trace/types.session-phase.d.ts +1 -0
- package/dist/agent/types/config-types.d.ts +1 -0
- package/dist/cli.mjs +444 -444
- package/dist/index.mjs +376 -376
- package/dist/telegram/session-context.d.ts +1 -0
- package/dist/telegram.mjs +394 -394
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { MemoryStore } from './memory-store.js';
|
|
2
2
|
export { estimateTokens } from './estimate-tokens.js';
|
|
3
|
-
export { loadHotMemory, injectHotMemory, injectEpisodeRecall, scoredEpisodes } from './memory-loader.js';
|
|
3
|
+
export { loadHotMemory, injectHotMemory, injectEpisodeRecall, scoredEpisodes, EPISODE_RECALL_CAP } from './memory-loader.js';
|
|
4
4
|
export type { InjectEpisodeRecallOptions, ScoredEpisode } from './memory-loader.js';
|
|
5
5
|
export { injectGoalPrompt } from '../goals/inject.js';
|
|
6
6
|
export { createMemorySessionEndHook, createChildMemoryHotBlockHook } from './memory-hooks.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { TraceSink } from '../trace/index.js';
|
|
2
|
-
export declare function emitSessionIdAssigned(writer: TraceSink | undefined, sessionId: string, priorSessionId: string | undefined): Promise<void>;
|
|
2
|
+
export declare function emitSessionIdAssigned(writer: TraceSink | undefined, sessionId: string, priorSessionId: string | undefined, credentialSource?: string | undefined): Promise<void>;
|
|
@@ -782,6 +782,7 @@ export declare const TraceEventInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
782
782
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
783
783
|
priorSessionId: z.ZodOptional<z.ZodString>;
|
|
784
784
|
afkVersion: z.ZodOptional<z.ZodString>;
|
|
785
|
+
credentialSource: z.ZodOptional<z.ZodString>;
|
|
785
786
|
}, z.core.$strip>;
|
|
786
787
|
}, z.core.$strip>], "kind">;
|
|
787
788
|
export declare const TraceEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -1270,6 +1271,7 @@ export declare const TraceEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1270
1271
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
1271
1272
|
priorSessionId: z.ZodOptional<z.ZodString>;
|
|
1272
1273
|
afkVersion: z.ZodOptional<z.ZodString>;
|
|
1274
|
+
credentialSource: z.ZodOptional<z.ZodString>;
|
|
1273
1275
|
}, z.core.$strip>;
|
|
1274
1276
|
}, z.core.$strip>, z.ZodObject<{
|
|
1275
1277
|
ts: z.ZodString;
|
|
@@ -132,4 +132,5 @@ export declare const SessionPhasePayloadSchema: z.ZodObject<{
|
|
|
132
132
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
133
133
|
priorSessionId: z.ZodOptional<z.ZodString>;
|
|
134
134
|
afkVersion: z.ZodOptional<z.ZodString>;
|
|
135
|
+
credentialSource: z.ZodOptional<z.ZodString>;
|
|
135
136
|
}, z.core.$strip>;
|
|
@@ -5,6 +5,7 @@ export { renderReceiptMarkdown };
|
|
|
5
5
|
export { RECEIPT_SCHEMA_VERSION, type ReceiptMeta, type ReceiptToolFailure, type RunReceipt } from './receipt.types.js';
|
|
6
6
|
import { type ReceiptMeta, type RunReceipt } from './receipt.types.js';
|
|
7
7
|
export { extractJournalSummary, type JournalSummary } from './receipt.journal.js';
|
|
8
|
+
export { type SubagentModelEntry, type SubagentsByModel } from './receipt.subagents-by-model.js';
|
|
8
9
|
export declare function parseTraceJsonl(raw: string): TraceEvent[];
|
|
9
10
|
export declare function receiptPathsFor(tracePath: string): {
|
|
10
11
|
label: string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { TraceEvent } from './types.js';
|
|
2
|
+
export interface SubagentModelEntry {
|
|
3
|
+
started: number;
|
|
4
|
+
succeeded: number;
|
|
5
|
+
failed: number;
|
|
6
|
+
cancelled: number;
|
|
7
|
+
costUsd: number;
|
|
8
|
+
requested: string[];
|
|
9
|
+
}
|
|
10
|
+
export type SubagentsByModel = Record<string, SubagentModelEntry>;
|
|
11
|
+
export declare function buildSubagentsByModel(events: TraceEvent[]): SubagentsByModel | undefined;
|
|
@@ -2,6 +2,7 @@ import type { CostTokens, SessionCostSource } from './cost.js';
|
|
|
2
2
|
import type { JournalSummary } from './receipt.journal.js';
|
|
3
3
|
import type { OutcomesV1 } from '../outcomes/outcomes-v1.schema.js';
|
|
4
4
|
import type { ClosureReason, ToolFailureClass, TraceEventKind } from './types.js';
|
|
5
|
+
import type { SubagentsByModel } from './receipt.subagents-by-model.js';
|
|
5
6
|
export declare const RECEIPT_SCHEMA_VERSION: 3;
|
|
6
7
|
export interface ReceiptToolFailure {
|
|
7
8
|
toolUseId: string;
|
|
@@ -53,6 +54,7 @@ export interface RunReceipt {
|
|
|
53
54
|
succeeded: number;
|
|
54
55
|
failed: number;
|
|
55
56
|
cancelled: number;
|
|
57
|
+
byModel?: SubagentsByModel;
|
|
56
58
|
};
|
|
57
59
|
cost: {
|
|
58
60
|
finalCostUsd?: number;
|
|
@@ -90,6 +90,7 @@ export interface AgentConfig {
|
|
|
90
90
|
drainSubagents?: (reason: string) => Promise<unknown>;
|
|
91
91
|
getPendingChildTerminalWrites?: () => readonly Promise<void>[];
|
|
92
92
|
getPendingChildBillingStreams?: () => readonly Promise<void>[];
|
|
93
|
+
credentialSource?: string;
|
|
93
94
|
isSubagentFork?: true;
|
|
94
95
|
hasWorkspacePreamble?: true;
|
|
95
96
|
provider?: ModelProvider;
|