@hasna/skills 0.1.72 → 0.2.1
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 +4 -2
- package/bin/index.js +29419 -18305
- package/bin/mcp.js +13798 -3053
- package/bin/migrate.js +114 -62
- package/bin/server.js +3517 -3015
- package/bin/worker.js +1788 -1513
- package/dist/admin-contract.d.ts +887 -5832
- package/dist/admin-contract.js +13914 -3611
- package/dist/cli/commands/install.d.ts +16 -0
- package/dist/cli/commands/publish.d.ts +49 -0
- package/dist/cli/commands/registry.d.ts +5 -0
- package/dist/index.js +14654 -4123
- package/dist/lib/app-home.d.ts +27 -1
- package/dist/lib/feedback.d.ts +6 -0
- package/dist/lib/installer.d.ts +2 -0
- package/dist/lib/portable-skills-files.d.ts +9 -0
- package/dist/lib/portable-skills.d.ts +2 -2
- package/dist/lib/pull.d.ts +18 -1
- package/dist/lib/remote-client.d.ts +15 -1
- package/dist/lib/skill-version.d.ts +11 -0
- package/dist/sdk/index.js +20030 -9222
- package/dist/sdk/runs.d.ts +19 -101
- package/dist/server/app.d.ts +3 -0
- package/dist/server/artifact-storage.d.ts +38 -0
- package/dist/server/config.d.ts +2 -0
- package/dist/server/rows.d.ts +2 -1
- package/dist/server/seed-bundled.d.ts +20 -0
- package/dist/server/skills-api.d.ts +31 -3
- package/dist/server/sqlite-store.d.ts +3 -1
- package/dist/server/store.d.ts +6 -1
- package/dist/server/types.d.ts +43 -0
- package/dist/storage.js +62 -61
- package/migrations/postgres/0006_skill_versions.sql +30 -0
- package/migrations/sqlite/0006_skill_versions.sql +17 -0
- package/package.json +2 -3
|
@@ -2,4 +2,20 @@
|
|
|
2
2
|
* pin / unpin / update — project skill preference commands
|
|
3
3
|
*/
|
|
4
4
|
import type { Command } from "commander";
|
|
5
|
+
import { type InstallResult } from "../../lib/installer.js";
|
|
5
6
|
export declare function registerInstall(parent: Command): void;
|
|
7
|
+
/**
|
|
8
|
+
* `skills pin name@version` (hasna/apps#1630): the exact version is FETCHED, digest-verified,
|
|
9
|
+
* and written to the machine corpus before the pin is recorded, so the project pin names a
|
|
10
|
+
* version this machine actually holds. Without an instance there is nothing to fetch from,
|
|
11
|
+
* and a pin that claims a version it never saw is refused rather than written.
|
|
12
|
+
*/
|
|
13
|
+
export declare function pinExactVersion(name: string, version: string, options: {
|
|
14
|
+
useRemote: boolean;
|
|
15
|
+
overwrite: boolean;
|
|
16
|
+
pull?: (spec: string) => Promise<{
|
|
17
|
+
success: boolean;
|
|
18
|
+
version?: string;
|
|
19
|
+
error?: string;
|
|
20
|
+
}>;
|
|
21
|
+
}): Promise<InstallResult>;
|
|
@@ -5,6 +5,11 @@ export interface PushSkillOptions {
|
|
|
5
5
|
dryRun?: boolean;
|
|
6
6
|
json?: boolean;
|
|
7
7
|
version?: string;
|
|
8
|
+
/**
|
|
9
|
+
* When the instance already holds this name@version with different content, publish under
|
|
10
|
+
* the next patch version instead of failing (hasna/apps#1630).
|
|
11
|
+
*/
|
|
12
|
+
forceNewVersion?: boolean;
|
|
8
13
|
client?: RemoteSkillsClient | null;
|
|
9
14
|
/** Overrides the corpus location. Tests only. */
|
|
10
15
|
rootDir?: string;
|
|
@@ -22,6 +27,16 @@ export interface PushSkillResult {
|
|
|
22
27
|
published: boolean;
|
|
23
28
|
status?: number;
|
|
24
29
|
response?: unknown;
|
|
30
|
+
/** The version the instance recorded (after any --force-new-version bump). */
|
|
31
|
+
version?: string;
|
|
32
|
+
/**
|
|
33
|
+
* True when the publish was idempotent: the version this push ended on already
|
|
34
|
+
* existed on the instance with these exact bytes, so nothing new was recorded
|
|
35
|
+
* (hasna/apps#1671). Distinct from a fresh "published as X".
|
|
36
|
+
*/
|
|
37
|
+
alreadyPublished?: boolean;
|
|
38
|
+
/** Per-file digests and provenance sent alongside the bundle. */
|
|
39
|
+
manifest?: SkillVersionManifest;
|
|
25
40
|
}
|
|
26
41
|
export declare class PushSkillError extends Error {
|
|
27
42
|
readonly detail?: string[] | undefined;
|
|
@@ -29,4 +44,38 @@ export declare class PushSkillError extends Error {
|
|
|
29
44
|
}
|
|
30
45
|
export declare function registerPublish(parent: Command): void;
|
|
31
46
|
export declare function pushSkill(name: string, options?: PushSkillOptions): Promise<PushSkillResult>;
|
|
47
|
+
/** 1.2.3 -> 1.2.4; anything non-semver gets a numeric suffix so the bump is still unique. */
|
|
48
|
+
export declare function bumpPatch(version: string): string;
|
|
49
|
+
export interface SkillVersionManifest {
|
|
50
|
+
files: Array<{
|
|
51
|
+
path: string;
|
|
52
|
+
sha256: string;
|
|
53
|
+
byteSize: number;
|
|
54
|
+
}>;
|
|
55
|
+
fileCount: number;
|
|
56
|
+
unpackedByteSize: number;
|
|
57
|
+
bundleSha256: string;
|
|
58
|
+
provenance: {
|
|
59
|
+
machine: string;
|
|
60
|
+
agent: string | null;
|
|
61
|
+
cliVersion: string;
|
|
62
|
+
gitRemote: string | null;
|
|
63
|
+
gitSha: string | null;
|
|
64
|
+
packedAt: string;
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* What travels beside the bundle as manifest.json (hasna/apps#1630): a digest per file so a
|
|
69
|
+
* pull can be checked file by file, and where the bytes came from. No secrets, no absolute
|
|
70
|
+
* paths beyond the machine name.
|
|
71
|
+
*/
|
|
72
|
+
export declare function buildVersionManifest(skillDir: string, packed: PackedSkillBundle): SkillVersionManifest;
|
|
73
|
+
/**
|
|
74
|
+
* Strip userinfo (username/password) from a git remote URL before it is recorded in a
|
|
75
|
+
* version manifest. Only URL schemes where userinfo is HTTP-style credentials are
|
|
76
|
+
* stripped: an ssh login user (`ssh://git@host/...`, or scp-style `git@host:path`,
|
|
77
|
+
* which never parses as a URL) is the transport user, not an embedded credential, and
|
|
78
|
+
* passes through unchanged.
|
|
79
|
+
*/
|
|
80
|
+
export declare function sanitizeGitRemote(url: string | null): string | null;
|
|
32
81
|
export type { PackedSkillBundle };
|
|
@@ -8,3 +8,8 @@ export declare function registerRegistry(parent: Command): void;
|
|
|
8
8
|
* step.
|
|
9
9
|
*/
|
|
10
10
|
export declare function registerPull(parent: Command): void;
|
|
11
|
+
/**
|
|
12
|
+
* `skills versions <name>` — every immutable published version of a skill on the configured
|
|
13
|
+
* instance, newest first, with the one the instance currently serves marked (hasna/apps#1630).
|
|
14
|
+
*/
|
|
15
|
+
export declare function registerVersions(parent: Command): void;
|