@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.
package/bin/mcp.js CHANGED
@@ -5587,7 +5587,7 @@ var package_default;
5587
5587
  var init_package = __esm(() => {
5588
5588
  package_default = {
5589
5589
  name: "@hasna/skills",
5590
- version: "0.7.1",
5590
+ version: "0.7.2",
5591
5591
  description: "Skills library for AI coding agents",
5592
5592
  type: "module",
5593
5593
  bin: {
@@ -26204,12 +26204,20 @@ function assertAgentPolicyCollections(policy) {
26204
26204
  requireBound(object4(source));
26205
26205
  text(source.path);
26206
26206
  requireBound(source.sha256 === null || typeof source.sha256 === "string" && /^[a-f0-9]{64}$/.test(source.sha256));
26207
+ if (source.hashMode !== undefined)
26208
+ requireBound(source.hashMode === "bytes" && source.format === undefined && source.fields === undefined);
26207
26209
  if (source.format !== undefined)
26208
26210
  requireBound(["json", "toml", "yaml"].includes(source.format));
26209
26211
  if (source.fields !== undefined)
26210
26212
  for (const field of array3(source.fields, AGENT_POLICY_LIMITS.fields))
26211
26213
  text(field, 256);
26212
26214
  }
26215
+ if (value.directories !== undefined)
26216
+ for (const directory of array3(value.directories, AGENT_POLICY_LIMITS.discoveryDirectories)) {
26217
+ requireBound(object4(directory));
26218
+ text(directory.path);
26219
+ requireBound(directory.sha256 === null || typeof directory.sha256 === "string" && /^[a-f0-9]{64}$/.test(directory.sha256));
26220
+ }
26213
26221
  if (value.builtinNames !== undefined)
26214
26222
  for (const name of array3(value.builtinNames, AGENT_POLICY_LIMITS.builtinNames))
26215
26223
  text(name, 128);
@@ -26217,7 +26225,7 @@ function assertAgentPolicyCollections(policy) {
26217
26225
  }
26218
26226
  var AGENT_POLICY_LIMITS;
26219
26227
  var init_agent_policy_limits = __esm(() => {
26220
- AGENT_POLICY_LIMITS = Object.freeze({ bytes: 1024 * 1024, agents: 16, discoverySources: 2048, discoveryRoots: 512, builtinNames: 2048, rootAliases: 2, fields: 64, pathCharacters: 4096 });
26228
+ AGENT_POLICY_LIMITS = Object.freeze({ bytes: 1024 * 1024, agents: 16, discoverySources: 2048, discoveryRawSourceBytes: 64 * 1024 * 1024, discoveryRawTotalBytes: 256 * 1024 * 1024, discoveryRoots: 512, discoveryDirectories: 64, discoveryDirectoryEntries: 20000, discoveryDirectoryBytes: 8 * 1024 * 1024, builtinNames: 2048, rootAliases: 2, fields: 64, pathCharacters: 4096 });
26221
26229
  });
26222
26230
 
26223
26231
  // src/lib/managed-policy.ts
@@ -33741,10 +33749,23 @@ var init_agent_hermes = __esm(() => {
33741
33749
  init_dist();
33742
33750
  });
33743
33751
 
33752
+ // src/lib/agent-discovery-directories.ts
33753
+ var init_agent_discovery_directories = __esm(() => {
33754
+ init_agent_policy_limits();
33755
+ });
33756
+
33757
+ // src/lib/agent-discovery-bytes.ts
33758
+ var init_agent_discovery_bytes = __esm(() => {
33759
+ init_agent_policy_limits();
33760
+ });
33761
+
33744
33762
  // src/lib/agent-discovery.ts
33745
33763
  var init_agent_discovery = __esm(() => {
33746
33764
  init_agent_policy_limits();
33747
33765
  init_agent_hermes();
33766
+ init_agent_discovery_directories();
33767
+ init_agent_discovery_bytes();
33768
+ init_agent_discovery_directories();
33748
33769
  });
33749
33770
 
33750
33771
  // src/lib/agent-adapters.ts
package/bin/migrate.js CHANGED
@@ -7,7 +7,7 @@ import { join as join6 } from "path";
7
7
  // package.json
8
8
  var package_default = {
9
9
  name: "@hasna/skills",
10
- version: "0.7.1",
10
+ version: "0.7.2",
11
11
  description: "Skills library for AI coding agents",
12
12
  type: "module",
13
13
  bin: {
package/bin/server.js CHANGED
@@ -30041,7 +30041,7 @@ var require_public_api = __commonJS((exports) => {
30041
30041
  // package.json
30042
30042
  var package_default = {
30043
30043
  name: "@hasna/skills",
30044
- version: "0.7.1",
30044
+ version: "0.7.2",
30045
30045
  description: "Skills library for AI coding agents",
30046
30046
  type: "module",
30047
30047
  bin: {
@@ -42255,7 +42255,7 @@ function resolvedProfileSnapshot(profile2, authority) {
42255
42255
  var MAX_CACHED_PROFILE_AGE_MS = 24 * 60 * 60 * 1000;
42256
42256
 
42257
42257
  // src/lib/agent-policy-limits.ts
42258
- var AGENT_POLICY_LIMITS = Object.freeze({ bytes: 1024 * 1024, agents: 16, discoverySources: 2048, discoveryRoots: 512, builtinNames: 2048, rootAliases: 2, fields: 64, pathCharacters: 4096 });
42258
+ var AGENT_POLICY_LIMITS = Object.freeze({ bytes: 1024 * 1024, agents: 16, discoverySources: 2048, discoveryRawSourceBytes: 64 * 1024 * 1024, discoveryRawTotalBytes: 256 * 1024 * 1024, discoveryRoots: 512, discoveryDirectories: 64, discoveryDirectoryEntries: 20000, discoveryDirectoryBytes: 8 * 1024 * 1024, builtinNames: 2048, rootAliases: 2, fields: 64, pathCharacters: 4096 });
42259
42259
 
42260
42260
  // src/lib/agent-bridge.ts
42261
42261
  import { createHash as createHash6 } from "crypto";
@@ -42326,7 +42326,6 @@ var $parseDocument = publicApi.parseDocument;
42326
42326
  var $stringify = publicApi.stringify;
42327
42327
  var $visit = visit.visit;
42328
42328
  var $visitAsync = visit.visitAsync;
42329
-
42330
42329
  // src/lib/portable-skills.ts
42331
42330
  import {
42332
42331
  cpSync as cpSync2,
package/bin/worker.js CHANGED
@@ -30044,7 +30044,7 @@ import { randomUUID as randomUUID5 } from "crypto";
30044
30044
  // package.json
30045
30045
  var package_default = {
30046
30046
  name: "@hasna/skills",
30047
- version: "0.7.1",
30047
+ version: "0.7.2",
30048
30048
  description: "Skills library for AI coding agents",
30049
30049
  type: "module",
30050
30050
  bin: {
@@ -41582,7 +41582,7 @@ var MAX_RESOLVED_PROFILE_BYTES = MAX_PROFILE_DOCUMENT_BYTES - PROFILE_SESSION_EN
41582
41582
  var MAX_CACHED_PROFILE_AGE_MS = 24 * 60 * 60 * 1000;
41583
41583
 
41584
41584
  // src/lib/agent-policy-limits.ts
41585
- var AGENT_POLICY_LIMITS = Object.freeze({ bytes: 1024 * 1024, agents: 16, discoverySources: 2048, discoveryRoots: 512, builtinNames: 2048, rootAliases: 2, fields: 64, pathCharacters: 4096 });
41585
+ var AGENT_POLICY_LIMITS = Object.freeze({ bytes: 1024 * 1024, agents: 16, discoverySources: 2048, discoveryRawSourceBytes: 64 * 1024 * 1024, discoveryRawTotalBytes: 256 * 1024 * 1024, discoveryRoots: 512, discoveryDirectories: 64, discoveryDirectoryEntries: 20000, discoveryDirectoryBytes: 8 * 1024 * 1024, builtinNames: 2048, rootAliases: 2, fields: 64, pathCharacters: 4096 });
41586
41586
 
41587
41587
  // src/lib/agent-bridge.ts
41588
41588
  import { createHash as createHash5 } from "crypto";
@@ -41653,7 +41653,6 @@ var $parseDocument = publicApi.parseDocument;
41653
41653
  var $stringify = publicApi.stringify;
41654
41654
  var $visit = visit.visit;
41655
41655
  var $visitAsync = visit.visitAsync;
41656
-
41657
41656
  // src/lib/registry-data/development-tools.ts
41658
41657
  var DEVELOPMENT_TOOLS_SKILLS = [
41659
41658
  {
package/dist/index.d.ts CHANGED
@@ -59,3 +59,4 @@ export type { SkillSelection, SkillProfile, ResolvedSkillSelection, ResolvedSkil
59
59
  export { buildSkillContext } from "./lib/skill-context.js";
60
60
  export { syncSelectionProfile } from "./lib/selection-resolver.js";
61
61
  export { planAgentIntegration, applyAgentIntegration, inventoryNativeSkills, archiveNativeSkills } from "./lib/agent-integration.js";
62
+ export { captureDiscoveryDirectories, captureDiscoveryByteSources, type DiscoveryDirectory, type DiscoverySource } from "./lib/agent-discovery.js";