@hasna/hooks 0.7.0 → 0.7.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.
package/bin/index.js CHANGED
@@ -20,14 +20,12 @@ var __toESM = (mod, isNodeMode, target) => {
20
20
  }
21
21
  target = mod != null ? __create(__getProtoOf(mod)) : {};
22
22
  const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
23
- if (mod && typeof mod === "object" || typeof mod === "function") {
24
- for (let key of __getOwnPropNames(mod))
25
- if (!__hasOwnProp.call(to, key))
26
- __defProp(to, key, {
27
- get: __accessProp.bind(mod, key),
28
- enumerable: true
29
- });
30
- }
23
+ for (let key of __getOwnPropNames(mod))
24
+ if (!__hasOwnProp.call(to, key))
25
+ __defProp(to, key, {
26
+ get: __accessProp.bind(mod, key),
27
+ enumerable: true
28
+ });
31
29
  if (canCache)
32
30
  cache.set(mod, to);
33
31
  return to;
@@ -50,7 +48,7 @@ var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
50
48
  var __require = import.meta.require;
51
49
 
52
50
  // ../../node_modules/.bun/commander@12.1.0/node_modules/commander/lib/error.js
53
- var require_error = __commonJS(function(exports) {
51
+ var require_error = __commonJS((exports) => {
54
52
  class CommanderError extends Error {
55
53
  constructor(exitCode, code, message) {
56
54
  super(message);
@@ -74,7 +72,7 @@ var require_error = __commonJS(function(exports) {
74
72
  });
75
73
 
76
74
  // ../../node_modules/.bun/commander@12.1.0/node_modules/commander/lib/argument.js
77
- var require_argument = __commonJS(function(exports) {
75
+ var require_argument = __commonJS((exports) => {
78
76
  var { InvalidArgumentError } = require_error();
79
77
 
80
78
  class Argument {
@@ -153,7 +151,7 @@ var require_argument = __commonJS(function(exports) {
153
151
  });
154
152
 
155
153
  // ../../node_modules/.bun/commander@12.1.0/node_modules/commander/lib/help.js
156
- var require_help = __commonJS(function(exports) {
154
+ var require_help = __commonJS((exports) => {
157
155
  var { humanReadableArgName } = require_argument();
158
156
 
159
157
  class Help {
@@ -402,7 +400,7 @@ var require_help = __commonJS(function(exports) {
402
400
  });
403
401
 
404
402
  // ../../node_modules/.bun/commander@12.1.0/node_modules/commander/lib/option.js
405
- var require_option = __commonJS(function(exports) {
403
+ var require_option = __commonJS((exports) => {
406
404
  var { InvalidArgumentError } = require_error();
407
405
 
408
406
  class Option {
@@ -553,7 +551,7 @@ var require_option = __commonJS(function(exports) {
553
551
  });
554
552
 
555
553
  // ../../node_modules/.bun/commander@12.1.0/node_modules/commander/lib/suggestSimilar.js
556
- var require_suggestSimilar = __commonJS(function(exports) {
554
+ var require_suggestSimilar = __commonJS((exports) => {
557
555
  var maxDistance = 3;
558
556
  function editDistance(a, b) {
559
557
  if (Math.abs(a.length - b.length) > maxDistance)
@@ -626,7 +624,7 @@ var require_suggestSimilar = __commonJS(function(exports) {
626
624
  });
627
625
 
628
626
  // ../../node_modules/.bun/commander@12.1.0/node_modules/commander/lib/command.js
629
- var require_command = __commonJS(function(exports) {
627
+ var require_command = __commonJS((exports) => {
630
628
  var EventEmitter = __require("events").EventEmitter;
631
629
  var childProcess = __require("child_process");
632
630
  var path = __require("path");
@@ -1869,7 +1867,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
1869
1867
  });
1870
1868
 
1871
1869
  // ../../node_modules/.bun/commander@12.1.0/node_modules/commander/index.js
1872
- var require_commander = __commonJS(function(exports) {
1870
+ var require_commander = __commonJS((exports) => {
1873
1871
  var { Argument } = require_argument();
1874
1872
  var { Command } = require_command();
1875
1873
  var { CommanderError, InvalidArgumentError } = require_error();
@@ -2432,7 +2430,7 @@ var init_registry = __esm(() => {
2432
2430
  });
2433
2431
 
2434
2432
  // ../../node_modules/.bun/cli-spinners@2.9.2/node_modules/cli-spinners/spinners.json
2435
- var require_spinners = __commonJS(function(exports, module) {
2433
+ var require_spinners = __commonJS((exports, module) => {
2436
2434
  module.exports = {
2437
2435
  dots: {
2438
2436
  interval: 80,
@@ -4058,7 +4056,7 @@ var require_spinners = __commonJS(function(exports, module) {
4058
4056
  });
4059
4057
 
4060
4058
  // ../../node_modules/.bun/cli-spinners@2.9.2/node_modules/cli-spinners/index.js
4061
- var require_cli_spinners = __commonJS(function(exports, module) {
4059
+ var require_cli_spinners = __commonJS((exports, module) => {
4062
4060
  var spinners = Object.assign({}, require_spinners());
4063
4061
  var spinnersList = Object.keys(spinners);
4064
4062
  Object.defineProperty(spinners, "random", {
@@ -4348,14 +4346,14 @@ var init_transport = __esm(() => {
4348
4346
  // src/config.ts
4349
4347
  var exports_config = {};
4350
4348
  __export(exports_config, {
4351
- getConfigPath: () => getConfigPath,
4352
- getCustomHooksDir: () => getCustomHooksDir,
4353
- getHooksDataDir: () => getHooksDataDir,
4354
- getLockPath: () => getLockPath,
4355
- readConfig: () => readConfig,
4356
- resolveApiKey: () => resolveApiKey,
4349
+ writeConfig: () => writeConfig,
4357
4350
  resolveApiUrl: () => resolveApiUrl,
4358
- writeConfig: () => writeConfig
4351
+ resolveApiKey: () => resolveApiKey,
4352
+ readConfig: () => readConfig,
4353
+ getLockPath: () => getLockPath,
4354
+ getHooksDataDir: () => getHooksDataDir,
4355
+ getCustomHooksDir: () => getCustomHooksDir,
4356
+ getConfigPath: () => getConfigPath
4359
4357
  });
4360
4358
  import { existsSync as existsSync2, mkdirSync, readFileSync as readFileSync2, writeFileSync } from "fs";
4361
4359
  import { join as join3 } from "path";
@@ -4421,20 +4419,20 @@ var init_semver = __esm(() => {
4421
4419
  // src/lib/manifest.ts
4422
4420
  var exports_manifest = {};
4423
4421
  __export(exports_manifest, {
4424
- HOOK_NAME_RE: () => HOOK_NAME_RE,
4425
- ScriptContainmentError: () => ScriptContainmentError,
4426
- assertContained: () => assertContained,
4427
- customHookDir: () => customHookDir,
4428
- isInlineScript: () => isInlineScript,
4429
- listCustomHooks: () => listCustomHooks,
4430
- manifestSchema: () => manifestSchema,
4431
- normalizeManifestName: () => normalizeManifestName,
4432
- parseManifest: () => parseManifest,
4433
- readCustomManifest: () => readCustomManifest,
4434
- resolveScript: () => resolveScript,
4435
- scriptRelFor: () => scriptRelFor,
4422
+ writeCustomHook: () => writeCustomHook,
4436
4423
  shortManifestName: () => shortManifestName,
4437
- writeCustomHook: () => writeCustomHook
4424
+ scriptRelFor: () => scriptRelFor,
4425
+ resolveScript: () => resolveScript,
4426
+ readCustomManifest: () => readCustomManifest,
4427
+ parseManifest: () => parseManifest,
4428
+ normalizeManifestName: () => normalizeManifestName,
4429
+ manifestSchema: () => manifestSchema,
4430
+ listCustomHooks: () => listCustomHooks,
4431
+ isInlineScript: () => isInlineScript,
4432
+ customHookDir: () => customHookDir,
4433
+ assertContained: () => assertContained,
4434
+ ScriptContainmentError: () => ScriptContainmentError,
4435
+ HOOK_NAME_RE: () => HOOK_NAME_RE
4438
4436
  });
4439
4437
  import { existsSync as existsSync3, mkdirSync as mkdirSync2, readFileSync as readFileSync3, readdirSync, realpathSync, writeFileSync as writeFileSync2 } from "fs";
4440
4438
  import { basename, dirname, isAbsolute, join as join4, normalize, resolve, sep } from "path";
@@ -4591,11 +4589,11 @@ var init_manifest = __esm(() => {
4591
4589
  // src/lib/resolve.ts
4592
4590
  var exports_resolve = {};
4593
4591
  __export(exports_resolve, {
4594
- resolveBundledHooksDir: () => resolveBundledHooksDir,
4595
- resolveHook: () => resolveHook,
4596
- resolveHookDir: () => resolveHookDir,
4592
+ resolveScriptPath: () => resolveScriptPath,
4597
4593
  resolveHookMeta: () => resolveHookMeta,
4598
- resolveScriptPath: () => resolveScriptPath
4594
+ resolveHookDir: () => resolveHookDir,
4595
+ resolveHook: () => resolveHook,
4596
+ resolveBundledHooksDir: () => resolveBundledHooksDir
4599
4597
  });
4600
4598
  import { dirname as dirname2, join as join5 } from "path";
4601
4599
  import { existsSync as existsSync4 } from "fs";
@@ -4718,7 +4716,7 @@ function up(db) {
4718
4716
  db.exec(idx);
4719
4717
  }
4720
4718
  }
4721
- var init__001_initial = __esm(() => {
4719
+ var init_001_initial = __esm(() => {
4722
4720
  init_schema();
4723
4721
  });
4724
4722
 
@@ -4747,7 +4745,7 @@ function up2(db) {
4747
4745
  throw err;
4748
4746
  }
4749
4747
  }
4750
- var init__002_session_events = __esm(() => {
4748
+ var init_002_session_events = __esm(() => {
4751
4749
  init_schema();
4752
4750
  });
4753
4751
 
@@ -4776,7 +4774,7 @@ function up3(db) {
4776
4774
  throw err;
4777
4775
  }
4778
4776
  }
4779
- var init__003_user_prompt_submit_event = __esm(() => {
4777
+ var init_003_user_prompt_submit_event = __esm(() => {
4780
4778
  init_schema();
4781
4779
  });
4782
4780
 
@@ -4800,7 +4798,7 @@ var CREATE_HOOKS_TABLE = `
4800
4798
  last_verified_at TEXT
4801
4799
  )
4802
4800
  `, CREATE_HOOKS_INDEXES;
4803
- var init__004_hooks_table = __esm(() => {
4801
+ var init_004_hooks_table = __esm(() => {
4804
4802
  CREATE_HOOKS_INDEXES = [
4805
4803
  `CREATE INDEX IF NOT EXISTS idx_hooks_name ON hooks (name)`
4806
4804
  ];
@@ -4831,7 +4829,7 @@ function up5(db) {
4831
4829
  throw err;
4832
4830
  }
4833
4831
  }
4834
- var init__005_subagent_start_event = __esm(() => {
4832
+ var init_005_subagent_start_event = __esm(() => {
4835
4833
  init_schema();
4836
4834
  });
4837
4835
 
@@ -4863,11 +4861,11 @@ function runMigrations(db) {
4863
4861
  }
4864
4862
  var MIGRATIONS;
4865
4863
  var init_migrations = __esm(() => {
4866
- init__001_initial();
4867
- init__002_session_events();
4868
- init__003_user_prompt_submit_event();
4869
- init__004_hooks_table();
4870
- init__005_subagent_start_event();
4864
+ init_001_initial();
4865
+ init_002_session_events();
4866
+ init_003_user_prompt_submit_event();
4867
+ init_004_hooks_table();
4868
+ init_005_subagent_start_event();
4871
4869
  MIGRATIONS = [
4872
4870
  { version: "001_initial", up },
4873
4871
  { version: "002_session_events", up: up2 },
@@ -5009,10 +5007,10 @@ function runRetention(db, days) {
5009
5007
  // src/db/index.ts
5010
5008
  var exports_db = {};
5011
5009
  __export(exports_db, {
5012
- closeDb: () => closeDb,
5013
- createTestDb: () => createTestDb,
5010
+ getDbPath: () => getDbPath,
5014
5011
  getDb: () => getDb,
5015
- getDbPath: () => getDbPath
5012
+ createTestDb: () => createTestDb,
5013
+ closeDb: () => closeDb
5016
5014
  });
5017
5015
  import { Database } from "bun:sqlite";
5018
5016
  import { existsSync as existsSync6, mkdirSync as mkdirSync3, cpSync } from "fs";
@@ -5090,23 +5088,23 @@ var init_db = __esm(() => {
5090
5088
  // src/lib/store.ts
5091
5089
  var exports_store = {};
5092
5090
  __export(exports_store, {
5093
- LockFileError: () => LockFileError,
5094
- checkScriptHash: () => checkScriptHash,
5095
- getHookRecord: () => getHookRecord,
5096
- getPinnedHook: () => getPinnedHook,
5097
- listHookRecords: () => listHookRecords,
5098
- pinInstalledHook: () => pinInstalledHook,
5099
- readLock: () => readLock,
5100
- removeHookFromStore: () => removeHookFromStore,
5101
- removeHookRecord: () => removeHookRecord,
5102
- removePinnedHook: () => removePinnedHook,
5103
- retrustHook: () => retrustHook,
5104
- setPinnedHook: () => setPinnedHook,
5105
- sha256File: () => sha256File,
5106
- sha256Of: () => sha256Of,
5107
- upsertHookRecord: () => upsertHookRecord,
5091
+ writeLock: () => writeLock,
5108
5092
  verifyScriptHash: () => verifyScriptHash,
5109
- writeLock: () => writeLock
5093
+ upsertHookRecord: () => upsertHookRecord,
5094
+ sha256Of: () => sha256Of,
5095
+ sha256File: () => sha256File,
5096
+ setPinnedHook: () => setPinnedHook,
5097
+ retrustHook: () => retrustHook,
5098
+ removePinnedHook: () => removePinnedHook,
5099
+ removeHookRecord: () => removeHookRecord,
5100
+ removeHookFromStore: () => removeHookFromStore,
5101
+ readLock: () => readLock,
5102
+ pinInstalledHook: () => pinInstalledHook,
5103
+ listHookRecords: () => listHookRecords,
5104
+ getPinnedHook: () => getPinnedHook,
5105
+ getHookRecord: () => getHookRecord,
5106
+ checkScriptHash: () => checkScriptHash,
5107
+ LockFileError: () => LockFileError
5110
5108
  });
5111
5109
  import { createHash } from "crypto";
5112
5110
  import { existsSync as existsSync7, mkdirSync as mkdirSync4, readFileSync as readFileSync5, writeFileSync as writeFileSync3, renameSync } from "fs";
@@ -5299,19 +5297,19 @@ var init_store = __esm(() => {
5299
5297
  // src/lib/installer.ts
5300
5298
  var exports_installer = {};
5301
5299
  __export(exports_installer, {
5302
- buildCodewithTomlFragment: () => buildCodewithTomlFragment,
5303
- getHookPath: () => getHookPath,
5304
- getInstalledHooks: () => getInstalledHooks,
5305
- getRegisteredHooks: () => getRegisteredHooks,
5306
- getRegisteredHooksForTarget: () => getRegisteredHooksForTarget,
5307
- getSettingsPath: () => getSettingsPath,
5308
- hookExists: () => hookExists,
5309
- installHook: () => installHook,
5310
- installHooks: () => installHooks,
5311
- isEventSupported: () => isEventSupported,
5312
- removeCodewithHookEntry: () => removeCodewithHookEntry,
5300
+ uninstallHook: () => uninstallHook,
5313
5301
  removeHook: () => removeHook,
5314
- uninstallHook: () => uninstallHook
5302
+ removeCodewithHookEntry: () => removeCodewithHookEntry,
5303
+ isEventSupported: () => isEventSupported,
5304
+ installHooks: () => installHooks,
5305
+ installHook: () => installHook,
5306
+ hookExists: () => hookExists,
5307
+ getSettingsPath: () => getSettingsPath,
5308
+ getRegisteredHooksForTarget: () => getRegisteredHooksForTarget,
5309
+ getRegisteredHooks: () => getRegisteredHooks,
5310
+ getInstalledHooks: () => getInstalledHooks,
5311
+ getHookPath: () => getHookPath,
5312
+ buildCodewithTomlFragment: () => buildCodewithTomlFragment
5315
5313
  });
5316
5314
  import { existsSync as existsSync8, mkdirSync as mkdirSync5, readFileSync as readFileSync6, rmSync, writeFileSync as writeFileSync4 } from "fs";
5317
5315
  import { join as join8, dirname as dirname3 } from "path";
@@ -6116,10 +6114,10 @@ var init_profiles = __esm(() => {
6116
6114
  // src/lib/db-writer.ts
6117
6115
  var exports_db_writer = {};
6118
6116
  __export(exports_db_writer, {
6119
- normalizeEventType: () => normalizeEventType,
6120
- recordHookRun: () => recordHookRun,
6117
+ writeHookEvent: () => writeHookEvent,
6121
6118
  resolveEventType: () => resolveEventType,
6122
- writeHookEvent: () => writeHookEvent
6119
+ recordHookRun: () => recordHookRun,
6120
+ normalizeEventType: () => normalizeEventType
6123
6121
  });
6124
6122
  function nanoid2() {
6125
6123
  return crypto.randomUUID().replace(/-/g, "").slice(0, 21);
@@ -6366,8 +6364,8 @@ var init_hook_env = __esm(() => {
6366
6364
  // src/lib/run.ts
6367
6365
  var exports_run = {};
6368
6366
  __export(exports_run, {
6369
- HookTimeoutError: () => HookTimeoutError,
6370
- executeVerifiedScript: () => executeVerifiedScript
6367
+ executeVerifiedScript: () => executeVerifiedScript,
6368
+ HookTimeoutError: () => HookTimeoutError
6371
6369
  });
6372
6370
  import { randomBytes as randomBytes2 } from "crypto";
6373
6371
  import { rmSync as rmSync3, writeFileSync as writeFileSync6 } from "fs";
@@ -6529,9 +6527,9 @@ var init_run = __esm(() => {
6529
6527
  // src/lib/custom-install.ts
6530
6528
  var exports_custom_install = {};
6531
6529
  __export(exports_custom_install, {
6532
- ensureCustomDir: () => ensureCustomDir,
6530
+ isCustomSource: () => isCustomSource,
6533
6531
  installCustomSource: () => installCustomSource,
6534
- isCustomSource: () => isCustomSource
6532
+ ensureCustomDir: () => ensureCustomDir
6535
6533
  });
6536
6534
  import { existsSync as existsSync11, mkdirSync as mkdirSync7, mkdtempSync, readFileSync as readFileSync8, rmSync as rmSync4 } from "fs";
6537
6535
  import { join as join11 } from "path";
@@ -6644,11 +6642,11 @@ var init_custom_install = __esm(() => {
6644
6642
  // src/lib/sync.ts
6645
6643
  var exports_sync = {};
6646
6644
  __export(exports_sync, {
6647
- commitSyncArtifacts: () => commitSyncArtifacts,
6648
- fetchPinnedHook: () => fetchPinnedHook,
6649
- planSync: () => planSync,
6645
+ syncHooks: () => syncHooks,
6650
6646
  stageSyncArtifacts: () => stageSyncArtifacts,
6651
- syncHooks: () => syncHooks
6647
+ planSync: () => planSync,
6648
+ fetchPinnedHook: () => fetchPinnedHook,
6649
+ commitSyncArtifacts: () => commitSyncArtifacts
6652
6650
  });
6653
6651
  import { createHash as createHash2 } from "crypto";
6654
6652
  import { readFileSync as readFileSync9 } from "fs";
@@ -7357,31 +7355,31 @@ var init_storage_sync = __esm(() => {
7357
7355
  // src/storage.ts
7358
7356
  var exports_storage = {};
7359
7357
  __export(exports_storage, {
7360
- HOOKS_STORAGE_BACKEND_ENV: () => HOOKS_STORAGE_BACKEND_ENV,
7361
- HOOKS_STORAGE_BACKEND_FALLBACK_ENV: () => HOOKS_STORAGE_BACKEND_FALLBACK_ENV,
7362
- HOOKS_STORAGE_ENV: () => HOOKS_STORAGE_ENV,
7363
- HOOKS_STORAGE_FALLBACK_ENV: () => HOOKS_STORAGE_FALLBACK_ENV,
7364
- HOOKS_STORAGE_TABLES: () => HOOKS_STORAGE_TABLES,
7365
- PG_MIGRATIONS: () => PG_MIGRATIONS,
7366
- PgAdapterAsync: () => PgAdapterAsync,
7367
- RETIRED_STORAGE_MODE_ENV: () => RETIRED_STORAGE_MODE_ENV,
7368
- STORAGE_BACKENDS: () => STORAGE_BACKENDS,
7369
- STORAGE_BACKEND_ENV: () => STORAGE_BACKEND_ENV,
7370
- STORAGE_DATABASE_ENV: () => STORAGE_DATABASE_ENV,
7371
- STORAGE_TABLES: () => STORAGE_TABLES,
7372
- getStorageBackend: () => getStorageBackend,
7373
- getStorageDatabaseEnv: () => getStorageDatabaseEnv,
7374
- getStorageDatabaseEnvName: () => getStorageDatabaseEnvName,
7375
- getStorageDatabaseUrl: () => getStorageDatabaseUrl,
7376
- getStoragePg: () => getStoragePg,
7377
- getStorageStatus: () => getStorageStatus,
7378
- getSyncMetaAll: () => getSyncMetaAll,
7379
- parseStorageTables: () => parseStorageTables,
7380
- resolveTables: () => resolveTables,
7381
- runStorageMigrations: () => runStorageMigrations,
7382
- storagePull: () => storagePull,
7358
+ storageSync: () => storageSync,
7383
7359
  storagePush: () => storagePush,
7384
- storageSync: () => storageSync
7360
+ storagePull: () => storagePull,
7361
+ runStorageMigrations: () => runStorageMigrations,
7362
+ resolveTables: () => resolveTables,
7363
+ parseStorageTables: () => parseStorageTables,
7364
+ getSyncMetaAll: () => getSyncMetaAll,
7365
+ getStorageStatus: () => getStorageStatus,
7366
+ getStoragePg: () => getStoragePg,
7367
+ getStorageDatabaseUrl: () => getStorageDatabaseUrl,
7368
+ getStorageDatabaseEnvName: () => getStorageDatabaseEnvName,
7369
+ getStorageDatabaseEnv: () => getStorageDatabaseEnv,
7370
+ getStorageBackend: () => getStorageBackend,
7371
+ STORAGE_TABLES: () => STORAGE_TABLES,
7372
+ STORAGE_DATABASE_ENV: () => STORAGE_DATABASE_ENV,
7373
+ STORAGE_BACKEND_ENV: () => STORAGE_BACKEND_ENV,
7374
+ STORAGE_BACKENDS: () => STORAGE_BACKENDS,
7375
+ RETIRED_STORAGE_MODE_ENV: () => RETIRED_STORAGE_MODE_ENV,
7376
+ PgAdapterAsync: () => PgAdapterAsync,
7377
+ PG_MIGRATIONS: () => PG_MIGRATIONS,
7378
+ HOOKS_STORAGE_TABLES: () => HOOKS_STORAGE_TABLES,
7379
+ HOOKS_STORAGE_FALLBACK_ENV: () => HOOKS_STORAGE_FALLBACK_ENV,
7380
+ HOOKS_STORAGE_ENV: () => HOOKS_STORAGE_ENV,
7381
+ HOOKS_STORAGE_BACKEND_FALLBACK_ENV: () => HOOKS_STORAGE_BACKEND_FALLBACK_ENV,
7382
+ HOOKS_STORAGE_BACKEND_ENV: () => HOOKS_STORAGE_BACKEND_ENV
7385
7383
  });
7386
7384
  var init_storage = __esm(() => {
7387
7385
  init_storage_sync();
@@ -7559,11 +7557,11 @@ var init_openapi = __esm(() => {
7559
7557
  // src/serve.ts
7560
7558
  var exports_serve = {};
7561
7559
  __export(exports_serve, {
7562
- DEFAULT_SERVE_PORT: () => DEFAULT_SERVE_PORT,
7563
- SERVE_HOST: () => SERVE_HOST,
7564
- SERVE_SERVICE_NAME: () => SERVE_SERVICE_NAME,
7560
+ startServeServer: () => startServeServer,
7565
7561
  handleServeRequest: () => handleServeRequest,
7566
- startServeServer: () => startServeServer
7562
+ SERVE_SERVICE_NAME: () => SERVE_SERVICE_NAME,
7563
+ SERVE_HOST: () => SERVE_HOST,
7564
+ DEFAULT_SERVE_PORT: () => DEFAULT_SERVE_PORT
7567
7565
  });
7568
7566
  import { readFileSync as readFileSync10 } from "fs";
7569
7567
  import { dirname as dirname6, join as join12 } from "path";
@@ -7829,12 +7827,12 @@ var CF_API = "https://api.cloudflare.com/client/v4";
7829
7827
  // src/mcp/server.ts
7830
7828
  var exports_server = {};
7831
7829
  __export(exports_server, {
7832
- MCP_PORT: () => MCP_PORT,
7833
- MCP_SSE_HOST: () => MCP_SSE_HOST,
7834
- createHooksServer: () => createHooksServer,
7835
- sseAuthToken: () => sseAuthToken,
7830
+ startStdioServer: () => startStdioServer,
7836
7831
  startSSEServer: () => startSSEServer,
7837
- startStdioServer: () => startStdioServer
7832
+ sseAuthToken: () => sseAuthToken,
7833
+ createHooksServer: () => createHooksServer,
7834
+ MCP_SSE_HOST: () => MCP_SSE_HOST,
7835
+ MCP_PORT: () => MCP_PORT
7838
7836
  });
7839
7837
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
7840
7838
  import { SSEServerTransport } from "@modelcontextprotocol/sdk/server/sse.js";
@@ -8847,14 +8845,14 @@ var init_server = __esm(() => {
8847
8845
  // src/mcp/http.ts
8848
8846
  var exports_http = {};
8849
8847
  __export(exports_http, {
8850
- DEFAULT_MCP_HTTP_PORT: () => DEFAULT_MCP_HTTP_PORT,
8851
- MCP_HTTP_HOST: () => MCP_HTTP_HOST,
8852
- MCP_SERVICE_NAME: () => MCP_SERVICE_NAME,
8853
- handleMcpRequest: () => handleMcpRequest,
8854
- healthPayload: () => healthPayload,
8855
- isHttpMode: () => isHttpMode,
8848
+ startMcpHttpServer: () => startMcpHttpServer,
8856
8849
  resolveMcpHttpPort: () => resolveMcpHttpPort,
8857
- startMcpHttpServer: () => startMcpHttpServer
8850
+ isHttpMode: () => isHttpMode,
8851
+ healthPayload: () => healthPayload,
8852
+ handleMcpRequest: () => handleMcpRequest,
8853
+ MCP_SERVICE_NAME: () => MCP_SERVICE_NAME,
8854
+ MCP_HTTP_HOST: () => MCP_HTTP_HOST,
8855
+ DEFAULT_MCP_HTTP_PORT: () => DEFAULT_MCP_HTTP_PORT
8858
8856
  });
8859
8857
  import { WebStandardStreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/webStandardStreamableHttp.js";
8860
8858
  function isHttpMode(args) {
@@ -10519,29 +10517,29 @@ function SelectInput({ items = [], isFocused = true, initialIndex = 0, indicator
10519
10517
  var SelectInput_default = SelectInput;
10520
10518
  // src/cli/components/Header.tsx
10521
10519
  import { Box as Box3, Text as Text3 } from "ink";
10522
- import { jsx, jsxs } from "react/jsx-runtime";
10520
+ import { jsxDEV } from "react/jsx-dev-runtime";
10523
10521
  function Header({ title = "Hooks", subtitle }) {
10524
- return /* @__PURE__ */ jsxs(Box3, {
10522
+ return /* @__PURE__ */ jsxDEV(Box3, {
10525
10523
  flexDirection: "column",
10526
10524
  marginBottom: 1,
10527
10525
  children: [
10528
- /* @__PURE__ */ jsx(Text3, {
10526
+ /* @__PURE__ */ jsxDEV(Text3, {
10529
10527
  bold: true,
10530
10528
  color: "cyan",
10531
10529
  children: title
10532
- }),
10533
- subtitle && /* @__PURE__ */ jsx(Text3, {
10530
+ }, undefined, false, undefined, this),
10531
+ subtitle && /* @__PURE__ */ jsxDEV(Text3, {
10534
10532
  dimColor: true,
10535
10533
  children: subtitle
10536
- })
10534
+ }, undefined, false, undefined, this)
10537
10535
  ]
10538
- });
10536
+ }, undefined, true, undefined, this);
10539
10537
  }
10540
10538
 
10541
10539
  // src/cli/components/CategorySelect.tsx
10542
10540
  import { Box as Box4, Text as Text4 } from "ink";
10543
10541
  init_registry();
10544
- import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
10542
+ import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
10545
10543
  function CategorySelect({ onSelect, onBack }) {
10546
10544
  const items = CATEGORIES.map((cat) => ({
10547
10545
  label: `${cat} (${getHooksByCategory(cat).length})`,
@@ -10557,28 +10555,28 @@ function CategorySelect({ onSelect, onBack }) {
10557
10555
  onSelect(item.value);
10558
10556
  }
10559
10557
  };
10560
- return /* @__PURE__ */ jsxs2(Box4, {
10558
+ return /* @__PURE__ */ jsxDEV2(Box4, {
10561
10559
  flexDirection: "column",
10562
10560
  children: [
10563
- /* @__PURE__ */ jsx2(Box4, {
10561
+ /* @__PURE__ */ jsxDEV2(Box4, {
10564
10562
  marginBottom: 1,
10565
- children: /* @__PURE__ */ jsx2(Text4, {
10563
+ children: /* @__PURE__ */ jsxDEV2(Text4, {
10566
10564
  bold: true,
10567
10565
  children: "Select a category:"
10568
- })
10569
- }),
10570
- /* @__PURE__ */ jsx2(SelectInput_default, {
10566
+ }, undefined, false, undefined, this)
10567
+ }, undefined, false, undefined, this),
10568
+ /* @__PURE__ */ jsxDEV2(SelectInput_default, {
10571
10569
  items,
10572
10570
  onSelect: handleSelect
10573
- })
10571
+ }, undefined, false, undefined, this)
10574
10572
  ]
10575
- });
10573
+ }, undefined, true, undefined, this);
10576
10574
  }
10577
10575
 
10578
10576
  // src/cli/components/DataTable.tsx
10579
10577
  import { useState as useState2 } from "react";
10580
10578
  import { Box as Box5, Text as Text5, useInput as useInput2 } from "ink";
10581
- import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
10579
+ import { jsxDEV as jsxDEV3 } from "react/jsx-dev-runtime";
10582
10580
  var COL_CHECK = 5;
10583
10581
  var COL_NAME = 18;
10584
10582
  var COL_VERSION = 9;
@@ -10613,18 +10611,18 @@ function DataTable({
10613
10611
  onBack();
10614
10612
  }
10615
10613
  });
10616
- return /* @__PURE__ */ jsxs3(Box5, {
10614
+ return /* @__PURE__ */ jsxDEV3(Box5, {
10617
10615
  flexDirection: "column",
10618
10616
  children: [
10619
- /* @__PURE__ */ jsx3(Box5, {
10617
+ /* @__PURE__ */ jsxDEV3(Box5, {
10620
10618
  marginBottom: 1,
10621
- children: /* @__PURE__ */ jsx3(Text5, {
10619
+ children: /* @__PURE__ */ jsxDEV3(Text5, {
10622
10620
  bold: true,
10623
10621
  children: "Select hooks (up/down to navigate, space/enter to toggle, esc to go back):"
10624
- })
10625
- }),
10626
- /* @__PURE__ */ jsx3(Box5, {
10627
- children: /* @__PURE__ */ jsxs3(Text5, {
10622
+ }, undefined, false, undefined, this)
10623
+ }, undefined, false, undefined, this),
10624
+ /* @__PURE__ */ jsxDEV3(Box5, {
10625
+ children: /* @__PURE__ */ jsxDEV3(Text5, {
10628
10626
  dimColor: true,
10629
10627
  children: [
10630
10628
  pad("", COL_CHECK),
@@ -10633,11 +10631,11 @@ function DataTable({
10633
10631
  pad("Event", COL_EVENT),
10634
10632
  "Description"
10635
10633
  ]
10636
- })
10637
- }),
10638
- /* @__PURE__ */ jsx3(Box5, {
10634
+ }, undefined, true, undefined, this)
10635
+ }, undefined, false, undefined, this),
10636
+ /* @__PURE__ */ jsxDEV3(Box5, {
10639
10637
  marginBottom: 0,
10640
- children: /* @__PURE__ */ jsxs3(Text5, {
10638
+ children: /* @__PURE__ */ jsxDEV3(Text5, {
10641
10639
  dimColor: true,
10642
10640
  children: [
10643
10641
  pad("\u2500".repeat(COL_CHECK - 1), COL_CHECK),
@@ -10646,14 +10644,14 @@ function DataTable({
10646
10644
  pad("\u2500".repeat(COL_EVENT - 1), COL_EVENT),
10647
10645
  "\u2500".repeat(COL_DESC)
10648
10646
  ]
10649
- })
10650
- }),
10647
+ }, undefined, true, undefined, this)
10648
+ }, undefined, false, undefined, this),
10651
10649
  hooks.map((hook, i) => {
10652
10650
  const isHighlighted = i === cursor;
10653
10651
  const isSelected = selected.has(hook.name);
10654
10652
  const check = isSelected ? "[x]" : "[ ]";
10655
- return /* @__PURE__ */ jsx3(Box5, {
10656
- children: /* @__PURE__ */ jsxs3(Text5, {
10653
+ return /* @__PURE__ */ jsxDEV3(Box5, {
10654
+ children: /* @__PURE__ */ jsxDEV3(Text5, {
10657
10655
  bold: isHighlighted,
10658
10656
  inverse: isHighlighted,
10659
10657
  children: [
@@ -10663,62 +10661,62 @@ function DataTable({
10663
10661
  pad(hook.event, COL_EVENT),
10664
10662
  truncate2(hook.description, COL_DESC)
10665
10663
  ]
10666
- })
10667
- }, hook.name);
10664
+ }, undefined, true, undefined, this)
10665
+ }, hook.name, false, undefined, this);
10668
10666
  }),
10669
- /* @__PURE__ */ jsxs3(Box5, {
10667
+ /* @__PURE__ */ jsxDEV3(Box5, {
10670
10668
  marginTop: 1,
10671
10669
  flexDirection: "row",
10672
10670
  gap: 2,
10673
10671
  children: [
10674
- /* @__PURE__ */ jsx3(Text5, {
10672
+ /* @__PURE__ */ jsxDEV3(Text5, {
10675
10673
  dimColor: true,
10676
10674
  children: "[esc] Back"
10677
- }),
10678
- selected.size > 0 && /* @__PURE__ */ jsxs3(Text5, {
10675
+ }, undefined, false, undefined, this),
10676
+ selected.size > 0 && /* @__PURE__ */ jsxDEV3(Text5, {
10679
10677
  color: "green",
10680
10678
  bold: true,
10681
10679
  children: [
10682
10680
  selected.size,
10683
10681
  " selected"
10684
10682
  ]
10685
- })
10683
+ }, undefined, true, undefined, this)
10686
10684
  ]
10687
- }),
10688
- selected.size > 0 && /* @__PURE__ */ jsx3(Box5, {
10685
+ }, undefined, true, undefined, this),
10686
+ selected.size > 0 && /* @__PURE__ */ jsxDEV3(Box5, {
10689
10687
  marginTop: 0,
10690
- children: /* @__PURE__ */ jsxs3(Text5, {
10688
+ children: /* @__PURE__ */ jsxDEV3(Text5, {
10691
10689
  dimColor: true,
10692
10690
  children: [
10693
10691
  "Selected: ",
10694
10692
  Array.from(selected).join(", ")
10695
10693
  ]
10696
- })
10697
- }),
10698
- selected.size > 0 && /* @__PURE__ */ jsx3(Box5, {
10694
+ }, undefined, true, undefined, this)
10695
+ }, undefined, false, undefined, this),
10696
+ selected.size > 0 && /* @__PURE__ */ jsxDEV3(Box5, {
10699
10697
  marginTop: 1,
10700
- children: /* @__PURE__ */ jsxs3(Text5, {
10698
+ children: /* @__PURE__ */ jsxDEV3(Text5, {
10701
10699
  children: [
10702
10700
  "Press",
10703
10701
  " ",
10704
- /* @__PURE__ */ jsx3(Text5, {
10702
+ /* @__PURE__ */ jsxDEV3(Text5, {
10705
10703
  bold: true,
10706
10704
  color: "cyan",
10707
10705
  children: "i"
10708
- }),
10706
+ }, undefined, false, undefined, this),
10709
10707
  " ",
10710
10708
  "to install selected (",
10711
10709
  selected.size,
10712
10710
  ")"
10713
10711
  ]
10714
- })
10715
- })
10712
+ }, undefined, true, undefined, this)
10713
+ }, undefined, false, undefined, this)
10716
10714
  ]
10717
- });
10715
+ }, undefined, true, undefined, this);
10718
10716
  }
10719
10717
 
10720
10718
  // src/cli/components/HookSelect.tsx
10721
- import { jsx as jsx4 } from "react/jsx-runtime";
10719
+ import { jsxDEV as jsxDEV4 } from "react/jsx-dev-runtime";
10722
10720
  function HookSelect({
10723
10721
  hooks,
10724
10722
  selected,
@@ -10726,13 +10724,13 @@ function HookSelect({
10726
10724
  onConfirm,
10727
10725
  onBack
10728
10726
  }) {
10729
- return /* @__PURE__ */ jsx4(DataTable, {
10727
+ return /* @__PURE__ */ jsxDEV4(DataTable, {
10730
10728
  hooks,
10731
10729
  selected,
10732
10730
  onToggle,
10733
10731
  onConfirm,
10734
10732
  onBack
10735
- });
10733
+ }, undefined, false, undefined, this);
10736
10734
  }
10737
10735
 
10738
10736
  // src/cli/components/SearchView.tsx
@@ -10833,7 +10831,7 @@ var build_default = TextInput;
10833
10831
 
10834
10832
  // src/cli/components/SearchView.tsx
10835
10833
  init_registry();
10836
- import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
10834
+ import { jsxDEV as jsxDEV5 } from "react/jsx-dev-runtime";
10837
10835
  function SearchView({
10838
10836
  selected,
10839
10837
  onToggle,
@@ -10862,55 +10860,55 @@ function SearchView({
10862
10860
  setMode("select");
10863
10861
  }
10864
10862
  });
10865
- return /* @__PURE__ */ jsxs4(Box6, {
10863
+ return /* @__PURE__ */ jsxDEV5(Box6, {
10866
10864
  flexDirection: "column",
10867
10865
  children: [
10868
- /* @__PURE__ */ jsxs4(Box6, {
10866
+ /* @__PURE__ */ jsxDEV5(Box6, {
10869
10867
  marginBottom: 1,
10870
10868
  children: [
10871
- /* @__PURE__ */ jsx5(Text7, {
10869
+ /* @__PURE__ */ jsxDEV5(Text7, {
10872
10870
  bold: true,
10873
10871
  children: "Search: "
10874
- }),
10875
- mode === "search" && /* @__PURE__ */ jsx5(build_default, {
10872
+ }, undefined, false, undefined, this),
10873
+ mode === "search" && /* @__PURE__ */ jsxDEV5(build_default, {
10876
10874
  value: query,
10877
10875
  onChange: setQuery,
10878
10876
  placeholder: "Type to search hooks..."
10879
- }),
10880
- mode === "select" && /* @__PURE__ */ jsx5(Text7, {
10877
+ }, undefined, false, undefined, this),
10878
+ mode === "select" && /* @__PURE__ */ jsxDEV5(Text7, {
10881
10879
  children: query
10882
- })
10880
+ }, undefined, false, undefined, this)
10883
10881
  ]
10884
- }),
10885
- query.length < 2 && /* @__PURE__ */ jsx5(Text7, {
10882
+ }, undefined, true, undefined, this),
10883
+ query.length < 2 && /* @__PURE__ */ jsxDEV5(Text7, {
10886
10884
  dimColor: true,
10887
10885
  children: "Type at least 2 characters to search"
10888
- }),
10889
- query.length >= 2 && results.length === 0 && /* @__PURE__ */ jsxs4(Text7, {
10886
+ }, undefined, false, undefined, this),
10887
+ query.length >= 2 && results.length === 0 && /* @__PURE__ */ jsxDEV5(Text7, {
10890
10888
  dimColor: true,
10891
10889
  children: [
10892
10890
  'No hooks found for "',
10893
10891
  query,
10894
10892
  '"'
10895
10893
  ]
10896
- }),
10897
- results.length > 0 && mode === "search" && /* @__PURE__ */ jsxs4(Text7, {
10894
+ }, undefined, true, undefined, this),
10895
+ results.length > 0 && mode === "search" && /* @__PURE__ */ jsxDEV5(Text7, {
10898
10896
  dimColor: true,
10899
10897
  children: [
10900
10898
  "Found ",
10901
10899
  results.length,
10902
10900
  " hook(s) \u2014 press down arrow to browse results"
10903
10901
  ]
10904
- }),
10905
- results.length > 0 && mode === "select" && /* @__PURE__ */ jsx5(DataTable, {
10902
+ }, undefined, true, undefined, this),
10903
+ results.length > 0 && mode === "select" && /* @__PURE__ */ jsxDEV5(DataTable, {
10906
10904
  hooks: results,
10907
10905
  selected,
10908
10906
  onToggle,
10909
10907
  onConfirm,
10910
10908
  onBack: () => setMode("search")
10911
- })
10909
+ }, undefined, false, undefined, this)
10912
10910
  ]
10913
- });
10911
+ }, undefined, true, undefined, this);
10914
10912
  }
10915
10913
 
10916
10914
  // src/cli/components/InstallProgress.tsx
@@ -10942,7 +10940,7 @@ var build_default2 = Spinner;
10942
10940
  // src/cli/components/InstallProgress.tsx
10943
10941
  init_installer();
10944
10942
  init_registry();
10945
- import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
10943
+ import { jsxDEV as jsxDEV6 } from "react/jsx-dev-runtime";
10946
10944
  function InstallProgress({
10947
10945
  hooks,
10948
10946
  overwrite = false,
@@ -10966,55 +10964,55 @@ function InstallProgress({
10966
10964
  };
10967
10965
  install();
10968
10966
  }, [hooks, overwrite]);
10969
- return /* @__PURE__ */ jsxs5(Box7, {
10967
+ return /* @__PURE__ */ jsxDEV6(Box7, {
10970
10968
  flexDirection: "column",
10971
10969
  children: [
10972
- /* @__PURE__ */ jsx6(Box7, {
10970
+ /* @__PURE__ */ jsxDEV6(Box7, {
10973
10971
  marginBottom: 1,
10974
- children: /* @__PURE__ */ jsx6(Text9, {
10972
+ children: /* @__PURE__ */ jsxDEV6(Text9, {
10975
10973
  bold: true,
10976
10974
  children: installing ? `Installing hooks (${current + 1}/${hooks.length})...` : "Installation complete!"
10977
- })
10978
- }),
10975
+ }, undefined, false, undefined, this)
10976
+ }, undefined, false, undefined, this),
10979
10977
  hooks.map((name, i) => {
10980
10978
  const result = results[i];
10981
10979
  const isCurrent = i === current && installing;
10982
10980
  const meta = getHook(name);
10983
- return /* @__PURE__ */ jsxs5(Box7, {
10981
+ return /* @__PURE__ */ jsxDEV6(Box7, {
10984
10982
  flexDirection: "column",
10985
10983
  children: [
10986
- isCurrent && !result && /* @__PURE__ */ jsxs5(Text9, {
10984
+ isCurrent && !result && /* @__PURE__ */ jsxDEV6(Text9, {
10987
10985
  color: "cyan",
10988
10986
  children: [
10989
- /* @__PURE__ */ jsx6(build_default2, {
10987
+ /* @__PURE__ */ jsxDEV6(build_default2, {
10990
10988
  type: "dots"
10991
- }),
10989
+ }, undefined, false, undefined, this),
10992
10990
  " ",
10993
10991
  name
10994
10992
  ]
10995
- }),
10996
- result?.success && /* @__PURE__ */ jsxs5(Box7, {
10993
+ }, undefined, true, undefined, this),
10994
+ result?.success && /* @__PURE__ */ jsxDEV6(Box7, {
10997
10995
  flexDirection: "column",
10998
10996
  children: [
10999
- /* @__PURE__ */ jsxs5(Text9, {
10997
+ /* @__PURE__ */ jsxDEV6(Text9, {
11000
10998
  color: "green",
11001
10999
  children: [
11002
11000
  "\u2713",
11003
11001
  " ",
11004
11002
  name
11005
11003
  ]
11006
- }),
11007
- meta && /* @__PURE__ */ jsxs5(Text9, {
11004
+ }, undefined, true, undefined, this),
11005
+ meta && /* @__PURE__ */ jsxDEV6(Text9, {
11008
11006
  dimColor: true,
11009
11007
  children: [
11010
11008
  " ",
11011
11009
  meta.event,
11012
11010
  meta.matcher ? ` [${meta.matcher}]` : ""
11013
11011
  ]
11014
- })
11012
+ }, undefined, true, undefined, this)
11015
11013
  ]
11016
- }),
11017
- result && !result.success && /* @__PURE__ */ jsxs5(Text9, {
11014
+ }, undefined, true, undefined, this),
11015
+ result && !result.success && /* @__PURE__ */ jsxDEV6(Text9, {
11018
11016
  color: "red",
11019
11017
  children: [
11020
11018
  "\u2717",
@@ -11023,54 +11021,54 @@ function InstallProgress({
11023
11021
  " - ",
11024
11022
  result.error
11025
11023
  ]
11026
- }),
11027
- !isCurrent && !result && /* @__PURE__ */ jsxs5(Text9, {
11024
+ }, undefined, true, undefined, this),
11025
+ !isCurrent && !result && /* @__PURE__ */ jsxDEV6(Text9, {
11028
11026
  dimColor: true,
11029
11027
  children: [
11030
11028
  "\u25CB",
11031
11029
  " ",
11032
11030
  name
11033
11031
  ]
11034
- })
11032
+ }, undefined, true, undefined, this)
11035
11033
  ]
11036
- }, name);
11034
+ }, name, true, undefined, this);
11037
11035
  }),
11038
- !installing && /* @__PURE__ */ jsxs5(Box7, {
11036
+ !installing && /* @__PURE__ */ jsxDEV6(Box7, {
11039
11037
  marginTop: 1,
11040
11038
  flexDirection: "column",
11041
11039
  children: [
11042
- /* @__PURE__ */ jsxs5(Text9, {
11040
+ /* @__PURE__ */ jsxDEV6(Text9, {
11043
11041
  children: [
11044
- /* @__PURE__ */ jsxs5(Text9, {
11042
+ /* @__PURE__ */ jsxDEV6(Text9, {
11045
11043
  color: "green",
11046
11044
  children: [
11047
11045
  results.filter((r) => r.success).length,
11048
11046
  " installed"
11049
11047
  ]
11050
- }),
11051
- results.some((r) => !r.success) && /* @__PURE__ */ jsxs5(Text9, {
11048
+ }, undefined, true, undefined, this),
11049
+ results.some((r) => !r.success) && /* @__PURE__ */ jsxDEV6(Text9, {
11052
11050
  color: "red",
11053
11051
  children: [
11054
11052
  ", ",
11055
11053
  results.filter((r) => !r.success).length,
11056
11054
  " failed"
11057
11055
  ]
11058
- })
11056
+ }, undefined, true, undefined, this)
11059
11057
  ]
11060
- }),
11061
- /* @__PURE__ */ jsx6(Text9, {
11058
+ }, undefined, true, undefined, this),
11059
+ /* @__PURE__ */ jsxDEV6(Text9, {
11062
11060
  dimColor: true,
11063
11061
  children: "Hooks installed to .hooks/ and registered in ~/.claude/settings.json"
11064
- })
11062
+ }, undefined, false, undefined, this)
11065
11063
  ]
11066
- })
11064
+ }, undefined, true, undefined, this)
11067
11065
  ]
11068
- });
11066
+ }, undefined, true, undefined, this);
11069
11067
  }
11070
11068
 
11071
11069
  // src/cli/components/App.tsx
11072
11070
  init_registry();
11073
- import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
11071
+ import { jsxDEV as jsxDEV7 } from "react/jsx-dev-runtime";
11074
11072
  function App({ initialHooks, overwrite = false }) {
11075
11073
  const { exit } = useApp();
11076
11074
  const [view, setView] = useState7(initialHooks?.length ? "installing" : "main");
@@ -11117,44 +11115,44 @@ function App({ initialHooks, overwrite = false }) {
11117
11115
  setView(item.value);
11118
11116
  }
11119
11117
  };
11120
- return /* @__PURE__ */ jsxs6(Box8, {
11118
+ return /* @__PURE__ */ jsxDEV7(Box8, {
11121
11119
  flexDirection: "column",
11122
11120
  padding: 1,
11123
11121
  children: [
11124
- /* @__PURE__ */ jsx7(Header, {
11122
+ /* @__PURE__ */ jsxDEV7(Header, {
11125
11123
  title: "Hooks",
11126
11124
  subtitle: "Install Claude Code hooks for your project"
11127
- }),
11128
- view === "main" && /* @__PURE__ */ jsxs6(Box8, {
11125
+ }, undefined, false, undefined, this),
11126
+ view === "main" && /* @__PURE__ */ jsxDEV7(Box8, {
11129
11127
  flexDirection: "column",
11130
11128
  children: [
11131
- /* @__PURE__ */ jsx7(Box8, {
11129
+ /* @__PURE__ */ jsxDEV7(Box8, {
11132
11130
  marginBottom: 1,
11133
- children: /* @__PURE__ */ jsx7(Text10, {
11131
+ children: /* @__PURE__ */ jsxDEV7(Text10, {
11134
11132
  children: "What would you like to do?"
11135
- })
11136
- }),
11137
- /* @__PURE__ */ jsx7(SelectInput_default, {
11133
+ }, undefined, false, undefined, this)
11134
+ }, undefined, false, undefined, this),
11135
+ /* @__PURE__ */ jsxDEV7(SelectInput_default, {
11138
11136
  items: mainMenuItems,
11139
11137
  onSelect: handleMainSelect
11140
- }),
11141
- /* @__PURE__ */ jsx7(Box8, {
11138
+ }, undefined, false, undefined, this),
11139
+ /* @__PURE__ */ jsxDEV7(Box8, {
11142
11140
  marginTop: 1,
11143
- children: /* @__PURE__ */ jsx7(Text10, {
11141
+ children: /* @__PURE__ */ jsxDEV7(Text10, {
11144
11142
  dimColor: true,
11145
11143
  children: "Press q to quit"
11146
- })
11147
- })
11144
+ }, undefined, false, undefined, this)
11145
+ }, undefined, false, undefined, this)
11148
11146
  ]
11149
- }),
11150
- view === "browse" && !category && /* @__PURE__ */ jsx7(CategorySelect, {
11147
+ }, undefined, true, undefined, this),
11148
+ view === "browse" && !category && /* @__PURE__ */ jsxDEV7(CategorySelect, {
11151
11149
  onSelect: (cat) => {
11152
11150
  setCategory(cat);
11153
11151
  setView("hooks");
11154
11152
  },
11155
11153
  onBack: () => setView("main")
11156
- }),
11157
- view === "hooks" && category && /* @__PURE__ */ jsx7(HookSelect, {
11154
+ }, undefined, false, undefined, this),
11155
+ view === "hooks" && category && /* @__PURE__ */ jsxDEV7(HookSelect, {
11158
11156
  hooks: getHooksByCategory(category),
11159
11157
  selected,
11160
11158
  onToggle: handleToggle,
@@ -11163,57 +11161,57 @@ function App({ initialHooks, overwrite = false }) {
11163
11161
  setCategory(null);
11164
11162
  setView("browse");
11165
11163
  }
11166
- }),
11167
- view === "search" && /* @__PURE__ */ jsx7(SearchView, {
11164
+ }, undefined, false, undefined, this),
11165
+ view === "search" && /* @__PURE__ */ jsxDEV7(SearchView, {
11168
11166
  selected,
11169
11167
  onToggle: handleToggle,
11170
11168
  onConfirm: handleConfirm,
11171
11169
  onBack: () => setView("main")
11172
- }),
11173
- view === "installing" && /* @__PURE__ */ jsx7(InstallProgress, {
11170
+ }, undefined, false, undefined, this),
11171
+ view === "installing" && /* @__PURE__ */ jsxDEV7(InstallProgress, {
11174
11172
  hooks: Array.from(selected),
11175
11173
  overwrite,
11176
11174
  onComplete: handleComplete
11177
- }),
11178
- view === "done" && /* @__PURE__ */ jsxs6(Box8, {
11175
+ }, undefined, false, undefined, this),
11176
+ view === "done" && /* @__PURE__ */ jsxDEV7(Box8, {
11179
11177
  flexDirection: "column",
11180
11178
  children: [
11181
- /* @__PURE__ */ jsx7(Box8, {
11179
+ /* @__PURE__ */ jsxDEV7(Box8, {
11182
11180
  marginBottom: 1,
11183
- children: /* @__PURE__ */ jsx7(Text10, {
11181
+ children: /* @__PURE__ */ jsxDEV7(Text10, {
11184
11182
  bold: true,
11185
11183
  color: "green",
11186
11184
  children: "Installation complete!"
11187
- })
11188
- }),
11189
- results.filter((r) => r.success).length > 0 && /* @__PURE__ */ jsxs6(Box8, {
11185
+ }, undefined, false, undefined, this)
11186
+ }, undefined, false, undefined, this),
11187
+ results.filter((r) => r.success).length > 0 && /* @__PURE__ */ jsxDEV7(Box8, {
11190
11188
  flexDirection: "column",
11191
11189
  marginBottom: 1,
11192
11190
  children: [
11193
- /* @__PURE__ */ jsx7(Text10, {
11191
+ /* @__PURE__ */ jsxDEV7(Text10, {
11194
11192
  bold: true,
11195
11193
  children: "Installed:"
11196
- }),
11197
- results.filter((r) => r.success).map((r) => /* @__PURE__ */ jsxs6(Text10, {
11194
+ }, undefined, false, undefined, this),
11195
+ results.filter((r) => r.success).map((r) => /* @__PURE__ */ jsxDEV7(Text10, {
11198
11196
  color: "green",
11199
11197
  children: [
11200
11198
  "\u2713",
11201
11199
  " ",
11202
11200
  r.hook
11203
11201
  ]
11204
- }, r.hook))
11202
+ }, r.hook, true, undefined, this))
11205
11203
  ]
11206
- }),
11207
- results.filter((r) => !r.success).length > 0 && /* @__PURE__ */ jsxs6(Box8, {
11204
+ }, undefined, true, undefined, this),
11205
+ results.filter((r) => !r.success).length > 0 && /* @__PURE__ */ jsxDEV7(Box8, {
11208
11206
  flexDirection: "column",
11209
11207
  marginBottom: 1,
11210
11208
  children: [
11211
- /* @__PURE__ */ jsx7(Text10, {
11209
+ /* @__PURE__ */ jsxDEV7(Text10, {
11212
11210
  bold: true,
11213
11211
  color: "red",
11214
11212
  children: "Failed:"
11215
- }),
11216
- results.filter((r) => !r.success).map((r) => /* @__PURE__ */ jsxs6(Text10, {
11213
+ }, undefined, false, undefined, this),
11214
+ results.filter((r) => !r.success).map((r) => /* @__PURE__ */ jsxDEV7(Text10, {
11217
11215
  color: "red",
11218
11216
  children: [
11219
11217
  "\u2717",
@@ -11222,61 +11220,61 @@ function App({ initialHooks, overwrite = false }) {
11222
11220
  ": ",
11223
11221
  r.error
11224
11222
  ]
11225
- }, r.hook))
11223
+ }, r.hook, true, undefined, this))
11226
11224
  ]
11227
- }),
11228
- /* @__PURE__ */ jsxs6(Box8, {
11225
+ }, undefined, true, undefined, this),
11226
+ /* @__PURE__ */ jsxDEV7(Box8, {
11229
11227
  marginTop: 1,
11230
11228
  flexDirection: "column",
11231
11229
  children: [
11232
- /* @__PURE__ */ jsx7(Text10, {
11230
+ /* @__PURE__ */ jsxDEV7(Text10, {
11233
11231
  bold: true,
11234
11232
  children: "What happened:"
11235
- }),
11236
- /* @__PURE__ */ jsx7(Text10, {
11233
+ }, undefined, false, undefined, this),
11234
+ /* @__PURE__ */ jsxDEV7(Text10, {
11237
11235
  children: "1. Hook source copied to .hooks/"
11238
- }),
11239
- /* @__PURE__ */ jsx7(Text10, {
11236
+ }, undefined, false, undefined, this),
11237
+ /* @__PURE__ */ jsxDEV7(Text10, {
11240
11238
  children: "2. Hook registered in ~/.claude/settings.json"
11241
- }),
11242
- /* @__PURE__ */ jsx7(Text10, {
11239
+ }, undefined, false, undefined, this),
11240
+ /* @__PURE__ */ jsxDEV7(Text10, {
11243
11241
  children: "3. Ready to use in Claude Code sessions"
11244
- })
11242
+ }, undefined, false, undefined, this)
11245
11243
  ]
11246
- }),
11247
- /* @__PURE__ */ jsxs6(Box8, {
11244
+ }, undefined, true, undefined, this),
11245
+ /* @__PURE__ */ jsxDEV7(Box8, {
11248
11246
  marginTop: 1,
11249
11247
  flexDirection: "column",
11250
11248
  children: [
11251
- /* @__PURE__ */ jsx7(Text10, {
11249
+ /* @__PURE__ */ jsxDEV7(Text10, {
11252
11250
  bold: true,
11253
11251
  children: "Next steps:"
11254
- }),
11255
- /* @__PURE__ */ jsx7(Text10, {
11252
+ }, undefined, false, undefined, this),
11253
+ /* @__PURE__ */ jsxDEV7(Text10, {
11256
11254
  dimColor: true,
11257
11255
  children: " hooks list --registered Check active hooks"
11258
- }),
11259
- /* @__PURE__ */ jsxs6(Text10, {
11256
+ }, undefined, false, undefined, this),
11257
+ /* @__PURE__ */ jsxDEV7(Text10, {
11260
11258
  dimColor: true,
11261
11259
  children: [
11262
11260
  " hooks info ",
11263
11261
  "<name>",
11264
11262
  " View hook details"
11265
11263
  ]
11266
- })
11264
+ }, undefined, true, undefined, this)
11267
11265
  ]
11268
- }),
11269
- /* @__PURE__ */ jsx7(Box8, {
11266
+ }, undefined, true, undefined, this),
11267
+ /* @__PURE__ */ jsxDEV7(Box8, {
11270
11268
  marginTop: 1,
11271
- children: /* @__PURE__ */ jsx7(Text10, {
11269
+ children: /* @__PURE__ */ jsxDEV7(Text10, {
11272
11270
  dimColor: true,
11273
11271
  children: "Press q to exit"
11274
- })
11275
- })
11272
+ }, undefined, false, undefined, this)
11273
+ }, undefined, false, undefined, this)
11276
11274
  ]
11277
- })
11275
+ }, undefined, true, undefined, this)
11278
11276
  ]
11279
- });
11277
+ }, undefined, true, undefined, this);
11280
11278
  }
11281
11279
 
11282
11280
  // src/cli/index.tsx
@@ -11288,7 +11286,7 @@ init_manifest();
11288
11286
  init_resolve();
11289
11287
  init_store();
11290
11288
  init_semver();
11291
- import { jsx as jsx8 } from "react/jsx-runtime";
11289
+ import { jsxDEV as jsxDEV8 } from "react/jsx-dev-runtime";
11292
11290
  var __dirname4 = dirname8(fileURLToPath5(import.meta.url));
11293
11291
  var pkgPath = existsSync13(join14(__dirname4, "..", "package.json")) ? join14(__dirname4, "..", "package.json") : join14(__dirname4, "..", "..", "package.json");
11294
11292
  var pkg2 = JSON.parse(readFileSync12(pkgPath, "utf-8"));
@@ -11386,7 +11384,7 @@ function suggestHooks(name, max = 3) {
11386
11384
  }
11387
11385
  program2.name("hooks").description("Install hooks for AI coding agents").version(pkg2.version);
11388
11386
  program2.command("interactive", { isDefault: true }).alias("i").description("Interactive hook browser").action(() => {
11389
- render(/* @__PURE__ */ jsx8(App, {}));
11387
+ render(/* @__PURE__ */ jsxDEV8(App, {}, undefined, false, undefined, this));
11390
11388
  });
11391
11389
  program2.command("init").description("Register a new agent profile with a unique ID").option("-a, --agent <type>", "Agent type: claude, gemini, custom", "claude").option("-n, --name <name>", "Optional display name for the agent").option("-j, --json", "Output as JSON", false).option("--cloudflare", "Configure a remote registry (Cloudflare worker)", false).option("--api-url <url>", "Remote registry API URL (with --cloudflare)").option("--api-key <ref>", "Vault key NAME for the registry API key (never the value; with --cloudflare)").action(async (options) => {
11392
11390
  if (options.cloudflare) {
@@ -11589,7 +11587,7 @@ program2.command("install").alias("add").argument("[hooks...]", "Hooks to instal
11589
11587
  toInstall = getHooksByCategory(category).map((h) => h.name);
11590
11588
  }
11591
11589
  if (toInstall.length === 0) {
11592
- render(/* @__PURE__ */ jsx8(App, {}));
11590
+ render(/* @__PURE__ */ jsxDEV8(App, {}, undefined, false, undefined, this));
11593
11591
  return;
11594
11592
  }
11595
11593
  if (options.applyCodewith && (target === "codewith" || target === "all") && !options.codewithConfig) {