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
16 changes: 16 additions & 0 deletions .changeset/app-peer-naming.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
'@inkcre/core': patch
'@inkcre/web': patch
'@inkcre/webext': patch
'@inkcre/ext-caldav': patch
'@inkcre/ext-capture': patch
'@inkcre/ext-github': patch
'@inkcre/ext-local-files': patch
'@inkcre/ext-mail': patch
'@inkcre/ext-memos': patch
'@inkcre/ext-twitter': patch
---

将应用命名统一为 Web / WebExt,明确应用与运行 Peer 的角色;保留浏览器身份、存储、已发布扩展协议与部署兼容入口,构建和开发工具采用新的应用目录与 Runtime 导入名。

对仍准入的 Runtime 0.4.2 单独更新 Zod 依赖至修复版,保留原发布包身份与完整性。
4 changes: 2 additions & 2 deletions .changeset/core-app-separation.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
'@inkcre/core': patch
'@inkcre/client-web': patch
'@inkcre/client-webext': patch
'@inkcre/web': patch
'@inkcre/webext': patch
---

在既有 0.4 兼容线新增无 Vue/Pinia 依赖的 `@inkcre/core/sdk` 入口,提供显式连接的数据访问、字节存储、认证与协议合同;现有应用入口保留兼容,并复用相同传输和存储实现。Web/WebExt 随其内嵌 Core 更新,不要求 MF 分发迁移 Host ABI。
4 changes: 2 additions & 2 deletions .changeset/observability-unification.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
'@inkcre/core': patch
'@inkcre/client-web': patch
'@inkcre/client-webext': patch
'@inkcre/web': patch
'@inkcre/webext': patch
---

统一观测记录的采集与查询,默认使用内置信息库,选定 Loki 时通过具备能力的 Peer 读写;Web 提供全局筛选、关联时间线与明确的后端/历史状态,Job 生命周期记录不再依赖额外 OTEL 出口开关。
2 changes: 1 addition & 1 deletion .github/pages-preview-closed/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<body>
<main>
<h1>This pull-request preview is closed.</h1>
<p>Review the accepted client at <a href="https://app.inkcre.dev/">app.inkcre.dev</a>.</p>
<p>Review the accepted Web App at <a href="https://app.inkcre.dev/">app.inkcre.dev</a>.</p>
</main>
</body>
</html>
10 changes: 5 additions & 5 deletions .github/preview/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,27 @@
{
"kind": "module_federation",
"producer": "../../extensions/caldav/package.json",
"artifact": "../../extensions/caldav/dist/client-web"
"artifact": "../../extensions/caldav/dist/web"
},
{
"kind": "module_federation",
"producer": "../../extensions/capture/package.json",
"artifact": "../../extensions/capture/dist/client-web"
"artifact": "../../extensions/capture/dist/web"
},
{
"kind": "module_federation",
"producer": "../../extensions/twitter/package.json",
"artifact": "../../extensions/twitter/dist/client-web"
"artifact": "../../extensions/twitter/dist/web"
},
{
"kind": "module_federation",
"producer": "../../extensions/mail/package.json",
"artifact": "../../extensions/mail/dist/client-web"
"artifact": "../../extensions/mail/dist/web"
},
{
"kind": "module_federation",
"producer": "../../extensions/github/package.json",
"artifact": "../../extensions/github/dist/client-web"
"artifact": "../../extensions/github/dist/web"
}
]
}
8 changes: 5 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Client checks
name: App checks

on:
pull_request:
Expand All @@ -17,7 +17,7 @@ permissions:

concurrency:
group: >-
client-checks-${{
app-checks-${{
github.event.pull_request.number ||
github.ref
}}
Expand Down Expand Up @@ -122,6 +122,7 @@ jobs:
scripts/tests/pages-preview.test.mjs

peer-database:
# Existing branch protection binds this exact check name.
name: client-web E2E
needs: core-release
runs-on: ubuntu-latest
Expand Down Expand Up @@ -171,6 +172,7 @@ jobs:
retention-days: 7

browser-extension:
# Existing branch protection binds this exact check name.
name: client-webext E2E
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -198,7 +200,7 @@ jobs:
run: pnpm test:e2e:webext

- name: Build the Firefox extension
run: pnpm --filter @inkcre/client-webext build:firefox
run: pnpm --filter @inkcre/webext build:firefox

- name: Verify WebExt delivery rules
run: node --test scripts/tests/webext-release.test.mjs
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pages-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
wranglerVersion: 4.114.0
workingDirectory: release
command: >-
pages deploy apps/client-web/dist
pages deploy apps/web/dist
--project-name=${{ vars.CLOUDFLARE_PAGES_PROJECT }}
--branch=main
--commit-hash=${{ needs.identity.outputs.source_sha }}
Expand All @@ -108,4 +108,4 @@ jobs:
env:
CLOUDFLARE_PAGES_DEPLOYMENT_ID: ${{ steps.pages.outputs.pages-deployment-id }}
CLOUDFLARE_PAGES_DEPLOYMENT_URL: ${{ steps.pages.outputs.deployment-url }}
INKCRE_CLIENT_WEB_ORIGIN: https://app.inkcre.dev
INKCRE_WEB_ORIGIN: https://app.inkcre.dev
4 changes: 2 additions & 2 deletions .github/workflows/pages-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ jobs:
--inventory .github/preview/extensions.json \
--public-origin "$PREVIEW_ORIGIN" \
--output .preview-registry
cp -R .preview-registry/. apps/client-web/dist/
cp -R apps/client-web/dist "$GITHUB_WORKSPACE/.pages-preview"
cp -R .preview-registry/. apps/web/dist/
cp -R apps/web/dist "$GITHUB_WORKSPACE/.pages-preview"

- name: Bind Module Federation assets to the selected snapshot
env:
Expand Down
2 changes: 1 addition & 1 deletion .oxlintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"ignorePatterns": [
"docs/_shared/**",
"apps/client-webext/components.d.ts",
"apps/webext/components.d.ts",
".agents/skills/**",
"tasks/**"
],
Expand Down
2 changes: 1 addition & 1 deletion .vscode/default.code-snippets
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
// Place your client-web workspace snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
// Place your web workspace snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
Expand Down
6 changes: 3 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ Before choosing a design, identify shared state, business contracts, and each pa

## Repository Map

- `apps/client-web/`: static Vue SPA (the web peer)
- `apps/client-webext/`: WXT browser extension (the browser-extension peer)
- `apps/web/`: static Vue SPA (the web peer)
- `apps/webext/`: WXT browser extension (the browser-extension peer)
- `packages/core/`: shared models, protocols, storage/resolver mechanics, Extension Host
- `packages/ext-dev-utils/`: extension development utilities
- `extensions/`: independently versioned native Module Federation producers (mail, memos, twitter)
Expand All @@ -48,7 +48,7 @@ For UI work, read the installed `@inkcre/ui-web` package's `DESIGN.md` and `skil
- Runtime: Node.js 22.22.3; package manager: pnpm 11.11.0. Exact commands live in `package.json` and `docs/40-deployment/`.
- `.env` files are dotenv data, not shell scripts. Load them through the application because values may contain shell metacharacters.
- Generated contracts under `contracts/` are checked-in projections. Change their source and regenerate; do not edit them directly.
- The `apps/client-webext/` WXT extension and the `apps/client-web/` Vue SPA share `@inkcre/core` but run in different security contexts. Changes that cross the seam must be validated against both runtimes.
- The `apps/webext/` WXT extension and the `apps/web/` Vue SPA share `@inkcre/core` but run in different security contexts. Changes that cross the seam must be validated against both runtimes.
- Follow `.agents/prompts/code-for-human.md` for source changes.

## Governance And Workflow
Expand Down
8 changes: 4 additions & 4 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Repository Architecture

This monorepo implements three logical client-side units across shared packages, applications, and
This monorepo implements three logical browser units across shared packages, applications, and
independently built Extension producers.

```text
Expand All @@ -12,7 +12,7 @@ Module Federation producers ---+ | |

## Logical Units

- [Client Runtime and Delegation](docs/30-unit-tdd/client-runtime-and-delegation.md) owns the
- [App Runtime and Delegation](docs/30-unit-tdd/app-runtime-and-delegation.md) owns the
environment-neutral browser Peer, bootstrap/authentication authority, exact capability
delegation, and navigation hosts.
- [Info-Base](docs/30-unit-tdd/info-base.md) owns graph models, hydration, byte storage, exact
Expand Down Expand Up @@ -40,8 +40,8 @@ locations, not Unit boundaries.

- `packages/core/` - shared models, database access, Peer protocols, storage/Resolver mechanics,
configuration/authentication, and Extension Host.
- `apps/client-web/` - Vue SPA, graph/list surfaces, settings, and static Vite artifact.
- `apps/client-webext/` - WXT browser surfaces and content scripts.
- `apps/web/` - Vue SPA, graph/list surfaces, settings, and static Vite artifact.
- `apps/webext/` - WXT browser surfaces and content scripts.
- `extensions/` - independently built native Module Federation producers.
- `packages/ext-dev-utils/` - producer development support consumed by applications.

Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ development or production info-base.

## Monorepo boundaries and change names

- `apps/client-web/` and `apps/client-webext/` are independently delivered applications.
- `apps/web/` and `apps/webext/` are independently delivered applications.
- `packages/core/` and `packages/ext-dev-utils/` are shared packages.
- Each `extensions/<id>/` is an independently versioned Module Federation distribution.

Use the primary area as the `type(scope): summary` scope: `client-web`, `client-webext`, `core`,
Use the primary area as the `type(scope): summary` scope: `web`, `webext`, `core`,
`ext-dev-utils`, or an Extension ID such as `twitter`. Use `extensions` for one coherent change
spanning several Extensions and `release` for release tooling. The title does not select versions;
list every affected release project in the pull-request body. Examples: `fix(client-web): retain peer
list every affected release project in the pull-request body. Examples: `fix(web): retain peer
selection`, `feat(twitter): show archived media`, and `ref(extensions): share host bootstrap`.

For user-visible behavior or another delivered contract, run `pnpm changeset` and select the exact
Expand Down
12 changes: 6 additions & 6 deletions FILESYSTEM.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
- `.agents/` - Consumer-owned Agent prompts and shared-doc workflow bridge.
- `.github/` - CI, release, deployment, contextual coding instructions, and explicit preview
inventories under `.github/preview/`.
- `apps/client-web/` - Static Vue application.
- `apps/client-webext/` - WXT browser extension.
- `apps/web/` - Static Vue application.
- `apps/webext/` - WXT browser extension.
- `contracts/` - Checked upstream release and compatibility inputs.
- `docs/` - Local durable technical owners; `_shared/` is the read-only Hub reference.
- `extensions/` - Independently versioned native Module Federation producers.
Expand All @@ -18,10 +18,10 @@

## Primary Entrypoints

- `apps/client-web/src/main.ts` - Web bootstrap.
- `apps/client-web/src/core.ts` - Core registration and initialization.
- `apps/client-web/src/router.ts` - Web route authority.
- `apps/client-webext/entrypoints/` - WXT-discovered extension surfaces.
- `apps/web/src/main.ts` - Web bootstrap.
- `apps/web/src/core.ts` - Core registration and initialization.
- `apps/web/src/router.ts` - Web route authority.
- `apps/webext/entrypoints/` - WXT-discovered extension surfaces.
- `packages/core/src/sdk.ts` - Independent SDK exports with explicit connections.
- `packages/core/src/index.ts` - Published Vue/MF compatibility exports.
- `extensions/*/src/index.ts` - Host-consumed Extension exports.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ The TypeScript peer of InKCre — the web application, the browser extension, an
## Repository shape

- `packages/core/` — `@inkcre/core` shared SDK (info-base model, storage, resolvers, retrieval, extension host)
- `apps/client-web/` — Vue 3 web application (static Vite artifact)
- `apps/client-webext/` — WXT browser extension
- `apps/web/` — Vue 3 web application (static Vite artifact)
- `apps/webext/` — WXT browser extension
- `extensions/` — independently built native Module Federation producers (`ext-github`, `ext-mail`, `ext-twitter`, `ext-memos`)

## Quickstart
Expand Down
10 changes: 5 additions & 5 deletions apps/client-web/AGENTS.md → apps/web/AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Client-Web
# Web App

Static Vue application and equal InKCre database Peer.

## Owners

- Runtime, Peer delegation, configuration, and authentication: `../../docs/30-unit-tdd/client-runtime-and-delegation.md`.
- Runtime, Peer delegation, configuration, and authentication: `../../docs/30-unit-tdd/app-runtime-and-delegation.md`.
- Info-Base and Resolver contracts: `../../docs/30-unit-tdd/info-base.md`.
- Native Extension Host: `../../docs/30-unit-tdd/native-extension-runtime.md`.
- Local and sibling-UI development lanes: `../../docs/40-deployment/development-runtime.md`.
Expand All @@ -14,12 +14,12 @@ Static Vue application and equal InKCre database Peer.

- Keep deployable artifacts environment-neutral: no service origin, Peer identity, JWT secret, Worker runtime, or `/api/config` fallback.
- Browser-owned settings are runtime authority. Keep the JWT signing secret masked during ordinary display and absent from logs. The explicit full-browser export includes it so another browser can restore the same experience.
- Use **Peer** for InKCre runtime nodes in both technical contracts and product UI. Keep “client” only for actual application or protocol client roles.
- Use **Peer** for InKCre runtime nodes in both technical contracts and product UI. Keep “client” only for actual protocol client roles.
- Preserve exact capability delegation and typed unknown outcomes; do not replace them with a generic Core API path or automatic retry after ambiguous dispatch.
- Start development through root commands so SVC and Portless preserve worktree identity. The sibling UI source lane is explicitly non-release evidence.

## Checks

- `pnpm --filter @inkcre/client-web type-check`
- `pnpm --filter @inkcre/client-web build`
- `pnpm --filter @inkcre/web type-check`
- `pnpm --filter @inkcre/web build`
- `pnpm check`
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions apps/client-web/package.json → apps/web/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@inkcre/client-web",
"name": "@inkcre/web",
"version": "0.2.1",
"private": true,
"type": "module",
Expand All @@ -15,7 +15,7 @@
"dependencies": {
"@dagrejs/dagre": "^3.1.2",
"@inkcre/core": "workspace:*",
"@inkcre/extension-runtime-client-web": "https://github.com/InKCre/ext-reg/releases/download/runtime-client-web-v0.4.2/inkcre-extension-runtime-client-web-0.4.2.tgz",
"@inkcre/extension-runtime-web": "https://github.com/InKCre/ext-reg/releases/download/runtime-client-web-v0.4.2/inkcre-extension-runtime-client-web-0.4.2.tgz",
"@inkcre/ui-web": "2.7.0",
"@module-federation/runtime": "^0.21.4",
"@supabase/postgrest-js": "^2.118.0",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# Component Subtree Instructions

Scope: `apps/client-web/src/components/**`.
Scope: `apps/web/src/components/**`.

## Hazards and Owners

- Domain contracts belong to `@inkcre/core` or the owning application domain. Do not create a
component-local copy of a model merely to shape props or emits.
- Solved-content renderer selection belongs to the core `Resolver` registration. Keep
`SolvedContentRenderer` as a dynamic handoff; do not add a second resolver-to-component map here.
- Keep InKCre runtime-node names under `peer/` and use “Peer” in user-facing copy. Use “client” only for actual application or protocol client roles.
- Keep InKCre runtime-node names under `peer/` and use “Peer” in user-facing copy. Use “client” only for actual protocol client roles.

General component file guidance lives in
[component.instructions.md](../../../../.github/instructions/component.instructions.md). Stable
runtime and Info-Base semantics belong to `../../../../docs/30-unit-tdd/`.

## Checks

- Run `pnpm --filter @inkcre/client-web type-check` after changing component contracts or Vue code.
- Run `pnpm --filter @inkcre/client-web test` when changing behavior covered by component specs.
- Run `pnpm --filter @inkcre/web type-check` after changing component contracts or Vue code.
- Run `pnpm --filter @inkcre/web test` when changing behavior covered by component specs.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ExtensionModel, ExtensionRegistryOriginResolver, configStore } from '@i
import {
getExtensionDocumentation,
type ExtensionDocumentationLink,
} from '@inkcre/extension-runtime-client-web'
} from '@inkcre/extension-runtime-web'
import type { JsonEditorValidation } from '@inkcre/ui-web'
import type { ExtensionCardData, useExtensionPeerRuntime } from './use-extension-peer-runtime'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
type NativeDistribution,
type Peer,
} from '@inkcre/core'
import { manageExtensionOnPeer } from '@inkcre/extension-runtime-client-web'
import { manageExtensionOnPeer } from '@inkcre/extension-runtime-web'
import {
extensionHostRestoreState,
extensionHostConnectionReady,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
RegistryReleaseError,
sortPublishedReleases,
type ReleaseRecord,
} from '@inkcre/extension-runtime-client-web'
} from '@inkcre/extension-runtime-web'
import { getExtensionHost, getExtensionRegistry } from '@/core'
import { selectExtensionPeerVersion } from '@/extension-peer-control'
import type { ExtensionCardData, useExtensionPeerRuntime } from './use-extension-peer-runtime'
Expand Down
Loading
Loading