Import within the package, not through an alias

The tilde resolves through the importing project's tsconfig, so a published
file asking for ~/data/types reads the consumer's source, not ours. A relative
path means the same thing in every project that installs this one.
This commit is contained in:
2026-09-03 10:20:16 -07:00
parent aaaba709d4
commit 5dcce9026e
81 changed files with 239 additions and 243 deletions
+2 -2
View File
@@ -14,8 +14,8 @@ import { Bot, Save, X } from '@hanzogui/lucide-icons-2'
import { SizableText, XStack, YStack } from '@hanzo/ui'
import { useState, type FormEvent } from 'react'
import { useModels } from '~/data/config'
import { ESTATE } from '~/data/origin'
import { useModels } from '../data/config'
import { ESTATE } from '../data/origin'
import { create, useTools } from './store'
export interface AgentBuilderProps {
+1 -1
View File
@@ -11,7 +11,7 @@ import { SizableText, XStack, YStack } from '@hanzo/ui'
import { useEffect, useRef, useState } from 'react'
import type { Agent } from '@hanzo/ai'
import { useMultiplayer } from '~/presence/store'
import { useMultiplayer } from '../presence/store'
import { none, swarmStore, unread, useAgents, useSwarm } from './store'
/** An agent's face: the glyph somebody picked, or its initial. */
+4 -4
View File
@@ -14,10 +14,10 @@
import { APIError, type Agent, type AgentCreateParams, type AgentDetail, type AgentRun } from '@hanzo/ai'
import { useEffect, useState } from 'react'
import { client, ESTATE } from '~/data/origin'
import type { Key } from '~/data/keys'
import { invalidate, useRead } from '~/data/query'
import { useSession } from '~/data/session'
import { client, ESTATE } from '../data/origin'
import type { Key } from '../data/keys'
import { invalidate, useRead } from '../data/query'
import { useSession } from '../data/session'
/**
* What a reader is told when the server answers nothing, or does not answer.
+5 -5
View File
@@ -1,11 +1,11 @@
import { Toaster, TooltipProvider } from '@hanzo/ui'
import { RouterProvider } from 'react-router/dom'
import { Session } from '~/data/session'
import { shell } from '~/data/shell'
import { router } from '~/routes'
import { consent, usePref } from '~/settings/prefs'
import { Welcome } from '~/shell/Welcome'
import { Session } from './data/session'
import { shell } from './data/shell'
import { router } from './routes'
import { consent, usePref } from './settings/prefs'
import { Welcome } from './shell/Welcome'
/** How long a hint waits before it appears, everywhere. ONE provider, so the
* product cannot have two hover speeds depending on which subtree the pointer
+1 -1
View File
@@ -24,7 +24,7 @@ import {
import { SizableText, XStack, YStack } from '@hanzo/ui'
import { useEffect, useRef, useState, type CSSProperties } from 'react'
import { useLease, type Line } from '~/terminal/sandbox'
import { useLease, type Line } from '../terminal/sandbox'
import { artifactStore, previewable, runner, useArtifact, type ArtifactTab } from './store'
const TAB = (active: boolean): CSSProperties => ({
+1 -1
View File
@@ -10,7 +10,7 @@
* An artifact opens EMPTY. There is no code here until a fenced block or the
* palette puts some here.
*/
import { sandbox } from '~/terminal/sandbox'
import { sandbox } from '../terminal/sandbox'
import { useEffect, useState } from 'react'
+1 -1
View File
@@ -9,7 +9,7 @@
import { Clock, Play, Plus, X, Zap } from '@hanzogui/lucide-icons-2'
import { useState, type FormEvent } from 'react'
import { useSession } from '~/data/session'
import { useSession } from '../data/session'
import { add, arm, start, useFlows, useRuns } from './auto'
import { automationsStore, useAutomations } from './store'
+2 -2
View File
@@ -16,8 +16,8 @@
* Nothing publishes a next firing time or a lifetime run total, so neither is
* read. The last run is the head of `/v1/auto/runs`, which is newest first.
*/
import { client, ESTATE } from '~/data/origin'
import { invalidate, useRead } from '~/data/query'
import { client, ESTATE } from '../data/origin'
import { invalidate, useRead } from '../data/query'
/** A flow row joined to its own record. Unix milliseconds on both clocks. */
export type Flow = {
+1 -1
View File
@@ -4,7 +4,7 @@
* The flows and their runs are the server's — `auto.ts` reads them — so the
* panel holds only whether it is open and which row is expanded.
*/
import { atom, useAtom } from '~/data/store'
import { atom, useAtom } from '../data/store'
export type Panel = {
isOpen: boolean
+1 -1
View File
@@ -10,7 +10,7 @@
import { ArrowLeft, ArrowRight, Hand, Kanban, Plus, Search, X } from '@hanzogui/lucide-icons-2'
import { useState, type FormEvent } from 'react'
import { useSession } from '~/data/session'
import { useSession } from '../data/session'
import { boardStore, useBoard } from './store'
import {
+1 -1
View File
@@ -5,7 +5,7 @@
* board, what was typed into the search box, and which card is open. None of
* that outlives the tab, which is why none of it is persisted.
*/
import { atom, useAtom } from '~/data/store'
import { atom, useAtom } from '../data/store'
export type View = {
isOpen: boolean
+2 -2
View File
@@ -19,8 +19,8 @@
* purpose: a board IS a repository on the forge, and creating one is a forge
* act with forge permissions.
*/
import { client, ESTATE } from '~/data/origin'
import { invalidate, useRead } from '~/data/query'
import { client, ESTATE } from '../data/origin'
import { invalidate, useRead } from '../data/query'
/** The five columns the server recognises. An unknown value is refused with 400. */
export const COLUMNS = ['backlog', 'todo', 'in_progress', 'done', 'canceled'] as const
+1 -1
View File
@@ -13,7 +13,7 @@ import { SizableText, XStack, YStack } from '@hanzo/ui'
import { X } from '@hanzogui/lucide-icons-2'
import { useEffect } from 'react'
import { why } from '~/data/missing'
import { why } from '../data/missing'
import { channelsStore, refusal, speaker, useChannels, useTransports, when } from './store'
const Note = ({ children }: { children: string }) => (
+1 -1
View File
@@ -14,7 +14,7 @@
import { SizableText, XStack, YStack } from '@hanzo/ui'
import { Compass, Hash, MessageSquare } from '@hanzogui/lucide-icons-2'
import { why } from '~/data/missing'
import { why } from '../data/missing'
import { channelsStore, refusal, useChannels, when } from './store'
const Note = ({ children }: { children: string }) => (
+6 -6
View File
@@ -21,12 +21,12 @@
*/
import { APIError, rooms as group, type Channel, type Room } from '@hanzo/ai'
import { client, ESTATE } from '~/data/origin'
import type { Key } from '~/data/keys'
import { peek, useRead, type Read } from '~/data/query'
import { useSession } from '~/data/session'
import { atom, useAtom } from '~/data/store'
import { explain } from '~/data/types'
import { client, ESTATE } from '../data/origin'
import type { Key } from '../data/keys'
import { peek, useRead, type Read } from '../data/query'
import { useSession } from '../data/session'
import { atom, useAtom } from '../data/store'
import { explain } from '../data/types'
/** Two cache keys under one prefix, so both drop together. */
const TRANSPORTS: Key = ['channels', 'transports']
+5 -5
View File
@@ -6,11 +6,11 @@ import { ArrowUp, Mic, MicOff, Paperclip, Square, X } from '@hanzogui/lucide-ico
import { SizableText, XStack, YStack } from '@hanzo/ui'
import { useCallback, useEffect, useRef, useState, type ReactNode } from 'react'
import { Starters, type Starter } from '~/compose/Starters'
import { useDraft } from '~/compose/draft'
import type { Handoff } from '~/compose/link'
import { payload, type Conversation, type Draft, type Payload } from '~/compose/submit'
import type { Attachment } from '~/data/types'
import { Starters, type Starter } from './Starters'
import { useDraft } from './draft'
import type { Handoff } from './link'
import { payload, type Conversation, type Draft, type Payload } from './submit'
import type { Attachment } from '../data/types'
const COLUMN = 768
const MAX_TEXTAREA_HEIGHT = 220
+2 -2
View File
@@ -3,8 +3,8 @@
*/
import { useCallback, useEffect, useRef, useState } from 'react'
import { blank, type Draft } from '~/compose/submit'
import type { Attachment } from '~/data/types'
import { blank, type Draft } from './submit'
import type { Attachment } from '../data/types'
export const NEW = 'new'
+3 -4
View File
@@ -1,12 +1,11 @@
/**
* The turn in flight.
*
* One verb, where there were three. Streams decoded chat.completion.chunk
* values from @hanzo/ai.
* One verb, streaming decoded `chat.completion.chunk` values from @hanzo/ai.
*/
import type { ChatCompletionChunk, ChatCompletionMessage } from '@hanzo/ai'
import { client, ESTATE } from '~/data/origin'
import { explain } from '~/data/types'
import { client, ESTATE } from '../data/origin'
import { explain } from '../data/types'
/** How a turn ended. The shell answers each differently, so it is told which. */
export type Ended =
+1 -1
View File
@@ -6,7 +6,7 @@
*/
import type { ChatCompletionContentPart, ChatCompletionMessage } from '@hanzo/ai'
import type { Attachment, Message } from '~/data/types'
import type { Attachment, Message } from '../data/types'
/**
* What the composer holds.
+1 -1
View File
@@ -16,7 +16,7 @@ import { test } from 'node:test'
import { createAiClient, type ChatCompletionChunk } from '@hanzo/ai'
import type { Message } from '~/data/types'
import type { Message } from '../data/types'
import { fold, opening, parts, spoken } from './frames.ts'
import { history } from './submit.ts'
+1 -1
View File
@@ -11,7 +11,7 @@
* go, and where this app's own doorway is. Both are navigations rather than
* requests — the browser leaves — so neither can be a method call.
*/
import { brand, clientId } from '~/brand'
import { brand, clientId } from '../brand'
export const api = {
/**
+4 -4
View File
@@ -16,10 +16,10 @@
* always was; what a guest may do is decided server-side from the absence of a
* bearer, which is where it belongs and where it was already decided.
*/
import { keys } from '~/data/keys'
import { client, origins } from '~/data/origin'
import { useRead } from '~/data/query'
import type { Served } from '~/data/types'
import { keys } from './keys'
import { client, origins } from './origin'
import { useRead } from './query'
import type { Served } from './types'
/** Who publishes a model, when it says. The menu's fallback group. */
const OTHER = 'other'
+4 -4
View File
@@ -12,10 +12,10 @@
* There is no route to write to and no SDK method to call, so nothing here
* pretends otherwise — `~/data/missing` is what the rail's controls report.
*/
import { client, ESTATE } from '~/data/origin'
import { keys } from '~/data/keys'
import { useRead } from '~/data/query'
import type { Convo } from '~/data/types'
import { client, ESTATE } from './origin'
import { keys } from './keys'
import { useRead } from './query'
import type { Convo } from './types'
/**
* Every conversation, newest first.
+1 -1
View File
@@ -7,7 +7,7 @@
* What a guest may do is decided there, from the absence of a bearer — which is
* also why becoming one cannot fail and asks nobody's permission.
*/
import type { User } from '~/data/types'
import type { User } from './types'
export const GUEST = 'guest'
+2 -2
View File
@@ -11,8 +11,8 @@
*/
import { IAM } from '@hanzo/iam'
import { brand, clientId } from '~/brand'
import { callbackPath, loginPath } from '~/data/api'
import { brand, clientId } from '../brand'
import { callbackPath, loginPath } from './api'
/**
* What a session asks for.
+4 -4
View File
@@ -16,10 +16,10 @@
* 200 with an empty transcript for another tenant's id, so the SDK reads empty
* as absent. An empty list is passed straight through as an empty conversation.
*/
import { client } from '~/data/origin'
import { keys } from '~/data/keys'
import { useRead } from '~/data/query'
import type { Message } from '~/data/types'
import { client } from './origin'
import { keys } from './keys'
import { useRead } from './query'
import type { Message } from './types'
/**
* Every turn of one conversation, oldest first.
+4 -4
View File
@@ -16,10 +16,10 @@
*/
import { createAiClient, type AiClient } from '@hanzo/ai'
import { brand } from '~/brand'
import { iam } from '~/data/iam'
import { shell } from '~/data/shell'
import { key } from '~/settings/prefs'
import { brand } from '../brand'
import { iam } from './iam'
import { shell } from './shell'
import { key } from '../settings/prefs'
/** The estate. Its base URL is the SDK's default and is not restated. */
export const ESTATE = 'hanzo'
+1 -1
View File
@@ -1,7 +1,7 @@
/**
* Ask the issuer, once per visit, whether this browser is already signed in.
*/
import { keepHere } from '~/data/back'
import { keepHere } from './back'
const SLOT = 'chat.probed'
+1 -1
View File
@@ -25,7 +25,7 @@
*/
import { useCallback, useEffect, useRef, useState, useSyncExternalStore } from 'react'
import type { Key } from '~/data/keys'
import type { Key } from './keys'
/** A separator no key part contains, so a prefix match is a real prefix. */
const SEP = ''
+10 -10
View File
@@ -33,17 +33,17 @@ import {
type ReactNode,
} from 'react'
import { client } from '~/data/origin'
import { api } from '~/data/api'
import { keepHere, take } from '~/data/back'
import { guest } from '~/data/guest'
import { iam } from '~/data/iam'
import { client } from './origin'
import { api } from './api'
import { keepHere, take } from './back'
import { guest } from './guest'
import { iam } from './iam'
import { HeldError } from '@hanzo/ai'
import { keys } from '~/data/keys'
import { exchanging, noSession, probe } from '~/data/probe'
import { invalidate, useRead } from '~/data/query'
import { shell, visit } from '~/data/shell'
import type { Standing, User } from '~/data/types'
import { keys } from './keys'
import { exchanging, noSession, probe } from './probe'
import { invalidate, useRead } from './query'
import { shell, visit } from './shell'
import type { Standing, User } from './types'
export type Session = {
+1 -1
View File
@@ -19,7 +19,7 @@
*/
import { useSyncExternalStore } from 'react'
import type { Convo, Failure, Message } from '~/data/types'
import type { Convo, Failure, Message } from './types'
export type Atom<T> = {
/** The value, right now. */
+1 -1
View File
@@ -1,4 +1,4 @@
import { brand } from '~/brand'
import { brand } from '../brand'
/**
* What the wire carries, and what a refusal means to a reader.
+1 -1
View File
@@ -22,7 +22,7 @@
* NOT fall back to is a store that answers every call and forgets on exit,
* which reads as a working keychain until the restart that loses the session.
*/
import { call, shell } from '~/data/shell'
import { call, shell } from './shell'
/** One entry, holding the whole session: the tokens travel together. */
const NAME = 'session'
+1 -1
View File
@@ -10,7 +10,7 @@ import {
} from '@hanzogui/lucide-icons-2'
import { SizableText, XStack, YStack } from '@hanzo/ui'
import { useState, type FormEvent } from 'react'
import { useShown } from '~/show'
import { useShown } from '../show'
import { intelligenceStore, useForget, useIntelligence, useRemember } from './store'
export const IntelligenceModal = () => {
+4 -4
View File
@@ -14,10 +14,10 @@
* every keystroke sent a request and minted a cache entry per character, and
* every one but the last was a question already finished being asked.
*/
import { atom, useAtom } from '~/data/store'
import { keys } from '~/data/keys'
import { client, ESTATE } from '~/data/origin'
import { reason, useRead, useSend, useSettled } from '~/data/query'
import { atom, useAtom } from '../data/store'
import { keys } from '../data/keys'
import { client, ESTATE } from '../data/origin'
import { reason, useRead, useSend, useSettled } from '../data/query'
export interface MemoryItem {
/** The memory's name in the store — how it is addressed. */
+3 -3
View File
@@ -7,9 +7,9 @@ import '@hanzo/font/css'
import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'
import { App } from '~/app'
import { brand, wear } from '~/brand'
import { unlock } from '~/data/vault'
import { App } from './app'
import { brand, wear } from './brand'
import { unlock } from './data/vault'
/**
* The mount. Three lines, and the second one is the whole design system.
+2 -2
View File
@@ -19,8 +19,8 @@ import { Blocks, Check, Plus, Power, Search, Trash2, Wrench, X } from '@hanzogui
import { SizableText, XStack, YStack } from '@hanzo/ui'
import { useEffect, useState } from 'react'
import { requireLogin } from '~/data/gate'
import { useSession } from '~/data/session'
import { requireLogin } from '../data/gate'
import { useSession } from '../data/session'
import { mcpStore, useCatalog, useMcp } from './store'
import type { McpServer } from './types'
+4 -4
View File
@@ -22,10 +22,10 @@
*/
import { useSyncExternalStore } from 'react'
import { client, ESTATE } from '~/data/origin'
import { keys, sign, type Key } from '~/data/keys'
import { invalidate, peek, useRead } from '~/data/query'
import { useSession } from '~/data/session'
import { client, ESTATE } from '../data/origin'
import { keys, sign, type Key } from '../data/keys'
import { invalidate, peek, useRead } from '../data/query'
import { useSession } from '../data/session'
import type { McpServer } from './types'
const ACTIVATION = '/v1/tools/activation'
+2 -2
View File
@@ -10,8 +10,8 @@
import { Blocks, Search, X } from '@hanzogui/lucide-icons-2'
import { useState } from 'react'
import { requireLogin } from '~/data/gate'
import { useSession } from '~/data/session'
import { requireLogin } from '../data/gate'
import { useSession } from '../data/session'
import { pluginsStore, usePlugins } from './store'
const dim = 'rgba(255, 255, 255, 0.5)'
+4 -4
View File
@@ -15,10 +15,10 @@
import { useSyncExternalStore } from 'react'
import type { PluginMount } from '@hanzo/ai'
import { client, ESTATE } from '~/data/origin'
import type { Key } from '~/data/keys'
import { useRead } from '~/data/query'
import { useSession } from '~/data/session'
import { client, ESTATE } from '../data/origin'
import type { Key } from '../data/keys'
import { useRead } from '../data/query'
import { useSession } from '../data/session'
const key: Key = ['plugins']
+1 -1
View File
@@ -14,7 +14,7 @@ import { XStack } from '@hanzo/ui'
import { initial, label, tint } from './person'
import { multiplayerStore, useMultiplayer } from './store'
import { terminalStore, useTerminal } from '~/terminal/store'
import { terminalStore, useTerminal } from '../terminal/store'
export const PresenceStack = () => {
const { participants } = useMultiplayer()
+3 -3
View File
@@ -25,9 +25,9 @@
import { useCallback, useSyncExternalStore } from 'react'
import type { Person } from '@hanzo/ai'
import { client, ESTATE } from '~/data/origin'
import { useRead } from '~/data/query'
import { useSession } from '~/data/session'
import { client, ESTATE } from '../data/origin'
import { useRead } from '../data/query'
import { useSession } from '../data/session'
export type MultiplayerState = {
/** Whether the roster panel is open. */
+1 -1
View File
@@ -8,7 +8,7 @@
import { Building2, FolderGit2, Plus, Star, UserCheck, X } from '@hanzogui/lucide-icons-2'
import { useState, type FormEvent } from 'react'
import { useSession } from '~/data/session'
import { useSession } from '../data/session'
import { create, star, useProjects, usePeople } from './projects'
import { projectsStore, useProjectPanel } from './store'
+2 -2
View File
@@ -13,8 +13,8 @@
*/
import type { Person } from '@hanzo/ai'
import { client, ESTATE } from '~/data/origin'
import { invalidate, useRead } from '~/data/query'
import { client, ESTATE } from '../data/origin'
import { invalidate, useRead } from '../data/query'
/** A project row, as `/v1/projects` answers it. `slug` is what addresses it. */
export type Project = {
+1 -1
View File
@@ -5,7 +5,7 @@
* and the org is the principal's, so the only thing left to hold is whether
* this panel is open and which of its two lists is in front.
*/
import { atom, useAtom } from '~/data/store'
import { atom, useAtom } from '../data/store'
export type Pane = 'projects' | 'people'
+1 -1
View File
@@ -2,7 +2,7 @@
* The bottom user menu popover in the rail with Linear.app style liquid-glass aesthetics,
* org switcher, account controls, and appearance options.
*/
import { api } from '~/data/api'
import { api } from '../data/api'
import {
ChevronsUpDown,
ExternalLink,
+1 -1
View File
@@ -2,7 +2,7 @@ import { SizableText, YStack } from '@hanzo/ui'
import { SidebarScroll, SidebarSection } from '@hanzo/ui/chat'
import { useMemo } from 'react'
import type { Convo } from '~/data/types'
import type { Convo } from '../data/types'
import { hits, id } from './group'
import { Item } from './Item'
+1 -1
View File
@@ -1,7 +1,7 @@
import { Spinner } from '@hanzo/ui'
import { SidebarItem } from '@hanzo/ui/chat'
import type { Convo } from '~/data/types'
import type { Convo } from '../data/types'
import { named } from './group'
+1 -1
View File
@@ -2,7 +2,7 @@ import { Paragraph, SizableText, Spinner, XStack } from '@hanzo/ui'
import { SidebarScroll, SidebarSection } from '@hanzo/ui/chat'
import { useEffect, useMemo, useRef } from 'react'
import type { Convo } from '~/data/types'
import type { Convo } from '../data/types'
import { group, id } from './group'
import { Item } from './Item'
+6 -6
View File
@@ -5,12 +5,12 @@ import { HanzoMark } from '@hanzo/ui/product'
import { Blocks, Kanban, LayoutGrid, ListTodo } from '@hanzogui/lucide-icons-2'
import { useRef, useState, type ReactNode } from 'react'
import { boardStore } from '~/boards/store'
import { ChannelSection } from '~/channels/ChannelSection'
import { mcpStore } from '~/mcp/store'
import { swarmStore } from '~/agents/store'
import { taskQueueStore } from '~/tasks/store'
import type { Convo } from '~/data/types'
import { boardStore } from '../boards/store'
import { ChannelSection } from '../channels/ChannelSection'
import { mcpStore } from '../mcp/store'
import { swarmStore } from '../agents/store'
import { taskQueueStore } from '../tasks/store'
import type { Convo } from '../data/types'
import { Find } from './Find'
import { Hits } from './Hits'
import { List } from './List'
+1 -1
View File
@@ -1,4 +1,4 @@
import type { Convo } from '~/data/types'
import type { Convo } from '../data/types'
/**
* The SET, ordered and named — the only rules about a list of conversations
+5 -5
View File
@@ -1,10 +1,10 @@
import { createBrowserRouter, Navigate } from 'react-router'
import { Boundary } from '~/shell/Boundary'
import { Callback } from '~/shell/Callback'
import { Chat } from '~/shell/Chat'
import { Login } from '~/shell/Login'
import { Root } from '~/shell/Root'
import { Boundary } from './shell/Boundary'
import { Callback } from './shell/Callback'
import { Chat } from './shell/Chat'
import { Login } from './shell/Login'
import { Root } from './shell/Root'
/**
* Where the app is mounted, from the document that served it.
+2 -2
View File
@@ -14,8 +14,8 @@ import { row, rows } from '@hanzo/ui/glass'
import { ConfirmDelete, DialogTemplate } from '@hanzo/ui/product'
import { useState } from 'react'
import { api } from '~/data/api'
import type { User } from '~/data/types'
import { api } from '../data/api'
import type { User } from '../data/types'
export interface AccountProps {
+1 -1
View File
@@ -2,7 +2,7 @@ import { Paragraph, SizableText, Switch, XStack, YStack } from '@hanzo/ui'
import { row, rows } from '@hanzo/ui/glass'
import { Model } from './Model'
import type { Served } from '~/data/types'
import type { Served } from '../data/types'
import { model, steps, temporary, usePref, type Pref } from './prefs'
/**
+1 -1
View File
@@ -4,7 +4,7 @@
import { Blocks, ExternalLink, Power } from '@hanzogui/lucide-icons-2'
import { Paragraph, SizableText, XStack, YStack } from '@hanzo/ui'
import { row, rows } from '@hanzo/ui/glass'
import { mcpStore, useMcp } from '~/mcp/store'
import { mcpStore, useMcp } from '../mcp/store'
export function McpSettings() {
const { servers } = useMcp()
+2 -2
View File
@@ -1,8 +1,8 @@
import { ModelSelector } from '@hanzo/ui/models'
import { useMemo } from 'react'
import { origins } from '~/data/origin'
import type { Served } from '~/data/types'
import { origins } from '../data/origin'
import type { Served } from '../data/types'
import { catalog } from './models'
/**
+1 -1
View File
@@ -21,7 +21,7 @@ import { AiSettings } from './AiSettings'
import { General } from './General'
import { Look } from './Look'
import { McpSettings } from './McpSettings'
import type { Served } from '~/data/types'
import type { Served } from '../data/types'
export interface SettingsProps {
open: boolean
+2 -2
View File
@@ -1,7 +1,7 @@
import type { ModelCatalogEntry } from '@hanzo/ui/models'
import type { Origin } from '~/data/origin'
import type { Served } from '~/data/types'
import type { Origin } from '../data/origin'
import type { Served } from '../data/types'
/**
* What can be asked, as ONE list a picker can read.
+1 -1
View File
@@ -1,4 +1,4 @@
import { atom, useAtom, type Atom } from '~/data/store'
import { atom, useAtom, type Atom } from '../data/store'
/**
* Every preference that outlives the tab, and the only code in this app that
+3 -3
View File
@@ -1,9 +1,9 @@
import { useEffect, useRef } from 'react'
import { useNavigate } from 'react-router'
import { loginPath } from '~/data/api'
import { useSession } from '~/data/session'
import { Waiting } from '~/shell/Boundary'
import { loginPath } from '../data/api'
import { useSession } from '../data/session'
import { Waiting } from './Boundary'
/**
* Where a sign-in lands on the way back from the issuer.
+32 -32
View File
@@ -2,38 +2,38 @@ import { Fill, H2, Paragraph, XStack, YStack } from '@hanzo/ui'
import { useCallback, useEffect, useMemo, useRef } from 'react'
import { useLocation, useNavigate, useParams } from 'react-router'
import { SwarmBar } from '~/agents/SwarmBar'
import { ArtifactPanel } from '~/artifact/ArtifactPanel'
import { artifactStore } from '~/artifact/store'
import { brand } from '~/brand'
import { Compose } from '~/compose/Compose'
import { faulted, fold, opening, parts, spoken, stopped, type Part as Piece, type Reply } from '~/compose/frames'
import { useHandoff } from '~/compose/link'
import { run } from '~/compose/stream'
import { history, type Conversation, type Payload } from '~/compose/submit'
import { useChannels } from '~/channels/store'
import { client, ESTATE } from '~/data/origin'
import { useModels } from '~/data/config'
import { useConvo } from '~/data/convos'
import { requireLogin } from '~/data/gate'
import { keys } from '~/data/keys'
import { useTurns } from '~/data/messages'
import { invalidate } from '~/data/query'
import * as store from '~/data/store'
import type { Message, Part } from '~/data/types'
import { InviteModal } from '~/presence/InviteModal'
import { Model } from '~/settings/Model'
import { pick } from '~/settings/models'
import { model as preferred, usePref } from '~/settings/prefs'
import { Header } from '~/shell/Header'
import { useFrame } from '~/shell/Root'
import { useTitle } from '~/shell/title'
import { TerminalPanel } from '~/terminal/TerminalPanel'
import { BrowseChannelsModal } from '~/channels/BrowseChannelsModal'
import { ShortcutsModal } from '~/shortcuts/ShortcutsModal'
import { ThemeModal } from '~/theme/ThemeModal'
import { ExportModal } from '~/thread/ExportModal'
import { Thread } from '~/thread/Thread'
import { SwarmBar } from '../agents/SwarmBar'
import { ArtifactPanel } from '../artifact/ArtifactPanel'
import { artifactStore } from '../artifact/store'
import { brand } from '../brand'
import { Compose } from '../compose/Compose'
import { faulted, fold, opening, parts, spoken, stopped, type Part as Piece, type Reply } from '../compose/frames'
import { useHandoff } from '../compose/link'
import { run } from '../compose/stream'
import { history, type Conversation, type Payload } from '../compose/submit'
import { useChannels } from '../channels/store'
import { client, ESTATE } from '../data/origin'
import { useModels } from '../data/config'
import { useConvo } from '../data/convos'
import { requireLogin } from '../data/gate'
import { keys } from '../data/keys'
import { useTurns } from '../data/messages'
import { invalidate } from '../data/query'
import * as store from '../data/store'
import type { Message, Part } from '../data/types'
import { InviteModal } from '../presence/InviteModal'
import { Model } from '../settings/Model'
import { pick } from '../settings/models'
import { model as preferred, usePref } from '../settings/prefs'
import { Header } from './Header'
import { useFrame } from './Root'
import { useTitle } from './title'
import { TerminalPanel } from '../terminal/TerminalPanel'
import { BrowseChannelsModal } from '../channels/BrowseChannelsModal'
import { ShortcutsModal } from '../shortcuts/ShortcutsModal'
import { ThemeModal } from '../theme/ThemeModal'
import { ExportModal } from '../thread/ExportModal'
import { Thread } from '../thread/Thread'
/**
* One piece of a reply, in the wire's vocabulary.
+4 -4
View File
@@ -12,10 +12,10 @@ import {
} from '@hanzo/ui'
import { useEffect, useState } from 'react'
import { api } from '~/data/api'
import { takePending, watchLogin, type Reason } from '~/data/gate'
import { MACHINE, origins } from '~/data/origin'
import { useSession } from '~/data/session'
import { api } from '../data/api'
import { takePending, watchLogin, type Reason } from '../data/gate'
import { MACHINE, origins } from '../data/origin'
import { useSession } from '../data/session'
/**
* Where somebody ready to pay goes. No price is repeated here: the plans page
+6 -6
View File
@@ -14,12 +14,12 @@ import {
import { XStack } from '@hanzo/ui'
import { useEffect, useState } from 'react'
import { PresenceStack } from '~/presence/PresenceStack'
import { artifactStore, useArtifact } from '~/artifact/store'
import { useChannels } from '~/channels/store'
import { exportStore } from '~/thread/exportStore'
import { shortcutsStore } from '~/shortcuts/store'
import { themeCustomizerStore } from '~/theme/store'
import { PresenceStack } from '../presence/PresenceStack'
import { artifactStore, useArtifact } from '../artifact/store'
import { useChannels } from '../channels/store'
import { exportStore } from '../thread/exportStore'
import { shortcutsStore } from '../shortcuts/store'
import { themeCustomizerStore } from '../theme/store'
export interface HeaderProps {
title: string
+3 -3
View File
@@ -2,9 +2,9 @@ import { Button, H2, Paragraph, YStack } from '@hanzo/ui'
import { useEffect, useRef } from 'react'
import { Navigate, useSearchParams } from 'react-router'
import { brand } from '~/brand'
import { useSession } from '~/data/session'
import { Waiting } from '~/shell/Boundary'
import { brand } from '../brand'
import { useSession } from '../data/session'
import { Waiting } from './Boundary'
/**
* Where a refusal sends somebody, and it is a DOOR rather than a page.
+14 -14
View File
@@ -22,20 +22,20 @@ import {
import { useCallback, useEffect, useMemo, useState } from 'react'
import { useNavigate } from 'react-router'
import { swarmStore } from '~/agents/store'
import { artifactStore } from '~/artifact/store'
import { automationsStore } from '~/automations/store'
import { boardStore } from '~/boards/store'
import { channelsStore } from '~/channels/store'
import { api } from '~/data/api'
import { useSession } from '~/data/session'
import { intelligenceStore } from '~/intelligence/store'
import { mcpStore } from '~/mcp/store'
import { pluginsStore } from '~/plugins/store'
import { multiplayerStore } from '~/presence/store'
import { projectsStore } from '~/projects/store'
import { taskQueueStore } from '~/tasks/store'
import { terminalStore } from '~/terminal/store'
import { swarmStore } from '../agents/store'
import { artifactStore } from '../artifact/store'
import { automationsStore } from '../automations/store'
import { boardStore } from '../boards/store'
import { channelsStore } from '../channels/store'
import { api } from '../data/api'
import { useSession } from '../data/session'
import { intelligenceStore } from '../intelligence/store'
import { mcpStore } from '../mcp/store'
import { pluginsStore } from '../plugins/store'
import { multiplayerStore } from '../presence/store'
import { projectsStore } from '../projects/store'
import { taskQueueStore } from '../tasks/store'
import { terminalStore } from '../terminal/store'
export interface PaletteProps {
onSettings: () => void
+25 -25
View File
@@ -2,31 +2,31 @@ import { Screen, XStack, YStack } from '@hanzo/ui'
import { useCallback, useMemo, useState } from 'react'
import { Outlet, useMatch, useNavigate, useOutletContext } from 'react-router'
import { AgentBuilderModal } from '~/agents/AgentBuilderModal'
import { AgentsAndAppsModal } from '~/agents/AgentsAndAppsModal'
import { AutomationsModal } from '~/automations/AutomationsModal'
import { BoardModal } from '~/boards/BoardModal'
import { brand } from '~/brand'
import { api } from '~/data/api'
import { useModels } from '~/data/config'
import { useConvos } from '~/data/convos'
import { useSession } from '~/data/session'
import type { Convo } from '~/data/types'
import { useNarrow } from '~/gui'
import { McpModal } from '~/mcp/McpModal'
import { IntelligenceModal } from '~/intelligence/IntelligenceModal'
import { PluginsModal } from '~/plugins/PluginsModal'
import { ProjectModal } from '~/projects/ProjectModal'
import { Account } from '~/rail/Account'
import { id } from '~/rail/group'
import { Rail } from '~/rail/Rail'
import { Visitor } from '~/rail/Visitor'
import { Settings } from '~/settings/Settings'
import { Announce } from '~/shell/Announce'
import { Gate } from '~/shell/Gate'
import { Palette } from '~/shell/Palette'
import { Scene } from '~/shell/Scene'
import { TaskQueueModal } from '~/tasks/TaskQueueModal'
import { AgentBuilderModal } from '../agents/AgentBuilderModal'
import { AgentsAndAppsModal } from '../agents/AgentsAndAppsModal'
import { AutomationsModal } from '../automations/AutomationsModal'
import { BoardModal } from '../boards/BoardModal'
import { brand } from '../brand'
import { api } from '../data/api'
import { useModels } from '../data/config'
import { useConvos } from '../data/convos'
import { useSession } from '../data/session'
import type { Convo } from '../data/types'
import { useNarrow } from '../gui'
import { McpModal } from '../mcp/McpModal'
import { IntelligenceModal } from '../intelligence/IntelligenceModal'
import { PluginsModal } from '../plugins/PluginsModal'
import { ProjectModal } from '../projects/ProjectModal'
import { Account } from '../rail/Account'
import { id } from '../rail/group'
import { Rail } from '../rail/Rail'
import { Visitor } from '../rail/Visitor'
import { Settings } from '../settings/Settings'
import { Announce } from './Announce'
import { Gate } from './Gate'
import { Palette } from './Palette'
import { Scene } from './Scene'
import { TaskQueueModal } from '../tasks/TaskQueueModal'
/**
* What a screen inside the shell can reach.
+1 -1
View File
@@ -1,6 +1,6 @@
import { View } from '@hanzo/ui'
import { brand } from '~/brand'
import { brand } from '../brand'
/**
* The immersive ground the whole product floats on.
+3 -3
View File
@@ -1,9 +1,9 @@
import { Anchor, Button, Checkbox, H2, Image, Label, Paragraph, XStack, YStack } from '@hanzo/ui'
import { useState } from 'react'
import { brand } from '~/brand'
import { useSession } from '~/data/session'
import { consent, usePref } from '~/settings/prefs'
import { brand } from '../brand'
import { useSession } from '../data/session'
import { consent, usePref } from '../settings/prefs'
/**
* What an installed app asks before it opens, and it asks once.
+1 -1
View File
@@ -12,7 +12,7 @@
*/
import { useEffect } from 'react'
import { brand } from '~/brand'
import { brand } from '../brand'
export const useTitle = (subject?: string | null) => {
useEffect(() => {
+1 -1
View File
@@ -11,7 +11,7 @@
import { ListTodo, Pause, Play, Square, X } from '@hanzogui/lucide-icons-2'
import { useState } from 'react'
import { useSession } from '~/data/session'
import { useSession } from '../data/session'
import { steer, useRun, useRuns } from './runs'
import { taskQueueStore, useTaskQueue } from './store'
+2 -2
View File
@@ -18,8 +18,8 @@
*/
import type { Session, SessionCommand, SessionDetail } from '@hanzo/ai'
import { client, ESTATE } from '~/data/origin'
import { invalidate, useRead } from '~/data/query'
import { client, ESTATE } from '../data/origin'
import { invalidate, useRead } from '../data/query'
const runs = ['runs'] as const
const one = (id: string) => ['runs', 'one', id] as const
+1 -1
View File
@@ -6,7 +6,7 @@
* row is selected. Those are this browser's and nobody else's, so they are an
* atom rather than a cache entry.
*/
import { atom, useAtom } from '~/data/store'
import { atom, useAtom } from '../data/store'
export type Queue = {
isOpen: boolean
+2 -2
View File
@@ -19,8 +19,8 @@
import { APIError, AuthError, type Leased, type Ran, type SandboxRuntime, type Wrote } from '@hanzo/ai'
import { useEffect, useState } from 'react'
import { client, ESTATE } from '~/data/origin'
import { requireLogin } from '~/data/gate'
import { client, ESTATE } from '../data/origin'
import { requireLogin } from '../data/gate'
/** `said` is what was typed; the rest is what the server answered. */
export type Line = { kind: 'said' | 'out' | 'err' | 'note'; text: string }
+3 -3
View File
@@ -11,9 +11,9 @@ import {
import { useEffect, useState } from 'react'
import { useNavigate } from 'react-router'
import { client, ESTATE } from '~/data/origin'
import * as store from '~/data/store'
import { useChannels } from '~/channels/store'
import { client, ESTATE } from '../data/origin'
import * as store from '../data/store'
import { useChannels } from '../channels/store'
import { exportStore, useExport } from './exportStore'
export const ExportModal = () => {
+1 -1
View File
@@ -3,7 +3,7 @@
*/
import { Sparkles } from '@hanzogui/lucide-icons-2'
import { Code } from '@hanzo/ui/chat'
import { artifactStore } from '~/artifact/store'
import { artifactStore } from '../artifact/store'
export interface FenceProps {
/** The word after the backticks. Shown in the label bar. */
+1 -1
View File
@@ -8,7 +8,7 @@
import { Paperclip } from '@hanzogui/lucide-icons-2'
import { SizableText, XStack } from '@hanzo/ui'
import type { Attachment } from '~/data/types'
import type { Attachment } from '../data/types'
import { Picture } from './Picture'
const UNITS = ['B', 'KB', 'MB', 'GB']
+1 -1
View File
@@ -12,7 +12,7 @@
*/
import { Failure } from '@hanzo/ui/chat'
import type { Message, Part } from '~/data/types'
import type { Message, Part } from '../data/types'
import { Files } from './Files'
import { Picture } from './Picture'
import { Prose } from './Prose'
+1 -1
View File
@@ -22,7 +22,7 @@ import { Fill } from '@hanzo/ui'
import { Thread as Scroll, type Source } from '@hanzo/ui/chat'
import { useCallback, useMemo, useState, type ReactNode } from 'react'
import type { Message } from '~/data/types'
import type { Message } from '../data/types'
import { build, path, type Choice, type Chosen, type Entry, type Vote } from './tree'
import { Turn } from './Turn'
+1 -1
View File
@@ -12,7 +12,7 @@
import { Step, type Ran } from '@hanzo/ui/chat'
import type { ReactNode } from 'react'
import type { ToolCall } from '~/data/types'
import type { ToolCall } from '../data/types'
import { Fence } from './Fence'
/** Tools whose name is machinery. Everything else reads fine as it arrives. */
+1 -1
View File
@@ -22,7 +22,7 @@
*/
import type { Source } from '@hanzo/ui/chat'
import type { Feedback, Message } from '~/data/types'
import type { Feedback, Message } from '../data/types'
/** A thumbs-up or thumbs-down on an answer. */
export type Vote = Feedback['rating']
+1 -4
View File
@@ -17,10 +17,7 @@
// extension, and nothing emits, so importing one is exact rather than lax.
"allowImportingTsExtensions": true,
"skipLibCheck": true,
"noEmit": true,
"paths": {
"~/*": ["./src/*"]
}
"noEmit": true
},
"include": ["src", "vite.config.ts"]
}