spawn-cli 0.1.7__tar.gz → 0.1.8__tar.gz
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.
- {spawn_cli-0.1.7/src/spawn_cli.egg-info → spawn_cli-0.1.8}/PKG-INFO +1 -1
- {spawn_cli-0.1.7 → spawn_cli-0.1.8}/pyproject.toml +1 -1
- {spawn_cli-0.1.7 → spawn_cli-0.1.8}/src/spawn_cli/core/low_level.py +65 -4
- {spawn_cli-0.1.7 → spawn_cli-0.1.8/src/spawn_cli.egg-info}/PKG-INFO +1 -1
- {spawn_cli-0.1.7 → spawn_cli-0.1.8}/LICENSE +0 -0
- {spawn_cli-0.1.7 → spawn_cli-0.1.8}/README.md +0 -0
- {spawn_cli-0.1.7 → spawn_cli-0.1.8}/setup.cfg +0 -0
- {spawn_cli-0.1.7 → spawn_cli-0.1.8}/src/spawn_cli/__init__.py +0 -0
- {spawn_cli-0.1.7 → spawn_cli-0.1.8}/src/spawn_cli/cli.py +0 -0
- {spawn_cli-0.1.7 → spawn_cli-0.1.8}/src/spawn_cli/core/__init__.py +0 -0
- {spawn_cli-0.1.7 → spawn_cli-0.1.8}/src/spawn_cli/core/download.py +0 -0
- {spawn_cli-0.1.7 → spawn_cli-0.1.8}/src/spawn_cli/core/errors.py +0 -0
- {spawn_cli-0.1.7 → spawn_cli-0.1.8}/src/spawn_cli/core/high_level.py +0 -0
- {spawn_cli-0.1.7 → spawn_cli-0.1.8}/src/spawn_cli/core/scripts.py +0 -0
- {spawn_cli-0.1.7 → spawn_cli-0.1.8}/src/spawn_cli/errors.py +0 -0
- {spawn_cli-0.1.7 → spawn_cli-0.1.8}/src/spawn_cli/ide/__init__.py +0 -0
- {spawn_cli-0.1.7 → spawn_cli-0.1.8}/src/spawn_cli/ide/_helpers.py +0 -0
- {spawn_cli-0.1.7 → spawn_cli-0.1.8}/src/spawn_cli/ide/_stub.py +0 -0
- {spawn_cli-0.1.7 → spawn_cli-0.1.8}/src/spawn_cli/ide/_vacancy.py +0 -0
- {spawn_cli-0.1.7 → spawn_cli-0.1.8}/src/spawn_cli/ide/claude_code.py +0 -0
- {spawn_cli-0.1.7 → spawn_cli-0.1.8}/src/spawn_cli/ide/codex.py +0 -0
- {spawn_cli-0.1.7 → spawn_cli-0.1.8}/src/spawn_cli/ide/cursor.py +0 -0
- {spawn_cli-0.1.7 → spawn_cli-0.1.8}/src/spawn_cli/ide/gemini_cli.py +0 -0
- {spawn_cli-0.1.7 → spawn_cli-0.1.8}/src/spawn_cli/ide/github_copilot.py +0 -0
- {spawn_cli-0.1.7 → spawn_cli-0.1.8}/src/spawn_cli/ide/registry.py +0 -0
- {spawn_cli-0.1.7 → spawn_cli-0.1.8}/src/spawn_cli/ide/windsurf.py +0 -0
- {spawn_cli-0.1.7 → spawn_cli-0.1.8}/src/spawn_cli/io/__init__.py +0 -0
- {spawn_cli-0.1.7 → spawn_cli-0.1.8}/src/spawn_cli/io/json_io.py +0 -0
- {spawn_cli-0.1.7 → spawn_cli-0.1.8}/src/spawn_cli/io/lock.py +0 -0
- {spawn_cli-0.1.7 → spawn_cli-0.1.8}/src/spawn_cli/io/paths.py +0 -0
- {spawn_cli-0.1.7 → spawn_cli-0.1.8}/src/spawn_cli/io/text_io.py +0 -0
- {spawn_cli-0.1.7 → spawn_cli-0.1.8}/src/spawn_cli/io/toml_io.py +0 -0
- {spawn_cli-0.1.7 → spawn_cli-0.1.8}/src/spawn_cli/io/yaml_io.py +0 -0
- {spawn_cli-0.1.7 → spawn_cli-0.1.8}/src/spawn_cli/models/__init__.py +0 -0
- {spawn_cli-0.1.7 → spawn_cli-0.1.8}/src/spawn_cli/models/config.py +0 -0
- {spawn_cli-0.1.7 → spawn_cli-0.1.8}/src/spawn_cli/models/mcp.py +0 -0
- {spawn_cli-0.1.7 → spawn_cli-0.1.8}/src/spawn_cli/models/metadata.py +0 -0
- {spawn_cli-0.1.7 → spawn_cli-0.1.8}/src/spawn_cli/models/navigation.py +0 -0
- {spawn_cli-0.1.7 → spawn_cli-0.1.8}/src/spawn_cli/models/skill.py +0 -0
- {spawn_cli-0.1.7 → spawn_cli-0.1.8}/src/spawn_cli/resources/__init__.py +0 -0
- {spawn_cli-0.1.7 → spawn_cli-0.1.8}/src/spawn_cli/resources/default_core_config.yaml +0 -0
- {spawn_cli-0.1.7 → spawn_cli-0.1.8}/src/spawn_cli/warnings_display.py +0 -0
- {spawn_cli-0.1.7 → spawn_cli-0.1.8}/src/spawn_cli.egg-info/SOURCES.txt +0 -0
- {spawn_cli-0.1.7 → spawn_cli-0.1.8}/src/spawn_cli.egg-info/dependency_links.txt +0 -0
- {spawn_cli-0.1.7 → spawn_cli-0.1.8}/src/spawn_cli.egg-info/entry_points.txt +0 -0
- {spawn_cli-0.1.7 → spawn_cli-0.1.8}/src/spawn_cli.egg-info/requires.txt +0 -0
- {spawn_cli-0.1.7 → spawn_cli-0.1.8}/src/spawn_cli.egg-info/top_level.txt +0 -0
- {spawn_cli-0.1.7 → spawn_cli-0.1.8}/tests/test_cli.py +0 -0
- {spawn_cli-0.1.7 → spawn_cli-0.1.8}/tests/test_warnings_display.py +0 -0
|
@@ -294,14 +294,59 @@ def _norm_read_path(path_str: str) -> str:
|
|
|
294
294
|
return Path(path_str).as_posix().replace("\\", "/")
|
|
295
295
|
|
|
296
296
|
|
|
297
|
+
def _navigation_rules_refs_from_section(section: Any) -> list[SkillFileRef]:
|
|
298
|
+
out: list[SkillFileRef] = []
|
|
299
|
+
if not isinstance(section, list):
|
|
300
|
+
return out
|
|
301
|
+
for grp in section:
|
|
302
|
+
if not isinstance(grp, dict):
|
|
303
|
+
continue
|
|
304
|
+
rules_raw = grp.get("rules")
|
|
305
|
+
if not isinstance(rules_raw, list):
|
|
306
|
+
continue
|
|
307
|
+
for entry in rules_raw:
|
|
308
|
+
if not isinstance(entry, dict):
|
|
309
|
+
continue
|
|
310
|
+
path_raw = entry.get("path")
|
|
311
|
+
if not isinstance(path_raw, str) or not path_raw.strip():
|
|
312
|
+
continue
|
|
313
|
+
desc_raw = entry.get("description")
|
|
314
|
+
desc = "" if desc_raw is None else str(desc_raw)
|
|
315
|
+
out.append(SkillFileRef(file=path_raw.strip(), description=desc))
|
|
316
|
+
return out
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
def _navigation_yaml_rules_refs(target_root: Path) -> tuple[list[SkillFileRef], list[SkillFileRef]]:
|
|
320
|
+
"""Return (read-required rules, read-contextual rules) from merged navigation.yaml."""
|
|
321
|
+
path = _spawn(target_root) / "navigation.yaml"
|
|
322
|
+
raw = load_yaml(path)
|
|
323
|
+
if not isinstance(raw, dict):
|
|
324
|
+
return [], []
|
|
325
|
+
rr = raw.get("read-required")
|
|
326
|
+
cq = raw.get("read-contextual")
|
|
327
|
+
return (
|
|
328
|
+
_navigation_rules_refs_from_section(rr if isinstance(rr, list) else []),
|
|
329
|
+
_navigation_rules_refs_from_section(cq if isinstance(cq, list) else []),
|
|
330
|
+
)
|
|
331
|
+
|
|
332
|
+
|
|
297
333
|
def _required_read_description_for_path(
|
|
298
|
-
p: str,
|
|
334
|
+
p: str,
|
|
335
|
+
merged_global: list[SkillFileRef],
|
|
336
|
+
local_req: list[SkillFileRef],
|
|
337
|
+
cfg_ext: ExtensionConfig,
|
|
338
|
+
nav_rules_required: list[SkillFileRef] | None = None,
|
|
299
339
|
) -> str:
|
|
340
|
+
nk = _norm_read_path(p)
|
|
341
|
+
if nav_rules_required:
|
|
342
|
+
for r in nav_rules_required:
|
|
343
|
+
if _norm_read_path(r.file) == nk and r.description:
|
|
344
|
+
return r.description
|
|
300
345
|
for r in merged_global:
|
|
301
|
-
if r.file ==
|
|
346
|
+
if _norm_read_path(r.file) == nk and r.description:
|
|
302
347
|
return r.description
|
|
303
348
|
for r in local_req:
|
|
304
|
-
if r.file ==
|
|
349
|
+
if _norm_read_path(r.file) == nk and r.description:
|
|
305
350
|
return r.description
|
|
306
351
|
return _describe_path(cfg_ext, p)
|
|
307
352
|
|
|
@@ -314,6 +359,7 @@ def generate_skills_metadata(target_root: Path, extension: str) -> list[SkillMet
|
|
|
314
359
|
merged_global_auto = _flatten_global_refs_ordered(target_root, get_auto_read_global_all(target_root))
|
|
315
360
|
local_required = get_required_read_ext_local(target_root, extension)
|
|
316
361
|
local_auto = get_auto_read_local(target_root, extension)
|
|
362
|
+
nav_rules_required, nav_rules_contextual = _navigation_yaml_rules_refs(target_root)
|
|
317
363
|
|
|
318
364
|
metas: list[SkillMetadata] = []
|
|
319
365
|
for skill_path in list_skills(target_root, extension):
|
|
@@ -331,10 +377,19 @@ def generate_skills_metadata(target_root: Path, extension: str) -> list[SkillMet
|
|
|
331
377
|
continue
|
|
332
378
|
seen_norm.add(nk)
|
|
333
379
|
required_paths.append(fp)
|
|
380
|
+
for ref in nav_rules_required:
|
|
381
|
+
nk = _norm_read_path(ref.file)
|
|
382
|
+
if nk in seen_norm:
|
|
383
|
+
continue
|
|
384
|
+
seen_norm.add(nk)
|
|
385
|
+
required_paths.append(ref.file)
|
|
386
|
+
|
|
334
387
|
required_out = [
|
|
335
388
|
SkillFileRef(
|
|
336
389
|
file=p,
|
|
337
|
-
description=_required_read_description_for_path(
|
|
390
|
+
description=_required_read_description_for_path(
|
|
391
|
+
p, merged_global_required, local_required, cfg_ext, nav_rules_required
|
|
392
|
+
),
|
|
338
393
|
)
|
|
339
394
|
for p in required_paths
|
|
340
395
|
]
|
|
@@ -355,6 +410,12 @@ def generate_skills_metadata(target_root: Path, extension: str) -> list[SkillMet
|
|
|
355
410
|
continue
|
|
356
411
|
seen_auto.add(key)
|
|
357
412
|
auto_out.append(ar)
|
|
413
|
+
for ar in nav_rules_contextual:
|
|
414
|
+
key = _norm_read_path(ar.file)
|
|
415
|
+
if key in required_key_set or key in seen_auto:
|
|
416
|
+
continue
|
|
417
|
+
seen_auto.add(key)
|
|
418
|
+
auto_out.append(ar)
|
|
358
419
|
|
|
359
420
|
metas.append(
|
|
360
421
|
SkillMetadata(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|