@hasna/skills 0.10.46 → 0.10.47

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.
@@ -7,7 +7,7 @@ export { captureDiscoveryDirectories, type DiscoveryDirectory } from "./agent-di
7
7
  export interface DiscoverySource {
8
8
  path: string;
9
9
  sha256: string | null;
10
- 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" | "codex-settings-v3" | "codex-settings-v4" | "sumi-settings-v1";
10
+ hashMode?: "bytes" | "path-bytes" | "claude-plugin-manifest-v1" | "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" | "codex-settings-v3" | "codex-settings-v4" | "sumi-settings-v1";
11
11
  managedPlugins?: ManagedPluginRegistrationWitness[];
12
12
  format?: "json" | "toml" | "yaml";
13
13
  fields?: string[];
@@ -0,0 +1,9 @@
1
+ export declare const CLAUDE_PLUGIN_MANIFEST_LIMITS: Readonly<{
2
+ bytes: number;
3
+ depth: 32;
4
+ nodes: 65536;
5
+ stringCharacters: 16384;
6
+ }>;
7
+ export declare function hashClaudePluginManifest(text: string): string;
8
+ /** Project only the exact raw manifest bytes that the explicit review attested. */
9
+ export declare function projectReviewedClaudePluginManifest(text: string, reviewedSha256: string): string;
@@ -4,6 +4,8 @@ export interface ProfileClient {
4
4
  /** Stable whoami subject; raw credential/key identities are intentionally excluded. */
5
5
  resolvePrincipal?(): Promise<AuthenticatedProfilePrincipal>;
6
6
  resolveProfile(id: string): Promise<ResolvedSkillProfile>;
7
+ /** Optional on older authorities/embedders; absence never authorizes old versions. */
8
+ supportsPinRenewal?(): Promise<boolean>;
7
9
  recordStation(id: string, state: StationSkillStateInput): Promise<StationSkillState>;
8
10
  getBundle(slug: string, version: string): Promise<Response | null>;
9
11
  }
@@ -15,15 +17,17 @@ export interface AuthenticatedProfilePrincipal {
15
17
  }
16
18
  export declare class HttpProfileClient implements ProfileClient {
17
19
  private key;
20
+ private signal?;
18
21
  readonly authority: string;
19
22
  private origin;
20
- constructor(key: string, origin: string);
23
+ constructor(key: string, origin: string, signal?: AbortSignal | undefined);
21
24
  private requestRoute;
22
25
  private request;
23
26
  private read;
27
+ supportsPinRenewal(): Promise<boolean>;
24
28
  resolveProfile(id: string): Promise<ResolvedSkillProfile>;
25
29
  resolvePrincipal(): Promise<AuthenticatedProfilePrincipal>;
26
30
  recordStation(id: string, input: StationSkillStateInput): Promise<StationSkillState>;
27
31
  getBundle(slug: string, version: string): Promise<Response | null>;
28
32
  }
29
- export declare function createProfileClient(): Promise<ProfileClient>;
33
+ export declare function createProfileClient(signal?: AbortSignal): Promise<ProfileClient>;
@@ -12,7 +12,7 @@ export interface RemoteInputFileDescriptor {
12
12
  }
13
13
  export declare function describeRemoteFiles(files: RemoteInputFile[]): RemoteInputFileDescriptor[];
14
14
  export declare function sha256(bytes: Uint8Array): string;
15
- export declare function readBoundedResponse(response: Response, maximum: number): Promise<Uint8Array>;
15
+ export declare function readBoundedResponse(response: Response, maximum: number, signal?: AbortSignal): Promise<Uint8Array>;
16
16
  /** Small inline inputs for agent transports; larger files belong in the CLI/SDK. */
17
17
  export declare function decodeRemoteFiles(files: Array<{
18
18
  name: string;
@@ -46,6 +46,11 @@ export declare function selectionBundlePath(selection: ResolvedSkillSelection, o
46
46
  export declare function writeSelectionJson(path: string, value: unknown): void;
47
47
  export declare function readSelectionJson<T>(path: string): T | null;
48
48
  export declare function readCachedSelection(selection: ResolvedSkillSelection, options?: SelectionCacheOptions): Promise<SkillBundleEntry[] | null>;
49
+ /** Verify an authenticated exact-version response without changing any cache or receipt. */
50
+ export declare function verifySelectionBundleResponse(selection: ResolvedSkillSelection, response: Response | null, signal?: AbortSignal, deadline?: number): Promise<{
51
+ bytes: Uint8Array;
52
+ entries: SkillBundleEntry[];
53
+ }>;
49
54
  export declare function cacheSelectionBundle(selection: ResolvedSkillSelection, response: Response | null, options?: SelectionCacheOptions): Promise<SkillBundleEntry[]>;
50
55
  export declare function activateSelectionProfile(profile: ResolvedSkillProfile, options?: SelectionCacheOptions): CachedSelectionProfile;
51
56
  export declare function readSelectionProfile(profileId: string, options?: SelectionCacheOptions): CachedSelectionProfile | null;
@@ -49,6 +49,7 @@ export declare function loadSelectedSkill(spec: string, profileId: string, optio
49
49
  file: string;
50
50
  source: string;
51
51
  verifiedAt: string;
52
+ authorizationEpoch?: string;
52
53
  authority: string;
53
54
  workspaceId: string;
54
55
  profileRevision: string;
@@ -30,10 +30,13 @@ export declare function inspectSkillSession(sessionId: string, options?: Selecti
30
30
  selectionCount: number;
31
31
  loadedCount: number;
32
32
  };
33
+ /** Fits inside the managed context child's 6.5-second ceiling, including CLI work. */
34
+ export declare const SESSION_RENEWAL_TIMEOUT_MS = 4000;
33
35
  /**
34
- * Managed hooks may move an expired pin only when every skill already loaded
35
- * by this session is still selected with exactly the same behavior and bytes.
36
- * The old receipt is archived and replaced under its exact snapshot lock.
36
+ * Renew authorization for the complete immutable pin; never manufacture a
37
+ * profile combining historical loaded versions with current unloaded versions.
38
+ * Current profile membership/lifecycle authorizes unchanged pins. Historical
39
+ * versions additionally require the authenticated exact-version bundle read.
37
40
  */
38
41
  export declare function reconcileSkillSessionIfSafe(sessionId: string, profileId: string, options?: SessionReconciliationOptions): Promise<boolean>;
39
42
  /** Explicit review for changed loaded selections or intentional profile migration. */