qlogicagent 2.19.13 → 2.20.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/README.md +0 -1
- package/dist/agent-contract.js +1 -1
- package/dist/agent.js +31 -31
- package/dist/cli.js +1 -1
- package/dist/host-contract.js +1 -1
- package/dist/index.js +457 -453
- package/dist/orchestration.js +13 -13
- package/dist/project-memory-host.js +19 -18
- package/dist/protocol.js +1 -1
- package/dist/tunables.js +1 -1
- package/dist/types/cli/acp-extended-handlers.d.ts +5 -10
- package/dist/types/cli/acp-extended-host-adapter.d.ts +1 -1
- package/dist/types/cli/community-workflow-installer.d.ts +2 -2
- package/dist/types/cli/handlers/dream-handler.d.ts +6 -0
- package/dist/types/cli/handlers/goal-handler.d.ts +1 -13
- package/dist/types/cli/handlers/product-handler.d.ts +6 -9
- package/dist/types/cli/handlers/solo-handler.d.ts +3 -6
- package/dist/types/cli/handlers/workflow-compute-handler.d.ts +1 -1
- package/dist/types/cli/memory-coordinator.d.ts +0 -2
- package/dist/types/cli/multi-agent-handler-host.d.ts +1 -1
- package/dist/types/cli/orchestration-memory-context.d.ts +1 -0
- package/dist/types/cli/product-coordinator.d.ts +2 -5
- package/dist/types/cli/rpc-registry.d.ts +0 -3
- package/dist/types/cli/runtime-hook-bootstrap.d.ts +0 -2
- package/dist/types/cli/stdio-rpc-handler-hosts.d.ts +2 -1
- package/dist/types/cli/stdio-server.d.ts +2 -3
- package/dist/types/cli/task-distillation-coordinator.d.ts +0 -3
- package/dist/types/contracts/hooks.d.ts +2 -0
- package/dist/types/host-contract/index.d.ts +3 -13
- package/dist/types/index.d.ts +0 -1
- package/dist/types/orchestration/agent-instance.d.ts +30 -15
- package/dist/types/orchestration/agent-roster.d.ts +2 -2
- package/dist/types/orchestration/goal-loop-coordinator.d.ts +18 -8
- package/dist/types/orchestration/goal-mode-adapters.d.ts +6 -1
- package/dist/types/orchestration/goal-run-persistence.d.ts +12 -10
- package/dist/types/orchestration/goal-run-types.d.ts +3 -21
- package/dist/types/orchestration/index.d.ts +0 -1
- package/dist/types/orchestration/product-checkpoint.d.ts +10 -6
- package/dist/types/orchestration/product-persistence.d.ts +47 -20
- package/dist/types/orchestration/product-planner.d.ts +30 -10
- package/dist/types/orchestration/product-run-coordinator.d.ts +4 -3
- package/dist/types/orchestration/solo-evaluator.d.ts +10 -16
- package/dist/types/orchestration/solo-persistence.d.ts +10 -10
- package/dist/types/orchestration/workflow/budget-permission-gate.d.ts +1 -1
- package/dist/types/orchestration/workflow/capability-catalog.d.ts +11 -34
- package/dist/types/orchestration/workflow/host-executors.d.ts +3 -3
- package/dist/types/orchestration/workflow/n8n-import.d.ts +0 -1
- package/dist/types/orchestration/workflow/node-schema.d.ts +5 -18
- package/dist/types/orchestration/workflow/params-schema.d.ts +7 -16
- package/dist/types/orchestration/workflow/qla-executor-host.d.ts +4 -27
- package/dist/types/orchestration/workflow/workflow-bundle.d.ts +10 -28
- package/dist/types/orchestration/workflow/workflow-controller.d.ts +14 -8
- package/dist/types/orchestration/workflow/workflow-error.d.ts +1 -1
- package/dist/types/orchestration/workflow/workflow-render.d.ts +1 -1
- package/dist/types/orchestration/workflow/workflow-scheduler.d.ts +8 -8
- package/dist/types/orchestration/workflow/workflow-store.d.ts +7 -8
- package/dist/types/orchestration/workflow-chat-builder.d.ts +1 -1
- package/dist/types/protocol/agent-contract.d.ts +7 -7
- package/dist/types/protocol/methods.d.ts +1 -129
- package/dist/types/protocol/notifications.d.ts +1 -1
- package/dist/types/protocol/wire/acp-agent-management.d.ts +45 -24
- package/dist/types/protocol/wire/acp-protocol.d.ts +3 -8
- package/dist/types/protocol/wire/agent-methods.d.ts +2 -468
- package/dist/types/protocol/wire/index.d.ts +1 -1
- package/dist/types/protocol/wire/notification-payloads.d.ts +0 -6
- package/dist/types/protocol/wire/thread-protocol.d.ts +1 -1
- package/dist/types/runtime/config/tunable-defaults.d.ts +0 -9
- package/dist/types/runtime/hooks/memory-hooks.d.ts +11 -4
- package/dist/types/runtime/infra/acp-protocol-adapter.d.ts +1 -2
- package/dist/types/runtime/memory/implicit-extraction.d.ts +4 -1
- package/dist/types/runtime/memory/recall-category-filter.d.ts +0 -12
- package/dist/types/runtime/ports/memory-recall-source.d.ts +1 -0
- package/dist/types/runtime/ports/project-memory-store.d.ts +3 -0
- package/dist/types/skills/memory/host-memory-provider.d.ts +7 -0
- package/dist/types/skills/memory/memdir.d.ts +1 -2
- package/dist/types/skills/memory/task-distillation.d.ts +18 -4
- package/dist/types/skills/skill-system/skill-lifecycle.d.ts +0 -17
- package/dist/types/skills/skill-system/skill-validation.d.ts +1 -1
- package/dist/types/transport/acp-server.d.ts +1 -5
- package/dist/types/workflow-host.d.ts +2 -4
- package/dist/workflow-host.js +7 -9
- package/package.json +1 -1
- package/dist/types/cli/credential-vault.d.ts +0 -68
- package/dist/types/orchestration/skill-improvement.d.ts +0 -97
- package/dist/types/skills/memory/local-store-records.d.ts +0 -206
- package/dist/types/skills/memory/local-store.d.ts +0 -376
- package/dist/types/skills/memory/memory-attachment-store.d.ts +0 -62
- package/dist/types/skills/memory/memory-consolidation.d.ts +0 -64
- package/dist/types/skills/memory/memory-db-path.d.ts +0 -13
- package/dist/types/skills/memory/proposal-consumer.d.ts +0 -51
- package/dist/types/skills/memory/sqlite-memory-mappers.d.ts +0 -7
- package/dist/types/skills/memory/sqlite-memory-schema.d.ts +0 -11
|
@@ -13,6 +13,8 @@ export interface ProjectMemoryResult {
|
|
|
13
13
|
export interface ProjectMemoryStore {
|
|
14
14
|
getRootPath(): string;
|
|
15
15
|
ensureInitialized(): void | Promise<void>;
|
|
16
|
+
/** Re-read the Host-owned INDEX snapshot before a later turn assembles its prompt. */
|
|
17
|
+
refreshIndex(): Promise<void>;
|
|
16
18
|
getIndexForPrompt(): string;
|
|
17
19
|
getIndexRaw(): string;
|
|
18
20
|
getIndexUsage(): {
|
|
@@ -36,6 +38,7 @@ export interface ProjectMemoryStore {
|
|
|
36
38
|
file: string;
|
|
37
39
|
snippet: string;
|
|
38
40
|
score: number;
|
|
41
|
+
mtimeMs: number;
|
|
39
42
|
}>>;
|
|
40
43
|
}
|
|
41
44
|
export interface ProjectMemoryStoreFactory {
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
* setProfile / getAtlas / setMemoryArchived / triggerDecay / resolveConflicts
|
|
15
15
|
* [A9] 追加 listActiveMemoriesByTag(晋升扫描全量列举;无窗/无 clamp/无上限)。
|
|
16
16
|
* [A10] 追加 promoteDistilledProcedure(升格窄 Saga;幂等/补偿/续跑在 Host)。
|
|
17
|
+
* [A7] 追加 recordInjectedAccess(注入后记账:search 去记账后 access_count 的唯一召回侧写点)。
|
|
17
18
|
*
|
|
18
19
|
* 面外方法 = fail-loud throw(护栏抓漏):gate 开时 UI RPC 面(atlas 富查询/update/attachments/
|
|
19
20
|
* proposals 消费等)由 gateway host-native 应答,**不该**再落到 qla 的 provider;到达此处 = 路由/
|
|
@@ -143,6 +144,12 @@ export declare class HostMemoryProvider implements MemoryRuntimeHookProvider, Me
|
|
|
143
144
|
proposalAccepted: boolean;
|
|
144
145
|
};
|
|
145
146
|
}>;
|
|
147
|
+
/** [A7] 注入后访问记账:上报本轮真实进 prompt 的 L2 id 集(memory.after_recall 的
|
|
148
|
+
* post-cap 名单)。Host 是 access_count/last_accessed_at 的唯一写者;search() 已不再
|
|
149
|
+
* 命中即记 —— 漏调此法只会低估复用,绝不虚增。 */
|
|
150
|
+
recordInjectedAccess(memoryIds: string[], userId: string): Promise<{
|
|
151
|
+
affected: number;
|
|
152
|
+
}>;
|
|
146
153
|
/** 本 provider 不持有 db 句柄/文件资源;close 为 no-op(shutdown 链 closeMemoryProviders 会调)。 */
|
|
147
154
|
close(): void;
|
|
148
155
|
remove(_memoryId: string): never;
|
|
@@ -6,8 +6,6 @@ export declare const INDEX_MAX_LINES = 200;
|
|
|
6
6
|
export declare const TOPIC_FILE_MAX_CHARS = 8192;
|
|
7
7
|
/** Root directory: <project>/.qlogicagent/memory/ */
|
|
8
8
|
export declare function getMemdirPath(projectRoot: string): string;
|
|
9
|
-
/** Full path to INDEX.md */
|
|
10
|
-
export declare function getIndexPath(projectRoot: string): string;
|
|
11
9
|
/** Global-layer size budget: a cheat-sheet, not a memory store. */
|
|
12
10
|
export declare const USER_INDEX_MAX_CHARS = 2048;
|
|
13
11
|
export declare const USER_INDEX_MAX_LINES = 40;
|
|
@@ -97,6 +95,7 @@ export declare class Memdir {
|
|
|
97
95
|
file: string;
|
|
98
96
|
snippet: string;
|
|
99
97
|
score: number;
|
|
98
|
+
mtimeMs: number;
|
|
100
99
|
}>>;
|
|
101
100
|
private writeIndex;
|
|
102
101
|
private writeIndexUnlocked;
|
|
@@ -20,7 +20,12 @@ export declare const TASK_DISTILL_CLUSTER_SIM = 0.86;
|
|
|
20
20
|
export declare const TASK_DISTILL_REDO_WINDOW_TURNS = 3;
|
|
21
21
|
/** 候选滚动上限(jsonl 只保留最近 N 条,防无界增长)。 */
|
|
22
22
|
export declare const TASK_DISTILL_MAX_CANDIDATES = 200;
|
|
23
|
-
/** 晋升推荐阈值:procedure
|
|
23
|
+
/** 晋升推荐阈值:procedure 实际进入 prompt(注入闸后)≥N 次且未被负反馈沉底。
|
|
24
|
+
* [A7 重标定] 记账点已从 before_recall(检索命中)移到实际注入之后:旧口径把 dream/
|
|
25
|
+
* planner brief/写入去重探测等 8 条非召回链路的 search 命中都算成"复用",恒 ≥ 真实值;
|
|
26
|
+
* 新口径 = 模型真看到过的次数。阈值数值保留 3:设计意图本就是"真实复用 3 次",旧记账
|
|
27
|
+
* 只是高估了它 —— 同数值在新口径下只会更严、名副其实。存量 access_count 含检索热度成分,
|
|
28
|
+
* 不回溯清洗(负反馈门与 importance>0.5 门兜底)。 */
|
|
24
29
|
export declare const TASK_DISTILL_PROMOTE_ACCESS = 3;
|
|
25
30
|
export declare const PROCEDURE_TAG = "distilled@v1";
|
|
26
31
|
export declare const PROCEDURE_CATEGORY = "procedure";
|
|
@@ -120,11 +125,16 @@ export declare function renderSkillMarkdownFallback(name: string, procedureText:
|
|
|
120
125
|
export declare const V3_AUTO_MIN_SAMPLES = 10;
|
|
121
126
|
export declare const V3_AUTO_MIN_ACCEPT_RATE = 0.7;
|
|
122
127
|
export declare const V3_AUTO_MAX_REVERT_RATE = 0.1;
|
|
123
|
-
/** 自动档触发严阈值(拍板④,比手动档 3 更严)。
|
|
128
|
+
/** 自动档触发严阈值(拍板④,比手动档 3 更严)。
|
|
129
|
+
* [A7 重标定] ACCESS 与 SESSIONS 的数据源都已移到"实际注入 prompt 之后"记账
|
|
130
|
+
* (memory.after_recall 的 post-cap 名单):≥5 次 = 真进过 5 次对话,≥3 session =
|
|
131
|
+
* 真在 3 个会话里被模型看到过。数值保留 —— 拍板④要的"严"指真实复用强度,旧记账
|
|
132
|
+
* 用检索命中冒充它;新口径同数值语义只紧不松,无需放宽(若自动档长期不可达,应
|
|
133
|
+
* 优先怀疑召回质量而不是降门槛)。 */
|
|
124
134
|
export declare const V3_AUTO_MIN_ACCESS = 5;
|
|
125
135
|
export declare const V3_AUTO_MIN_SESSIONS = 3;
|
|
126
136
|
export interface ProcedureUsage {
|
|
127
|
-
/**
|
|
137
|
+
/** 实际注入 prompt 复用过它的 session 集合([A7] 记账在注入闸后,不再是检索命中) */
|
|
128
138
|
sessions: string[];
|
|
129
139
|
/** 复用后回合失败次数(零容忍:自动档要求 0) */
|
|
130
140
|
negativeCount: number;
|
|
@@ -146,5 +156,9 @@ export interface PromotionMetrics {
|
|
|
146
156
|
/** 手动阶段仪表(拍板③):接受率=accepted 家族/已决样本;降格率=reverted/accepted 家族。
|
|
147
157
|
* 任何时刻降格率回升超限即自动退回手动档(autoEnabled 现算,无粘滞)。 */
|
|
148
158
|
export declare function computePromotionMetrics(proposals: readonly PromotionProposal[]): PromotionMetrics;
|
|
149
|
-
/** 自动档严阈值(拍板④):复用 ≥5 + 跨 ≥3 session + 零负反馈。
|
|
159
|
+
/** 自动档严阈值(拍板④):复用 ≥5 + 跨 ≥3 session + 零负反馈。
|
|
160
|
+
* [A7] 三个输入如今全部以"实际注入 prompt"为记账点:accessCount 来自 Host 的
|
|
161
|
+
* recordInjectedAccess(post-cap 名单),sessions 来自 after_recall 侧的
|
|
162
|
+
* recordProcedureRecalls,negativeCount 也只指控被注入过的配方 —— 自动落盘技能的
|
|
163
|
+
* 每一分证据都对应模型真实看到并用过它的回合。 */
|
|
150
164
|
export declare function qualifiesForAutoPromotion(accessCount: number, usage: ProcedureUsage | undefined): boolean;
|
|
@@ -46,8 +46,6 @@ export interface CuratorResult {
|
|
|
46
46
|
}>;
|
|
47
47
|
skippedPinned: string[];
|
|
48
48
|
}
|
|
49
|
-
export declare function loadLifecycleStore(agentHome: string): SkillLifecycleStore;
|
|
50
|
-
export declare function saveLifecycleStore(agentHome: string, store: SkillLifecycleStore): void;
|
|
51
49
|
/**
|
|
52
50
|
* Ensure a lifecycle record exists for a skill. Creates one if missing.
|
|
53
51
|
*/
|
|
@@ -74,21 +72,6 @@ export declare function isPinned(store: SkillLifecycleStore, name: string): bool
|
|
|
74
72
|
* Call this on agent idle, periodic timer, or explicit RPC.
|
|
75
73
|
*/
|
|
76
74
|
export declare function runCurator(store: SkillLifecycleStore): CuratorResult;
|
|
77
|
-
/**
|
|
78
|
-
* Archive a skill on disk: move its directory to `.archive/` subfolder.
|
|
79
|
-
* Returns true if archival succeeded.
|
|
80
|
-
*/
|
|
81
|
-
export declare function archiveSkillOnDisk(skillsDir: string, skillName: string): boolean;
|
|
82
|
-
/**
|
|
83
|
-
* Unarchive a skill: move from `.archive/` back to main skills dir.
|
|
84
|
-
* Resets state to active.
|
|
85
|
-
*/
|
|
86
|
-
export declare function unarchiveSkillOnDisk(skillsDir: string, skillName: string): boolean;
|
|
87
|
-
/**
|
|
88
|
-
* Execute full curator cycle: evaluate state transitions + archive on disk.
|
|
89
|
-
* Returns curator result with all transitions made.
|
|
90
|
-
*/
|
|
91
|
-
export declare function executeCuratorCycle(agentHome: string, skillsDir: string): CuratorResult;
|
|
92
75
|
/**
|
|
93
76
|
* Get all skills in a given state.
|
|
94
77
|
*/
|
|
@@ -13,7 +13,7 @@ export declare const MAX_DESCRIPTION_LENGTH = 60;
|
|
|
13
13
|
export declare function validateSkillContent(content: string, expectedName?: string): FrontmatterValidationResult;
|
|
14
14
|
/**
|
|
15
15
|
* Generate valid SKILL.md content with proper frontmatter from minimal inputs.
|
|
16
|
-
* Used when auto-persisting skills from
|
|
16
|
+
* Used when auto-persisting skills from skill tool mutations.
|
|
17
17
|
*/
|
|
18
18
|
export declare function generateSkillContent(params: {
|
|
19
19
|
name: string;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*
|
|
9
9
|
* Responsibilities:
|
|
10
10
|
* - Accepts ACP standard methods: initialize, session/new, session/prompt, session/close
|
|
11
|
-
* - Accepts x/ extended methods: x/abort, x/dream, x/solo.*, x/product.*
|
|
11
|
+
* - Accepts x/ extended methods: x/abort, x/dream, x/solo.*, x/product.*, x/goal.*, x/workflow.*
|
|
12
12
|
* - Emits ACP session/update notifications (standard + x_ extended)
|
|
13
13
|
* - Translates host permission responses back to the agent
|
|
14
14
|
*
|
|
@@ -75,7 +75,6 @@ export interface AcpRequestHandler {
|
|
|
75
75
|
summary?: string;
|
|
76
76
|
}>;
|
|
77
77
|
handleAcpSoloStart(params: Record<string, unknown>): Promise<unknown>;
|
|
78
|
-
handleAcpSoloStatus(params: Record<string, unknown>): Promise<unknown>;
|
|
79
78
|
handleAcpSoloSelect(params: Record<string, unknown>): Promise<unknown>;
|
|
80
79
|
handleAcpSoloCancel(params: Record<string, unknown>): Promise<unknown>;
|
|
81
80
|
handleAcpSoloSubscribe(params: Record<string, unknown>): Promise<unknown>;
|
|
@@ -94,17 +93,14 @@ export interface AcpRequestHandler {
|
|
|
94
93
|
handleAcpProductCancel(params: Record<string, unknown>): Promise<unknown>;
|
|
95
94
|
handleAcpProductRollback(params: Record<string, unknown>): Promise<unknown>;
|
|
96
95
|
handleAcpProductReplay(params: Record<string, unknown>): Promise<unknown>;
|
|
97
|
-
handleAcpProductStatus(params: Record<string, unknown>): Promise<unknown>;
|
|
98
96
|
handleAcpProductSubscribe(params: Record<string, unknown>): Promise<unknown>;
|
|
99
97
|
handleAcpGoalStart(params: Record<string, unknown>): Promise<unknown>;
|
|
100
|
-
handleAcpGoalStatus(params: Record<string, unknown>): Promise<unknown>;
|
|
101
98
|
handleAcpGoalPause(params: Record<string, unknown>): Promise<unknown>;
|
|
102
99
|
handleAcpGoalResume(params: Record<string, unknown>): Promise<unknown>;
|
|
103
100
|
handleAcpGoalUpdateGoal(params: Record<string, unknown>): Promise<unknown>;
|
|
104
101
|
handleAcpGoalStop(params: Record<string, unknown>): Promise<unknown>;
|
|
105
102
|
handleAcpGoalMessage(params: Record<string, unknown>): Promise<unknown>;
|
|
106
103
|
handleAcpGoalSubscribe(params: Record<string, unknown>): Promise<unknown>;
|
|
107
|
-
handleAcpGoalEvents(params: Record<string, unknown>): Promise<unknown>;
|
|
108
104
|
}
|
|
109
105
|
export interface AcpServerConfig {
|
|
110
106
|
verbose?: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Host-owned Workflow module surface.
|
|
3
3
|
*
|
|
4
|
-
* All exports are inert until
|
|
4
|
+
* All exports are inert until Runtime's Gateway Host constructs a project-scoped store/controller/scheduler.
|
|
5
5
|
* The qlogicagent executable must consume the injected MCP capability instead of constructing these
|
|
6
6
|
* owners itself after cutover.
|
|
7
7
|
*/
|
|
@@ -18,9 +18,7 @@ export type { RunResult, WorkflowRuntimeOptions } from "./orchestration/workflow
|
|
|
18
18
|
export { NodeRegistry } from "./orchestration/workflow/node-registry.js";
|
|
19
19
|
export { hostExecutors, HOST_BACKED_KINDS } from "./orchestration/workflow/host-executors.js";
|
|
20
20
|
export type { ExecutorHost } from "./orchestration/workflow/node-schema.js";
|
|
21
|
-
export type { AgentHostRequest, ApprovalHostRequest, ChannelHostRequest, HttpHostRequest, McpHostRequest, MemoryHostRequest, SubworkflowHostRequest,
|
|
22
|
-
export { CredentialVault, credentialToHeaders } from "./cli/credential-vault.js";
|
|
23
|
-
export type { CredentialData, CredentialSummary, CredentialType } from "./cli/credential-vault.js";
|
|
21
|
+
export type { AgentHostRequest, ApprovalHostRequest, ChannelHostRequest, HttpHostRequest, McpHostRequest, MemoryHostRequest, SubworkflowHostRequest, WebhookWaitHostRequest, } from "./orchestration/workflow/node-schema.js";
|
|
24
22
|
export { WorkflowRunHistoryStore } from "./orchestration/workflow/run-history-store.js";
|
|
25
23
|
export { FileRunCheckpoint } from "./orchestration/workflow/run-checkpoint-store.js";
|
|
26
24
|
export type { RunCheckpoint } from "./orchestration/workflow/run-checkpoint-store.js";
|