@scotthuang/agent-knock-knock 0.11.0 → 0.11.2
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/CHANGELOG.md +14 -0
- package/dist/src/cli.js +5 -1
- package/dist/src/cli.js.map +1 -1
- package/dist/src/codex-store-adapter.d.ts +29 -2
- package/dist/src/codex-store-adapter.js +549 -37
- package/dist/src/codex-store-adapter.js.map +1 -1
- package/dist/src/openclaw-plugin-helpers.js +8 -7
- package/dist/src/openclaw-plugin-helpers.js.map +1 -1
- package/dist/src/openclaw-plugin.js +3 -0
- package/dist/src/openclaw-plugin.js.map +1 -1
- package/dist/src/terminal-agent-adapter.d.ts +21 -2
- package/dist/src/terminal-agent-adapter.js.map +1 -1
- package/package.json +1 -1
|
@@ -7,11 +7,37 @@ export { parseLsofCwdMap, parsePsProcessSnapshots, type ProcessCommandResult as
|
|
|
7
7
|
export interface CodexStoreAdapterOptions {
|
|
8
8
|
codexHome?: string;
|
|
9
9
|
runCommand?: (command: string, args: string[]) => ProcessCommandResult;
|
|
10
|
+
runSqliteThreadQuery?: CodexSqliteThreadQueryRunner;
|
|
11
|
+
sqliteCantOpenRetryDelaysMs?: readonly number[];
|
|
12
|
+
sleep?: (milliseconds: number) => Promise<void>;
|
|
10
13
|
maxSessions?: number;
|
|
11
14
|
}
|
|
15
|
+
export type CodexSqliteOpenMode = "readonly" | "query_only";
|
|
16
|
+
export interface CodexSqliteThreadQueryRequest {
|
|
17
|
+
dbPath: string;
|
|
18
|
+
openMode: CodexSqliteOpenMode;
|
|
19
|
+
maxSessions: number;
|
|
20
|
+
nativeThreadId?: string;
|
|
21
|
+
filters?: CodexThreadQueryFilters;
|
|
22
|
+
afterSchema?: (columns: readonly string[]) => void | Promise<void>;
|
|
23
|
+
}
|
|
24
|
+
export interface CodexThreadQueryFilters {
|
|
25
|
+
cwd?: string;
|
|
26
|
+
source?: string;
|
|
27
|
+
archived?: boolean;
|
|
28
|
+
modelProvider?: string;
|
|
29
|
+
}
|
|
30
|
+
export interface CodexSqliteThreadQueryResult {
|
|
31
|
+
columns: string[];
|
|
32
|
+
rows: CodexThreadRow[];
|
|
33
|
+
}
|
|
34
|
+
export type CodexSqliteThreadQueryRunner = (request: CodexSqliteThreadQueryRequest) => Promise<CodexSqliteThreadQueryResult>;
|
|
12
35
|
export declare class CodexStoreAdapter implements CodexLocalSessionAdapter, TerminalThreadLifecycleCandidateProvider {
|
|
13
36
|
private readonly codexHome;
|
|
14
37
|
private readonly runCommand;
|
|
38
|
+
private readonly runSqliteThreadQuery;
|
|
39
|
+
private readonly sqliteCantOpenRetryDelaysMs;
|
|
40
|
+
private readonly sleep;
|
|
15
41
|
private readonly maxSessions;
|
|
16
42
|
constructor(options?: CodexStoreAdapterOptions);
|
|
17
43
|
listThreadRows(): Promise<CodexThreadRow[]>;
|
|
@@ -21,8 +47,9 @@ export declare class CodexStoreAdapter implements CodexLocalSessionAdapter, Term
|
|
|
21
47
|
readRollout(rolloutPath: string): Promise<string | undefined>;
|
|
22
48
|
listProcessSnapshots(): Promise<CodexProcessSnapshot[]>;
|
|
23
49
|
resolveActiveSessionIdentityForPid(pid: number, cwd?: string, preferredSessionId?: string, allowedCompanionIdentity?: ActiveAgentSessionIdentity, allowedAdditionalIdentities?: readonly ActiveAgentSessionIdentity[]): Promise<ActiveAgentSessionIdentity | undefined>;
|
|
24
|
-
private
|
|
50
|
+
private queryThreadRows;
|
|
25
51
|
}
|
|
52
|
+
export declare function runCodexSqliteThreadQuery(request: CodexSqliteThreadQueryRequest): Promise<CodexSqliteThreadQueryResult>;
|
|
26
53
|
export declare function latestStateDbPath(codexHome: string): string | undefined;
|
|
27
54
|
export interface LsofOpenFileRecord {
|
|
28
55
|
fd?: string;
|
|
@@ -42,5 +69,5 @@ export declare function resolveCodexOpenRolloutIdentity({ codexHome, pid, cwd, p
|
|
|
42
69
|
processBirth: string;
|
|
43
70
|
lsofOutput: string;
|
|
44
71
|
}): ActiveAgentSessionIdentity | undefined;
|
|
45
|
-
export declare function buildThreadSelect(columns: string[], limit: number): string;
|
|
72
|
+
export declare function buildThreadSelect(columns: string[], limit: number, filters?: CodexThreadQueryFilters): string;
|
|
46
73
|
export declare function buildThreadByIdSelect(columns: string[], nativeThreadId: string): string;
|