@agentuity/opencode 0.1.42 → 0.1.44
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 +9 -9
- package/dist/agents/architect.d.ts +1 -1
- package/dist/agents/architect.d.ts.map +1 -1
- package/dist/agents/architect.js +4 -0
- package/dist/agents/architect.js.map +1 -1
- package/dist/agents/builder.d.ts +1 -1
- package/dist/agents/builder.d.ts.map +1 -1
- package/dist/agents/builder.js +4 -0
- package/dist/agents/builder.js.map +1 -1
- package/dist/agents/expert.d.ts +1 -1
- package/dist/agents/expert.d.ts.map +1 -1
- package/dist/agents/expert.js +2 -2
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +4 -0
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/lead.d.ts +1 -1
- package/dist/agents/lead.d.ts.map +1 -1
- package/dist/agents/lead.js +94 -11
- package/dist/agents/lead.js.map +1 -1
- package/dist/agents/memory/entities.d.ts +32 -0
- package/dist/agents/memory/entities.d.ts.map +1 -0
- package/dist/agents/memory/entities.js +168 -0
- package/dist/agents/memory/entities.js.map +1 -0
- package/dist/agents/memory/index.d.ts +4 -0
- package/dist/agents/memory/index.d.ts.map +1 -0
- package/dist/agents/memory/index.js +2 -0
- package/dist/agents/memory/index.js.map +1 -0
- package/dist/agents/memory/types.d.ts +71 -0
- package/dist/agents/memory/types.d.ts.map +1 -0
- package/dist/agents/memory/types.js +2 -0
- package/dist/agents/memory/types.js.map +1 -0
- package/dist/agents/memory.d.ts +1 -1
- package/dist/agents/memory.d.ts.map +1 -1
- package/dist/agents/memory.js +344 -7
- package/dist/agents/memory.js.map +1 -1
- package/dist/agents/product.d.ts +4 -0
- package/dist/agents/product.d.ts.map +1 -0
- package/dist/agents/product.js +333 -0
- package/dist/agents/product.js.map +1 -0
- package/dist/agents/reasoner.d.ts +16 -0
- package/dist/agents/reasoner.d.ts.map +1 -0
- package/dist/agents/reasoner.js +160 -0
- package/dist/agents/reasoner.js.map +1 -0
- package/dist/agents/reviewer.d.ts +1 -1
- package/dist/agents/reviewer.d.ts.map +1 -1
- package/dist/agents/reviewer.js +9 -0
- package/dist/agents/reviewer.js.map +1 -1
- package/dist/background/manager.d.ts +1 -0
- package/dist/background/manager.d.ts.map +1 -1
- package/dist/background/manager.js +7 -1
- package/dist/background/manager.js.map +1 -1
- package/dist/plugin/hooks/index.d.ts +2 -0
- package/dist/plugin/hooks/index.d.ts.map +1 -0
- package/dist/plugin/hooks/index.js +2 -0
- package/dist/plugin/hooks/index.js.map +1 -0
- package/dist/plugin/hooks/session-memory.d.ts.map +1 -1
- package/dist/plugin/hooks/session-memory.js +5 -0
- package/dist/plugin/hooks/session-memory.js.map +1 -1
- package/dist/plugin/hooks/tools.d.ts +11 -0
- package/dist/plugin/hooks/tools.d.ts.map +1 -1
- package/dist/plugin/hooks/tools.js +18 -1
- package/dist/plugin/hooks/tools.js.map +1 -1
- package/dist/plugin/plugin.d.ts.map +1 -1
- package/dist/plugin/plugin.js +203 -12
- package/dist/plugin/plugin.js.map +1 -1
- package/dist/tmux/executor.d.ts +43 -20
- package/dist/tmux/executor.d.ts.map +1 -1
- package/dist/tmux/executor.js +547 -243
- package/dist/tmux/executor.js.map +1 -1
- package/dist/tmux/index.d.ts +1 -1
- package/dist/tmux/index.d.ts.map +1 -1
- package/dist/tmux/index.js +1 -1
- package/dist/tmux/index.js.map +1 -1
- package/dist/tmux/manager.d.ts +37 -3
- package/dist/tmux/manager.d.ts.map +1 -1
- package/dist/tmux/manager.js +219 -96
- package/dist/tmux/manager.js.map +1 -1
- package/dist/tmux/types.d.ts +10 -0
- package/dist/tmux/types.d.ts.map +1 -1
- package/dist/tmux/types.js.map +1 -1
- package/dist/tmux/utils.d.ts +17 -0
- package/dist/tmux/utils.d.ts.map +1 -1
- package/dist/tmux/utils.js +39 -0
- package/dist/tmux/utils.js.map +1 -1
- package/dist/tools/background.d.ts +2 -0
- package/dist/tools/background.d.ts.map +1 -1
- package/dist/tools/background.js +3 -3
- package/dist/tools/background.js.map +1 -1
- package/dist/tools/delegate.d.ts +4 -0
- package/dist/tools/delegate.d.ts.map +1 -1
- package/dist/tools/delegate.js +18 -3
- package/dist/tools/delegate.js.map +1 -1
- package/dist/types.d.ts +2 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -1
- package/package.json +3 -3
- package/src/agents/architect.ts +4 -0
- package/src/agents/builder.ts +4 -0
- package/src/agents/expert.ts +2 -2
- package/src/agents/index.ts +4 -0
- package/src/agents/lead.ts +94 -11
- package/src/agents/memory/entities.ts +220 -0
- package/src/agents/memory/index.ts +22 -0
- package/src/agents/memory/types.ts +76 -0
- package/src/agents/memory.ts +344 -7
- package/src/agents/product.ts +336 -0
- package/src/agents/reasoner.ts +182 -0
- package/src/agents/reviewer.ts +9 -0
- package/src/background/manager.ts +7 -1
- package/src/plugin/hooks/index.ts +1 -0
- package/src/plugin/hooks/session-memory.ts +5 -0
- package/src/plugin/hooks/tools.ts +24 -1
- package/src/plugin/plugin.ts +228 -12
- package/src/tmux/executor.ts +610 -249
- package/src/tmux/index.ts +5 -2
- package/src/tmux/manager.ts +241 -98
- package/src/tmux/types.ts +11 -0
- package/src/tmux/utils.ts +39 -0
- package/src/tools/background.ts +3 -3
- package/src/tools/delegate.ts +18 -3
- package/src/types.ts +2 -0
package/dist/tmux/executor.d.ts
CHANGED
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
import type { PaneAction, WindowState, TmuxConfig } from './types';
|
|
2
|
+
type OwnershipContext = {
|
|
3
|
+
instanceId: string;
|
|
4
|
+
ownerPid: number;
|
|
5
|
+
serverKey: string;
|
|
6
|
+
tmuxSessionId?: string;
|
|
7
|
+
};
|
|
8
|
+
type OwnershipLookup = {
|
|
9
|
+
serverKey: string;
|
|
10
|
+
instanceId: string;
|
|
11
|
+
tmuxSessionId?: string;
|
|
12
|
+
};
|
|
2
13
|
export interface ActionResult {
|
|
3
14
|
success: boolean;
|
|
4
15
|
paneId?: string;
|
|
@@ -6,6 +17,14 @@ export interface ActionResult {
|
|
|
6
17
|
pid?: number;
|
|
7
18
|
error?: string;
|
|
8
19
|
}
|
|
20
|
+
export declare function getPanePid(paneId: string): Promise<number | undefined>;
|
|
21
|
+
export declare function getPanePidSync(paneId: string): number | undefined;
|
|
22
|
+
export declare function findOwnedAgentPanes(serverKey: string): Promise<Array<{
|
|
23
|
+
paneId: string;
|
|
24
|
+
panePid?: number;
|
|
25
|
+
sessionId?: string;
|
|
26
|
+
instanceId?: string;
|
|
27
|
+
}>>;
|
|
9
28
|
/**
|
|
10
29
|
* Kill a process and all its children (the entire process tree).
|
|
11
30
|
*
|
|
@@ -23,6 +42,7 @@ export declare function executeAction(action: PaneAction, ctx: {
|
|
|
23
42
|
config: TmuxConfig;
|
|
24
43
|
serverUrl: string;
|
|
25
44
|
windowState: WindowState;
|
|
45
|
+
ownership: OwnershipContext;
|
|
26
46
|
}): Promise<ActionResult>;
|
|
27
47
|
/**
|
|
28
48
|
* Execute multiple actions in sequence
|
|
@@ -31,6 +51,7 @@ export declare function executeActions(actions: PaneAction[], ctx: {
|
|
|
31
51
|
config: TmuxConfig;
|
|
32
52
|
serverUrl: string;
|
|
33
53
|
windowState: WindowState;
|
|
54
|
+
ownership: OwnershipContext;
|
|
34
55
|
}): Promise<{
|
|
35
56
|
success: boolean;
|
|
36
57
|
spawnedPaneId?: string;
|
|
@@ -47,38 +68,40 @@ export declare function closePaneById(paneId: string, pid?: number): Promise<Act
|
|
|
47
68
|
/**
|
|
48
69
|
* Reset the agents window state (for cleanup)
|
|
49
70
|
*/
|
|
50
|
-
export declare function resetAgentsWindow(): void;
|
|
71
|
+
export declare function resetAgentsWindow(ownership?: OwnershipContext): void;
|
|
51
72
|
/**
|
|
52
73
|
* Close the agents window if it exists
|
|
53
74
|
* This kills the entire window, which closes all panes within it
|
|
75
|
+
*
|
|
76
|
+
* SAFETY: Verifies the window is named "Agents" before killing to prevent
|
|
77
|
+
* accidentally killing user windows if the cached ID is stale.
|
|
54
78
|
*/
|
|
55
|
-
export declare function closeAgentsWindow(): Promise<void>;
|
|
79
|
+
export declare function closeAgentsWindow(ownership?: OwnershipLookup): Promise<void>;
|
|
56
80
|
/**
|
|
57
81
|
* Synchronously close the agents window (for shutdown)
|
|
58
|
-
* Uses
|
|
82
|
+
* Uses runTmuxCommandSync to ensure it completes before process exit
|
|
83
|
+
*
|
|
84
|
+
* SAFETY: Verifies the window is named "Agents" before killing to prevent
|
|
85
|
+
* accidentally killing user windows if the cached ID is stale.
|
|
59
86
|
*/
|
|
60
|
-
export declare function closeAgentsWindowSync(): void;
|
|
87
|
+
export declare function closeAgentsWindowSync(ownership?: OwnershipLookup): void;
|
|
61
88
|
/**
|
|
62
89
|
* Get the current agents window ID (for testing/debugging)
|
|
63
|
-
* Also checks persisted file for crash recovery
|
|
64
90
|
*/
|
|
65
|
-
export declare function getAgentsWindowId(): string | undefined;
|
|
91
|
+
export declare function getAgentsWindowId(ownership?: OwnershipContext): string | undefined;
|
|
66
92
|
/**
|
|
67
|
-
*
|
|
68
|
-
* This is a fallback cleanup method when PID-based cleanup fails.
|
|
69
|
-
*
|
|
70
|
-
* @param serverUrl - The server URL to match (optional, kills all if not provided)
|
|
71
|
-
* @param logger - Optional logging function for debug output
|
|
72
|
-
* @returns Number of processes killed
|
|
93
|
+
* Clean up owned tmux windows/panes using ownership tags.
|
|
73
94
|
*/
|
|
74
|
-
export declare function
|
|
95
|
+
export declare function cleanupOwnedResources(serverKey: string, instanceId: string): Promise<{
|
|
96
|
+
panesClosed: number;
|
|
97
|
+
windowClosed: boolean;
|
|
98
|
+
}>;
|
|
75
99
|
/**
|
|
76
|
-
* Synchronous
|
|
77
|
-
* Uses spawnSync to ensure completion before process exit.
|
|
78
|
-
*
|
|
79
|
-
* @param serverUrl - The server URL to match (optional, kills all if not provided)
|
|
80
|
-
* @param logger - Optional logging function for debug output
|
|
81
|
-
* @returns Number of processes killed
|
|
100
|
+
* Synchronous cleanup for owned tmux windows/panes.
|
|
82
101
|
*/
|
|
83
|
-
export declare function
|
|
102
|
+
export declare function cleanupOwnedResourcesSync(serverKey: string, instanceId: string): {
|
|
103
|
+
panesClosed: number;
|
|
104
|
+
windowClosed: boolean;
|
|
105
|
+
};
|
|
106
|
+
export {};
|
|
84
107
|
//# sourceMappingURL=executor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../../src/tmux/executor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../../src/tmux/executor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAsBnE,KAAK,gBAAgB,GAAG;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,KAAK,eAAe,GAAG;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,WAAW,YAAY;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAcD,wBAAsB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAO5E;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,S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