@hasna/skills 0.10.69 → 0.10.70

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.
@@ -1,5 +1,6 @@
1
1
  import type { IntegrationAgent } from "./agent-adapters.js";
2
2
  import { type DiscoveryDirectory } from "./agent-discovery-directories.js";
3
+ import { type CodexReviewedHookSource } from "./codex-hook-mcp-dependencies.js";
3
4
  import { type ManagedPluginRegistrationWitness } from "./plugin-discovery.js";
4
5
  import { type CodexHookDiscoveryRecovery } from "./codex-hook-discovery-recovery.js";
5
6
  import { type CodexPluginSkillControl, type CodexPluginSourceInput } from "./codex-plugin-skill-controls.js";
@@ -10,7 +11,8 @@ export interface DiscoverySource {
10
11
  reviewArtifact?: RetainedReviewArtifact;
11
12
  path: string;
12
13
  sha256: string | null;
13
- hashMode?: "bytes" | "path-bytes" | "claude-plugin-manifest-v1" | "claude-plugin-registry" | "claude-marketplace-registry" | "claude-settings-v1" | "claude-settings-v2" | "claude-settings-v3" | "claude-settings-v4" | "claude-marketplace-registry-v2" | "codex-settings-v1" | "codex-settings-v2" | "codex-settings-v3" | "codex-settings-v4" | "codex-settings-v5" | "sumi-settings-v1" | "claude-marketplace-entry-v1";
14
+ hashMode?: "bytes" | "path-bytes" | "claude-plugin-manifest-v1" | "claude-plugin-registry" | "claude-marketplace-registry" | "claude-settings-v1" | "claude-settings-v2" | "claude-settings-v3" | "claude-settings-v4" | "claude-marketplace-registry-v2" | "codex-settings-v1" | "codex-settings-v2" | "codex-settings-v3" | "codex-settings-v4" | "codex-settings-v5" | "codex-settings-v6" | "executable-v1" | "sumi-settings-v1" | "claude-marketplace-entry-v1";
15
+ hookSources?: CodexReviewedHookSource[];
14
16
  managedPlugins?: ManagedPluginRegistrationWitness[];
15
17
  format?: "json" | "toml" | "yaml";
16
18
  fields?: string[];
@@ -103,6 +105,8 @@ export declare function verifyAgentDiscovery(binding: AgentDiscoveryBinding, cod
103
105
  target: string;
104
106
  }[]): void;
105
107
  export declare function rebindAgentDiscovery(binding: AgentDiscoveryBinding, changes: Map<string, string>): AgentDiscoveryBinding;
108
+ /** Explicit streaming integrity witness. Never read an executable as text or execute it. */
109
+ export declare function captureDiscoveryExecutableSources(paths: string[]): DiscoverySource[];
106
110
  /** Capture full byte witnesses for reviewed source or executable files; never import or execute them. */
107
111
  export declare function captureDiscoveryByteSources(paths: string[]): DiscoverySource[];
108
112
  /** Capture executable/source path identity, including links and absent targets. */
@@ -0,0 +1,16 @@
1
+ export interface CodexReviewedHookSource {
2
+ path: string;
3
+ sha256: string | null;
4
+ }
5
+ export interface CodexHookMcpDependencies {
6
+ sources: CodexReviewedHookSource[];
7
+ servers: string[];
8
+ }
9
+ /** Exact Codex installed.rs selector contract, using its locked semver1.0.27
10
+ * Version::cmp (including BuildMetadata::cmp), not loose npm precedence.
11
+ * Mixed semver/lexical comparisons can cycle. Validate the complete resulting
12
+ * order so selection cannot depend on native read_dir/sort enumeration. */
13
+ export declare function selectCodexPluginVersion(versions: readonly string[], budget?: {
14
+ remaining: number;
15
+ }): string;
16
+ export declare function captureCodexHookMcpDependencies(configPath: string, reviewed: readonly CodexReviewedHookSource[], configText?: string, changes?: Map<string, string>, budget?: import("./agent-discovery-bytes.js").DiscoveryByteBudget): CodexHookMcpDependencies;
@@ -0,0 +1,14 @@
1
+ type Path = Array<string | number>;
2
+ export interface CodexNumericToken {
3
+ path: Path;
4
+ kind: "integer" | "float" | "date";
5
+ value: string;
6
+ }
7
+ export declare class CodexNumericValue {
8
+ readonly token: CodexNumericToken;
9
+ constructor(token: CodexNumericToken);
10
+ }
11
+ export declare function codexNumericProvenance(text: string, original: unknown): Map<string, CodexNumericToken>;
12
+ export declare function codexIntegerToken(tokens: Map<string, CodexNumericToken>, path: Path): boolean;
13
+ export declare function embedCodexNumericTokens(value: any, tokens: Map<string, CodexNumericToken>, path?: Path): any;
14
+ export {};
@@ -1,4 +1,5 @@
1
1
  export { captureCodexSettings, hashCodexSettingsReplacement } from "./codex-settings-witness-v1.js";
2
+ import { type CodexReviewedHookSource } from "./codex-hook-mcp-dependencies.js";
2
3
  import { type ClaudeSettingsWitnessBudget } from "./claude-settings-witness.js";
3
4
  /** The Codex discovery fields the automatic TOML projection witnesses. A typed
4
5
  * `codex-settings-v2` witness binds strictly more of the same file, so it
@@ -60,3 +61,11 @@ export declare function upgradeCodexSettingsWitnessV5(previous: {
60
61
  hashMode?: "bytes" | "codex-settings-v1" | "codex-settings-v2" | "codex-settings-v3" | "codex-settings-v4";
61
62
  sha256: string;
62
63
  }, reviewedSettingsPath: string): ReturnType<typeof captureCodexSettingsV5>;
64
+ /** V6 keeps V5 display tolerances and binds routes referenced by the complete
65
+ * independently reviewed native hook source population. No legacy migration. */
66
+ export declare function captureCodexSettingsV6(path: string, reviewedSources: readonly CodexReviewedHookSource[], budget?: ClaudeSettingsWitnessBudget, changes?: Map<string, string>): {
67
+ path: string;
68
+ hashMode: "codex-settings-v6";
69
+ sha256: string;
70
+ hookSources: CodexReviewedHookSource[];
71
+ };
@@ -49,7 +49,7 @@ var __require = import.meta.require;
49
49
  // src/runtime-prerequisites.ts
50
50
  import { isAbsolute as isAbsolute5 } from "path";
51
51
  // package.json
52
- var version = "0.10.69";
52
+ var version = "0.10.70";
53
53
  var package_default = {
54
54
  name: "@hasna/skills",
55
55
  version,
@@ -2732,12 +2732,26 @@ function assertAgentPolicyCollections(policy) {
2732
2732
  text(source.path);
2733
2733
  requireBound(source.sha256 === null || typeof source.sha256 === "string" && /^[a-f0-9]{64}$/.test(source.sha256));
2734
2734
  if (source.hashMode !== undefined)
2735
- requireBound(["bytes", "path-bytes", "claude-plugin-manifest-v1", "claude-plugin-registry", "claude-marketplace-registry", "claude-settings-v1", "claude-settings-v2", "claude-settings-v3", "claude-settings-v4", "claude-marketplace-registry-v2", "codex-settings-v1", "codex-settings-v2", "codex-settings-v3", "codex-settings-v4", "codex-settings-v5", "sumi-settings-v1", "claude-marketplace-entry-v1"].includes(source.hashMode) && source.format === undefined && source.fields === undefined && (source.hashMode === "bytes" || source.sha256 !== null));
2735
+ requireBound(["bytes", "path-bytes", "claude-plugin-manifest-v1", "claude-plugin-registry", "claude-marketplace-registry", "claude-settings-v1", "claude-settings-v2", "claude-settings-v3", "claude-settings-v4", "claude-marketplace-registry-v2", "codex-settings-v1", "codex-settings-v2", "codex-settings-v3", "codex-settings-v4", "codex-settings-v5", "codex-settings-v6", "executable-v1", "sumi-settings-v1", "claude-marketplace-entry-v1"].includes(source.hashMode) && source.format === undefined && source.fields === undefined && (source.hashMode === "bytes" || source.sha256 !== null));
2736
+ if (source.hashMode === "executable-v1")
2737
+ requireBound(agent === "codex" && value.agent === "codex" && value.method === "reviewed" && value.sources.some((row) => row.hashMode === "codex-settings-v6") && isAbsolute3(source.path) && resolve5(source.path) === source.path);
2738
+ if (source.hashMode === "codex-settings-v6") {
2739
+ const seen = new Set;
2740
+ for (const hook of array(source.hookSources, AGENT_POLICY_LIMITS.discoverySources)) {
2741
+ requireBound(object(hook) && Object.keys(hook).length === 2 && Object.keys(hook).every((key) => ["path", "sha256"].includes(key)));
2742
+ text(hook.path);
2743
+ requireBound(isAbsolute3(hook.path) && resolve5(hook.path) === hook.path && !seen.has(hook.path));
2744
+ seen.add(hook.path);
2745
+ requireBound(hook.sha256 === null || typeof hook.sha256 === "string" && /^[a-f0-9]{64}$/.test(hook.sha256));
2746
+ requireBound(value.sources.some((row) => row.path === hook.path && row.sha256 === hook.sha256 && [undefined, "bytes"].includes(row.hashMode) && row.format === undefined && row.fields === undefined));
2747
+ }
2748
+ } else
2749
+ requireBound(source.hookSources === undefined);
2736
2750
  if (source.hashMode === "claude-plugin-manifest-v1")
2737
2751
  requireBound(agent === "claude" && value.agent === "claude" && ["automatic", "reviewed"].includes(value.method) && !/[\x00-\x1f\x7f]/.test(source.path) && isAbsolute3(source.path) && resolve5(source.path) === source.path && source.path.endsWith(join5(sep, ".claude-plugin", "plugin.json")) && source.managedPlugins === undefined);
2738
2752
  if (source.hashMode === "sumi-settings-v1")
2739
2753
  requireBound(agent === "sumi" && value.agent === "sumi" && value.method === "reviewed" && !/[\x00-\x1f\x7f]/.test(source.path) && isAbsolute3(source.path) && resolve5(source.path) === source.path && basename3(source.path) === "sumi.json");
2740
- if (source.hashMode === "codex-settings-v1" || source.hashMode === "codex-settings-v2" || (source.hashMode === "codex-settings-v3" || source.hashMode === "codex-settings-v4" || source.hashMode === "codex-settings-v5"))
2754
+ if (source.hashMode === "codex-settings-v1" || source.hashMode === "codex-settings-v2" || (source.hashMode === "codex-settings-v3" || source.hashMode === "codex-settings-v4" || source.hashMode === "codex-settings-v5" || source.hashMode === "codex-settings-v6"))
2741
2755
  requireBound(agent === "codex" && value.agent === "codex" && value.method === "reviewed" && !/[\x00-\x1f\x7f]/.test(source.path) && isAbsolute3(source.path) && resolve5(source.path) === source.path && basename3(source.path) === "config.toml");
2742
2756
  if (source.hashMode === "claude-settings-v1" || source.hashMode === "claude-settings-v2" || (source.hashMode === "claude-settings-v3" || source.hashMode === "claude-settings-v4"))
2743
2757
  requireBound(agent === "claude" && value.agent === "claude" && value.method === "reviewed" && !/[\x00-\x1f\x7f]/.test(source.path) && isAbsolute3(source.path) && resolve5(source.path) === source.path && basename3(source.path) === "settings.json");