@anthonyhaussman/opencode-agy-auth 1.0.11-alpha.5 → 1.0.11-beta.0
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 -27
- package/dist/index.d.ts +1 -6
- package/dist/index.js +939 -1313
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -56,33 +56,6 @@ Additionally, you can quickly check your quota using the `/agyquota` slash comma
|
|
|
56
56
|
|
|
57
57
|
This calls the injected `agy_quota` tool to give you a real-time table of your current usage, tokens remaining, and reset times.
|
|
58
58
|
|
|
59
|
-
### Disk Persistence
|
|
60
|
-
|
|
61
|
-
The plugin persists turn-state and retry-cooldown data to disk so that it survives OpenCode restarts. Files are stored under `~/.config/opencode/` (or `%APPDATA%\opencode\` on Windows):
|
|
62
|
-
|
|
63
|
-
- `antigravity-turn-states.json` - tracks thinking/reasoning state across request turns, with a 24-hour TTL and 5-second throttled writes using atomic tmp+rename.
|
|
64
|
-
- Retry cooldowns are persisted via `CooldownStore` with the same atomic-write pattern.
|
|
65
|
-
|
|
66
|
-
Both stores initialize lazily at runtime - no filesystem reads occur at import time.
|
|
67
|
-
|
|
68
|
-
#### `diskEnabled` Parameter
|
|
69
|
-
|
|
70
|
-
`TurnStateTracker` accepts a `diskEnabled` constructor parameter (defaults to `true`):
|
|
71
|
-
|
|
72
|
-
```ts
|
|
73
|
-
import { TurnStateTracker } from "@anthonyhaussman/opencode-agy-auth/sdk/request/turn-state-tracker";
|
|
74
|
-
|
|
75
|
-
// Disk persistence enabled (default)
|
|
76
|
-
const tracker = new TurnStateTracker(true);
|
|
77
|
-
|
|
78
|
-
// Memory-only mode - no filesystem reads or writes
|
|
79
|
-
const tracker = new TurnStateTracker(false);
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
When `diskEnabled` is `false`, the tracker operates entirely in memory. All state is lost when the process exits. This is useful in restricted environments (containers, read-only filesystems) where disk access is unavailable or undesirable.
|
|
83
|
-
|
|
84
|
-
If disk initialization fails at runtime (permission error, corrupt file, etc.), the plugin automatically falls back to memory-only mode and logs a warning. No configuration is needed for normal use - disk persistence works out of the box.
|
|
85
|
-
|
|
86
59
|
## Local Testing
|
|
87
60
|
|
|
88
61
|
To test and develop the plugin locally with OpenCode before publishing:
|
package/dist/index.d.ts
CHANGED
|
@@ -13,9 +13,4 @@ type PluginResult = Hooks;
|
|
|
13
13
|
declare const AgyCLIOAuthPlugin: ({ client }: PluginContext) => Promise<PluginResult>;
|
|
14
14
|
declare const GoogleOAuthPlugin: ({ client }: PluginContext) => Promise<PluginResult>;
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
id: string;
|
|
18
|
-
server: ({ client }: PluginContext) => Promise<PluginResult>;
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export { AgyCLIOAuthPlugin, GoogleOAuthPlugin, _default as default };
|
|
16
|
+
export { AgyCLIOAuthPlugin, GoogleOAuthPlugin, AgyCLIOAuthPlugin as default };
|