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
6 changes: 3 additions & 3 deletions 10-prd/domain-structure/cross-domain-interactions.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
- semantic contract: extensions add source, resolver, storage, sink, or protocol capability without bypassing graph or deployment ownership boundaries.
- shared language: extension, source, resolver, storage, sink, protocol, lifecycle hooks.

## Interaction Pair: Client -> Shared System
## Interaction Pair: Peer -> Shared System

- semantic contract: each client is one running node that can participate around the same shared info-base.
- shared language: client, runtime, shared system, info-base.
- semantic contract: each peer is one running node that can participate around the same shared info-base.
- shared language: peer, runtime, shared system, info-base.
2 changes: 1 addition & 1 deletion 10-prd/domain-structure/derived-boundaries.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
- derivation source: `../behavior/capabilities.md`, `../behavior/rules-and-invariants.md`
- boundary intent: add bounded source, resolver, storage, sink, or protocol capabilities through controlled registration and lifecycle hooks.

## Client
## Peer

- derivation source: `../behavior/capabilities.md`, `../behavior/rules-and-invariants.md`
- boundary intent: represent one runtime participant operating around the shared system.
8 changes: 4 additions & 4 deletions 10-prd/glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@
- user-visible or business lifecycle language: a pluggable way to extend the product without forking the core.
- notes on ambiguity with framework terms: this is product vocabulary, not only a Python packaging concept.

## client
## app

- canonical business meaning: a user-facing application through which a person interacts with InKCre or a compatible product protocol.
- user-visible or business lifecycle language: the app or interface a person uses.
- notes on ambiguity with framework terms: use `client` only for an actual application or a protocol-native client role; it is not a product-facing synonym for an InKCre runtime Peer.
- canonical business meaning: a runnable InKCre application that assembles Core capabilities with its environment, lifecycle, policies, and optional user interface.
- user-visible or business lifecycle language: the Web app, browser extension, desktop app, CLI, or service a person uses or runs.
- notes on ambiguity with framework terms: App names a delivered application; Peer names a running participant. App is distinct from the knowledge activity `application`. Reserve `client` for an actual protocol role, such as an HTTP, database, OAuth, or external Memos client; it does not name an InKCre product tier.

## peer

Expand Down
4 changes: 3 additions & 1 deletion 20-product-tdd/core-app-boundary.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ Core 可以执行 I/O、持有缓存和运行任务,也可以直接使用其

一个实现仓库可以交付库、多个应用和扩展;一个运行中的应用可承载 Peer。Core 库本身不因被安装或导入就成为在线 Peer。各语言实现也不构成一个必须同时发布或同时运行的中央系统。

产品名称与交付名称使用 App 或具体应用形态,如 Web 应用、浏览器扩展、桌面应用、CLI 和服务;身份、在线状态与能力管理使用 Peer。代码、配置、构建、发布及文档沿用这一区分,不使用 Client 表示 InKCre 的应用层或节点类别。HTTP、数据库、OAuth 等协议中的 client 仍保持其准确含义。命名迁移不得改变已保存的身份或数据归属;已发布产物、持久化键和旧协议入口若需要兼容,必须明确其过渡用途,新的产品入口使用当前名称。

数据库 schema 与迁移仍由 impl-py 拥有,所有 Peer 遵守同一个 [Peer database runtime contract](peer-database-runtime-contract.md)。使用哪种语言、哪种数据库传输或哪一种 App,不改变已认证 Peer 的协议权限。

## 责任分配
Expand Down Expand Up @@ -68,7 +70,7 @@ App:入口、交互、配置选择、启动退出与运行政策

## 配置、实例与生命周期

调用方显式创建操作所需的客户端或上下文,绑定目标部署、传输、凭据来源和已选能力。Core 内部传递已验证的类型,不重复依赖 App 的环境读取和表单校验。
调用方显式创建操作所需的库实例或上下文,绑定目标部署、传输、凭据来源和已选能力。Core 内部传递已验证的类型,不重复依赖 App 的环境读取和表单校验。

导入或链接基础 core 不读取必填应用环境、不连接数据库、不监听端口、不发布 Peer、不启动定时器、不安装扩展,也不触发权限 UI。对象构造可以建立本地状态;I/O 与后台执行通过公开、显式的操作或生命周期开始。

Expand Down
6 changes: 3 additions & 3 deletions 20-product-tdd/extension-documentation-hosting.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,16 @@ to Registry's executable API and local documentation.
Namespace publication authority also controls that namespace's documentation. Creating a set
requires a conditional create; replacing it requires the observed current entity tag. Only after
all files are available may Registry atomically move that set's entry to the new snapshot. A failed
upload or conflicting replacement leaves the previous entry intact. Clients resolve uncertain
upload or conflicting replacement leaves the previous entry intact. Publishers resolve uncertain
responses by retrying the same saved publication candidate. Its snapshot identity also identifies
that publication: once committed, the exact same target, content, provenance, and original write
precondition return the original commit receipt without changing the current-set pointer. Reusing
the identity for a different committed request is a conflict. A receipt confirms a historical commit,
not that its snapshot is still current; another publication may already have superseded it.

Clients may make bounded best-effort retries, but hosting does not guarantee eventual delivery.
Publishers may make bounded best-effort retries, but hosting does not guarantee eventual delivery.
When a receipt cannot be obtained, the outcome remains unknown and the candidate must remain
available for a later retry. Clients do not refresh the write precondition, generate a replacement
available for a later retry. Publishers do not refresh the write precondition, generate a replacement
identity, or infer failure merely because a response was lost. Authentication and Release lifecycle
rules also apply when confirming an earlier commit.

Expand Down
4 changes: 2 additions & 2 deletions 20-product-tdd/extension-release-and-installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Extension 不拥有独立共享数据表。资料使用 Block/Relation/Stora

宿主在改变运行状态前校验目标坐标、发布状态、元数据、原生产物和 SDK 条件。启用成功须包含完成启动和相应副作用;持久化失败需要按宿主生命周期清理或报告真实未收敛状态。保存目标版本不等于升级完成。

针对共享参与的显式启用和停用命令先保存参与意图,再应用运行变化;运行失败保留意图并报告实际错误,不以运行成功回调重新写入意图。原生宿主的本地停用先保存本机停用状态并停止运行,再尝试更新共享意图;连接、凭据或授权错误不能阻止本机停止,也不能将共享更新报告为成功。自动恢复只消费已有意图,不能将用户已撤回的启用写回。宿主串行处理同一参与记录的生命周期,并在异步初始化或激活后复核精确选择与启用意图;若意图已撤回或版本已变,清理迟到实例,不将它报告为当前运行结果。该串行边界只协调当前宿主,不能排除其他已准入客户端的数据库写入,也不保证持久意图与进程状态瞬时原子切换。
针对共享参与的显式启用和停用命令先保存参与意图,再应用运行变化;运行失败保留意图并报告实际错误,不以运行成功回调重新写入意图。原生宿主的本地停用先保存本机停用状态并停止运行,再尝试更新共享意图;连接、凭据或授权错误不能阻止本机停止,也不能将共享更新报告为成功。自动恢复只消费已有意图,不能将用户已撤回的启用写回。宿主串行处理同一参与记录的生命周期,并在异步初始化或激活后复核精确选择与启用意图;若意图已撤回或版本已变,清理迟到实例,不将它报告为当前运行结果。该串行边界只协调当前宿主,不能排除其他已准入 Peer 的数据库写入,也不保证持久意图与进程状态瞬时原子切换。

离线 Peer 只能接收待应用选择,不能被宣称已停止旧实例或已运行新版。租约过期不证明进程停止。Python 等宿主若安装会修改共享原生依赖环境,应暂停该 Peer 的执行,安装后从新进程启动;只停目标插件不足以证明其他已加载依赖安全。应用失败应报告失败或待处理,不能假定自动恢复旧环境或撤销插件已经执行的业务迁移。具体进程、打包和恢复操作留在宿主本地文档。

Expand All @@ -69,4 +69,4 @@ Registry v2 提供独立原生分发读写。v1 只读取历史统一坐标,

发布验收观察每种分发独立发布、缺少自身产物时保持不可公开、候选重试和提交身份一致,以及历史公开读取遵守封禁。部署验收包含精确旧版本迁移、未知分发延迟解析和非空业务 state 保留。

完整运行验收从实际 Client Web 安装入口进入目标 Peer 的启用、运行、停用和刷新恢复。一个 Peer 升级不能改变另一个同种分发 Peer 的选择;睡眠恢复、离线待应用和 Python 环境更新后的新进程也属于验收。插件案例需覆盖已有内容读取与按需执行、设置 UI 的先行运行以及共享业务数据延续。仅构建、独立 import 或调用 MF 容器不能代替实际入口验收。
完整运行验收从实际 Web 应用安装入口进入目标 Peer 的启用、运行、停用和刷新恢复。一个 Peer 升级不能改变另一个同种分发 Peer 的选择;睡眠恢复、离线待应用和 Python 环境更新后的新进程也属于验收。插件案例需覆盖已有内容读取与按需执行、设置 UI 的先行运行以及共享业务数据延续。仅构建、独立 import 或调用 MF 容器不能代替实际入口验收。
8 changes: 4 additions & 4 deletions 20-product-tdd/feature-retrieval-and-media-interpretation.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Define the shared semantics of the first feature-retrieval increment: Block-local lexical
projection, independently maintained derived records, exact local/Peer retrieval, faithful
multimodal text materialization, system-driven media interpretation, and client navigation.
multimodal text materialization, system-driven media interpretation, and app navigation.
Unit repositories still own framework classes, SQL queries, prompts, provider credentials,
storage implementations, UI styling, and runtime scheduling intervals.

Expand Down Expand Up @@ -108,7 +108,7 @@ query ---------------------------------------------------------> ranked existing
- Lexical maintenance later indexes the resulting text Blocks. This temporal composition
does not transfer record ownership to Organization.

## Peer Capability And Client Navigation
## Peer Capability And App Navigation

- Exact synchronous capability `core.feature_retrieval.lexical.v1` accepts one non-empty
textual query plus a result bound and returns the V1 lexical result. The business facade
Expand All @@ -117,10 +117,10 @@ query ---------------------------------------------------------> ranked existing
- `route_to_peer` / `routeToPeer` remains caller-local routing policy and does not enter the
capability payload.
- `InfoBaseListView` is the first list navigation host for retrieval results. Selecting a
result uses the client-supplied singleton `InfoBaseRouter`; List and Graph views may both
result uses the app-supplied singleton `InfoBaseRouter`; List and Graph views may both
realize Block Inspector and solved-content popup destinations without creating another
navigation/history authority.
- Match excerpts are plain presentation-neutral text. A client must not interpret authored
- Match excerpts are plain presentation-neutral text. An app must not interpret authored
markup merely because it appears in a lexical result.

## Explicit Non-Goals
Expand Down
2 changes: 1 addition & 1 deletion 20-product-tdd/graph-navigation-retrieval.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ layout、camera or route state.
authority,but remain separate presentation contracts. Preview is bounded and
interaction-free;solved content may support focused reading and business interaction.
- Block and Relation inspectors are entity-local. Application routing/history remains owned by
the client application,while a Graph view may realize those destinations as a navigation
the app,while a Graph view may realize those destinations as a navigation
host.

## Shared Acceptance Corpus
Expand Down
4 changes: 2 additions & 2 deletions 20-product-tdd/knowledge-capability-contract.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ external API uses one of those words.
- Hydrated content is the inline value or Storage-loaded bytes behind one Block. Solved
content is a Resolver-derived use projection that may combine hydrated content with local
graph facts and may lazily materialize missing semantic content under its contract.
- `InfoBaseRouter` is a client-supplied, deployment-singleton capability port over stable
Block/Relation-oriented destinations. It maps domain navigation to the client's existing
- `InfoBaseRouter` is an app-supplied, deployment-singleton capability port over stable
Block/Relation-oriented destinations. It maps domain navigation to the app's existing
navigation authority; it does not maintain a second history or prescribe Graph as the only
possible default presentation.
- `InfoBaseView` is a navigation host that realizes those destinations. GraphSurface is the
Expand Down
10 changes: 5 additions & 5 deletions 20-product-tdd/observability-contract.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

额外 OpenTelemetry 导出与 W3C 上下文采集仍由每个 Peer 的本地配置显式启用,缺省关闭。关闭该出口不关闭基础观测;关闭时不新增 Trace Context 注入、提取或 Job carrier 捕获。原文内容的额外采集权限独立于以上开关。

后端配置在客户端或进程初始化时形成明确快照,不承诺透明热切换。选择外部但配置不完整、后端不可达或没有就绪的执行 Peer 时,查询明确失败,采集按有界策略报告丢弃,不能静默退回内置存储。观测故障不能使业务 readiness 失败。
后端配置在观测实例初始化时形成明确快照,不承诺透明热切换。选择外部但配置不完整、后端不可达或没有就绪的执行 Peer 时,查询明确失败,采集按有界策略报告丢弃,不能静默退回内置存储。观测故障不能使业务 readiness 失败。

## 权威与身份

Expand All @@ -16,9 +16,9 @@

部署标识、Peer 标识、运行实例与业务 ID 各有意义。部署配置 owner 提供稳定、非秘密的观测部署标识,同一部署的 Peer 与可选采集转发组件使用一致归属;不从凭据、数据库地址或观测产品的项目 ID 派生。重启与原部署恢复保持标识,独立 preview、克隆或新 owner 的部署分配新标识。配置尚不可用的记录可缺少该关联,不能伪造身份或以此阻止启动。

共享部署配置使用 key `inkcre.observability`、schema `inkcre.observability.v1`;value 含 `deployment_id` UUID,以及可选、无凭据的 `otlp_http_endpoints` 对象与 `diagnostics_url`。出口对象按需声明 traces、logs、metrics 的完整 OTLP/HTTP URL;本地启用后缺省信号仍不导出,不要求所有信号共享一个 base URL;共享 value 不携带启用开关。部署启用步骤仅在缺失时创建身份,Peer 不各自生成;服务端私密采集凭据仅从运行配置提供,不进入客户端;客户端直连需使用适合其公开环境的受限写入能力,否则经过受控转发。凭据不进入该非秘密配置。各 Unit 注册和读取同一 schema;关闭额外 OTLP 的 Peer 不为该出口读取配置或初始化身份,开启时配置尚不可用只暂停该出口。基础记录的后端选择使用独立配置,不依赖 OTLP 身份初始化。
共享部署配置使用 key `inkcre.observability`、schema `inkcre.observability.v1`;value 含 `deployment_id` UUID,以及可选、无凭据的 `otlp_http_endpoints` 对象与 `diagnostics_url`。出口对象按需声明 traces、logs、metrics 的完整 OTLP/HTTP URL;本地启用后缺省信号仍不导出,不要求所有信号共享一个 base URL;共享 value 不携带启用开关。部署启用步骤仅在缺失时创建身份,Peer 不各自生成;私密采集凭据仅从持有凭据的 Peer 运行配置提供,不进入浏览器;浏览器直连需使用适合其公开环境的受限写入能力,否则经过受控转发。凭据不进入该非秘密配置。各 Unit 注册和读取同一 schema;关闭额外 OTLP 的 Peer 不为该出口读取配置或初始化身份,开启时配置尚不可用只暂停该出口。基础记录的后端选择使用独立配置,不依赖 OTLP 身份初始化。

Peer 复用现有身份,运行实例区分进程或客户端运行期,Job、Thread、ToolCall 与实体保留业务 ID。Trace/Span ID 由标准 SDK 管理,不能用业务 ID 替代。可变业务 ID 适合日志与 Trace 关联,不进入无界指标标签。资源属性用于筛选和诊断,不提供认证或权限证明。
Peer 复用现有身份,运行实例区分各 App 运行期,Job、Thread、ToolCall 与实体保留业务 ID。Trace/Span ID 由标准 SDK 管理,不能用业务 ID 替代。可变业务 ID 适合日志与 Trace 关联,不进入无界指标标签。资源属性用于筛选和诊断,不提供认证或权限证明。

## 同步传播

Expand Down Expand Up @@ -74,7 +74,7 @@ Usage 以 provider 实际返回为依据,覆盖流式结束阶段。未提供

首个双向外部实现为 Loki;其它已配置的日志 writer 或 OTLP endpoint 不能仅凭存在就冒充统一查询后端。Loki URL、认证和租户信息由具备能力的服务 Peer 私密持有,公共配置与浏览器均不携带它们。多个服务 Peer 必须装配同一部署选中的存储;同一公共选择不允许在不同 Peer 上代表不同租户的数据。

各实现通过 `core.observability.v1` 精确 Peer 能力提供 `POST /observability`,沿用已有 Peer 认证、发现与 HTTP 协议。请求包含 `action`:`status`、`query` 或 `ingest`。委派的 `query`/`ingest` 必须附上 `expected_backend`,服务将其与本实例选择原子核对;不匹配返回 409,不把请求写入另一个存储。候选状态探测不能代替这次接收边界检查。数据库模式的客户端可以直接使用已准入数据库协议实现同一接口;外部模式通过具备私密配置的 Peer 执行,业务请求不因此集中到该 Peer。调用者不能指定任意外部 URL、请求头或原生查询语言。
各实现通过 `core.observability.v1` 精确 Peer 能力提供 `POST /observability`,沿用已有 Peer 认证、发现与 HTTP 协议。请求包含 `action`:`status`、`query` 或 `ingest`。委派的 `query`/`ingest` 必须附上 `expected_backend`,服务将其与本实例选择原子核对;不匹配返回 409,不把请求写入另一个存储。候选状态探测不能代替这次接收边界检查。数据库模式的调用方可以直接使用已准入数据库协议实现同一接口;外部模式通过具备私密配置的 Peer 执行,业务请求不因此集中到该 Peer。调用者不能指定任意外部 URL、请求头或原生查询语言。

### 公共 JSON

Expand Down Expand Up @@ -102,7 +102,7 @@ Usage 以 provider 实际返回为依据,覆盖流式结束阶段。未提供

### Web 消费

全局工作区和 Job 详情复用同一查询客户端。过滤、关联详情、操作时间线和当前窗口摘要不包含供应商分支。状态面板展示当前存储、配置/能力、历史说明及读取故障;加载、空、错误和截断分别呈现。外部完整 Trace/指标系统可通过已配置诊断入口访问,不用当前窗口的操作摘要假装实现完整 APM。
全局工作区和 Job 详情复用同一观测查询接口。过滤、关联详情、操作时间线和当前窗口摘要不包含供应商分支。状态面板展示当前存储、配置/能力、历史说明及读取故障;加载、空、错误和截断分别呈现。外部完整 Trace/指标系统可通过已配置诊断入口访问,不用当前窗口的操作摘要假装实现完整 APM。

### 变更验证

Expand Down
Loading
Loading