@shanepadgett/tau-agent 0.45.0 → 0.45.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/package.json +2 -2
- package/shared/events.ts +7 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shanepadgett/tau-agent",
|
|
3
|
-
"version": "0.45.
|
|
3
|
+
"version": "0.45.1",
|
|
4
4
|
"description": "Tau is a custom agentic harness built with pi extensions",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.ts",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@ast-grep/wasm": "0.45.3",
|
|
38
|
-
"@shanepadgett/tau-tui": "0.45.
|
|
38
|
+
"@shanepadgett/tau-tui": "0.45.1",
|
|
39
39
|
"@vscode/tree-sitter-wasm": "0.3.1",
|
|
40
40
|
"image-size": "2.0.4",
|
|
41
41
|
"smol-toml": "1.8.0",
|
package/shared/events.ts
CHANGED
|
@@ -85,10 +85,15 @@ interface TauEventSubscription {
|
|
|
85
85
|
stop(): void;
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
|
|
88
|
+
type TauEventSubscriptionRegistry = WeakMap<
|
|
89
89
|
ExtensionAPI["events"],
|
|
90
90
|
Map<string, Map<keyof TauAgentEvents, TauEventSubscription>>
|
|
91
|
-
|
|
91
|
+
>;
|
|
92
|
+
|
|
93
|
+
// Global and project installs load separate module instances but share one pi.events bus.
|
|
94
|
+
const registryKey = Symbol.for("tau-agent.eventSubscriptions");
|
|
95
|
+
const registryHost = globalThis as typeof globalThis & { [registryKey]?: TauEventSubscriptionRegistry };
|
|
96
|
+
const tauEventSubscriptions: TauEventSubscriptionRegistry = (registryHost[registryKey] ??= new WeakMap());
|
|
92
97
|
|
|
93
98
|
export function emitTauEvent<Name extends keyof TauAgentEvents>(
|
|
94
99
|
pi: EmitEventAPI,
|