@hasna/skills 0.10.20 → 0.10.23
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 +39 -8
- package/bin/index.js +652 -354
- package/bin/mcp.js +310 -119
- package/bin/migrate.js +1 -1
- package/bin/server.js +1 -1
- package/bin/worker.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +466 -177
- 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 +4 -0
- package/dist/lib/codex-plugin-skill-controls.d.ts +2 -0
- 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 +537 -249
- 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;
|
|
@@ -20,7 +20,11 @@ export interface CodexInstalledPlugin {
|
|
|
20
20
|
installed: boolean;
|
|
21
21
|
enabled: boolean;
|
|
22
22
|
localVersion: string | null;
|
|
23
|
+
/** Native remote identity; never a guessed installed cache version. */
|
|
24
|
+
remotePluginId?: string;
|
|
25
|
+
sourceType?: "remote";
|
|
23
26
|
}
|
|
27
|
+
export declare const remotePluginIdentifier: (value: unknown) => value is string;
|
|
24
28
|
/** Project the measured native skills/list contract without retaining descriptions,
|
|
25
29
|
* links, interfaces, errors, or any other untrusted native text. */
|
|
26
30
|
export declare function projectCodexNativeSkillCatalog(response: unknown, cwd: string): CodexNativeSkill[];
|
|
@@ -6,6 +6,8 @@ export interface CodexPluginSkillControl {
|
|
|
6
6
|
pluginParent: string;
|
|
7
7
|
manifestSha256: string;
|
|
8
8
|
appSha256?: string;
|
|
9
|
+
mcpSha256?: string;
|
|
10
|
+
remotePluginId?: string;
|
|
9
11
|
}
|
|
10
12
|
type Read = (path: string) => string;
|
|
11
13
|
/** Capability controls remain bound even after every native Skill body disappears. */
|
|
@@ -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>;
|