@anthonyhaussman/opencode-agy-auth 1.2.3 → 1.2.5-alpha.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 +6 -1
- package/dist/index.d.ts +6 -5
- package/dist/index.js +867 -65
- package/dist/index.js.map +1 -1
- package/dist/src/constants.d.ts +2 -0
- package/dist/src/plugin/oauth-authorize.d.ts +9 -0
- package/dist/src/plugin/types.d.ts +33 -0
- package/dist/src/plugin/v2.d.ts +22 -0
- package/dist/src/plugin.d.ts +23 -0
- package/dist/src/sdk/agy-cli-version.d.ts +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -8,6 +8,7 @@ An [OpenCode](https://opencode.ai/) authentication plugin that enables seamless
|
|
|
8
8
|
- **Dynamic Model Retrieval**: Fetches available models based on user tier and current allocations.
|
|
9
9
|
- **Quota Tracking**: Injects the `agy_quota` tool into OpenCode to check usage limits directly.
|
|
10
10
|
- **Traffic Simulation**: Maintains background heartbeat with `agy` servers.
|
|
11
|
+
- **Dual OpenCode Compatibility**: Fully supports both OpenCode v1 (>= 1.18.29) and OpenCode v2 seamlessly without breaking changes.
|
|
11
12
|
|
|
12
13
|
## Installation
|
|
13
14
|
|
|
@@ -140,7 +141,7 @@ To test and develop the plugin locally with OpenCode before publishing:
|
|
|
140
141
|
|
|
141
142
|
## Alpha Channel (Pre-release)
|
|
142
143
|
|
|
143
|
-
To test bleeding-edge features
|
|
144
|
+
To test bleeding-edge features, upcoming changes, or [OpenCode v2](https://opencode.ai/v2/docs) compatibility before official releases, configure the `@alpha` distribution tag:
|
|
144
145
|
|
|
145
146
|
```bash
|
|
146
147
|
npm install @anthonyhaussman/opencode-agy-auth@alpha
|
|
@@ -154,5 +155,9 @@ Or configure it directly in your `opencode.json`:
|
|
|
154
155
|
}
|
|
155
156
|
```
|
|
156
157
|
|
|
158
|
+
### OpenCode v2 Compatibility
|
|
159
|
+
|
|
160
|
+
The `@alpha` channel provides dual compatibility with both OpenCode v1 and [OpenCode v2](https://opencode.ai/v2/docs), supporting the new v2 plugin architecture, unified hooks, and OAuth credential handling while maintaining full backward compatibility.
|
|
161
|
+
|
|
157
162
|
> [!WARNING]
|
|
158
163
|
> **Instability Warning**: The `@alpha` release contains experimental features, active development builds, and potential breaking protocol changes. It may be unstable, break unexpectedly, or cause disruptions in session authentication and model requests. Use only for testing and development. For day-to-day work, use the stable release.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { AgyCLIOAuthPlugin, GoogleOAuthPlugin } from "./src/plugin";
|
|
2
|
+
import { setupOpenCodeV2, v2PluginDefinition } from "./src/plugin/v2";
|
|
3
|
+
import type { DualOpenCodePlugin } from "./src/plugin/types";
|
|
2
4
|
export { AgyCLIOAuthPlugin, GoogleOAuthPlugin };
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export default _default;
|
|
5
|
+
export { setupOpenCodeV2, v2PluginDefinition };
|
|
6
|
+
export * from "./src/plugin/types";
|
|
7
|
+
declare const dualPlugin: DualOpenCodePlugin;
|
|
8
|
+
export default dualPlugin;
|