jd-skills 0.1.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 +559 -0
- package/ThirdPartyNoticeText.txt +117 -0
- package/bin/cli.mjs +14 -0
- package/dist/_chunks/config.mjs +2 -0
- package/dist/_chunks/config2.mjs +42 -0
- package/dist/_chunks/jd-cookie.mjs +3 -0
- package/dist/_chunks/jd-cookie2.mjs +109 -0
- package/dist/_chunks/libs/@clack/core.mjs +767 -0
- package/dist/_chunks/libs/@clack/prompts.mjs +334 -0
- package/dist/_chunks/libs/@kwsites/file-exists.mjs +562 -0
- package/dist/_chunks/libs/@kwsites/promise-deferred.mjs +37 -0
- package/dist/_chunks/libs/@vercel/detect-agent.mjs +138 -0
- package/dist/_chunks/libs/simple-git.mjs +3584 -0
- package/dist/_chunks/libs/xdg-basedir.mjs +14 -0
- package/dist/_chunks/rolldown-runtime.mjs +24 -0
- package/dist/cli.d.mts +1 -0
- package/dist/cli.mjs +6646 -0
- package/package.json +139 -0
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { n as __require, t as __commonJSMin } from "../../rolldown-runtime.mjs";
|
|
2
|
+
var require_dist = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
|
+
var src_exports = {};
|
|
24
|
+
__export(src_exports, {
|
|
25
|
+
KNOWN_AGENTS: () => KNOWN_AGENTS,
|
|
26
|
+
determineAgent: () => determineAgent
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(src_exports);
|
|
29
|
+
var import_promises = __require("node:fs/promises");
|
|
30
|
+
var import_node_fs = __require("node:fs");
|
|
31
|
+
const DEVIN_LOCAL_PATH = "/opt/.devin";
|
|
32
|
+
const CURSOR = "cursor";
|
|
33
|
+
const CURSOR_CLI = "cursor-cli";
|
|
34
|
+
const CLAUDE = "claude";
|
|
35
|
+
const COWORK = "cowork";
|
|
36
|
+
const DEVIN = "devin";
|
|
37
|
+
const REPLIT = "replit";
|
|
38
|
+
const GEMINI = "gemini";
|
|
39
|
+
const CODEX = "codex";
|
|
40
|
+
const ANTIGRAVITY = "antigravity";
|
|
41
|
+
const AUGMENT_CLI = "augment-cli";
|
|
42
|
+
const OPENCODE = "opencode";
|
|
43
|
+
const GITHUB_COPILOT = "github-copilot";
|
|
44
|
+
const GITHUB_COPILOT_CLI = "github-copilot-cli";
|
|
45
|
+
const V0 = "v0";
|
|
46
|
+
const KNOWN_AGENTS = {
|
|
47
|
+
CURSOR,
|
|
48
|
+
CURSOR_CLI,
|
|
49
|
+
CLAUDE,
|
|
50
|
+
COWORK,
|
|
51
|
+
DEVIN,
|
|
52
|
+
REPLIT,
|
|
53
|
+
GEMINI,
|
|
54
|
+
CODEX,
|
|
55
|
+
ANTIGRAVITY,
|
|
56
|
+
AUGMENT_CLI,
|
|
57
|
+
OPENCODE,
|
|
58
|
+
GITHUB_COPILOT,
|
|
59
|
+
V0
|
|
60
|
+
};
|
|
61
|
+
async function determineAgent() {
|
|
62
|
+
if (process.env.AI_AGENT) {
|
|
63
|
+
const name = process.env.AI_AGENT.trim();
|
|
64
|
+
if (name) {
|
|
65
|
+
if (name === GITHUB_COPILOT || name === GITHUB_COPILOT_CLI) return {
|
|
66
|
+
isAgent: true,
|
|
67
|
+
agent: { name: GITHUB_COPILOT }
|
|
68
|
+
};
|
|
69
|
+
if (name === V0) return {
|
|
70
|
+
isAgent: true,
|
|
71
|
+
agent: { name: V0 }
|
|
72
|
+
};
|
|
73
|
+
return {
|
|
74
|
+
isAgent: true,
|
|
75
|
+
agent: { name }
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
if (process.env.CURSOR_TRACE_ID) return {
|
|
80
|
+
isAgent: true,
|
|
81
|
+
agent: { name: CURSOR }
|
|
82
|
+
};
|
|
83
|
+
if (process.env.CURSOR_AGENT || process.env.CURSOR_EXTENSION_HOST_ROLE === "agent-exec") return {
|
|
84
|
+
isAgent: true,
|
|
85
|
+
agent: { name: CURSOR_CLI }
|
|
86
|
+
};
|
|
87
|
+
if (process.env.GEMINI_CLI) return {
|
|
88
|
+
isAgent: true,
|
|
89
|
+
agent: { name: GEMINI }
|
|
90
|
+
};
|
|
91
|
+
if (process.env.CODEX_SANDBOX || process.env.CODEX_CI || process.env.CODEX_THREAD_ID) return {
|
|
92
|
+
isAgent: true,
|
|
93
|
+
agent: { name: CODEX }
|
|
94
|
+
};
|
|
95
|
+
if (process.env.ANTIGRAVITY_AGENT) return {
|
|
96
|
+
isAgent: true,
|
|
97
|
+
agent: { name: ANTIGRAVITY }
|
|
98
|
+
};
|
|
99
|
+
if (process.env.AUGMENT_AGENT) return {
|
|
100
|
+
isAgent: true,
|
|
101
|
+
agent: { name: AUGMENT_CLI }
|
|
102
|
+
};
|
|
103
|
+
if (process.env.OPENCODE_CLIENT) return {
|
|
104
|
+
isAgent: true,
|
|
105
|
+
agent: { name: OPENCODE }
|
|
106
|
+
};
|
|
107
|
+
if (process.env.CLAUDECODE || process.env.CLAUDE_CODE) {
|
|
108
|
+
if (process.env.CLAUDE_CODE_IS_COWORK) return {
|
|
109
|
+
isAgent: true,
|
|
110
|
+
agent: { name: COWORK }
|
|
111
|
+
};
|
|
112
|
+
return {
|
|
113
|
+
isAgent: true,
|
|
114
|
+
agent: { name: CLAUDE }
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
if (process.env.REPL_ID) return {
|
|
118
|
+
isAgent: true,
|
|
119
|
+
agent: { name: REPLIT }
|
|
120
|
+
};
|
|
121
|
+
if (process.env.COPILOT_MODEL || process.env.COPILOT_ALLOW_ALL || process.env.COPILOT_GITHUB_TOKEN) return {
|
|
122
|
+
isAgent: true,
|
|
123
|
+
agent: { name: GITHUB_COPILOT }
|
|
124
|
+
};
|
|
125
|
+
try {
|
|
126
|
+
await (0, import_promises.access)(DEVIN_LOCAL_PATH, import_node_fs.constants.F_OK);
|
|
127
|
+
return {
|
|
128
|
+
isAgent: true,
|
|
129
|
+
agent: { name: DEVIN }
|
|
130
|
+
};
|
|
131
|
+
} catch (_error) {}
|
|
132
|
+
return {
|
|
133
|
+
isAgent: false,
|
|
134
|
+
agent: void 0
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
}));
|
|
138
|
+
export { require_dist as t };
|