@code-yeongyu/senpi-ai 2026.11.3-3 → 2026.11.4-2

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.
@@ -10,6 +10,17 @@ export declare class OAuthTokenEndpointError extends Error {
10
10
  credentialRefused?: boolean;
11
11
  });
12
12
  }
13
+ export type OAuthReauthorizationCode = "invalid_grant" | "invalid_refresh_token" | "token_expired" | "refresh_token_expired" | "refresh_token_invalidated" | "refresh_token_reused";
14
+ /** The renewable session is unusable; sign in again with its saved client ID. */
15
+ export declare class OAuthReauthorizationRequiredError extends OAuthTokenEndpointError {
16
+ readonly code: OAuthReauthorizationCode;
17
+ constructor(code: OAuthReauthorizationCode, status: number);
18
+ }
19
+ /** Repeating sign-in cannot repair an invalid client configuration. */
20
+ export declare class OAuthClientConfigurationError extends OAuthTokenEndpointError {
21
+ readonly code = "invalid_client";
22
+ constructor(status: number);
23
+ }
13
24
  /** Closed, log-safe facts only; never inspect the message or response body. */
14
25
  export declare function oauthRefreshFailureCause(error: unknown): string | undefined;
15
26
  export declare function classifyOAuthRefreshFailure(error: unknown): "transient" | "permanent";
@@ -8,6 +8,24 @@ export class OAuthTokenEndpointError extends Error {
8
8
  this.credentialRefused = facts.credentialRefused ?? false;
9
9
  }
10
10
  }
11
+ /** The renewable session is unusable; sign in again with its saved client ID. */
12
+ export class OAuthReauthorizationRequiredError extends OAuthTokenEndpointError {
13
+ constructor(code, status) {
14
+ super(`OAuth refresh requires reauthorization (${code})`, status, { oauthError: code, credentialRefused: true });
15
+ this.name = "OAuthReauthorizationRequiredError";
16
+ this.code = code;
17
+ }
18
+ }
19
+ /** Repeating sign-in cannot repair an invalid client configuration. */
20
+ export class OAuthClientConfigurationError extends OAuthTokenEndpointError {
21
+ constructor(status) {
22
+ super("OAuth refresh failed: invalid client configuration (invalid_client)", status, {
23
+ oauthError: "invalid_client",
24
+ });
25
+ this.code = "invalid_client";
26
+ this.name = "OAuthClientConfigurationError";
27
+ }
28
+ }
11
29
  const TRANSPORT_CODES = new Set([
12
30
  "ConnectionRefused",
13
31
  "FailedToOpenSocket",
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Keep retained ID tokens out of terminal output and notification transcripts.
3
+ * The hint-free URL remains usable for manual authorization (with an account
4
+ * selector); browser launchers should receive the original URL.
5
+ */
6
+ export declare function redactOAuthUrl(value: string): string;
7
+ //# sourceMappingURL=oauth-url.d.ts.map
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Keep retained ID tokens out of terminal output and notification transcripts.
3
+ * The hint-free URL remains usable for manual authorization (with an account
4
+ * selector); browser launchers should receive the original URL.
5
+ */
6
+ export function redactOAuthUrl(value) {
7
+ const url = new URL(value);
8
+ if (!url.searchParams.has("id_token_hint"))
9
+ return value;
10
+ url.searchParams.delete("id_token_hint");
11
+ return url.toString();
12
+ }
13
+ //# sourceMappingURL=oauth-url.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@code-yeongyu/senpi-ai",
3
- "version": "2026.11.3-3",
3
+ "version": "2026.11.4-2",
4
4
  "description": "Unified LLM API with automatic model discovery and provider configuration",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -88,7 +88,7 @@
88
88
  "dependencies": {
89
89
  "@anthropic-ai/sdk": "0.127.0",
90
90
  "@aws-sdk/client-bedrock-runtime": "3.1136.0",
91
- "@earendil-works/pi-telemetry": "npm:@code-yeongyu/senpi-telemetry@2026.11.3-3",
91
+ "@earendil-works/pi-telemetry": "npm:@code-yeongyu/senpi-telemetry@2026.11.4-2",
92
92
  "@google/genai": "2.23.0",
93
93
  "@smithy/node-http-handler": "4.12.1",
94
94
  "google-auth-library": "10.6.2",