agent-afk 5.272.1 → 5.274.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.
@@ -13,7 +13,7 @@ export type { UpsertVotesOptions } from './store.js';
13
13
  export { readRecord, writeRecord, listRecords, upsertVotes, appendArtifacts } from './store.js';
14
14
  export { createOutcomeSessionEndHook } from './session-end-hook.js';
15
15
  export { createChildAttributionHook } from './child-attribution.js';
16
- export { lfReask, normalizeTokens, jaccardSimilarity, REASK_THRESHOLD } from './lf-reask.js';
16
+ export { lfReask, normalizeTokens, jaccardSimilarity, REASK_THRESHOLD, promptFingerprint, FINGERPRINT_MAX_TOKENS } from './lf-reask.js';
17
17
  export type { ExecFnCi } from './lf-ci.js';
18
18
  export { lfCi, realExecFnCi } from './lf-ci.js';
19
19
  export type { ExecFnFof } from './lf-fof.js';
@@ -1,4 +1,6 @@
1
1
  export declare const REASK_THRESHOLD = 0.6;
2
+ export declare const FINGERPRINT_MAX_TOKENS = 64;
2
3
  export declare function normalizeTokens(text: string): Set<string>;
4
+ export declare function promptFingerprint(text: string): string[];
3
5
  export declare function jaccardSimilarity(a: Set<string>, b: Set<string>): number;
4
6
  export declare function lfReask(newSessionId: string, newPrompt: string, newCwd: string | undefined, now: string): void;
@@ -69,7 +69,7 @@ export declare const VerifiedOutcomeSchema: z.ZodObject<{
69
69
  label: z.ZodString;
70
70
  reason: z.ZodString;
71
71
  }, z.core.$strip>>;
72
- first_prompt: z.ZodOptional<z.ZodString>;
72
+ first_prompt_tokens: z.ZodOptional<z.ZodArray<z.ZodString>>;
73
73
  first_cwd: z.ZodOptional<z.ZodString>;
74
74
  }, z.core.$strip>;
75
75
  export type VerifiedOutcome = z.infer<typeof VerifiedOutcomeSchema>;
@@ -6,6 +6,7 @@ export interface OneShotInput {
6
6
  user: string;
7
7
  maxTokens?: number;
8
8
  signal?: AbortSignal;
9
+ baseUrl?: string;
9
10
  clientFactory?: (opts: {
10
11
  authToken: string;
11
12
  } | {
@@ -0,0 +1,4 @@
1
+ import type { BundledProviderName } from '../index.js';
2
+ export type SummarizeFn = (transcript: string, signal?: AbortSignal) => Promise<string>;
3
+ export declare function resolveCrossProviderSummarize(sessionFamily: BundledProviderName, sessionSummarize: SummarizeFn, compactModelRaw: string | undefined, sessionKey: object): SummarizeFn;
4
+ export declare function __resetCrossProviderWarnState(): void;
@@ -0,0 +1 @@
1
+ export declare const SHARED_CONTEXT_DIRECTIVE = "[shared-context]\n\nMake your reply self-contained when presenting subagent, skill, or compose results. Before asking the user to act, include the relevant content or a short summary with the file path for long output. Do not assume the user has seen the underlying results.";
@@ -0,0 +1,7 @@
1
+ export interface ConsoleBridgeSink {
2
+ commitAbove(text: string): void;
3
+ }
4
+ type BridgedMethod = 'warn' | 'error';
5
+ type ConsoleTarget = Pick<Console, BridgedMethod>;
6
+ export declare function installConsoleBridge(sink: ConsoleBridgeSink, target?: ConsoleTarget): () => void;
7
+ export {};