skillshuttle 1.0.0__py3-none-any.whl

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.
Files changed (53) hide show
  1. agent_skill_manager/__init__.py +12 -0
  2. agent_skill_manager/__main__.py +5 -0
  3. agent_skill_manager/completion/__init__.py +25 -0
  4. agent_skill_manager/completion/_askill +112 -0
  5. agent_skill_manager/completion/askill.bash +105 -0
  6. agent_skill_manager/completion/askill.fish +94 -0
  7. agent_skill_manager/config/__init__.py +4 -0
  8. agent_skill_manager/config/products.py +238 -0
  9. agent_skill_manager/controllers/__init__.py +4 -0
  10. agent_skill_manager/controllers/cli.py +1344 -0
  11. agent_skill_manager/controllers/parsers/__init__.py +77 -0
  12. agent_skill_manager/controllers/parsers/authoring.py +109 -0
  13. agent_skill_manager/controllers/parsers/distribution.py +168 -0
  14. agent_skill_manager/controllers/parsers/operations.py +108 -0
  15. agent_skill_manager/models/__init__.py +11 -0
  16. agent_skill_manager/models/product.py +30 -0
  17. agent_skill_manager/models/report.py +62 -0
  18. agent_skill_manager/services/__init__.py +4 -0
  19. agent_skill_manager/services/audit.py +441 -0
  20. agent_skill_manager/services/auto_adopt.py +238 -0
  21. agent_skill_manager/services/ci_format.py +100 -0
  22. agent_skill_manager/services/doctor.py +305 -0
  23. agent_skill_manager/services/drift.py +88 -0
  24. agent_skill_manager/services/get.py +160 -0
  25. agent_skill_manager/services/inventory.py +37 -0
  26. agent_skill_manager/services/manifest.py +167 -0
  27. agent_skill_manager/services/overlap.py +112 -0
  28. agent_skill_manager/services/paths_export.py +204 -0
  29. agent_skill_manager/services/publish.py +298 -0
  30. agent_skill_manager/services/registry.py +124 -0
  31. agent_skill_manager/services/remediation.py +145 -0
  32. agent_skill_manager/services/scaffold.py +191 -0
  33. agent_skill_manager/services/sources.py +261 -0
  34. agent_skill_manager/services/spec.py +188 -0
  35. agent_skill_manager/services/sync/__init__.py +35 -0
  36. agent_skill_manager/services/sync/adopt.py +174 -0
  37. agent_skill_manager/services/sync/audit_report.py +128 -0
  38. agent_skill_manager/services/sync/engine.py +510 -0
  39. agent_skill_manager/services/sync/install.py +411 -0
  40. agent_skill_manager/services/sync/pack.py +43 -0
  41. agent_skill_manager/services/sync/settings_io.py +110 -0
  42. agent_skill_manager/services/upgrade.py +205 -0
  43. agent_skill_manager/services/watch.py +473 -0
  44. agent_skill_manager/services/welcome.py +49 -0
  45. agent_skill_manager/utils/__init__.py +4 -0
  46. agent_skill_manager/utils/filesystem.py +219 -0
  47. agent_skill_manager/utils/watcher.py +607 -0
  48. skillshuttle-1.0.0.dist-info/METADATA +552 -0
  49. skillshuttle-1.0.0.dist-info/RECORD +53 -0
  50. skillshuttle-1.0.0.dist-info/WHEEL +5 -0
  51. skillshuttle-1.0.0.dist-info/entry_points.txt +3 -0
  52. skillshuttle-1.0.0.dist-info/licenses/LICENSE +21 -0
  53. skillshuttle-1.0.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,77 @@
1
+ """argparse command tree for ``askill`` (split out of the CLI in P2-12).
2
+
3
+ Every subcommand lives in one of three command-family modules; this package
4
+ assembles them **in the original registration order** so ``--help`` output and
5
+ every flag/positional stay byte-compatible with the monolithic parser. The
6
+ CLI keeps ``_build_parser()`` as its single entry point for introspection.
7
+ """
8
+
9
+ from __future__ import annotations
10
+
11
+ import argparse
12
+
13
+ from . import authoring, distribution, operations
14
+
15
+ __all__ = ["build_parser"]
16
+
17
+
18
+ def build_parser(product_count: int) -> argparse.ArgumentParser:
19
+ parser = argparse.ArgumentParser(
20
+ prog="askill",
21
+ description=(
22
+ "Skillshuttle - Cross-platform skill management for "
23
+ f"{product_count} domestic AI agent products."
24
+ ),
25
+ exit_on_error=False, # raise ArgumentError instead of sys.exit (Py3.9+)
26
+ )
27
+ # Global ``--version`` (v0.18.0): coexist with the ``version``
28
+ # subcommand so users get the version whether they type ``askill
29
+ # --version`` or ``askill version``. It uses a distinct dest
30
+ # (``show_version``) so it never collides with ``new --version`` (the
31
+ # frontmatter "version" field, which shares the ``--version`` flag name
32
+ # on a different parser and a different dest).
33
+ parser.add_argument(
34
+ "--version", action="store_true", dest="show_version",
35
+ help="Show the askill version and exit",
36
+ )
37
+ # ``-q/--quiet`` is universal; ``--json`` only exists on subcommands
38
+ # that actually emit JSON (status/list/products/audit/search/verify/
39
+ # update). Attaching it everywhere made ``askill sync --json`` silently
40
+ # return human-readable text - a lying contract for scripts. Commands
41
+ # without JSON support now fail the parse (SystemExit 2) instead.
42
+ quiet = argparse.ArgumentParser(add_help=False)
43
+ quiet.add_argument(
44
+ "-q", "--quiet", action="store_true",
45
+ help="Suppress non-essential output (progress, headers, tips). "
46
+ "Errors, SECURITY WARNINGs and conflict messages still print.",
47
+ )
48
+ common = argparse.ArgumentParser(add_help=False, parents=[quiet])
49
+ common.add_argument(
50
+ "--json", action="store_true", dest="json_mode",
51
+ help="Emit machine-readable JSON to stdout instead of formatted tables.",
52
+ )
53
+
54
+ sub = parser.add_subparsers(dest="command", metavar="COMMAND")
55
+ distribution.add_status(sub, quiet=quiet, common=common)
56
+ distribution.add_sync(sub, quiet=quiet, common=common)
57
+ distribution.add_list(sub, quiet=quiet, common=common)
58
+ distribution.add_install(sub, quiet=quiet, common=common)
59
+ distribution.add_bundle(sub, quiet=quiet, common=common)
60
+ distribution.add_get(sub, quiet=quiet, common=common)
61
+ operations.add_doctor(sub, quiet=quiet, common=common)
62
+ operations.add_rollback(sub, quiet=quiet, common=common)
63
+ distribution.add_remove(sub, quiet=quiet, common=common)
64
+ distribution.add_pack(sub, quiet=quiet, common=common)
65
+ distribution.add_adopt(sub, quiet=quiet, common=common)
66
+ operations.add_audit(sub, quiet=quiet, common=common)
67
+ authoring.add_search(sub, quiet=quiet, common=common)
68
+ authoring.add_new(sub, quiet=quiet, common=common)
69
+ authoring.add_publish(sub, quiet=quiet, common=common)
70
+ authoring.add_verify(sub, quiet=quiet, common=common)
71
+ operations.add_watch(sub, quiet=quiet, common=common)
72
+ operations.add_update(sub, quiet=quiet, common=common)
73
+ operations.add_upgrade(sub, quiet=quiet, common=common)
74
+ distribution.add_products(sub, quiet=quiet, common=common)
75
+ distribution.add_drift(sub, quiet=quiet, common=common)
76
+ operations.add_version(sub, quiet=quiet, common=common)
77
+ return parser
@@ -0,0 +1,109 @@
1
+ """Command definitions for the authoring family (P2-12)."""
2
+
3
+ from __future__ import annotations
4
+
5
+
6
+ def add_search(sub, *, quiet, common) -> None:
7
+ """Register ``search`` (flags unchanged from the monolithic parser)."""
8
+ p_search = sub.add_parser(
9
+ "search", help="Search skills.sh; N installs that result",
10
+ parents=[common],
11
+ )
12
+ p_search.add_argument(
13
+ "--install", type=int, default=None, dest="install_idx",
14
+ help="Install the Nth result",
15
+ )
16
+ p_search.add_argument("query", nargs="*", help="Search query")
17
+
18
+
19
+ def add_new(sub, *, quiet, common) -> None:
20
+ """Register ``new`` (flags unchanged from the monolithic parser)."""
21
+ p_new = sub.add_parser(
22
+ "new", help="Scaffold a new skill in the central repository",
23
+ parents=[common],
24
+ )
25
+ p_new.add_argument(
26
+ "name",
27
+ help="Skill name (lowercase letters/digits, single hyphens)",
28
+ )
29
+ p_new.add_argument(
30
+ "--target", action="append", default=None, dest="target",
31
+ help="Product short whose frontmatter requirements to prefill; "
32
+ "repeatable. Default: all declaring products (superset)",
33
+ )
34
+ p_new.add_argument(
35
+ "--description", default=None,
36
+ help="Frontmatter description (TODO placeholder if omitted)",
37
+ )
38
+ p_new.add_argument(
39
+ "--description-zh", default=None, dest="description_zh",
40
+ help="Chinese description (written when a target requires it)",
41
+ )
42
+ p_new.add_argument(
43
+ "--version", default="0.1.0",
44
+ help="Value for a required version field (default 0.1.0)",
45
+ )
46
+ p_new.add_argument(
47
+ "--minimal", action="store_true",
48
+ help="Only SKILL.md - no references/ or scripts/ subdirs",
49
+ )
50
+
51
+
52
+ def add_publish(sub, *, quiet, common) -> None:
53
+ """Register ``publish`` (flags unchanged from the monolithic parser)."""
54
+ p_publish = sub.add_parser(
55
+ "publish",
56
+ help="Publish a skill from the central repo to a git repository",
57
+ parents=[quiet],
58
+ )
59
+ p_publish.add_argument("skill_name", help="Skill in the central repo")
60
+ p_publish.add_argument(
61
+ "--repo", required=True,
62
+ help="Target as owner/name (GitHub), or an explicit git URL",
63
+ )
64
+ p_publish.add_argument(
65
+ "--target", action="append", default=None, dest="target",
66
+ help="Limit the frontmatter gate to these product shorts (repeatable); "
67
+ "default checks every declaring product",
68
+ )
69
+ p_publish.add_argument(
70
+ "--push", action="store_true",
71
+ help="Actually push. Without it the run is a dry run: gates are "
72
+ "checked and the git plan printed, nothing is written",
73
+ )
74
+ p_publish.add_argument(
75
+ "--root", action="store_true",
76
+ help="Replace the repo ROOT with the skill (single-skill repo, "
77
+ "install as owner/repo). Default: additive <skill>/ subdir "
78
+ "(install as owner/repo@skill)",
79
+ )
80
+ p_publish.add_argument(
81
+ "--force", action="store_true",
82
+ help="Allow --root to replace existing repo content",
83
+ )
84
+ p_publish.add_argument(
85
+ "--https", action="store_true",
86
+ help="Clone/push over HTTPS (credential helper) instead of SSH",
87
+ )
88
+ p_publish.add_argument(
89
+ "--create", action="store_true",
90
+ help="Create the GitHub repo first via the gh CLI",
91
+ )
92
+
93
+
94
+ def add_verify(sub, *, quiet, common) -> None:
95
+ """Register ``verify`` (flags unchanged from the monolithic parser)."""
96
+ p_verify = sub.add_parser(
97
+ "verify",
98
+ help=(
99
+ "Check skills against the agentskills.io spec plus "
100
+ "per-product frontmatter requirements"
101
+ ),
102
+ parents=[common],
103
+ )
104
+ p_verify.add_argument(
105
+ "--format", choices=("table", "github"), default="table",
106
+ help="Output format: human table or GitHub Actions annotations",
107
+ )
108
+ p_verify.add_argument("skill_name", nargs="?", default=None)
109
+
@@ -0,0 +1,168 @@
1
+ """Command definitions for the distribution family (P2-12)."""
2
+
3
+ from __future__ import annotations
4
+
5
+
6
+ def add_status(sub, *, quiet, common) -> None:
7
+ """Register ``status`` (flags unchanged from the monolithic parser)."""
8
+ p_status = sub.add_parser(
9
+ "status", help="Show installation status across products",
10
+ parents=[common],
11
+ )
12
+ p_status.add_argument("skill_name", nargs="?", default=None)
13
+
14
+
15
+ def add_sync(sub, *, quiet, common) -> None:
16
+ """Register ``sync`` (flags unchanged from the monolithic parser)."""
17
+ p_sync = sub.add_parser(
18
+ "sync", help="Sync skill(s) to all products",
19
+ parents=[quiet],
20
+ )
21
+ p_sync.add_argument("skill_name", nargs="?", default=None)
22
+ p_sync.add_argument(
23
+ "--force", action="store_true",
24
+ help="Overwrite differing real dirs (conflicts)",
25
+ )
26
+ p_sync.add_argument(
27
+ "--only", nargs="+", default=None, metavar="SHORT",
28
+ help="Sync only these products (short names from `askill products`, e.g. autoclaw2 kimi)",
29
+ )
30
+ p_sync.add_argument(
31
+ "--gc", action="store_true",
32
+ help="Remove product-side links whose target is gone (stale links); "
33
+ "no syncing happens in this mode",
34
+ )
35
+
36
+
37
+ def add_list(sub, *, quiet, common) -> None:
38
+ """Register ``list`` (flags unchanged from the monolithic parser)."""
39
+ sub.add_parser("list", help="List skills in central repository",
40
+ parents=[common])
41
+
42
+
43
+ def add_install(sub, *, quiet, common) -> None:
44
+ """Register ``install`` (flags unchanged from the monolithic parser)."""
45
+ p_install = sub.add_parser(
46
+ "install",
47
+ help="Install a skill (path / GitHub URL / skills.sh shorthand)",
48
+ parents=[quiet],
49
+ )
50
+ p_install.add_argument("--sync", action="store_true",
51
+ help="Also sync to all products after install")
52
+ p_install.add_argument(
53
+ "--only", nargs="+", default=None, metavar="SHORT",
54
+ help="With --sync: distribute only to these products (short names)",
55
+ )
56
+ p_install.add_argument("--audit", action="store_true",
57
+ help="Print the full audit report after install")
58
+ p_install.add_argument("--no-audit", action="store_true",
59
+ help="Skip the default spec + security checks")
60
+ p_install.add_argument(
61
+ "source", nargs="?", default=None,
62
+ help="Local path, .zip/.skill archive, GitHub URL, or skills.sh shorthand",
63
+ )
64
+ p_install.add_argument(
65
+ "--manifest", default=None,
66
+ help="Align the central repo to a manifest instead of installing <source>",
67
+ )
68
+
69
+
70
+ def add_bundle(sub, *, quiet, common) -> None:
71
+ """Register ``bundle`` (flags unchanged from the monolithic parser)."""
72
+ p_bundle = sub.add_parser(
73
+ "bundle", help="Export askill-manifest.json for team / multi-machine sync",
74
+ parents=[quiet],
75
+ )
76
+ p_bundle.add_argument(
77
+ "--output", default=None,
78
+ help="Manifest path (default: alongside the central repo)",
79
+ )
80
+ p_bundle.add_argument(
81
+ "--external-only", action="store_true",
82
+ help="Export only git-sourced skills (skip locally authored ones)",
83
+ )
84
+
85
+
86
+ def add_get(sub, *, quiet, common) -> None:
87
+ """Register ``get`` (flags unchanged from the monolithic parser)."""
88
+ p_get = sub.add_parser(
89
+ "get", help="Preview a skill without installing (stdout / temp dir)",
90
+ parents=[quiet],
91
+ )
92
+ p_get.add_argument(
93
+ "source",
94
+ help="owner/repo@skill, owner/repo, GitHub URL, or local skill dir",
95
+ )
96
+ p_get.add_argument(
97
+ "--dir", action="store_true",
98
+ help="Copy the full skill folder to a temp path instead of printing SKILL.md",
99
+ )
100
+ p_get.add_argument(
101
+ "--list", action="store_true",
102
+ help="List skills available in the repo instead of printing",
103
+ )
104
+
105
+
106
+ def add_remove(sub, *, quiet, common) -> None:
107
+ """Register ``remove`` (flags unchanged from the monolithic parser)."""
108
+ p_remove = sub.add_parser(
109
+ "remove", help="Remove a skill from all products",
110
+ parents=[quiet],
111
+ )
112
+ p_remove.add_argument("skill_name")
113
+
114
+
115
+ def add_pack(sub, *, quiet, common) -> None:
116
+ """Register ``pack`` (flags unchanged from the monolithic parser)."""
117
+ p_pack = sub.add_parser(
118
+ "pack", help="Package a skill as .zip for DuMate",
119
+ parents=[quiet],
120
+ )
121
+ p_pack.add_argument("skill_name")
122
+
123
+
124
+ def add_adopt(sub, *, quiet, common) -> None:
125
+ """Register ``adopt`` (flags unchanged from the monolithic parser)."""
126
+ p_adopt = sub.add_parser(
127
+ "adopt",
128
+ help="Adopt skills from one platform (or 'all') into the central repo",
129
+ parents=[quiet],
130
+ )
131
+ p_adopt.add_argument(
132
+ "platform_short", nargs="?", default=None,
133
+ help="Short name of source product, or 'all'",
134
+ )
135
+ p_adopt.add_argument("skill_name", nargs="?", default=None)
136
+ p_adopt.add_argument(
137
+ "--undo", metavar="SKILL", default=None,
138
+ help="Undo one auto-adopted skill (prints plan and confirms before deleting)",
139
+ )
140
+ p_adopt.add_argument(
141
+ "--json", action="store_true", dest="json_mode",
142
+ help="With --undo: print the plan as JSON and change nothing",
143
+ )
144
+
145
+
146
+ def add_products(sub, *, quiet, common) -> None:
147
+ """Register ``products`` (flags unchanged from the monolithic parser)."""
148
+ p_products = sub.add_parser("products", help="List all supported products",
149
+ parents=[common])
150
+ p_products.add_argument(
151
+ "--paths", action="store_true",
152
+ help="Export full cross-platform path declarations as JSON "
153
+ "(implies --json; for upstream agents.md contributions)",
154
+ )
155
+
156
+
157
+ def add_drift(sub, *, quiet, common) -> None:
158
+ """Register ``drift`` (flags unchanged from the monolithic parser)."""
159
+ p_drift = sub.add_parser(
160
+ "drift",
161
+ help="Report product-dir skills that diverge from the central repo",
162
+ parents=[common],
163
+ )
164
+ p_drift.add_argument(
165
+ "product_short", nargs="?", default=None,
166
+ help="Limit the scan to one product short (default: all)",
167
+ )
168
+
@@ -0,0 +1,108 @@
1
+ """Command definitions for the operations family (P2-12)."""
2
+
3
+ from __future__ import annotations
4
+
5
+
6
+ def add_doctor(sub, *, quiet, common) -> None:
7
+ """Register ``doctor`` (flags unchanged from the monolithic parser)."""
8
+ p_doctor = sub.add_parser(
9
+ "doctor", help="Environment & repository health diagnostics",
10
+ parents=[common],
11
+ )
12
+ p_doctor.add_argument(
13
+ "--fix", action="store_true",
14
+ help="Print a repair plan (dry-run by default; nothing is changed)",
15
+ )
16
+ p_doctor.add_argument(
17
+ "--apply", action="store_true",
18
+ help="With --fix: execute the automatic repairs (sync / sync --gc)",
19
+ )
20
+
21
+
22
+ def add_rollback(sub, *, quiet, common) -> None:
23
+ """Register ``rollback`` (flags unchanged from the monolithic parser)."""
24
+ p_rollback = sub.add_parser(
25
+ "rollback", help="Restore the pre-update snapshot of a skill",
26
+ parents=[common],
27
+ )
28
+ p_rollback.add_argument("skill_name", nargs="?", default=None)
29
+ p_rollback.add_argument(
30
+ "--list", action="store_true",
31
+ help="List skills that have a rollback snapshot",
32
+ )
33
+
34
+
35
+ def add_audit(sub, *, quiet, common) -> None:
36
+ """Register ``audit`` (flags unchanged from the monolithic parser)."""
37
+ p_audit = sub.add_parser(
38
+ "audit", help="Security audit of skill(s) in central repo",
39
+ parents=[common],
40
+ )
41
+ p_audit.add_argument("skill_name", nargs="?", default=None)
42
+ p_audit.add_argument(
43
+ "--residency", action="store_true",
44
+ help="Attention-budget report (context cost of every description) "
45
+ "instead of the security scan",
46
+ )
47
+ p_audit.add_argument(
48
+ "--overlap", action="store_true",
49
+ help="Deterministic description-overlap report (lexical Jaccard)",
50
+ )
51
+ p_audit.add_argument(
52
+ "--format", choices=("table", "github"), default="table",
53
+ help="Output format: human table or GitHub Actions annotations",
54
+ )
55
+ p_audit.add_argument(
56
+ "--fail-on", default=None, metavar="GRADES",
57
+ help="Comma-separated audit grades that fail the run (e.g. D,F)",
58
+ )
59
+
60
+
61
+ def add_watch(sub, *, quiet, common) -> None:
62
+ """Register ``watch`` (flags unchanged from the monolithic parser)."""
63
+ p_watch = sub.add_parser(
64
+ "watch", help="Watch central repo; auto-sync changes",
65
+ parents=[common],
66
+ )
67
+ p_watch.add_argument(
68
+ "--interval", type=int, default=3,
69
+ help=(
70
+ "Poll/fallback seconds (native inotify / kqueue / "
71
+ "ReadDirectoryChangesW events wake syncs instantly when available)"
72
+ ),
73
+ )
74
+ p_watch.add_argument(
75
+ "--auto-adopt", action="store_true",
76
+ help="Opt-in: import new product-side skills into the central repo",
77
+ )
78
+
79
+
80
+ def add_update(sub, *, quiet, common) -> None:
81
+ """Register ``update`` (flags unchanged from the monolithic parser)."""
82
+ p_update = sub.add_parser(
83
+ "update", help="Check/apply updates for tracked skills",
84
+ parents=[common],
85
+ )
86
+ p_update.add_argument(
87
+ "--check", action="store_true",
88
+ help="Only check for updates, don't apply",
89
+ )
90
+ p_update.add_argument("skill_name", nargs="?", default=None)
91
+
92
+
93
+ def add_upgrade(sub, *, quiet, common) -> None:
94
+ """Register ``upgrade`` (self-upgrade of the askill CLI, v0.29.0)."""
95
+ p_upgrade = sub.add_parser(
96
+ "upgrade", help="Upgrade the askill CLI itself from PyPI",
97
+ parents=[common],
98
+ )
99
+ p_upgrade.add_argument(
100
+ "--check", action="store_true",
101
+ help="Only compare the running version against PyPI, don't upgrade",
102
+ )
103
+
104
+
105
+ def add_version(sub, *, quiet, common) -> None:
106
+ """Register ``version`` (flags unchanged from the monolithic parser)."""
107
+ sub.add_parser("version", help="Show version", parents=[quiet])
108
+
@@ -0,0 +1,11 @@
1
+ """Models layer: typed data shapes for products and audit reports.
2
+
3
+ Mirrors the ``models/`` layer of MoneyPrinterTurbo's ``app/`` layout.
4
+ These are TypedDicts used for documentation / type-checking only; the
5
+ runtime code still works with plain dicts, so no behavioral change.
6
+ """
7
+
8
+ from .product import ProductSpec
9
+ from .report import Finding, SkillReport, StatusEntry, StatusEntryDetail
10
+
11
+ __all__ = ["Finding", "ProductSpec", "SkillReport", "StatusEntry", "StatusEntryDetail"]
@@ -0,0 +1,30 @@
1
+ """Typed shape of a supported product's registry entry."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from pathlib import Path
6
+ from typing import TypedDict
7
+
8
+
9
+ class ProductSpec(TypedDict, total=False):
10
+ """Static description of one supported AI agent product.
11
+
12
+ Declared ``total=False`` because some products (e.g. DuMate) omit the
13
+ platform-specific path keys or the optional ``settings_file`` /
14
+ ``extra_dirs_*`` keys. ``linux_path`` is omitted entirely for products
15
+ without a Linux build.
16
+ """
17
+
18
+ name: str
19
+ short: str
20
+ macos_path: Path | None
21
+ windows_path: Path | None
22
+ linux_path: Path | None
23
+ sync_method: str # "symlink" | "native" | "pack"
24
+ note: str
25
+ extra_dirs_macos: list[Path]
26
+ extra_dirs_windows: list[Path]
27
+ extra_dirs_linux: list[Path]
28
+ settings_file: Path
29
+ settings_mode: str # "skills-switch": settings.json {"skills": {name: bool}}
30
+ required_frontmatter: list[str] # extra SKILL.md fields this product mandates
@@ -0,0 +1,62 @@
1
+ """Typed shapes of the static security-audit report."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import TypedDict
6
+
7
+
8
+ class _FindingCore(TypedDict):
9
+ """Keys every audit finding carries."""
10
+
11
+ severity: str # critical | high | medium | low | info
12
+ category: str
13
+ file: str
14
+ line: int | None
15
+ pattern: str
16
+ message: str
17
+
18
+
19
+ class Finding(_FindingCore, total=False):
20
+ """One static-audit hit.
21
+
22
+ ``dev_context`` is set only on findings raised from a development / test
23
+ path (see ``services.audit._is_dev_context``): those keep their message
24
+ but get a down-weighted severity, so benign dev tooling cannot sink a
25
+ skill's score. The key is optional (``total=False`` applies to the keys
26
+ declared here, not the inherited ones) so all other construction sites
27
+ stay plain six-key dicts.
28
+ """
29
+
30
+ dev_context: bool
31
+
32
+
33
+ class SkillReport(TypedDict):
34
+ skill: str
35
+ path: str
36
+ files: int
37
+ total_bytes: int
38
+ score: int
39
+ grade: str # A | B | C | D | F
40
+ verdict: str # safe | caution | risky | dangerous
41
+ summary: dict # {critical, high, medium, low, info}
42
+ findings: list[Finding]
43
+
44
+
45
+ class StatusEntry(TypedDict):
46
+ skill_name: str
47
+ product_short: str
48
+ product_name: str
49
+ status: str # ok | missing | manual | packed | stale | n/a
50
+ method: str # link | copy | native | manual | packed | stale | n/a
51
+
52
+
53
+ class StatusEntryDetail(StatusEntry, total=False):
54
+ """Optional per-row detail keys (health check 2026-10-31, A2).
55
+
56
+ ``reason`` explains a degraded ``status`` so ``askill status --json``
57
+ consumers can tell "not applicable" apart from "unexplained". Set
58
+ today only on ``n/a`` rows (the product ships no build for the
59
+ current platform, e.g. ``"no linux build"``).
60
+ """
61
+
62
+ reason: str
@@ -0,0 +1,4 @@
1
+ """Services layer: business logic (sync, audit).
2
+
3
+ Mirrors the ``services/`` layer of MoneyPrinterTurbo's ``app/`` layout.
4
+ """