@hasna/skills 0.9.17 → 0.9.18

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/index.js CHANGED
@@ -36868,7 +36868,7 @@ var package_default;
36868
36868
  var init_package = __esm(() => {
36869
36869
  package_default = {
36870
36870
  name: "@hasna/skills",
36871
- version: "0.9.17",
36871
+ version: "0.9.18",
36872
36872
  description: "Skills library for AI coding agents",
36873
36873
  type: "module",
36874
36874
  bin: {
@@ -48622,7 +48622,8 @@ async function resolveSkillsConnection(env3 = process.env, options = {}) {
48622
48622
  }
48623
48623
  let completed;
48624
48624
  try {
48625
- completed = await completePointerCredential(SKILLS_APP, pointer, env3);
48625
+ const explicitVault = Boolean(snapshotEnv.HASNA_SECRETS_API_URL?.trim() && snapshotEnv.HASNA_SECRETS_API_KEY_OVERRIDE?.trim());
48626
+ completed = await completePointerCredential(SKILLS_APP, pointer, explicitVault ? snapshotEnv : env3);
48626
48627
  } catch (error) {
48627
48628
  const translated = asSkillsFleetCredentialError(error, pointer.pointerVaultKey);
48628
48629
  if (translated)
@@ -79049,7 +79050,20 @@ class RemoteSkillsClient {
79049
79050
  const url2 = new URL(upload.uploadUrl);
79050
79051
  if (url2.username || url2.password || url2.hash || url2.protocol !== "https:" && !(url2.protocol === "http:" && ["localhost", "127.0.0.1", "[::1]"].includes(url2.hostname)))
79051
79052
  throw new Error("Unsafe input upload URL");
79052
- const uploaded = await fetch(url2, { method: "PUT", body: file2.bytes, headers: { "Content-Type": file2.contentType ?? "application/octet-stream" }, redirect: "error", signal: AbortSignal.timeout(60000) });
79053
+ const headers = new Headers({ "Content-Type": file2.contentType ?? "application/octet-stream" });
79054
+ if (upload.uploadHeaders !== undefined) {
79055
+ if (upload.uploadHeaders === null || typeof upload.uploadHeaders !== "object" || Array.isArray(upload.uploadHeaders))
79056
+ throw new Error("Invalid input upload headers");
79057
+ const seen = new Set;
79058
+ for (const [name, value] of Object.entries(upload.uploadHeaders)) {
79059
+ const lowerName = name.toLowerCase();
79060
+ if (seen.has(lowerName) || !["if-none-match", "x-amz-tagging"].includes(lowerName) || typeof value !== "string" || value.length === 0 || value.length > 2048 || !/^[\x20-\x7e]+$/.test(value) || value.trim() !== value || lowerName === "if-none-match" && value !== "*")
79061
+ throw new Error("Invalid input upload headers");
79062
+ seen.add(lowerName);
79063
+ headers.set(name, value);
79064
+ }
79065
+ }
79066
+ const uploaded = await fetch(url2, { method: "PUT", body: file2.bytes, headers, redirect: "error", signal: AbortSignal.timeout(60000) });
79053
79067
  if (!uploaded.ok)
79054
79068
  throw new Error("Input upload failed");
79055
79069
  await uploaded.body?.cancel();
package/bin/mcp.js CHANGED
@@ -20019,7 +20019,7 @@ var package_default;
20019
20019
  var init_package = __esm(() => {
20020
20020
  package_default = {
20021
20021
  name: "@hasna/skills",
20022
- version: "0.9.17",
20022
+ version: "0.9.18",
20023
20023
  description: "Skills library for AI coding agents",
20024
20024
  type: "module",
20025
20025
  bin: {
@@ -21311,7 +21311,8 @@ async function resolveSkillsConnection(env = process.env, options = {}) {
21311
21311
  }
21312
21312
  let completed;
21313
21313
  try {
21314
- completed = await completePointerCredential(SKILLS_APP, pointer, env);
21314
+ const explicitVault = Boolean(snapshotEnv.HASNA_SECRETS_API_URL?.trim() && snapshotEnv.HASNA_SECRETS_API_KEY_OVERRIDE?.trim());
21315
+ completed = await completePointerCredential(SKILLS_APP, pointer, explicitVault ? snapshotEnv : env);
21315
21316
  } catch (error61) {
21316
21317
  const translated = asSkillsFleetCredentialError(error61, pointer.pointerVaultKey);
21317
21318
  if (translated)
@@ -52027,7 +52028,20 @@ class RemoteSkillsClient {
52027
52028
  const url2 = new URL(upload.uploadUrl);
52028
52029
  if (url2.username || url2.password || url2.hash || url2.protocol !== "https:" && !(url2.protocol === "http:" && ["localhost", "127.0.0.1", "[::1]"].includes(url2.hostname)))
52029
52030
  throw new Error("Unsafe input upload URL");
52030
- const uploaded = await fetch(url2, { method: "PUT", body: file2.bytes, headers: { "Content-Type": file2.contentType ?? "application/octet-stream" }, redirect: "error", signal: AbortSignal.timeout(60000) });
52031
+ const headers = new Headers({ "Content-Type": file2.contentType ?? "application/octet-stream" });
52032
+ if (upload.uploadHeaders !== undefined) {
52033
+ if (upload.uploadHeaders === null || typeof upload.uploadHeaders !== "object" || Array.isArray(upload.uploadHeaders))
52034
+ throw new Error("Invalid input upload headers");
52035
+ const seen = new Set;
52036
+ for (const [name, value] of Object.entries(upload.uploadHeaders)) {
52037
+ const lowerName = name.toLowerCase();
52038
+ if (seen.has(lowerName) || !["if-none-match", "x-amz-tagging"].includes(lowerName) || typeof value !== "string" || value.length === 0 || value.length > 2048 || !/^[\x20-\x7e]+$/.test(value) || value.trim() !== value || lowerName === "if-none-match" && value !== "*")
52039
+ throw new Error("Invalid input upload headers");
52040
+ seen.add(lowerName);
52041
+ headers.set(name, value);
52042
+ }
52043
+ }
52044
+ const uploaded = await fetch(url2, { method: "PUT", body: file2.bytes, headers, redirect: "error", signal: AbortSignal.timeout(60000) });
52031
52045
  if (!uploaded.ok)
52032
52046
  throw new Error("Input upload failed");
52033
52047
  await uploaded.body?.cancel();
package/bin/migrate.js CHANGED
@@ -7,7 +7,7 @@ import { join as join5 } from "path";
7
7
  // package.json
8
8
  var package_default = {
9
9
  name: "@hasna/skills",
10
- version: "0.9.17",
10
+ version: "0.9.18",
11
11
  description: "Skills library for AI coding agents",
12
12
  type: "module",
13
13
  bin: {
package/bin/server.js CHANGED
@@ -24122,7 +24122,7 @@ var init_dist_es9 = __esm(() => {
24122
24122
  // package.json
24123
24123
  var package_default = {
24124
24124
  name: "@hasna/skills",
24125
- version: "0.9.17",
24125
+ version: "0.9.18",
24126
24126
  description: "Skills library for AI coding agents",
24127
24127
  type: "module",
24128
24128
  bin: {
package/bin/worker.js CHANGED
@@ -24125,7 +24125,7 @@ import { randomUUID as randomUUID6 } from "crypto";
24125
24125
  // package.json
24126
24126
  var package_default = {
24127
24127
  name: "@hasna/skills",
24128
- version: "0.9.17",
24128
+ version: "0.9.18",
24129
24129
  description: "Skills library for AI coding agents",
24130
24130
  type: "module",
24131
24131
  bin: {
package/dist/index.js CHANGED
@@ -9611,7 +9611,7 @@ import { isAbsolute as isAbsolute11, join as join23, resolve as resolve11 } from
9611
9611
  // package.json
9612
9612
  var package_default = {
9613
9613
  name: "@hasna/skills",
9614
- version: "0.9.17",
9614
+ version: "0.9.18",
9615
9615
  description: "Skills library for AI coding agents",
9616
9616
  type: "module",
9617
9617
  bin: {
@@ -10891,7 +10891,8 @@ async function resolveSkillsConnection(env = process.env, options = {}) {
10891
10891
  }
10892
10892
  let completed;
10893
10893
  try {
10894
- completed = await completePointerCredential(SKILLS_APP, pointer, env);
10894
+ const explicitVault = Boolean(snapshotEnv.HASNA_SECRETS_API_URL?.trim() && snapshotEnv.HASNA_SECRETS_API_KEY_OVERRIDE?.trim());
10895
+ completed = await completePointerCredential(SKILLS_APP, pointer, explicitVault ? snapshotEnv : env);
10895
10896
  } catch (error) {
10896
10897
  const translated = asSkillsFleetCredentialError(error, pointer.pointerVaultKey);
10897
10898
  if (translated)
@@ -39095,7 +39096,20 @@ class RemoteSkillsClient {
39095
39096
  const url2 = new URL(upload.uploadUrl);
39096
39097
  if (url2.username || url2.password || url2.hash || url2.protocol !== "https:" && !(url2.protocol === "http:" && ["localhost", "127.0.0.1", "[::1]"].includes(url2.hostname)))
39097
39098
  throw new Error("Unsafe input upload URL");
39098
- const uploaded = await fetch(url2, { method: "PUT", body: file2.bytes, headers: { "Content-Type": file2.contentType ?? "application/octet-stream" }, redirect: "error", signal: AbortSignal.timeout(60000) });
39099
+ const headers = new Headers({ "Content-Type": file2.contentType ?? "application/octet-stream" });
39100
+ if (upload.uploadHeaders !== undefined) {
39101
+ if (upload.uploadHeaders === null || typeof upload.uploadHeaders !== "object" || Array.isArray(upload.uploadHeaders))
39102
+ throw new Error("Invalid input upload headers");
39103
+ const seen = new Set;
39104
+ for (const [name, value] of Object.entries(upload.uploadHeaders)) {
39105
+ const lowerName = name.toLowerCase();
39106
+ if (seen.has(lowerName) || !["if-none-match", "x-amz-tagging"].includes(lowerName) || typeof value !== "string" || value.length === 0 || value.length > 2048 || !/^[\x20-\x7e]+$/.test(value) || value.trim() !== value || lowerName === "if-none-match" && value !== "*")
39107
+ throw new Error("Invalid input upload headers");
39108
+ seen.add(lowerName);
39109
+ headers.set(name, value);
39110
+ }
39111
+ }
39112
+ const uploaded = await fetch(url2, { method: "PUT", body: file2.bytes, headers, redirect: "error", signal: AbortSignal.timeout(60000) });
39099
39113
  if (!uploaded.ok)
39100
39114
  throw new Error("Input upload failed");
39101
39115
  await uploaded.body?.cancel();
package/dist/sdk/index.js CHANGED
@@ -32373,7 +32373,7 @@ var init_event_sink = __esm(() => {
32373
32373
  // package.json
32374
32374
  var package_default = {
32375
32375
  name: "@hasna/skills",
32376
- version: "0.9.17",
32376
+ version: "0.9.18",
32377
32377
  description: "Skills library for AI coding agents",
32378
32378
  type: "module",
32379
32379
  bin: {
@@ -33712,7 +33712,8 @@ async function resolveSkillsConnection(env = process.env, options = {}) {
33712
33712
  }
33713
33713
  let completed;
33714
33714
  try {
33715
- completed = await completePointerCredential(SKILLS_APP, pointer, env);
33715
+ const explicitVault = Boolean(snapshotEnv.HASNA_SECRETS_API_URL?.trim() && snapshotEnv.HASNA_SECRETS_API_KEY_OVERRIDE?.trim());
33716
+ completed = await completePointerCredential(SKILLS_APP, pointer, explicitVault ? snapshotEnv : env);
33716
33717
  } catch (error) {
33717
33718
  const translated = asSkillsFleetCredentialError(error, pointer.pointerVaultKey);
33718
33719
  if (translated)
@@ -89665,7 +89666,20 @@ class RemoteSkillsClient {
89665
89666
  const url2 = new URL(upload.uploadUrl);
89666
89667
  if (url2.username || url2.password || url2.hash || url2.protocol !== "https:" && !(url2.protocol === "http:" && ["localhost", "127.0.0.1", "[::1]"].includes(url2.hostname)))
89667
89668
  throw new Error("Unsafe input upload URL");
89668
- const uploaded = await fetch(url2, { method: "PUT", body: file2.bytes, headers: { "Content-Type": file2.contentType ?? "application/octet-stream" }, redirect: "error", signal: AbortSignal.timeout(60000) });
89669
+ const headers = new Headers({ "Content-Type": file2.contentType ?? "application/octet-stream" });
89670
+ if (upload.uploadHeaders !== undefined) {
89671
+ if (upload.uploadHeaders === null || typeof upload.uploadHeaders !== "object" || Array.isArray(upload.uploadHeaders))
89672
+ throw new Error("Invalid input upload headers");
89673
+ const seen = new Set;
89674
+ for (const [name, value] of Object.entries(upload.uploadHeaders)) {
89675
+ const lowerName = name.toLowerCase();
89676
+ if (seen.has(lowerName) || !["if-none-match", "x-amz-tagging"].includes(lowerName) || typeof value !== "string" || value.length === 0 || value.length > 2048 || !/^[\x20-\x7e]+$/.test(value) || value.trim() !== value || lowerName === "if-none-match" && value !== "*")
89677
+ throw new Error("Invalid input upload headers");
89678
+ seen.add(lowerName);
89679
+ headers.set(name, value);
89680
+ }
89681
+ }
89682
+ const uploaded = await fetch(url2, { method: "PUT", body: file2.bytes, headers, redirect: "error", signal: AbortSignal.timeout(60000) });
89669
89683
  if (!uploaded.ok)
89670
89684
  throw new Error("Input upload failed");
89671
89685
  await uploaded.body?.cancel();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hasna/skills",
3
- "version": "0.9.17",
3
+ "version": "0.9.18",
4
4
  "description": "Skills library for AI coding agents",
5
5
  "type": "module",
6
6
  "bin": {