@csark0812/skeleton 1.5.5 → 1.5.7

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.
@@ -3028,6 +3028,7 @@ var require_utils = __commonJS((exports, module) => {
3028
3028
  var isHexPair = RegExp.prototype.test.bind(/^[\da-f]{2}$/iu);
3029
3029
  var isUnreserved = RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu);
3030
3030
  var isPathCharacter = RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);
3031
+ var isQueryFragmentCharacter = RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/?]$/iu);
3031
3032
  function stringArrayToHexStripped(input) {
3032
3033
  let acc = "";
3033
3034
  let code = 0;
@@ -3171,7 +3172,7 @@ var require_utils = __commonJS((exports, module) => {
3171
3172
  continue;
3172
3173
  }
3173
3174
  } else if (input[0] === "/") {
3174
- if (input[1] === "." || input[1] === "/") {
3175
+ if (input[1] === ".") {
3175
3176
  output.push("/");
3176
3177
  break;
3177
3178
  }
@@ -3253,10 +3254,30 @@ var require_utils = __commonJS((exports, module) => {
3253
3254
  }
3254
3255
  return output;
3255
3256
  }
3257
+ var BYTE_HEX = new Array(256);
3258
+ {
3259
+ const HEX_DIGITS = "0123456789ABCDEF";
3260
+ for (let i = 0;i < 256; i++) {
3261
+ BYTE_HEX[i] = "%" + HEX_DIGITS[i >> 4] + HEX_DIGITS[i & 15];
3262
+ }
3263
+ }
3264
+ function isEscapeSafe(cp) {
3265
+ return cp >= 48 && cp <= 57 || cp >= 65 && cp <= 90 || cp >= 97 && cp <= 122 || cp === 42 || cp === 43 || cp === 45 || cp === 46 || cp === 47 || cp === 64 || cp === 95;
3266
+ }
3267
+ function percentEncodeNonAscii(cp) {
3268
+ if (cp < 2048) {
3269
+ return BYTE_HEX[192 | cp >> 6] + BYTE_HEX[128 | cp & 63];
3270
+ }
3271
+ if (cp < 65536) {
3272
+ return BYTE_HEX[224 | cp >> 12] + BYTE_HEX[128 | cp >> 6 & 63] + BYTE_HEX[128 | cp & 63];
3273
+ }
3274
+ return BYTE_HEX[240 | cp >> 18] + BYTE_HEX[128 | cp >> 12 & 63] + BYTE_HEX[128 | cp >> 6 & 63] + BYTE_HEX[128 | cp & 63];
3275
+ }
3256
3276
  function normalizePathEncoding(input) {
3257
3277
  let output = "";
3258
3278
  for (let i = 0;i < input.length; i++) {
3259
- if (input[i] === "%" && i + 2 < input.length) {
3279
+ const ch = input[i];
3280
+ if (ch === "%" && i + 2 < input.length) {
3260
3281
  const hex = input.slice(i + 1, i + 3);
3261
3282
  if (isHexPair(hex)) {
3262
3283
  const normalizedHex = hex.toUpperCase();
@@ -3270,10 +3291,66 @@ var require_utils = __commonJS((exports, module) => {
3270
3291
  continue;
3271
3292
  }
3272
3293
  }
3273
- if (isPathCharacter(input[i])) {
3274
- output += input[i];
3294
+ if (isPathCharacter(ch)) {
3295
+ output += ch;
3275
3296
  } else {
3276
- output += escape(input[i]);
3297
+ const code = input.charCodeAt(i);
3298
+ if (code < 128) {
3299
+ output += isEscapeSafe(code) ? ch : BYTE_HEX[code];
3300
+ } else if (code < 55296 || code > 57343) {
3301
+ output += percentEncodeNonAscii(code);
3302
+ } else if (code <= 56319 && i + 1 < input.length) {
3303
+ const low = input.charCodeAt(i + 1);
3304
+ if (low >= 56320 && low <= 57343) {
3305
+ output += percentEncodeNonAscii(65536 + (code - 55296 << 10) + (low - 56320));
3306
+ i++;
3307
+ } else {
3308
+ output += percentEncodeNonAscii(65533);
3309
+ }
3310
+ } else {
3311
+ output += percentEncodeNonAscii(65533);
3312
+ }
3313
+ }
3314
+ }
3315
+ return output;
3316
+ }
3317
+ function normalizeQueryFragmentEncoding(input) {
3318
+ let output = "";
3319
+ for (let i = 0;i < input.length; i++) {
3320
+ const ch = input[i];
3321
+ if (ch === "%" && i + 2 < input.length) {
3322
+ const hex = input.slice(i + 1, i + 3);
3323
+ if (isHexPair(hex)) {
3324
+ const normalizedHex = hex.toUpperCase();
3325
+ const decoded = String.fromCharCode(parseInt(normalizedHex, 16));
3326
+ if (isUnreserved(decoded)) {
3327
+ output += decoded;
3328
+ } else {
3329
+ output += "%" + normalizedHex;
3330
+ }
3331
+ i += 2;
3332
+ continue;
3333
+ }
3334
+ }
3335
+ if (isQueryFragmentCharacter(ch)) {
3336
+ output += ch;
3337
+ } else {
3338
+ const code = input.charCodeAt(i);
3339
+ if (code < 128) {
3340
+ output += isEscapeSafe(code) ? ch : BYTE_HEX[code];
3341
+ } else if (code < 55296 || code > 57343) {
3342
+ output += percentEncodeNonAscii(code);
3343
+ } else if (code <= 56319 && i + 1 < input.length) {
3344
+ const low = input.charCodeAt(i + 1);
3345
+ if (low >= 56320 && low <= 57343) {
3346
+ output += percentEncodeNonAscii(65536 + (code - 55296 << 10) + (low - 56320));
3347
+ i++;
3348
+ } else {
3349
+ output += percentEncodeNonAscii(65533);
3350
+ }
3351
+ } else {
3352
+ output += percentEncodeNonAscii(65533);
3353
+ }
3277
3354
  }
3278
3355
  }
3279
3356
  return output;
@@ -3281,7 +3358,8 @@ var require_utils = __commonJS((exports, module) => {
3281
3358
  function escapePreservingEscapes(input) {
3282
3359
  let output = "";
3283
3360
  for (let i = 0;i < input.length; i++) {
3284
- if (input[i] === "%" && i + 2 < input.length) {
3361
+ const ch = input[i];
3362
+ if (ch === "%" && i + 2 < input.length) {
3285
3363
  const hex = input.slice(i + 1, i + 3);
3286
3364
  if (isHexPair(hex)) {
3287
3365
  output += "%" + hex.toUpperCase();
@@ -3289,7 +3367,22 @@ var require_utils = __commonJS((exports, module) => {
3289
3367
  continue;
3290
3368
  }
3291
3369
  }
3292
- output += escape(input[i]);
3370
+ const code = input.charCodeAt(i);
3371
+ if (code < 128) {
3372
+ output += isEscapeSafe(code) ? ch : BYTE_HEX[code];
3373
+ } else if (code < 55296 || code > 57343) {
3374
+ output += percentEncodeNonAscii(code);
3375
+ } else if (code <= 56319 && i + 1 < input.length) {
3376
+ const low = input.charCodeAt(i + 1);
3377
+ if (low >= 56320 && low <= 57343) {
3378
+ output += percentEncodeNonAscii(65536 + (code - 55296 << 10) + (low - 56320));
3379
+ i++;
3380
+ } else {
3381
+ output += percentEncodeNonAscii(65533);
3382
+ }
3383
+ } else {
3384
+ output += percentEncodeNonAscii(65533);
3385
+ }
3293
3386
  }
3294
3387
  return output;
3295
3388
  }
@@ -3323,6 +3416,7 @@ var require_utils = __commonJS((exports, module) => {
3323
3416
  reescapeHostDelimiters,
3324
3417
  normalizePercentEncoding,
3325
3418
  normalizePathEncoding,
3419
+ normalizeQueryFragmentEncoding,
3326
3420
  escapePreservingEscapes,
3327
3421
  removeDotSegments,
3328
3422
  isIPv4,
@@ -3508,7 +3602,7 @@ var require_schemes = __commonJS((exports, module) => {
3508
3602
 
3509
3603
  // node_modules/fast-uri/index.js
3510
3604
  var require_fast_uri = __commonJS((exports, module) => {
3511
- var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, escapePreservingEscapes, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
3605
+ var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, normalizeQueryFragmentEncoding, escapePreservingEscapes, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
3512
3606
  var { SCHEMES, getSchemeHandler } = require_schemes();
3513
3607
  function normalize(uri, options) {
3514
3608
  if (typeof uri === "string") {
@@ -3520,7 +3614,12 @@ var require_fast_uri = __commonJS((exports, module) => {
3520
3614
  }
3521
3615
  function resolve(baseURI, relativeURI, options) {
3522
3616
  const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" };
3523
- const resolved = resolveComponent(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true);
3617
+ const { parsed: baseParsed, malformedAuthorityOrPort: baseMalformed } = parseWithStatus(baseURI, schemelessOptions);
3618
+ const { parsed: relativeParsed, malformedAuthorityOrPort: relativeMalformed } = parseWithStatus(relativeURI, schemelessOptions);
3619
+ if (baseMalformed || relativeMalformed) {
3620
+ throw new Error(baseParsed.error || relativeParsed.error || "URI is malformed.");
3621
+ }
3622
+ const resolved = resolveComponent(baseParsed, relativeParsed, schemelessOptions, true);
3524
3623
  schemelessOptions.skipEscape = true;
3525
3624
  return serialize(resolved, schemelessOptions);
3526
3625
  }
@@ -3646,6 +3745,8 @@ var require_fast_uri = __commonJS((exports, module) => {
3646
3745
  return uriTokens.join("");
3647
3746
  }
3648
3747
  var URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;
3748
+ var AUTHORITY_PREFIX = /^(?:[^#/:?]+:)?\/\/([^/?#]*)/;
3749
+ var AUTHORITY_INTRODUCER_REGION = /^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;
3649
3750
  function getParseError(parsed, matches) {
3650
3751
  if (matches[2] !== undefined && parsed.path && parsed.path[0] !== "/") {
3651
3752
  return 'URI path must start with "/" when authority is present.';
@@ -3675,9 +3776,28 @@ var require_fast_uri = __commonJS((exports, module) => {
3675
3776
  uri = "//" + uri;
3676
3777
  }
3677
3778
  }
3779
+ const authorityMatch = uri.match(AUTHORITY_PREFIX);
3780
+ if (authorityMatch !== null && authorityMatch[1].indexOf("\\") !== -1) {
3781
+ parsed.error = "URI authority must not contain a literal backslash.";
3782
+ malformedAuthorityOrPort = true;
3783
+ }
3784
+ const introducerMatch = uri.match(AUTHORITY_INTRODUCER_REGION);
3785
+ if (introducerMatch !== null) {
3786
+ const region = introducerMatch[1];
3787
+ const normalizedRegion = region.replace(/[\t\n\r]/g, "");
3788
+ if (normalizedRegion.length >= 2) {
3789
+ if (normalizedRegion.slice(0, 2) !== "//") {
3790
+ parsed.error = parsed.error || "URI authority must not contain a literal backslash.";
3791
+ malformedAuthorityOrPort = true;
3792
+ } else if (region.length !== normalizedRegion.length) {
3793
+ parsed.error = parsed.error || "URI authority introducer must not contain whitespace.";
3794
+ malformedAuthorityOrPort = true;
3795
+ }
3796
+ }
3797
+ }
3678
3798
  const matches = uri.match(URI_PARSE);
3679
3799
  if (matches) {
3680
- parsed.scheme = matches[1];
3800
+ parsed.scheme = matches[1] === undefined ? undefined : matches[1].toLowerCase();
3681
3801
  parsed.userinfo = matches[3];
3682
3802
  parsed.host = matches[4];
3683
3803
  parsed.port = parseInt(matches[5], 10);
@@ -3736,12 +3856,11 @@ var require_fast_uri = __commonJS((exports, module) => {
3736
3856
  if (parsed.path) {
3737
3857
  parsed.path = normalizePathEncoding(parsed.path);
3738
3858
  }
3859
+ if (parsed.query) {
3860
+ parsed.query = normalizeQueryFragmentEncoding(parsed.query);
3861
+ }
3739
3862
  if (parsed.fragment) {
3740
- try {
3741
- parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment));
3742
- } catch {
3743
- parsed.error = parsed.error || "URI malformed";
3744
- }
3863
+ parsed.fragment = normalizeQueryFragmentEncoding(parsed.fragment);
3745
3864
  }
3746
3865
  }
3747
3866
  if (schemeHandler && schemeHandler.parse) {
@@ -13236,6 +13355,10 @@ var require_public_api = __commonJS((exports) => {
13236
13355
 
13237
13356
  // src/hooks/customize-on-skill-read.ts
13238
13357
  import { readFileSync as readFileSync4 } from "node:fs";
13358
+ import process3 from "node:process";
13359
+
13360
+ // src/hooks/run.ts
13361
+ import process2 from "node:process";
13239
13362
 
13240
13363
  // src/audit/core/shared.ts
13241
13364
  var REGISTRY_REL_PATH = ".skeleton/registry.md";
@@ -13312,6 +13435,7 @@ import { basename, join as join4, relative as relative3 } from "node:path";
13312
13435
  var import_ajv = __toESM(require_ajv(), 1);
13313
13436
  import { existsSync as existsSync2, readFileSync } from "node:fs";
13314
13437
  import { dirname, join as join2 } from "node:path";
13438
+ import process from "node:process";
13315
13439
  import { fileURLToPath } from "node:url";
13316
13440
 
13317
13441
  // node_modules/yaml/dist/index.js
@@ -13456,9 +13580,6 @@ function parseRegistry(root) {
13456
13580
  }
13457
13581
  return { paths: [...new Set(paths)], hasTableHeader };
13458
13582
  }
13459
- function parseRegistryPaths(root) {
13460
- return parseRegistry(root).paths;
13461
- }
13462
13583
 
13463
13584
  // src/customize/resolve.ts
13464
13585
  function customizeDir(root) {
@@ -13468,7 +13589,7 @@ function customizePathForSlug(root, slug) {
13468
13589
  return join4(customizeDir(root), `${slug}.md`);
13469
13590
  }
13470
13591
  function findCustomizeViaRegistry(root, slug) {
13471
- for (const rel of parseRegistryPaths(root)) {
13592
+ for (const rel of parseRegistry(root).paths) {
13472
13593
  const expected = `${REGISTRY_DIR_REL}/customize/${slug}.md`;
13473
13594
  if (normalizeRelPath(rel) === expected && existsSync4(join4(root, rel))) {
13474
13595
  return rel;
@@ -13521,11 +13642,11 @@ function readAlwaysInclude(root, basenames, skipBasename) {
13521
13642
  function resolveCustomize(root, slug) {
13522
13643
  const slugFile = resolveSlugFile(root, slug);
13523
13644
  const alwaysNames = alwaysIncludeBasenames(root);
13524
- const skip = slugFile.path != null ? basename(slugFile.path) : null;
13645
+ const skip = slugFile.path !== null && slugFile.path !== undefined ? basename(slugFile.path) : null;
13525
13646
  const always = readAlwaysInclude(root, alwaysNames, skip);
13526
13647
  const parts = [];
13527
13648
  const included = [];
13528
- if (slugFile.content != null && slugFile.content.trim().length > 0) {
13649
+ if (slugFile.content !== null && slugFile.content !== undefined && slugFile.content.trim().length > 0) {
13529
13650
  parts.push(slugFile.content.trimEnd());
13530
13651
  if (slugFile.path)
13531
13652
  included.push(slugFile.path);
@@ -13583,7 +13704,7 @@ function extractSkillSlug(payload) {
13583
13704
  }
13584
13705
  const path = extractPath(payload);
13585
13706
  if (path)
13586
- return slugFromPath(path, process.cwd());
13707
+ return slugFromPath(path, process2.cwd());
13587
13708
  return null;
13588
13709
  }
13589
13710
  function cursorResponse(content) {
@@ -13635,4 +13756,4 @@ Customize override for /${slug} (from ${from}):
13635
13756
  }
13636
13757
 
13637
13758
  // src/hooks/customize-on-skill-read.ts
13638
- process.stdout.write(runCustomizeHook(readFileSync4(0, "utf8")));
13759
+ process3.stdout.write(runCustomizeHook(readFileSync4(0, "utf8")));
@@ -1,11 +1,12 @@
1
1
  // src/audit/core/report.ts
2
- function issue(rule, file, message, opts) {
2
+ function issue(rule, file, details) {
3
+ const message = typeof details === "string" ? details : details.message;
3
4
  return {
4
5
  rule,
5
6
  file,
6
- link: opts?.link,
7
+ link: typeof details === "string" ? undefined : details.link,
7
8
  message,
8
- severity: opts?.severity ?? "error"
9
+ severity: typeof details === "string" ? "error" : details.severity ?? "error"
9
10
  };
10
11
  }
11
12
  // src/audit/core/shared.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@csark0812/skeleton",
3
- "version": "1.5.5",
3
+ "version": "1.5.7",
4
4
  "description": "SSOT audit CLI for agent harness repos",
5
5
  "type": "module",
6
6
  "bin": {
@@ -68,11 +68,15 @@
68
68
  "yaml": "^2.8.0"
69
69
  },
70
70
  "devDependencies": {
71
- "@biomejs/biome": "^2.5.3",
71
+ "@biomejs/biome": "2.5.6",
72
72
  "@cursor/sdk": "^1.0.23",
73
73
  "@post-print/agent-test": "^0.2.7",
74
74
  "@types/bun": "^1.3.8",
75
75
  "@types/github-slugger": "^2.0.0",
76
76
  "typescript": "~7.0.2"
77
+ },
78
+ "overrides": {
79
+ "undici": ">=6.23.0",
80
+ "fast-uri": ">=3.1.4"
77
81
  }
78
82
  }