@hasna/skills 0.10.23 → 0.10.25
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/README.md +23 -2
- package/bin/index.js +375 -53
- package/bin/mcp.js +426 -312
- package/bin/migrate.js +1 -1
- package/bin/server.js +1 -1
- package/bin/worker.js +1 -1
- package/dist/index.js +367 -50
- package/dist/lib/agent-discovery-directories.d.ts +2 -2
- package/dist/lib/agent-discovery.d.ts +7 -0
- package/dist/lib/agent-integration.d.ts +1 -0
- package/dist/lib/codex-native-skill-catalog.d.ts +9 -1
- package/dist/lib/codex-plugin-skill-controls.d.ts +28 -1
- package/dist/sdk/index.js +367 -50
- package/package.json +1 -1
|
@@ -4,5 +4,5 @@ export interface DiscoveryDirectory {
|
|
|
4
4
|
sha256: string | null;
|
|
5
5
|
}
|
|
6
6
|
/** Read-only capture; callers must review both membership and source bytes. */
|
|
7
|
-
export declare function captureDiscoveryDirectories(paths: string[]): DiscoveryDirectory[];
|
|
8
|
-
export declare function verifyDiscoveryDirectories(directories: DiscoveryDirectory[]): void;
|
|
7
|
+
export declare function captureDiscoveryDirectories(paths: string[], excludedRoots?: readonly string[]): DiscoveryDirectory[];
|
|
8
|
+
export declare function verifyDiscoveryDirectories(directories: DiscoveryDirectory[], excludedRoots?: readonly string[]): void;
|
|
@@ -2,6 +2,7 @@ import type { IntegrationAgent } from "./agent-adapters.js";
|
|
|
2
2
|
import { type DiscoveryDirectory } from "./agent-discovery-directories.js";
|
|
3
3
|
import { type ManagedPluginRegistrationWitness } from "./plugin-discovery.js";
|
|
4
4
|
import { type CodexHookDiscoveryRecovery } from "./codex-hook-discovery-recovery.js";
|
|
5
|
+
import { type CodexPluginSourceInput } from "./codex-plugin-skill-controls.js";
|
|
5
6
|
export { captureDiscoveryDirectories, type DiscoveryDirectory } from "./agent-discovery-directories.js";
|
|
6
7
|
export interface DiscoverySource {
|
|
7
8
|
path: string;
|
|
@@ -18,6 +19,12 @@ export interface AgentDiscoveryBinding {
|
|
|
18
19
|
directories?: DiscoveryDirectory[];
|
|
19
20
|
method: "automatic" | "reviewed";
|
|
20
21
|
builtinNames?: string[];
|
|
22
|
+
codexInstallationInputs?: {
|
|
23
|
+
version: "codex-cli 0.160.0";
|
|
24
|
+
catalogSha256: string;
|
|
25
|
+
plugins: CodexPluginSourceInput[];
|
|
26
|
+
directories?: DiscoveryDirectory[];
|
|
27
|
+
};
|
|
21
28
|
}
|
|
22
29
|
export interface ReviewedDiscoveryInputs {
|
|
23
30
|
version: 1;
|
|
@@ -117,6 +117,7 @@ export declare function inventoryNativeSkills(home?: string, options?: {
|
|
|
117
117
|
reviewedCacheAlias?: string;
|
|
118
118
|
disabledVendorPaths?: readonly string[];
|
|
119
119
|
disabledVendorSkill?: (entry: NativeSkillEntry) => boolean;
|
|
120
|
+
codexInstallationInputRoots?: readonly string[];
|
|
120
121
|
}): NativeSkillEntry[];
|
|
121
122
|
/** Planning is read-only; credentials and unrelated settings never appear in CLI output. */
|
|
122
123
|
export declare function planAgentIntegration(options: {
|
|
@@ -22,8 +22,16 @@ export interface CodexInstalledPlugin {
|
|
|
22
22
|
localVersion: string | null;
|
|
23
23
|
/** Native remote identity; never a guessed installed cache version. */
|
|
24
24
|
remotePluginId?: string;
|
|
25
|
-
sourceType?: "remote";
|
|
25
|
+
sourceType?: "remote" | "local" | "git" | "npm";
|
|
26
|
+
/** Fingerprint of the complete native nonremote source declaration. */
|
|
27
|
+
sourceSha256?: string;
|
|
28
|
+
/** Declared local installation input, distinct from the loaded cache root. */
|
|
29
|
+
sourcePath?: string;
|
|
26
30
|
}
|
|
31
|
+
/** Codex 0.160 derives remote installed keys from these native scope realms.
|
|
32
|
+
* A nonremote declaration in one of them cannot prove config-owned enablement:
|
|
33
|
+
* remote reconciliation may replace enabled even while config stays disabled. */
|
|
34
|
+
export declare function codexPluginSourceIsConfigControlled(plugin: Pick<CodexInstalledPlugin, "id" | "sourceType" | "sourceSha256" | "remotePluginId">): boolean;
|
|
27
35
|
export declare const remotePluginIdentifier: (value: unknown) => value is string;
|
|
28
36
|
/** Project the measured native skills/list contract without retaining descriptions,
|
|
29
37
|
* links, interfaces, errors, or any other untrusted native text. */
|
|
@@ -9,10 +9,37 @@ export interface CodexPluginSkillControl {
|
|
|
9
9
|
mcpSha256?: string;
|
|
10
10
|
remotePluginId?: string;
|
|
11
11
|
}
|
|
12
|
+
/** A native nonremote installation disabled by the witnessed configuration.
|
|
13
|
+
* Its cache is inert; this makes no claim about reviewed hook capabilities. */
|
|
14
|
+
export interface CodexInactivePluginControl {
|
|
15
|
+
pluginId: string;
|
|
16
|
+
namespace: string;
|
|
17
|
+
pluginParent: string;
|
|
18
|
+
sourceType: "local" | "git" | "npm";
|
|
19
|
+
sourceSha256: string;
|
|
20
|
+
}
|
|
21
|
+
export interface CodexPluginSourceInput {
|
|
22
|
+
pluginId: string;
|
|
23
|
+
namespace: string;
|
|
24
|
+
pluginParent: string;
|
|
25
|
+
sourceRoot: string;
|
|
26
|
+
sourceSha256: string;
|
|
27
|
+
}
|
|
12
28
|
type Read = (path: string) => string;
|
|
13
29
|
/** Capability controls remain bound even after every native Skill body disappears. */
|
|
14
30
|
export declare function reviewedCodexPluginCapabilitiesUnchanged(cache: string, controls: CodexPluginSkillControl[], read: Read): boolean;
|
|
15
|
-
export declare function
|
|
31
|
+
export declare function reviewCodexPluginControls(catalog: CodexNativeSkillCatalog, documents: string[], cache: string, cwd: string, read: Read, rules: unknown, pluginSettings?: unknown): {
|
|
32
|
+
skills: CodexPluginSkillControl[];
|
|
33
|
+
inactivePlugins: CodexInactivePluginControl[];
|
|
34
|
+
sourceInputs: CodexPluginSourceInput[];
|
|
35
|
+
};
|
|
36
|
+
/** Validate installation-input roles before omitting them from runtime inventory.
|
|
37
|
+
* Discovery witnesses still cover the sources; migration inventory stays full. */
|
|
38
|
+
export declare function reviewedCodexPluginSourceRoots(cache: string, inputs: CodexPluginSourceInput[], read: Read): string[];
|
|
39
|
+
export declare function reviewCodexPluginSkillControls(catalog: CodexNativeSkillCatalog, documents: string[], cache: string, cwd: string, read: Read, rules: unknown, pluginSettings?: unknown): CodexPluginSkillControl[];
|
|
40
|
+
/** Cache refresh cannot reactivate a config-controlled disabled installation.
|
|
41
|
+
* The caller verifies discovery/config witnesses before consuming this result. */
|
|
42
|
+
export declare function isReviewedCodexPluginInactive(document: string, cache: string, controls: CodexInactivePluginControl[], pluginSettings: unknown, rules: unknown, read: Read): boolean;
|
|
16
43
|
export declare function isReviewedCodexPluginSkillDisabled(document: string, cache: string, controls: CodexPluginSkillControl[], rules: unknown, read: Read): boolean;
|
|
17
44
|
export declare function disableReviewedCodexPluginNames(text: string, controls: CodexPluginSkillControl[]): string;
|
|
18
45
|
export {};
|