qlogicagent 2.6.1 → 2.7.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.js +14 -12
- package/dist/cli.js +609 -282
- package/dist/index.js +608 -281
- package/dist/orchestration.js +15 -15
- package/dist/protocol.js +1 -1
- package/dist/types/agent/agent.d.ts +3 -0
- package/dist/types/agent/tool-loop.d.ts +2 -0
- package/dist/types/agent/tunable-defaults.d.ts +18 -1
- package/dist/types/agent/types.d.ts +9 -0
- package/dist/types/cli/stdio-server.d.ts +42 -6
- package/dist/types/cli/tool-bootstrap.d.ts +3 -5
- package/dist/types/llm/model-catalog.d.ts +29 -0
- package/dist/types/llm/retry.d.ts +1 -1
- package/dist/types/orchestration/dag-scheduler.d.ts +46 -0
- package/dist/types/orchestration/index.d.ts +1 -1
- package/dist/types/orchestration/product-planner.d.ts +146 -0
- package/dist/types/orchestration/skill-improvement.d.ts +39 -0
- package/dist/types/orchestration/solo-evaluator.d.ts +26 -6
- package/dist/types/orchestration/solo-persistence.d.ts +5 -0
- package/dist/types/protocol/methods.d.ts +36 -1
- package/dist/types/protocol/notifications.d.ts +1 -1
- package/dist/types/protocol/wire/acp-protocol.d.ts +7 -0
- package/dist/types/protocol/wire/agent-methods.d.ts +1 -1
- package/dist/types/protocol/wire/index.d.ts +1 -1
- package/dist/types/protocol/wire/memory-provider-lifecycle.d.ts +3 -1
- package/dist/types/protocol/wire/notification-payloads.d.ts +52 -3
- package/dist/types/runtime/execution/dream-agent.d.ts +32 -5
- package/dist/types/runtime/execution/memory-decay.d.ts +17 -5
- package/dist/types/runtime/hooks/memory-hooks.d.ts +9 -0
- package/dist/types/runtime/infra/acp-types.d.ts +88 -0
- package/dist/types/runtime/prompt/environment-context.d.ts +10 -0
- package/dist/types/runtime/prompt/index.d.ts +1 -1
- package/dist/types/skills/index.d.ts +8 -2
- package/dist/types/skills/memory/implicit-extraction.d.ts +58 -0
- package/dist/types/skills/memory/local-embedding.d.ts +176 -0
- package/dist/types/skills/memory/local-memory-provider.d.ts +197 -0
- package/dist/types/skills/memory/local-store.d.ts +254 -0
- package/dist/types/skills/memory/memdir.d.ts +6 -1
- package/dist/types/skills/memory/memory-provider-factory.d.ts +54 -0
- package/dist/types/skills/memory/memory-tool.d.ts +30 -2
- package/dist/types/skills/permissions/denial-audit-log.d.ts +52 -0
- package/dist/types/skills/permissions/hook-runner.d.ts +14 -4
- package/dist/types/skills/skill-system/skill-lifecycle.d.ts +81 -0
- package/dist/types/skills/skill-system/skill-validation.d.ts +29 -0
- package/dist/types/skills/tools/exec-tool.d.ts +1 -1
- package/dist/types/transport/acp-server.d.ts +5 -0
- package/package.json +18 -5
- package/dist/types/skills/memory/qmemory-adapter.d.ts +0 -55
- package/dist/types/skills/memory/qmemory-http-client.d.ts +0 -16
|
@@ -41,6 +41,9 @@ export declare function setMediaClientConfig(client: MediaClient | undefined, ap
|
|
|
41
41
|
provider: string;
|
|
42
42
|
model: string;
|
|
43
43
|
}>>, onMediaProgress?: (taskId: string, mediaType: string, percent: number, status: string, provider?: string) => void): void;
|
|
44
|
+
/** Legacy no-op — workspace boundary is now always enforced for writes. */
|
|
45
|
+
export declare function setBypassWorkspaceBoundary(_bypass: boolean): void;
|
|
46
|
+
export declare function setBootstrapWorkdir(newWorkdir: string): void;
|
|
44
47
|
export interface BootstrapConfig {
|
|
45
48
|
workdir?: string;
|
|
46
49
|
log?: AgentLogger;
|
|
@@ -56,8 +59,3 @@ export interface BootstrapConfig {
|
|
|
56
59
|
* @alias initToolDeps — kept for backward compat with existing call sites.
|
|
57
60
|
*/
|
|
58
61
|
export declare function getAllBaseTools(config?: BootstrapConfig): PortableTool[];
|
|
59
|
-
/**
|
|
60
|
-
* Update the working directory for all local tool deps.
|
|
61
|
-
* Called when Gateway sends a new workdir via config.
|
|
62
|
-
*/
|
|
63
|
-
export declare function setBootstrapWorkdir(newWorkdir: string): void;
|
|
@@ -16,6 +16,21 @@
|
|
|
16
16
|
* catalog arrives.
|
|
17
17
|
*/
|
|
18
18
|
import type { ModelInfo } from "./provider-def.js";
|
|
19
|
+
/** Embedding model metadata from models.dev catalog. */
|
|
20
|
+
export interface EmbeddingModelInfo {
|
|
21
|
+
id: string;
|
|
22
|
+
name: string;
|
|
23
|
+
/** Provider-internal ID (e.g. "openai", "qwen") */
|
|
24
|
+
providerId: string;
|
|
25
|
+
/** Output vector dimensions (from limit.output) */
|
|
26
|
+
dimensions: number;
|
|
27
|
+
/** Max input context tokens */
|
|
28
|
+
maxInputTokens: number;
|
|
29
|
+
/** Cost per million input tokens (USD) */
|
|
30
|
+
costInput?: number;
|
|
31
|
+
/** Model family string from models.dev */
|
|
32
|
+
family: string;
|
|
33
|
+
}
|
|
19
34
|
export declare class ModelCatalog {
|
|
20
35
|
private cache;
|
|
21
36
|
private cacheDir;
|
|
@@ -40,6 +55,20 @@ export declare class ModelCatalog {
|
|
|
40
55
|
* List all known provider ids from the catalog.
|
|
41
56
|
*/
|
|
42
57
|
listProviderIds(): string[];
|
|
58
|
+
/**
|
|
59
|
+
* Get embedding models for a provider.
|
|
60
|
+
* Returns models sorted by cost (cheapest first, then largest dims).
|
|
61
|
+
*/
|
|
62
|
+
getEmbeddingModels(providerId: string): EmbeddingModelInfo[];
|
|
63
|
+
/**
|
|
64
|
+
* Get the default embedding model for a provider.
|
|
65
|
+
* Picks the cheapest model with >=512 dimensions.
|
|
66
|
+
*/
|
|
67
|
+
getDefaultEmbeddingModel(providerId: string): EmbeddingModelInfo | undefined;
|
|
68
|
+
/**
|
|
69
|
+
* Get all embedding models across all providers.
|
|
70
|
+
*/
|
|
71
|
+
getAllEmbeddingModels(): Map<string, EmbeddingModelInfo[]>;
|
|
43
72
|
/**
|
|
44
73
|
* Force refresh from remote. Returns true if successful.
|
|
45
74
|
*/
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* transient errors with exponential backoff.
|
|
7
7
|
*/
|
|
8
8
|
/** Default maximum number of retry attempts */
|
|
9
|
-
export declare const DEFAULT_MAX_RETRIES =
|
|
9
|
+
export declare const DEFAULT_MAX_RETRIES = 2;
|
|
10
10
|
/** Base delay for exponential backoff (doubles each attempt, capped at 30s) */
|
|
11
11
|
export declare const RETRY_BASE_DELAY_MS = 1000;
|
|
12
12
|
/** Maximum backoff delay */
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Manages a directed acyclic graph of tasks with dependencies.
|
|
5
5
|
* Ensures tasks only execute when all prerequisites are satisfied.
|
|
6
|
+
*
|
|
7
|
+
* Supports dynamic mutations: leader can add/remove/retry tasks at runtime.
|
|
6
8
|
*/
|
|
7
9
|
import type { ProductTaskDef, ProductTaskStatus } from "../runtime/infra/acp-types.js";
|
|
8
10
|
export interface TaskNode {
|
|
@@ -68,5 +70,49 @@ export declare class DagScheduler {
|
|
|
68
70
|
startedAt?: number;
|
|
69
71
|
completedAt?: number;
|
|
70
72
|
}>): void;
|
|
73
|
+
/**
|
|
74
|
+
* Add a new task to the DAG at runtime.
|
|
75
|
+
* Used by leader agent when it discovers new work is needed.
|
|
76
|
+
* Validates that the addition doesn't create cycles.
|
|
77
|
+
*/
|
|
78
|
+
addTask(task: ProductTaskDef): void;
|
|
79
|
+
/**
|
|
80
|
+
* Add multiple tasks atomically. All-or-nothing.
|
|
81
|
+
*/
|
|
82
|
+
addTasks(tasks: ProductTaskDef[]): void;
|
|
83
|
+
/**
|
|
84
|
+
* Remove a pending task from the DAG.
|
|
85
|
+
* Cannot remove running/completed tasks.
|
|
86
|
+
* Removes the task from other tasks' dependsOn lists.
|
|
87
|
+
*/
|
|
88
|
+
removeTask(taskId: string): void;
|
|
89
|
+
/**
|
|
90
|
+
* Retry a failed task: reset it to pending for re-execution.
|
|
91
|
+
* Optionally update the prompt (leader may refine instructions).
|
|
92
|
+
*/
|
|
93
|
+
retryTask(taskId: string, newPrompt?: string): void;
|
|
94
|
+
/**
|
|
95
|
+
* Update a pending task's prompt (leader refines instructions before execution).
|
|
96
|
+
*/
|
|
97
|
+
updateTaskPrompt(taskId: string, prompt: string): void;
|
|
98
|
+
/**
|
|
99
|
+
* Re-assign a pending task to a different instance.
|
|
100
|
+
*/
|
|
101
|
+
reassignTask(taskId: string, newAssignee: string): void;
|
|
102
|
+
/**
|
|
103
|
+
* Add a dependency edge. Validates no cycle is introduced.
|
|
104
|
+
*/
|
|
105
|
+
addDependency(taskId: string, dependsOnTaskId: string): void;
|
|
106
|
+
/**
|
|
107
|
+
* Get statistics for progress tracking.
|
|
108
|
+
*/
|
|
109
|
+
getProgress(): {
|
|
110
|
+
total: number;
|
|
111
|
+
completed: number;
|
|
112
|
+
running: number;
|
|
113
|
+
failed: number;
|
|
114
|
+
pending: number;
|
|
115
|
+
paused: number;
|
|
116
|
+
};
|
|
71
117
|
private validateDag;
|
|
72
118
|
}
|
|
@@ -3,7 +3,7 @@ export { classifyError, isRetryableCategory, type ErrorCategory, } from "./error
|
|
|
3
3
|
export { composeStrategies, composeAsyncStrategies, SlidingWindowStrategy, SummarizeOldStrategy, ToolResultTrimStrategy, HeadTailProtectedStrategy, IncrementalCompactStrategy, CacheAwareCompressionStrategy, CompressionMetricsCollector, ContextEngineRegistry, MicroCompactStrategy, postCompactFileRecovery, type PostCompactRecoveryConfig, buildStructuredSummaryPrompt, computeAdaptiveBudget, isAsyncCompressionStrategy, selectCompressionTier, DEFAULT_ADAPTIVE_BUDGET_CONFIG, type AdaptiveBudgetConfig, type AsyncCompressionStrategy, type CacheAwareCompressionConfig, type CompressibleMessage, type CompressionEvent, type CompressionMetrics, type CompressionMetricsSnapshot, type CompressionResult, type CompressionStrategy, type CompressionTier, type ContextEngine, type HeadTailProtectionConfig, type IncrementalCompactConfig, type SummarizeFn, } from "./context/context-compression.js";
|
|
4
4
|
export { snipCompactIfNeeded, type SnipResult, } from "./context/context-compression.js";
|
|
5
5
|
export { applyCollapsesIfNeeded as applyContextCollapsesIfNeeded, recoverFromOverflow as recoverContextCollapseFromOverflow, createCollapseStore, type CollapseStore, type CollapseStage, } from "./context/context-collapse.js";
|
|
6
|
-
export { buildSkillInstruction, type SkillCreateInstruction, type SkillImproveInstruction, type SkillInstruction, type SkillTurnResult, } from "./skill-improvement.js";
|
|
6
|
+
export { buildSkillInstruction, recordPatternAndCheckThreshold, getPatternStats, buildToolSignature, type SkillCreateInstruction, type SkillImproveInstruction, type SkillInstruction, type SkillTurnResult, } from "./skill-improvement.js";
|
|
7
7
|
export { applyToolChoicePolicy, type ApplyToolChoicePolicyInput, type ApplyToolChoicePolicyResult, } from "./tool-loop/tool-choice-policy.js";
|
|
8
8
|
export { repairOpenAiChatConversation, type ConversationRepairOptions, type OpenAiChatMessageLike, type OpenAiToolCall, } from "./tool-loop/conversation-repair.js";
|
|
9
9
|
export { advanceToolLoopState, recoverToolLoopStateFromChatConversation, recoverToolLoopStateFromResponsesItems, settleToolLoopState, type RepairToolLoopStateResult, type ToolLoopRepairAction, type ToolLoopState, } from "./tool-loop/tool-loop-state.js";
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Product Planner — Interactive multi-turn planning + persistent leader management.
|
|
3
|
+
*
|
|
4
|
+
* Architecture (aligned with CrewAI hierarchical + LangGraph durable execution):
|
|
5
|
+
*
|
|
6
|
+
* Phase 1 — PLANNING (multi-turn dialogue):
|
|
7
|
+
* 1. product.plan → spawn leader agent → leader engages user in multi-turn dialogue
|
|
8
|
+
* 2. Leader asks clarifying questions, proposes module decomposition
|
|
9
|
+
* 3. User responds via product.message → leader refines plan
|
|
10
|
+
* 4. Leader outputs structured plan → client presents to user
|
|
11
|
+
*
|
|
12
|
+
* Phase 2 — CONFIRMATION:
|
|
13
|
+
* 5. product.confirm → user confirms/modifies plan → transition to execution
|
|
14
|
+
*
|
|
15
|
+
* Phase 3 — EXECUTION (leader as persistent manager):
|
|
16
|
+
* 6. Leader manages DAG: dispatches tasks, monitors, handles failures
|
|
17
|
+
* 7. Leader can dynamically mutate DAG: add/retry/reassign tasks
|
|
18
|
+
* 8. User can intervene via product.message at any time
|
|
19
|
+
* 9. Each state transition is checkpointed for crash recovery
|
|
20
|
+
*
|
|
21
|
+
* Key mechanisms from reference projects:
|
|
22
|
+
* - CrewAI: hierarchical process (manager auto-delegates/verifies)
|
|
23
|
+
* - CrewAI: checkpoint serialization (mid-task state)
|
|
24
|
+
* - LangGraph: durable execution (persist after each node)
|
|
25
|
+
*/
|
|
26
|
+
import type { AgentProcessManager } from "../runtime/infra/agent-process.js";
|
|
27
|
+
import type { AcpDetector } from "../runtime/infra/acp-detector.js";
|
|
28
|
+
import type { AgentConfigStore } from "../runtime/infra/agent-config-store.js";
|
|
29
|
+
import type { ProductPlanParams, ProductPlan, ProductConfirmParams } from "../runtime/infra/acp-types.js";
|
|
30
|
+
export type PlanningPhase = "planning" | "awaiting_confirmation" | "confirmed" | "executing" | "paused" | "completed" | "cancelled";
|
|
31
|
+
export interface PlanningMessage {
|
|
32
|
+
role: "leader" | "user";
|
|
33
|
+
content: string;
|
|
34
|
+
timestamp: string;
|
|
35
|
+
}
|
|
36
|
+
export interface PlanningSession {
|
|
37
|
+
productId: string;
|
|
38
|
+
goal: string;
|
|
39
|
+
cwd: string;
|
|
40
|
+
leaderAgentId: string;
|
|
41
|
+
leaderMemberId?: string;
|
|
42
|
+
phase: PlanningPhase;
|
|
43
|
+
plan?: ProductPlan;
|
|
44
|
+
/** Multi-turn conversation history during planning. */
|
|
45
|
+
dialogue: PlanningMessage[];
|
|
46
|
+
budget?: {
|
|
47
|
+
maxTotalTokens?: number;
|
|
48
|
+
maxDuration?: number;
|
|
49
|
+
};
|
|
50
|
+
createdAt: string;
|
|
51
|
+
/** Last checkpoint timestamp for durable execution. */
|
|
52
|
+
lastCheckpoint?: string;
|
|
53
|
+
}
|
|
54
|
+
export interface PlannerCallbacks {
|
|
55
|
+
log?: {
|
|
56
|
+
info(msg: string): void;
|
|
57
|
+
warn(msg: string): void;
|
|
58
|
+
};
|
|
59
|
+
/** Leader produced a structured plan — client presents to user. */
|
|
60
|
+
onPlanReady?: (productId: string, plan: ProductPlan) => void;
|
|
61
|
+
/** Planning failed. */
|
|
62
|
+
onPlanFailed?: (productId: string, error: string) => void;
|
|
63
|
+
/** Streaming text from leader during planning dialogue. */
|
|
64
|
+
onPlanningDelta?: (productId: string, text: string) => void;
|
|
65
|
+
/** Leader sent a message to user (multi-turn). */
|
|
66
|
+
onLeaderMessage?: (productId: string, message: string) => void;
|
|
67
|
+
/** Leader dynamically mutated the DAG during execution. */
|
|
68
|
+
onDagMutated?: (productId: string, mutation: DagMutation) => void;
|
|
69
|
+
}
|
|
70
|
+
/** Describes a DAG mutation performed by the leader. */
|
|
71
|
+
export interface DagMutation {
|
|
72
|
+
type: "add_task" | "remove_task" | "retry_task" | "reassign_task" | "update_prompt";
|
|
73
|
+
taskId: string;
|
|
74
|
+
details?: Record<string, unknown>;
|
|
75
|
+
}
|
|
76
|
+
export declare class ProductPlanner {
|
|
77
|
+
private processManager;
|
|
78
|
+
private acpDetector;
|
|
79
|
+
private configStore;
|
|
80
|
+
private callbacks;
|
|
81
|
+
private sessions;
|
|
82
|
+
constructor(processManager: AgentProcessManager, acpDetector: AcpDetector, configStore: AgentConfigStore | null, callbacks?: PlannerCallbacks);
|
|
83
|
+
/**
|
|
84
|
+
* Start an interactive planning session (Phase 1).
|
|
85
|
+
* Spawns the leader agent and begins multi-turn dialogue.
|
|
86
|
+
*/
|
|
87
|
+
plan(params: ProductPlanParams): Promise<{
|
|
88
|
+
productId: string;
|
|
89
|
+
plan: ProductPlan;
|
|
90
|
+
}>;
|
|
91
|
+
/**
|
|
92
|
+
* Send a user message to the leader (works in planning and execution phases).
|
|
93
|
+
* Returns the leader's response and optionally a finalized plan.
|
|
94
|
+
*/
|
|
95
|
+
message(productId: string, content: string): Promise<{
|
|
96
|
+
response: string;
|
|
97
|
+
plan?: ProductPlan;
|
|
98
|
+
mutations?: DagMutation[];
|
|
99
|
+
}>;
|
|
100
|
+
/**
|
|
101
|
+
* Confirm the plan → transition to execution (Phase 2 → Phase 3).
|
|
102
|
+
*/
|
|
103
|
+
confirm(params: ProductConfirmParams): Promise<{
|
|
104
|
+
productId: string;
|
|
105
|
+
ok: true;
|
|
106
|
+
}>;
|
|
107
|
+
/** Transition session to executing phase. Called after ProductOrchestrator.create(). */
|
|
108
|
+
markExecuting(productId: string): void;
|
|
109
|
+
/** Mark as completed. */
|
|
110
|
+
markCompleted(productId: string): void;
|
|
111
|
+
/** Get planning session by ID. */
|
|
112
|
+
getSession(productId: string): PlanningSession | undefined;
|
|
113
|
+
/** Cancel and kill leader process. */
|
|
114
|
+
cancel(productId: string): Promise<void>;
|
|
115
|
+
/** List active sessions. */
|
|
116
|
+
listSessions(): PlanningSession[];
|
|
117
|
+
/**
|
|
118
|
+
* Ask leader to evaluate execution state and propose DAG mutations.
|
|
119
|
+
* Called by ProductOrchestrator when tasks fail or progress stalls.
|
|
120
|
+
*/
|
|
121
|
+
consultLeader(productId: string, context: {
|
|
122
|
+
progress: {
|
|
123
|
+
total: number;
|
|
124
|
+
completed: number;
|
|
125
|
+
running: number;
|
|
126
|
+
failed: number;
|
|
127
|
+
};
|
|
128
|
+
failedTasks?: Array<{
|
|
129
|
+
taskId: string;
|
|
130
|
+
error: string;
|
|
131
|
+
}>;
|
|
132
|
+
}): Promise<DagMutation[]>;
|
|
133
|
+
/**
|
|
134
|
+
* Serialize session for checkpoint persistence (durable execution).
|
|
135
|
+
*/
|
|
136
|
+
serializeSession(productId: string): PlanningSession | null;
|
|
137
|
+
/**
|
|
138
|
+
* Restore session from checkpoint (crash recovery).
|
|
139
|
+
*/
|
|
140
|
+
restoreSession(data: PlanningSession): void;
|
|
141
|
+
private handlePlanningMessage;
|
|
142
|
+
private handleExecutionMessage;
|
|
143
|
+
private sendToLeader;
|
|
144
|
+
private tryParsePlan;
|
|
145
|
+
private parseDagMutations;
|
|
146
|
+
}
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
* trigger skill creation or improvement instructions.
|
|
4
4
|
*
|
|
5
5
|
* Guards against proliferation:
|
|
6
|
+
* - Project-level pattern repetition: same workflow signature must appear
|
|
7
|
+
* ≥ SKILL_PATTERN_REPETITION_THRESHOLD times before triggering creation
|
|
6
8
|
* - MAX_SKILLS_PER_PROJECT: hard cap on project-level skills
|
|
7
9
|
* - Dedup check: compares tool-set signature against existing skills
|
|
8
10
|
* - Cooldown: prevents rapid-fire creation within a session
|
|
@@ -47,6 +49,40 @@ export type SkillInstruction = SkillCreateInstruction | SkillImproveInstruction;
|
|
|
47
49
|
* Reset cooldown state (for testing).
|
|
48
50
|
*/
|
|
49
51
|
export declare function resetSkillCreationCooldown(): void;
|
|
52
|
+
interface PatternEntry {
|
|
53
|
+
/** Sorted tool signature (e.g. "bash+file_read+file_write") */
|
|
54
|
+
signature: string;
|
|
55
|
+
/** Number of times this pattern has been observed */
|
|
56
|
+
count: number;
|
|
57
|
+
/** First seen timestamp (ISO) */
|
|
58
|
+
firstSeen: string;
|
|
59
|
+
/** Last seen timestamp (ISO) */
|
|
60
|
+
lastSeen: string;
|
|
61
|
+
/** Whether a skill has already been created for this pattern */
|
|
62
|
+
promoted: boolean;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Record a workflow pattern observation and return whether it has reached
|
|
66
|
+
* the repetition threshold (i.e., is now eligible for skill creation).
|
|
67
|
+
*
|
|
68
|
+
* @returns true if the pattern just reached the threshold on this observation
|
|
69
|
+
*/
|
|
70
|
+
export declare function recordPatternAndCheckThreshold(projectRoot: string, tools: string[]): boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Mark a pattern as promoted (skill already created for it).
|
|
73
|
+
* Called when a skill is created through other paths (e.g., manual).
|
|
74
|
+
*/
|
|
75
|
+
export declare function markPatternPromoted(projectRoot: string, tools: string[]): void;
|
|
76
|
+
/**
|
|
77
|
+
* Get all tracked patterns for a project. Useful for diagnostics.
|
|
78
|
+
*/
|
|
79
|
+
export declare function getPatternStats(projectRoot: string): PatternEntry[];
|
|
80
|
+
/**
|
|
81
|
+
* Build a normalized "tool signature" from sorted tool names.
|
|
82
|
+
* Used for dedup — if an existing skill has the same tool signature,
|
|
83
|
+
* we skip creation.
|
|
84
|
+
*/
|
|
85
|
+
export declare function buildToolSignature(tools: string[]): string;
|
|
50
86
|
/**
|
|
51
87
|
* Check if an existing skill in skillsDir already covers the same tool set.
|
|
52
88
|
* Returns the name of the conflicting skill, or null if none found.
|
|
@@ -68,6 +104,8 @@ export interface SkillCreationContext {
|
|
|
68
104
|
tools: string[];
|
|
69
105
|
/** Optional suggested name */
|
|
70
106
|
suggestedName?: string;
|
|
107
|
+
/** Project root directory (required for pattern tracking) */
|
|
108
|
+
projectRoot?: string;
|
|
71
109
|
}
|
|
72
110
|
/**
|
|
73
111
|
* Determine whether a completed turn should produce a skill instruction.
|
|
@@ -80,6 +118,7 @@ export interface SkillCreationContext {
|
|
|
80
118
|
* - Cooldown has elapsed since last skill creation
|
|
81
119
|
* - No duplicate skill exists (same tool signature)
|
|
82
120
|
* - Project skill count < MAX_SKILLS_PER_PROJECT
|
|
121
|
+
* - **Pattern repetition threshold reached** (≥3 occurrences at project level)
|
|
83
122
|
*/
|
|
84
123
|
export declare function shouldCreateSkill(result: SkillTurnResult, context?: SkillCreationContext): boolean;
|
|
85
124
|
export declare function shouldImproveSkill(result: SkillTurnResult): boolean;
|
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Solo Mode Evaluator — parallel N-agent PK with
|
|
2
|
+
* Solo Mode Evaluator — parallel N-agent PK with user-triggered evaluation.
|
|
3
3
|
*
|
|
4
4
|
* Flow:
|
|
5
5
|
* 1. solo.start → create N isolated git worktrees, spawn N agents in parallel
|
|
6
6
|
* 2. Each agent receives the same task prompt in its own worktree
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
7
|
+
* (all agents share initial config: memory/rules from project .qlogicagent/)
|
|
8
|
+
* 3. On completion of initial task, agents enter "idle" state (process kept alive)
|
|
9
|
+
* 4. User can send follow-up messages to individual agents via solo.message
|
|
10
|
+
* 5. User triggers evaluation via solo.evaluate (or skips directly to solo.select)
|
|
11
|
+
* 6. solo.select → merge winning worktree, clean up others
|
|
10
12
|
*
|
|
11
|
-
*
|
|
13
|
+
* Key design:
|
|
14
|
+
* - Solo = special project type (persisted in .qlogicagent/solos/)
|
|
15
|
+
* - Agents share the same initial config but operate in isolated worktrees
|
|
16
|
+
* - User controls the evaluation timing (not automatic)
|
|
17
|
+
* - Follow-up instructions to individual agents supported
|
|
18
|
+
*
|
|
19
|
+
* Degradation: if K agents fail but ≥1 succeeds, session remains interactive.
|
|
12
20
|
*/
|
|
13
21
|
import type { AgentProcessManager } from "../runtime/infra/agent-process.js";
|
|
14
22
|
import type { AcpDetector } from "../runtime/infra/acp-detector.js";
|
|
@@ -50,6 +58,18 @@ export declare class SoloEvaluator {
|
|
|
50
58
|
* Creates worktrees, spawns agents in parallel, waits for completion, then evaluates.
|
|
51
59
|
*/
|
|
52
60
|
start(params: SoloStartParams): Promise<string>;
|
|
61
|
+
/**
|
|
62
|
+
* Send a follow-up message to a specific agent within a solo session.
|
|
63
|
+
* Agent must be in "idle" or "completed" state.
|
|
64
|
+
*/
|
|
65
|
+
message(soloId: string, agentId: string, content: string, agentIndex?: number): Promise<{
|
|
66
|
+
resultText: string;
|
|
67
|
+
}>;
|
|
68
|
+
/**
|
|
69
|
+
* User-triggered evaluation — compare all completed/idle agents' results.
|
|
70
|
+
* The user chooses which agent in the session performs the evaluation comparison.
|
|
71
|
+
*/
|
|
72
|
+
triggerEvaluation(soloId: string, evaluatorAgentId: string, evaluatorIndex?: number): Promise<SoloEvaluation>;
|
|
53
73
|
/** Get the current status of a solo session. */
|
|
54
74
|
getStatus(soloId: string): SoloStatus | null;
|
|
55
75
|
/** Cancel a running solo session. Kill all agents and clean up worktrees. */
|
|
@@ -63,7 +83,7 @@ export declare class SoloEvaluator {
|
|
|
63
83
|
/** Delete a solo session, killing agents and cleaning up worktrees if still active. */
|
|
64
84
|
delete(soloId: string): Promise<void>;
|
|
65
85
|
/**
|
|
66
|
-
* Build an evaluation prompt and send to the
|
|
86
|
+
* Build an evaluation prompt and send to the user-chosen evaluator agent.
|
|
67
87
|
* Returns evaluation result.
|
|
68
88
|
*/
|
|
69
89
|
private evaluate;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
import type { ChatMessage, ToolDefinition } from "../agent/types.js";
|
|
10
10
|
import type { TaskItem as TodoItem } from "../skills/tools/task-tool.js";
|
|
11
11
|
import type { AgentDescriptor, AgentConfig, GatewayRpcMethodMap, RpcProjectInfo, RpcProjectType, RpcProjectStatus, SoloStatus, ProductStatus, ProductSummary } from "./wire/index.js";
|
|
12
|
-
import type { AgentsScanParams, AgentsConfigParams, AgentsSetConfigParams, AgentsGetConfigParams, AgentsRemoveConfigParams, AgentsSetGatewayParams, SoloStartParams, SoloIdParams, SoloSelectParams, SoloDeleteParams, ProductCreateParams, ProductIdParams, ProductDeleteParams } from "../runtime/infra/acp-types.js";
|
|
12
|
+
import type { AgentsScanParams, AgentsConfigParams, AgentsSetConfigParams, AgentsGetConfigParams, AgentsRemoveConfigParams, AgentsSetGatewayParams, SoloStartParams, SoloIdParams, SoloSelectParams, SoloDeleteParams, SoloMessageParams, SoloEvaluateParams, SoloEvaluation, ProductCreateParams, ProductPlanParams, ProductPlan, ProductConfirmParams, ProductMessageParams, ProductIdParams, ProductDeleteParams } from "../runtime/infra/acp-types.js";
|
|
13
13
|
export interface InitializeParams {
|
|
14
14
|
protocolVersion: string;
|
|
15
15
|
host?: {
|
|
@@ -522,6 +522,41 @@ export interface RpcMethodMap {
|
|
|
522
522
|
ok: true;
|
|
523
523
|
};
|
|
524
524
|
};
|
|
525
|
+
"solo.message": {
|
|
526
|
+
params: SoloMessageParams;
|
|
527
|
+
result: {
|
|
528
|
+
resultText: string;
|
|
529
|
+
};
|
|
530
|
+
};
|
|
531
|
+
"solo.evaluate": {
|
|
532
|
+
params: SoloEvaluateParams;
|
|
533
|
+
result: SoloEvaluation;
|
|
534
|
+
};
|
|
535
|
+
"product.plan": {
|
|
536
|
+
params: ProductPlanParams;
|
|
537
|
+
result: {
|
|
538
|
+
productId: string;
|
|
539
|
+
plan: ProductPlan;
|
|
540
|
+
};
|
|
541
|
+
};
|
|
542
|
+
"product.confirm": {
|
|
543
|
+
params: ProductConfirmParams;
|
|
544
|
+
result: {
|
|
545
|
+
productId: string;
|
|
546
|
+
ok: true;
|
|
547
|
+
};
|
|
548
|
+
};
|
|
549
|
+
"product.message": {
|
|
550
|
+
params: ProductMessageParams;
|
|
551
|
+
result: {
|
|
552
|
+
response: string;
|
|
553
|
+
plan?: ProductPlan;
|
|
554
|
+
mutations?: Array<{
|
|
555
|
+
type: string;
|
|
556
|
+
taskId: string;
|
|
557
|
+
}>;
|
|
558
|
+
};
|
|
559
|
+
};
|
|
525
560
|
"product.create": {
|
|
526
561
|
params: ProductCreateParams;
|
|
527
562
|
result: {
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
* This file re-exports the wire types.
|
|
7
7
|
* Internal consumers import from this file — zero churn.
|
|
8
8
|
*/
|
|
9
|
-
export type { AgentSource, AgentsErrorNotification, AgentsStatusNotification, ArtifactType, MediaResultType, MemoryDecayCompletedNotification, MemoryUpdatedNotification, NotificationMethod, NotificationMethodMap, NotificationThreadItem, PermissionRuleUpdatedNotification, PlanInterruptedNotification, PongNotification, ProductBudgetUpdateNotification, ProductBudgetWarningNotification, ProductCheckpointedNotification, ProductCompletedNotification, ProductDagTopologyNotification, ProductTaskCompletedNotification, ProductTaskFailedNotification, ProductTaskOutputDeltaNotification, ProductTaskStartedNotification, ProjectArchivedNotification, ProjectCreatedNotification, ProjectDeletedNotification, ProjectRenamedNotification, ProjectSwitchedNotification, ProjectUnarchivedNotification, SessionInfoNotification, SoloAgentDeltaNotification, SoloAgentDiffNotification, SoloAgentUsageNotification, SoloEvaluationNotification, SoloProgressNotification, TeamMemberNotification, ToolApprovalRequestNotification, TurnAnnotationsNotification, TurnArtifactNotification, TurnAskUserNotification, TurnDeltaNotification, TurnEndNotification, TurnErrorNotification, TurnExecProgressNotification, TurnHeartbeatNotification, TurnMediaPersistedNotification, TurnMediaProgressNotification, TurnMediaResultNotification, TurnPlanUpdateNotification, TurnReasoningDeltaNotification, TurnRecoveryNotification, TurnSidechainCompletedNotification, TurnSidechainStartedNotification, TurnSkillInstructionNotification, TurnStartNotification, TurnSubagentDeltaNotification, TurnSuggestionsNotification, TurnTaskUpdatedNotification, TurnTodosUpdatedNotification, TurnToolBlockedNotification, TurnToolCallNotification, TurnToolResultNotification, TurnToolUseSummaryNotification, TurnUsageUpdateNotification, WireTokenUsage, } from "./wire/index.js";
|
|
9
|
+
export type { AgentSource, AgentsErrorNotification, AgentsStatusNotification, ArtifactType, MediaResultType, MemoryDecayCompletedNotification, MemoryUpdatedNotification, NotificationMethod, NotificationMethodMap, NotificationThreadItem, PermissionRuleUpdatedNotification, PlanInterruptedNotification, PongNotification, ProductBudgetUpdateNotification, ProductBudgetWarningNotification, ProductCheckpointedNotification, ProductCompletedNotification, ProductDagTopologyNotification, ProductPlanFailedNotification, ProductPlanningDeltaNotification, ProductPlanReadyNotification, ProductTaskCompletedNotification, ProductTaskFailedNotification, ProductTaskOutputDeltaNotification, ProductTaskStartedNotification, ProjectArchivedNotification, ProjectCreatedNotification, ProjectDeletedNotification, ProjectRenamedNotification, ProjectSwitchedNotification, ProjectUnarchivedNotification, SessionInfoNotification, SoloAgentDeltaNotification, SoloAgentDiffNotification, SoloAgentUsageNotification, SoloEvaluationNotification, SoloProgressNotification, TeamMemberNotification, ToolApprovalRequestNotification, TurnAnnotationsNotification, TurnArtifactNotification, TurnAskUserNotification, TurnDeltaNotification, TurnEndNotification, TurnErrorNotification, TurnExecProgressNotification, TurnHeartbeatNotification, TurnMediaPersistedNotification, TurnMediaProgressNotification, TurnMediaResultNotification, TurnPlanUpdateNotification, TurnReasoningDeltaNotification, TurnRecoveryNotification, TurnSidechainCompletedNotification, TurnSidechainStartedNotification, TurnSkillInstructionNotification, TurnStartNotification, TurnSubagentDeltaNotification, TurnSuggestionsNotification, TurnTaskUpdatedNotification, TurnTodosUpdatedNotification, TurnToolBlockedNotification, TurnToolCallNotification, TurnToolResultNotification, TurnToolUseSummaryNotification, TurnUsageUpdateNotification, WireTokenUsage, } from "./wire/index.js";
|
|
@@ -22,12 +22,17 @@ export declare const ACP_EXTENDED_METHODS: {
|
|
|
22
22
|
readonly SOLO_SELECT: "x/solo.select";
|
|
23
23
|
readonly SOLO_CANCEL: "x/solo.cancel";
|
|
24
24
|
readonly PRODUCT_CREATE: "x/product.create";
|
|
25
|
+
readonly PRODUCT_PLAN: "x/product.plan";
|
|
26
|
+
readonly PRODUCT_CONFIRM: "x/product.confirm";
|
|
27
|
+
readonly PRODUCT_MESSAGE: "x/product.message";
|
|
25
28
|
readonly PRODUCT_RESUME: "x/product.resume";
|
|
26
29
|
readonly PRODUCT_PAUSE: "x/product.pause";
|
|
27
30
|
readonly PRODUCT_CANCEL: "x/product.cancel";
|
|
28
31
|
readonly PRODUCT_ROLLBACK: "x/product.rollback";
|
|
29
32
|
readonly PRODUCT_STATUS: "x/product.status";
|
|
30
33
|
readonly SOLO_SUBSCRIBE: "x/solo.subscribe";
|
|
34
|
+
readonly SOLO_MESSAGE: "x/solo.message";
|
|
35
|
+
readonly SOLO_EVALUATE: "x/solo.evaluate";
|
|
31
36
|
readonly PRODUCT_SUBSCRIBE: "x/product.subscribe";
|
|
32
37
|
readonly TEAM_DELEGATE: "x/team.delegate";
|
|
33
38
|
};
|
|
@@ -105,6 +110,8 @@ export interface AcpSessionPromptResult {
|
|
|
105
110
|
stopReason: AcpStopReason;
|
|
106
111
|
/** Token usage for this turn */
|
|
107
112
|
usage?: AcpUsage;
|
|
113
|
+
/** Final assistant content (internal, used for history tracking). */
|
|
114
|
+
content?: string;
|
|
108
115
|
}
|
|
109
116
|
export interface AcpSessionEndParams {
|
|
110
117
|
sessionId: string;
|
|
@@ -56,7 +56,7 @@ export interface AgentConfig {
|
|
|
56
56
|
modelIdMap?: Record<string, string>;
|
|
57
57
|
}
|
|
58
58
|
export type SoloState = "running" | "evaluating" | "completed" | "cancelled" | "failed";
|
|
59
|
-
export type SoloAgentState = "pending" | "running" | "completed" | "failed";
|
|
59
|
+
export type SoloAgentState = "pending" | "running" | "completed" | "failed" | "idle";
|
|
60
60
|
export interface SoloAgentResult {
|
|
61
61
|
id: string;
|
|
62
62
|
state: SoloAgentState;
|
|
@@ -3,7 +3,7 @@ export { GATEWAY_RPC_METHODS, type AgentCall, type GatewayRpcMethodMap, type Pro
|
|
|
3
3
|
export { type ChatMessage, type ChatMessageRole, type ThinkingBlock, type ToolCallMessage, type ToolDefinition, } from "./chat-types.js";
|
|
4
4
|
export { type AgentCapabilities, type AgentCategory, type AgentConfig, type AgentDescriptor, type AgentProtocol, type AgentRpcMethodMap, type AgentStatus, type CustomAgentDef, type ProductInstanceDef, type ProductPhase, type ProductStatus, type ProductSummary, type ProductTaskDef, type ProductTaskStatus, type SoloAgentResult, type SoloAgentState, type SoloState, type SoloStatus, } from "./agent-methods.js";
|
|
5
5
|
export { AGENT_TEAM_WS_EVENT_NAMES, AGENT_WS_EVENT_NAMES, ALL_AGENT_WS_EVENT_NAMES, type AgentTeamWsEventName, type AgentWsEventName, type AllAgentWsEventName, } from "./agent-events.js";
|
|
6
|
-
export { type AgentSource, type AgentsErrorNotification, type AgentsStatusNotification, type ArtifactType, type MediaResultType, type MemoryDecayCompletedNotification, type MemoryUpdatedNotification, type NotificationMethod, type NotificationMethodMap, type NotificationThreadItem, type PermissionRuleUpdatedNotification, type PlanInterruptedNotification, type PongNotification, type ProductBudgetUpdateNotification, type ProductBudgetWarningNotification, type ProductCheckpointedNotification, type ProductCompletedNotification, type ProductDagTopologyNotification, type ProductTaskCompletedNotification, type ProductTaskFailedNotification, type ProductTaskOutputDeltaNotification, type ProductTaskStartedNotification, type ProjectArchivedNotification, type ProjectCreatedNotification, type ProjectDeletedNotification, type ProjectRenamedNotification, type ProjectSwitchedNotification, type ProjectUnarchivedNotification, type SessionInfoNotification, type SoloAgentDeltaNotification, type SoloAgentDiffNotification, type SoloAgentUsageNotification, type SoloEvaluationNotification, type SoloProgressNotification, type TeamMemberNotification, type ToolApprovalRequestNotification, type TurnAnnotationsNotification, type TurnArtifactNotification, type TurnAskUserNotification, type TurnDeltaNotification, type TurnEndNotification, type TurnErrorNotification, type TurnExecProgressNotification, type TurnHeartbeatNotification, type TurnMediaPersistedNotification, type TurnMediaProgressNotification, type TurnMediaResultNotification, type TurnPlanUpdateNotification, type TurnReasoningDeltaNotification, type TurnRecoveryNotification, type TurnSidechainCompletedNotification, type TurnSidechainStartedNotification, type TurnSkillInstructionNotification, type TurnStartNotification, type TurnSubagentDeltaNotification, type TurnSuggestionsNotification, type TurnTaskUpdatedNotification, type TurnTodosUpdatedNotification, type TurnToolBlockedNotification, type TurnToolCallNotification, type TurnToolResultNotification, type TurnToolUseSummaryNotification, type TurnUsageUpdateNotification, type WireTokenUsage, } from "./notification-payloads.js";
|
|
6
|
+
export { type AgentSource, type AgentsErrorNotification, type AgentsStatusNotification, type ArtifactType, type MediaResultType, type MemoryDecayCompletedNotification, type MemoryUpdatedNotification, type NotificationMethod, type NotificationMethodMap, type NotificationThreadItem, type PermissionRuleUpdatedNotification, type PlanInterruptedNotification, type PongNotification, type ProductBudgetUpdateNotification, type ProductBudgetWarningNotification, type ProductCheckpointedNotification, type ProductCompletedNotification, type ProductDagTopologyNotification, type ProductTaskCompletedNotification, type ProductTaskFailedNotification, type ProductTaskOutputDeltaNotification, type ProductTaskStartedNotification, type ProjectArchivedNotification, type ProjectCreatedNotification, type ProjectDeletedNotification, type ProjectRenamedNotification, type ProjectSwitchedNotification, type ProjectUnarchivedNotification, type SessionInfoNotification, type SoloAgentDeltaNotification, type SoloAgentDiffNotification, type SoloAgentUsageNotification, type SoloEvaluationNotification, type SoloProgressNotification, type TeamMemberNotification, type ToolApprovalRequestNotification, type TurnAnnotationsNotification, type TurnArtifactNotification, type TurnAskUserNotification, type TurnDeltaNotification, type TurnEndNotification, type TurnErrorNotification, type TurnExecProgressNotification, type TurnHeartbeatNotification, type TurnMediaPersistedNotification, type TurnMediaProgressNotification, type TurnMediaResultNotification, type TurnPlanUpdateNotification, type TurnReasoningDeltaNotification, type TurnRecoveryNotification, type TurnSidechainCompletedNotification, type TurnSidechainStartedNotification, type TurnSkillAcquisitionNeededNotification, type TurnSkillInstructionNotification, type TurnStartNotification, type TurnSubagentDeltaNotification, type TurnSuggestionsNotification, type TurnTaskUpdatedNotification, type TurnTodosUpdatedNotification, type TurnToolBlockedNotification, type TurnToolCallNotification, type TurnToolResultNotification, type TurnToolUseSummaryNotification, type TurnUsageUpdateNotification, type WireTokenUsage, type ProductPlanReadyNotification, type ProductPlanFailedNotification, type ProductPlanningDeltaNotification, } from "./notification-payloads.js";
|
|
7
7
|
export { ACP_EXTENDED_METHODS, ACP_EXTENDED_SESSION_UPDATE_TYPES, ACP_METHODS, ACP_PROTOCOL_VERSION, ACP_SESSION_UPDATE_TYPES, isAcpJsonRpcNotification, isAcpJsonRpcRequest, isAcpJsonRpcResponse, isExtendedSessionUpdateType, isStandardSessionUpdateType, parseAcpMessage, type AcpAgentCapabilities, type AcpAgentMessageChunkPayload, type AcpAgentThoughtChunkPayload, type AcpAvailableCommandsUpdatePayload, type AcpConfigOptionDescriptor, type AcpConfigOptionUpdatePayload, type AcpContentBlock, type AcpContextItem, type AcpEndTurnPayload, type AcpExtendedMethod, type AcpExtendedSessionUpdateType, type AcpFsReadTextFileParams, type AcpFsReadTextFileResult, type AcpFsWriteTextFileParams, type AcpFsWriteTextFileResult, type AcpHostCapabilities, type AcpInitializeParams, type AcpInitializeResult, type AcpJsonRpcError, type AcpJsonRpcMessage, type AcpJsonRpcNotification, type AcpJsonRpcRequest, type AcpJsonRpcResponse, type AcpPermissionOption, type AcpPermissionRequestParams, type AcpPermissionRequestResult, type AcpPlanPayload, type AcpSessionEndParams, type AcpSessionNewParams, type AcpSessionNewResult, type AcpSessionPromptParams, type AcpSessionPromptResult, type AcpSessionSetConfigParams, type AcpSessionUpdateNotification, type AcpSessionUpdateType, type AcpStandardMethod, type AcpStandardSessionUpdateType, type AcpStopReason, type AcpToolCallPayload, type AcpToolCallUpdatePayload, type AcpUsage, type AcpUsageUpdatePayload, type AcpXAskUserPayload, type AcpXMediaProgressPayload, type AcpXMediaResultPayload, type AcpXMemoryUpdatedPayload, type AcpXProductCheckpointPayload, type AcpXProductTaskCompletedPayload, type AcpXProductTaskStartedPayload, type AcpXRecoveryPayload, type AcpXSessionInfoPayload, type AcpXSidechainCompletedPayload, type AcpXSidechainStartedPayload, type AcpXSkillInstructionPayload, type AcpXSoloAgentFinishedPayload, type AcpXSoloSelectedPayload, type AcpXSoloStartedPayload, type AcpXSubagentDeltaPayload, type AcpXSubagentEndedPayload, type AcpXSubagentStartedPayload, type AcpXSuggestionsPayload, type AcpXTeamMemberUpdatePayload, } from "./acp-protocol.js";
|
|
8
8
|
export { type ApprovalRequiredToolContract, type ModelSelectionReason, type PendingPromptContract, type RuntimeCapabilitySummaryContract, type RuntimeSessionContract, type SessionIdentityContract, } from "./session.js";
|
|
9
9
|
export { type GatewayChannelExecutionEgressContract, type GatewayChannelExecutionEgressKind, type GatewayChannelExecutionIngressBindingContract, type GatewayChannelExecutionIngressSource, } from "./channel-ingress.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { AgentExecutionRefs } from "./transport.js";
|
|
2
2
|
export declare const MEMORY_OBSERVATION_HOOK_VALUES: readonly ["prefetch", "sync_turn", "on_pre_compress", "on_session_end", "on_delegation", "on_memory_write"];
|
|
3
3
|
export type MemoryObservationHook = (typeof MEMORY_OBSERVATION_HOOK_VALUES)[number];
|
|
4
|
-
export declare const MEMORY_OBSERVATION_SOURCE_VALUES: readonly ["turn", "sidechain", "compress", "session-end"];
|
|
4
|
+
export declare const MEMORY_OBSERVATION_SOURCE_VALUES: readonly ["turn", "sidechain", "compress", "session-end", "agent-remember", "auto-extract", "implicit-extract", "profile-extraction", "dream"];
|
|
5
5
|
export type MemoryObservationSource = (typeof MEMORY_OBSERVATION_SOURCE_VALUES)[number];
|
|
6
6
|
export declare const MEMORY_WRITE_ACCESS_VALUES: readonly ["observe-only", "parent-write", "deny"];
|
|
7
7
|
export type MemoryWriteAccess = (typeof MEMORY_WRITE_ACCESS_VALUES)[number];
|
|
@@ -56,6 +56,8 @@ export interface MemorySearchOptions {
|
|
|
56
56
|
limit?: number;
|
|
57
57
|
minScore?: number;
|
|
58
58
|
llmConfig?: MemoryLlmConfig;
|
|
59
|
+
/** Categories to boost during reranking (e.g. ["lesson", "preference"]). */
|
|
60
|
+
preferredCategories?: string[];
|
|
59
61
|
}
|
|
60
62
|
export interface MemoryIngestOptions {
|
|
61
63
|
llmConfig?: MemoryLlmConfig;
|