2026-06-11 10:52:45 +08:00
|
|
|
{
|
|
|
|
|
"compilerOptions": {
|
|
|
|
|
"target": "es2024",
|
|
|
|
|
"module": "esnext",
|
|
|
|
|
"moduleResolution": "bundler",
|
|
|
|
|
"declaration": true,
|
|
|
|
|
"emitDeclarationOnly": true,
|
|
|
|
|
"composite": true,
|
|
|
|
|
"incremental": true,
|
|
|
|
|
"skipLibCheck": true,
|
|
|
|
|
"esModuleInterop": true,
|
|
|
|
|
"allowImportingTsExtensions": true,
|
Enable maximum-strict TypeScript across our packages
tsconfig.base.json adds noUncheckedIndexedAccess,
exactOptionalPropertyTypes, noImplicitOverride,
noFallthroughCasesInSwitch, noUnusedLocals, and noUnusedParameters on
top of strict. Vendored packages opt out of the new flags locally
(their tsconfigs are ours to regenerate; their source is not), keeping
upstream-sync friendliness.
Our code fixed accordingly: index accesses acknowledge undefined
(assembler flush cursors, lastTurnNumber); optional properties are
omitted instead of set-to-undefined (GenerateResult.usage,
ToolDefinition.strict, GenerateOptions.system/tools, error payloads
via an errorData helper); Session.onAppend is explicitly
`(…) => void | undefined`; tests and examples updated for unused
parameters and indexed access.
2026-06-11 14:02:47 +08:00
|
|
|
"verbatimModuleSyntax": false,
|
2026-06-11 10:52:45 +08:00
|
|
|
"strict": true,
|
Enable maximum-strict TypeScript across our packages
tsconfig.base.json adds noUncheckedIndexedAccess,
exactOptionalPropertyTypes, noImplicitOverride,
noFallthroughCasesInSwitch, noUnusedLocals, and noUnusedParameters on
top of strict. Vendored packages opt out of the new flags locally
(their tsconfigs are ours to regenerate; their source is not), keeping
upstream-sync friendliness.
Our code fixed accordingly: index accesses acknowledge undefined
(assembler flush cursors, lastTurnNumber); optional properties are
omitted instead of set-to-undefined (GenerateResult.usage,
ToolDefinition.strict, GenerateOptions.system/tools, error payloads
via an errorData helper); Session.onAppend is explicitly
`(…) => void | undefined`; tests and examples updated for unused
parameters and indexed access.
2026-06-11 14:02:47 +08:00
|
|
|
"noUncheckedIndexedAccess": true,
|
|
|
|
|
"exactOptionalPropertyTypes": true,
|
|
|
|
|
"noImplicitOverride": true,
|
|
|
|
|
"noFallthroughCasesInSwitch": true,
|
|
|
|
|
"noUnusedLocals": true,
|
|
|
|
|
"noUnusedParameters": true,
|
2026-06-11 23:10:43 +08:00
|
|
|
"types": ["node"],
|
|
|
|
|
// Source-level resolution for the build graph: without this, a fresh
|
|
|
|
|
// checkout's first `tsc -b` resolves sibling vendor plugins through their
|
|
|
|
|
// package.json types (vendor/*/lib/*.d.ts) which don't exist yet — TS2307
|
|
|
|
|
// until a second run. Derived configs that want lib resolution
|
|
|
|
|
// (tsconfig.typecheck.json) override this map wholesale.
|
|
|
|
|
"paths": {
|
|
|
|
|
"cordis": ["./vendor/cordis/src"],
|
|
|
|
|
"cosmokit": ["./vendor/cosmokit/src"],
|
|
|
|
|
"schemastery": ["./vendor/schemastery/src"],
|
|
|
|
|
"@cordisjs/plugin-loader": ["./vendor/loader/src"],
|
|
|
|
|
"@cordisjs/plugin-include": ["./vendor/include/src"],
|
|
|
|
|
"@cordisjs/plugin-group": ["./vendor/group/src"],
|
|
|
|
|
"@cordisjs/plugin-timer": ["./vendor/timer/src"],
|
|
|
|
|
"@cordisjs/plugin-hmr": ["./vendor/hmr/src"],
|
|
|
|
|
"@cordisjs/plugin-logger-console": ["./vendor/logger-console/src"],
|
Reorganize packages into a modular hierarchy
Move the 18 flat packages/<name> packages into role-grouped dirs:
core/, llm/, bash/, session-persistence/, ui/, support/. Group dirs are
pure containers; each package keeps its @deepseek-ai/dsh-* name.
Collapse the per-package tsconfig paths maps (base + typecheck) into one
@deepseek-ai/dsh-* wildcard with a candidate per group, and derive the
publint list from the hierarchy. Update all depth-coupled globs/configs
(workspace, tsdown, vitest, eslint, knip, tsconfig includes/refs,
per-package tsconfigs, generators, doc-script scopes, type-equiv manifest)
and the cross-package/script relative imports in tests.
Fix doc-typecheck's workspacePaths() to parse tsconfig JSONC via the
TypeScript API instead of a regex comment-strip, which corrupted the
new wildcard `/*/` path candidates.
WIP: doc cross-links and package/RFC docs still to update.
2026-06-20 22:55:20 +08:00
|
|
|
// One wildcard maps every @deepseek-ai/dsh-<name> to its source. Package
|
|
|
|
|
// dir names are unique across groups, so first-on-disk-wins resolution is
|
|
|
|
|
// unambiguous; adding a package under an existing group needs no edit
|
|
|
|
|
// here. The build graph's project references (tsconfig.build.json) stay
|
|
|
|
|
// explicit — TS project references have no wildcard form.
|
|
|
|
|
"@deepseek-ai/dsh-*": [
|
|
|
|
|
"./packages/core/*/src",
|
|
|
|
|
"./packages/llm/*/src",
|
|
|
|
|
"./packages/bash/*/src",
|
|
|
|
|
"./packages/session-persistence/*/src",
|
|
|
|
|
"./packages/ui/*/src",
|
feat(types): brand bash ids + stop brand erosion; extract Branded to dsh-brand
Type-only change (brands are zero-cost casts; no runtime/wire impact). Closes
the two gaps in the "brand ids that cross package boundaries" policy and fixes
the dependency direction so a capability package never pulls in an unrelated one.
- Extract the `Branded<B>` primitive into a new standalone type-only package
`@deepseek-ai/dsh-brand` (packages/util/brand) with no harness-package deps.
dsh-llm keeps its owned CallId but imports Branded from dsh-brand; dsh-session,
dsh-agent, and dsh-bash all import Branded from there. dsh-bash depends on
dsh-brand ALONE — never on dsh-llm or dsh-session (the architectural fix: a
generic execution backend must not couple to the LLM or session vocabulary).
- Mint BashTaskId + OwnerToken in dsh-bash and thread them through BashTask.id,
the get/ownerOf/list/readOutput/kill seam, the bash-local generation site, and
the dsh-tool-bash validate/access surface. OwnerToken is a DISTINCT brand from
SessionId so the seam stays decoupled; dsh-tool-bash is the single boundary
that casts SessionId -> OwnerToken.
- Brand at the SOURCE, not via mid-pipeline casts: agent-loop's Config types
agents[].id as AgentId and resumeSessionId as SessionId, so the brand enters
at the config boundary and the inner create()/resume casts disappear (only the
genuinely-new per-run session-id string is cast).
- Stop brand erosion: propagate CallId/SessionId/AgentId to the registry/store
Map keys and public params/exports (SessionStore, AgentRegistry + factory
options, the ACP session-id surface + ToolPresenter CallId map, the
persistence coordinator, invariants pendingCalls, the pi-ai tool-call maps).
- Docs: document BashTaskId/OwnerToken in bash.md (type-equiv re-pasted), point
the Branded type-equiv at dsh-brand, fix stale param types in the session/
agent/bash READMEs, regenerate the cordis catalog + module graph.
Implements docs/rfc/proposed/architecture/2026-06-20-branded-ids.md
2026-06-21 07:17:25 +08:00
|
|
|
"./packages/util/*/src",
|
Reorganize packages into a modular hierarchy
Move the 18 flat packages/<name> packages into role-grouped dirs:
core/, llm/, bash/, session-persistence/, ui/, support/. Group dirs are
pure containers; each package keeps its @deepseek-ai/dsh-* name.
Collapse the per-package tsconfig paths maps (base + typecheck) into one
@deepseek-ai/dsh-* wildcard with a candidate per group, and derive the
publint list from the hierarchy. Update all depth-coupled globs/configs
(workspace, tsdown, vitest, eslint, knip, tsconfig includes/refs,
per-package tsconfigs, generators, doc-script scopes, type-equiv manifest)
and the cross-package/script relative imports in tests.
Fix doc-typecheck's workspacePaths() to parse tsconfig JSONC via the
TypeScript API instead of a regex comment-strip, which corrupted the
new wildcard `/*/` path candidates.
WIP: doc cross-links and package/RFC docs still to update.
2026-06-20 22:55:20 +08:00
|
|
|
"./packages/support/*/src"
|
|
|
|
|
]
|
2026-06-11 23:10:43 +08:00
|
|
|
}
|
2026-06-11 10:52:45 +08:00
|
|
|
}
|
|
|
|
|
}
|