@hasna/skills 0.7.1 → 0.7.2

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.
@@ -0,0 +1,6 @@
1
+ export interface DiscoveryByteBudget {
2
+ remaining: number;
3
+ }
4
+ export declare function discoveryByteBudget(): DiscoveryByteBudget;
5
+ /** Hash exact bytes without decoding them or following links. The budget spans one capture/verification. */
6
+ export declare function hashRawDiscoveryFile(path: string, budget: DiscoveryByteBudget, changes?: Map<string, string>): string | null;
@@ -0,0 +1,8 @@
1
+ /** Recursive path/type membership only; source-file hashes bind reviewed bytes. */
2
+ export interface DiscoveryDirectory {
3
+ path: string;
4
+ sha256: string | null;
5
+ }
6
+ /** Read-only capture; callers must review both membership and source bytes. */
7
+ export declare function captureDiscoveryDirectories(paths: string[]): DiscoveryDirectory[];
8
+ export declare function verifyDiscoveryDirectories(directories: DiscoveryDirectory[]): void;
@@ -1,7 +1,10 @@
1
1
  import type { IntegrationAgent } from "./agent-adapters.js";
2
+ import { type DiscoveryDirectory } from "./agent-discovery-directories.js";
3
+ export { captureDiscoveryDirectories, type DiscoveryDirectory } from "./agent-discovery-directories.js";
2
4
  export interface DiscoverySource {
3
5
  path: string;
4
6
  sha256: string | null;
7
+ hashMode?: "bytes";
5
8
  format?: "json" | "toml" | "yaml";
6
9
  fields?: string[];
7
10
  }
@@ -9,6 +12,7 @@ export interface AgentDiscoveryBinding {
9
12
  agent: IntegrationAgent;
10
13
  roots: string[];
11
14
  sources: DiscoverySource[];
15
+ directories?: DiscoveryDirectory[];
12
16
  method: "automatic" | "reviewed";
13
17
  builtinNames?: string[];
14
18
  }
@@ -18,11 +22,14 @@ export interface ReviewedDiscoveryInputs {
18
22
  agent: IntegrationAgent;
19
23
  roots: string[];
20
24
  sources: DiscoverySource[];
25
+ directories?: DiscoveryDirectory[];
21
26
  pluginHooks: "reviewed-no-skill-injection";
22
27
  }>;
23
28
  }
24
29
  export declare function verifyAgentDiscovery(binding: AgentDiscoveryBinding): void;
25
30
  export declare function rebindAgentDiscovery(binding: AgentDiscoveryBinding, changes: Map<string, string>): AgentDiscoveryBinding;
31
+ /** Capture full byte witnesses for reviewed source or executable files; never import or execute them. */
32
+ export declare function captureDiscoveryByteSources(paths: string[]): DiscoverySource[];
26
33
  /** Project settings can introduce a higher-precedence discovery source. Until
27
34
  * its native merge format is supported, refuse that layer rather than certify
28
35
  * the home-only inventory. Ordinary unrelated project settings remain usable. */
@@ -92,7 +92,9 @@ export declare function assertManagedAgentBridge(agent: IntegrationAgent, option
92
92
  dataDir?: string;
93
93
  projectDir?: string;
94
94
  projectDirs?: string[];
95
+ profileId?: string;
95
96
  }): void;
97
+ export declare function normalizeAgentHookPrompt(agent: IntegrationAgent, event: string, prompt: string): string;
96
98
  export declare function hookContextOutput(event: string, result: {
97
99
  context: string;
98
100
  receipt?: unknown;
@@ -3,7 +3,12 @@ export declare const AGENT_POLICY_LIMITS: Readonly<{
3
3
  bytes: number;
4
4
  agents: 16;
5
5
  discoverySources: 2048;
6
+ discoveryRawSourceBytes: number;
7
+ discoveryRawTotalBytes: number;
6
8
  discoveryRoots: 512;
9
+ discoveryDirectories: 64;
10
+ discoveryDirectoryEntries: 20000;
11
+ discoveryDirectoryBytes: number;
7
12
  builtinNames: 2048;
8
13
  rootAliases: 2;
9
14
  fields: 64;