@hydraharness/harness-host-plugin-inventory 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 +38 -0
- package/lib/index.js +1375 -0
- package/lib/invariant.js +13 -0
- package/lib/typert.host.d.ts +3 -0
- package/lib/typert.host.js +1437 -0
- package/lib/typert.remote-client.d.ts +72 -0
- package/lib/typert.remote-client.js +1431 -0
- package/lib/types/index.d.ts +250 -0
- package/lib/types/index.js +1230 -0
- package/lib/types/invariant.d.ts +9 -0
- package/lib/types/invariant.js +12 -0
- package/lib/types/types.d.ts +106 -0
- package/lib/types/types.js +2 -0
- package/package.json +94 -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,38 @@
|
|
|
1
|
+
# @hydraharness/harness-host-plugin-inventory
|
|
2
|
+
|
|
3
|
+
`PluginInventoryGateway` projects the current Cordis Loader tree, persistent module enablement, imported OpenAI/Codex bundle lifecycle, OpenAI/Codex marketplace sources, and the user's own MCP server and hook records through `pluginInventory` Remotes. It publishes `list`, `setEnabled`, `listMarketplaces`, `addMarketplace`, `setMarketplaceEnabled`, `removeMarketplace`, `listImportedPlugins`, `importPlugin`, `infoPlugin`, `enablePlugin`, `disablePlugin`, `setPluginMcpServerEnabled`, `trustPlugin`, `untrustPlugin`, `removePlugin`, `listMcpServers`, `defineMcpServer`, `setMcpServerEnabled`, `removeMcpServer`, `listHookRecords`, `defineHookRecord`, `setHookRecordEnabled`, and `removeHookRecord`.
|
|
4
|
+
|
|
5
|
+
Loader inventory reads `ctx.loader.entries()` directly, skips structural group rows and configured Host placeholders for agent-preset entries, and projects one logical module with its configured entry id, module name, effective enablement, toggle eligibility, and root Fiber phase. When `agentPresets` is present, it also projects each preset leaf with an `agent-preset:<preset>:<row>` id. Ordinary Host rows change live and persist in `plugins.enabled`; rows declaring `pluginType: core` persist their desired state in `hydra.profile.pluginEnablement`, remain live until restart, and return `restartRequired`. Omitted `pluginType` or `pluginType: normal` permits live changes. The static declaration is beside `id` and `name`, outside `config`; invalid values and the `plugin_type` spelling are rejected. Preset rows persist in `agent-presets.pluginEnablement` and affect only sessions created after the change.
|
|
6
|
+
|
|
7
|
+
`list` and `setEnabled` accept an optional workspace settings target. A workspace list contains only its preset leaves; workspace writes reject Host rows and persist the selected preset override in `agent-presets.pluginEnablement`. Each leaf's `presetId` and `presetRowId` identify the nested override that a settings reset removes. Initial enablement is tracked separately per workspace and layer.
|
|
8
|
+
|
|
9
|
+
Entries declaring the same non-empty `pluginGroup` share one control; `relatedModules` lists its other modules. A group inherits core treatment from any core member. Only profile-owned members are persisted; dynamically owned entries remain controlled by their owner. Live groups roll back their Loader state if application or persistence fails. The shipped Settings UI, storage stack, and directory-picker pair each form one group. Independently configured agent-preset instances retain separate switches. `initialEnabled` and `changedSinceStart` compare saved state with Host startup, including mixed initial states within a group.
|
|
10
|
+
|
|
11
|
+
Each entry also carries `description` from its package manifest and `application` from `hydra.plugin.application`; Loader or preset entry metadata can override either value for a composition-specific description. The gateway reads these fields without importing plugin code so Settings can explain a plugin in its details dialog.
|
|
12
|
+
|
|
13
|
+
## OpenAI/Codex marketplace sources
|
|
14
|
+
|
|
15
|
+
`plugin-marketplaces.sources` stores a normalized source, optional Git ref, repository-relative sparse paths, and an `enabled` slot flag (default `true`). Sources are GitHub shorthand, HTTPS/SSH Git URLs, or existing local folders. A source must contain `.agents/plugins/marketplace.json`, `.agents/plugins/api_marketplace.json`, or root `marketplace.json` with a `plugins` array. Top-level marketplace metadata and per-entry metadata such as `category` and `policy` are accepted during validation; this Host inventory does not apply catalog installation or authentication policy. Catalog order is retained by the runtime selector. The catalog is validation-only here; `importPlugin` selects and stages a bundle through `@hydraharness/harness-plugin-runtime`, which validates the bundle manifest and controls its lifecycle.
|
|
16
|
+
|
|
17
|
+
Git reads use a temporary shallow clone, enable sparse checkout only when paths are supplied, always retain the catalog path, reject unsafe transports and credential-like environment variables, apply a 30-second command timeout, and remove the checkout after parsing. Local catalog files and Git output are capped at 1 MiB. At most 20 sources and 500 catalog entries are accepted.
|
|
18
|
+
|
|
19
|
+
`setMarketplaceEnabled` persists the slot's `enabled` flag and cascades to every imported plugin whose recorded source marketplace matches this source, calling the same `enable`/`disable` lifecycle as `enablePlugin`/`disablePlugin`. `removeMarketplace` cascades a full `removePlugin` (uninstall, including writable data) to those same plugins before deleting the source record. Both cascades are a no-op when the imported-plugin runtime is not part of the composition.
|
|
20
|
+
|
|
21
|
+
## The user's own MCP servers and hooks
|
|
22
|
+
|
|
23
|
+
The `listMcpServers`/`defineMcpServer`/`setMcpServerEnabled`/`removeMcpServer` and `listHookRecords`/`defineHookRecord`/`setHookRecordEnabled`/`removeHookRecord` Remotes forward to `@hydraharness/harness-mcp-registry` and `@hydraharness/harness-hooks-registry`, which own the stored records (`mcp-servers.servers` and `hooks.records`), their validation, and their mounts. This gateway adds only the Remote surface: a composition without either registry answers its calls with `MCP server registry is unavailable` or `hook record registry is unavailable` rather than failing to mount.
|
|
24
|
+
|
|
25
|
+
These calls accept an optional `workspaceId` and `layer` (`shared` or `local`, default `local`) to select workspace records through [`workspace-config`](../../workspace/workspace-config/README.md). Lists and mutation results project the selected file's desired records with runtime status and echo the selected target; mutations persist in that file. Untrusted records remain editable without being mounted. Omitting both target fields retains global behavior; a layer without a workspace ID rejects. Remove calls accept the original record-name string or `{ name, workspaceId, layer }`. Unknown workspace IDs reject before reading or changing records.
|
|
26
|
+
|
|
27
|
+
## Model Experience
|
|
28
|
+
|
|
29
|
+
None, as this Host projection registers no prompt, tool, message, or provider request.
|
|
30
|
+
|
|
31
|
+
#### KV Cache effect
|
|
32
|
+
|
|
33
|
+
None; this package never assembles model input.
|
|
34
|
+
|
|
35
|
+
## Known Limitations and Deferred Work
|
|
36
|
+
|
|
37
|
+
- **No marketplace-entry projection** — the gateway validates sources but does not expose catalog metadata; import with a selected plugin name is owned by the imported-plugin runtime.
|
|
38
|
+
- **No marketplace sync or policy engine** — adding a source validates its current document only. There is no daily/explicit sync, per-entry policy application, update report, or version picker. Reimporting an installed source uses the imported-plugin runtime's existing versioned install path only when explicitly requested.
|