@corbat-tech/coco 2.27.3 → 2.27.4

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/dist/cli/index.js CHANGED
@@ -5597,23 +5597,35 @@ var init_copilot2 = __esm({
5597
5597
  CONTEXT_WINDOWS4 = {
5598
5598
  // Claude models — Copilot API caps these at 168 000 (not 200 000 like Anthropic direct)
5599
5599
  "claude-sonnet-4.6": 168e3,
5600
+ "claude-sonnet-4": 168e3,
5600
5601
  "claude-opus-4.6": 168e3,
5602
+ "claude-opus-4.6-fast": 168e3,
5601
5603
  "claude-sonnet-4.5": 168e3,
5602
5604
  "claude-opus-4.5": 168e3,
5603
5605
  "claude-haiku-4.5": 168e3,
5604
5606
  // OpenAI models — chat/completions
5605
5607
  "gpt-4.1": 1048576,
5608
+ "gpt-4o": 128e3,
5606
5609
  // OpenAI models — /responses API (Codex/GPT-5+)
5607
5610
  "gpt-5.4-codex": 4e5,
5611
+ "gpt-5.4": 4e5,
5612
+ "gpt-5.4-mini": 4e5,
5608
5613
  "gpt-5.3-codex": 4e5,
5609
5614
  "gpt-5.2-codex": 4e5,
5610
5615
  "gpt-5.1-codex-max": 4e5,
5616
+ "gpt-5-mini": 4e5,
5611
5617
  "gpt-5.2": 4e5,
5612
5618
  "gpt-5.1": 4e5,
5613
5619
  // Google models
5620
+ "gemini-3.1-pro": 1e6,
5614
5621
  "gemini-3.1-pro-preview": 1e6,
5622
+ "gemini-3-flash": 1e6,
5615
5623
  "gemini-3-flash-preview": 1e6,
5616
- "gemini-2.5-pro": 1048576
5624
+ "gemini-2.5-pro": 1048576,
5625
+ // Evaluation models
5626
+ "grok-code-fast-1": 4e5,
5627
+ "raptor-mini": 4e5,
5628
+ goldeneye: 4e5
5617
5629
  };
5618
5630
  DEFAULT_MODEL4 = "claude-sonnet-4.6";
5619
5631
  COPILOT_HEADERS = {
@@ -29254,6 +29266,20 @@ var PROVIDER_DEFINITIONS = {
29254
29266
  contextWindow: 2e5,
29255
29267
  maxOutputTokens: 64e3
29256
29268
  },
29269
+ {
29270
+ id: "claude-sonnet-4",
29271
+ name: "Claude Sonnet 4",
29272
+ description: "Previous balanced Claude model via Copilot \u2014 Premium x1",
29273
+ contextWindow: 2e5,
29274
+ maxOutputTokens: 64e3
29275
+ },
29276
+ {
29277
+ id: "claude-opus-4.6-fast",
29278
+ name: "Claude Opus 4.6 (Fast)",
29279
+ description: "Public preview fast Opus mode via Copilot \u2014 Premium x30",
29280
+ contextWindow: 2e5,
29281
+ maxOutputTokens: 128e3
29282
+ },
29257
29283
  // OpenAI models (Codex/GPT-5+ use /responses API, others use /chat/completions)
29258
29284
  {
29259
29285
  id: "gpt-5.4-codex",
@@ -29278,40 +29304,111 @@ var PROVIDER_DEFINITIONS = {
29278
29304
  maxOutputTokens: 128e3
29279
29305
  },
29280
29306
  {
29281
- id: "gpt-5.1-codex-max",
29282
- name: "GPT-5.1 Codex Max",
29283
- description: "Frontier agentic coding model via Copilot \u2014 Premium x1",
29307
+ id: "gpt-5.2",
29308
+ name: "GPT-5.2",
29309
+ description: "General GPT-5 model via Copilot \u2014 Premium x1",
29310
+ contextWindow: 4e5,
29311
+ maxOutputTokens: 128e3
29312
+ },
29313
+ {
29314
+ id: "gpt-5.4",
29315
+ name: "GPT-5.4",
29316
+ description: "Latest general GPT-5 model via Copilot \u2014 Premium x1",
29317
+ contextWindow: 4e5,
29318
+ maxOutputTokens: 128e3
29319
+ },
29320
+ {
29321
+ id: "gpt-5.4-mini",
29322
+ name: "GPT-5.4 mini",
29323
+ description: "Fast GPT-5.4 variant via Copilot \u2014 Premium x0.33",
29324
+ contextWindow: 4e5,
29325
+ maxOutputTokens: 128e3
29326
+ },
29327
+ {
29328
+ id: "gpt-5-mini",
29329
+ name: "GPT-5 mini",
29330
+ description: "Included model via Copilot paid plans \u2014 Premium x0",
29331
+ contextWindow: 4e5,
29332
+ maxOutputTokens: 128e3
29333
+ },
29334
+ {
29335
+ id: "gpt-5.1",
29336
+ name: "GPT-5.1",
29337
+ description: "Legacy GPT-5 model via Copilot \u2014 Premium x1",
29284
29338
  contextWindow: 4e5,
29285
29339
  maxOutputTokens: 128e3
29286
29340
  },
29287
29341
  {
29288
29342
  id: "gpt-4.1",
29289
29343
  name: "GPT-4.1",
29290
- description: "OpenAI long-context model via Copilot (1M) \u2014 Premium x0",
29344
+ description: "Included OpenAI model via Copilot paid plans \u2014 Premium x0",
29291
29345
  contextWindow: 1048576,
29292
29346
  maxOutputTokens: 32768
29293
29347
  },
29348
+ {
29349
+ id: "gpt-4o",
29350
+ name: "GPT-4o",
29351
+ description: "Included fallback/LTS OpenAI model via Copilot paid plans \u2014 Premium x0",
29352
+ contextWindow: 128e3,
29353
+ maxOutputTokens: 16384
29354
+ },
29294
29355
  // Google models
29295
29356
  {
29296
- id: "gemini-3.1-pro-preview",
29357
+ id: "gemini-3.1-pro",
29297
29358
  name: "Gemini 3.1 Pro",
29298
29359
  description: "Google's latest model via Copilot (1M) \u2014 Premium x1",
29299
29360
  contextWindow: 1e6,
29300
29361
  maxOutputTokens: 64e3
29301
29362
  },
29302
29363
  {
29303
- id: "gemini-3-flash-preview",
29364
+ id: "gemini-3.1-pro-preview",
29365
+ name: "Gemini 3.1 Pro (Preview ID)",
29366
+ description: "Compatibility alias for Gemini 3.1 Pro via Copilot \u2014 Premium x1",
29367
+ contextWindow: 1e6,
29368
+ maxOutputTokens: 64e3
29369
+ },
29370
+ {
29371
+ id: "gemini-3-flash",
29304
29372
  name: "Gemini 3 Flash",
29305
29373
  description: "Google's fast model via Copilot (1M) \u2014 Premium x0.33",
29306
29374
  contextWindow: 1e6,
29307
29375
  maxOutputTokens: 64e3
29308
29376
  },
29377
+ {
29378
+ id: "gemini-3-flash-preview",
29379
+ name: "Gemini 3 Flash (Preview ID)",
29380
+ description: "Compatibility alias for Gemini 3 Flash via Copilot \u2014 Premium x0.33",
29381
+ contextWindow: 1e6,
29382
+ maxOutputTokens: 64e3
29383
+ },
29309
29384
  {
29310
29385
  id: "gemini-2.5-pro",
29311
29386
  name: "Gemini 2.5 Pro",
29312
29387
  description: "Google stable model via Copilot (1M) \u2014 Premium x1",
29313
29388
  contextWindow: 1048576,
29314
29389
  maxOutputTokens: 65536
29390
+ },
29391
+ // Evaluation models
29392
+ {
29393
+ id: "grok-code-fast-1",
29394
+ name: "Grok Code Fast 1",
29395
+ description: "xAI coding model via Copilot \u2014 Premium x0.25",
29396
+ contextWindow: 4e5,
29397
+ maxOutputTokens: 128e3
29398
+ },
29399
+ {
29400
+ id: "raptor-mini",
29401
+ name: "Raptor mini",
29402
+ description: "Fine-tuned GPT-5 mini via Copilot \u2014 Premium x0",
29403
+ contextWindow: 4e5,
29404
+ maxOutputTokens: 128e3
29405
+ },
29406
+ {
29407
+ id: "goldeneye",
29408
+ name: "Goldeneye",
29409
+ description: "Fine-tuned GPT-5.1-Codex via Copilot (Free x1)",
29410
+ contextWindow: 4e5,
29411
+ maxOutputTokens: 128e3
29315
29412
  }
29316
29413
  ]
29317
29414
  },
@@ -47712,7 +47809,13 @@ var SuggestImprovementsSchema = z.object({
47712
47809
  context: z.string().optional().describe("Additional context about the code")
47713
47810
  });
47714
47811
  async function analyzeAndSuggest(filePath, _context) {
47715
- const rawContent = await fs46.readFile(filePath, "utf-8");
47812
+ let rawContent = await fs46.readFile(filePath, "utf-8");
47813
+ if (typeof rawContent !== "string") {
47814
+ const defaultReadFile = fs46.default?.readFile;
47815
+ if (typeof defaultReadFile === "function") {
47816
+ rawContent = await defaultReadFile(filePath, "utf-8");
47817
+ }
47818
+ }
47716
47819
  const content = typeof rawContent === "string" ? rawContent : String(rawContent ?? "");
47717
47820
  const lines = content.split("\n");
47718
47821
  const suggestions = [];