oh-my-opencode-slim 1.0.2 → 1.0.4
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 +1 -2
- package/dist/cli/config-io.d.ts +1 -0
- package/dist/cli/index.js +38 -2
- package/dist/cli/install.d.ts +1 -1
- package/dist/config/constants.d.ts +1 -1
- package/dist/config/index.d.ts +1 -1
- package/dist/config/loader.d.ts +9 -0
- package/dist/config/runtime-preset.d.ts +12 -0
- package/dist/config/schema.d.ts +4 -0
- package/dist/hooks/apply-patch/matching.d.ts +9 -1
- package/dist/hooks/apply-patch/rewrite.d.ts +0 -3
- package/dist/hooks/phase-reminder/index.d.ts +1 -1
- package/dist/hooks/post-file-tool-nudge/index.d.ts +3 -19
- package/dist/hooks/task-session-manager/index.d.ts +20 -4
- package/dist/hooks/todo-continuation/index.d.ts +2 -5
- package/dist/hooks/todo-continuation/todo-hygiene.d.ts +2 -8
- package/dist/index.js +909 -377
- package/dist/multiplexer/session-manager.d.ts +3 -0
- package/dist/utils/agent-variant.d.ts +2 -0
- package/dist/utils/logger.d.ts +2 -0
- package/dist/utils/session-manager.d.ts +18 -1
- package/oh-my-opencode-slim.schema.json +12 -0
- package/package.json +1 -1
|
@@ -29,6 +29,7 @@ export declare class MultiplexerSessionManager {
|
|
|
29
29
|
private sessions;
|
|
30
30
|
private knownSessions;
|
|
31
31
|
private spawningSessions;
|
|
32
|
+
private closingSessions;
|
|
32
33
|
private pollInterval?;
|
|
33
34
|
private enabled;
|
|
34
35
|
constructor(ctx: PluginInput, config: MultiplexerConfig);
|
|
@@ -41,6 +42,8 @@ export declare class MultiplexerSessionManager {
|
|
|
41
42
|
private closeSession;
|
|
42
43
|
private respawnIfKnown;
|
|
43
44
|
private isTrackedOrSpawning;
|
|
45
|
+
private updatePolling;
|
|
46
|
+
private getSessionId;
|
|
44
47
|
cleanup(): Promise<void>;
|
|
45
48
|
}
|
|
46
49
|
/**
|
|
@@ -36,6 +36,8 @@ export declare function resolveAgentVariant(config: PluginConfig | undefined, ag
|
|
|
36
36
|
* - displayName aliases (e.g. "advisor" -> "oracle")
|
|
37
37
|
*/
|
|
38
38
|
export declare function resolveRuntimeAgentName(config: PluginConfig | undefined, agentName: string): string;
|
|
39
|
+
export type DisplayNameMentionRewriter = (text: string) => string;
|
|
40
|
+
export declare function createDisplayNameMentionRewriter(config: PluginConfig | undefined): DisplayNameMentionRewriter;
|
|
39
41
|
/**
|
|
40
42
|
* Rewrites user-facing display-name mentions (e.g. @advisor) into internal
|
|
41
43
|
* agent mentions (e.g. @oracle) for runtime routing.
|
package/dist/utils/logger.d.ts
CHANGED
|
@@ -2,5 +2,7 @@ declare function getLogDir(): string;
|
|
|
2
2
|
export declare function initLogger(sessionId: string): void;
|
|
3
3
|
/** @internal Reset logger state for testing */
|
|
4
4
|
export declare function resetLogger(): void;
|
|
5
|
+
/** @internal Wait for queued log writes in tests. */
|
|
6
|
+
export declare function flushLoggerForTesting(): Promise<void>;
|
|
5
7
|
export { getLogDir };
|
|
6
8
|
export declare function log(message: string, data?: unknown): void;
|
|
@@ -1,12 +1,23 @@
|
|
|
1
1
|
import type { AgentName } from '../config';
|
|
2
|
+
export interface ContextFile {
|
|
3
|
+
path: string;
|
|
4
|
+
lineCount: number;
|
|
5
|
+
lineNumbers?: number[];
|
|
6
|
+
lastReadAt: number;
|
|
7
|
+
}
|
|
2
8
|
export interface RememberedTaskSession {
|
|
3
9
|
alias: string;
|
|
4
10
|
taskId: string;
|
|
5
11
|
agentType: AgentName;
|
|
6
12
|
label: string;
|
|
13
|
+
contextFiles: ContextFile[];
|
|
7
14
|
createdAt: number;
|
|
8
15
|
lastUsedAt: number;
|
|
9
16
|
}
|
|
17
|
+
interface SessionManagerOptions {
|
|
18
|
+
readContextMinLines?: number;
|
|
19
|
+
readContextMaxFiles?: number;
|
|
20
|
+
}
|
|
10
21
|
export declare function deriveTaskSessionLabel(input: {
|
|
11
22
|
description?: string;
|
|
12
23
|
prompt?: string;
|
|
@@ -14,10 +25,12 @@ export declare function deriveTaskSessionLabel(input: {
|
|
|
14
25
|
}): string;
|
|
15
26
|
export declare class SessionManager {
|
|
16
27
|
private readonly maxSessionsPerAgent;
|
|
28
|
+
private readonly readContextMinLines;
|
|
29
|
+
private readonly readContextMaxFiles;
|
|
17
30
|
private readonly sessionsByParent;
|
|
18
31
|
private readonly nextAliasIndexByParent;
|
|
19
32
|
private orderCounter;
|
|
20
|
-
constructor(maxSessionsPerAgent: number);
|
|
33
|
+
constructor(maxSessionsPerAgent: number, options?: SessionManagerOptions);
|
|
21
34
|
remember(input: {
|
|
22
35
|
parentSessionId: string;
|
|
23
36
|
taskId: string;
|
|
@@ -28,11 +41,15 @@ export declare class SessionManager {
|
|
|
28
41
|
resolve(parentSessionId: string, agentType: AgentName, key: string): RememberedTaskSession | undefined;
|
|
29
42
|
drop(parentSessionId: string, agentType: AgentName, key: string): void;
|
|
30
43
|
dropTask(taskId: string): void;
|
|
44
|
+
taskIds(): Set<string>;
|
|
45
|
+
addContext(taskId: string, files: ContextFile[]): void;
|
|
31
46
|
clearParent(parentSessionId: string): void;
|
|
32
47
|
formatForPrompt(parentSessionId: string): string | undefined;
|
|
33
48
|
private getAgentGroup;
|
|
34
49
|
private setAgentGroup;
|
|
35
50
|
private nextAlias;
|
|
36
51
|
private trimGroup;
|
|
52
|
+
private trimContextFiles;
|
|
37
53
|
private nextOrder;
|
|
38
54
|
}
|
|
55
|
+
export {};
|
|
@@ -498,6 +498,18 @@
|
|
|
498
498
|
"type": "integer",
|
|
499
499
|
"minimum": 1,
|
|
500
500
|
"maximum": 10
|
|
501
|
+
},
|
|
502
|
+
"readContextMinLines": {
|
|
503
|
+
"default": 10,
|
|
504
|
+
"type": "integer",
|
|
505
|
+
"minimum": 0,
|
|
506
|
+
"maximum": 1000
|
|
507
|
+
},
|
|
508
|
+
"readContextMaxFiles": {
|
|
509
|
+
"default": 8,
|
|
510
|
+
"type": "integer",
|
|
511
|
+
"minimum": 0,
|
|
512
|
+
"maximum": 50
|
|
501
513
|
}
|
|
502
514
|
}
|
|
503
515
|
},
|
package/package.json
CHANGED