@deepwatch/dsh-client-remotes 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 oxbshw
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,79 @@
1
+ # @deepwatch/dsh-client-remotes
2
+
3
+ Client composition: mounts Watch's generated Typert Remote into ctx.remote
4
+
5
+ Part of **DeepWatch** — the agent workspace built on the official
6
+ [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)
7
+ and powered by [Watch Skill](https://github.com/oxbshw/watch-skill) for perception, evidence, memory and
8
+ independent verification.
9
+
10
+ > **Browser half — runs in the workspace UI.**
11
+ > Composed by the bundle and loaded by the DSH client loader.
12
+
13
+ ## Exports
14
+
15
+ - `@deepwatch/dsh-client-remotes`
16
+ - `@deepwatch/dsh-client-remotes/client`
17
+
18
+ ## Peers
19
+
20
+ Provided by the host rather than installed here:
21
+
22
+ - `@deepseek-ai/cordis@4.0.2`
23
+
24
+ ## Install
25
+
26
+ > **Not on npm yet.** Nothing exists under the `@deepwatch` scope. This
27
+ > package is published for the first time by the `deepwatch-v0.1.0`
28
+ > release; until then the command below resolves nothing, and
29
+ > [the workspace README](https://github.com/oxbshw/watch-skill/tree/main/workspace#readme) has the path
30
+ > that works from a checkout.
31
+
32
+ ```sh
33
+ npm install @deepwatch/dsh-client-remotes
34
+ ```
35
+
36
+ Rarely on its own. [`@deepwatch/dsh-bundle`](https://github.com/oxbshw/watch-skill/tree/main/workspace/packages/watch/bundle#readme)
37
+ composes this package with the rest of DeepWatch and is what a profile
38
+ normally depends on; installing this one directly is for embedding a
39
+ single piece in a composition you control.
40
+
41
+ ## Requirements
42
+
43
+ - Node `^22.19.0 || >=24.0.0`
44
+ - The peers above, supplied by the host composition
45
+
46
+ ## Stability
47
+
48
+ `0.1.0` — a stable release.
49
+
50
+ Stable means tested, documented and supported — not 1.0. This is a
51
+ pre-1.0 line, and semantic versioning gives `0.x` no compatibility
52
+ guarantee across minor versions: **a `0.MINOR` bump may change or remove
53
+ surface, and a patch will not.** Depend on it with a tilde range
54
+ (`~0.1.0`) if you want that difference enforced by your lockfile
55
+ rather than by a changelog. The usual major-version promise starts at 1.0.
56
+
57
+ ## Side effects
58
+
59
+ Importing a module from this package evaluates no side effects, so a
60
+ bundler may drop what a build does not use. Mounting it in a host is a
61
+ separate matter: what it then reads or writes is governed by the
62
+ workspace boundary and the host's permissions, not by this flag.
63
+
64
+ ## Where this fits
65
+
66
+ Mounts Watch's generated Typert Remote into `ctx.remote`, so every client call reaches the host through one generated, type-checked surface instead of hand-written fetches.
67
+
68
+ The twenty packages and how they compose:
69
+ [the package map](https://github.com/oxbshw/watch-skill/blob/main/workspace/docs/packages.md).
70
+ Running DeepWatch, and the gates a change has to pass:
71
+ [the workspace README](https://github.com/oxbshw/watch-skill/tree/main/workspace#readme).
72
+
73
+ ## Attribution
74
+
75
+ Built on DeepSeek Harness · Powered by Watch Skill
76
+
77
+ DeepWatch and Watch Skill are independent projects and are not affiliated
78
+ with or endorsed by DeepSeek. MIT licensed; third-party notices are in
79
+ [THIRD_PARTY_NOTICES.md](https://github.com/oxbshw/watch-skill/blob/main/workspace/THIRD_PARTY_NOTICES.md).
@@ -0,0 +1,69 @@
1
+ /**
2
+ * Watch's generated Remote, mounted into the Client's `ctx.remote`.
3
+ *
4
+ * This package exists to break a cycle, and the cycle is worth stating because
5
+ * the arrangement only makes sense against it. `@deepwatch/dsh-tools` is the
6
+ * Host: it owns `WatchQueryService`, and Typert generates the Remote from that
7
+ * Host program. It reads the Library's index, so tools depends on
8
+ * `@deepwatch/dsh-library`. When the Library's browser half also mounted the
9
+ * generated contribution, the Library depended on tools in return — a real
10
+ * cyclic workspace dependency that pnpm warned about, and a build order no
11
+ * staging can honestly satisfy, because the Library's client could not compile
12
+ * until a file generated *from* the Library's own dependent existed.
13
+ *
14
+ * So the mount moved out to a composition boundary. Nothing else lives here.
15
+ * The rule this package holds is one sentence: a package that owns a capability
16
+ * never also owns the transport that carries it.
17
+ *
18
+ * `ctx.remote.$mount` is how a distribution outside upstream's own assembly
19
+ * contributes a namespace — `@deepseek-ai/dsh-api-remotes` imports its seven
20
+ * contributions statically, and anything else mounts its own. What arrives is
21
+ * `@deepwatch/dsh-tools/remote`, generated from the Host service by Typert, so
22
+ * a surface calls `ctx.remote.watchQuery.librarySearch` against the same strict
23
+ * codecs the Host validates with.
24
+ *
25
+ * The artifact is client-safe by construction: it imports zod and nothing else,
26
+ * and carries descriptors rather than any Host implementation.
27
+ *
28
+ * @module @deepwatch/dsh-client-remotes/client
29
+ */
30
+ import type { Context } from '@deepseek-ai/cordis';
31
+ import type { TypertDisposer, TypertRemoteNamespaceMap } from '@deepseek-ai/dsh-typert-protocol';
32
+ import type { WatchQueryRemote } from '@deepwatch/dsh-library/read-plane';
33
+ /**
34
+ * The Client Remote service, which the Gateway's browser half installs.
35
+ *
36
+ * Named as a service rather than as a package: `@deepseek-ai/dsh-api-remotes`
37
+ * is what the boot graph must materialise first, and that is declared in
38
+ * `dsh.client.inject`. This is the thing that has to exist before `apply` runs.
39
+ */
40
+ export declare const inject: string[];
41
+ /** Mutual assignability, so neither side may be wider than the other. */
42
+ type Exact<A, B> = [A] extends [B] ? ([B] extends [A] ? true : false) : false;
43
+ /**
44
+ * The Library's declared view of `watchQuery`, checked against the generated one.
45
+ *
46
+ * The Library cannot import the generated declaration — that is the edge this
47
+ * package exists to remove — so it describes the namespace from the shared wire
48
+ * contracts instead. Left unchecked that would be a hand-written copy free to
49
+ * drift the moment a Remote signature changes. Here both types are in scope, so
50
+ * the compiler compares them: regenerate the Remote with a different signature
51
+ * and this assignment stops compiling, naming the file that has to change.
52
+ */
53
+ export declare const LIBRARY_MATCHES_THE_GENERATED_NAMESPACE: Exact<TypertRemoteNamespaceMap['watchQuery'], WatchQueryRemote>;
54
+ /**
55
+ * Mount the generated contribution, and hand back the disposer that removes it.
56
+ *
57
+ * The disposer is returned rather than registered on an event: cordis unwinds a
58
+ * plugin by awaiting what its `apply` handed back, and a namespace that
59
+ * outlives the plugin that mounted it is a service pointing at a fiber that has
60
+ * gone.
61
+ *
62
+ * Nothing here is defensive about `ctx.remote`. `inject` above means cordis does
63
+ * not call this until the service exists, so a missing Remote parks the plugin
64
+ * instead of reaching `undefined.$mount` — the difference between a plugin that
65
+ * refuses and a mount that fails after the fact.
66
+ */
67
+ export declare function apply(ctx: Context): Promise<TypertDisposer>;
68
+ export {};
69
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,66 @@
1
+ /**
2
+ * Watch's generated Remote, mounted into the Client's `ctx.remote`.
3
+ *
4
+ * This package exists to break a cycle, and the cycle is worth stating because
5
+ * the arrangement only makes sense against it. `@deepwatch/dsh-tools` is the
6
+ * Host: it owns `WatchQueryService`, and Typert generates the Remote from that
7
+ * Host program. It reads the Library's index, so tools depends on
8
+ * `@deepwatch/dsh-library`. When the Library's browser half also mounted the
9
+ * generated contribution, the Library depended on tools in return — a real
10
+ * cyclic workspace dependency that pnpm warned about, and a build order no
11
+ * staging can honestly satisfy, because the Library's client could not compile
12
+ * until a file generated *from* the Library's own dependent existed.
13
+ *
14
+ * So the mount moved out to a composition boundary. Nothing else lives here.
15
+ * The rule this package holds is one sentence: a package that owns a capability
16
+ * never also owns the transport that carries it.
17
+ *
18
+ * `ctx.remote.$mount` is how a distribution outside upstream's own assembly
19
+ * contributes a namespace — `@deepseek-ai/dsh-api-remotes` imports its seven
20
+ * contributions statically, and anything else mounts its own. What arrives is
21
+ * `@deepwatch/dsh-tools/remote`, generated from the Host service by Typert, so
22
+ * a surface calls `ctx.remote.watchQuery.librarySearch` against the same strict
23
+ * codecs the Host validates with.
24
+ *
25
+ * The artifact is client-safe by construction: it imports zod and nothing else,
26
+ * and carries descriptors rather than any Host implementation.
27
+ *
28
+ * @module @deepwatch/dsh-client-remotes/client
29
+ */
30
+ import TYPERT_REMOTE from '@deepwatch/dsh-tools/remote';
31
+ /**
32
+ * The Client Remote service, which the Gateway's browser half installs.
33
+ *
34
+ * Named as a service rather than as a package: `@deepseek-ai/dsh-api-remotes`
35
+ * is what the boot graph must materialise first, and that is declared in
36
+ * `dsh.client.inject`. This is the thing that has to exist before `apply` runs.
37
+ */
38
+ export const inject = ['remote'];
39
+ /**
40
+ * The Library's declared view of `watchQuery`, checked against the generated one.
41
+ *
42
+ * The Library cannot import the generated declaration — that is the edge this
43
+ * package exists to remove — so it describes the namespace from the shared wire
44
+ * contracts instead. Left unchecked that would be a hand-written copy free to
45
+ * drift the moment a Remote signature changes. Here both types are in scope, so
46
+ * the compiler compares them: regenerate the Remote with a different signature
47
+ * and this assignment stops compiling, naming the file that has to change.
48
+ */
49
+ export const LIBRARY_MATCHES_THE_GENERATED_NAMESPACE = true;
50
+ /**
51
+ * Mount the generated contribution, and hand back the disposer that removes it.
52
+ *
53
+ * The disposer is returned rather than registered on an event: cordis unwinds a
54
+ * plugin by awaiting what its `apply` handed back, and a namespace that
55
+ * outlives the plugin that mounted it is a service pointing at a fiber that has
56
+ * gone.
57
+ *
58
+ * Nothing here is defensive about `ctx.remote`. `inject` above means cordis does
59
+ * not call this until the service exists, so a missing Remote parks the plugin
60
+ * instead of reaching `undefined.$mount` — the difference between a plugin that
61
+ * refuses and a mount that fails after the fact.
62
+ */
63
+ export async function apply(ctx) {
64
+ return await ctx.remote.$mount(TYPERT_REMOTE);
65
+ }
66
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/client/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AASH,OAAO,aAAa,MAAM,6BAA6B,CAAA;AAEvD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,QAAQ,CAAC,CAAA;AAKhC;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,uCAAuC,GACc,IAAI,CAAA;AAEtE;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,KAAK,UAAU,KAAK,CAAC,GAAY;IACtC,OAAO,MAAM,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,CAAA;AAC/C,CAAC"}