agent-afk 5.115.4 → 5.117.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.
Files changed (38) hide show
  1. package/dist/agent/auth/credential-resolver.d.ts +4 -1
  2. package/dist/agent/auth/model-availability.d.ts +1 -1
  3. package/dist/agent/providers/index.d.ts +2 -1
  4. package/dist/agent/providers/openai-compatible/index.d.ts +6 -0
  5. package/dist/agent/providers/openai-compatible/oneshot.d.ts +2 -0
  6. package/dist/agent/providers/openai-compatible/query.d.ts +2 -0
  7. package/dist/agent/providers/xai/auth-store.d.ts +22 -0
  8. package/dist/agent/providers/xai/auth.d.ts +26 -0
  9. package/dist/agent/providers/xai/endpoints.d.ts +15 -0
  10. package/dist/agent/providers/xai/force-mode.d.ts +4 -0
  11. package/dist/agent/providers/xai/headers.d.ts +7 -0
  12. package/dist/agent/providers/xai/index.d.ts +38 -0
  13. package/dist/agent/providers/xai/oauth-constants.d.ts +10 -0
  14. package/dist/agent/providers/xai/oauth-device.d.ts +32 -0
  15. package/dist/agent/providers/xai/oauth-http.d.ts +20 -0
  16. package/dist/agent/providers/xai/oauth-pkce.d.ts +23 -0
  17. package/dist/agent/providers/xai/oauth.d.ts +14 -0
  18. package/dist/agent/providers/xai/pricing.d.ts +8 -0
  19. package/dist/agent/providers/xai/query-bootstrap.d.ts +11 -0
  20. package/dist/agent/providers/xai/query-helpers.d.ts +5 -0
  21. package/dist/agent/session/model-slots.d.ts +1 -1
  22. package/dist/agent/session/slot-credentials.d.ts +3 -0
  23. package/dist/agent/tools/child-credential.d.ts +1 -0
  24. package/dist/agent/types/config-types.d.ts +3 -0
  25. package/dist/cli/commands/doctor-checks.d.ts +1 -0
  26. package/dist/cli/commands/interactive/bootstrap-session-builder.d.ts +2 -0
  27. package/dist/cli/commands/provider-xai-login.d.ts +16 -0
  28. package/dist/cli/commands/provider.d.ts +8 -0
  29. package/dist/cli/shared-helpers.d.ts +3 -1
  30. package/dist/cli.mjs +625 -624
  31. package/dist/config/env.d.ts +3 -0
  32. package/dist/index.mjs +208 -207
  33. package/dist/telegram/credentials.d.ts +7 -0
  34. package/dist/telegram/handlers/commands.model-validate.d.ts +2 -0
  35. package/dist/telegram/push.d.ts +1 -0
  36. package/dist/telegram/session-xai.d.ts +5 -0
  37. package/dist/telegram.mjs +293 -292
  38. package/package.json +1 -1
@@ -2,6 +2,10 @@ export type AnthropicAuthEnvVar = 'CLAUDE_CODE_OAUTH_TOKEN' | 'ANTHROPIC_API_KEY
2
2
  export type TelegramCredentialPlan = {
3
3
  kind: 'openai';
4
4
  notices: string[];
5
+ } | {
6
+ kind: 'xai';
7
+ apiKey?: string;
8
+ notices: string[];
5
9
  } | {
6
10
  kind: 'anthropic';
7
11
  credential: string;
@@ -15,9 +19,12 @@ export interface TelegramCredentialDeps {
15
19
  openaiApiKey?: string | undefined;
16
20
  codexApiKey?: string | undefined;
17
21
  loadAnthropicCredential?: () => string | undefined;
22
+ loadXaiKey?: () => string | undefined;
23
+ hasXaiOAuth?: () => boolean;
18
24
  detectMode?: (token: string) => 'oauth' | 'api-key';
19
25
  }
20
26
  export declare function isOpenAiRoutedProvider(providerName: string): boolean;
27
+ export declare function isXaiRoutedProvider(providerName: string): boolean;
21
28
  export declare function planTelegramCredential(providerName: string, deps?: TelegramCredentialDeps): TelegramCredentialPlan;
22
29
  export declare function applyTelegramCredentialPlan(plan: TelegramCredentialPlan, config: {
23
30
  apiKey?: string | undefined;
@@ -0,0 +1,2 @@
1
+ import type { AgentModelInput } from '../../agent/types.js';
2
+ export declare function isValidTelegramModelArg(model: AgentModelInput): boolean;
@@ -5,6 +5,7 @@ export interface PushOptions {
5
5
  text: string;
6
6
  parseMode?: 'MarkdownV2' | 'HTML' | 'Markdown';
7
7
  replyMarkup?: InlineKeyboardMarkup;
8
+ messageThreadId?: number;
8
9
  fetchImpl?: typeof fetch;
9
10
  apiBase?: string;
10
11
  }
@@ -0,0 +1,5 @@
1
+ import { AgentSession } from '../agent/session.js';
2
+ import type { TelegramSessionBuildContext } from './session-context.js';
3
+ export declare function buildXaiTelegramSession(ctx: TelegramSessionBuildContext & {
4
+ providerName: 'xai' | 'xai-oauth';
5
+ }): Promise<AgentSession>;