@hasna/skills 0.10.19 → 0.10.22
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 +48 -12
- package/bin/index.js +761 -443
- package/bin/mcp.js +308 -119
- package/bin/migrate.js +1 -1
- package/bin/server.js +1 -1
- package/bin/worker.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +520 -207
- package/dist/lib/agent-discovery.d.ts +4 -1
- package/dist/lib/agent-integration.d.ts +4 -0
- package/dist/lib/codex-hook-rpc.d.ts +1 -1
- package/dist/lib/codex-native-compatibility.d.ts +3 -0
- package/dist/lib/codex-native-skill-catalog.d.ts +20 -0
- package/dist/lib/codex-plugin-skill-controls.d.ts +2 -1
- package/dist/lib/codex-settings-witness-v1.d.ts +12 -0
- package/dist/lib/codex-settings-witness.d.ts +13 -5
- package/dist/sdk/index.js +594 -284
- package/package.json +1 -1
|
@@ -6,7 +6,7 @@ export { captureDiscoveryDirectories, type DiscoveryDirectory } from "./agent-di
|
|
|
6
6
|
export interface DiscoverySource {
|
|
7
7
|
path: string;
|
|
8
8
|
sha256: string | null;
|
|
9
|
-
hashMode?: "bytes" | "path-bytes" | "claude-plugin-registry" | "claude-marketplace-registry" | "claude-settings-v1" | "claude-settings-v2" | "claude-settings-v3" | "claude-marketplace-registry-v2" | "codex-settings-v1";
|
|
9
|
+
hashMode?: "bytes" | "path-bytes" | "claude-plugin-registry" | "claude-marketplace-registry" | "claude-settings-v1" | "claude-settings-v2" | "claude-settings-v3" | "claude-marketplace-registry-v2" | "codex-settings-v1" | "codex-settings-v2";
|
|
10
10
|
managedPlugins?: ManagedPluginRegistrationWitness[];
|
|
11
11
|
format?: "json" | "toml" | "yaml";
|
|
12
12
|
fields?: string[];
|
|
@@ -29,6 +29,9 @@ export interface ReviewedDiscoveryInputs {
|
|
|
29
29
|
pluginHooks: "reviewed-no-skill-injection";
|
|
30
30
|
}>;
|
|
31
31
|
}
|
|
32
|
+
/** Project one native configuration's witnessed fields, exactly as discovery
|
|
33
|
+
* binds them. Used for both the current file and a preserved reviewed preimage. */
|
|
34
|
+
export declare function projectNativeDiscoveryFields(text: string, format: "json" | "toml" | "yaml", fields: readonly string[], path: string): string;
|
|
32
35
|
export declare function verifyAgentDiscovery(binding: AgentDiscoveryBinding, codexRecovery?: CodexHookDiscoveryRecovery): void;
|
|
33
36
|
export declare function rebindAgentDiscovery(binding: AgentDiscoveryBinding, changes: Map<string, string>): AgentDiscoveryBinding;
|
|
34
37
|
/** Capture full byte witnesses for reviewed source or executable files; never import or execute them. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { SUPPORTED_CODEX_HOOK_VERSIONS } from "./codex-native-compatibility.js";
|
|
2
2
|
export interface CodexHookRpc {
|
|
3
3
|
version: string;
|
|
4
4
|
processId?: number;
|
|
@@ -10,10 +10,30 @@ export interface CodexNativeSkillCatalog {
|
|
|
10
10
|
version: string;
|
|
11
11
|
cwd: string;
|
|
12
12
|
skills: CodexNativeSkill[];
|
|
13
|
+
/** Added in 0.10.20; older reviewed skills/list receipts remain valid for listed skills. */
|
|
14
|
+
plugins?: CodexInstalledPlugin[];
|
|
13
15
|
}
|
|
16
|
+
/** Safe installed-plugin identity needed when Codex hides a path-disabled skill. */
|
|
17
|
+
export interface CodexInstalledPlugin {
|
|
18
|
+
id: string;
|
|
19
|
+
name: string;
|
|
20
|
+
installed: boolean;
|
|
21
|
+
enabled: boolean;
|
|
22
|
+
localVersion: string | null;
|
|
23
|
+
/** Native remote identity; never a guessed installed cache version. */
|
|
24
|
+
remotePluginId?: string;
|
|
25
|
+
sourceType?: "remote";
|
|
26
|
+
}
|
|
27
|
+
export declare const remotePluginIdentifier: (value: unknown) => value is string;
|
|
14
28
|
/** Project the measured native skills/list contract without retaining descriptions,
|
|
15
29
|
* links, interfaces, errors, or any other untrusted native text. */
|
|
16
30
|
export declare function projectCodexNativeSkillCatalog(response: unknown, cwd: string): CodexNativeSkill[];
|
|
31
|
+
/** Project only the installed plugin identity needed to bind cache inventory.
|
|
32
|
+
* Marketplace errors fail closed because an incomplete inventory cannot prove
|
|
33
|
+
* that an absent skill belongs to the one measured installed plugin. */
|
|
34
|
+
export declare function projectCodexInstalledPlugins(response: unknown): CodexInstalledPlugin[];
|
|
35
|
+
/** Validate the bounded stored projection when it is consumed by a review. */
|
|
36
|
+
export declare function projectCodexInstalledPluginEntries(value: unknown): CodexInstalledPlugin[];
|
|
17
37
|
/** Read one consumer's catalog through an owned, bounded native client. The RPC
|
|
18
38
|
* transport owns request deadlines and child shutdown. Native discovery can
|
|
19
39
|
* maintain its own caches; callers must constrain writes when requiring isolation. */
|
|
@@ -6,11 +6,12 @@ export interface CodexPluginSkillControl {
|
|
|
6
6
|
pluginParent: string;
|
|
7
7
|
manifestSha256: string;
|
|
8
8
|
appSha256?: string;
|
|
9
|
+
remotePluginId?: string;
|
|
9
10
|
}
|
|
10
11
|
type Read = (path: string) => string;
|
|
11
12
|
/** Capability controls remain bound even after every native Skill body disappears. */
|
|
12
13
|
export declare function reviewedCodexPluginCapabilitiesUnchanged(cache: string, controls: CodexPluginSkillControl[], read: Read): boolean;
|
|
13
|
-
export declare function reviewCodexPluginSkillControls(catalog: CodexNativeSkillCatalog, documents: string[], cache: string, cwd: string, read: Read): CodexPluginSkillControl[];
|
|
14
|
+
export declare function reviewCodexPluginSkillControls(catalog: CodexNativeSkillCatalog, documents: string[], cache: string, cwd: string, read: Read, rules: unknown): CodexPluginSkillControl[];
|
|
14
15
|
export declare function isReviewedCodexPluginSkillDisabled(document: string, cache: string, controls: CodexPluginSkillControl[], rules: unknown, read: Read): boolean;
|
|
15
16
|
export declare function disableReviewedCodexPluginNames(text: string, controls: CodexPluginSkillControl[]): string;
|
|
16
17
|
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type ClaudeSettingsWitnessBudget } from "./claude-settings-witness.js";
|
|
2
|
+
export declare function hashCodexSettingsReplacement(text: string, budget?: ClaudeSettingsWitnessBudget): string;
|
|
3
|
+
export declare function captureCodexSettings(path: string, budget?: ClaudeSettingsWitnessBudget): {
|
|
4
|
+
path: string;
|
|
5
|
+
hashMode: "codex-settings-v1";
|
|
6
|
+
sha256: string;
|
|
7
|
+
};
|
|
8
|
+
export declare function upgradeCodexSettingsWitness(previous: {
|
|
9
|
+
path: string;
|
|
10
|
+
hashMode?: "bytes";
|
|
11
|
+
sha256: string;
|
|
12
|
+
}, reviewedSettingsPath: string): ReturnType<typeof captureCodexSettings>;
|
|
@@ -1,12 +1,20 @@
|
|
|
1
|
+
export { captureCodexSettings, hashCodexSettingsReplacement } from "./codex-settings-witness-v1.js";
|
|
1
2
|
import { type ClaudeSettingsWitnessBudget } from "./claude-settings-witness.js";
|
|
2
|
-
|
|
3
|
-
|
|
3
|
+
/** The Codex discovery fields the automatic TOML projection witnesses. A typed
|
|
4
|
+
* `codex-settings-v2` witness binds strictly more of the same file, so it
|
|
5
|
+
* supersedes this projection instead of coexisting with it. */
|
|
6
|
+
export declare const CODEX_DISCOVERY_PROJECTION_FIELDS: readonly ["plugins", "marketplaces", "skills"];
|
|
7
|
+
export declare function hashCodexSettingsReplacementV2(text: string, budget?: ClaudeSettingsWitnessBudget): string;
|
|
8
|
+
export declare function captureCodexSettingsV2(path: string, budget?: ClaudeSettingsWitnessBudget): {
|
|
4
9
|
path: string;
|
|
5
|
-
hashMode: "codex-settings-
|
|
10
|
+
hashMode: "codex-settings-v2";
|
|
6
11
|
sha256: string;
|
|
7
12
|
};
|
|
13
|
+
/** Read one preserved review preimage under the exact witness file rules, so a
|
|
14
|
+
* caller can prove additional legacy witnesses against the same bytes. */
|
|
15
|
+
export declare function readCodexSettingsPreimage(path: string, budget?: ClaudeSettingsWitnessBudget): string;
|
|
8
16
|
export declare function upgradeCodexSettingsWitness(previous: {
|
|
9
17
|
path: string;
|
|
10
|
-
hashMode?: "bytes";
|
|
18
|
+
hashMode?: "bytes" | "codex-settings-v1";
|
|
11
19
|
sha256: string;
|
|
12
|
-
}, reviewedSettingsPath: string): ReturnType<typeof
|
|
20
|
+
}, reviewedSettingsPath: string): ReturnType<typeof captureCodexSettingsV2>;
|