@hive-org/cli
Advanced tools
@@ -21,11 +21,11 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime"; | ||
| const headerFill = Math.max(0, boxWidth - nameDisplay.length - connectedDisplay.length - 12 - statsText.length); | ||
| return (_jsxs(Box, { flexDirection: "column", width: boxWidth, children: [_jsx(AsciiTicker, { rows: 2, step: predictionCount }), _jsxs(Box, { children: [_jsx(Text, { color: colors.honey, children: `${border.topLeft}${border.horizontal} ${symbols.hive} ` }), _jsxs(Text, { color: "white", bold: true, children: [agentName, " agent"] }), _jsxs(Text, { color: "gray", children: [" ", `${border.horizontal.repeat(3)} `] }), _jsx(Text, { color: connected ? 'green' : 'yellow', children: connected ? 'Connected to the Hive' : 'connecting...' }), statsText && _jsxs(Text, { color: "gray", children: [" ", `${border.horizontal.repeat(3)} `] }), statsText && _jsxs(Text, { color: colors.honey, children: [predictionCount, " predicted"] }), _jsxs(Text, { color: "gray", children: [' ', border.horizontal.repeat(Math.max(0, headerFill)), border.topRight] })] }), _jsxs(Box, { flexDirection: "column", paddingLeft: 1, paddingRight: 1, minHeight: 8, maxHeight: 24, children: [!connected && _jsx(Spinner, { label: "Initiating neural link..." }), visiblePollActivity.map((item, i) => { | ||
| return (_jsxs(Box, { flexDirection: "column", width: boxWidth, children: [_jsx(AsciiTicker, { rows: 2, step: predictionCount }), _jsxs(Box, { children: [_jsx(Text, { color: colors.honey, children: `${border.topLeft}${border.horizontal} ${symbols.hive} ` }), _jsxs(Text, { color: colors.white, bold: true, children: [agentName, " agent"] }), _jsxs(Text, { color: colors.gray, children: [" ", `${border.horizontal.repeat(3)} `] }), _jsx(Text, { color: connected ? colors.green : colors.honey, children: connected ? 'Connected to the Hive' : 'connecting...' }), statsText && _jsxs(Text, { color: colors.gray, children: [" ", `${border.horizontal.repeat(3)} `] }), statsText && _jsxs(Text, { color: colors.honey, children: [predictionCount, " predicted"] }), _jsxs(Text, { color: colors.gray, children: [' ', border.horizontal.repeat(Math.max(0, headerFill)), border.topRight] })] }), _jsxs(Box, { flexDirection: "column", paddingLeft: 1, paddingRight: 1, minHeight: 8, maxHeight: 24, children: [!connected && _jsx(Spinner, { label: "Initiating neural link..." }), visiblePollActivity.map((item, i) => { | ||
| const isNewest = i === visiblePollActivity.length - 1 && item.status !== 'analyzing'; | ||
| const isMega = item.type === 'megathread'; | ||
| const accentColor = isMega ? 'magenta' : 'cyan'; | ||
| return (_jsxs(Box, { flexDirection: "column", children: [item.type === 'online' && (_jsxs(Box, { children: [_jsxs(Text, { color: "gray", dimColor: true, children: [formatTime(item.timestamp), ' '] }), _jsxs(Text, { color: colors.honey, children: [symbols.hive, " "] }), _jsx(PollText, { color: "white", text: item.text, animate: isNewest })] })), (item.type === 'signal' || item.type === 'megathread') && (_jsxs(_Fragment, { children: [_jsxs(Box, { children: [_jsxs(Text, { color: "gray", dimColor: true, children: [formatTime(item.timestamp), ' '] }), _jsxs(Text, { color: isMega ? 'magenta' : colors.honey, children: [symbols.hive, " "] }), _jsx(PollText, { color: accentColor, text: item.text, animate: isNewest }), item.status === 'analyzing' && (_jsx(Text, { children: " " })), item.status === 'analyzing' && (_jsx(Spinner, { label: "analyzing..." })), item.status === 'skipped' && (_jsxs(Text, { color: "yellow", children: [" ", symbols.diamondOpen, " skipped"] }))] }), item.status === 'analyzing' && item.detail && (_jsx(Box, { marginLeft: 13, children: _jsx(PollText, { color: "gray", text: `"${item.detail}"`, animate: false }) })), item.status === 'posted' && item.result && (_jsxs(Box, { marginLeft: 13, children: [_jsxs(Text, { color: isMega ? 'magenta' : convictionColor(item.conviction ?? 0), children: [symbols.diamond, ' '] }), _jsx(PollText, { color: "white", text: item.result, animate: isNewest })] })), item.status === 'error' && item.result && (_jsx(Box, { marginLeft: 13, children: _jsx(PollText, { color: "red", text: `${symbols.cross} ${item.result}`, animate: isNewest }) }))] })), item.type === 'idle' && (_jsxs(Box, { children: [_jsxs(Text, { color: "gray", dimColor: true, children: [formatTime(item.timestamp), ' '] }), _jsx(PollText, { color: "gray", text: `${symbols.circle} ${item.text}`, animate: isNewest })] })), item.type === 'error' && (_jsxs(Box, { children: [_jsxs(Text, { color: "gray", dimColor: true, children: [formatTime(item.timestamp), ' '] }), _jsx(PollText, { color: "red", text: `${symbols.cross} ${item.text}`, animate: isNewest })] }))] }, i)); | ||
| })] }), (chatActivity.length > 0 || chatStreaming) && (_jsxs(_Fragment, { children: [_jsx(Box, { children: _jsxs(Text, { color: "gray", children: [border.teeLeft, `${border.horizontal.repeat(2)} chat with ${agentName} agent `, border.horizontal.repeat(Math.max(0, boxWidth - agentName.length - 22)), border.teeRight] }) }), _jsxs(Box, { flexDirection: "column", paddingLeft: 1, paddingRight: 1, minHeight: 2, maxHeight: 8, children: [visibleChatActivity.map((item, i) => (_jsxs(Box, { children: [item.type === 'chat-user' && (_jsxs(Box, { children: [_jsxs(Text, { color: "white", bold: true, children: ["you:", ' '] }), _jsx(Text, { color: "white", children: item.text })] })), item.type === 'chat-agent' && (_jsxs(Box, { children: [_jsxs(Text, { color: colors.honey, bold: true, children: [agentName, " agent:", ' '] }), _jsx(Text, { color: "white", wrap: "wrap", children: item.text })] })), item.type === 'chat-error' && (_jsx(Box, { children: _jsxs(Text, { color: "red", children: [symbols.cross, " ", item.text] }) }))] }, i))), chatStreaming && chatBuffer && (_jsxs(Box, { children: [_jsxs(Text, { color: colors.honey, bold: true, children: [agentName, " agent:", ' '] }), _jsx(Text, { color: "white", wrap: "wrap", children: chatBuffer })] }))] })] })), _jsx(Box, { children: _jsxs(Text, { color: "gray", children: [isInteractive ? border.teeLeft : border.bottomLeft, border.horizontal.repeat(boxWidth - 2), isInteractive ? border.teeRight : border.bottomRight] }) }), isInteractive && (_jsxs(_Fragment, { children: [_jsx(Box, { paddingLeft: 1, children: _jsx(CommandInput, { value: input, onChange: setInput, onSubmit: (val) => { | ||
| const accentColor = isMega ? colors.controversial : colors.cyan; | ||
| return (_jsxs(Box, { flexDirection: "column", children: [item.type === 'online' && (_jsxs(Box, { children: [_jsxs(Text, { color: colors.gray, dimColor: true, children: [formatTime(item.timestamp), ' '] }), _jsxs(Text, { color: colors.honey, children: [symbols.hive, " "] }), _jsx(PollText, { color: colors.white, text: item.text, animate: isNewest })] })), (item.type === 'signal' || item.type === 'megathread') && (_jsxs(_Fragment, { children: [_jsxs(Box, { children: [_jsxs(Text, { color: colors.gray, dimColor: true, children: [formatTime(item.timestamp), ' '] }), _jsxs(Text, { color: isMega ? colors.controversial : colors.honey, children: [symbols.hive, " "] }), _jsx(PollText, { color: accentColor, text: item.text, animate: isNewest }), item.status === 'analyzing' && (_jsx(Text, { children: " " })), item.status === 'analyzing' && (_jsx(Spinner, { label: "analyzing..." })), item.status === 'skipped' && (_jsxs(Text, { color: colors.honey, children: [" ", symbols.diamondOpen, " skipped"] }))] }), item.status === 'analyzing' && item.detail && (_jsx(Box, { marginLeft: 13, children: _jsx(PollText, { color: colors.gray, text: `"${item.detail}"`, animate: false }) })), item.status === 'posted' && item.result && (_jsxs(Box, { marginLeft: 13, children: [_jsxs(Text, { color: isMega ? colors.controversial : convictionColor(item.conviction ?? 0), children: [symbols.diamond, ' '] }), _jsx(PollText, { color: colors.white, text: item.result, animate: isNewest })] })), item.status === 'error' && item.result && (_jsx(Box, { marginLeft: 13, children: _jsx(PollText, { color: colors.red, text: `${symbols.cross} ${item.result}`, animate: isNewest }) }))] })), item.type === 'idle' && (_jsxs(Box, { children: [_jsxs(Text, { color: colors.gray, dimColor: true, children: [formatTime(item.timestamp), ' '] }), _jsx(PollText, { color: colors.gray, text: `${symbols.circle} ${item.text}`, animate: isNewest })] })), item.type === 'error' && (_jsxs(Box, { children: [_jsxs(Text, { color: colors.gray, dimColor: true, children: [formatTime(item.timestamp), ' '] }), _jsx(PollText, { color: colors.red, text: `${symbols.cross} ${item.text}`, animate: isNewest })] }))] }, i)); | ||
| })] }), (chatActivity.length > 0 || chatStreaming) && (_jsxs(_Fragment, { children: [_jsx(Box, { children: _jsxs(Text, { color: colors.gray, children: [border.teeLeft, `${border.horizontal.repeat(2)} chat with ${agentName} agent `, border.horizontal.repeat(Math.max(0, boxWidth - agentName.length - 22)), border.teeRight] }) }), _jsxs(Box, { flexDirection: "column", paddingLeft: 1, paddingRight: 1, minHeight: 2, maxHeight: 8, children: [visibleChatActivity.map((item, i) => (_jsxs(Box, { children: [item.type === 'chat-user' && (_jsxs(Box, { children: [_jsxs(Text, { color: colors.white, bold: true, children: ["you:", ' '] }), _jsx(Text, { color: colors.white, children: item.text })] })), item.type === 'chat-agent' && (_jsxs(Box, { children: [_jsxs(Text, { color: colors.honey, bold: true, children: [agentName, " agent:", ' '] }), _jsx(Text, { color: colors.white, wrap: "wrap", children: item.text })] })), item.type === 'chat-error' && (_jsx(Box, { children: _jsxs(Text, { color: colors.red, children: [symbols.cross, " ", item.text] }) }))] }, i))), chatStreaming && chatBuffer && (_jsxs(Box, { children: [_jsxs(Text, { color: colors.honey, bold: true, children: [agentName, " agent:", ' '] }), _jsx(Text, { color: colors.white, wrap: "wrap", children: chatBuffer })] }))] })] })), _jsx(Box, { children: _jsxs(Text, { color: colors.gray, children: [isInteractive ? border.teeLeft : border.bottomLeft, border.horizontal.repeat(boxWidth - 2), isInteractive ? border.teeRight : border.bottomRight] }) }), isInteractive && (_jsxs(_Fragment, { children: [_jsx(Box, { paddingLeft: 1, children: _jsx(CommandInput, { value: input, onChange: setInput, onSubmit: (val) => { | ||
| setInput(''); | ||
| void handleChatSubmit(val); | ||
| }, placeholder: chatStreaming ? 'thinking...' : `chat with ${agentName} agent...` }) }), _jsx(Box, { children: _jsxs(Text, { color: "gray", children: [border.bottomLeft, border.horizontal.repeat(boxWidth - 2), border.bottomRight] }) })] }))] })); | ||
| }, placeholder: chatStreaming ? 'thinking...' : `chat with ${agentName} agent...` }) }), _jsx(Box, { children: _jsxs(Text, { color: colors.gray, children: [border.bottomLeft, border.horizontal.repeat(boxWidth - 2), border.bottomRight] }) })] }))] })); | ||
| } |
@@ -16,3 +16,3 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; | ||
| }, []); | ||
| return (_jsxs(Text, { children: [_jsx(Text, { color: colors.honey, children: SPINNER_FRAMES[frame] }), _jsxs(Text, { color: "gray", children: [" ", label] })] })); | ||
| return (_jsxs(Text, { children: [_jsx(Text, { color: colors.honey, children: SPINNER_FRAMES[frame] }), _jsxs(Text, { color: colors.gray, children: [" ", label] })] })); | ||
| } | ||
@@ -19,0 +19,0 @@ export function TypewriterText({ text, color, speed = 25, }) { |
@@ -118,3 +118,3 @@ import { streamText, stepCountIs } from 'ai'; | ||
| predictionProfile: config.predictionProfile, | ||
| pollIntervalMs: 5000, | ||
| pollIntervalMs: 30_000, | ||
| pollLimit: 20, | ||
@@ -121,0 +121,0 @@ onPollEmpty: addIdleActivity, |
| const PROVIDERS = [ | ||
| { | ||
| envVar: 'ANTHROPIC_API_KEY', | ||
| defaultModel: 'claude-sonnet-4-5', | ||
| defaultModel: 'claude-haiku-4-5', | ||
| load: async (modelId) => { | ||
@@ -6,0 +6,0 @@ const { anthropic } = await import('@ai-sdk/anthropic'); |
@@ -32,3 +32,3 @@ import { HiveAgent } from '@hive-org/sdk'; | ||
| predictionProfile: config.predictionProfile, | ||
| pollIntervalMs: 5000, | ||
| pollIntervalMs: 30_000, | ||
| pollLimit: 20, | ||
@@ -35,0 +35,0 @@ onPollEmpty: () => { |
| export const colors = { | ||
| honey: '#F5A623', | ||
| honeyDark: '#D4891A', | ||
| honeyBright: '#FFD700', | ||
| white: '#FFFFFF', | ||
| gray: '#888888', | ||
| gray: '#A6A6A6', | ||
| grayDim: '#555555', | ||
| green: '#4CAF50', | ||
| red: '#F44336', | ||
| cyan: '#00BCD4', | ||
| green: '#27C587', | ||
| red: '#E14B4B', | ||
| wax: '#C45C5C', | ||
| cyan: '#22D3EE', | ||
| hot: '#FB923C', | ||
| controversial: '#C084FC', | ||
| }; | ||
@@ -11,0 +15,0 @@ export const symbols = { |
@@ -13,3 +13,3 @@ import { streamText } from 'ai'; | ||
| case 'anthropic': | ||
| return createAnthropic({ apiKey })('claude-sonnet-4-5'); | ||
| return createAnthropic({ apiKey })('claude-haiku-4-5'); | ||
| case 'google': | ||
@@ -16,0 +16,0 @@ return createGoogleGenerativeAI({ apiKey })('gemini-2.0-flash'); |
@@ -10,6 +10,6 @@ import chalk from 'chalk'; | ||
| const HONEY = '#F5A623'; | ||
| const GREEN = '#4CAF50'; | ||
| const GREEN = '#27C587'; | ||
| const DIM = '#555555'; | ||
| const WHITE = '#FFFFFF'; | ||
| const RED = '#F44336'; | ||
| const RED = '#E14B4B'; | ||
| const SCRAMBLE_CHARS = '⬡⬢◆◇░▒!@#$%01'; | ||
@@ -16,0 +16,0 @@ const BOOT_MESSAGES = [ |
@@ -77,4 +77,4 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; | ||
| const confidenceText = s !== null ? s.confidence.toFixed(2) : '-'; | ||
| return (_jsxs(Box, { children: [_jsx(Text, { color: colors.honey, children: v }), _jsx(Text, { color: colors.white, children: cell(row.info.name, nameW) }), _jsx(Text, { color: colors.honey, children: v }), _jsx(Text, { color: colors.honey, children: cell(honeyText, honeyW) }), _jsx(Text, { color: colors.honey, children: v }), _jsx(Text, { color: colors.red, children: cell(waxText, waxW) }), _jsx(Text, { color: colors.honey, children: v }), _jsx(Text, { color: colors.green, children: cell(winRateText, winRateW) }), _jsx(Text, { color: colors.honey, children: v }), _jsx(Text, { color: colors.cyan, children: cell(confidenceText, confidenceW) }), _jsx(Text, { color: colors.honey, children: v }), _jsx(Text, { color: colors.gray, children: cell(row.info.provider, providerW) }), _jsx(Text, { color: colors.honey, children: v }), _jsx(Text, { color: colors.grayDim, children: cell(formatDate(row.info.created), createdW) }), _jsx(Text, { color: colors.honey, children: v })] }, row.info.name)); | ||
| return (_jsxs(Box, { children: [_jsx(Text, { color: colors.honey, children: v }), _jsx(Text, { color: colors.white, children: cell(row.info.name, nameW) }), _jsx(Text, { color: colors.honey, children: v }), _jsx(Text, { color: colors.honey, children: cell(honeyText, honeyW) }), _jsx(Text, { color: colors.honey, children: v }), _jsx(Text, { color: colors.wax, children: cell(waxText, waxW) }), _jsx(Text, { color: colors.honey, children: v }), _jsx(Text, { color: colors.green, children: cell(winRateText, winRateW) }), _jsx(Text, { color: colors.honey, children: v }), _jsx(Text, { color: colors.cyan, children: cell(confidenceText, confidenceW) }), _jsx(Text, { color: colors.honey, children: v }), _jsx(Text, { color: colors.gray, children: cell(row.info.provider, providerW) }), _jsx(Text, { color: colors.honey, children: v }), _jsx(Text, { color: colors.grayDim, children: cell(formatDate(row.info.created), createdW) }), _jsx(Text, { color: colors.honey, children: v })] }, row.info.name)); | ||
| }), _jsx(Box, { children: _jsx(Text, { color: colors.honey, children: botBorder }) })] })); | ||
| } |
@@ -114,13 +114,13 @@ import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime"; | ||
| const newStyleAgents = agents.filter((a) => !a.isOldStyle); | ||
| return (_jsxs(Box, { flexDirection: "column", paddingLeft: 1, children: [_jsxs(Text, { color: colors.honey, bold: true, children: [symbols.hive, " Migrate agents to @hive-org/cli"] }), _jsx(Text, { color: "gray", children: border.horizontal.repeat(termWidth - 4) }), _jsxs(Text, { color: "gray", children: ["Use ", styled.white('↑↓'), " to navigate, ", styled.white('space'), " to toggle, ", styled.white('enter'), " to confirm"] }), _jsx(Text, { children: " " }), oldStyleAgents.map((agent, i) => { | ||
| return (_jsxs(Box, { flexDirection: "column", paddingLeft: 1, children: [_jsxs(Text, { color: colors.honey, bold: true, children: [symbols.hive, " Migrate agents to @hive-org/cli"] }), _jsx(Text, { color: colors.gray, children: border.horizontal.repeat(termWidth - 4) }), _jsxs(Text, { color: colors.gray, children: ["Use ", styled.white('↑↓'), " to navigate, ", styled.white('space'), " to toggle, ", styled.white('enter'), " to confirm"] }), _jsx(Text, { children: " " }), oldStyleAgents.map((agent, i) => { | ||
| const isCursor = i === cursor; | ||
| const prefix = agent.selected ? symbols.check : symbols.diamondOpen; | ||
| const prefixColor = agent.selected ? colors.green : colors.gray; | ||
| const nameColor = isCursor ? 'white' : 'gray'; | ||
| const nameColor = isCursor ? colors.white : colors.gray; | ||
| const cursorChar = isCursor ? symbols.arrow : ' '; | ||
| return (_jsxs(Box, { children: [_jsxs(Text, { color: colors.honey, children: [cursorChar, " "] }), _jsxs(Text, { color: prefixColor, children: [prefix, " "] }), _jsx(Text, { color: nameColor, bold: isCursor, children: agent.info.name }), _jsxs(Text, { color: "gray", children: [" (", agent.info.provider, ")"] })] }, agent.info.name)); | ||
| }), newStyleAgents.length > 0 && (_jsxs(_Fragment, { children: [_jsx(Text, { children: " " }), _jsx(Text, { color: "gray", children: "Already migrated:" }), newStyleAgents.map((agent) => (_jsx(Box, { children: _jsxs(Text, { color: "gray", children: [' ', symbols.check, " ", agent.info.name] }) }, agent.info.name)))] })), _jsx(Text, { children: " " }), _jsx(Text, { color: "gray", children: styled.dim('q/esc to cancel') })] })); | ||
| return (_jsxs(Box, { children: [_jsxs(Text, { color: colors.honey, children: [cursorChar, " "] }), _jsxs(Text, { color: prefixColor, children: [prefix, " "] }), _jsx(Text, { color: nameColor, bold: isCursor, children: agent.info.name }), _jsxs(Text, { color: colors.gray, children: [" (", agent.info.provider, ")"] })] }, agent.info.name)); | ||
| }), newStyleAgents.length > 0 && (_jsxs(_Fragment, { children: [_jsx(Text, { children: " " }), _jsx(Text, { color: colors.gray, children: "Already migrated:" }), newStyleAgents.map((agent) => (_jsx(Box, { children: _jsxs(Text, { color: colors.gray, children: [' ', symbols.check, " ", agent.info.name] }) }, agent.info.name)))] })), _jsx(Text, { children: " " }), _jsx(Text, { color: colors.gray, children: styled.dim('q/esc to cancel') })] })); | ||
| } | ||
| if (phase === 'migrating') { | ||
| return (_jsxs(Box, { flexDirection: "column", paddingLeft: 1, children: [_jsxs(Text, { color: colors.honey, bold: true, children: [symbols.hive, " Migrating agents..."] }), _jsx(Text, { color: "gray", children: border.horizontal.repeat(termWidth - 4) }), results.map((r) => (_jsx(Box, { children: _jsxs(Text, { color: r.success ? colors.green : colors.red, children: [r.success ? symbols.check : symbols.cross, " ", r.name] }) }, r.name))), currentAgent && (_jsx(Box, { children: _jsxs(Text, { color: colors.honey, children: [symbols.diamond, " ", currentAgent, ": ", currentStep] }) }))] })); | ||
| return (_jsxs(Box, { flexDirection: "column", paddingLeft: 1, children: [_jsxs(Text, { color: colors.honey, bold: true, children: [symbols.hive, " Migrating agents..."] }), _jsx(Text, { color: colors.gray, children: border.horizontal.repeat(termWidth - 4) }), results.map((r) => (_jsx(Box, { children: _jsxs(Text, { color: r.success ? colors.green : colors.red, children: [r.success ? symbols.check : symbols.cross, " ", r.name] }) }, r.name))), currentAgent && (_jsx(Box, { children: _jsxs(Text, { color: colors.honey, children: [symbols.diamond, " ", currentAgent, ": ", currentStep] }) }))] })); | ||
| } | ||
@@ -131,3 +131,3 @@ // phase === 'done' | ||
| const failCount = results.filter((r) => !r.success).length; | ||
| return (_jsxs(Box, { flexDirection: "column", paddingLeft: 1, children: [_jsxs(Text, { color: colors.honey, bold: true, children: [symbols.hive, " Migration complete"] }), _jsx(Text, { color: "gray", children: border.horizontal.repeat(termWidth - 4) }), results.map((r) => (_jsxs(Box, { children: [r.success && !r.error && (_jsxs(Text, { color: colors.green, children: [symbols.check, " ", r.name, " \u2014 migrated"] })), r.error === 'Already migrated' && (_jsxs(Text, { color: "gray", children: [symbols.check, " ", r.name, " \u2014 already migrated"] })), !r.success && r.error !== 'Already migrated' && (_jsxs(Text, { color: colors.red, children: [symbols.cross, " ", r.name, " \u2014 ", r.error] }))] }, r.name))), agents.length === 0 && results.length === 0 && (_jsx(Text, { color: "gray", children: "No agents found in ~/.hive/agents/" })), _jsx(Text, { children: " " }), successCount > 0 && (_jsxs(Text, { color: "gray", children: ["Agents now run via @hive-org/cli. ", styled.white('npx @hive-org/cli@latest start'), " always uses the latest version."] }))] })); | ||
| return (_jsxs(Box, { flexDirection: "column", paddingLeft: 1, children: [_jsxs(Text, { color: colors.honey, bold: true, children: [symbols.hive, " Migration complete"] }), _jsx(Text, { color: colors.gray, children: border.horizontal.repeat(termWidth - 4) }), results.map((r) => (_jsxs(Box, { children: [r.success && !r.error && (_jsxs(Text, { color: colors.green, children: [symbols.check, " ", r.name, " \u2014 migrated"] })), r.error === 'Already migrated' && (_jsxs(Text, { color: colors.gray, children: [symbols.check, " ", r.name, " \u2014 already migrated"] })), !r.success && r.error !== 'Already migrated' && (_jsxs(Text, { color: colors.red, children: [symbols.cross, " ", r.name, " \u2014 ", r.error] }))] }, r.name))), agents.length === 0 && results.length === 0 && (_jsx(Text, { color: colors.gray, children: "No agents found in ~/.hive/agents/" })), _jsx(Text, { children: " " }), successCount > 0 && (_jsxs(Text, { color: colors.gray, children: ["Agents now run via @hive-org/cli. ", styled.white('npx @hive-org/cli@latest start'), " always uses the latest version."] }))] })); | ||
| } |
@@ -21,3 +21,3 @@ import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime"; | ||
| function ColoredStats({ stats }) { | ||
| return (_jsxs(_Fragment, { children: [_jsxs(Text, { color: colors.honey, children: ["H:", Math.floor(stats.honey)] }), _jsx(Text, { color: colors.grayDim, children: " " }), _jsxs(Text, { color: colors.red, children: ["W:", Math.floor(stats.wax)] }), _jsx(Text, { color: colors.grayDim, children: " " }), _jsxs(Text, { color: colors.green, children: ["WR:", (stats.win_rate * 100).toFixed(2), "%"] }), _jsx(Text, { color: colors.grayDim, children: " " }), _jsxs(Text, { color: colors.cyan, children: ["C:", stats.confidence.toFixed(2)] })] })); | ||
| return (_jsxs(_Fragment, { children: [_jsxs(Text, { color: colors.honey, children: ["H:", Math.floor(stats.honey)] }), _jsx(Text, { color: colors.grayDim, children: " " }), _jsxs(Text, { color: colors.wax, children: ["W:", Math.floor(stats.wax)] }), _jsx(Text, { color: colors.grayDim, children: " " }), _jsxs(Text, { color: colors.green, children: ["WR:", (stats.win_rate * 100).toFixed(2), "%"] }), _jsx(Text, { color: colors.grayDim, children: " " }), _jsxs(Text, { color: colors.cyan, children: ["C:", stats.confidence.toFixed(2)] })] })); | ||
| } | ||
@@ -24,0 +24,0 @@ export function Dashboard({ manager, statsMap }) { |
@@ -18,3 +18,3 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime"; | ||
| } | ||
| return (_jsxs(_Fragment, { children: [_jsxs(Text, { color: colors.honey, children: ["H:", Math.floor(stats.honey)] }), _jsx(Text, { color: colors.grayDim, children: " " }), _jsxs(Text, { color: colors.red, children: ["W:", Math.floor(stats.wax)] }), _jsx(Text, { color: colors.grayDim, children: " " }), _jsxs(Text, { color: colors.green, children: ["WR:", (stats.win_rate * 100).toFixed(2), "%"] }), _jsx(Text, { color: colors.grayDim, children: " " }), _jsxs(Text, { color: colors.cyan, children: ["C:", stats.confidence.toFixed(2)] })] })); | ||
| return (_jsxs(_Fragment, { children: [_jsxs(Text, { color: colors.honey, children: ["H:", Math.floor(stats.honey)] }), _jsx(Text, { color: colors.grayDim, children: " " }), _jsxs(Text, { color: colors.wax, children: ["W:", Math.floor(stats.wax)] }), _jsx(Text, { color: colors.grayDim, children: " " }), _jsxs(Text, { color: colors.green, children: ["WR:", (stats.win_rate * 100).toFixed(2), "%"] }), _jsx(Text, { color: colors.grayDim, children: " " }), _jsxs(Text, { color: colors.cyan, children: ["C:", stats.confidence.toFixed(2)] })] })); | ||
| } | ||
@@ -21,0 +21,0 @@ export function SelectAgentApp({ onSelect }) { |
+11
-4
@@ -5,8 +5,12 @@ import chalk from 'chalk'; | ||
| honeyDark: '#D4891A', | ||
| honeyBright: '#FFD700', | ||
| white: '#FFFFFF', | ||
| gray: '#888888', | ||
| gray: '#A6A6A6', | ||
| grayDim: '#555555', | ||
| green: '#4CAF50', | ||
| red: '#F44336', | ||
| cyan: '#00BCD4', | ||
| green: '#27C587', | ||
| red: '#E14B4B', | ||
| wax: '#C45C5C', | ||
| cyan: '#22D3EE', | ||
| hot: '#FB923C', | ||
| controversial: '#C084FC', | ||
| }; | ||
@@ -47,3 +51,6 @@ export const symbols = { | ||
| red: (text) => chalk.hex(colors.red)(text), | ||
| wax: (text) => chalk.hex(colors.wax)(text), | ||
| cyan: (text) => chalk.hex(colors.cyan)(text), | ||
| hot: (text) => chalk.hex(colors.hot)(text), | ||
| controversial: (text) => chalk.hex(colors.controversial)(text), | ||
| }; |
+2
-2
| { | ||
| "name": "@hive-org/cli", | ||
| "version": "0.1.3", | ||
| "version": "0.1.4", | ||
| "description": "CLI for bootstrapping Hive AI Agents", | ||
@@ -32,3 +32,3 @@ "type": "module", | ||
| "@ai-sdk/xai": "^3.0.0", | ||
| "@hive-org/sdk": "^0.1.3", | ||
| "@hive-org/sdk": "^0.1.4", | ||
| "@openrouter/ai-sdk-provider": "^0.4.0", | ||
@@ -35,0 +35,0 @@ "ai": "^6.0.71", |
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
366076
0.16%7432
0.15%Updated