@gajae-code/coding-agent 0.13.1 → 0.13.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.
Files changed (45) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/dist/types/config/model-registry.d.ts +1 -0
  3. package/dist/types/config/settings-schema.d.ts +3 -3
  4. package/dist/types/main.d.ts +1 -0
  5. package/dist/types/modes/components/dynamic-theme-text.d.ts +9 -0
  6. package/dist/types/modes/components/gajae-pet-widget.d.ts +5 -5
  7. package/dist/types/modes/components/pet-capability.d.ts +5 -5
  8. package/dist/types/modes/components/settings-selector.d.ts +5 -0
  9. package/dist/types/modes/theme/defaults/index.d.ts +118 -0
  10. package/dist/types/sdk/bus/telegram-daemon-contract.d.ts +3 -1
  11. package/dist/types/session/internal/managed-session-storage.d.ts +13 -0
  12. package/dist/types/session/session-manager.d.ts +7 -0
  13. package/dist/types/tools/image-gen.d.ts +1 -0
  14. package/package.json +8 -8
  15. package/src/config/model-profile-activation.ts +3 -1
  16. package/src/config/model-profiles.ts +59 -2
  17. package/src/config/model-registry.ts +16 -1
  18. package/src/config/settings-schema.ts +1 -1
  19. package/src/coordinator-mcp/server.ts +3 -0
  20. package/src/defaults/gjc/extensions/grok-cli-vendor/src/models/catalog.ts +31 -6
  21. package/src/internal-urls/docs-index.generated.ts +7 -6
  22. package/src/main.ts +4 -0
  23. package/src/modes/components/chrome.ts +4 -3
  24. package/src/modes/components/dynamic-theme-text.ts +22 -0
  25. package/src/modes/components/gajae-pet-widget.ts +130 -42
  26. package/src/modes/components/model-selector.ts +1 -6
  27. package/src/modes/components/pet-capability.ts +10 -5
  28. package/src/modes/components/settings-selector.ts +20 -5
  29. package/src/modes/components/status-line/segments.ts +3 -3
  30. package/src/modes/controllers/selector-controller.ts +61 -5
  31. package/src/modes/interactive-mode.ts +4 -0
  32. package/src/modes/theme/defaults/index.ts +2 -0
  33. package/src/modes/theme/defaults/ouroboros.json +118 -0
  34. package/src/sdk/broker/process-incarnation.ts +6 -1
  35. package/src/sdk/bus/telegram-daemon-contract.ts +3 -1
  36. package/src/sdk/bus/telegram-daemon.ts +51 -43
  37. package/src/session/agent-session.ts +39 -0
  38. package/src/session/internal/managed-session-storage.ts +162 -40
  39. package/src/session/session-manager.ts +28 -0
  40. package/src/slash-commands/builtin-registry.ts +62 -8
  41. package/src/task/index.ts +5 -2
  42. package/src/tools/bash.ts +11 -9
  43. package/src/tools/image-gen.ts +322 -126
  44. package/src/tools/todo-contract.ts +55 -3
  45. package/src/tools/todo-write.ts +4 -3
@@ -9,6 +9,7 @@ const COST_BUILD = { input: 1, output: 2, cacheRead: 0.2, cacheWrite: 0.2 };
9
9
  const COST_COMPOSER_FAST = { input: 3, output: 15, cacheRead: 0.5, cacheWrite: 0 };
10
10
  const COST_43 = { input: 1.25, output: 2.5, cacheRead: 0.2, cacheWrite: 0 };
11
11
  const COST_45 = { input: 2, output: 6, cacheRead: 0.5, cacheWrite: 0 };
12
+ const COST_46 = { input: 2, output: 6, cacheRead: 0.5, cacheWrite: 0 };
12
13
  const COST_420 = { input: 2, output: 6, cacheRead: 0.2, cacheWrite: 0 };
13
14
 
14
15
  // ─── Model type ───────────────────────────────────────────────────────────────
@@ -73,6 +74,18 @@ const FALLBACK_MODELS: GrokCliModelConfig[] = [
73
74
  contextWindow: 1_000_000,
74
75
  maxTokens: 30_000,
75
76
  },
77
+ {
78
+ // Official metadata and pricing: https://docs.x.ai/developers/models/grok-4.6
79
+ id: 'grok-4.6',
80
+ name: 'Grok 4.6',
81
+ reasoning: true,
82
+ input: ['text', 'image'],
83
+ cost: COST_46,
84
+ contextWindow: 500_000,
85
+ maxTokens: 30_000,
86
+ // https://docs.x.ai/developers/model-capabilities/text/reasoning: xhigh is 4.6 and later.
87
+ maxReasoningEffort: Effort.XHigh,
88
+ },
76
89
  {
77
90
  // Official metadata and pricing: https://docs.x.ai/developers/models/grok-4.5
78
91
  id: 'grok-4.5',
@@ -122,8 +135,9 @@ const FALLBACK_MODELS: GrokCliModelConfig[] = [
122
135
  },
123
136
  ];
124
137
 
125
- // Official aliases: https://docs.x.ai/developers/models/grok-4.5
138
+ // Official aliases: https://docs.x.ai/developers/models/grok-4.6
126
139
  const MODEL_ALIASES: Readonly<Record<string, string>> = {
140
+ 'grok-4.6-latest': 'grok-4.6',
127
141
  'grok-4.5-latest': 'grok-4.5',
128
142
  'grok-build-latest': 'grok-4.5',
129
143
  };
@@ -138,18 +152,29 @@ function getCanonicalModelName(modelId: string): string {
138
152
  return MODEL_ALIASES[name] ?? name;
139
153
  }
140
154
 
155
+ function matchesModelFamily(name: string, modelId: string): boolean {
156
+ if (name === modelId) return true;
157
+ const suffix = name.slice(modelId.length + 1);
158
+ return name.startsWith(`${modelId}-`) && /^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(suffix);
159
+ }
160
+
141
161
  export function getMaxReasoningEffort(modelId: string): Effort | undefined {
142
162
  const name = getCanonicalModelName(modelId);
143
- return FALLBACK_MODELS.find(
144
- (model) => name === model.id.toLowerCase() || name.startsWith(`${model.id.toLowerCase()}-`),
145
- )?.maxReasoningEffort;
163
+ return FALLBACK_MODELS.find((model) => matchesModelFamily(name, model.id.toLowerCase()))
164
+ ?.maxReasoningEffort;
146
165
  }
147
166
 
148
- const EFFORT_CAPABLE_PREFIXES = ['grok-3-mini', 'grok-4.20-multi-agent', 'grok-4.3', 'grok-4.5'];
167
+ const EFFORT_CAPABLE_PREFIXES = [
168
+ 'grok-3-mini',
169
+ 'grok-4.20-multi-agent',
170
+ 'grok-4.3',
171
+ 'grok-4.5',
172
+ 'grok-4.6',
173
+ ];
149
174
 
150
175
  export function supportsReasoningEffort(modelId: string): boolean {
151
176
  const name = getCanonicalModelName(modelId);
152
- if (!EFFORT_CAPABLE_PREFIXES.some((prefix) => name.startsWith(prefix))) {
177
+ if (!EFFORT_CAPABLE_PREFIXES.some((prefix) => matchesModelFamily(name, prefix))) {
153
178
  return false;
154
179
  }
155
180
  const model = resolveModels().find((entry) => getCanonicalModelName(entry.id) === name);