devlyn-cli 0.5.5 → 0.5.8
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/agents-config/evaluator.md +40 -0
- package/bin/devlyn.js +160 -4
- package/config/commands/devlyn.evaluate.md +467 -0
- package/optional-skills/dokkit/ANALYSIS.md +32 -1
- package/optional-skills/dokkit/COMMANDS.md +20 -13
- package/optional-skills/dokkit/FILLING.md +19 -0
- package/optional-skills/dokkit/IMAGE-SOURCING.md +2 -2
- package/optional-skills/dokkit/PIPELINE.md +348 -0
- package/optional-skills/dokkit/SKILL.md +169 -111
- package/optional-skills/dokkit/references/docx-section-range-detection.md +147 -0
- package/optional-skills/dokkit/references/image-opportunity-heuristics.md +1 -1
- package/optional-skills/dokkit/scripts/fill_docx.py +819 -0
- package/optional-skills/dokkit/scripts/parse_image_with_gemini.py +3 -3
- package/optional-skills/dokkit/scripts/source_images.py +40 -2
- package/package.json +2 -1
|
@@ -60,7 +60,7 @@ def parse_image(file_path: str, project_dir: str = ".") -> dict:
|
|
|
60
60
|
mime_type = mime_map.get(ext, "image/png")
|
|
61
61
|
|
|
62
62
|
# Call Gemini Vision
|
|
63
|
-
url =
|
|
63
|
+
url = "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent"
|
|
64
64
|
|
|
65
65
|
payload = {
|
|
66
66
|
"contents": [{
|
|
@@ -79,9 +79,9 @@ def parse_image(file_path: str, project_dir: str = ".") -> dict:
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
req = urllib.request.Request(
|
|
82
|
-
url,
|
|
82
|
+
f"{url}?key={api_key}",
|
|
83
83
|
data=json.dumps(payload).encode("utf-8"),
|
|
84
|
-
headers={"Content-Type": "application/json"
|
|
84
|
+
headers={"Content-Type": "application/json"},
|
|
85
85
|
method="POST",
|
|
86
86
|
)
|
|
87
87
|
|
|
@@ -23,9 +23,18 @@ Language options (--lang):
|
|
|
23
23
|
<code> Any ISO 639-1 language code.
|
|
24
24
|
<a>+<b> Mixed: primary language + secondary language.
|
|
25
25
|
|
|
26
|
+
python source_images.py generate \\
|
|
27
|
+
--prompt "인포그래픽 제목: AI 감정 케어 플랫폼" \\
|
|
28
|
+
--preset infographic \\
|
|
29
|
+
--output-dir .dokkit/images/ \\
|
|
30
|
+
--project-dir . \\
|
|
31
|
+
--field-id field_014 \\
|
|
32
|
+
--purpose "스마트 관광용 AR앱 활용"
|
|
33
|
+
|
|
26
34
|
Output:
|
|
27
35
|
Prints __RESULT__ JSON to stdout:
|
|
28
|
-
{"image_id": "...", "file_path": "...", "source_type": "generated"|"searched"
|
|
36
|
+
{"image_id": "...", "file_path": "...", "source_type": "generated"|"searched",
|
|
37
|
+
"field_id": "...", "purpose": "..."}
|
|
29
38
|
|
|
30
39
|
Requires:
|
|
31
40
|
GEMINI_API_KEY in .env or environment variables.
|
|
@@ -249,15 +258,17 @@ def generate_image(
|
|
|
249
258
|
with open(file_path, "wb") as f:
|
|
250
259
|
f.write(img_bytes)
|
|
251
260
|
|
|
252
|
-
|
|
261
|
+
result = {
|
|
253
262
|
"image_id": image_id,
|
|
254
263
|
"file_path": str(file_path),
|
|
255
264
|
"source_type": "generated",
|
|
256
265
|
"file_size": len(img_bytes),
|
|
257
266
|
"lang": lang,
|
|
258
267
|
"preset": preset,
|
|
268
|
+
"prompt": prompt,
|
|
259
269
|
"model": IMAGE_MODEL,
|
|
260
270
|
}
|
|
271
|
+
return result
|
|
261
272
|
|
|
262
273
|
return {"error": "No image data in Gemini response"}
|
|
263
274
|
|
|
@@ -308,6 +319,12 @@ def parse_args(argv: list) -> dict:
|
|
|
308
319
|
elif arg == "--query" and i + 1 < len(argv):
|
|
309
320
|
args["query"] = argv[i + 1]
|
|
310
321
|
i += 2
|
|
322
|
+
elif arg == "--field-id" and i + 1 < len(argv):
|
|
323
|
+
args["field_id"] = argv[i + 1]
|
|
324
|
+
i += 2
|
|
325
|
+
elif arg == "--purpose" and i + 1 < len(argv):
|
|
326
|
+
args["purpose"] = argv[i + 1]
|
|
327
|
+
i += 2
|
|
311
328
|
elif arg == "--no-enhance":
|
|
312
329
|
args["no_enhance"] = True
|
|
313
330
|
i += 1
|
|
@@ -342,6 +359,27 @@ def main():
|
|
|
342
359
|
no_enhance=args.get("no_enhance", False),
|
|
343
360
|
)
|
|
344
361
|
|
|
362
|
+
# Attach field_id and purpose if provided
|
|
363
|
+
if "field_id" in args:
|
|
364
|
+
result["field_id"] = args["field_id"]
|
|
365
|
+
if "purpose" in args:
|
|
366
|
+
result["purpose"] = args["purpose"]
|
|
367
|
+
|
|
368
|
+
# Append to image manifest for tracking
|
|
369
|
+
if "error" not in result:
|
|
370
|
+
output_dir = args.get("output_dir", ".dokkit/images/")
|
|
371
|
+
manifest_path = Path(output_dir).parent / "image_manifest.json"
|
|
372
|
+
manifest = []
|
|
373
|
+
if manifest_path.exists():
|
|
374
|
+
try:
|
|
375
|
+
with open(manifest_path, "r", encoding="utf-8") as mf:
|
|
376
|
+
manifest = json.load(mf)
|
|
377
|
+
except (json.JSONDecodeError, IOError):
|
|
378
|
+
manifest = []
|
|
379
|
+
manifest.append(result)
|
|
380
|
+
with open(manifest_path, "w", encoding="utf-8") as mf:
|
|
381
|
+
json.dump(manifest, mf, ensure_ascii=False, indent=2)
|
|
382
|
+
|
|
345
383
|
elif command == "search":
|
|
346
384
|
query = args.get("query")
|
|
347
385
|
if not query:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "devlyn-cli",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.8",
|
|
4
4
|
"description": "Claude Code configuration toolkit for teams",
|
|
5
5
|
"bin": {
|
|
6
6
|
"devlyn": "bin/devlyn.js"
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
"files": [
|
|
9
9
|
"bin",
|
|
10
10
|
"config",
|
|
11
|
+
"agents-config",
|
|
11
12
|
"optional-commands",
|
|
12
13
|
"optional-skills",
|
|
13
14
|
"CLAUDE.md"
|