@serviceme/devtools-core 0.1.8 → 0.2.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/dist/auth.d.mts +590 -0
- package/dist/auth.d.ts +590 -0
- package/dist/auth.js +842 -0
- package/dist/auth.js.map +1 -0
- package/dist/auth.mjs +804 -0
- package/dist/auth.mjs.map +1 -0
- package/dist/device.d.mts +456 -0
- package/dist/device.d.ts +456 -0
- package/dist/device.js +696 -0
- package/dist/device.js.map +1 -0
- package/dist/device.mjs +647 -0
- package/dist/device.mjs.map +1 -0
- package/dist/index-CrNC-aao.d.ts +277 -0
- package/dist/index-Dmyy4urr.d.mts +277 -0
- package/dist/index.d.mts +1372 -27
- package/dist/index.d.ts +1372 -27
- package/dist/index.js +5125 -888
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +5022 -906
- package/dist/index.mjs.map +1 -0
- package/dist/skill-linker.d.mts +188 -0
- package/dist/skill-linker.d.ts +188 -0
- package/dist/skill-linker.js +374 -0
- package/dist/skill-linker.js.map +1 -0
- package/dist/skill-linker.mjs +330 -0
- package/dist/skill-linker.mjs.map +1 -0
- package/dist/skill-store.d.mts +35 -0
- package/dist/skill-store.d.ts +35 -0
- package/dist/skill-store.js +291 -0
- package/dist/skill-store.js.map +1 -0
- package/dist/skill-store.mjs +254 -0
- package/dist/skill-store.mjs.map +1 -0
- package/dist/submit.d.mts +3 -0
- package/dist/submit.d.ts +3 -0
- package/dist/submit.js +166 -0
- package/dist/submit.js.map +1 -0
- package/dist/submit.mjs +130 -0
- package/dist/submit.mjs.map +1 -0
- package/dist/toolbox.d.mts +240 -0
- package/dist/toolbox.d.ts +240 -0
- package/dist/toolbox.js +530 -0
- package/dist/toolbox.js.map +1 -0
- package/dist/toolbox.mjs +482 -0
- package/dist/toolbox.mjs.map +1 -0
- package/dist/types-B9gk3dXH.d.mts +62 -0
- package/dist/types-B9gk3dXH.d.ts +62 -0
- package/package.json +50 -5
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skill & Agent v2 — SkillStore Types
|
|
3
|
+
*
|
|
4
|
+
* SkillStore scans the local `~/.serviceme/repos/<id>/` tree to produce
|
|
5
|
+
* a unified list of skills + agents. The store is the single source of
|
|
6
|
+
* truth for "what's available right now" — the UI reads it; SubmitClient
|
|
7
|
+
* reads it; install flows read it.
|
|
8
|
+
*
|
|
9
|
+
* Three repo layouts are supported in v1 (per spec §12):
|
|
10
|
+
* 1. **Default** (`medalsoftchina-ms-skills`): `skills/<name>/SKILL.md`
|
|
11
|
+
* + `agents/<name>/AGENT.md`.
|
|
12
|
+
* 2. **Anthropic-style flat** (`anthropics/skills`): each subdir of
|
|
13
|
+
* the repo root IS a skill — `<name>/SKILL.md` (no `skills/`
|
|
14
|
+
* intermediate).
|
|
15
|
+
* 3. **awesome-copilot style** (`github/awesome-copilot`): mixed
|
|
16
|
+
* prompts/instructions/agents at the root.
|
|
17
|
+
*
|
|
18
|
+
* Normalization rule (spec §12): for every directory under the repo
|
|
19
|
+
* root, peek for a `SKILL.md` or `AGENT.md` file. If present, register
|
|
20
|
+
* it as a skill or agent respectively. This is more permissive than
|
|
21
|
+
* guessing from the directory name and works for all three styles.
|
|
22
|
+
*
|
|
23
|
+
* The store is local-only and pure — no git, no network. Tests
|
|
24
|
+
* construct a fixture repo tree and pass the root in directly.
|
|
25
|
+
*/
|
|
26
|
+
/** What's available at this entry: a skill or an agent. */
|
|
27
|
+
type SkillKind = "skill" | "agent";
|
|
28
|
+
/** Top-level summary of a discovered skill/agent entry. */
|
|
29
|
+
interface SkillEntry {
|
|
30
|
+
/** Repository the entry was found in. */
|
|
31
|
+
repoId: string;
|
|
32
|
+
/** Skill or agent name (the directory name under the repo). */
|
|
33
|
+
name: string;
|
|
34
|
+
kind: SkillKind;
|
|
35
|
+
/** Absolute path to the SKILL.md / AGENT.md file. */
|
|
36
|
+
manifestPath: string;
|
|
37
|
+
/** Absolute path to the directory containing the entry's files. */
|
|
38
|
+
dir: string;
|
|
39
|
+
/** Parsed frontmatter (best-effort; raw key/value map). */
|
|
40
|
+
frontmatter: Record<string, unknown>;
|
|
41
|
+
/** ISO timestamp of the manifest file's mtime. */
|
|
42
|
+
modifiedAt: string;
|
|
43
|
+
}
|
|
44
|
+
/** Full detail of an entry: summary + all the files inside the dir. */
|
|
45
|
+
interface SkillDetail extends SkillEntry {
|
|
46
|
+
files: SkillFile[];
|
|
47
|
+
}
|
|
48
|
+
/** A single file inside a skill / agent directory. */
|
|
49
|
+
interface SkillFile {
|
|
50
|
+
/** Path relative to the entry's directory. */
|
|
51
|
+
path: string;
|
|
52
|
+
/** UTF-8 content. */
|
|
53
|
+
content: string;
|
|
54
|
+
}
|
|
55
|
+
/** Sentinel error for store lookups that miss. */
|
|
56
|
+
declare class SkillNotFoundError extends Error {
|
|
57
|
+
readonly repoId: string;
|
|
58
|
+
readonly skillName: string;
|
|
59
|
+
constructor(repoId: string, skillName: string);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export { type SkillEntry as S, type SkillDetail as a, type SkillFile as b, type SkillKind as c, SkillNotFoundError as d };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@serviceme/devtools-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Reusable Node.js core capabilities powering the SERVICEME CLI and integrations.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"repository": {
|
|
@@ -23,6 +23,50 @@
|
|
|
23
23
|
"main": "dist/index.js",
|
|
24
24
|
"module": "dist/index.mjs",
|
|
25
25
|
"types": "dist/index.d.ts",
|
|
26
|
+
"exports": {
|
|
27
|
+
".": {
|
|
28
|
+
"types": "./dist/index.d.ts",
|
|
29
|
+
"import": "./dist/index.mjs",
|
|
30
|
+
"require": "./dist/index.js",
|
|
31
|
+
"default": "./dist/index.js"
|
|
32
|
+
},
|
|
33
|
+
"./skill-store": {
|
|
34
|
+
"types": "./dist/skill-store.d.ts",
|
|
35
|
+
"import": "./dist/skill-store.mjs",
|
|
36
|
+
"require": "./dist/skill-store.js",
|
|
37
|
+
"default": "./dist/skill-store.js"
|
|
38
|
+
},
|
|
39
|
+
"./skill-linker": {
|
|
40
|
+
"types": "./dist/skill-linker.d.ts",
|
|
41
|
+
"import": "./dist/skill-linker.mjs",
|
|
42
|
+
"require": "./dist/skill-linker.js",
|
|
43
|
+
"default": "./dist/skill-linker.js"
|
|
44
|
+
},
|
|
45
|
+
"./submit": {
|
|
46
|
+
"types": "./dist/submit.d.ts",
|
|
47
|
+
"import": "./dist/submit.mjs",
|
|
48
|
+
"require": "./dist/submit.js",
|
|
49
|
+
"default": "./dist/submit.js"
|
|
50
|
+
},
|
|
51
|
+
"./auth": {
|
|
52
|
+
"types": "./dist/auth.d.ts",
|
|
53
|
+
"import": "./dist/auth.mjs",
|
|
54
|
+
"require": "./dist/auth.js",
|
|
55
|
+
"default": "./dist/auth.js"
|
|
56
|
+
},
|
|
57
|
+
"./device": {
|
|
58
|
+
"types": "./dist/device.d.ts",
|
|
59
|
+
"import": "./dist/device.mjs",
|
|
60
|
+
"require": "./dist/device.js",
|
|
61
|
+
"default": "./dist/device.js"
|
|
62
|
+
},
|
|
63
|
+
"./toolbox": {
|
|
64
|
+
"types": "./dist/toolbox.d.ts",
|
|
65
|
+
"import": "./dist/toolbox.mjs",
|
|
66
|
+
"require": "./dist/toolbox.js",
|
|
67
|
+
"default": "./dist/toolbox.js"
|
|
68
|
+
}
|
|
69
|
+
},
|
|
26
70
|
"files": [
|
|
27
71
|
"dist",
|
|
28
72
|
"README.md",
|
|
@@ -36,7 +80,8 @@
|
|
|
36
80
|
"comment-json": "^4.5.1",
|
|
37
81
|
"json5": "^2.2.3",
|
|
38
82
|
"yauzl": "^3.2.0",
|
|
39
|
-
"
|
|
83
|
+
"zod": "^3.23.8",
|
|
84
|
+
"@serviceme/devtools-protocol": "0.2.0"
|
|
40
85
|
},
|
|
41
86
|
"devDependencies": {
|
|
42
87
|
"@types/node": "^24",
|
|
@@ -46,11 +91,11 @@
|
|
|
46
91
|
"typescript": "^5.9.3"
|
|
47
92
|
},
|
|
48
93
|
"scripts": {
|
|
49
|
-
"watch": "tsup
|
|
94
|
+
"watch": "tsup --watch",
|
|
50
95
|
"lint": "biome check src test",
|
|
51
|
-
"build": "tsup
|
|
96
|
+
"build": "tsup",
|
|
52
97
|
"typecheck": "tsc --noEmit",
|
|
53
|
-
"test": "pnpm run build && node --test test/**/*.test.js && node --import tsx --test src/**/__tests__/**/*.test.ts",
|
|
98
|
+
"test": "pnpm run build && node --test test/**/*.test.js && node --import tsx --test --test-force-exit src/**/__tests__/**/*.test.ts",
|
|
54
99
|
"release:check": "pnpm run build && npm pack --dry-run",
|
|
55
100
|
"pack": "npm pack",
|
|
56
101
|
"publish:npm": "pnpm publish --access public --no-git-checks"
|