@hydraharness/harness-client-connection 0.1.1-rc.10
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 +21 -0
- package/README.md +19 -0
- package/lib/client.js +11148 -0
- package/lib/index.js +624 -0
- package/lib/invariant.js +26 -0
- package/lib/types/api-path.d.ts +12 -0
- package/lib/types/api-request-trust.d.ts +43 -0
- package/lib/types/client/api.d.ts +20 -0
- package/lib/types/client/connection.d.ts +64 -0
- package/lib/types/client/fixture.d.ts +68 -0
- package/lib/types/client/index.d.ts +74 -0
- package/lib/types/client/random-uuid.d.ts +7 -0
- package/lib/types/client/rpc.d.ts +11 -0
- package/lib/types/client/web-api-client.d.ts +11 -0
- package/lib/types/http-bridge.d.ts +29 -0
- package/lib/types/index.d.ts +36 -0
- package/lib/types/invariant.d.ts +16 -0
- package/lib/types/loopback-hostname.d.ts +12 -0
- package/lib/types/rpc-host.d.ts +34 -0
- package/lib/types/rpc.d.ts +51 -0
- package/lib/types/websocket-downlink.d.ts +43 -0
- package/package.json +76 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 DeepSeek
|
|
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,19 @@
|
|
|
1
|
+
# @hydraharness/harness-client-connection
|
|
2
|
+
|
|
3
|
+
`ctx.connection` owns the browser API client, loopback classification, connection generation, and the single-consumer Host/event downlink loops. The served Web app uses HTTP and WebSocket transport; a shell can supply `globalThis.__HYDRA_TRANSPORT__` with `createApiClient`, `fetch`, and optional `loadBundle` instead.
|
|
4
|
+
|
|
5
|
+
The Host owns the `/api` route and applies the loopback fence before a registered Typert Remote or API Proxy handles a request. Plugin inventory management is loopback-only: loader enablement, OpenAI/Codex marketplace-source changes, imported-plugin lifecycle, imported MCP-server enablement, and hook trust all expose installed code or mutate local configuration. A configured trusted host can invoke other application methods but cannot bypass this fence.
|
|
6
|
+
|
|
7
|
+
Authorization methods are loopback-only as well: account inventories reveal provider identities, and begin/answer/logout can start an interactive login, carry its answer, or mutate the provider account pool. The connection keeps these methods behind the same local caller check while ordinary model and session reads remain available to a configured trusted host.
|
|
8
|
+
|
|
9
|
+
## Model Experience
|
|
10
|
+
|
|
11
|
+
None, as this transport package neither assembles model input nor registers a model-facing capability.
|
|
12
|
+
|
|
13
|
+
#### KV Cache effect
|
|
14
|
+
|
|
15
|
+
None.
|
|
16
|
+
|
|
17
|
+
## Known Limitations and Deferred Work
|
|
18
|
+
|
|
19
|
+
- **Local-only plugin management** — remote clients cannot manage marketplace sources or imported bundles until an authenticated authority model exists.
|