gipity 1.0.425 → 1.0.427

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.
@@ -6,6 +6,7 @@ import { getAuth, sessionExpired } from '../auth.js';
6
6
  import { getConfig, liveUrl } from '../config.js';
7
7
  import { brand, success, warning, muted, error as clrError } from '../colors.js';
8
8
  import { GIPITY_PLUGIN_ID, GIPITY_MARKETPLACE_NAME, setupClaudeHooks, ensureGipityPlugin, ensureGipityPluginInstalled, userScopeInstallState } from '../setup.js';
9
+ import { flushBugQueue } from '../bug-queue.js';
9
10
  /** Hooks ship in the Gipity Claude Code plugin now. "Installed" means three
10
11
  * things must all hold: the user-scope settings register the marketplace and
11
12
  * enable the plugin (declarative), AND Claude Code actually has a user-scope
@@ -37,7 +38,11 @@ function checkGipityPlugin() {
37
38
  const stale = missing.length === 1 && missing[0] === 'install' && install.exists;
38
39
  return { missing, ok: missing.length === 0, stale };
39
40
  }
41
+ // `whoami` is the name agents reach for first when they want the signed-in
42
+ // identity (it's the unix spelling), and this is the command that prints it.
43
+ // Aliasing costs one line and turns a guess into a hit.
40
44
  export const statusCommand = new Command('status')
45
+ .alias('whoami')
41
46
  .description('Show project and login status')
42
47
  .option('--json', 'Output as JSON')
43
48
  .option('--repair-hooks', 'Re-enable the Gipity Claude Code plugin (hooks) if missing or disabled')
@@ -47,6 +52,12 @@ export const statusCommand = new Command('status')
47
52
  const cwd = resolve(process.cwd());
48
53
  void cwd;
49
54
  const hookCheck = config ? checkGipityPlugin() : null;
55
+ // `status` is the command an agent reaches for to confirm "are we back?"
56
+ // after an outage/session-expiry - a valid, unexpired session here is the
57
+ // clearest signal we have that any bug reports stranded by that outage can
58
+ // now go out. Skipped entirely (existsSync short-circuit) when the queue
59
+ // is empty, which is the common case, so this stays a no-op most runs.
60
+ const queueDelivered = (auth && !sessionExpired()) ? await flushBugQueue().catch(() => 0) : 0;
50
61
  if (opts.json) {
51
62
  console.log(JSON.stringify({
52
63
  project: config ? {
@@ -86,6 +97,9 @@ export const statusCommand = new Command('status')
86
97
  else {
87
98
  console.log(`${muted('Auth:')} ${success(auth.email)}`);
88
99
  }
100
+ if (queueDelivered > 0) {
101
+ console.log(`${muted('Bug queue:')} ${success(`delivered ${queueDelivered} queued bug report${queueDelivered === 1 ? '' : 's'}`)}`);
102
+ }
89
103
  if (hookCheck) {
90
104
  if (hookCheck.ok) {
91
105
  console.log(`${muted('Hooks:')} ${success(`Gipity plugin enabled (${GIPITY_PLUGIN_ID})`)}`);
@@ -40,7 +40,9 @@ function printStepRuns(steps, emptyNote) {
40
40
  for (const s of steps) {
41
41
  const statusColor = s.status === 'completed' ? success : s.status === 'failed' ? clrError : muted;
42
42
  const model = s.model_used ? ` ${muted(`[${s.model_used}]`)}` : '';
43
- console.log(` ${s.step_order}. ${statusColor(s.status)} ${s.tokens_used ?? 0} tokens${model}`);
43
+ // Name the step: "2. failed" alone doesn't say which one.
44
+ const name = s.step_name ? `${bold(s.step_name)} ` : '';
45
+ console.log(` ${s.step_order}. ${name}${statusColor(s.status)} ${s.tokens_used ?? 0} tokens${model}`);
44
46
  if (s.error_message)
45
47
  console.log(` ${clrError(s.error_message)}`);
46
48
  if (s.output_json !== null && s.output_json !== undefined) {