@bendyline/gezel-cli 1.1.1 → 1.2.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.
@@ -442,6 +442,7 @@ body.hb {
442
442
  .hb-article .hb-scorecard-suite-title { font-size: 0.95rem; margin: 1.25rem 0 0.5rem; }
443
443
  .hb-scorecard-stamp { font-size: 0.85rem; margin: 0 0 0.75rem; }
444
444
  .hb-article .hb-scorecard-withheld,
445
+ .hb-article .hb-scorecard-memory-note,
445
446
  .hb-article .hb-scorecard-taskcount {
446
447
  font-size: 0.82rem;
447
448
  color: var(--hb-ink-muted);
@@ -42,6 +42,7 @@ import {
42
42
  createTrustingFetch,
43
43
  discoverOrSpawn,
44
44
  electronNativeBinCandidates,
45
+ ensureProjectForFolder as ensureClientProjectForFolder,
45
46
  isProcessAlive,
46
47
  readRuntime,
47
48
  readSystemServiceEndpoint,
package/dist/tui/index.js CHANGED
@@ -28,6 +28,7 @@ import {
28
28
  createTrustingFetch,
29
29
  discoverOrSpawn,
30
30
  electronNativeBinCandidates,
31
+ ensureProjectForFolder as ensureClientProjectForFolder,
31
32
  isProcessAlive,
32
33
  readRuntime,
33
34
  readSystemServiceEndpoint,
@@ -2304,7 +2305,8 @@ function craftbookStartRequest(book) {
2304
2305
  craftbookId: book.id,
2305
2306
  craftbookSourceId: book.sourceId,
2306
2307
  ...book.version ? { craftbookVersion: book.version } : {},
2307
- dispatchEntry: true
2308
+ dispatchEntry: true,
2309
+ trustScripts: true
2308
2310
  };
2309
2311
  }
2310
2312
 
@@ -2473,6 +2475,7 @@ function resolveGezelArg(arg, inputs) {
2473
2475
  import {
2474
2476
  formatModelAttribution as formatModelAttribution2
2475
2477
  } from "@bendyline/gezel";
2478
+ import { resolveOnDeviceProvider } from "@bendyline/gezel/native";
2476
2479
 
2477
2480
  // src/tui/bootstrap.ts
2478
2481
  import {
@@ -2647,6 +2650,7 @@ var PROVIDER_ORDER = [
2647
2650
  "mlx",
2648
2651
  "llama-cpp",
2649
2652
  "ds4",
2653
+ "apple-foundation-models",
2650
2654
  "ollama",
2651
2655
  "copilot",
2652
2656
  "openai",
@@ -2670,6 +2674,10 @@ function modelProviderLabel(provider) {
2670
2674
  return "Ollama";
2671
2675
  case "llama-cpp":
2672
2676
  return "llama.cpp";
2677
+ case "apple-foundation-models":
2678
+ return "Apple Intelligence";
2679
+ case "android-mlkit":
2680
+ return "Android system AI";
2673
2681
  case "mlx":
2674
2682
  return "MLX";
2675
2683
  case "ds4":
@@ -2685,6 +2693,7 @@ function configuredModelProviders(config, opts) {
2685
2693
  const ds4PlatformAvailable = Boolean(config.ds4BaseUrl) || opts.platform === "linux" || opts.platform === "darwin" && opts.arch === "arm64";
2686
2694
  const ds4MemoryAvailable = Boolean(config.ds4BaseUrl) || opts.totalRamBytes === null || opts.totalRamBytes >= 45 * 1024 ** 3;
2687
2695
  if (ds4PlatformAvailable && ds4MemoryAvailable) providers.push("ds4");
2696
+ if (config.appleFoundationModelsStatus?.installed) providers.push("apple-foundation-models");
2688
2697
  providers.push("ollama");
2689
2698
  if (opts.copilotAvailable !== false) providers.push("copilot");
2690
2699
  if (config.hasOpenaiApiKey) providers.push("openai");
@@ -2733,7 +2742,7 @@ async function loadModelDownloadChoices(client, config, platform = process.platf
2733
2742
  client.getMemoryProfile(),
2734
2743
  client.listCatalogItems("chat-model")
2735
2744
  ]);
2736
- const provider = config.provider === "mlx" || config.provider === "llama-cpp" ? config.provider : memory.platform === "darwin" && platform === "darwin" && arch === "arm64" ? "mlx" : "llama-cpp";
2745
+ const provider = config.provider === "mlx" || config.provider === "llama-cpp" ? config.provider : memory.platform === platform ? resolveOnDeviceProvider(platform, arch) : "llama-cpp";
2737
2746
  const installed = await client.listProviderModels(provider).catch(() => ({ models: [] }));
2738
2747
  const installedIds = new Set(installed.models.map((model) => model.id));
2739
2748
  const ranked = rankChatModels(
@@ -4655,6 +4664,21 @@ function formatTaskDetails(task, gezels, boring) {
4655
4664
  import { formatModelAttribution as formatModelAttribution3 } from "@bendyline/gezel";
4656
4665
  import { Box as Box7, Text as Text7, useApp as useApp2, useInput as useInput5 } from "ink";
4657
4666
  import { useCallback as useCallback3, useEffect as useEffect5, useState as useState6 } from "react";
4667
+
4668
+ // src/run-readiness.ts
4669
+ async function settledFirstRunConfig(client, options = {}) {
4670
+ const attempts = options.attempts ?? 12;
4671
+ const delayMs = options.delayMs ?? 250;
4672
+ let config = await client.getConfig();
4673
+ for (let attempt = 0; attempt < attempts; attempt += 1) {
4674
+ if (config.firstRunCompleted || config.provider !== "copilot") return config;
4675
+ await new Promise((resolve2) => setTimeout(resolve2, delayMs));
4676
+ config = await client.getConfig();
4677
+ }
4678
+ return config;
4679
+ }
4680
+
4681
+ // src/tui/components/BootstrapGate.tsx
4658
4682
  import { Fragment as Fragment4, jsx as jsx6, jsxs as jsxs7 } from "react/jsx-runtime";
4659
4683
  var MAX_ALTERNATIVE_MODELS = 6;
4660
4684
  function BootstrapGate(props) {
@@ -5127,15 +5151,6 @@ function ProgressBar({ pct }) {
5127
5151
  "]"
5128
5152
  ] });
5129
5153
  }
5130
- async function settledFirstRunConfig(client) {
5131
- let config = await client.getConfig();
5132
- for (let attempt = 0; attempt < 12; attempt += 1) {
5133
- if (config.firstRunCompleted || config.provider !== "copilot") return config;
5134
- await delay(250);
5135
- config = await client.getConfig();
5136
- }
5137
- return config;
5138
- }
5139
5154
  async function installNativeToolkit(client, status, missing, setScreen) {
5140
5155
  for (let index = 0; index < missing.length; index += 1) {
5141
5156
  const engine = missing[index];
@@ -5284,9 +5299,6 @@ function fitLabel(fit) {
5284
5299
  function errorMessage(error) {
5285
5300
  return error instanceof Error ? error.message : String(error);
5286
5301
  }
5287
- function delay(ms) {
5288
- return new Promise((resolve2) => setTimeout(resolve2, ms));
5289
- }
5290
5302
 
5291
5303
  // src/tui/memory-diagnostics.ts
5292
5304
  import { appendFile, mkdir as mkdir2 } from "fs/promises";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bendyline/gezel-cli",
3
- "version": "1.1.1",
3
+ "version": "1.2.0",
4
4
  "description": "The `gezel` command-line tool.",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -44,15 +44,15 @@
44
44
  "!dist/**/*.map"
45
45
  ],
46
46
  "dependencies": {
47
- "@bendyline/gezel": "1.1.1",
48
- "@bendyline/gezel-app-sdk": "1.0.9",
49
- "@bendyline/gezel-catalog": "1.1.1",
50
- "@bendyline/gezel-client": "1.1.1",
51
- "@bendyline/gezel-knowledge": "1.1.1",
52
- "@bendyline/gezel-service": "1.1.1",
53
- "@bendyline/squisq": "2.11.3",
54
- "@bendyline/squisq-formats": "2.6.3",
55
- "@bendyline/squisq-react": "2.11.3",
47
+ "@bendyline/gezel": "1.2.0",
48
+ "@bendyline/gezel-app-sdk": "1.1.0",
49
+ "@bendyline/gezel-catalog": "1.2.0",
50
+ "@bendyline/gezel-client": "1.2.0",
51
+ "@bendyline/gezel-knowledge": "1.2.0",
52
+ "@bendyline/gezel-service": "1.2.0",
53
+ "@bendyline/squisq": "2.11.11",
54
+ "@bendyline/squisq-formats": "2.6.11",
55
+ "@bendyline/squisq-react": "2.11.13",
56
56
  "commander": "^15.0.0",
57
57
  "ink": "^7.1.1",
58
58
  "ink-text-input": "^6.0.0",