Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .agents/skills/release/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ description: 使用统一产品 Tag 或独立官网 Tag 发布 Vibeface,构建

`ci.yml` 保留 `23 */4 * * *`,UTC 槽位为 00:23、04:23、08:23、12:23、16:23、20:23。GitHub schedule 是 best effort,可能延迟或跳过,不保证每槽运行。仅 main schedule 的 `ci-gate` 成功后运行 `scripts/daily-nightly.py`;手动 CI 和普通 main push 不自动发布 Nightly。

协调器只用 `GITHUB_TOKEN`,不需要 PAT,不创建版本分支或 PR,不合入 main。以原 schedule run 的精确 main SHA 作唯一 parent,生成普通机械版本提交,只改七个版本文件中的发行版本、Cargo.lock 两个本仓包版本及 Android、iOS 构建号,保留 marketing version、依赖和其他内容。共享验证器对比完整 tree,并运行 `cargo metadata --locked --no-deps`,不以路径白名单放行。
协调器只用 `GITHUB_TOKEN`,不需要 PAT,不创建版本分支或 PR,不合入 main。以原 schedule run 的精确 main SHA 作唯一 parent,生成普通机械版本提交,只改七个版本文件中的发行版本、Cargo.lock 两个本仓包版本及 Android、iOS 构建号,保留 marketing version、依赖和其他内容。共享验证器对比完整 tree,并运行 `cargo metadata --locked --no-deps` 核对两个本仓包的清单版本(这条命令带 `--no-deps` 时不校验锁文件),不以路径白名单放行。

原 run 的 UTC `created_at` 向下取整到四小时批次,版本日期仍取该 run 的 `YYYYMMDD`。提交记录原 schedule run ID、批次和上一可信产品 Nightly 来源。移动构建号从 main 与上一可信 Nightly 取数值上界后加一;iOS 按数字分段比较,末段溢出时停止,不回绕。协调器全局串行。同批次、延迟或跨日恢复保持原版本、构建号、提交与 artifact;上一来源完整发布且 npm 成功、main 无新提交时跳过。部分 Tag、Release 或 npm 必须先恢复原来源,不新建版本覆盖。

Expand Down Expand Up @@ -80,7 +80,7 @@ GitHub 的不可变发布 Tag 规则保护产品 `v*`、官网与历史应用 Ta
## 处理现存 tag 与失败

- 同名本地或远端 tag 已存在:解析 annotated tag 的最终 commit 并核对 SHA。不同提交立即停止,禁止覆盖、强推、删除重建或改保护规则。同一提交的本地 tag 可直接推送;远端已存在则检查已有 Release 和关联 runs,已成功就报告已有结果。
- 相同 tag、相同源码的构建因基础设施失败时,先对账并保留已有制品,再重跑失败任务。需要重新派发时使用 `gh workflow run release.yml --repo leaperone/vibeface --ref "$TAG" -f app="$APP" -f tag="$TAG" -F publish=true`。不重新打 tag,不覆盖已上传字节;若重建结果与已上传制品不同,停止重试并使用新版本。
- 相同 tag、相同源码的构建因基础设施失败时,先对账并保留已有制品,再重跑失败任务。需要重新派发时使用 `gh workflow run release.yml --repo leaperone/vibeface --ref "$TAG" -f app="$APP" -f tag="$TAG" -F publish=true`。自动 Nightly 的 tag 不重新派发:协调器要求每个 tag 只有一个 release run,出现第二个 run 就判定该来源未完成并停止,只重跑原 run 的失败 job。不重新打 tag,不覆盖已上传字节;若重建结果与已上传制品不同,停止重试并使用新版本。
- 修复源码必须走新 PR 和新版本、新 tag。构建中的同一 Release 允许追加其他已校验平台的附件;已公开字节和 tag 不覆盖、不删除。回滚也通过新版本交付修正。
- 推送或发布返回结果未知时,先查询远端 tag、Release 和 Actions 对账,再决定下一步。不要直接重发。

Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ node_modules/
.e2e/summary.md
.e2e/logs/
.e2e/videos/
__pycache__/
.DS_Store
4 changes: 2 additions & 2 deletions .preflight.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ build = "python3 -c 'import ast,pathlib; [ast.parse(pathlib.Path(p).read_text())

[[domain_check]]
name = "Rust workspace"
trigger_paths = ["crates/delivery/**", "apps/core/src/**", "apps/cli/src/**", "crates/control/src/**", "crates/bridge/src/**", "crates/protocol/src/**", "crates/secure/src/**", "crates/*/Cargo.toml", "apps/core/Cargo.toml", "apps/cli/Cargo.toml", "apps/core/build.rs", "apps/core/migrations/**", "apps/core/schema.hcl", "Cargo.toml", "Cargo.lock", "rust-toolchain*", ".cargo/**"]
command = "cargo fmt --all -- --check && python3 scripts/ci.py test --tier fast --packages vibeface-protocol vibeface-bridge vibeface-secure vibeface-core vibeface-control vibeface vibeface-delivery && cargo clippy --workspace --all-targets --locked -- -D warnings"
trigger_paths = ["crates/delivery/**", "apps/core/src/**", "apps/cli/src/**", "crates/control/src/**", "crates/bridge/src/**", "crates/protocol/src/**", "crates/secure/src/**", "crates/secure-ffi/**", "crates/*/tests/**", "apps/core/tests/**", "crates/*/Cargo.toml", "apps/core/Cargo.toml", "apps/cli/Cargo.toml", "apps/core/build.rs", "apps/core/migrations/**", "apps/core/schema.hcl", "Cargo.toml", "Cargo.lock", "rust-toolchain*", ".cargo/**"]
command = "cargo fmt --all -- --check && python3 scripts/ci.py test --tier fast --packages vibeface-protocol vibeface-bridge vibeface-secure vibeface-core vibeface-control vibeface vibeface-delivery vibeface-secure-ffi && cargo clippy --workspace --all-targets --locked -- -D warnings"

[[domain_check]]
name = "Delivery proof and settlement"
Expand Down
11 changes: 2 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ axum = { version = "0.8", features = ["ws"] }
clap = { version = "4", features = ["derive", "env"] }
flate2 = "1"
futures-util = { version = "0.3", features = ["sink"] }
ed25519-dalek = { version = "2", features = ["rand_core"] }
ed25519-dalek = "2"
hex = "0.4"
iroh = "=1.3.0"
iroh-relay = { version = "=1.3.0", features = ["server"] }
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,18 @@ The platform package is written to `.artifacts/packages/`. See [source setup](pa
│ ├── app/ # Web app
│ ├── cli/ # Command line
│ ├── core/ # Node service
│ ├── desktop/ # Desktop app
│ ├── mobile/ # iOS and Android apps
│ └── www/ # Public website
├── crates/ # Shared Rust libraries
├── packages/
│ ├── client/ # Shared app client
│ ├── docs/ # User and developer guides
│ ├── secure-native/ # Rust crypto bindings for the mobile apps
│ └── theme/ # Shared styles
├── config/ # Official public node address
├── contracts/ # Experimental file delivery contracts
├── deploy/ # Container deployment for the official services
├── scripts/ # Build, package, and verification tools
├── tests/ # Fixtures and end-to-end tests
└── install.sh # Package installer
Expand Down
6 changes: 5 additions & 1 deletion README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

[![CI](https://github.com/leaperone/vibeface/actions/workflows/ci.yml/badge.svg)](https://github.com/leaperone/vibeface/actions/workflows/ci.yml)
[![Release](https://img.shields.io/github/v/release/leaperone/vibeface?include_prereleases&label=release)](https://github.com/leaperone/vibeface/releases)
[![Platforms](https://img.shields.io/badge/platform-macOS%20arm64%20%7C%20Linux%20x64%20%7C%20Linux%20arm64-lightgrey)](packages/docs/install.md)
[![Platforms](https://img.shields.io/badge/platform-macOS%20arm64%20%7C%20Windows%20x64%20%7C%20Linux%20x64%20%7C%20Linux%20arm64-lightgrey)](packages/docs/install.md)

</div>

Expand Down Expand Up @@ -136,14 +136,18 @@ bash scripts/package-node.sh
│ ├── app/ # 网页应用
│ ├── cli/ # 命令行
│ ├── core/ # Node 本机服务
│ ├── desktop/ # 桌面应用
│ ├── mobile/ # iOS 和 Android 应用
│ └── www/ # 公共网站
├── crates/ # 共享 Rust 库
├── packages/
│ ├── client/ # 共享应用客户端
│ ├── docs/ # 用户和开发者指南
│ ├── secure-native/ # 移动应用使用的 Rust 加密绑定
│ └── theme/ # 共享样式
├── config/ # 官方公共节点地址
├── contracts/ # 实验性文件交付合约
├── deploy/ # 官方服务的容器部署
├── scripts/ # 构建、打包和验证工具
├── tests/ # 测试夹具和端到端测试
└── install.sh # 安装脚本
Expand Down
4 changes: 2 additions & 2 deletions apps/app/components.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
"rtl": false,
"aliases": {
"components": "#components",
"utils": "#lib/utils",
"utils": "@/lib/utils",
"ui": "#components/ui",
"lib": "#lib",
"lib": "@/lib",
"hooks": "#hooks"
},
"menuColor": "default",
Expand Down
5 changes: 1 addition & 4 deletions apps/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@
"private": true,
"type": "module",
"imports": {
"#/*": "./src/*",
"#components/*": "./src/components/*",
"#hooks/*": "./src/lib/hooks/*",
"#lib/*": "./src/lib/*",
"#lib/utils": "./src/lib/utils.ts"
"#hooks/*": "./src/lib/hooks/*"
},
"scripts": {
"dev": "vite dev --port 3000",
Expand Down
2 changes: 1 addition & 1 deletion apps/app/src/components/app/bot-face.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function apply(frame: Frame, parts: { g: SVGGElement; ring: SVGPathElement; body
const transformOf = (frame: Frame) => `translate(${50 + frame.dx} ${50 + frame.dy}) rotate(${frame.rotate}) scale(${frame.scale}) translate(-50 -50)`

/** Who a face belongs to: its id gives what `avatar` leaves out. */
export type FaceBot = Pick<BotRecord, "bot_id" | "avatar">
type FaceBot = Pick<BotRecord, "bot_id" | "avatar">

/** A bot's face, picked by its id and avatar and moving with its mood. Hidden from screen readers: the name next to it says who, and lists say the mood. `halo`: a still glow in the bot's tint behind the face, 1.8 times its size. `still` draws one frame and leaves the clock, for previews. */
export function BotFace({ bot, mood, size, halo, still, className }: { bot: FaceBot; mood: Mood; size: number; halo?: string; still?: boolean; className?: string }) {
Expand Down
1 change: 0 additions & 1 deletion apps/app/src/features/chat/conversation-screen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,6 @@ export function ConversationScreen({ missing = false, active }: { missing?: bool
hint={notice}
reason={reason}
disabled={sendDisabled}
busy={false}
sendLabel={intent === 'defer' ? '保存为稍后处理' : intent === 'new_task' ? '发送为新任务' : targetBusy ? '补充当前工作' : '发送'}
tools={<IntentMenu intent={intent} busy={targetBusy} onChange={setIntent} />}
onStop={workspace.writable && (inputTarget.kind === 'bot_main' ? stopJob : targetBusy) ? () => { setSendError(null); workspace.stopInputTarget({ target: inputTarget }).catch(setSendError) } : undefined}
Expand Down
5 changes: 1 addition & 4 deletions apps/app/src/features/chat/elements/chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ export type ChatEntry =
| { key: string; anchor?: boolean; message: ChatMessage; conversationId?: string; schedule?: string; retry?: () => Promise<void>; detail?: string }
| { key: string; anchor?: undefined; node: ReactNode }

/** Tasks one turn started stack as a group instead of spacing out like separate turns. */
const stacked = (entry: ChatEntry, previous: ChatEntry) => entry.key.startsWith('task:') && previous.key.startsWith('task:')

/** Opening a chat with 新消息 brings it into view. */
function ToUnread({ shown }: { shown: boolean }) {
const { scrollToMessage } = useMessageScroller()
Expand Down Expand Up @@ -67,7 +64,7 @@ export function Chat({ entries, empty }: { entries: ChatEntry[]; empty: ReactNod
{/* Room for a toast over the composer, so the last card can scroll clear of it. */}
<MessageScrollerContent className="mx-auto w-full max-w-(--page-width) gap-0 px-4 pt-6 pb-[calc(1.5rem+var(--toast-cover,0px))] sm:px-6">
{entries.map((entry, index) => (
<MessageScrollerItem key={entry.key} messageId={entry.key} scrollAnchor={index === anchor || undefined} className={cn(index > 0 && (stacked(entry, entries[index - 1]) ? 'mt-2' : 'mt-6'), entered.current.has(entry.key) && 'message-enter')}>
<MessageScrollerItem key={entry.key} messageId={entry.key} scrollAnchor={index === anchor || undefined} className={cn(index > 0 && 'mt-6', entered.current.has(entry.key) && 'message-enter')}>
{'message' in entry ? <Message message={entry.message} conversationId={entry.conversationId} schedule={entry.schedule} time={times.get(entry.message.message_id)} retry={entry.retry} detail={entry.detail} /> : entry.node}
</MessageScrollerItem>
))}
Expand Down
12 changes: 4 additions & 8 deletions apps/app/src/features/chat/elements/prompt-input.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { useId, useLayoutEffect, useRef, useState, type ChangeEvent, type KeyboardEvent, type MouseEvent, type ReactNode } from 'react'
import { ArrowUpIcon, CircleAlertIcon, PaperclipIcon, SquareIcon, XIcon } from 'lucide-react'
import { Spinner } from '@/components/ui/spinner'
import { cn } from '@/lib/utils'
import { isSubmitKey } from '@vibeface/client/chat/protocol.ts'
import { attachmentLimit } from '@vibeface/client/workspace/model.ts'
Expand All @@ -18,7 +17,6 @@ export function PromptInput({
hint,
reason,
disabled,
busy,
onChange,
onSubmit,
onStop,
Expand All @@ -37,7 +35,6 @@ export function PromptInput({
hint: string
reason: string
disabled: boolean
busy: boolean
onChange: (value: string) => void
onSubmit: () => void
onStop?: () => void
Expand Down Expand Up @@ -66,7 +63,7 @@ export function PromptInput({
// Caught on pick: the upload would only refuse it after the person pressed Send.
const unfits = (file: File) => !file.size || file.size > attachmentLimit
const unfit = files.find(unfits)
const sendable = !disabled && !busy && drafting && !unfit
const sendable = !disabled && drafting && !unfit
const limit = `${attachmentLimit / 2 ** 20} MiB`
const note = disabled && reason ? reason : hint
// The box sizes itself to the text (field-sizing), already at its new height when this runs; CSS cannot ease
Expand Down Expand Up @@ -126,14 +123,14 @@ export function PromptInput({
<InputGroupAddon align={open ? 'block-end' : 'inline-end'} className={open ? 'flex-wrap ps-1 pe-1.5 pt-1 pb-1.5' : 'py-0 pe-1.5'}>
{onFiles ? <>
<input ref={pickerRef} type="file" multiple hidden onChange={(event) => { onFiles([...files, ...event.target.files ?? []]); event.target.value = '' }} />
<InputGroupButton type="button" variant="ghost" size="icon-sm" className="relative size-9 rounded-full text-muted-foreground hover:text-foreground max-md:size-11" aria-label={files.length ? `添加附件,已选 ${files.length} 个` : '添加附件'} title="添加附件" disabled={disabled || busy} onMouseDown={keepFocus} onClick={() => pickerRef.current?.click()}>
<InputGroupButton type="button" variant="ghost" size="icon-sm" className="relative size-9 rounded-full text-muted-foreground hover:text-foreground max-md:size-11" aria-label={files.length ? `添加附件,已选 ${files.length} 个` : '添加附件'} title="添加附件" disabled={disabled} onMouseDown={keepFocus} onClick={() => pickerRef.current?.click()}>
<PaperclipIcon aria-hidden="true" />
{!open && files.length ? <span aria-hidden="true" className="absolute end-1 top-1 grid min-w-4 place-items-center rounded-full bg-primary px-1 text-[11px] leading-4 text-primary-foreground tabular-nums">{files.length}</span> : null}
</InputGroupButton>
{open && files.map((file, index) => <span key={`${file.name}:${index}`} title={file.name} className={cn('flex max-w-56 min-w-0 items-center gap-1 rounded-full ps-3 text-meta', unfits(file) ? 'border border-danger-border bg-danger-soft text-danger' : 'bg-muted')}>
{unfits(file) ? <CircleAlertIcon aria-label={file.size ? `超过 ${limit}` : '空文件'} className="-ms-1 size-3.5 shrink-0" /> : null}
<FileName name={file.name} />
<button type="button" onMouseDown={keepFocus} className="hit-area relative grid size-8 shrink-0 place-items-center rounded-full hover:bg-background" aria-label={`移除 ${file.name}`} disabled={busy} onClick={() => onFiles(files.filter((_, at) => at !== index))}><XIcon aria-hidden="true" className="size-3.5" /></button>
<button type="button" onMouseDown={keepFocus} className="hit-area relative grid size-8 shrink-0 place-items-center rounded-full hover:bg-background" aria-label={`移除 ${file.name}`} onClick={() => onFiles(files.filter((_, at) => at !== index))}><XIcon aria-hidden="true" className="size-3.5" /></button>
</span>)}
</> : null}
{tools}
Expand All @@ -146,14 +143,13 @@ export function PromptInput({
variant="default"
size="icon-sm"
disabled={!sendable}
aria-busy={busy || undefined}
aria-label={sendLabel}
title={sendLabel}
style={sendable && tint ? { backgroundColor: tint.fill, color: tint.ink } : undefined}
className={cn('size-9 rounded-full max-md:size-11', sendable ? 'hover:opacity-88' : 'bg-muted text-muted-foreground disabled:opacity-100')}
onMouseDown={keepFocus}
>
{busy ? <Spinner aria-hidden="true" /> : <ArrowUpIcon aria-hidden="true" />}
<ArrowUpIcon aria-hidden="true" />
</InputGroupButton>
</span>
</InputGroupAddon>
Expand Down
2 changes: 1 addition & 1 deletion apps/app/src/features/devices/ai-settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { useWorkspace } from "@vibeface/client/workspace/context.tsx"
import { terms } from "@/lib/glossary"
import { authenticationSourceLabels, canSetProviderEnvironment, localProviderIds, availability, summaryReadiness, botOnChange, folderSuggestions, type Availability, messageOf, modelTyped, parseAppServerLink, parseNodeSettings, parseProvider, probeIssueText, effortOptions, type ModelChoice, providerGroups, providerNames, providerObservationLabels, providerObservationStates, providerIds, type BackupPolicy, type AppServer, type AppServerLink, type AppServerMode, type ManagerSettings, type NodeSettings, type NodeSettingsResponse, type ProviderChange, type ProviderId, type ProviderIssue, type ProviderStatus } from "@vibeface/client/lib/node.ts"

export const docs = "https://github.com/leaperone/vibeface/blob/main/packages/docs/"
const docs = "https://github.com/leaperone/vibeface/blob/main/packages/docs/"
export const providerIcons: Record<ProviderId, LucideIcon> = { codex: SquareTerminal, cursor: MousePointer2, claude: Asterisk, pi: Pi, opencode: Braces }
const states: Record<Availability, { label: string; tone: Tone; icon: LucideIcon }> = {
ready: { label: "可用", tone: "success", icon: CircleCheck },
Expand Down
Loading
Loading