@kwonye/mcpx 0.1.105 → 0.1.106
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/dist/adapters/codex.d.ts +2 -0
- package/dist/adapters/index.d.ts +2 -1
- package/dist/adapters/json.d.ts +26 -0
- package/dist/adapters/pi.d.ts +9 -0
- package/dist/chunk-0xt563m1.js +126 -0
- package/dist/{chunk-btbww96n.js → chunk-1mrkz29t.js} +69 -56
- package/dist/{chunk-6mxr34tc.js → chunk-1v66g9d6.js} +4 -3
- package/dist/chunk-1yq3yb66.js +126 -0
- package/dist/chunk-27mq4agf.js +33 -0
- package/dist/{chunk-t4hqf6yh.js → chunk-4aafp444.js} +8136 -8262
- package/dist/chunk-4xym942z.js +36 -0
- package/dist/{chunk-tnhekcpv.js → chunk-56z18csx.js} +1 -1
- package/dist/{chunk-bnbz55g6.js → chunk-65kshh9w.js} +1 -1
- package/dist/{chunk-xydajvzg.js → chunk-7ky3rsw9.js} +1 -1
- package/dist/chunk-7rq88hb3.js +563 -0
- package/dist/chunk-8v13hqrp.js +825 -0
- package/dist/chunk-a2gen8bn.js +730 -0
- package/dist/{chunk-01s7rhx3.js → chunk-brxwa30j.js} +130 -113
- package/dist/chunk-chaj8a8b.js +45 -0
- package/dist/chunk-e96643mj.js +26 -0
- package/dist/{chunk-d2v9rxy0.js → chunk-ew06e41w.js} +12 -6
- package/dist/chunk-ezk8txcy.js +23 -0
- package/dist/{chunk-4y0t0tfj.js → chunk-grkz21sq.js} +29 -3
- package/dist/{chunk-12vgqm89.js → chunk-gvjxpk98.js} +1 -1
- package/dist/chunk-h9kp47rp.js +18 -0
- package/dist/chunk-hahs24dv.js +127 -0
- package/dist/{chunk-y9a1rx7j.js → chunk-jv0s0cp6.js} +5 -3
- package/dist/{chunk-enzmq965.js → chunk-n0462d52.js} +1 -1
- package/dist/chunk-nh6hhv29.js +138 -0
- package/dist/chunk-p7yzyt87.js +19426 -0
- package/dist/chunk-q86c5s6r.js +7 -0
- package/dist/chunk-qf8bj9y7.js +254 -0
- package/dist/chunk-t20f49g3.js +30 -0
- package/dist/{chunk-am903qjk.js → chunk-v041118a.js} +11 -5
- package/dist/{chunk-91vcwk5m.js → chunk-v14bg5yp.js} +1 -1
- package/dist/chunk-wvzap0na.js +18166 -0
- package/dist/chunk-wztmp5b4.js +30479 -0
- package/dist/chunk-xvqr1q9b.js +14 -0
- package/dist/{chunk-h158rkts.js → chunk-yj7mpczw.js} +17 -5
- package/dist/chunk-yr0txkw0.js +31 -0
- package/dist/cli.js +3879 -1061
- package/dist/core/adoption.d.ts +62 -0
- package/dist/core/analytics.d.ts +17 -0
- package/dist/core/consumers.d.ts +8 -0
- package/dist/core/control.d.ts +12 -0
- package/dist/core/daemon.d.ts +2 -2
- package/dist/core/file-state.d.ts +5 -0
- package/dist/core/harnesses.d.ts +25 -0
- package/dist/core/index.d.ts +12 -4
- package/dist/core/index.js +109 -71
- package/dist/core/managed-index-lock.d.ts +1 -1
- package/dist/core/management.d.ts +32 -0
- package/dist/core/native-document.d.ts +4 -0
- package/dist/core/operations.d.ts +52 -0
- package/dist/core/plugin-projections.d.ts +1 -0
- package/dist/core/runtime-entry.d.ts +6 -0
- package/dist/core/runtime-snapshot.d.ts +6 -0
- package/dist/core/secret-keychain.d.ts +31 -0
- package/dist/core/secrets.d.ts +12 -2
- package/dist/core/served-skills.d.ts +62 -0
- package/dist/core/status.d.ts +1 -0
- package/dist/core/sync-plan.d.ts +14 -0
- package/dist/core/sync.d.ts +3 -0
- package/dist/core/telemetry.d.ts +2 -2
- package/dist/core/tui.d.ts +20 -0
- package/dist/core/verify-upstreams.d.ts +4 -0
- package/dist/core/work-limiter.d.ts +10 -0
- package/dist/gateway/server.d.ts +2 -0
- package/dist/types.d.ts +62 -1
- package/dist/util/fs.d.ts +2 -0
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
- package/dist/adapters/opencode.d.ts +0 -11
- package/dist/chunk-56whm3hm.js +0 -4055
- package/dist/chunk-fw8dyt89.js +0 -344
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { verifyUpstreams } from "./verify-upstreams.js";
|
|
3
|
+
import type { UpstreamServerSpec } from "../types.js";
|
|
4
|
+
import { SecretsManager } from "./secrets.js";
|
|
5
|
+
declare const itemSchema: z.ZodObject<{
|
|
6
|
+
id: z.ZodString;
|
|
7
|
+
harness: z.ZodString;
|
|
8
|
+
kind: z.ZodEnum<{
|
|
9
|
+
mcp: "mcp";
|
|
10
|
+
skill: "skill";
|
|
11
|
+
package: "package";
|
|
12
|
+
}>;
|
|
13
|
+
name: z.ZodString;
|
|
14
|
+
path: z.ZodString;
|
|
15
|
+
nativeKey: z.ZodString;
|
|
16
|
+
fingerprint: z.ZodString;
|
|
17
|
+
action: z.ZodEnum<{
|
|
18
|
+
unsupported: "unsupported";
|
|
19
|
+
import: "import";
|
|
20
|
+
reuse: "reuse";
|
|
21
|
+
conflict: "conflict";
|
|
22
|
+
}>;
|
|
23
|
+
canonicalId: z.ZodString;
|
|
24
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
25
|
+
reload: z.ZodString;
|
|
26
|
+
}, z.core.$strip>;
|
|
27
|
+
export declare const adoptionPlanSchema: z.ZodObject<{
|
|
28
|
+
id: z.ZodUUID;
|
|
29
|
+
createdAt: z.ZodString;
|
|
30
|
+
configHash: z.ZodString;
|
|
31
|
+
items: z.ZodArray<z.ZodObject<{
|
|
32
|
+
id: z.ZodString;
|
|
33
|
+
harness: z.ZodString;
|
|
34
|
+
kind: z.ZodEnum<{
|
|
35
|
+
mcp: "mcp";
|
|
36
|
+
skill: "skill";
|
|
37
|
+
package: "package";
|
|
38
|
+
}>;
|
|
39
|
+
name: z.ZodString;
|
|
40
|
+
path: z.ZodString;
|
|
41
|
+
nativeKey: z.ZodString;
|
|
42
|
+
fingerprint: z.ZodString;
|
|
43
|
+
action: z.ZodEnum<{
|
|
44
|
+
unsupported: "unsupported";
|
|
45
|
+
import: "import";
|
|
46
|
+
reuse: "reuse";
|
|
47
|
+
conflict: "conflict";
|
|
48
|
+
}>;
|
|
49
|
+
canonicalId: z.ZodString;
|
|
50
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
51
|
+
reload: z.ZodString;
|
|
52
|
+
}, z.core.$strip>>;
|
|
53
|
+
errors: z.ZodArray<z.ZodString>;
|
|
54
|
+
}, z.core.$strip>;
|
|
55
|
+
export type AdoptionPlan = z.infer<typeof adoptionPlanSchema>;
|
|
56
|
+
export type AdoptionItem = z.infer<typeof itemSchema>;
|
|
57
|
+
export declare function protectServerSecrets(name: string, spec: UpstreamServerSpec, secrets?: SecretsManager): UpstreamServerSpec;
|
|
58
|
+
/** Discovery is read-only; plans contain metadata and hashes, never credentials. */
|
|
59
|
+
export declare function planAdoption(targets?: string[]): AdoptionPlan;
|
|
60
|
+
export declare function applyAdoption(rawPlan: AdoptionPlan, selectedIds?: string[], verify?: typeof verifyUpstreams): Promise<import("./operations.js").Operation>;
|
|
61
|
+
export {};
|
|
62
|
+
//# sourceMappingURL=adoption.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare function getMachineId(): string;
|
|
2
|
+
/**
|
|
3
|
+
* Capture a named event with optional properties.
|
|
4
|
+
* The call is a no-op when PostHog is not configured so the CLI always works.
|
|
5
|
+
*/
|
|
6
|
+
export declare function capture(event: string, properties?: Record<string, unknown>): void;
|
|
7
|
+
/**
|
|
8
|
+
* Capture an unhandled exception.
|
|
9
|
+
* The call is a no-op when PostHog is not configured.
|
|
10
|
+
*/
|
|
11
|
+
export declare function captureException(error: unknown, additionalProperties?: Record<string, unknown>): void;
|
|
12
|
+
/**
|
|
13
|
+
* Flush all pending events and shut down the PostHog client.
|
|
14
|
+
* Must be awaited before the CLI process exits.
|
|
15
|
+
*/
|
|
16
|
+
export declare function shutdown(): Promise<void>;
|
|
17
|
+
//# sourceMappingURL=analytics.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { McpxConfig } from "../types.js";
|
|
2
|
+
import { SecretsManager } from "./secrets.js";
|
|
3
|
+
export declare function consumerToken(config: McpxConfig, id: string, projectPath?: string, secrets?: SecretsManager): string;
|
|
4
|
+
export declare function resolveConsumer(config: McpxConfig, token: string, secrets?: SecretsManager): {
|
|
5
|
+
id: string;
|
|
6
|
+
projectPath?: string;
|
|
7
|
+
} | null;
|
|
8
|
+
//# sourceMappingURL=consumers.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type Operation } from "./operations.js";
|
|
2
|
+
export declare const CONTROL_VERSION = 1;
|
|
3
|
+
export declare function controlSocketPath(): string;
|
|
4
|
+
export declare function coordinate<T>(work: () => Promise<T>): Promise<T>;
|
|
5
|
+
export declare function startControlServer(): Promise<() => Promise<void>>;
|
|
6
|
+
export declare function controlRequest<T = unknown>(method: string, args?: unknown[]): Promise<T>;
|
|
7
|
+
export declare function ensureControlService(cliPath: string): Promise<void>;
|
|
8
|
+
export declare function subscribeControlEvents(listener: (event: {
|
|
9
|
+
type: string;
|
|
10
|
+
operation?: Operation;
|
|
11
|
+
}) => void, onError?: (error: Error) => void): () => void;
|
|
12
|
+
//# sourceMappingURL=control.d.ts.map
|
package/dist/core/daemon.d.ts
CHANGED
|
@@ -21,10 +21,10 @@ export declare function resolveGatewayPort(config: McpxConfig, secrets?: Secrets
|
|
|
21
21
|
}>;
|
|
22
22
|
export declare function getDaemonStatus(config: McpxConfig): DaemonStatus;
|
|
23
23
|
export declare function startDaemon(config: McpxConfig, cliPath: string, secrets: SecretsManager): Promise<DaemonStartResult>;
|
|
24
|
-
export declare function stopDaemon(): {
|
|
24
|
+
export declare function stopDaemon(): Promise<{
|
|
25
25
|
stopped: boolean;
|
|
26
26
|
message: string;
|
|
27
|
-
}
|
|
27
|
+
}>;
|
|
28
28
|
export declare function restartDaemon(config: McpxConfig, cliPath: string, secrets: SecretsManager): Promise<DaemonStartResult>;
|
|
29
29
|
export declare function readDaemonLogs(maxLines?: number): string;
|
|
30
30
|
export declare function runDaemonForeground(config: McpxConfig, port: number, secrets: SecretsManager): Promise<void>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Hash the directory entry itself; never traverse a symlink into another tree. */
|
|
2
|
+
export declare function pathFingerprint(target: string): string | null;
|
|
3
|
+
export declare function processAlive(pid: number): boolean;
|
|
4
|
+
export declare function lockOwnerAlive(lockPath: string): boolean;
|
|
5
|
+
//# sourceMappingURL=file-state.d.ts.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ClientAdapter, McpxConfig } from "../types.js";
|
|
2
|
+
export type SyncMode = "observe" | "selected" | "automatic";
|
|
3
|
+
export interface HarnessInstallation {
|
|
4
|
+
id: string;
|
|
5
|
+
harness: string;
|
|
6
|
+
label: string;
|
|
7
|
+
scope: "global" | "project";
|
|
8
|
+
projectPath?: string;
|
|
9
|
+
configPath: string | null;
|
|
10
|
+
skillPaths: string[];
|
|
11
|
+
detected: boolean;
|
|
12
|
+
mode: SyncMode;
|
|
13
|
+
transports: string[];
|
|
14
|
+
components: string[];
|
|
15
|
+
reload: string;
|
|
16
|
+
sync?: McpxConfig["clients"][string];
|
|
17
|
+
}
|
|
18
|
+
export declare function installationAdapters(config: McpxConfig): Array<{
|
|
19
|
+
installation: HarnessInstallation;
|
|
20
|
+
adapter: ClientAdapter;
|
|
21
|
+
}>;
|
|
22
|
+
export declare function listHarnesses(config: McpxConfig): HarnessInstallation[];
|
|
23
|
+
/** The same target selection applies to previews and every sync entry point. */
|
|
24
|
+
export declare function synchronizationTargets(config: McpxConfig, targets?: string[]): string[];
|
|
25
|
+
//# sourceMappingURL=harnesses.d.ts.map
|
package/dist/core/index.d.ts
CHANGED
|
@@ -10,13 +10,14 @@ export { runOAuthLogin, getOAuthAccessToken, isOAuthReference, oauthReferenceSer
|
|
|
10
10
|
export type { OAuthCodeReceiver, OAuthSupport, OAuthSupportProbe, OAuthSecretNames, OAuthCredentialStatus, OAuthProgressEvent, RunOAuthLoginOptions } from "./oauth.js";
|
|
11
11
|
export { getDaemonStatus, startDaemon, stopDaemon, restartDaemon, readDaemonLogs, runDaemonForeground } from "./daemon.js";
|
|
12
12
|
export type { DaemonStatus, DaemonStartResult } from "./daemon.js";
|
|
13
|
-
export { syncAllClients, getGatewayUrl, getGatewayInternalUrl, persistSyncState } from "./sync.js";
|
|
14
|
-
export type { SyncSummary } from "./sync.js";
|
|
13
|
+
export { synchronizeClients, syncAllClients, getGatewayUrl, getGatewayInternalUrl, persistSyncState } from "./sync.js";
|
|
14
|
+
export type { SyncOptions, SyncSummary } from "./sync.js";
|
|
15
15
|
export { addServer, removeServer, updateServer, setServerEnabled, setProjectServerEnabled, registerProject, unregisterProject, ensureGatewayToken, rotateGatewayToken } from "./registry.js";
|
|
16
16
|
export { listSkills, getSkill, saveSkill, deleteSkill, customizeSkill, installSkillFromSource, validateSkillPackage, pinSkill, unpinSkill, updateSkill, rollbackSkill } from "./skills.js";
|
|
17
17
|
export { exportEnvironment, importEnvironment } from "./share.js";
|
|
18
18
|
export type { ShareEnvironment, ShareLock } from "./share.js";
|
|
19
|
-
export { SecretsManager } from "./secrets.js";
|
|
19
|
+
export { SecretsManager, describeSecretBackend, getSecretBackend, switchSecretBackend } from "./secrets.js";
|
|
20
|
+
export type { SecretBackendSwitchResult } from "./secrets.js";
|
|
20
21
|
export { applyAuthReference, removeAuthReference, listAuthBindings, resolveAuthTarget, defaultAuthSecretName, maybePrefixBearer, secretRefName, toSecretRef } from "./server-auth.js";
|
|
21
22
|
export { buildStatusReport, STATUS_CLIENTS } from "./status.js";
|
|
22
23
|
export type { StatusReport, StatusServerEntry, StatusClientMapping, StatusAuthBinding } from "./status.js";
|
|
@@ -39,5 +40,12 @@ export type { UpdateStatus, StagedUpdateInfo } from "./update.js";
|
|
|
39
40
|
export { startBackgroundUpdateCheck, performUpdate, performRollback } from "./update-manager.js";
|
|
40
41
|
export { fetchRegistryServerDetail, selectBestPackage, extractRequiredInputs, mapRegistryToSpec } from "./registry-client.js";
|
|
41
42
|
export type { RequiredInput } from "./registry-client.js";
|
|
42
|
-
export type { McpxConfig, ClientId, ClientStatus, UpstreamServerSpec, HttpServerSpec, StdioServerSpec, GatewayConfig, ClientSyncState, ManagedIndex, ManagedEntry, ManagedClientState, ClientImportCandidate, ClientImportScanResult, ClientImportSkippedEntry, SyncImportReport, SyncImportedEntry, SyncDuplicateImportEntry, SyncImportConflictEntry, SyncImportErrorEntry, SyncResult, ManagedGatewayEntry, ProjectConfig, ProjectScope, ManagedPlugin, ManagedMarketplace, MarketplaceListing, MarketplacePluginDetail, MarketplaceFormat, PluginManifest, PluginComponent, PluginSource, DiscoveredComponents, DiscoveredComponent, PluginSyncInput, PluginSyncResult, Skill } from "../types.js";
|
|
43
|
+
export type { McpxConfig, ClientId, ClientStatus, UpstreamServerSpec, HttpServerSpec, StdioServerSpec, GatewayConfig, SecretBackendKind, ClientSyncState, ManagedIndex, ManagedEntry, ManagedClientState, ClientImportCandidate, ClientImportScanResult, ClientImportSkippedEntry, SyncImportReport, SyncImportedEntry, SyncDuplicateImportEntry, SyncImportConflictEntry, SyncImportErrorEntry, SyncResult, ManagedGatewayEntry, ProjectConfig, ProjectScope, ManagedPlugin, ManagedMarketplace, MarketplaceListing, MarketplacePluginDetail, MarketplaceFormat, PluginManifest, PluginComponent, PluginSource, DiscoveredComponents, DiscoveredComponent, PluginSyncInput, PluginSyncResult, Skill } from "../types.js";
|
|
44
|
+
export { controlRequest, ensureControlService, subscribeControlEvents } from "./control.js";
|
|
45
|
+
export { getManagementSnapshot } from "./management.js";
|
|
46
|
+
export type { ManagementSnapshot } from "./management.js";
|
|
47
|
+
export type { AdoptionPlan, AdoptionItem } from "./adoption.js";
|
|
48
|
+
export type { HarnessInstallation, SyncMode } from "./harnesses.js";
|
|
49
|
+
export type { Operation } from "./operations.js";
|
|
50
|
+
export { registerHarness } from "../adapters/index.js";
|
|
43
51
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/core/index.js
CHANGED
|
@@ -1,61 +1,56 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
extractRequiredInputs,
|
|
3
|
+
fetchRegistryServerDetail,
|
|
4
|
+
mapRegistryToSpec,
|
|
5
|
+
selectBestPackage
|
|
6
|
+
} from "../chunk-1yq3yb66.js";
|
|
7
|
+
import {
|
|
5
8
|
STATUS_CLIENTS,
|
|
9
|
+
buildStatusReport
|
|
10
|
+
} from "../chunk-nh6hhv29.js";
|
|
11
|
+
import {
|
|
12
|
+
applyAuthReference,
|
|
13
|
+
defaultAuthSecretName,
|
|
14
|
+
listAuthBindings,
|
|
15
|
+
maybePrefixBearer,
|
|
16
|
+
removeAuthReference,
|
|
17
|
+
resolveAuthTarget,
|
|
18
|
+
secretRefName,
|
|
19
|
+
toSecretRef
|
|
20
|
+
} from "../chunk-0xt563m1.js";
|
|
21
|
+
import {
|
|
22
|
+
exportEnvironment,
|
|
23
|
+
importEnvironment
|
|
24
|
+
} from "../chunk-qf8bj9y7.js";
|
|
25
|
+
import {
|
|
6
26
|
TELEMETRY_NOTICE_VERSION,
|
|
7
|
-
__resetOAuthSupportCache,
|
|
8
27
|
acknowledgeTelemetryNotice,
|
|
9
|
-
applyAuthReference,
|
|
10
28
|
architecture,
|
|
11
|
-
buildEnrichedPath,
|
|
12
|
-
buildStatusReport,
|
|
13
29
|
captureTelemetryEvent,
|
|
14
30
|
checkForUpdates,
|
|
15
|
-
clearOAuthCredentials,
|
|
16
31
|
clearStagedUpdate,
|
|
17
32
|
compareVersions,
|
|
18
33
|
countBucket,
|
|
19
|
-
defaultAuthSecretName,
|
|
20
34
|
defaultTelemetryPreferences,
|
|
21
35
|
durationBucket,
|
|
22
|
-
exportEnvironment,
|
|
23
|
-
extractRequiredInputs,
|
|
24
|
-
fetchRegistryServerDetail,
|
|
25
36
|
flushTelemetry,
|
|
26
37
|
getDaemonStatus,
|
|
27
|
-
getOAuthAccessToken,
|
|
28
|
-
getOAuthCredentialStatus,
|
|
29
38
|
getStagedCliPath,
|
|
30
39
|
getStagedUpdate,
|
|
31
40
|
getTelemetryStatus,
|
|
32
|
-
importEnvironment,
|
|
33
41
|
initializeTelemetry,
|
|
34
|
-
isOAuthReference,
|
|
35
42
|
isTelemetryEnvironmentDisabled,
|
|
36
|
-
listAuthBindings,
|
|
37
43
|
loadTelemetryPreferences,
|
|
38
|
-
mapRegistryToSpec,
|
|
39
44
|
markTelemetryMilestone,
|
|
40
|
-
maybePrefixBearer,
|
|
41
|
-
oauthReferenceServerName,
|
|
42
|
-
oauthSecretNames,
|
|
43
45
|
performRollback,
|
|
44
46
|
performUpdate,
|
|
45
47
|
platformFamily,
|
|
46
|
-
probeHttpAuthRequirement,
|
|
47
|
-
probeOAuthSupport,
|
|
48
48
|
readDaemonLogs,
|
|
49
|
-
removeAuthReference,
|
|
50
49
|
reportTelemetryError,
|
|
51
50
|
resetTelemetryInstallationId,
|
|
52
|
-
resolveAuthTarget,
|
|
53
51
|
restartDaemon,
|
|
54
52
|
runDaemonForeground,
|
|
55
53
|
runMarketplaceAutoUpdate,
|
|
56
|
-
runOAuthLogin,
|
|
57
|
-
secretRefName,
|
|
58
|
-
selectBestPackage,
|
|
59
54
|
setTelemetryErrorReporter,
|
|
60
55
|
shouldUseStagedCli,
|
|
61
56
|
shutdownTelemetry,
|
|
@@ -63,10 +58,9 @@ import {
|
|
|
63
58
|
startDaemon,
|
|
64
59
|
startMarketplaceAutoUpdater,
|
|
65
60
|
stopDaemon,
|
|
66
|
-
toSecretRef,
|
|
67
61
|
updateTelemetryPreferences,
|
|
68
62
|
uptimeBucket
|
|
69
|
-
} from "../chunk-
|
|
63
|
+
} from "../chunk-wvzap0na.js";
|
|
70
64
|
import {
|
|
71
65
|
addMarketplace,
|
|
72
66
|
inspectMarketplacePlugin,
|
|
@@ -78,91 +72,126 @@ import {
|
|
|
78
72
|
removeMarketplace,
|
|
79
73
|
setMarketplaceAutoUpdate,
|
|
80
74
|
updateMarketplaceInstalledPlugin
|
|
81
|
-
} from "../chunk-
|
|
75
|
+
} from "../chunk-1mrkz29t.js";
|
|
82
76
|
import {
|
|
83
|
-
PluginCache,
|
|
84
77
|
PluginDataManager,
|
|
85
78
|
PluginLifecycle,
|
|
86
79
|
PluginManager,
|
|
87
80
|
approvePluginComponent,
|
|
88
|
-
customizeSkill,
|
|
89
|
-
deleteSkill,
|
|
90
81
|
disablePlugin,
|
|
91
82
|
discoverComponents,
|
|
92
83
|
enablePlugin,
|
|
93
|
-
getGatewayInternalUrl,
|
|
94
|
-
getGatewayUrl,
|
|
95
84
|
getPluginStatus,
|
|
96
|
-
getSkill,
|
|
97
85
|
hasManifest,
|
|
98
86
|
inspectPlugin,
|
|
99
87
|
installPlugin,
|
|
100
|
-
installSkillFromSource,
|
|
101
88
|
listPlugins,
|
|
102
|
-
listSkills,
|
|
103
|
-
loadManagedIndex,
|
|
104
|
-
mutateActiveConfig,
|
|
105
|
-
mutateConfig,
|
|
106
|
-
mutateProjectConfig,
|
|
107
|
-
parseSource,
|
|
108
|
-
persistSyncState,
|
|
109
89
|
pinPlugin,
|
|
110
|
-
pinSkill,
|
|
111
90
|
pluginConfigSet,
|
|
112
91
|
pluginSync,
|
|
113
92
|
preparePlugin,
|
|
114
|
-
pruneAllPluginProjections,
|
|
115
|
-
prunePluginProjections,
|
|
116
93
|
readManifest,
|
|
117
94
|
resetPluginProjectOverride,
|
|
118
95
|
resolvePluginId,
|
|
119
96
|
rollbackPlugin,
|
|
120
|
-
rollbackSkill,
|
|
121
|
-
saveSkill,
|
|
122
97
|
setPluginProjectOverride,
|
|
123
|
-
syncAllClients,
|
|
124
|
-
syncPluginsToClient,
|
|
125
98
|
uninstallPlugin,
|
|
126
99
|
unpinPlugin,
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
updateSkill,
|
|
130
|
-
validateSkillPackage
|
|
131
|
-
} from "../chunk-56whm3hm.js";
|
|
100
|
+
updatePlugin
|
|
101
|
+
} from "../chunk-4aafp444.js";
|
|
132
102
|
import {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
103
|
+
controlRequest,
|
|
104
|
+
ensureControlService,
|
|
105
|
+
getManagementSnapshot,
|
|
106
|
+
probeHttpAuthRequirement,
|
|
107
|
+
subscribeControlEvents
|
|
108
|
+
} from "../chunk-a2gen8bn.js";
|
|
109
|
+
import {
|
|
110
|
+
OAUTH_LOGIN_TIMEOUT_MS,
|
|
111
|
+
OAuthCancelledError,
|
|
112
|
+
OAuthLoginInProgressError,
|
|
113
|
+
__resetOAuthSupportCache,
|
|
114
|
+
buildEnrichedPath,
|
|
115
|
+
clearOAuthCredentials,
|
|
116
|
+
getGatewayInternalUrl,
|
|
117
|
+
getGatewayUrl,
|
|
118
|
+
getOAuthAccessToken,
|
|
119
|
+
getOAuthCredentialStatus,
|
|
120
|
+
isOAuthReference,
|
|
121
|
+
oauthReferenceServerName,
|
|
122
|
+
oauthSecretNames,
|
|
123
|
+
persistSyncState,
|
|
124
|
+
probeOAuthSupport,
|
|
125
|
+
pruneAllPluginProjections,
|
|
126
|
+
prunePluginProjections,
|
|
127
|
+
registerHarness,
|
|
128
|
+
runOAuthLogin,
|
|
129
|
+
syncAllClients,
|
|
130
|
+
syncPluginsToClient,
|
|
131
|
+
synchronizeClients
|
|
132
|
+
} from "../chunk-wztmp5b4.js";
|
|
144
133
|
import {
|
|
145
134
|
SecretNotFoundError,
|
|
146
135
|
SecretsManager,
|
|
147
136
|
UpstreamError,
|
|
148
137
|
addServer,
|
|
149
138
|
classifyUpstreamError,
|
|
139
|
+
describeSecretBackend,
|
|
150
140
|
ensureGatewayToken,
|
|
141
|
+
getSecretBackend,
|
|
151
142
|
registerProject,
|
|
152
143
|
removeServer,
|
|
153
144
|
rotateGatewayToken,
|
|
154
145
|
setProjectServerEnabled,
|
|
155
146
|
setServerEnabled,
|
|
147
|
+
switchSecretBackend,
|
|
156
148
|
unregisterProject,
|
|
157
149
|
updateServer
|
|
158
|
-
} from "../chunk-
|
|
150
|
+
} from "../chunk-8v13hqrp.js";
|
|
151
|
+
import {
|
|
152
|
+
loadManagedIndex
|
|
153
|
+
} from "../chunk-t20f49g3.js";
|
|
154
|
+
import {
|
|
155
|
+
mutateActiveConfig,
|
|
156
|
+
mutateConfig,
|
|
157
|
+
mutateProjectConfig
|
|
158
|
+
} from "../chunk-hahs24dv.js";
|
|
159
|
+
import"../chunk-chaj8a8b.js";
|
|
160
|
+
import {
|
|
161
|
+
PluginCache,
|
|
162
|
+
customizeSkill,
|
|
163
|
+
deleteSkill,
|
|
164
|
+
getSkill,
|
|
165
|
+
installSkillFromSource,
|
|
166
|
+
listSkills,
|
|
167
|
+
parseSource,
|
|
168
|
+
pinSkill,
|
|
169
|
+
rollbackSkill,
|
|
170
|
+
saveSkill,
|
|
171
|
+
unpinSkill,
|
|
172
|
+
updateSkill,
|
|
173
|
+
validateSkillPackage
|
|
174
|
+
} from "../chunk-7rq88hb3.js";
|
|
175
|
+
import {
|
|
176
|
+
ConfigLoadError,
|
|
177
|
+
defaultConfig,
|
|
178
|
+
loadConfig,
|
|
179
|
+
loadMergedConfig,
|
|
180
|
+
loadProjectConfig,
|
|
181
|
+
migrateProjectServers,
|
|
182
|
+
parseCliAddCommand,
|
|
183
|
+
saveConfig,
|
|
184
|
+
saveProjectConfig,
|
|
185
|
+
tokenizeCommandLine
|
|
186
|
+
} from "../chunk-brxwa30j.js";
|
|
187
|
+
import"../chunk-p7yzyt87.js";
|
|
159
188
|
import {
|
|
160
189
|
getConfigPath,
|
|
161
190
|
getManagedIndexPath,
|
|
162
191
|
getSkillPackagesRoot,
|
|
163
192
|
getSkillsDir,
|
|
164
193
|
getTelemetryPath
|
|
165
|
-
} from "../chunk-
|
|
194
|
+
} from "../chunk-grkz21sq.js";
|
|
166
195
|
import"../chunk-bjw71y54.js";
|
|
167
196
|
import"../chunk-wj4tjacg.js";
|
|
168
197
|
export {
|
|
@@ -194,16 +223,19 @@ export {
|
|
|
194
223
|
clearOAuthCredentials,
|
|
195
224
|
clearStagedUpdate,
|
|
196
225
|
compareVersions,
|
|
226
|
+
controlRequest,
|
|
197
227
|
countBucket,
|
|
198
228
|
customizeSkill,
|
|
199
229
|
defaultAuthSecretName,
|
|
200
230
|
defaultConfig,
|
|
201
231
|
defaultTelemetryPreferences,
|
|
202
232
|
deleteSkill,
|
|
233
|
+
describeSecretBackend,
|
|
203
234
|
disablePlugin,
|
|
204
235
|
discoverComponents,
|
|
205
236
|
durationBucket,
|
|
206
237
|
enablePlugin,
|
|
238
|
+
ensureControlService,
|
|
207
239
|
ensureGatewayToken,
|
|
208
240
|
exportEnvironment,
|
|
209
241
|
extractRequiredInputs,
|
|
@@ -214,9 +246,11 @@ export {
|
|
|
214
246
|
getGatewayInternalUrl,
|
|
215
247
|
getGatewayUrl,
|
|
216
248
|
getManagedIndexPath,
|
|
249
|
+
getManagementSnapshot,
|
|
217
250
|
getOAuthAccessToken,
|
|
218
251
|
getOAuthCredentialStatus,
|
|
219
252
|
getPluginStatus,
|
|
253
|
+
getSecretBackend,
|
|
220
254
|
getSkill,
|
|
221
255
|
getSkillPackagesRoot,
|
|
222
256
|
getSkillsDir,
|
|
@@ -272,6 +306,7 @@ export {
|
|
|
272
306
|
readManifest,
|
|
273
307
|
refreshMarketplace,
|
|
274
308
|
refreshMarketplaceWithPlugins,
|
|
309
|
+
registerHarness,
|
|
275
310
|
registerProject,
|
|
276
311
|
removeAuthReference,
|
|
277
312
|
removeMarketplace,
|
|
@@ -304,8 +339,11 @@ export {
|
|
|
304
339
|
startDaemon,
|
|
305
340
|
startMarketplaceAutoUpdater,
|
|
306
341
|
stopDaemon,
|
|
342
|
+
subscribeControlEvents,
|
|
343
|
+
switchSecretBackend,
|
|
307
344
|
syncAllClients,
|
|
308
345
|
syncPluginsToClient,
|
|
346
|
+
synchronizeClients,
|
|
309
347
|
toSecretRef,
|
|
310
348
|
tokenizeCommandLine,
|
|
311
349
|
uninstallPlugin,
|
|
@@ -321,4 +359,4 @@ export {
|
|
|
321
359
|
validateSkillPackage
|
|
322
360
|
};
|
|
323
361
|
|
|
324
|
-
//# debugId=
|
|
362
|
+
//# debugId=325E4BCB9AEB6D1564756E2164756E21
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function withManagedIndexLock<T>(lockPath: string, fn: () => T): T;
|
|
1
|
+
export declare function withManagedIndexLock<T>(lockPath: string, fn: () => T, timeoutMs?: number): T;
|
|
2
2
|
//# sourceMappingURL=managed-index-lock.d.ts.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { loadConfig } from "./config.js";
|
|
2
|
+
import { listHarnesses } from "./harnesses.js";
|
|
3
|
+
import { listOperations } from "./operations.js";
|
|
4
|
+
export declare function syncManaged(targets?: string[]): Promise<import("./sync.js").SyncSummary>;
|
|
5
|
+
export declare function managementCommand(method: string, raw: unknown[]): Promise<unknown>;
|
|
6
|
+
export type ManagementSnapshot = Awaited<ReturnType<typeof getManagementSnapshot>>;
|
|
7
|
+
export declare function getManagementSnapshot(): Promise<{
|
|
8
|
+
revision: number;
|
|
9
|
+
capturedAt: string;
|
|
10
|
+
harnesses: ReturnType<typeof listHarnesses>;
|
|
11
|
+
operations: ReturnType<typeof listOperations>;
|
|
12
|
+
servers: Array<{
|
|
13
|
+
name: string;
|
|
14
|
+
transport: string;
|
|
15
|
+
enabled: boolean;
|
|
16
|
+
scope?: string;
|
|
17
|
+
}>;
|
|
18
|
+
skills: Array<{
|
|
19
|
+
id: string;
|
|
20
|
+
source?: string;
|
|
21
|
+
readOnly?: boolean;
|
|
22
|
+
}>;
|
|
23
|
+
packages: NonNullable<ReturnType<typeof loadConfig>["packages"]>[string][];
|
|
24
|
+
plugins: Array<{
|
|
25
|
+
id: string;
|
|
26
|
+
name: string;
|
|
27
|
+
version: string;
|
|
28
|
+
status: string;
|
|
29
|
+
enabled: boolean;
|
|
30
|
+
}>;
|
|
31
|
+
}>;
|
|
32
|
+
//# sourceMappingURL=management.d.ts.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare function readNativeDocument(file: string): Record<string, any>;
|
|
2
|
+
export declare function nativeServers(harness: string, document: Record<string, any>): Record<string, any>;
|
|
3
|
+
export declare function writeNativeDocument(file: string, document: Record<string, any>): void;
|
|
4
|
+
//# sourceMappingURL=native-document.d.ts.map
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { EventEmitter } from "node:events";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
export interface Operation {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
phase: "prepared" | "applying" | "complete" | "failed" | "rolled-back" | "recovery-required";
|
|
7
|
+
startedAt: string;
|
|
8
|
+
updatedAt: string;
|
|
9
|
+
progress: number;
|
|
10
|
+
message?: string;
|
|
11
|
+
undoable?: boolean;
|
|
12
|
+
details?: string[];
|
|
13
|
+
}
|
|
14
|
+
export declare const operationEvents: EventEmitter<any>;
|
|
15
|
+
declare const snapshotSchema: z.ZodObject<{
|
|
16
|
+
kind: z.ZodEnum<{
|
|
17
|
+
file: "file";
|
|
18
|
+
link: "link";
|
|
19
|
+
missing: "missing";
|
|
20
|
+
directory: "directory";
|
|
21
|
+
}>;
|
|
22
|
+
content: z.ZodOptional<z.ZodString>;
|
|
23
|
+
files: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
24
|
+
kind: z.ZodEnum<{
|
|
25
|
+
file: "file";
|
|
26
|
+
link: "link";
|
|
27
|
+
directory: "directory";
|
|
28
|
+
}>;
|
|
29
|
+
content: z.ZodOptional<z.ZodString>;
|
|
30
|
+
mode: z.ZodOptional<z.ZodNumber>;
|
|
31
|
+
}, z.core.$strip>>>;
|
|
32
|
+
mode: z.ZodOptional<z.ZodNumber>;
|
|
33
|
+
}, z.core.$strip>;
|
|
34
|
+
export type FileSnapshot = z.infer<typeof snapshotSchema>;
|
|
35
|
+
export interface PlannedWrite {
|
|
36
|
+
path: string;
|
|
37
|
+
before: FileSnapshot;
|
|
38
|
+
after: FileSnapshot;
|
|
39
|
+
}
|
|
40
|
+
export declare function snapshot(target: string): FileSnapshot;
|
|
41
|
+
export declare function snapshotHash(value: FileSnapshot): string;
|
|
42
|
+
export declare function textSnapshot(content: string): FileSnapshot;
|
|
43
|
+
export declare function snapshotText(value: FileSnapshot): string;
|
|
44
|
+
export declare function writeSnapshot(target: string, state: FileSnapshot): void;
|
|
45
|
+
export declare function saveOperation(operation: Operation): void;
|
|
46
|
+
export declare function listOperations(): Operation[];
|
|
47
|
+
/** Complete write intents are encrypted before the first filesystem mutation. */
|
|
48
|
+
export declare function applyWrites(label: string, writes: PlannedWrite[], id?: string, details?: string[]): Operation;
|
|
49
|
+
export declare function rollbackOperation(id: string): Operation;
|
|
50
|
+
export declare function markInterruptedOperations(): void;
|
|
51
|
+
export {};
|
|
52
|
+
//# sourceMappingURL=operations.d.ts.map
|
|
@@ -6,4 +6,5 @@ export declare function pruneAllPluginProjections(targetDir: string): void;
|
|
|
6
6
|
*/
|
|
7
7
|
export declare function pruneUnlistedPlugins(targetDir: string, keepPluginIds: string[]): void;
|
|
8
8
|
export declare function syncPluginsToClient(clientId: string, plugins: PluginSyncInput[]): PluginSyncResult;
|
|
9
|
+
export declare function syncProjectPluginSkills(clientId: string, skillsBase: string, plugins: PluginSyncInput[]): PluginSyncResult;
|
|
9
10
|
//# sourceMappingURL=plugin-projections.d.ts.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { McpxConfig } from "../types.js";
|
|
2
|
+
/** A gateway request sees one committed configuration revision throughout its work. */
|
|
3
|
+
export declare function compileRuntimeSnapshot(): void;
|
|
4
|
+
export declare function clearRuntimeSnapshot(): void;
|
|
5
|
+
export declare function runtimeConfig(): McpxConfig;
|
|
6
|
+
//# sourceMappingURL=runtime-snapshot.d.ts.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/** Login-keychain item that holds the whole mcpx secret map for this user. */
|
|
2
|
+
export declare const KEYCHAIN_SERVICE = "com.kwonye.mcpx";
|
|
3
|
+
export declare const KEYCHAIN_ACCOUNT = "secrets";
|
|
4
|
+
export declare const KEYCHAIN_LABEL = "mcpx secrets";
|
|
5
|
+
/**
|
|
6
|
+
* `security -i` reads each command with readline() into a 4096-byte buffer
|
|
7
|
+
* (SecurityTool `MAX_LINE_LEN`) and keeps at most 4095 bytes. A line of exactly
|
|
8
|
+
* 4095 bytes leaves the trailing newline unread; the following empty command
|
|
9
|
+
* succeeds and becomes the process exit status. 4094 leaves room for that newline.
|
|
10
|
+
*/
|
|
11
|
+
export declare const SECURITY_INTERACTIVE_MAX_LINE = 4094;
|
|
12
|
+
export interface SecretCommandRequest {
|
|
13
|
+
command: string;
|
|
14
|
+
args: string[];
|
|
15
|
+
input?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface SecretCommandResult {
|
|
18
|
+
status: number;
|
|
19
|
+
stdout: string;
|
|
20
|
+
stderr: string;
|
|
21
|
+
}
|
|
22
|
+
export type SecretCommandRunner = (request: SecretCommandRequest) => SecretCommandResult;
|
|
23
|
+
/** Test hook. Production code leaves the real `security` / `secret-tool` runner in place. */
|
|
24
|
+
export declare function setSecretCommandRunnerForTests(runner: SecretCommandRunner | null): void;
|
|
25
|
+
/** Test hook. `null` uses `process.platform`. */
|
|
26
|
+
export declare function setSecretKeychainPlatformForTests(platform: NodeJS.Platform | null): void;
|
|
27
|
+
export declare function keychainUnsupportedReason(platform?: NodeJS.Platform): string | null;
|
|
28
|
+
export declare function readKeychainSecrets(): Record<string, string>;
|
|
29
|
+
export declare function writeKeychainSecrets(secrets: Record<string, string>): void;
|
|
30
|
+
export declare function clearKeychainSecrets(): void;
|
|
31
|
+
//# sourceMappingURL=secret-keychain.d.ts.map
|
package/dist/core/secrets.d.ts
CHANGED
|
@@ -1,9 +1,19 @@
|
|
|
1
|
+
import type { SecretBackendKind } from "../types.js";
|
|
2
|
+
export interface SecretBackendSwitchResult {
|
|
3
|
+
backend: SecretBackendKind;
|
|
4
|
+
changed: boolean;
|
|
5
|
+
migrated: string[];
|
|
6
|
+
preserved: string[];
|
|
7
|
+
removedFrom: SecretBackendKind | null;
|
|
8
|
+
}
|
|
9
|
+
export declare function describeSecretBackend(backend: SecretBackendKind): string;
|
|
10
|
+
export declare function getSecretBackend(configPath?: string): SecretBackendKind;
|
|
11
|
+
export declare function switchSecretBackend(target: SecretBackendKind, configPath?: string): SecretBackendSwitchResult;
|
|
1
12
|
export declare class SecretsManager {
|
|
2
13
|
private readonly storePath;
|
|
3
14
|
private readonly keyPath;
|
|
4
15
|
constructor(storePath?: string, keyPath?: string);
|
|
5
|
-
|
|
6
|
-
private recoverCorruptStore;
|
|
16
|
+
get backend(): SecretBackendKind;
|
|
7
17
|
listSecretNames(): string[];
|
|
8
18
|
setSecret(name: string, value: string): void;
|
|
9
19
|
removeSecret(name: string): void;
|