agent-afk 5.48.1 → 5.49.1
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/companion/index.d.ts +1 -0
- package/dist/agent/companion/primer-loader.d.ts +5 -0
- package/dist/agent/providers/anthropic-direct/query/cwd-dependents.d.ts +2 -1
- package/dist/agent/providers/anthropic-direct/query/system-prompt.d.ts +4 -2
- package/dist/agent/types/config-types.d.ts +1 -0
- package/dist/cli.mjs +466 -459
- package/dist/config/env.d.ts +1 -0
- package/dist/index.mjs +156 -149
- package/dist/telegram.mjs +203 -196
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { loadCompanionPrimer, injectCompanionPrimer, MAX_PRIMER_CHARS, } from './primer-loader.js';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { AgentConfig } from '../types/config-types.js';
|
|
2
|
+
export declare const MAX_PRIMER_CHARS = 6000;
|
|
3
|
+
export declare const MAX_PRIMER_FILE_BYTES: number;
|
|
4
|
+
export declare function loadCompanionPrimer(): string | null;
|
|
5
|
+
export declare function injectCompanionPrimer(config: AgentConfig): AgentConfig;
|
|
@@ -4,12 +4,13 @@ import type { SkillExecutor } from '../../../tools/skill-executor.js';
|
|
|
4
4
|
import type { ComposeExecutor } from '../../../tools/compose-executor.js';
|
|
5
5
|
import type { ToolDispatcher } from '../tool-dispatcher.js';
|
|
6
6
|
import type { RuntimeStateSource } from '../../../awareness/index.js';
|
|
7
|
+
import { type StableSystemParts } from './system-prompt.js';
|
|
7
8
|
export type CwdDependentsFactory = (newCwd: string) => {
|
|
8
9
|
userSystem: string;
|
|
9
10
|
dispatcher: ToolDispatcher;
|
|
10
11
|
};
|
|
11
12
|
export interface CwdDependentsFactoryArgs {
|
|
12
|
-
stableSystemPrefix:
|
|
13
|
+
stableSystemPrefix: StableSystemParts;
|
|
13
14
|
config: AgentConfig;
|
|
14
15
|
surface: string;
|
|
15
16
|
runtimeStateSource: RuntimeStateSource;
|
|
@@ -2,10 +2,12 @@ import { type RuntimeStateSource } from '../../../awareness/index.js';
|
|
|
2
2
|
export interface StableSystemPromptInputs {
|
|
3
3
|
toolBase: string;
|
|
4
4
|
memoryPrompt: string;
|
|
5
|
+
hotMemory: string;
|
|
5
6
|
manifest: string;
|
|
6
7
|
userSystem: string | null;
|
|
7
8
|
}
|
|
8
|
-
export
|
|
9
|
+
export type StableSystemParts = StableSystemPromptInputs;
|
|
10
|
+
export declare function buildStableSystemPrefix(i: StableSystemPromptInputs): StableSystemParts;
|
|
9
11
|
export interface EnvironmentIdentity {
|
|
10
12
|
surface: string;
|
|
11
13
|
sessionId: string | undefined;
|
|
@@ -13,4 +15,4 @@ export interface EnvironmentIdentity {
|
|
|
13
15
|
maxDepth: number | undefined;
|
|
14
16
|
workspace: ReturnType<RuntimeStateSource['getWorkspace']>;
|
|
15
17
|
}
|
|
16
|
-
export declare function assembleSystemPrompt(
|
|
18
|
+
export declare function assembleSystemPrompt(parts: StableSystemParts, cwd: string, identity: EnvironmentIdentity): string;
|
|
@@ -43,6 +43,7 @@ export interface AgentConfig {
|
|
|
43
43
|
append?: string;
|
|
44
44
|
};
|
|
45
45
|
systemPromptSource?: string;
|
|
46
|
+
hotMemory?: string;
|
|
46
47
|
mcpServers?: Record<string, import('../mcp/types.js').McpServerConfig>;
|
|
47
48
|
mcpManager?: import('../mcp/index.js').McpManager;
|
|
48
49
|
agents?: Record<string, AgentDefinition>;
|