@route_33/opencode 0.4.7-rc.2 → 0.4.7-rc.3

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.
@@ -421,7 +421,7 @@ var createPkceVerifierAndChallenge = () => {
421
421
  };
422
422
 
423
423
  // src/auth/requested-scopes/requested-scopes.ts
424
- var REQUESTED_OAUTH_SCOPES = "openid offline_access projects:read api-keys:read api-keys:create api-keys:rotate api-keys:delete";
424
+ var REQUESTED_OAUTH_SCOPES = "openid offline_access projects:read keys:read keys:write";
425
425
 
426
426
  // src/auth/login-flow/login-flow.ts
427
427
  var loginFlow = async (options) => {
package/dist/index.js CHANGED
@@ -2923,7 +2923,7 @@ var createPkceVerifierAndChallenge = () => {
2923
2923
  };
2924
2924
 
2925
2925
  // src/auth/requested-scopes/requested-scopes.ts
2926
- var REQUESTED_OAUTH_SCOPES = "openid offline_access projects:read api-keys:read api-keys:create api-keys:rotate api-keys:delete";
2926
+ var REQUESTED_OAUTH_SCOPES = "openid offline_access projects:read keys:read keys:write";
2927
2927
 
2928
2928
  // src/auth/login-flow/login-flow.ts
2929
2929
  var loginFlow = async (options) => {
@@ -1479,7 +1479,7 @@ var REQUESTED_OAUTH_SCOPES;
1479
1479
  var init_requested_scopes = __esm({
1480
1480
  "src/auth/requested-scopes/requested-scopes.ts"() {
1481
1481
  "use strict";
1482
- REQUESTED_OAUTH_SCOPES = "openid offline_access projects:read api-keys:read api-keys:create api-keys:rotate api-keys:delete";
1482
+ REQUESTED_OAUTH_SCOPES = "openid offline_access projects:read keys:read keys:write";
1483
1483
  }
1484
1484
  });
1485
1485
 
@@ -6957,6 +6957,8 @@ var v2Autoconnect = async (context) => {
6957
6957
  if (readEnvDirectApiKey() !== void 0 || readEnvAutoconnectDisabled() || context.location === void 0) {
6958
6958
  return;
6959
6959
  }
6960
+ const oauth = context.client?.api?.integration?.oauth;
6961
+ if (oauth === void 0 || oauth.connect === void 0) return;
6960
6962
  const attribution = readAttribution({
6961
6963
  directory: context.location.directory,
6962
6964
  outsideWorktree: "return-undefined"
@@ -6968,7 +6970,7 @@ var v2Autoconnect = async (context) => {
6968
6970
  message: "Route 33 is not connected \u2014 signing in now. Follow the browser prompt, then run /connect to pick who pays.",
6969
6971
  variant: "info"
6970
6972
  });
6971
- await context.client.api.integration.oauth.connect({
6973
+ await oauth.connect({
6972
6974
  integrationID: "route33",
6973
6975
  methodID: "browser"
6974
6976
  }).catch(() => void 0);
@@ -2926,7 +2926,7 @@ var createPkceVerifierAndChallenge = () => {
2926
2926
  };
2927
2927
 
2928
2928
  // src/auth/requested-scopes/requested-scopes.ts
2929
- var REQUESTED_OAUTH_SCOPES = "openid offline_access projects:read api-keys:read api-keys:create api-keys:rotate api-keys:delete";
2929
+ var REQUESTED_OAUTH_SCOPES = "openid offline_access projects:read keys:read keys:write";
2930
2930
 
2931
2931
  // src/auth/login-flow/login-flow.ts
2932
2932
  var loginFlow = async (options) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@route_33/opencode",
3
- "version": "0.4.7-rc.2",
3
+ "version": "0.4.7-rc.3",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -42,8 +42,8 @@
42
42
  "eslint": "10.13.0",
43
43
  "typescript": "6.0.3",
44
44
  "vitest": "5.0.5",
45
- "@cronos-ai-lab/typescript-config": "0.1.1",
46
- "@cronos-ai-lab/eslint-config": "0.1.1"
45
+ "@cronos-ai-lab/eslint-config": "0.1.2",
46
+ "@cronos-ai-lab/typescript-config": "0.1.2"
47
47
  },
48
48
  "scripts": {
49
49
  "build": "esbuild src/index.ts src/v2-entry/index.ts src/tui-entry/index.ts src/cli/production-smoke/production-smoke.ts --bundle --format=esm --platform=node --packages=external --outbase=src --outdir=dist --alias:@opencode-ai/plugin-v2=@opencode/plugin --define:__ROUTE33_DEFAULT_CLIENT_ID__=\\\"${ROUTE33_DEFAULT_CLIENT_ID:-}\\\"",