@hasna/skills 0.5.4 → 0.5.6

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.
@@ -213,6 +213,8 @@ export interface ServerSkillVersion {
213
213
  createdAt: string;
214
214
  }
215
215
  export interface PublishSkillInput {
216
+ /** Internal boot-seed precondition: never revive or replace non-bundled records. */
217
+ seedBundledOnly?: true;
216
218
  principal: ApiPrincipal;
217
219
  slug: string;
218
220
  displayName: string;
package/dist/storage.js CHANGED
@@ -19,14 +19,12 @@ var __toESM = (mod, isNodeMode, target) => {
19
19
  }
20
20
  target = mod != null ? __create(__getProtoOf(mod)) : {};
21
21
  const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
22
- if (mod && typeof mod === "object" || typeof mod === "function") {
23
- for (let key of __getOwnPropNames(mod))
24
- if (!__hasOwnProp.call(to, key))
25
- __defProp(to, key, {
26
- get: __accessProp.bind(mod, key),
27
- enumerable: true
28
- });
29
- }
22
+ for (let key of __getOwnPropNames(mod))
23
+ if (!__hasOwnProp.call(to, key))
24
+ __defProp(to, key, {
25
+ get: __accessProp.bind(mod, key),
26
+ enumerable: true
27
+ });
30
28
  if (canCache)
31
29
  cache.set(mod, to);
32
30
  return to;
@@ -1033,11 +1031,15 @@ function normalizeHeaders(headers) {
1033
1031
  }
1034
1032
  return result;
1035
1033
  }
1034
+ function encodeAwsUriComponent(value) {
1035
+ return encodeURIComponent(value).replace(/[!'()*]/g, (char) => `%${char.charCodeAt(0).toString(16).toUpperCase()}`);
1036
+ }
1036
1037
  function canonicalizeQuery(params) {
1037
- return [...params.entries()].sort(([aKey, aValue], [bKey, bValue]) => aKey.localeCompare(bKey) || aValue.localeCompare(bValue)).map(([key, value]) => `${encodeURIComponent(key)}=${encodeURIComponent(value)}`).join("&");
1038
+ const compare = (a, b) => a < b ? -1 : a > b ? 1 : 0;
1039
+ return [...params.entries()].map(([key, value]) => [encodeAwsUriComponent(key), encodeAwsUriComponent(value)]).sort(([aKey, aValue], [bKey, bValue]) => compare(aKey, bKey) || compare(aValue, bValue)).map(([key, value]) => `${key}=${value}`).join("&");
1038
1040
  }
1039
1041
  function encodeUriPath(pathname) {
1040
- return pathname.split("/").map((segment) => encodeURIComponent(decodeURIComponent(segment)).replace(/[!'()*]/g, (char) => `%${char.charCodeAt(0).toString(16).toUpperCase()}`)).join("/");
1042
+ return pathname.split("/").map((segment) => encodeAwsUriComponent(decodeURIComponent(segment))).join("/");
1041
1043
  }
1042
1044
  function toAmzDate(date) {
1043
1045
  return date.toISOString().replace(/[:-]|\.\d{3}/g, "");
@@ -1072,32 +1074,32 @@ function toArrayBuffer(bytes) {
1072
1074
  return buffer;
1073
1075
  }
1074
1076
  export {
1075
- SKILLS_NATIVE_STORAGE_ENV,
1076
- SKILLS_NATIVE_STORAGE_FALLBACK_ENV,
1077
- SKILLS_STORAGE_ENV,
1078
- SKILLS_STORAGE_FALLBACK_ENV,
1079
- SKILLS_STORAGE_TABLES,
1080
- STORAGE_TABLES,
1081
- SkillsPostgresSyncStore,
1082
- SkillsS3ObjectStore,
1083
- buildSkillsS3ObjectUrl,
1084
- createSkillsPostgresSyncStore,
1085
- createSkillsS3ObjectStore,
1086
- createSkillsSnapshotSyncRecord,
1087
- exportSkillsLocalSnapshot,
1088
- getSkillsNativeStorageStatus,
1089
- getSkillsStorageDatabaseEnv,
1090
- getSkillsStorageDatabaseUrl,
1091
- getSkillsStorageStatus,
1092
- getStorageDatabaseEnv,
1093
- getStorageDatabaseUrl,
1094
- getStorageStatus,
1095
- importSkillsLocalSnapshot,
1096
- planSkillsS3SnapshotUpload,
1097
- resolveSkillsNativeStorageConfig,
1098
- resolveStorageConfig,
1099
- signSkillsAwsV4Request,
1100
- skillsPostgresSyncSchemaSql,
1077
+ uploadSkillsSnapshotFilesToS3,
1101
1078
  storageCapabilities,
1102
- uploadSkillsSnapshotFilesToS3
1079
+ skillsPostgresSyncSchemaSql,
1080
+ signSkillsAwsV4Request,
1081
+ resolveStorageConfig,
1082
+ resolveSkillsNativeStorageConfig,
1083
+ planSkillsS3SnapshotUpload,
1084
+ importSkillsLocalSnapshot,
1085
+ getStorageStatus,
1086
+ getStorageDatabaseUrl,
1087
+ getStorageDatabaseEnv,
1088
+ getSkillsStorageStatus,
1089
+ getSkillsStorageDatabaseUrl,
1090
+ getSkillsStorageDatabaseEnv,
1091
+ getSkillsNativeStorageStatus,
1092
+ exportSkillsLocalSnapshot,
1093
+ createSkillsSnapshotSyncRecord,
1094
+ createSkillsS3ObjectStore,
1095
+ createSkillsPostgresSyncStore,
1096
+ buildSkillsS3ObjectUrl,
1097
+ SkillsS3ObjectStore,
1098
+ SkillsPostgresSyncStore,
1099
+ STORAGE_TABLES,
1100
+ SKILLS_STORAGE_TABLES,
1101
+ SKILLS_STORAGE_FALLBACK_ENV,
1102
+ SKILLS_STORAGE_ENV,
1103
+ SKILLS_NATIVE_STORAGE_FALLBACK_ENV,
1104
+ SKILLS_NATIVE_STORAGE_ENV
1103
1105
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hasna/skills",
3
- "version": "0.5.4",
3
+ "version": "0.5.6",
4
4
  "description": "Skills library for AI coding agents",
5
5
  "type": "module",
6
6
  "bin": {