@hasna/skills 0.10.61 → 0.10.63

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.
@@ -3,8 +3,10 @@ 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
5
  import { type CodexPluginSkillControl, type CodexPluginSourceInput } from "./codex-plugin-skill-controls.js";
6
+ import { type RetainedReviewArtifact, type ReviewedArtifact } from "./retained-review-artifacts.js";
6
7
  export { captureDiscoveryDirectories, type DiscoveryDirectory } from "./agent-discovery-directories.js";
7
8
  export interface DiscoverySource {
9
+ reviewArtifact?: RetainedReviewArtifact;
8
10
  path: string;
9
11
  sha256: string | null;
10
12
  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" | "sumi-settings-v1" | "claude-marketplace-entry-v1";
@@ -63,6 +65,7 @@ export interface ReviewedDiscoveryInputs {
63
65
  agent: IntegrationAgent;
64
66
  roots: string[];
65
67
  sources: DiscoverySource[];
68
+ reviewArtifacts?: ReviewedArtifact[];
66
69
  directories?: DiscoveryDirectory[];
67
70
  pluginHooks: "reviewed-no-skill-injection";
68
71
  }>;
@@ -7,4 +7,5 @@ export declare function detectedIntegrationAgents(options?: {
7
7
  dataDir?: string;
8
8
  env?: NodeJS.ProcessEnv;
9
9
  cwd?: string;
10
+ allowEmpty?: boolean;
10
11
  }): IntegrationAgent[];
@@ -6,6 +6,7 @@ import { type DiscoveryExecutable, type AgentDiscoveryBinding, type ReviewedDisc
6
6
  import { type IntegrationAgent } from "./agent-adapters.js";
7
7
  import type { CodexHookDiscoveryRecovery } from "./codex-hook-discovery-recovery.js";
8
8
  import { type ClaudeCoordinatedHookEvent } from "./claude-settings-witness.js";
9
+ import { type ReviewArtifactChange } from "./retained-review-artifacts.js";
9
10
  export type { IntegrationAgent } from "./agent-adapters.js";
10
11
  export type ContextHookEvent = "UserPromptSubmit" | "SessionStart" | "SubagentStart";
11
12
  export interface AgentRootAlias {
@@ -47,6 +48,12 @@ export interface AgentConfigChange {
47
48
  after: string;
48
49
  }
49
50
  export interface AgentIntegrationPlan {
51
+ reviewArtifactSources?: Array<{
52
+ path: string;
53
+ sha256: string;
54
+ }>;
55
+ retainedReviewArtifacts?: ReviewArtifactChange[];
56
+ reviewArtifactMigration?: ReviewArtifactMigration;
50
57
  observedNativeSources?: Array<{
51
58
  path: string;
52
59
  sha256: string | null;
@@ -89,6 +96,7 @@ export interface AgentIntegrationPlan {
89
96
  rootAliases?: AgentRootAlias[];
90
97
  managedAgentChecks?: {
91
98
  home: string;
99
+ projectDir?: string;
92
100
  agents: IntegrationAgent[];
93
101
  };
94
102
  retainedReviewChecks?: {
@@ -203,6 +211,17 @@ export declare function planAgentSettingsWitnessUpgrade(options: {
203
211
  expectedPolicySha256: string;
204
212
  expectedSettingsSha256: string;
205
213
  }): AgentIntegrationPlan;
214
+ export interface ReviewArtifactMigration {
215
+ kind: "codex-native-catalog";
216
+ sourcePath: string;
217
+ expectedPolicySha256: string;
218
+ expectedSourceSha256: string;
219
+ home?: string;
220
+ dataDir?: string;
221
+ projectDir?: string;
222
+ }
223
+ /** Explicit exact-proof migration. Never captures a new catalog or refreshes live inputs. */
224
+ export declare function planReviewedArtifactMigration(options: ReviewArtifactMigration): AgentIntegrationPlan;
206
225
  export declare function applyAgentIntegration(plan: AgentIntegrationPlan, options?: CodexCorpusWriteOptions): {
207
226
  changed: string[];
208
227
  backups: string[];
@@ -0,0 +1,35 @@
1
+ import type { AgentDiscoveryBinding, DiscoverySource } from "./agent-discovery.js";
2
+ export interface ReviewedArtifact {
3
+ kind: "codex-native-catalog";
4
+ path: string;
5
+ sha256: string;
6
+ }
7
+ export interface RetainedReviewArtifact {
8
+ version: 1;
9
+ kind: "codex-native-catalog";
10
+ storeRoot: string;
11
+ originalPath: string;
12
+ sha256: string;
13
+ catalogSha256: string;
14
+ }
15
+ export interface ReviewArtifactChange {
16
+ path: string;
17
+ before: null;
18
+ after: string;
19
+ artifact: RetainedReviewArtifact;
20
+ }
21
+ export declare function verifyReviewArtifactOriginal(path: string, expectedSha256: string): void;
22
+ export declare function retainedArtifactPath(metadata: RetainedReviewArtifact): string;
23
+ export declare function validRetainedArtifact(value: unknown): value is RetainedReviewArtifact;
24
+ export declare function verifyRetainedReviewArtifact(source: DiscoverySource, storeRoot?: string): void;
25
+ /** Planning only: preserve source bytes and lineage, but create no storage. */
26
+ export declare function planReviewArtifactRetention(binding: AgentDiscoveryBinding, artifacts: ReviewedArtifact[] | undefined, dataDir: string, home: string): {
27
+ binding: AgentDiscoveryBinding;
28
+ changes: ReviewArtifactChange[];
29
+ observed: Array<{
30
+ path: string;
31
+ sha256: string;
32
+ }>;
33
+ };
34
+ /** Publish only an absent exact-byte artifact; existing immutable bytes are never replaced. */
35
+ export declare function writeReviewArtifactExclusive(change: ReviewArtifactChange): void;
@@ -0,0 +1,9 @@
1
+ export declare const RUNTIME_PREREQUISITES_SCHEMA = "skills.runtime-prerequisites.v1";
2
+ export declare const RUNTIME_PREREQUISITE_CODES: readonly ["RUNTIME_CONSUMER_DISCOVERY_REFUSED", "RUNTIME_PREREQUISITE_INPUT_REFUSED", "SUMI_PATH_INPUT_REFUSED", "SUMI_PATH_CONFIG_UNSUPPORTED", "SUMI_PATH_RESOLVER_UNAVAILABLE", "SUMI_PATH_RESOLVER_INVALID_RESPONSE", "SUMI_PATH_DISCOVERY_REFUSED"];
3
+ export declare function runtimePrerequisites(home: string, cwd: string): {
4
+ ok: boolean;
5
+ schema: string;
6
+ targetVersion: string;
7
+ checked: string[];
8
+ code: string | null;
9
+ };