mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-14 02:15:36 +00:00
feat(auth,commands): instrument oauth handler, profile registry, and doctor pipeline
Emit auth-stage events around OAuth round-trips and profile lookups so auth flows are traceable end-to-end. Doctor command emits dispatch stages around each health-check phase for clearer diagnostic logs. Refs #1141, #1138
This commit is contained in:
1 parent
4700727915
commit
bf8759460d
3 files changed
+66
No files matched your search
@@ -9,6 +9,9 @@ import {
|
||||
import type { AccountConfig } from '../config/unified-config-types';
|
||||
import { getCcsDir } from '../utils/config-manager';
|
||||
import { isValidContextGroupName, normalizeContextGroupName } from './account-context';
|
||||
import { createLogger } from '../services/logging';
|
||||
|
||||
const logger = createLogger('auth:profile-registry');
|
||||
|
||||
/**
|
||||
* Profile Registry (Simplified)
|
||||
@@ -182,6 +185,10 @@ export class ProfileRegistry {
|
||||
// Default always stays on implicit 'default' profile (uses ~/.claude/)
|
||||
|
||||
this._write(data);
|
||||
logger.stage('route', 'auth.profile.created', 'Profile created in registry', {
|
||||
profile: name,
|
||||
profileType: metadata.type || 'account',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -235,6 +242,9 @@ export class ProfileRegistry {
|
||||
}
|
||||
|
||||
this._write(data);
|
||||
logger.stage('cleanup', 'auth.profile.deleted', 'Profile deleted from registry', {
|
||||
profile: name,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user