@mcp-com-ai/shared-utils 1.1.0 → 1.3.1

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.
@@ -0,0 +1,54 @@
1
+ export interface HapiWorkspacePaths {
2
+ source?: string;
3
+ contracts?: string;
4
+ state?: string;
5
+ }
6
+ export interface HapiWorkspacePlugin {
7
+ name: string;
8
+ version: string;
9
+ }
10
+ export interface HapiWorkspaceProfileServe {
11
+ spec?: string;
12
+ mcp?: boolean;
13
+ capabilityGraph?: boolean;
14
+ capabilityPlanning?: boolean;
15
+ capabilityClassifier?: string;
16
+ runtimeAuthority?: 'decision' | 'guarded';
17
+ }
18
+ export interface HapiWorkspaceProfile {
19
+ extends?: string;
20
+ serve?: HapiWorkspaceProfileServe;
21
+ }
22
+ export interface HapiWorkspaceDescriptor {
23
+ hapiWorkspace: 1;
24
+ id: string;
25
+ name?: string;
26
+ paths?: HapiWorkspacePaths;
27
+ plugins?: {
28
+ required?: HapiWorkspacePlugin[];
29
+ optional?: HapiWorkspacePlugin[];
30
+ };
31
+ profiles?: Record<string, HapiWorkspaceProfile>;
32
+ defaultProfile?: string;
33
+ }
34
+ export interface HapiWorkspaceContext {
35
+ descriptor: string;
36
+ root: string;
37
+ id: string;
38
+ name?: string;
39
+ paths: Required<HapiWorkspacePaths>;
40
+ profile?: string;
41
+ profileSettings?: HapiWorkspaceProfileServe;
42
+ plugins: Required<NonNullable<HapiWorkspaceDescriptor['plugins']>>;
43
+ }
44
+ export declare class HapiWorkspaceError extends Error {
45
+ constructor(message: string);
46
+ }
47
+ export interface WorkspaceBootstrap {
48
+ argv: string[];
49
+ selector?: string;
50
+ profile?: string;
51
+ }
52
+ /** Removes only global workspace selectors before normal command parsing. */
53
+ export declare function parseWorkspaceBootstrap(argv: readonly string[], env?: Record<string, string | undefined>): WorkspaceBootstrap;
54
+ export declare function resolveHapiWorkspace(selector: string | undefined, profile?: string, cwd?: string): Promise<HapiWorkspaceContext | undefined>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mcp-com-ai/shared-utils",
3
- "version": "1.1.0",
3
+ "version": "1.3.1",
4
4
  "description": "Shared HAPI utilities: HAPI_HOME resolution, logger, config loader, errors, runtime detection, secrets. Consumed by the CLI, the core engine, and all first-party plugins.",
5
5
  "license": "LRL-CL",
6
6
  "type": "module",