packet-tracer-skill 0.1.0 → 0.2.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.
Files changed (72) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/CITATION.cff +15 -0
  3. package/CODE_OF_CONDUCT.md +26 -0
  4. package/CONTRIBUTING.md +120 -0
  5. package/README.md +164 -543
  6. package/SECURITY.md +36 -0
  7. package/SKILL.md +46 -5
  8. package/bin/packet-tracer-skill.js +503 -7
  9. package/docs/curated-donor-registry.md +51 -0
  10. package/docs/discovery-keywords.md +55 -0
  11. package/docs/github-discussions-setup.md +34 -0
  12. package/docs/github-metadata.md +33 -0
  13. package/docs/hero-demo-plan.md +42 -0
  14. package/docs/publish-preview-roadmap.md +31 -0
  15. package/docs/release-checklist.md +60 -0
  16. package/docs/release-notes-0.2.0.md +25 -0
  17. package/docs/runtime-truth.md +49 -0
  18. package/docs/screenshots/.gitkeep +1 -0
  19. package/docs/screenshots/packet-tracer-topology-cropped.png +0 -0
  20. package/examples/README.md +72 -0
  21. package/examples/complex_campus_master_edit_v4.inventory.json +94 -0
  22. package/examples/gallery.md +39 -0
  23. package/examples/home_iot_cli_edit_v1.inventory.json +58 -0
  24. package/examples/index.json +127 -0
  25. package/examples/screenshots/complex_campus_master_edit_v4.png +0 -0
  26. package/examples/screenshots/home_iot_cli_edit_v1.png +0 -0
  27. package/examples/screenshots/service_heavy_cli_edit_v1.png +0 -0
  28. package/examples/screenshots/service_heavy_cli_edit_v1_dhcp.png +0 -0
  29. package/examples/screenshots/service_heavy_cli_edit_v1_dns.png +0 -0
  30. package/examples/screenshots/service_heavy_cli_edit_v1_ftp.png +0 -0
  31. package/examples/service_heavy_cli_edit_v1.inventory.json +51 -0
  32. package/package.json +41 -4
  33. package/references/curated-donor-registry.json +71 -0
  34. package/references/scenario-fixture-corpus.json +53 -0
  35. package/scripts/__pycache__/build_examples_index.cpython-314.pyc +0 -0
  36. package/scripts/__pycache__/build_sample_catalog.cpython-314.pyc +0 -0
  37. package/scripts/__pycache__/coverage_matrix.cpython-314.pyc +0 -0
  38. package/scripts/__pycache__/donor_diagnostics.cpython-314.pyc +0 -0
  39. package/scripts/__pycache__/generate_pkt.cpython-314.pyc +0 -0
  40. package/scripts/__pycache__/install_skill.cpython-314.pyc +0 -0
  41. package/scripts/__pycache__/intent_parser.cpython-314.pyc +0 -0
  42. package/scripts/__pycache__/packet_tracer_env.cpython-314.pyc +0 -0
  43. package/scripts/__pycache__/pkt_builder.cpython-314.pyc +0 -0
  44. package/scripts/__pycache__/pkt_codec.cpython-314.pyc +0 -0
  45. package/scripts/__pycache__/pkt_editor.cpython-314.pyc +0 -0
  46. package/scripts/__pycache__/pkt_transformer.cpython-314.pyc +0 -0
  47. package/scripts/__pycache__/remote_search.cpython-314.pyc +0 -0
  48. package/scripts/__pycache__/runtime_doctor.cpython-314.pyc +0 -0
  49. package/scripts/__pycache__/sample_catalog.cpython-314.pyc +0 -0
  50. package/scripts/__pycache__/sample_selector.cpython-314.pyc +0 -0
  51. package/scripts/__pycache__/twofish_diagnostics.cpython-314.pyc +0 -0
  52. package/scripts/__pycache__/twofish_runtime.cpython-314.pyc +0 -0
  53. package/scripts/__pycache__/workspace_repair.cpython-314.pyc +0 -0
  54. package/scripts/build_examples_index.py +314 -0
  55. package/scripts/coverage_matrix.py +783 -0
  56. package/scripts/donor_diagnostics.py +6 -3
  57. package/scripts/generate_pkt.py +2605 -98
  58. package/scripts/intent_parser.py +173 -18
  59. package/scripts/packet_tracer_env.py +127 -14
  60. package/scripts/pkt_editor.py +312 -12
  61. package/scripts/pkt_transformer.py +195 -9
  62. package/scripts/remote_search.py +169 -0
  63. package/scripts/runtime_doctor.py +286 -0
  64. package/scripts/sample_catalog.py +643 -38
  65. package/scripts/sample_selector.py +251 -5
  66. package/scripts/setup.ps1 +2 -1
  67. package/scripts/twofish_diagnostics.py +20 -23
  68. package/scripts/twofish_runtime.py +101 -0
  69. package/scripts/vendor/README.md +13 -1
  70. package/scripts/vendor/__pycache__/twofish.cpython-314.pyc +0 -0
  71. package/scripts/vendor/twofish.py +11 -9
  72. package/scripts/workspace_repair.py +69 -2
package/SECURITY.md ADDED
@@ -0,0 +1,36 @@
1
+ # Security Policy
2
+
3
+ ## Supported Security Posture
4
+
5
+ This repository is intended to avoid accidental publication of private local Packet Tracer material.
6
+
7
+ Protected areas:
8
+
9
+ - local donor paths
10
+ - generated `.pkt` binaries
11
+ - generated `.xml` outputs
12
+ - locally built bridge binaries
13
+
14
+ ## Reporting a Vulnerability
15
+
16
+ If you find a security or privacy issue, open a private report through the repository security reporting flow if available. If private reporting is unavailable, open a minimal public issue without sharing:
17
+
18
+ - donor paths
19
+ - generated labs
20
+ - locally built bridge binaries
21
+ - personal filesystem layout
22
+
23
+ ## What Not to Publish
24
+
25
+ Do not publish:
26
+
27
+ - `PACKET_TRACER_COMPAT_DONOR` paths containing personal directories
28
+ - raw `.pkt` artifacts unless intentionally public and reviewed
29
+ - unsigned bridge binaries without review
30
+ - screenshots containing sensitive local paths if avoidable
31
+
32
+ ## Current Security Boundaries
33
+
34
+ - raw `.pkt` and `.xml` outputs remain gitignored
35
+ - public examples should be inventory JSON and screenshots
36
+ - repo-local runtime readiness is intentionally separated from external bridge fallback
package/SKILL.md CHANGED
@@ -16,8 +16,9 @@ The current builder/editor is Cisco-sample-centric:
16
16
  - installed Packet Tracer sample saves are the primary prototype source
17
17
  - bundled device templates are the secondary fallback for gaps such as missing
18
18
  device families in Cisco's own saves
19
- - imported external labs are reference-only by default and are not used as the
20
- default donor/prototype source
19
+ - imported external labs are reference-only by default
20
+ - curated external donor roots can become donor-eligible after validation, but
21
+ Cisco local donors still rank first
21
22
 
22
23
  That is intentional: it avoids the invalid synthetic XML approach that Packet
23
24
  Tracer rejects while still keeping the skill usable when Cisco's own sample set
@@ -67,13 +68,19 @@ Tracer releases, so this skill intentionally targets the 9.0 line.
67
68
  - port map
68
69
  - VLAN/service/config plan
69
70
  - assumptions and blocking gaps
70
- 3. Rank Cisco local donor candidates with capability and topology scoring
71
- 4. Optionally rank external imported labs as reference patterns only
72
- 5. Apply donor-prune mutations on a working Cisco 9.0 donor lab
71
+ 3. Rank Cisco local donor candidates with capability, topology, and donor-graph scoring
72
+ 4. Optionally search/import remote labs, then rank imported labs as curated donors or reference patterns
73
+ 5. Apply donor-prune mutations on one working Cisco 9.0 donor lab
73
74
  6. Validate workspace/runtime/scenario compatibility
74
75
  7. Encode XML into a `.pkt` blob with `scripts/pkt_codec.py`
75
76
  8. Save generated or edited output locally
76
77
 
78
+ Open-first rules remain strict:
79
+
80
+ - multi-source search and scoring is allowed
81
+ - final `.pkt` apply is still single-donor
82
+ - when no safe donor exists, return `blocking_gaps` plus a `blueprint_plan`
83
+
77
84
  ## Files
78
85
 
79
86
  - `scripts/pkt_builder.py`
@@ -92,6 +99,8 @@ Tracer releases, so this skill intentionally targets the 9.0 line.
92
99
  Sample ranking by capability, topology, trust level, and prototype eligibility
93
100
  - `scripts/packet_tracer_env.py`
94
101
  Resolves Packet Tracer install, saves root, and executable paths
102
+ - `scripts/runtime_doctor.py`
103
+ Unified runtime diagnostics for host OS, donor, Packet Tracer paths, and Twofish readiness
95
104
  - `templates/pt900/base_empty.xml`
96
105
  Base Packet Tracer 9.0 skeleton
97
106
  - `templates/pt900/device_library/*.xml`
@@ -134,6 +143,7 @@ Strict compatibility rules:
134
143
  - `preflight_validation`
135
144
  - `autofix_summary`
136
145
  - `cisco_sample_candidates`
146
+ - `curated_external_donor_candidates`
137
147
  - `external_reference_patterns`
138
148
  - `validation_report`
139
149
  - explicit port-to-port and cable/media mapping
@@ -202,10 +212,41 @@ Explain a natural Azerbaijani prompt before generation:
202
212
  python scripts/generate_pkt.py --explain-plan "3 dene switch ve 6 komputer ve 1 router vlanlarda 10,20,30 switchlerin oz aralarinda ve routerle aralarinda gig portuna qosulsun komputerler ise fa portlarla qosulsun"
203
213
  ```
204
214
 
215
+ Inspect curated donor candidates from a local imported lab root:
216
+
217
+ ```powershell
218
+ python scripts/generate_pkt.py --explain-plan "6 şöbəli şəbəkə qur, hər şöbədə 1 switch 1 AP 1 printer 2 PC 2 tablet olsun" --donor-root C:\labs\curated-pkt-donors --reference-root C:\labs\external-pkt-samples
219
+ ```
220
+
221
+ Only external `9.0.0.0810` labs are promoted into the curated donor pool when
222
+ their workspace validation passes cleanly, or when they are `legacy_uuid_physical`
223
+ donors whose only logical warnings are repeated `MEM_ADDR` mismatch records.
224
+
225
+ Search GitHub first, then auto-import matching repos into a local cache:
226
+
227
+ ```powershell
228
+ python scripts/generate_pkt.py --explain-plan "6 department campus with vlan dhcp dns ap" --search-remote --remote-provider github --import-cache-root output\remote-cache
229
+ ```
230
+
231
+ Print the aggregated capability matrix:
232
+
233
+ ```powershell
234
+ python scripts/generate_pkt.py --coverage-report
235
+ python scripts/generate_pkt.py --coverage-report --device-family "access points"
236
+ ```
237
+
205
238
  Inspect an existing `.pkt` inventory:
206
239
 
207
240
  ```powershell
208
241
  python scripts/generate_pkt.py --inventory input\lab.pkt
242
+ python scripts/generate_pkt.py --inventory input\lab.pkt --inventory-capabilities
243
+ ```
244
+
245
+ Edit an existing `.pkt` directly from a prompt:
246
+
247
+ ```powershell
248
+ python scripts/generate_pkt.py --edit input\lab.pkt --prompt "set Wireless Router0 ssid FIN_WIFI security wpa2-psk passphrase fin12345 channel 6 associate PC0 to Wireless Router0 ssid FIN_WIFI dhcp" --output output\edited_lab.pkt --xml-out output\edited_lab.xml
249
+ python scripts/generate_pkt.py --edit input\lab.pkt --prompt "enable dns on Server0 set Server0 dns A www.example.local 192.168.10.20 set PC0 dns 192.168.10.20" --output output\edited_services.pkt
209
250
  ```
210
251
 
211
252
  Decode a `.pkt` back to XML for inspection: