Merge remote-tracking branch 'origin/master' into worktree/web-background-tasks-display-258f7e
This commit is contained in:
@@ -2,5 +2,5 @@
|
||||
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
||||
# after editing either side, bring the other along and re-record with:
|
||||
# pnpm run verify-translation-pairing --write packages/tasks/README.md
|
||||
README.md: e0b6769cd1d28cc7159310a6ec6f5c8d94a81a24
|
||||
README.zh.md: 97d258ffdc88b728ecabd9d20afaf228d620d8a4
|
||||
README.md: 32db45b822299f9d18f79a08d3a9264a12661b60
|
||||
README.zh.md: a33f390bddab7b51778b153f5121e2d11c6ed380
|
||||
|
||||
@@ -12,4 +12,4 @@ This family gives long-running tools one owner-isolated background-task protocol
|
||||
|
||||
See the [background-task runtime](../../.agents/notes/implemented/architecture/2026-06-20-generic-long-running-tool-runtime.md) and [task-registry](../../.agents/notes/implemented/architecture/2026-07-26-task-registry-seam.md) decisions.
|
||||
|
||||
The subsystem reference — the id scheme, the owner-fenced contract, snapshots — is [docs/subsystems/tasks.md](../../docs/subsystems/tasks.md); design in the [background-task runtime](../../.agents/notes/implemented/architecture/2026-06-20-generic-long-running-tool-runtime.md) and [task-registry seam](../../.agents/notes/implemented/architecture/2026-07-26-task-registry-seam.md) Agent Notes.
|
||||
The subsystem reference — the id scheme, the owner-fenced contract, snapshots — is [docs/subsystems/tasks.md](../../docs/subsystems/tasks.md); design in the [background-task runtime](../../.agents/notes/implemented/architecture/2026-06-20-generic-long-running-tool-runtime.md) and [task-registry contract](../../.agents/notes/implemented/architecture/2026-07-26-task-registry-seam.md) Agent Notes.
|
||||
|
||||
@@ -12,4 +12,4 @@
|
||||
|
||||
参见[后台任务运行时](../../.agents/notes/implemented/architecture/2026-06-20-generic-long-running-tool-runtime.md)和[任务注册表](../../.agents/notes/implemented/architecture/2026-07-26-task-registry-seam.md)决策。
|
||||
|
||||
子系统参考——id 方案、拥有者围栏约定、快照——见 [docs/subsystems/tasks.md](../../docs/subsystems/tasks.md);设计见[后台任务运行时](../../.agents/notes/implemented/architecture/2026-06-20-generic-long-running-tool-runtime.md)与[任务注册表 seam](../../.agents/notes/implemented/architecture/2026-07-26-task-registry-seam.md) Agent Note。
|
||||
子系统参考——id 方案、拥有者围栏约定、快照——见 [docs/subsystems/tasks.md](../../docs/subsystems/tasks.md);设计见[后台任务运行时](../../.agents/notes/implemented/architecture/2026-06-20-generic-long-running-tool-runtime.md)与[任务注册表约定](../../.agents/notes/implemented/architecture/2026-07-26-task-registry-seam.md) Agent Note。
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
||||
# after editing either side, bring the other along and re-record with:
|
||||
# pnpm run verify-translation-pairing --write packages/tasks/tasks-local/README.md
|
||||
README.md: 23ca6fca61ccb59c855e5d6da6b0a2e23e7cb632
|
||||
README.zh.md: 5b04caaf640042049e4ef9e6fa58a30adc6f8f72
|
||||
README.md: 663ce0d333c6df0f84900a2570d5487d8d7abe55
|
||||
README.zh.md: a5d1acaa50f63dc95b7607657b157272c15a4f11
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
English | [中文](README.zh.md)
|
||||
|
||||
Process-local implementation of the [`@deepseek-ai/dsh-tasks`](../tasks/README.md) registry seam: `LocalTaskService` keeps every record in memory, issues per-kind `<kind>-N` ids, and hands out fresh snapshots, never live state. It has no config; load it as a plugin and it registers as `ctx.tasks`.
|
||||
Process-local implementation of the [`@deepseek-ai/dsh-tasks`](../tasks/README.md) registry contract: `LocalTaskService` keeps every record in memory, issues per-kind `<kind>-N` ids, and hands out fresh snapshots, never live state. It has no config; load it as a plugin and it registers as `ctx.tasks`.
|
||||
|
||||
## Lifecycle
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
[English](README.md) | 中文
|
||||
|
||||
[`@deepseek-ai/dsh-tasks`](../tasks/README.md) 注册表 seam 的进程本地实现:`LocalTaskService` 把每条记录保存在内存中,按 kind 签发 `<kind>-N` id,并且只交出全新快照,从不交出实时状态。它没有配置;作为插件加载后即注册为 `ctx.tasks`。
|
||||
[`@deepseek-ai/dsh-tasks`](../tasks/README.md) 注册表约定的进程本地实现:`LocalTaskService` 把每条记录保存在内存中,按 kind 签发 `<kind>-N` id,并且只交出全新快照,从不交出实时状态。它没有配置;作为插件加载后即注册为 `ctx.tasks`。
|
||||
|
||||
## 生命周期
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Process-local implementation of the background task registry seam
|
||||
* Process-local provider for the background-task capability seam
|
||||
* (`ctx.tasks`). It keeps every record in memory and hands out fresh
|
||||
* snapshots, never live state.
|
||||
*
|
||||
@@ -53,7 +53,7 @@ function isTerminal(status: TaskStatus): boolean {
|
||||
}
|
||||
|
||||
/**
|
||||
* The in-memory `tasks` registry. See the seam contract in
|
||||
* The in-memory `tasks` registry. See the Service Definition contract in
|
||||
* `@deepseek-ai/dsh-tasks` for the ownership, isolation, and lifecycle
|
||||
* semantics this implementation honors.
|
||||
*/
|
||||
|
||||
@@ -15,7 +15,7 @@ export const name = 'tasks-local-invariant'
|
||||
export const inject = ['invariants']
|
||||
|
||||
/**
|
||||
* No runtime invariant: the seam companion in `@deepseek-ai/dsh-tasks` already
|
||||
* No runtime invariant: the Service Definition companion in `@deepseek-ai/dsh-tasks` already
|
||||
* validates every registry snapshot this implementation publishes.
|
||||
*/
|
||||
const install: InvariantInstaller = () => {}
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
||||
# after editing either side, bring the other along and re-record with:
|
||||
# pnpm run verify-translation-pairing --write packages/tasks/tasks/README.md
|
||||
README.md: 739c3dabda73594991bfdcff11dbdebd7b51a2a5
|
||||
README.zh.md: 81db57fb81a2c3829afdabd8b965db5e4cebfe8e
|
||||
README.md: 8ad124531daf74f1d44ff46aaaad9b9b860b07c8
|
||||
README.zh.md: c1452d4610c65fa66c5ba2f2939b8c501e92bd7a
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
English | [中文](README.zh.md)
|
||||
|
||||
The background task registry seam (`ctx.tasks`). The abstract `TaskService` and its vocabulary types give long-running producers shared ids, owner isolation, reads, cancellation, waiting, notices, and cleanup under one contract; the process-local registry lives in [`dsh-tasks-local`](../tasks-local/README.md). Producer plugins extend `TaskKindMap` with their opaque id namespace.
|
||||
The background task registry contract (`ctx.tasks`). The abstract `TaskService` and its vocabulary types give long-running producers shared ids, owner isolation, reads, cancellation, waiting, notices, and cleanup under one contract; the process-local registry lives in [`dsh-tasks-local`](../tasks-local/README.md). Producer plugins extend `TaskKindMap` with their opaque id namespace.
|
||||
|
||||
## Service contract
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
[English](README.md) | 中文
|
||||
|
||||
后台任务注册表 seam(`ctx.tasks`)。抽象的 `TaskService` 及其词汇类型在同一份约定下为长时间运行的生产方提供共享 id、owner 隔离、读取、取消、等待、通知和清理;进程局部注册表位于 [`dsh-tasks-local`](../tasks-local/README.md)。生产方插件使用其不透明 id namespace 扩展 `TaskKindMap`。
|
||||
后台任务注册表约定(`ctx.tasks`)。抽象的 `TaskService` 及其词汇类型在同一份约定下为长时间运行的生产方提供共享 id、owner 隔离、读取、取消、等待、通知和清理;进程局部注册表位于 [`dsh-tasks-local`](../tasks-local/README.md)。生产方插件使用其不透明 id namespace 扩展 `TaskKindMap`。
|
||||
|
||||
## 服务约定
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* The background task registry seam (`ctx.tasks`). It owns the contract for
|
||||
* The background-task Service Definition (`ctx.tasks`). It owns the contract for
|
||||
* task ids, session-scoped access, lifecycle state, completion listeners, and
|
||||
* owner cleanup while producers retain their execution resources. The
|
||||
* process-local registry lives in `@deepseek-ai/dsh-tasks-local`.
|
||||
@@ -52,10 +52,9 @@ declare module 'cordis' {
|
||||
*/
|
||||
export abstract class TaskService extends Service {
|
||||
constructor(ctx: Context) {
|
||||
// `abstract` erases at runtime, and this package name used to be the
|
||||
// mountable concrete registry — a stale composition row would otherwise
|
||||
// register a ctx.tasks with no method implementations and fail far from
|
||||
// the misconfiguration. Fail loud at load instead.
|
||||
// `abstract` erases at runtime, so a composition row naming this package
|
||||
// would register a ctx.tasks with no method implementations and fail far
|
||||
// from the misconfiguration. Fail loud at load instead.
|
||||
if (new.target === TaskService) {
|
||||
throw new Error('@deepseek-ai/dsh-tasks is the abstract task registry seam; load an implementation such as @deepseek-ai/dsh-tasks-local instead')
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import type {
|
||||
} from '@deepseek-ai/dsh-tasks'
|
||||
|
||||
/**
|
||||
* Minimal concrete registry: one canned record. The seam owns the contract
|
||||
* Minimal concrete registry: one canned record. The Service Definition owns the contract
|
||||
* only (ids, snapshots, authorization-shaped signatures); the registry
|
||||
* behavior suite lives with `@deepseek-ai/dsh-tasks-local`.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user