agentwheel 0.19.10 → 0.20.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.
@@ -0,0 +1,34 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ pathExists
4
+ } from "./chunk-7VPI5J5Y.js";
5
+
6
+ // src/source/identify.ts
7
+ import { homedir } from "os";
8
+ import { resolve } from "path";
9
+ function inferSourceDriverName(source) {
10
+ if (source.startsWith("clawhub:")) return "clawhub";
11
+ if (source.startsWith("mcp-registry:")) return "mcp-registry";
12
+ if (source.startsWith("skillkit:")) return "skillkit";
13
+ if (source.startsWith("vercel:")) return "vercel-skills";
14
+ return source.startsWith("github:") || source.startsWith("git:") ? "git" : "local";
15
+ }
16
+ async function isExplicitSource(source) {
17
+ if (source.startsWith("github:") || source.startsWith("git:") || source.startsWith("skillkit:") || source.startsWith("vercel:") || source.startsWith("mcp-registry:") || source.startsWith("clawhub:")) {
18
+ return true;
19
+ }
20
+ if (source === "." || source === ".." || source.startsWith("./") || source.startsWith("../") || source.startsWith("/") || source.startsWith("~/")) {
21
+ return true;
22
+ }
23
+ return pathExists(resolveLocalPath(source));
24
+ }
25
+ function resolveLocalPath(source) {
26
+ if (source === "~") return homedir();
27
+ if (source.startsWith("~/")) return resolve(homedir(), source.slice(2));
28
+ return resolve(source);
29
+ }
30
+
31
+ export {
32
+ inferSourceDriverName,
33
+ isExplicitSource
34
+ };
@@ -2,7 +2,8 @@
2
2
  import {
3
3
  inferSourceDriverName,
4
4
  isExplicitSource
5
- } from "./chunk-UQLRZV5W.js";
5
+ } from "./chunk-EMDIG24I.js";
6
+ import "./chunk-7VPI5J5Y.js";
6
7
  export {
7
8
  inferSourceDriverName,
8
9
  isExplicitSource