agent-afk 5.266.2 → 5.268.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/journal/index.d.ts +1 -0
- package/dist/agent/journal/provenance.d.ts +6 -0
- package/dist/agent/journal/sync.d.ts +1 -0
- package/dist/agent/journal/types.d.ts +7 -0
- package/dist/agent/providers/anthropic-direct/journal-adapter.d.ts +1 -0
- package/dist/agent/providers/anthropic-direct/loop/signature-retry.d.ts +4 -0
- package/dist/agent/providers/openai-compatible/journal-adapter.d.ts +1 -0
- package/dist/cli.mjs +426 -406
- package/dist/index.mjs +125 -125
- package/dist/telegram.mjs +143 -143
- package/dist/whatif/args.d.ts +5 -3
- package/dist/whatif/args.spec-loader.d.ts +3 -0
- package/dist/whatif/args.usage.d.ts +1 -1
- package/dist/whatif/mde.d.ts +9 -0
- package/dist/whatif/predict.d.ts +5 -0
- package/dist/whatif/probe-dedupe.d.ts +5 -0
- package/dist/whatif/report.d.ts +2 -1
- package/dist/whatif/run.d.ts +4 -0
- package/dist/whatif/run.report.d.ts +18 -0
- package/dist/whatif/stats.d.ts +4 -1
- package/dist/whatif/types.d.ts +3 -0
- package/dist/whatif/types.orchestration.d.ts +4 -1
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from './types.js';
|
|
2
2
|
export { JournalSync, type SyncOptions } from './sync.js';
|
|
3
|
+
export { JournalProvenance } from './provenance.js';
|
|
3
4
|
export { createMessageJournal, isMessageJournalDisabled, type CreateMessageJournalOptions } from './writer.js';
|
|
4
5
|
export { findToolResult, foldJournal, hydrateMessages, journalExists, listSubagentJournals, loadJournalFold, loadJournalMessages, readJournalRecords, type FoldResult, type JournalLocator, } from './reader.js';
|
|
5
6
|
export { forkJournal } from './fork.js';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { JournalAdoption, JournalMessage } from './types.js';
|
|
2
|
+
export declare class JournalProvenance<T extends object> {
|
|
3
|
+
private readonly origins;
|
|
4
|
+
record(sources: readonly JournalMessage[], members: readonly T[]): void;
|
|
5
|
+
adopt(messages: readonly T[], at: number): JournalAdoption | undefined;
|
|
6
|
+
}
|
|
@@ -42,9 +42,11 @@ export type JournalBlock = {
|
|
|
42
42
|
type: 'thinking';
|
|
43
43
|
thinking: string;
|
|
44
44
|
signature?: string;
|
|
45
|
+
origin?: string;
|
|
45
46
|
} | {
|
|
46
47
|
type: 'redacted_thinking';
|
|
47
48
|
data: string;
|
|
49
|
+
origin?: string;
|
|
48
50
|
} | {
|
|
49
51
|
type: 'tool_use';
|
|
50
52
|
id: string;
|
|
@@ -67,6 +69,10 @@ export interface JournalMessage {
|
|
|
67
69
|
role: 'user' | 'assistant';
|
|
68
70
|
content: JournalBlock[];
|
|
69
71
|
}
|
|
72
|
+
export interface JournalAdoption {
|
|
73
|
+
readonly entries: readonly JournalMessage[];
|
|
74
|
+
readonly count: number;
|
|
75
|
+
}
|
|
70
76
|
export type JournalTruncateReason = 'resync' | 'compact' | 'rewind' | 'clear' | 'repair' | 'provider_switch';
|
|
71
77
|
export type JournalMarkLabel = 'compact' | 'rewind' | 'clear' | 'resume' | 'fork' | 'model_switch';
|
|
72
78
|
interface RecordBase {
|
|
@@ -117,5 +123,6 @@ export interface MessageJournal {
|
|
|
117
123
|
export interface JournalAdapter<T> {
|
|
118
124
|
toJournal(message: T): JournalMessage | null;
|
|
119
125
|
fromJournalMessages(messages: readonly JournalMessage[]): T[];
|
|
126
|
+
adopt?(messages: readonly T[], at: number): JournalAdoption | undefined;
|
|
120
127
|
}
|
|
121
128
|
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { MessageParam } from '@anthropic-ai/sdk/resources';
|
|
2
|
+
export declare function isInvalidSignatureError(err: unknown): boolean;
|
|
3
|
+
export declare function stripEarlierThinking(messages: MessageParam[], lastRealUserIdx: number): MessageParam[];
|
|
4
|
+
export declare function buildSignatureRetryMessages(messages: MessageParam[]): MessageParam[] | null;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { JournalAdapter } from '../../journal/index.js';
|
|
2
2
|
import type { OpenAIMessage } from './messages.js';
|
|
3
|
+
export declare const OPENAI_COMPATIBLE_ORIGIN = "openai-compatible";
|
|
3
4
|
export declare const INTERRUPTED_TOOL_RESULT: string;
|
|
4
5
|
export declare const openAIJournalAdapter: JournalAdapter<OpenAIMessage>;
|