refactor: apply repository naming contract

Apply the accepted pre-release package, service, type, directory, and role renames as one repository-wide change.
This commit is contained in:
Tianyi Cui
2026-08-13 00:36:22 +08:00
parent 101df7cf58
commit a2d0f7f411
3281 changed files with 21730 additions and 21592 deletions

View File

@@ -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/guard/timeout-policy/README.md
README.md: 70b1f392bfbce91962447dee86afbbb148817811
README.zh.md: 4433b3cb5f6f2291468dfd92345e2d826d951b47
README.md: 4b0ea4e541f0740289623f5e81d79e168240a402
README.zh.md: b69c9b251ad794244daa3695c5aa40acef4cd9d7

View File

@@ -1,4 +1,4 @@
# dsh-timeout-policy
# dsh-tool-call-timeout-policy
English | [中文](README.zh.md)
@@ -10,7 +10,7 @@ A function/namespace plugin (`name` / `inject` / `apply`), not a service. It reg
```yaml
- id: timeout-policy
name: '@deepseek-ai/dsh-timeout-policy'
name: '@deepseek-ai/dsh-tool-call-timeout-policy'
```
The per-tool budget is declared by the tool plugin (e.g. `dsh-tool-web`'s `fetchTimeoutMs`/`searchTimeoutMs` config, attached as `ToolDefinition.timeoutMs`); this plugin only enforces it, so a mistyped tool name is not possible.

View File

@@ -1,4 +1,4 @@
# dsh-timeout-policy
# dsh-tool-call-timeout-policy
[English](README.md) | 中文
@@ -10,7 +10,7 @@
```yaml
- id: timeout-policy
name: '@deepseek-ai/dsh-timeout-policy'
name: '@deepseek-ai/dsh-tool-call-timeout-policy'
```
每工具预算由工具插件声明(例如 `dsh-tool-web` 的 `fetchTimeoutMs`/`searchTimeoutMs` 配置,会附加为 `ToolDefinition.timeoutMs`);此插件只负责强制执行,因此不可能拼错工具名。

View File

@@ -1,5 +1,5 @@
{
"name": "@deepseek-ai/dsh-timeout-policy",
"name": "@deepseek-ai/dsh-tool-call-timeout-policy",
"description": "Tool-call timeout policy: a tools/execute wrapper that arms a per-tool deadline on exec.signal and returns TOOL_TIMEOUT when it wins",
"version": "0.0.1-rc.2",
"publishConfig": {

View File

@@ -8,7 +8,7 @@
* home; decide at resolution time
* ([regrouping Agent Note](../../../../.agents/notes/implemented/architecture/2026-07-29-package-regrouping.md)).
*
* @module @deepseek-ai/dsh-timeout-policy
* @module @deepseek-ai/dsh-tool-call-timeout-policy
*/
import type { Context } from '@deepseek-ai/cordis'

View File

@@ -1,13 +1,13 @@
/**
* Package-owned invariant companion for `@deepseek-ai/dsh-timeout-policy`.
* @module @deepseek-ai/dsh-timeout-policy/invariant
* Package-owned invariant companion for `@deepseek-ai/dsh-tool-call-timeout-policy`.
* @module @deepseek-ai/dsh-tool-call-timeout-policy/invariant
*/
/* jscpd:ignore-start */
import type { Context } from '@deepseek-ai/cordis'
import type { InvariantInstaller } from '@deepseek-ai/dsh-invariants'
const PACKAGE_NAME = '@deepseek-ai/dsh-timeout-policy'
const PACKAGE_NAME = '@deepseek-ai/dsh-tool-call-timeout-policy'
/** Cordis companion plugin name. */
export const name = 'timeout-policy-invariant'

View File

@@ -1,5 +1,5 @@
/**
* Unit + real-load-path coverage for @deepseek-ai/dsh-timeout-policy. The
* Unit + real-load-path coverage for @deepseek-ai/dsh-tool-call-timeout-policy. The
* timeout-wins cases drive the deadline under fake timers (deterministic — no
* wall-clock race) and use a COOPERATIVE tool that settles only when its
* `exec.signal` aborts, mirroring how a real capability forwards the signal and
@@ -11,9 +11,9 @@ import { Context } from '@deepseek-ai/cordis'
import Loader from '@deepseek-ai/cordis-plugin-loader'
import { CallId, HarnessError } from '@deepseek-ai/dsh-llm'
import SystemPrompt from '@deepseek-ai/dsh-system-prompt'
import ToolRegistry, { defineContentToolFixture, TOOL_ABORTED, type ToolExecutionInput, type PostToolDecision } from '@deepseek-ai/dsh-tools'
import * as timeoutPolicy from '@deepseek-ai/dsh-timeout-policy'
import { TOOL_TIMEOUT } from '@deepseek-ai/dsh-timeout-policy'
import ToolRuntime, { defineContentToolFixture, TOOL_ABORTED, type ToolExecutionInput, type PostToolDecision } from '@deepseek-ai/dsh-tools'
import * as timeoutPolicy from '@deepseek-ai/dsh-tool-call-timeout-policy'
import { TOOL_TIMEOUT } from '@deepseek-ai/dsh-tool-call-timeout-policy'
const testToolSignal = new AbortController().signal
@@ -21,7 +21,7 @@ const testToolSignal = new AbortController().signal
async function setup() {
const ctx = new Context()
await ctx.plugin(SystemPrompt)
await ctx.plugin(ToolRegistry)
await ctx.plugin(ToolRuntime)
await ctx.plugin(timeoutPolicy)
return ctx
}
@@ -203,7 +203,7 @@ describe('timeout-policy disposal (HMR safety)', () => {
it('removes its tools/execute listener when the plugin fiber disposes', async () => {
const ctx = new Context()
await ctx.plugin(SystemPrompt)
await ctx.plugin(ToolRegistry)
await ctx.plugin(ToolRuntime)
let seenSignal: AbortSignal | undefined
ctx.tools.register(defineContentToolFixture({ name: 'probe', description: 'd', parameters: {}, timeoutMs: 10_000,
async execute(_a, exec) { seenSignal = exec.signal; return [{ type: 'text' as const, text: 'ok' }] } }))
@@ -217,7 +217,7 @@ describe('timeout-policy disposal (HMR safety)', () => {
})
})
describe('dsh-timeout-policy real-load-path guard', () => {
describe('dsh-tool-call-timeout-policy real-load-path guard', () => {
it('has no default export and keeps name/inject through unwrapExports', () => {
expect('default' in timeoutPolicy).toBe(false)
const loader = Object.create(Loader.prototype) as Loader
@@ -231,7 +231,7 @@ describe('dsh-timeout-policy real-load-path guard', () => {
it('boots over ctx.tools through the unwrapped module and wraps a budgeted tool', async () => {
const ctx = new Context()
await ctx.plugin(SystemPrompt)
await ctx.plugin(ToolRegistry)
await ctx.plugin(ToolRuntime)
ctx.tools.register(defineContentToolFixture({ name: 'fast', description: 'd', parameters: {}, timeoutMs: 5_000,
async execute() { return [{ type: 'text' as const, text: 'ok' }] } }))
const loader = Object.create(Loader.prototype) as Loader

View File

@@ -25,7 +25,7 @@
"path": "../../core/tools"
},
{
"path": "../../support/invariants"
"path": "../../runtime-diagnostics/invariants"
}
]
}