Files
deepseek-harness/packages/client/script-realm/README.md
T
imccyu 695f640063 Merge pull request #8133 from deepseek-harness/discuss-client-iframe
refactor(client): add client module js realm (with module manifest and style operation)
2026-11-13 10:11:54 +08:00

2.4 KiB

description, kind
description kind
Register optional script-environment providers and create caller-owned Realm instances. package-reference

@deepseek-ai/dsh-client-script-realm

English | 中文

Summary

Use this package when an optional Client extension needs a named script-environment provider. Registration does not create an environment; creation returns an instance whose caller owns cleanup. Normal application startup does not wait for this registry. The module loader has its own Main execution environment.

Table of Contents

Use this package

The normal Client plugin provides ctx.scriptRealms. Provider plugins inject scriptRealms and register factories through its effect-owned register() operation. The returned disposer is asynchronous; callers that remove a registration early await it, while plugin teardown owns automatic removal. This package declares no configuration and is not included in the default application roster.

Understand the implementation

create() resolves a registered provider by name and passes the caller-supplied identity and cancellation signal to it. Removing a provider prevents subsequent creation through that registration; it does not dispose instances already returned. The registry does not assign modules to environments.

Further Exploration

Model Experience

None, as this optional browser infrastructure registers no model-facing tools or prompts.

KV Cache effect

None; this package neither assembles nor sends a provider request.

Known Limitations and Deferred Work

  • Isolation requests, capability matching, environment reuse, and plugin placement are not implemented. A Script Realm preserves direct references and is not a security sandbox.

Dev Note

None.