@joe-broadhead/opencode-gws 0.0.7 → 0.0.8
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/CHANGELOG.md +9 -0
- package/dist/index.js +11 -2
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project are documented here. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and versions follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
4
4
|
|
|
5
|
+
## [0.0.8] - 2026-11-06
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- The `/connect` sign-in mark on an account now clears. The plugin read the mark back from
|
|
10
|
+
`integration.connection.active`, which returns the credential without its status, so it never saw its own report: after
|
|
11
|
+
Google rejected a sign-in, the account kept asking for a new one in `/gws-status`, the status RPC and `gws_status` once
|
|
12
|
+
it worked again. It now reads the status from `integration.get`, which projects it.
|
|
13
|
+
|
|
5
14
|
## [0.0.7] - 2026-11-05
|
|
6
15
|
|
|
7
16
|
### Added
|
package/dist/index.js
CHANGED
|
@@ -8178,7 +8178,7 @@ function checkHost(version2, range, allowUntested) {
|
|
|
8178
8178
|
}
|
|
8179
8179
|
|
|
8180
8180
|
// src/domain/version.ts
|
|
8181
|
-
var PLUGIN_VERSION = "0.0.
|
|
8181
|
+
var PLUGIN_VERSION = "0.0.8";
|
|
8182
8182
|
var PLUGIN_ID = "google-workspace.gws";
|
|
8183
8183
|
|
|
8184
8184
|
// src/host/agents.ts
|
|
@@ -9454,6 +9454,15 @@ function integrationTokenProvider(ctx, config2, ids) {
|
|
|
9454
9454
|
return { access: credential.access, grantedScopes: signIn.grantedScopes };
|
|
9455
9455
|
};
|
|
9456
9456
|
}
|
|
9457
|
+
async function showsNeedsAuth(ctx, integrationID, connectionID) {
|
|
9458
|
+
try {
|
|
9459
|
+
const { data } = await ctx.integration.get({ integrationID });
|
|
9460
|
+
const shown = data.connections?.find((item) => item.type === "credential" && item.id === connectionID);
|
|
9461
|
+
return shown?.type === "credential" && shown.status?.status === "needs_auth";
|
|
9462
|
+
} catch {
|
|
9463
|
+
return false;
|
|
9464
|
+
}
|
|
9465
|
+
}
|
|
9457
9466
|
function integrationConnection(ctx, ids) {
|
|
9458
9467
|
const lifetime = new Lifecycle();
|
|
9459
9468
|
return async (account2, signal) => {
|
|
@@ -9461,7 +9470,7 @@ function integrationConnection(ctx, ids) {
|
|
|
9461
9470
|
if (!id) return { connected: false, needsAuth: false };
|
|
9462
9471
|
const connection = await lifetime.wait(() => ctx.integration.connection.active(id), signal);
|
|
9463
9472
|
if (!connection) return { connected: false, needsAuth: false };
|
|
9464
|
-
const needsAuth = connection.
|
|
9473
|
+
const needsAuth = connection.type === "credential" && await lifetime.wait(() => showsNeedsAuth(ctx, id, connection.id), signal);
|
|
9465
9474
|
let credential;
|
|
9466
9475
|
try {
|
|
9467
9476
|
credential = await lifetime.wait(() => ctx.integration.connection.resolve(connection), signal);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@joe-broadhead/opencode-gws",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"description": "Unofficial OpenCode plugin for Google Workspace (gws CLI)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -52,10 +52,10 @@
|
|
|
52
52
|
"docs:coverage": "node scripts/generate-docs.mjs"
|
|
53
53
|
},
|
|
54
54
|
"optionalDependencies": {
|
|
55
|
-
"@joe-broadhead/opencode-gws-bin-darwin-arm64": "0.0.
|
|
56
|
-
"@joe-broadhead/opencode-gws-bin-darwin-x64": "0.0.
|
|
57
|
-
"@joe-broadhead/opencode-gws-bin-linux-arm64-gnu": "0.0.
|
|
58
|
-
"@joe-broadhead/opencode-gws-bin-linux-x64-gnu": "0.0.
|
|
55
|
+
"@joe-broadhead/opencode-gws-bin-darwin-arm64": "0.0.8",
|
|
56
|
+
"@joe-broadhead/opencode-gws-bin-darwin-x64": "0.0.8",
|
|
57
|
+
"@joe-broadhead/opencode-gws-bin-linux-arm64-gnu": "0.0.8",
|
|
58
|
+
"@joe-broadhead/opencode-gws-bin-linux-x64-gnu": "0.0.8"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@babel/core": "7.29.7",
|