@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
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Package-owned invariant companion. @module @hydraharness/harness-host-plugin-inventory/invariant */
|
|
2
|
+
import type { Context } from '@hydraharness/cordis';
|
|
3
|
+
/** Cordis companion plugin name. */
|
|
4
|
+
export declare const name = "host-plugin-inventory-invariant";
|
|
5
|
+
/** Service required before the companion can reserve package ownership. */
|
|
6
|
+
export declare const inject: string[];
|
|
7
|
+
/** Register this package's invariant companion. */
|
|
8
|
+
export declare const apply: (ctx: Context) => Promise<() => void>;
|
|
9
|
+
//# sourceMappingURL=invariant.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Package-owned invariant companion. @module @hydraharness/harness-host-plugin-inventory/invariant */
|
|
2
|
+
const PACKAGE_NAME = '@hydraharness/harness-host-plugin-inventory';
|
|
3
|
+
/** Cordis companion plugin name. */
|
|
4
|
+
export const name = 'host-plugin-inventory-invariant';
|
|
5
|
+
/** Service required before the companion can reserve package ownership. */
|
|
6
|
+
export const inject = ['invariants'];
|
|
7
|
+
/** No runtime invariant: every snapshot is projected directly from Loader-owned state. */
|
|
8
|
+
const install = () => { };
|
|
9
|
+
/** Register this package's invariant companion. */
|
|
10
|
+
export const apply = (ctx) => Promise.resolve(ctx.invariants.register(PACKAGE_NAME, install));
|
|
11
|
+
/* jscpd:ignore-end */
|
|
12
|
+
//# sourceMappingURL=invariant.js.map
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import type { Branded } from '@hydraharness/harness-brand';
|
|
2
|
+
import type { SettingsTarget } from '@hydraharness/harness-workspace-config/types';
|
|
3
|
+
export type { SettingsTarget } from '@hydraharness/harness-workspace-config/types';
|
|
4
|
+
export type { ImportedPluginEntry, ImportedPluginSnapshot, PluginImportSource } from '@hydraharness/harness-plugin-runtime/types';
|
|
5
|
+
export type { McpServerDefinitionRequest, McpServerEnablementRequest, McpServerSnapshot, McpServerStatus, McpServerTransport, McpServerView, } from '@hydraharness/harness-mcp-registry/types';
|
|
6
|
+
export type { HookDialect, HookRecordDefinitionRequest, HookRecordEnablementRequest, HookRecordSnapshot, HookRecordStatus, HookRecordView, HookSourceKind, } from '@hydraharness/harness-hooks-registry/types';
|
|
7
|
+
/** Stable Loader-tree identity of one configured plugin entry. */
|
|
8
|
+
export type PluginEntryId = Branded<'PluginEntryId'>;
|
|
9
|
+
/** Lifecycle state of an entry's root Fiber, or null when it has no live root Fiber. */
|
|
10
|
+
export type PluginFiberPhase = 'pending' | 'loading' | 'active' | 'failed' | 'unloading' | null;
|
|
11
|
+
/** One non-group Loader entry exposed to trusted clients. */
|
|
12
|
+
export interface PluginInventoryEntry {
|
|
13
|
+
/** Functionality or dependency protected from optional-plugin suspension, separately from restart semantics. */
|
|
14
|
+
readonly required?: boolean;
|
|
15
|
+
readonly entryId: PluginEntryId;
|
|
16
|
+
/** Exact module specifier imported by the Loader entry. */
|
|
17
|
+
readonly moduleName: string;
|
|
18
|
+
/** Package-authored summary from package.json description. */
|
|
19
|
+
readonly description?: string;
|
|
20
|
+
/** Package-authored usage guidance from package.json hydra.plugin.application. */
|
|
21
|
+
readonly application?: string;
|
|
22
|
+
/** Core entries are saved for the next app start; omitted means normal. */
|
|
23
|
+
readonly pluginType?: 'core' | 'normal';
|
|
24
|
+
/** Modules with the same declared function, controlled by this entry. */
|
|
25
|
+
readonly relatedModules?: readonly string[];
|
|
26
|
+
/** Members currently have different desired states; either toggle value changes the group. */
|
|
27
|
+
readonly mixedEnabled?: boolean;
|
|
28
|
+
/** Enablement at Host start; null means grouped entries started with different states. */
|
|
29
|
+
readonly initialEnabled?: boolean | null;
|
|
30
|
+
/** Whether any saved member differs from its enablement at Host start. */
|
|
31
|
+
readonly changedSinceStart?: boolean;
|
|
32
|
+
/** Effective Loader enablement, including disabled ancestor groups. */
|
|
33
|
+
readonly enabled: boolean;
|
|
34
|
+
/** Agent preset that owns this entry, when it is not a Host entry. */
|
|
35
|
+
readonly presetId?: string;
|
|
36
|
+
/** Leaf row within {@link presetId}; identifies its settings override. */
|
|
37
|
+
readonly presetRowId?: string;
|
|
38
|
+
/** Whether a changed preset entry affects only sessions created afterwards. */
|
|
39
|
+
readonly newSessionsOnly?: boolean;
|
|
40
|
+
/** Desired root-entry enablement waiting for the next profile start. */
|
|
41
|
+
readonly pendingEnabled?: boolean;
|
|
42
|
+
/** Whether the persisted desired state differs from the live Loader state. */
|
|
43
|
+
readonly restartRequired: boolean;
|
|
44
|
+
/** Whether this app can persistently change the entry's enablement. */
|
|
45
|
+
readonly toggleable: boolean;
|
|
46
|
+
readonly fiberPhase: PluginFiberPhase;
|
|
47
|
+
}
|
|
48
|
+
/** Requested persistent enablement for one Loader entry. */
|
|
49
|
+
export interface PluginEnablementRequest extends SettingsTarget {
|
|
50
|
+
readonly entryId: PluginEntryId;
|
|
51
|
+
readonly enabled: boolean;
|
|
52
|
+
}
|
|
53
|
+
/** Point-in-time inventory returned by the plugin inventory Remote. */
|
|
54
|
+
export interface PluginInventorySnapshot extends SettingsTarget {
|
|
55
|
+
readonly entries: readonly PluginInventoryEntry[];
|
|
56
|
+
}
|
|
57
|
+
/** Result of changing one native plugin's desired state. */
|
|
58
|
+
export interface PluginEnablementResult {
|
|
59
|
+
readonly snapshot: PluginInventorySnapshot;
|
|
60
|
+
/** Whether this specific mutation waits for the next profile start. */
|
|
61
|
+
readonly restartRequired: boolean;
|
|
62
|
+
}
|
|
63
|
+
/** Persist one Git-backed or local marketplace root. */
|
|
64
|
+
export interface AddPluginMarketplaceRequest {
|
|
65
|
+
readonly source: string;
|
|
66
|
+
readonly gitRef?: string;
|
|
67
|
+
readonly sparsePaths?: readonly string[];
|
|
68
|
+
}
|
|
69
|
+
/** Host-normalized source fields shared by every marketplace state. */
|
|
70
|
+
export interface PluginMarketplaceSourceView {
|
|
71
|
+
readonly source: string;
|
|
72
|
+
readonly gitRef?: string;
|
|
73
|
+
readonly sparsePaths: readonly string[];
|
|
74
|
+
/** Marketplace slot state; disabling or removing it cascades to its imported plugins. */
|
|
75
|
+
readonly enabled: boolean;
|
|
76
|
+
}
|
|
77
|
+
/** Toggle one marketplace slot; disabling cascades to disable its imported plugins. */
|
|
78
|
+
export interface SetPluginMarketplaceEnablementRequest {
|
|
79
|
+
readonly source: string;
|
|
80
|
+
readonly enabled: boolean;
|
|
81
|
+
}
|
|
82
|
+
/** One persisted marketplace and its latest Host-side load result. */
|
|
83
|
+
export type PluginMarketplaceView = PluginMarketplaceSourceView & ({
|
|
84
|
+
readonly status: 'ready';
|
|
85
|
+
} | {
|
|
86
|
+
readonly status: 'unavailable';
|
|
87
|
+
});
|
|
88
|
+
/** Point-in-time marketplace catalog returned by the plugin inventory Remote. */
|
|
89
|
+
export interface PluginMarketplaceSnapshot {
|
|
90
|
+
readonly marketplaces: readonly PluginMarketplaceView[];
|
|
91
|
+
}
|
|
92
|
+
/** Enable or disable one imported plugin MCP server. */
|
|
93
|
+
export interface ImportedPluginMcpServerEnablementRequest {
|
|
94
|
+
readonly identity: string;
|
|
95
|
+
readonly server: string;
|
|
96
|
+
readonly enabled: boolean;
|
|
97
|
+
}
|
|
98
|
+
/** Set one imported MCP tool's approval mode. */
|
|
99
|
+
export interface ImportedPluginMcpToolApprovalRequest {
|
|
100
|
+
readonly identity: string;
|
|
101
|
+
readonly server: string;
|
|
102
|
+
/** Raw MCP name or its host-qualified public tool name. */
|
|
103
|
+
readonly tool: string;
|
|
104
|
+
readonly approval: 'ask' | 'allow' | 'deny';
|
|
105
|
+
}
|
|
106
|
+
//# sourceMappingURL=types.d.ts.map
|
package/package.json
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@hydraharness/harness-host-plugin-inventory",
|
|
3
|
+
"description": "Remote projection and shared-settings controls for current Cordis Loader plugin state",
|
|
4
|
+
"hydra": {
|
|
5
|
+
"plugin": {
|
|
6
|
+
"application": "Expose installed plugin information and persist plugin, marketplace, MCP, and hook settings."
|
|
7
|
+
}
|
|
8
|
+
},
|
|
9
|
+
"version": "0.1.1-rc.10",
|
|
10
|
+
"publishConfig": {
|
|
11
|
+
"access": "public"
|
|
12
|
+
},
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git+https://github.com/MaiHongPhong2010/Hydra-Harness.git",
|
|
16
|
+
"directory": "packages/host/plugin-inventory"
|
|
17
|
+
},
|
|
18
|
+
"type": "module",
|
|
19
|
+
"main": "lib/index.js",
|
|
20
|
+
"types": "lib/types/index.d.ts",
|
|
21
|
+
"exports": {
|
|
22
|
+
".": {
|
|
23
|
+
"types": "./lib/types/index.d.ts",
|
|
24
|
+
"default": "./lib/index.js"
|
|
25
|
+
},
|
|
26
|
+
"./invariant": {
|
|
27
|
+
"types": "./lib/types/invariant.d.ts",
|
|
28
|
+
"default": "./lib/invariant.js"
|
|
29
|
+
},
|
|
30
|
+
"./types": {
|
|
31
|
+
"types": "./lib/types/types.d.ts",
|
|
32
|
+
"default": "./lib/types/types.js"
|
|
33
|
+
},
|
|
34
|
+
"./typert": {
|
|
35
|
+
"types": "./lib/typert.host.d.ts",
|
|
36
|
+
"default": "./lib/typert.host.js"
|
|
37
|
+
},
|
|
38
|
+
"./remote": {
|
|
39
|
+
"types": "./lib/typert.remote-client.d.ts",
|
|
40
|
+
"default": "./lib/typert.remote-client.js"
|
|
41
|
+
},
|
|
42
|
+
"./src/*": "./src/*",
|
|
43
|
+
"./package.json": "./package.json"
|
|
44
|
+
},
|
|
45
|
+
"files": [
|
|
46
|
+
"lib/index.js",
|
|
47
|
+
"lib/invariant.js",
|
|
48
|
+
"lib/types/**/*.js",
|
|
49
|
+
"lib/types/**/*.d.ts",
|
|
50
|
+
"lib/typert.host.js",
|
|
51
|
+
"lib/typert.host.d.ts",
|
|
52
|
+
"lib/typert.remote-client.js",
|
|
53
|
+
"lib/typert.remote-client.d.ts"
|
|
54
|
+
],
|
|
55
|
+
"license": "MIT",
|
|
56
|
+
"dependencies": {
|
|
57
|
+
"zod": "^4.4.3",
|
|
58
|
+
"@hydraharness/schemastery": "^3.18.2"
|
|
59
|
+
},
|
|
60
|
+
"peerDependencies": {
|
|
61
|
+
"@hydraharness/harness-optional-plugins": "^0.1.1-rc.10",
|
|
62
|
+
"@hydraharness/harness-app-boot": "^0.1.1-rc.10",
|
|
63
|
+
"@hydraharness/harness-atomic-write": "^0.1.1-rc.10",
|
|
64
|
+
"@hydraharness/harness-brand": "^0.1.1-rc.10",
|
|
65
|
+
"@hydraharness/harness-hooks-registry": "^0.1.1-rc.10",
|
|
66
|
+
"@hydraharness/harness-mcp-registry": "^0.1.1-rc.10",
|
|
67
|
+
"@hydraharness/harness-plugin-runtime": "^0.1.1-rc.10",
|
|
68
|
+
"@hydraharness/harness-settings": "^0.1.1-rc.10",
|
|
69
|
+
"@hydraharness/harness-typert-protocol": "^0.1.1-rc.10",
|
|
70
|
+
"@hydraharness/harness-invariants": "^0.1.1-rc.10",
|
|
71
|
+
"@hydraharness/harness-workspace-config": "^0.1.1-rc.10",
|
|
72
|
+
"@hydraharness/cordis": "^4.0.2",
|
|
73
|
+
"@hydraharness/cordis-plugin-include": "^1.0.7",
|
|
74
|
+
"@hydraharness/cordis-plugin-loader": "^1.0.3"
|
|
75
|
+
},
|
|
76
|
+
"devDependencies": {
|
|
77
|
+
"@hydraharness/harness-agent-presets": "^0.1.1-rc.10",
|
|
78
|
+
"@hydraharness/harness-optional-plugins": "^0.1.1-rc.10",
|
|
79
|
+
"@hydraharness/harness-app-boot": "^0.1.1-rc.10",
|
|
80
|
+
"@hydraharness/harness-brand": "^0.1.1-rc.10",
|
|
81
|
+
"@hydraharness/harness-atomic-write": "^0.1.1-rc.10",
|
|
82
|
+
"@hydraharness/harness-hooks-registry": "^0.1.1-rc.10",
|
|
83
|
+
"@hydraharness/harness-invariants": "^0.1.1-rc.10",
|
|
84
|
+
"@hydraharness/harness-mcp-registry": "^0.1.1-rc.10",
|
|
85
|
+
"@hydraharness/harness-plugin-runtime": "^0.1.1-rc.10",
|
|
86
|
+
"@hydraharness/harness-settings": "^0.1.1-rc.10",
|
|
87
|
+
"@hydraharness/harness-workspace-config": "^0.1.1-rc.10",
|
|
88
|
+
"@hydraharness/harness-settings-file": "^0.1.1-rc.10",
|
|
89
|
+
"@hydraharness/cordis": "^4.0.2",
|
|
90
|
+
"@hydraharness/cordis-plugin-include": "^1.0.7",
|
|
91
|
+
"@hydraharness/cordis-plugin-loader": "^1.0.3",
|
|
92
|
+
"@hydraharness/harness-typert-protocol": "^0.1.1-rc.10"
|
|
93
|
+
}
|
|
94
|
+
}
|