109 lines
3.7 KiB
JavaScript
109 lines
3.7 KiB
JavaScript
import {
|
|
ANALYTICS_CAPABILITIES, CANDIDATE_CAPABILITIES, OVERVIEW_CAPABILITIES,
|
|
respondAnalytics, respondCandidates, respondOverview,
|
|
} from './capabilities/employer';
|
|
import {
|
|
ACTIVITY_CAPABILITIES, ADMIN_ANALYTICS_CAPABILITIES, ADMIN_CANDIDATE_CAPABILITIES,
|
|
CANDIDATE_LIST_CAPABILITIES, CONTROL_CENTER_CAPABILITIES, FORGE_CAPABILITIES,
|
|
HIRED_HISTORY_CAPABILITIES, POSITIONS_CAPABILITIES, TALENT_POOL_CAPABILITIES,
|
|
respondActivity, respondAdminAnalytics, respondAdminCandidates, respondCandidateList,
|
|
respondControlCenter, respondForge, respondHiredHistory, respondPositions,
|
|
respondTalentPool,
|
|
} from './capabilities/admin';
|
|
|
|
/**
|
|
* Page contexts for the Owliver dashboard panel.
|
|
*
|
|
* Deliberately thin. What the user sees on the landing screen — the title,
|
|
* greeting, description, placeholders and suggested prompts — is computed from
|
|
* live data in `dynamic.js`, not written here. A context only declares what this
|
|
* page's assistant can *do*: its capabilities and its free-text responder.
|
|
*
|
|
* Krow AI serves Employer and Admin. The talent portal has Owliver, a separate
|
|
* product with its own UI and workflow — nothing here targets it.
|
|
*/
|
|
export const ASSISTANT_CONTEXTS = {
|
|
'employer.overview': {
|
|
id: 'employer.overview',
|
|
page: 'Overview',
|
|
capabilities: OVERVIEW_CAPABILITIES,
|
|
respond: respondOverview,
|
|
},
|
|
'employer.candidates': {
|
|
id: 'employer.candidates',
|
|
page: 'Candidates',
|
|
capabilities: CANDIDATE_CAPABILITIES,
|
|
respond: respondCandidates,
|
|
},
|
|
'employer.analytics': {
|
|
id: 'employer.analytics',
|
|
page: 'Analytics',
|
|
capabilities: ANALYTICS_CAPABILITIES,
|
|
respond: respondAnalytics,
|
|
},
|
|
'admin.controlCenter': {
|
|
id: 'admin.controlCenter',
|
|
page: 'Control Center',
|
|
capabilities: CONTROL_CENTER_CAPABILITIES,
|
|
respond: respondControlCenter,
|
|
},
|
|
'admin.positions': {
|
|
id: 'admin.positions',
|
|
page: 'Positions',
|
|
capabilities: POSITIONS_CAPABILITIES,
|
|
respond: respondPositions,
|
|
},
|
|
/* The Candidates list and Candidates Analysis are separate contexts because they
|
|
ask different questions of the same records: the list is triage — who needs a
|
|
decision — and Analysis reads the pool as a whole. */
|
|
'admin.candidatesList': {
|
|
id: 'admin.candidatesList',
|
|
page: 'Candidates',
|
|
capabilities: CANDIDATE_LIST_CAPABILITIES,
|
|
respond: respondCandidateList,
|
|
},
|
|
'admin.candidates': {
|
|
id: 'admin.candidates',
|
|
page: 'Candidates Analysis',
|
|
capabilities: ADMIN_CANDIDATE_CAPABILITIES,
|
|
respond: respondAdminCandidates,
|
|
},
|
|
/* Analytics reads the same records as the Control Center, but as performance
|
|
over time rather than as a state to act on — hence its own capabilities. */
|
|
'admin.analytics': {
|
|
id: 'admin.analytics',
|
|
page: 'Analytics',
|
|
capabilities: ADMIN_ANALYTICS_CAPABILITIES,
|
|
respond: respondAdminAnalytics,
|
|
},
|
|
/* Forge, Talent Pool and Hired History read the same platform records as the
|
|
contexts above, but ask different questions of them: proof and progression,
|
|
supply and readiness, and outcomes after the hire. */
|
|
'admin.forge': {
|
|
id: 'admin.forge',
|
|
page: 'KROW Forge',
|
|
capabilities: FORGE_CAPABILITIES,
|
|
respond: respondForge,
|
|
},
|
|
'admin.talentPool': {
|
|
id: 'admin.talentPool',
|
|
page: 'Talent Pool',
|
|
capabilities: TALENT_POOL_CAPABILITIES,
|
|
respond: respondTalentPool,
|
|
},
|
|
'admin.hiredHistory': {
|
|
id: 'admin.hiredHistory',
|
|
page: 'Hired History',
|
|
capabilities: HIRED_HISTORY_CAPABILITIES,
|
|
respond: respondHiredHistory,
|
|
},
|
|
'admin.activity': {
|
|
id: 'admin.activity',
|
|
page: 'Activity',
|
|
capabilities: ACTIVITY_CAPABILITIES,
|
|
respond: respondActivity,
|
|
},
|
|
};
|
|
|
|
export const getContext = (id) => ASSISTANT_CONTEXTS[id] ?? null;
|