panopticon-cli 0.4.30 → 0.4.31

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 (41) hide show
  1. package/dist/{agents-ZG4JIPO2.js → agents-GQDAKTEQ.js} +4 -3
  2. package/dist/{chunk-SIAUVHVO.js → chunk-3XAB4IXF.js} +4 -2
  3. package/dist/{chunk-SIAUVHVO.js.map → chunk-3XAB4IXF.js.map} +1 -1
  4. package/dist/chunk-ELK6Q7QI.js +545 -0
  5. package/dist/chunk-ELK6Q7QI.js.map +1 -0
  6. package/dist/{chunk-VH27COUW.js → chunk-HNEWTIR3.js} +37 -5
  7. package/dist/chunk-HNEWTIR3.js.map +1 -0
  8. package/dist/chunk-LYSBSZYV.js +1523 -0
  9. package/dist/chunk-LYSBSZYV.js.map +1 -0
  10. package/dist/{chunk-42O6XJWZ.js → chunk-TMXN7THF.js} +14 -14
  11. package/dist/{chunk-VTMXR7JF.js → chunk-VU4FLXV5.js} +47 -40
  12. package/dist/{chunk-VTMXR7JF.js.map → chunk-VU4FLXV5.js.map} +1 -1
  13. package/dist/cli/index.js +46 -28
  14. package/dist/cli/index.js.map +1 -1
  15. package/dist/{config-QWTS63TU.js → config-BOAMSKTF.js} +4 -2
  16. package/dist/dashboard/public/assets/{index-Dhwz2I7n.js → index-izWbAt7V.js} +65 -65
  17. package/dist/dashboard/public/index.html +1 -1
  18. package/dist/dashboard/server.js +94155 -23826
  19. package/dist/index.js +16 -14
  20. package/dist/index.js.map +1 -1
  21. package/dist/{remote-workspace-FNXLMNBG.js → remote-workspace-2G6V2KNP.js} +7 -5
  22. package/dist/{remote-workspace-FNXLMNBG.js.map → remote-workspace-2G6V2KNP.js.map} +1 -1
  23. package/dist/{specialist-context-QVRSHPYN.js → specialist-context-6SE5VRRC.js} +2 -2
  24. package/dist/{specialist-logs-7TQMHCUN.js → specialist-logs-EXLOQHQ2.js} +2 -2
  25. package/dist/{specialists-UUXB5KFV.js → specialists-BRUHPAXE.js} +2 -2
  26. package/dist/{traefik-7OLLXUD7.js → traefik-CUJM6K5Z.js} +3 -3
  27. package/package.json +3 -2
  28. package/scripts/record-cost-event.js +243 -79
  29. package/scripts/record-cost-event.ts +128 -68
  30. package/dist/chunk-J3J32DIR.js +0 -279
  31. package/dist/chunk-J3J32DIR.js.map +0 -1
  32. package/dist/chunk-SUMIHS2B.js +0 -1714
  33. package/dist/chunk-SUMIHS2B.js.map +0 -1
  34. package/dist/chunk-VH27COUW.js.map +0 -1
  35. /package/dist/{agents-ZG4JIPO2.js.map → agents-GQDAKTEQ.js.map} +0 -0
  36. /package/dist/{chunk-42O6XJWZ.js.map → chunk-TMXN7THF.js.map} +0 -0
  37. /package/dist/{config-QWTS63TU.js.map → config-BOAMSKTF.js.map} +0 -0
  38. /package/dist/{specialist-context-QVRSHPYN.js.map → specialist-context-6SE5VRRC.js.map} +0 -0
  39. /package/dist/{specialist-logs-7TQMHCUN.js.map → specialist-logs-EXLOQHQ2.js.map} +0 -0
  40. /package/dist/{specialists-UUXB5KFV.js.map → specialists-BRUHPAXE.js.map} +0 -0
  41. /package/dist/{traefik-7OLLXUD7.js.map → traefik-CUJM6K5Z.js.map} +0 -0
package/dist/cli/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  cleanupTemplateFiles,
4
4
  generatePanopticonTraefikConfig
5
- } from "../chunk-SIAUVHVO.js";
5
+ } from "../chunk-3XAB4IXF.js";
6
6
  import {
7
7
  checkSpecialistQueue,
8
8
  clearSessionId,
@@ -25,12 +25,11 @@ import {
25
25
  recordWake,
26
26
  wakeSpecialistOrQueue,
27
27
  wakeSpecialistWithTask
28
- } from "../chunk-42O6XJWZ.js";
28
+ } from "../chunk-TMXN7THF.js";
29
29
  import {
30
30
  addAlias,
31
31
  cleanOldBackups,
32
32
  createBackup,
33
- createTracker,
34
33
  detectShell,
35
34
  executeSync,
36
35
  getAliasInstructions,
@@ -40,7 +39,7 @@ import {
40
39
  planSync,
41
40
  restoreBackup,
42
41
  syncHooks
43
- } from "../chunk-SUMIHS2B.js";
42
+ } from "../chunk-ELK6Q7QI.js";
44
43
  import {
45
44
  init_remote_agents,
46
45
  isRemoteAgentRunning,
@@ -57,7 +56,7 @@ import {
57
56
  getAgentState,
58
57
  getHealthThresholdsMs,
59
58
  init_agents,
60
- init_config,
59
+ init_config as init_config2,
61
60
  init_cv,
62
61
  listRunningAgents,
63
62
  loadCloisterConfig,
@@ -68,7 +67,7 @@ import {
68
67
  saveSessionId,
69
68
  spawnAgent,
70
69
  stopAgent
71
- } from "../chunk-VH27COUW.js";
70
+ } from "../chunk-HNEWTIR3.js";
72
71
  import {
73
72
  checkHook,
74
73
  clearHook,
@@ -87,9 +86,10 @@ import {
87
86
  sessionExists
88
87
  } from "../chunk-VIWUCJ4V.js";
89
88
  import {
89
+ createTracker,
90
90
  init_settings,
91
91
  loadSettings
92
- } from "../chunk-J3J32DIR.js";
92
+ } from "../chunk-LYSBSZYV.js";
93
93
  import {
94
94
  init_config_yaml,
95
95
  loadConfig as loadConfig2
@@ -101,12 +101,6 @@ import {
101
101
  loadWorkspaceMetadata,
102
102
  saveWorkspaceMetadata
103
103
  } from "../chunk-44EOY2ZL.js";
104
- import {
105
- getDashboardApiUrl,
106
- getDefaultConfig,
107
- loadConfig,
108
- saveConfig
109
- } from "../chunk-VTMXR7JF.js";
110
104
  import {
111
105
  PROJECTS_CONFIG_FILE,
112
106
  extractTeamPrefix,
@@ -125,6 +119,13 @@ import {
125
119
  createExeProvider,
126
120
  init_exe_provider
127
121
  } from "../chunk-JM6V62LT.js";
122
+ import {
123
+ getDashboardApiUrl,
124
+ getDefaultConfig,
125
+ init_config,
126
+ loadConfig,
127
+ saveConfig
128
+ } from "../chunk-VU4FLXV5.js";
128
129
  import {
129
130
  AGENTS_DIR,
130
131
  CERTS_DIR,
@@ -167,6 +168,7 @@ import chalk56 from "chalk";
167
168
  // src/cli/commands/init.ts
168
169
  init_esm_shims();
169
170
  init_paths();
171
+ init_config();
170
172
  import { existsSync, mkdirSync, readdirSync, cpSync } from "fs";
171
173
  import { join, dirname } from "path";
172
174
  import { fileURLToPath } from "url";
@@ -276,6 +278,7 @@ async function initCommand() {
276
278
 
277
279
  // src/cli/commands/sync.ts
278
280
  init_esm_shims();
281
+ init_config();
279
282
  import chalk2 from "chalk";
280
283
  import ora2 from "ora";
281
284
  import { execSync } from "child_process";
@@ -502,6 +505,7 @@ init_esm_shims();
502
505
  import chalk3 from "chalk";
503
506
  import ora3 from "ora";
504
507
  import inquirer from "inquirer";
508
+ init_config();
505
509
  init_paths();
506
510
  async function restoreCommand(timestamp) {
507
511
  const backups = listBackups();
@@ -869,6 +873,9 @@ function shouldSkipTrackerUpdate(issueId, cliFlag, trackerType = "linear") {
869
873
  });
870
874
  }
871
875
 
876
+ // src/cli/commands/work/issue.ts
877
+ init_config();
878
+
872
879
  // src/lib/remote/index.ts
873
880
  init_esm_shims();
874
881
  init_exe_provider();
@@ -1315,7 +1322,7 @@ async function handleRemoteWorkspace(issueId, options, spinner) {
1315
1322
  if (!remoteMetadata) {
1316
1323
  spinner.text = "Remote workspace not found, creating...";
1317
1324
  try {
1318
- const { createRemoteWorkspace: createRemoteWorkspace2 } = await import("../remote-workspace-FNXLMNBG.js");
1325
+ const { createRemoteWorkspace: createRemoteWorkspace2 } = await import("../remote-workspace-2G6V2KNP.js");
1319
1326
  remoteMetadata = await createRemoteWorkspace2(issueId, { spinner });
1320
1327
  } catch (error) {
1321
1328
  spinner.fail(`Failed to create remote workspace: ${error.message}`);
@@ -2098,7 +2105,7 @@ async function doneCommand(id, options = {}) {
2098
2105
  console.log(chalk12.dim(` pan work approve ${issueId}`));
2099
2106
  console.log("");
2100
2107
  try {
2101
- const { getDashboardApiUrl: getDashboardApiUrl2 } = await import("../config-QWTS63TU.js");
2108
+ const { getDashboardApiUrl: getDashboardApiUrl2 } = await import("../config-BOAMSKTF.js");
2102
2109
  const dashboardUrl = getDashboardApiUrl2();
2103
2110
  const http = await import("http");
2104
2111
  const checkDashboard = () => new Promise((resolve2) => {
@@ -2774,6 +2781,7 @@ async function planCommand(id, options = {}) {
2774
2781
 
2775
2782
  // src/cli/commands/work/list.ts
2776
2783
  init_esm_shims();
2784
+ init_config();
2777
2785
  import chalk14 from "chalk";
2778
2786
  import ora8 from "ora";
2779
2787
  var PRIORITY_LABELS = {
@@ -2942,6 +2950,7 @@ ${tracker.toUpperCase()} (${issues.length} shadowed issues)
2942
2950
 
2943
2951
  // src/cli/commands/work/triage.ts
2944
2952
  init_esm_shims();
2953
+ init_config();
2945
2954
  import chalk15 from "chalk";
2946
2955
  import ora9 from "ora";
2947
2956
  import { readFileSync as readFileSync10, writeFileSync as writeFileSync5, existsSync as existsSync12, mkdirSync as mkdirSync6 } from "fs";
@@ -4315,6 +4324,7 @@ Previous state: ${issue.state}`
4315
4324
 
4316
4325
  // src/cli/commands/work/request-review.ts
4317
4326
  init_esm_shims();
4327
+ init_config();
4318
4328
  import chalk22 from "chalk";
4319
4329
  var DASHBOARD_URL = getDashboardApiUrl();
4320
4330
  async function requestReviewCommand(id, options) {
@@ -5717,6 +5727,7 @@ async function removeWorkspace(options) {
5717
5727
  }
5718
5728
 
5719
5729
  // src/cli/commands/workspace.ts
5730
+ init_config();
5720
5731
  import { exec as exec5 } from "child_process";
5721
5732
  import { promisify as promisify5 } from "util";
5722
5733
  import { homedir as homedir12 } from "os";
@@ -7008,6 +7019,7 @@ ${config2.name || key}`));
7008
7019
  // src/cli/commands/install.ts
7009
7020
  init_esm_shims();
7010
7021
  init_paths();
7022
+ init_config();
7011
7023
  import chalk30 from "chalk";
7012
7024
  import ora17 from "ora";
7013
7025
  import inquirer5 from "inquirer";
@@ -7471,11 +7483,11 @@ import chalk31 from "chalk";
7471
7483
 
7472
7484
  // src/lib/cloister/service.ts
7473
7485
  init_esm_shims();
7474
- init_config();
7486
+ init_config2();
7475
7487
 
7476
7488
  // src/lib/cloister/health.ts
7477
7489
  init_esm_shims();
7478
- init_config();
7490
+ init_config2();
7479
7491
  function evaluateHealthState(timeSinceActivityMs, thresholds) {
7480
7492
  if (timeSinceActivityMs < thresholds.stale) {
7481
7493
  return "active";
@@ -8044,7 +8056,7 @@ init_agents();
8044
8056
 
8045
8057
  // src/lib/cloister/triggers.ts
8046
8058
  init_esm_shims();
8047
- init_config();
8059
+ init_config2();
8048
8060
  import { existsSync as existsSync27 } from "fs";
8049
8061
  import { join as join26 } from "path";
8050
8062
  import { exec as exec7 } from "child_process";
@@ -8792,7 +8804,7 @@ function clearOldViolations(hoursOld = 24) {
8792
8804
  // src/lib/cloister/cost-monitor.ts
8793
8805
  init_esm_shims();
8794
8806
  init_paths();
8795
- init_config();
8807
+ init_config2();
8796
8808
  import { readFileSync as readFileSync26, existsSync as existsSync32, writeFileSync as writeFileSync18, mkdirSync as mkdirSync21, unlinkSync as unlinkSync3 } from "fs";
8797
8809
  import { join as join31, dirname as dirname10 } from "path";
8798
8810
  var COST_DATA_FILE = join31(PANOPTICON_HOME, "cost-data.json");
@@ -9145,7 +9157,7 @@ async function checkAndRotateIfNeeded(specialistName, workingDir) {
9145
9157
  // src/lib/cloister/deacon.ts
9146
9158
  init_esm_shims();
9147
9159
  init_paths();
9148
- init_config();
9160
+ init_config2();
9149
9161
  init_specialists();
9150
9162
  init_agents();
9151
9163
  init_tmux();
@@ -9746,7 +9758,7 @@ async function runPatrol() {
9746
9758
  if (nextTask) {
9747
9759
  console.log(`[deacon] Auto-resuming suspended ${specialist.name} for queued task: ${nextTask.payload.issueId}`);
9748
9760
  try {
9749
- const { resumeAgent } = await import("../agents-ZG4JIPO2.js");
9761
+ const { resumeAgent } = await import("../agents-GQDAKTEQ.js");
9750
9762
  const message = `# Queued Work
9751
9763
 
9752
9764
  Processing queued task: ${nextTask.payload.issueId}`;
@@ -11571,7 +11583,7 @@ import { promisify as promisify12 } from "util";
11571
11583
  var execAsync12 = promisify12(exec12);
11572
11584
  async function listLogsCommand(project2, type, options) {
11573
11585
  try {
11574
- const { listRunLogs } = await import("../specialist-logs-7TQMHCUN.js");
11586
+ const { listRunLogs } = await import("../specialist-logs-EXLOQHQ2.js");
11575
11587
  const limit = options.limit ? parseInt(options.limit) : 10;
11576
11588
  const runs = listRunLogs(project2, type, { limit });
11577
11589
  if (options.json) {
@@ -11616,7 +11628,7 @@ View a specific run: pan specialists logs ${project2} ${type} <runId>
11616
11628
  }
11617
11629
  async function viewLogCommand(project2, type, runId, options) {
11618
11630
  try {
11619
- const { getRunLog, parseLogMetadata, getRunLogPath } = await import("../specialist-logs-7TQMHCUN.js");
11631
+ const { getRunLog, parseLogMetadata, getRunLogPath } = await import("../specialist-logs-EXLOQHQ2.js");
11620
11632
  const content = getRunLog(project2, type, runId);
11621
11633
  if (!content) {
11622
11634
  console.error(`\u274C Run log not found: ${runId}`);
@@ -11640,8 +11652,8 @@ async function viewLogCommand(project2, type, runId, options) {
11640
11652
  }
11641
11653
  async function tailLogCommand(project2, type) {
11642
11654
  try {
11643
- const { getRunLogPath } = await import("../specialist-logs-7TQMHCUN.js");
11644
- const { getProjectSpecialistMetadata } = await import("../specialists-UUXB5KFV.js");
11655
+ const { getRunLogPath } = await import("../specialist-logs-EXLOQHQ2.js");
11656
+ const { getProjectSpecialistMetadata } = await import("../specialists-BRUHPAXE.js");
11645
11657
  const metadata = getProjectSpecialistMetadata(project2, type);
11646
11658
  if (!metadata.currentRun) {
11647
11659
  console.error(`\u274C No active run for ${project2}/${type}`);
@@ -11710,7 +11722,7 @@ async function cleanupLogsCommand(projectOrAll, type, options) {
11710
11722
  console.log(" Use --force to confirm.");
11711
11723
  process.exit(1);
11712
11724
  }
11713
- const { cleanupAllLogs } = await import("../specialist-logs-7TQMHCUN.js");
11725
+ const { cleanupAllLogs } = await import("../specialist-logs-EXLOQHQ2.js");
11714
11726
  console.log("\u{1F9F9} Cleaning up old logs for all projects...\n");
11715
11727
  const results = cleanupAllLogs();
11716
11728
  console.log(`
@@ -11737,7 +11749,7 @@ async function cleanupLogsCommand(projectOrAll, type, options) {
11737
11749
  console.log(" Use --force to confirm.");
11738
11750
  process.exit(1);
11739
11751
  }
11740
- const { cleanupOldLogs } = await import("../specialist-logs-7TQMHCUN.js");
11752
+ const { cleanupOldLogs } = await import("../specialist-logs-EXLOQHQ2.js");
11741
11753
  const { getSpecialistRetention } = await import("../projects-VXRUCMLM.js");
11742
11754
  const retention = getSpecialistRetention(projectOrAll);
11743
11755
  console.log(`\u{1F9F9} Cleaning up old logs for ${projectOrAll}/${type}...`);
@@ -12859,6 +12871,7 @@ async function doctorCommand() {
12859
12871
 
12860
12872
  // src/cli/commands/update.ts
12861
12873
  init_esm_shims();
12874
+ init_config();
12862
12875
  import { execSync as execSync9 } from "child_process";
12863
12876
  import chalk47 from "chalk";
12864
12877
  import { readFileSync as readFileSync37 } from "fs";
@@ -13859,6 +13872,7 @@ init_esm_shims();
13859
13872
 
13860
13873
  // src/cli/commands/remote/status.ts
13861
13874
  init_esm_shims();
13875
+ init_config();
13862
13876
  import chalk51 from "chalk";
13863
13877
  import ora23 from "ora";
13864
13878
  async function statusCommand5(options) {
@@ -13938,6 +13952,7 @@ async function statusCommand5(options) {
13938
13952
 
13939
13953
  // src/cli/commands/remote/init.ts
13940
13954
  init_esm_shims();
13955
+ init_config();
13941
13956
  import chalk52 from "chalk";
13942
13957
  import ora24 from "ora";
13943
13958
  async function initCommand2(options) {
@@ -14099,6 +14114,7 @@ COMPOSE_EOF`);
14099
14114
 
14100
14115
  // src/cli/commands/remote/resources.ts
14101
14116
  init_esm_shims();
14117
+ init_config();
14102
14118
  import chalk53 from "chalk";
14103
14119
  import ora25 from "ora";
14104
14120
  async function resourcesCommand(options) {
@@ -14227,6 +14243,7 @@ async function resourcesCommand(options) {
14227
14243
 
14228
14244
  // src/cli/commands/remote/setup.ts
14229
14245
  init_esm_shims();
14246
+ init_config();
14230
14247
  import chalk54 from "chalk";
14231
14248
  import ora26 from "ora";
14232
14249
  import { exec as exec16 } from "child_process";
@@ -14377,6 +14394,7 @@ function registerRemoteCommands(program2) {
14377
14394
 
14378
14395
  // src/cli/commands/config.ts
14379
14396
  init_esm_shims();
14397
+ init_config();
14380
14398
  import chalk55 from "chalk";
14381
14399
 
14382
14400
  // src/lib/env-loader.ts
@@ -14549,7 +14567,7 @@ program.command("up").description("Start dashboard (and Traefik if enabled)").op
14549
14567
  console.log(chalk56.bold("Starting Panopticon...\n"));
14550
14568
  if (traefikEnabled && !options.skipTraefik) {
14551
14569
  try {
14552
- const { generatePanopticonTraefikConfig: generatePanopticonTraefikConfig2 } = await import("../traefik-7OLLXUD7.js");
14570
+ const { generatePanopticonTraefikConfig: generatePanopticonTraefikConfig2 } = await import("../traefik-CUJM6K5Z.js");
14553
14571
  if (generatePanopticonTraefikConfig2()) {
14554
14572
  console.log(chalk56.dim(" Regenerated Traefik config from template"));
14555
14573
  }