@hasna/skills 0.3.0 → 0.4.0
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/README.md +94 -10
- package/bin/index.js +1398 -571
- package/bin/mcp.js +899 -211
- package/bin/server.js +14 -5
- package/bin/worker.js +2 -3
- package/dist/cli/commands/remote-account.d.ts +7 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +770 -210
- package/dist/lib/auth-store.d.ts +1 -1
- package/dist/lib/fleet-credentials.d.ts +8 -2
- package/dist/lib/instance-credentials-race.fixture.d.ts +1 -0
- package/dist/lib/instance-credentials.d.ts +13 -0
- package/dist/lib/mcp-contracts.d.ts +4 -0
- package/dist/lib/portable-skills-files.d.ts +4 -0
- package/dist/lib/portable-skills-types.d.ts +2 -0
- package/dist/lib/remote-account.d.ts +42 -0
- package/dist/lib/remote-auth.d.ts +32 -0
- package/dist/lib/remote-client.d.ts +56 -1
- package/dist/lib/remote-customer-operations.d.ts +106 -0
- package/dist/lib/remote-files.d.ts +21 -0
- package/dist/lib/run-routing.d.ts +1 -0
- package/dist/lib/run-state.d.ts +3 -0
- package/dist/mcp/remote-customer-tools.d.ts +2 -0
- package/dist/sdk/index.d.ts +4 -0
- package/dist/sdk/index.js +1057 -280
- package/dist/sdk/runs.d.ts +4 -4
- package/package.json +2 -3
package/bin/server.js
CHANGED
|
@@ -23100,7 +23100,7 @@ var init_dist_es9 = __esm(() => {
|
|
|
23100
23100
|
// package.json
|
|
23101
23101
|
var package_default = {
|
|
23102
23102
|
name: "@hasna/skills",
|
|
23103
|
-
version: "0.
|
|
23103
|
+
version: "0.4.0",
|
|
23104
23104
|
description: "Skills library for AI coding agents",
|
|
23105
23105
|
type: "module",
|
|
23106
23106
|
bin: {
|
|
@@ -23159,8 +23159,7 @@ var package_default = {
|
|
|
23159
23159
|
"verify:release": "bun run scripts/release-guard.ts",
|
|
23160
23160
|
prepare: "bun run build:js",
|
|
23161
23161
|
prepack: "bun run build && bun run verify:release",
|
|
23162
|
-
prepublishOnly: "bun run typecheck && bun run test"
|
|
23163
|
-
postinstall: "mkdir -p $HOME/.hasna/skills/custom 2>/dev/null || true"
|
|
23162
|
+
prepublishOnly: "bun run typecheck && bun run test"
|
|
23164
23163
|
},
|
|
23165
23164
|
keywords: [
|
|
23166
23165
|
"skills",
|
|
@@ -35755,6 +35754,16 @@ var KNOWN_TOP_LEVEL_ENTRIES = new Set([
|
|
|
35755
35754
|
"vision.ts"
|
|
35756
35755
|
]);
|
|
35757
35756
|
var VALID_PROVENANCE_SOURCES = new Set(["official", "custom", "remote", "private", "private-hosted", "upstream", "extension"]);
|
|
35757
|
+
function frontmatterString(raw) {
|
|
35758
|
+
if (raw.startsWith('"') && raw.endsWith('"')) {
|
|
35759
|
+
try {
|
|
35760
|
+
const decoded = JSON.parse(raw);
|
|
35761
|
+
if (typeof decoded === "string")
|
|
35762
|
+
return decoded;
|
|
35763
|
+
} catch {}
|
|
35764
|
+
}
|
|
35765
|
+
return raw.replace(/^["']|["']$/g, "");
|
|
35766
|
+
}
|
|
35758
35767
|
function parseSkillFrontmatter(content) {
|
|
35759
35768
|
const match = content.match(/^---\r?\n([\s\S]*?)\r?\n---/);
|
|
35760
35769
|
if (!match)
|
|
@@ -35774,12 +35783,12 @@ function parseSkillFrontmatter(content) {
|
|
|
35774
35783
|
const tags = [];
|
|
35775
35784
|
while (i3 + 1 < lines.length && /^\s+-\s+/.test(lines[i3 + 1])) {
|
|
35776
35785
|
i3++;
|
|
35777
|
-
tags.push(lines[i3].replace(/^\s+-\s+/, "").trim());
|
|
35786
|
+
tags.push(frontmatterString(lines[i3].replace(/^\s+-\s+/, "").trim()));
|
|
35778
35787
|
}
|
|
35779
35788
|
result.tags = tags;
|
|
35780
35789
|
continue;
|
|
35781
35790
|
}
|
|
35782
|
-
const value = rawValue
|
|
35791
|
+
const value = frontmatterString(rawValue);
|
|
35783
35792
|
if (!value)
|
|
35784
35793
|
continue;
|
|
35785
35794
|
if (key === "name")
|
package/bin/worker.js
CHANGED
|
@@ -23103,7 +23103,7 @@ import { randomUUID as randomUUID4 } from "crypto";
|
|
|
23103
23103
|
// package.json
|
|
23104
23104
|
var package_default = {
|
|
23105
23105
|
name: "@hasna/skills",
|
|
23106
|
-
version: "0.
|
|
23106
|
+
version: "0.4.0",
|
|
23107
23107
|
description: "Skills library for AI coding agents",
|
|
23108
23108
|
type: "module",
|
|
23109
23109
|
bin: {
|
|
@@ -23162,8 +23162,7 @@ var package_default = {
|
|
|
23162
23162
|
"verify:release": "bun run scripts/release-guard.ts",
|
|
23163
23163
|
prepare: "bun run build:js",
|
|
23164
23164
|
prepack: "bun run build && bun run verify:release",
|
|
23165
|
-
prepublishOnly: "bun run typecheck && bun run test"
|
|
23166
|
-
postinstall: "mkdir -p $HOME/.hasna/skills/custom 2>/dev/null || true"
|
|
23165
|
+
prepublishOnly: "bun run typecheck && bun run test"
|
|
23167
23166
|
},
|
|
23168
23167
|
keywords: [
|
|
23169
23168
|
"skills",
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Command } from "commander";
|
|
2
|
+
import { createRemoteSkillsClient } from "../../lib/remote-client.js";
|
|
3
|
+
/** These commands expose the configured server's account contract, without local prices. */
|
|
4
|
+
export declare function registerRemoteAccount(parent: Command): void;
|
|
5
|
+
export declare function execute(options: {
|
|
6
|
+
json: boolean;
|
|
7
|
+
}, action: (client: NonNullable<Awaited<ReturnType<typeof createRemoteSkillsClient>>>) => Promise<unknown>): Promise<void>;
|
package/dist/index.d.ts
CHANGED
|
@@ -38,3 +38,5 @@ export type { SkillResponse, SkillDetailResponse, CategoryResponse, TagResponse,
|
|
|
38
38
|
export { STATION_SYNC_MANIFEST_SCHEMA, StationSnapshotError, sha256File, planStationSnapshot, validateStationId, writeStationSnapshot, type PortableSnapshotFile, type ScannedHome, type SnapshotPlan, type StationSnapshotErrorCode, type StationSnapshotManifestFile, type StationSnapshotOptions, type StationSnapshotResult, } from "./lib/station-snapshot.js";
|
|
39
39
|
export { STATION_HYDRATION_MANIFEST_SCHEMA, planStationHydration, writeStationHydration, type HydrationCandidate, type HydrationWinnerFile, type HydrationWinnerSkill, type StationHydrationOptions, type StationHydrationResult, } from "./lib/station-hydrate.js";
|
|
40
40
|
export { REFUSED_SCANNER_FLAGGED, SYNC_HOMES, destinationFor, homePathFor, isExcludedSkillFileName, isPortableWithinSkill, isRegularFile, walkEntries, type SyncHomeDefinition, type WalkEntry, } from "./lib/portable-snapshot-filter.js";
|
|
41
|
+
export { RemoteCreditApprovalError, type RemoteRunApproval, type RemoteRunQuote, type RemoteCreditPack } from "./lib/remote-account.js";
|
|
42
|
+
export { RemoteSkillsAuthClient, HostedApiError } from "./lib/remote-auth.js";
|