@hasna/skills 0.7.1 → 0.7.3

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,7 @@
1
+ export interface DiscoveryByteBudget {
2
+ remaining: number;
3
+ pathMetadataRemaining?: number;
4
+ }
5
+ export declare function discoveryByteBudget(): DiscoveryByteBudget;
6
+ /** Hash exact bytes without decoding them or following links. The budget spans one capture/verification. */
7
+ 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;
@@ -0,0 +1,5 @@
1
+ import { type DiscoveryByteBudget } from "./agent-discovery-bytes.js";
2
+ /** Bind path identity and exact bytes without importing or executing the file.
3
+ * Absence also has a digest: null cannot attest the path leading to an absence.
4
+ * Planned replacement is refused because its future inode is not knowable. */
5
+ export declare function hashDiscoveryPathFile(path: string, budget: DiscoveryByteBudget, changes?: Map<string, string>): string;
@@ -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" | "path-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,16 @@ 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[];
33
+ /** Capture executable/source path identity, including links and absent targets. */
34
+ export declare function captureDiscoveryPathSources(paths: string[]): DiscoverySource[];
26
35
  /** Project settings can introduce a higher-precedence discovery source. Until
27
36
  * its native merge format is supported, refuse that layer rather than certify
28
37
  * 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,16 @@ 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;
8
+ discoveryPathLinks: 40;
9
+ discoveryPathSteps: 256;
10
+ discoveryPathSourceMetadataBytes: number;
11
+ discoveryPathTotalMetadataBytes: number;
6
12
  discoveryRoots: 512;
13
+ discoveryDirectories: 64;
14
+ discoveryDirectoryEntries: 20000;
15
+ discoveryDirectoryBytes: number;
7
16
  builtinNames: 2048;
8
17
  rootAliases: 2;
9
18
  fields: 64;
@@ -114,6 +114,8 @@ export interface PortPortableSkillOptions extends PortableSkillOptions {
114
114
  }
115
115
  export interface BulkPortPortableSkillOptions extends PortableSkillOptions {
116
116
  overwrite?: boolean;
117
+ /** Explicitly permit imported names that shadow bundled official skills. */
118
+ allowShadow?: boolean;
117
119
  /** When false, the first failure is rethrown. Defaults to true (skip-on-error). */
118
120
  continueOnError?: boolean;
119
121
  }
@@ -0,0 +1,27 @@
1
+ /** Verifies installed resolution against the selected standalone frozen lock.
2
+ * This is a graph/version check; the separate frozen installer receipt binds
3
+ * registry integrity. Package payload attestation is not inferred from version. */
4
+ export declare function verifyProducerDependencies(packageRoot: string): {
5
+ status: string;
6
+ package: {
7
+ name: string;
8
+ version: string;
9
+ };
10
+ manifestSha256: string;
11
+ lockSha256: string;
12
+ nodeCount: number;
13
+ edgeCount: number;
14
+ nodes: {
15
+ lockKey: string;
16
+ name: string;
17
+ version: string;
18
+ manifestSha256: string;
19
+ relativePath: string;
20
+ }[];
21
+ edges: {
22
+ from: string;
23
+ name: string;
24
+ to: string | null;
25
+ optionalAbsent?: boolean;
26
+ }[];
27
+ };