@hasna/skills 0.5.8 → 0.5.9
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 +310 -309
- package/bin/mcp.js +183 -181
- package/bin/migrate.js +4 -2
- package/bin/server.js +144 -123
- package/bin/worker.js +123 -121
- package/dist/admin-contract.js +8 -8
- package/dist/index.js +13 -11
- package/dist/sdk/amounts.d.ts +5 -0
- package/dist/sdk/governance-store.d.ts +2 -0
- package/dist/sdk/index.js +198 -164
- package/dist/sdk/runs.d.ts +1 -1
- package/dist/sdk/spend.d.ts +5 -2
- package/package.json +4 -2
- package/dist/cli/cli.test-utils.d.ts +0 -43
- package/dist/server/store-fixtures.d.ts +0 -31
package/dist/admin-contract.js
CHANGED
|
@@ -46,7 +46,7 @@ var __export = (target, all) => {
|
|
|
46
46
|
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
47
47
|
var __require = import.meta.require;
|
|
48
48
|
|
|
49
|
-
//
|
|
49
|
+
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/external.js
|
|
50
50
|
var exports_external = {};
|
|
51
51
|
__export(exports_external, {
|
|
52
52
|
void: () => voidType,
|
|
@@ -158,7 +158,7 @@ __export(exports_external, {
|
|
|
158
158
|
BRAND: () => BRAND
|
|
159
159
|
});
|
|
160
160
|
|
|
161
|
-
//
|
|
161
|
+
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/util.js
|
|
162
162
|
var util;
|
|
163
163
|
(function(util2) {
|
|
164
164
|
util2.assertEqual = (_) => {};
|
|
@@ -289,7 +289,7 @@ var getParsedType = (data) => {
|
|
|
289
289
|
}
|
|
290
290
|
};
|
|
291
291
|
|
|
292
|
-
//
|
|
292
|
+
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/ZodError.js
|
|
293
293
|
var ZodIssueCode = util.arrayToEnum([
|
|
294
294
|
"invalid_type",
|
|
295
295
|
"invalid_literal",
|
|
@@ -408,7 +408,7 @@ ZodError.create = (issues) => {
|
|
|
408
408
|
return error;
|
|
409
409
|
};
|
|
410
410
|
|
|
411
|
-
//
|
|
411
|
+
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/locales/en.js
|
|
412
412
|
var errorMap = (issue, _ctx) => {
|
|
413
413
|
let message;
|
|
414
414
|
switch (issue.code) {
|
|
@@ -511,7 +511,7 @@ var errorMap = (issue, _ctx) => {
|
|
|
511
511
|
};
|
|
512
512
|
var en_default = errorMap;
|
|
513
513
|
|
|
514
|
-
//
|
|
514
|
+
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/errors.js
|
|
515
515
|
var overrideErrorMap = en_default;
|
|
516
516
|
function setErrorMap(map) {
|
|
517
517
|
overrideErrorMap = map;
|
|
@@ -519,7 +519,7 @@ function setErrorMap(map) {
|
|
|
519
519
|
function getErrorMap() {
|
|
520
520
|
return overrideErrorMap;
|
|
521
521
|
}
|
|
522
|
-
//
|
|
522
|
+
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js
|
|
523
523
|
var makeIssue = (params) => {
|
|
524
524
|
const { data, path, errorMaps, issueData } = params;
|
|
525
525
|
const fullPath = [...path, ...issueData.path || []];
|
|
@@ -625,14 +625,14 @@ var isAborted = (x) => x.status === "aborted";
|
|
|
625
625
|
var isDirty = (x) => x.status === "dirty";
|
|
626
626
|
var isValid = (x) => x.status === "valid";
|
|
627
627
|
var isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise;
|
|
628
|
-
//
|
|
628
|
+
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.js
|
|
629
629
|
var errorUtil;
|
|
630
630
|
(function(errorUtil2) {
|
|
631
631
|
errorUtil2.errToObj = (message) => typeof message === "string" ? { message } : message || {};
|
|
632
632
|
errorUtil2.toString = (message) => typeof message === "string" ? message : message?.message;
|
|
633
633
|
})(errorUtil || (errorUtil = {}));
|
|
634
634
|
|
|
635
|
-
//
|
|
635
|
+
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/types.js
|
|
636
636
|
class ParseInputLazyPath {
|
|
637
637
|
constructor(parent, value, path, key) {
|
|
638
638
|
this._cachedPath = [];
|
package/dist/index.js
CHANGED
|
@@ -4726,7 +4726,7 @@ function readIfExists(path) {
|
|
|
4726
4726
|
} catch {}
|
|
4727
4727
|
return null;
|
|
4728
4728
|
}
|
|
4729
|
-
//
|
|
4729
|
+
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/external.js
|
|
4730
4730
|
var exports_external = {};
|
|
4731
4731
|
__export(exports_external, {
|
|
4732
4732
|
void: () => voidType,
|
|
@@ -4838,7 +4838,7 @@ __export(exports_external, {
|
|
|
4838
4838
|
BRAND: () => BRAND
|
|
4839
4839
|
});
|
|
4840
4840
|
|
|
4841
|
-
//
|
|
4841
|
+
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/util.js
|
|
4842
4842
|
var util;
|
|
4843
4843
|
(function(util2) {
|
|
4844
4844
|
util2.assertEqual = (_) => {};
|
|
@@ -4969,7 +4969,7 @@ var getParsedType = (data) => {
|
|
|
4969
4969
|
}
|
|
4970
4970
|
};
|
|
4971
4971
|
|
|
4972
|
-
//
|
|
4972
|
+
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/ZodError.js
|
|
4973
4973
|
var ZodIssueCode = util.arrayToEnum([
|
|
4974
4974
|
"invalid_type",
|
|
4975
4975
|
"invalid_literal",
|
|
@@ -5088,7 +5088,7 @@ ZodError.create = (issues) => {
|
|
|
5088
5088
|
return error;
|
|
5089
5089
|
};
|
|
5090
5090
|
|
|
5091
|
-
//
|
|
5091
|
+
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/locales/en.js
|
|
5092
5092
|
var errorMap = (issue, _ctx) => {
|
|
5093
5093
|
let message;
|
|
5094
5094
|
switch (issue.code) {
|
|
@@ -5191,7 +5191,7 @@ var errorMap = (issue, _ctx) => {
|
|
|
5191
5191
|
};
|
|
5192
5192
|
var en_default = errorMap;
|
|
5193
5193
|
|
|
5194
|
-
//
|
|
5194
|
+
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/errors.js
|
|
5195
5195
|
var overrideErrorMap = en_default;
|
|
5196
5196
|
function setErrorMap(map) {
|
|
5197
5197
|
overrideErrorMap = map;
|
|
@@ -5199,7 +5199,7 @@ function setErrorMap(map) {
|
|
|
5199
5199
|
function getErrorMap() {
|
|
5200
5200
|
return overrideErrorMap;
|
|
5201
5201
|
}
|
|
5202
|
-
//
|
|
5202
|
+
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js
|
|
5203
5203
|
var makeIssue = (params) => {
|
|
5204
5204
|
const { data, path, errorMaps, issueData } = params;
|
|
5205
5205
|
const fullPath = [...path, ...issueData.path || []];
|
|
@@ -5305,14 +5305,14 @@ var isAborted = (x) => x.status === "aborted";
|
|
|
5305
5305
|
var isDirty = (x) => x.status === "dirty";
|
|
5306
5306
|
var isValid = (x) => x.status === "valid";
|
|
5307
5307
|
var isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise;
|
|
5308
|
-
//
|
|
5308
|
+
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.js
|
|
5309
5309
|
var errorUtil;
|
|
5310
5310
|
(function(errorUtil2) {
|
|
5311
5311
|
errorUtil2.errToObj = (message) => typeof message === "string" ? { message } : message || {};
|
|
5312
5312
|
errorUtil2.toString = (message) => typeof message === "string" ? message : message?.message;
|
|
5313
5313
|
})(errorUtil || (errorUtil = {}));
|
|
5314
5314
|
|
|
5315
|
-
//
|
|
5315
|
+
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/types.js
|
|
5316
5316
|
class ParseInputLazyPath {
|
|
5317
5317
|
constructor(parent, value, path, key) {
|
|
5318
5318
|
this._cachedPath = [];
|
|
@@ -8699,7 +8699,7 @@ var coerce = {
|
|
|
8699
8699
|
date: (arg) => ZodDate.create({ ...arg, coerce: true })
|
|
8700
8700
|
};
|
|
8701
8701
|
var NEVER = INVALID;
|
|
8702
|
-
//
|
|
8702
|
+
// ../contracts/dist/client/transport.js
|
|
8703
8703
|
import { isIP } from "net";
|
|
8704
8704
|
import { spawnSync } from "child_process";
|
|
8705
8705
|
import { closeSync, fstatSync, openSync, readFileSync as readFileSync12 } from "fs";
|
|
@@ -13336,7 +13336,7 @@ import { dirname as dirname7, relative as relative4 } from "path";
|
|
|
13336
13336
|
// package.json
|
|
13337
13337
|
var package_default = {
|
|
13338
13338
|
name: "@hasna/skills",
|
|
13339
|
-
version: "0.5.
|
|
13339
|
+
version: "0.5.9",
|
|
13340
13340
|
description: "Skills library for AI coding agents",
|
|
13341
13341
|
type: "module",
|
|
13342
13342
|
bin: {
|
|
@@ -13376,7 +13376,9 @@ var package_default = {
|
|
|
13376
13376
|
"docs/skill-standard.md",
|
|
13377
13377
|
"schemas/",
|
|
13378
13378
|
"LICENSE",
|
|
13379
|
-
"README.md"
|
|
13379
|
+
"README.md",
|
|
13380
|
+
"!dist/**/*test-utils.d.ts",
|
|
13381
|
+
"!dist/**/*fixtures.d.ts"
|
|
13380
13382
|
],
|
|
13381
13383
|
main: "./dist/index.js",
|
|
13382
13384
|
types: "./dist/index.d.ts",
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Aggregate monetary values use nonnegative JavaScript-safe integer cents. */
|
|
2
|
+
export declare function assertCents(value: number, field: string): void;
|
|
3
|
+
/** A single reservation/charge must fit every supported store's integer column.
|
|
4
|
+
* Monthly ceilings and sums remain safe integers and may exceed this row limit. */
|
|
5
|
+
export declare function assertReservationCents(value: number, field: string): void;
|
|
@@ -34,7 +34,9 @@ export interface CreditReservation {
|
|
|
34
34
|
id: string;
|
|
35
35
|
orgId: string;
|
|
36
36
|
runId: string;
|
|
37
|
+
/** Per-reservation integer cents (0..2147483647) across all store backends. */
|
|
37
38
|
estimatedCents: number;
|
|
39
|
+
/** Settled integer cents in the same per-reservation range. */
|
|
38
40
|
actualCents?: number;
|
|
39
41
|
status: ReservationStatus;
|
|
40
42
|
createdAt: string;
|