packet-tracer-skill 0.2.2 → 0.3.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/CHANGELOG.md +424 -42
- package/README.md +535 -250
- package/SKILL.md +337 -262
- package/bin/packet-tracer-skill.js +29 -2
- package/docs/automation-controller-proof.md +35 -0
- package/docs/curated-donor-registry.md +11 -0
- package/docs/generate-ready-pilot-design.md +30 -0
- package/docs/github-launch-ops-0.2.3.md +37 -0
- package/docs/github-metadata.md +6 -4
- package/docs/hero-demo-plan.md +1 -1
- package/docs/home-iot-donor-proof.md +4 -4
- package/docs/industrial-programming-proof.md +48 -0
- package/docs/ipv4-routing-management-proof.md +37 -0
- package/docs/l2-resiliency-bgp-proof.md +60 -0
- package/docs/l2-security-qos-proof.md +59 -0
- package/docs/packet-tracer-feature-gap-atlas.md +174 -17
- package/docs/post-launch-follow-up.md +9 -5
- package/docs/proof-readiness-dashboard.md +69 -0
- package/docs/publish-preview-roadmap.md +6 -5
- package/docs/release-checklist.md +27 -13
- package/docs/release-notes-0.2.2.md +1 -1
- package/docs/release-notes-0.2.3.md +59 -0
- package/docs/release-notes-0.2.4.md +20 -0
- package/docs/runtime-truth.md +33 -8
- package/docs/security-edge-deepening-proof.md +65 -0
- package/docs/voice-collaboration-proof.md +38 -0
- package/docs/wan-security-donor-proof.md +20 -3
- package/examples/README.md +98 -69
- package/examples/complex_campus_master_edit_v4.inventory.json +12 -2
- package/examples/gallery.md +94 -6
- package/examples/home_iot_cli_edit_v1.inventory.json +11 -2
- package/examples/index.json +932 -4
- package/examples/local-sample-evidence.json +24 -0
- package/examples/proof-cards.json +117 -0
- package/examples/service_heavy_cli_edit_v1.inventory.json +11 -2
- package/package.json +60 -44
- package/pytest.ini +9 -0
- package/references/packettracer-feature-atlas.json +67 -17
- package/references/packettracer-sample-catalog.json +45287 -4525
- package/references/packettracer-sample-catalog.md +599 -259
- package/references/proof-readiness-candidates.json +352 -0
- package/scripts/build_examples_index.py +228 -35
- package/scripts/build_sample_catalog.py +24 -44
- package/scripts/corpus_runner.py +430 -0
- package/scripts/coverage_matrix.py +1842 -1319
- package/scripts/donor_cache.py +354 -0
- package/scripts/donor_diagnostics.py +3 -1
- package/scripts/feature_atlas.py +65 -1
- package/scripts/generate_pkt.py +8762 -4070
- package/scripts/intent_parser.py +2242 -1138
- package/scripts/local_donors.py +340 -0
- package/scripts/packet_tracer_env.py +846 -391
- package/scripts/pkt_annotate.py +218 -0
- package/scripts/pkt_codec.py +420 -181
- package/scripts/pkt_editor.py +2405 -1226
- package/scripts/pkt_transformer.py +1072 -727
- package/scripts/pkt_verify.py +461 -0
- package/scripts/remote_search.py +197 -21
- package/scripts/runtime_doctor.py +80 -29
- package/scripts/sample_catalog.py +1372 -1195
- package/scripts/twofish_diagnostics.py +48 -31
- package/scripts/usage_ledger.py +218 -0
- package/scripts/vendor/README.md +44 -37
- package/scripts/vendor/twofish_pure.py +321 -0
- package/scripts/workspace_repair.py +548 -508
- package/templates/pt900/donors/README.md +15 -0
package/SKILL.md
CHANGED
|
@@ -1,262 +1,337 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: pkt
|
|
3
|
-
description: >
|
|
4
|
-
Create and edit Cisco Packet Tracer 9.0 `.pkt` files from hybrid natural-language
|
|
5
|
-
requests and explicit commands. Use this skill for topology generation, VLAN/router-on-a-stick,
|
|
6
|
-
DHCP, management VLAN, Telnet, wireless/AP-client setup, server services, and existing `.pkt` edits.
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# Cisco Packet Tracer 9.0 `.pkt` Hybrid Generator/Editor
|
|
10
|
-
|
|
11
|
-
This skill targets Packet Tracer
|
|
12
|
-
binary blob, not a zip
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
- `
|
|
101
|
-
|
|
102
|
-
-
|
|
103
|
-
|
|
104
|
-
-
|
|
105
|
-
|
|
106
|
-
- `
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
-
|
|
123
|
-
-
|
|
124
|
-
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
-
|
|
134
|
-
- `
|
|
135
|
-
-
|
|
136
|
-
|
|
137
|
-
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
-
|
|
142
|
-
|
|
143
|
-
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
-
|
|
151
|
-
|
|
152
|
-
-
|
|
153
|
-
|
|
154
|
-
-
|
|
155
|
-
|
|
156
|
-
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
-
|
|
185
|
-
|
|
186
|
-
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
1
|
+
---
|
|
2
|
+
name: pkt
|
|
3
|
+
description: >
|
|
4
|
+
Create and edit Cisco Packet Tracer 9.0 `.pkt` files from hybrid natural-language
|
|
5
|
+
requests and explicit commands. Use this skill for topology generation, VLAN/router-on-a-stick,
|
|
6
|
+
DHCP, management VLAN, Telnet, wireless/AP-client setup, server services, and existing `.pkt` edits.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Cisco Packet Tracer 9.0 `.pkt` Hybrid Generator/Editor
|
|
10
|
+
|
|
11
|
+
This skill targets whichever Packet Tracer release is installed (detected at runtime,
|
|
12
|
+
9.0 by default) and treats a `.pkt` file as a single binary blob, not a zip
|
|
13
|
+
container or folder tree.
|
|
14
|
+
|
|
15
|
+
The current builder/editor is Cisco-sample-centric:
|
|
16
|
+
|
|
17
|
+
- installed Packet Tracer sample saves are the primary prototype source
|
|
18
|
+
- bundled device templates are the secondary fallback for gaps such as missing
|
|
19
|
+
device families in Cisco's own saves
|
|
20
|
+
- imported external labs are reference-only by default
|
|
21
|
+
- curated external donor roots can become donor-eligible after validation, but
|
|
22
|
+
Cisco local donors still rank first
|
|
23
|
+
|
|
24
|
+
That is intentional: it avoids the invalid synthetic XML approach that Packet
|
|
25
|
+
Tracer rejects while still keeping the skill usable when Cisco's own sample set
|
|
26
|
+
does not cover a device family directly.
|
|
27
|
+
|
|
28
|
+
The prompt-first architecture now follows a planner/validator/autofix split:
|
|
29
|
+
|
|
30
|
+
1. intent extraction
|
|
31
|
+
2. topology/config planning
|
|
32
|
+
3. donor ranking
|
|
33
|
+
4. donor-prune mutation
|
|
34
|
+
5. compatibility validation
|
|
35
|
+
|
|
36
|
+
Useful ideas from `MCP-Packet-Tracer` were adopted only at the architecture
|
|
37
|
+
level. PTBuilder live deploy and external donor usage were intentionally not
|
|
38
|
+
adopted.
|
|
39
|
+
|
|
40
|
+
## How `.pkt` Files Work
|
|
41
|
+
|
|
42
|
+
For the modern format targeted by this skill, the pipeline is:
|
|
43
|
+
|
|
44
|
+
1. Build a Packet Tracer XML document rooted at `<PACKETTRACER5>`
|
|
45
|
+
2. qCompress the UTF-8 XML bytes using:
|
|
46
|
+
- 4-byte big-endian uncompressed length
|
|
47
|
+
- raw zlib payload
|
|
48
|
+
3. Apply Stage-2 XOR obfuscation
|
|
49
|
+
4. Encrypt with Twofish in EAX mode and append the 16-byte authentication tag
|
|
50
|
+
5. Apply Stage-1 reverse/XOR obfuscation
|
|
51
|
+
|
|
52
|
+
The XML includes a `<VERSION>` value such as `9.0.0.0810`. This skill targets the
|
|
53
|
+
9.0 line.
|
|
54
|
+
|
|
55
|
+
Packet Tracer 5.x and 6.x wrote a simpler container: qCompress output XORed
|
|
56
|
+
byte-wise with `(length - index)`, with no cipher and no tag. 18 of the 292
|
|
57
|
+
bundled samples are still in that format. `decode_pkt_auto` reads both and
|
|
58
|
+
reports which one matched.
|
|
59
|
+
|
|
60
|
+
Packet Tracer also writes raw control bytes into element text — a Cisco banner
|
|
61
|
+
delimiter is literally `banner motd `, which XML 1.0 forbids. Use
|
|
62
|
+
`parse_pkt_xml` / `serialize_pkt_xml` rather than `ET.fromstring` / `ET.tostring`
|
|
63
|
+
so those bytes survive a round trip.
|
|
64
|
+
|
|
65
|
+
The Twofish step needs no compiled binary. `scripts/vendor/twofish_pure.py` is a
|
|
66
|
+
vendored pure-Python implementation verified against the official Twofish test
|
|
67
|
+
vectors, so decode/edit/generate work on a clean checkout with no environment
|
|
68
|
+
variables. A compiled `_twofish` bridge is optional: when `PKT_TWOFISH_LIBRARY`
|
|
69
|
+
or `PKT_TWOFISH_SEARCH_ROOTS` resolves one, it is used automatically as a ~12x
|
|
70
|
+
accelerator for large labs.
|
|
71
|
+
|
|
72
|
+
### Donor Version Compatibility
|
|
73
|
+
|
|
74
|
+
The build field in a `<VERSION>` string is not a schema identifier — it changes
|
|
75
|
+
on every point release and re-save. None of the 292 sample saves bundled with
|
|
76
|
+
Packet Tracer 9.0.0 carry `9.0.0.0810`; 48 are `9.0.0.x` with other builds and
|
|
77
|
+
the rest span 5.x through 8.x. Donors are therefore classified into tiers:
|
|
78
|
+
|
|
79
|
+
| Tier | Meaning |
|
|
80
|
+
|---|---|
|
|
81
|
+
| `exact` | build strings identical |
|
|
82
|
+
| `same_minor` | same `major.minor`, e.g. any `9.0.0.x` |
|
|
83
|
+
| `same_major` | same major, different minor |
|
|
84
|
+
| `upgradeable` | 6.x–8.x; Packet Tracer upgrades these on open |
|
|
85
|
+
| `incompatible` | 5.x and older |
|
|
86
|
+
|
|
87
|
+
`PACKET_TRACER_DONOR_POLICY` names the loosest acceptable tier. The default is
|
|
88
|
+
`same_minor`. When several donors qualify, the strictest tier wins.
|
|
89
|
+
|
|
90
|
+
The target version is **detected**, not hardcoded. Resolution order:
|
|
91
|
+
`PACKET_TRACER_TARGET_VERSION` → the installed Packet Tracer's directory name →
|
|
92
|
+
the compatibility donor's own `<VERSION>` → the built-in default. Installing
|
|
93
|
+
Packet Tracer 8.2 makes the skill target 8.2 and accept 8.2.x donors; no
|
|
94
|
+
configuration is needed to follow a different release.
|
|
95
|
+
|
|
96
|
+
## Workflow
|
|
97
|
+
|
|
98
|
+
1. Parse the request into a hybrid intent plan:
|
|
99
|
+
- topology, device models, links, cable types, ports
|
|
100
|
+
- natural Azerbaijani or mixed-language counts such as `3 dene switch ve 6 komputer`
|
|
101
|
+
- department/campus prompts such as `6 sobeli kampus sebekesi`
|
|
102
|
+
- VLAN/trunk/access/router-on-a-stick intent
|
|
103
|
+
- router DHCP or server DHCP/DNS intent
|
|
104
|
+
- management VLAN / Telnet intent
|
|
105
|
+
- AP SSID/security and wireless client association intent
|
|
106
|
+
- existing `.pkt` edit operations when a source file is provided
|
|
107
|
+
2. Build an intent-first topology/config plan:
|
|
108
|
+
- topology archetype
|
|
109
|
+
- device list
|
|
110
|
+
- port map
|
|
111
|
+
- VLAN/service/config plan
|
|
112
|
+
- assumptions and blocking gaps
|
|
113
|
+
3. Rank Cisco local donor candidates with capability, topology, and donor-graph scoring
|
|
114
|
+
4. Optionally search/import remote labs, then rank imported labs as curated donors or reference patterns
|
|
115
|
+
5. Apply donor-prune mutations on one working Cisco 9.0 donor lab
|
|
116
|
+
6. Validate workspace/runtime/scenario compatibility
|
|
117
|
+
7. Encode XML into a `.pkt` blob with `scripts/pkt_codec.py`
|
|
118
|
+
8. Save generated or edited output locally
|
|
119
|
+
|
|
120
|
+
Open-first rules remain strict:
|
|
121
|
+
|
|
122
|
+
- multi-source search and scoring is allowed
|
|
123
|
+
- final `.pkt` apply is still single-donor
|
|
124
|
+
- when no safe donor exists, return `blocking_gaps` plus a `blueprint_plan`
|
|
125
|
+
|
|
126
|
+
## Files
|
|
127
|
+
|
|
128
|
+
- `scripts/pkt_builder.py`
|
|
129
|
+
Thin entrypoint: selects a sample and delegates to `pkt_transformer`
|
|
130
|
+
- `scripts/pkt_codec.py`
|
|
131
|
+
Encodes and decodes the modern `.pkt` format
|
|
132
|
+
- `scripts/vendor/twofish_pure.py`
|
|
133
|
+
Vendored pure-Python Twofish; the repo-local baseline engine
|
|
134
|
+
- `scripts/pkt_verify.py`
|
|
135
|
+
Two-tier verification: headless structural checks, plus a real Packet Tracer
|
|
136
|
+
open test that watches for the file's window
|
|
137
|
+
- `scripts/usage_ledger.py`
|
|
138
|
+
Local, gitignored record of which donors actually worked, fed back into donor
|
|
139
|
+
ranking so the skill improves with use
|
|
140
|
+
- `scripts/generate_pkt.py`
|
|
141
|
+
CLI entrypoint for generate/edit/decode/inventory/explain-plan
|
|
142
|
+
- `scripts/intent_parser.py`
|
|
143
|
+
Hybrid natural-language and mini-DSL parser
|
|
144
|
+
- `scripts/pkt_editor.py`
|
|
145
|
+
Existing `.pkt` inventory and mutation engine
|
|
146
|
+
- `scripts/sample_catalog.py`
|
|
147
|
+
Capability-tagged sample index and reference-pattern loader
|
|
148
|
+
- `scripts/sample_selector.py`
|
|
149
|
+
Sample ranking by capability, topology, trust level, and prototype eligibility
|
|
150
|
+
- `scripts/packet_tracer_env.py`
|
|
151
|
+
Resolves Packet Tracer install, saves root, and executable paths
|
|
152
|
+
- `scripts/runtime_doctor.py`
|
|
153
|
+
Unified runtime diagnostics for host OS, donor, Packet Tracer paths, and Twofish readiness
|
|
154
|
+
- `templates/pt900/base_empty.xml`
|
|
155
|
+
Base Packet Tracer 9.0 skeleton
|
|
156
|
+
- `templates/pt900/device_library/*.xml`
|
|
157
|
+
Secondary fallback device XML templates for the first supported device set
|
|
158
|
+
|
|
159
|
+
The runtime builder currently prefers the installed FTP sample from the local
|
|
160
|
+
Packet Tracer `saves/` directory. The exact path is resolved at runtime from
|
|
161
|
+
the local Packet Tracer installation or the `PACKET_TRACER_*` environment
|
|
162
|
+
variables.
|
|
163
|
+
|
|
164
|
+
Prompt-driven donor-prune generation prefers an explicit
|
|
165
|
+
`PACKET_TRACER_COMPAT_DONOR`, but it can also auto-detect a working local
|
|
166
|
+
Packet Tracer 9.0 donor from common local locations when the environment
|
|
167
|
+
override is absent.
|
|
168
|
+
|
|
169
|
+
Strict compatibility rules:
|
|
170
|
+
|
|
171
|
+
- the target version is detected from the install; override with `PACKET_TRACER_TARGET_VERSION` only when you need to pin it
|
|
172
|
+
- never accept a `5.x` donor; Packet Tracer does not reliably upgrade those
|
|
173
|
+
- the donor tier that was accepted is recorded in `compatibility_tier` and
|
|
174
|
+
reported as an assumption, never hidden
|
|
175
|
+
- if the donor is missing, undecodable, or below the active policy tier, stop
|
|
176
|
+
with a blocking error that names the tier and the policy needed to accept it
|
|
177
|
+
- if `PACKET_TRACER_COMPAT_DONOR` is explicitly set and rejected, do not silently
|
|
178
|
+
fall back to another donor
|
|
179
|
+
- `PACKET_TRACER_*` variables must be inherited by every host process;
|
|
180
|
+
`PKT_TWOFISH_*` is optional and only selects the compiled accelerator
|
|
181
|
+
|
|
182
|
+
## Supported First Iteration
|
|
183
|
+
|
|
184
|
+
- `Router`, `Switch`, `PC`, `Server`
|
|
185
|
+
- `LightWeightAccessPoint` / `WirelessRouter` where sample prototypes exist
|
|
186
|
+
- natural prompt planning for device counts, VLAN IDs, `gig` uplinks, `fa` host links,
|
|
187
|
+
department/campus prompts, and default `chain` / `core switch` topologies
|
|
188
|
+
- structured `blocking_gaps`, `assumptions_used`, and `confidence_score` reporting
|
|
189
|
+
- transparent `explain-plan` output with:
|
|
190
|
+
- `intent_plan`
|
|
191
|
+
- `topology_plan`
|
|
192
|
+
- `config_plan`
|
|
193
|
+
- `estimate_plan`
|
|
194
|
+
- `preflight_validation`
|
|
195
|
+
- `autofix_summary`
|
|
196
|
+
- `cisco_sample_candidates`
|
|
197
|
+
- `curated_external_donor_candidates`
|
|
198
|
+
- `external_reference_patterns`
|
|
199
|
+
- `validation_report`
|
|
200
|
+
- explicit port-to-port and cable/media mapping
|
|
201
|
+
- VLAN create, access port, trunk port, native VLAN
|
|
202
|
+
- router subinterfaces and router-on-a-stick
|
|
203
|
+
- named ACL create, permit/deny rule injection, and `ip access-group` interface binding
|
|
204
|
+
- router DHCP pool
|
|
205
|
+
- server DHCP pool, DNS enablement, and DNS records
|
|
206
|
+
- HTTP / HTTPS / FTP / TFTP / NTP service enable state
|
|
207
|
+
- end-device DNS client settings
|
|
208
|
+
- management VLAN SVI + default gateway
|
|
209
|
+
- Telnet enablement on switches/routers via config mutations
|
|
210
|
+
- wireless SSID/security/channel mutations
|
|
211
|
+
- wireless client association and DHCP/static mode where compatible prototypes exist
|
|
212
|
+
- existing `.pkt` inventory and edit flow
|
|
213
|
+
|
|
214
|
+
## Defaults
|
|
215
|
+
|
|
216
|
+
If the user does not specify details:
|
|
217
|
+
|
|
218
|
+
- Packet Tracer version: `9.0.0.0810`
|
|
219
|
+
- Subnet: `192.168.1.0/24`
|
|
220
|
+
- Default gateway: `192.168.1.1`
|
|
221
|
+
- PC addresses: `.10`, `.11`, `.12`, ...
|
|
222
|
+
- Layout:
|
|
223
|
+
- router around `(400, 140)`
|
|
224
|
+
- switch around `(400, 280)`
|
|
225
|
+
- PCs along the bottom row
|
|
226
|
+
|
|
227
|
+
## Constraints
|
|
228
|
+
|
|
229
|
+
- The builder depends on a local Packet Tracer installation with the bundled
|
|
230
|
+
sample saves present, on any of Windows, macOS or Linux
|
|
231
|
+
- Donor devices the plan does not need are deleted. `PACKET_TRACER_SPARE_STRATEGY=park`
|
|
232
|
+
restores the older behaviour of renaming them `UNUSED-*` / `*-SPARE-*` and
|
|
233
|
+
moving them offscreen, if a donor turns out to depend on one staying present
|
|
234
|
+
- `--validate-open` needs Packet Tracer installed. Everything else — decode,
|
|
235
|
+
inventory, edit, generate, structural verification — does not
|
|
236
|
+
- The bundled template library is intentionally minimal in v1
|
|
237
|
+
- Imported external sample roots are reference-only unless you explicitly promote them
|
|
238
|
+
- Prompt generation in the default path is donor-prune based, not full synthetic rebuild
|
|
239
|
+
- Host-to-VLAN distribution is defaulted to an even split when not given, and the
|
|
240
|
+
split is reported as an assumption. `PACKET_TRACER_STRICT_VLAN_ASSIGNMENT=1`
|
|
241
|
+
refuses instead
|
|
242
|
+
- Links the donor lacks are built rather than refused. `PACKET_TRACER_LINK_STRATEGY=reuse`
|
|
243
|
+
restricts generation to the donor's own topology
|
|
244
|
+
- Manual validation in Packet Tracer is still required before claiming a topology
|
|
245
|
+
is fully compatible with the Cisco application
|
|
246
|
+
|
|
247
|
+
## CLI Examples
|
|
248
|
+
|
|
249
|
+
Generate from a blueprint file:
|
|
250
|
+
|
|
251
|
+
```powershell
|
|
252
|
+
python scripts/generate_pkt.py --blueprint examples/blueprint_minimal.json --output output\minimal.pkt
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
Generate from a hybrid prompt:
|
|
256
|
+
|
|
257
|
+
```powershell
|
|
258
|
+
python scripts/generate_pkt.py --prompt "6 şöbəli şəbəkə qur, VLAN 10 20 30 40 50 60 və management VLAN 99 yarat" --output output\campus.pkt
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
Explain the parsed plan before generation:
|
|
262
|
+
|
|
263
|
+
```powershell
|
|
264
|
+
python scripts/generate_pkt.py --explain-plan "set SW1 vlan 10 name Finance; enable telnet on SW1 username admin password 1234"
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
Explain a natural Azerbaijani prompt before generation:
|
|
268
|
+
|
|
269
|
+
```powershell
|
|
270
|
+
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"
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
Inspect curated donor candidates from a local imported lab root:
|
|
274
|
+
|
|
275
|
+
```powershell
|
|
276
|
+
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
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
Only external `9.0.0.0810` labs are promoted into the curated donor pool when
|
|
280
|
+
their workspace validation passes cleanly, or when they are `legacy_uuid_physical`
|
|
281
|
+
donors whose only logical warnings are repeated `MEM_ADDR` mismatch records.
|
|
282
|
+
|
|
283
|
+
Search GitHub first, then auto-import matching repos into a local cache:
|
|
284
|
+
|
|
285
|
+
```powershell
|
|
286
|
+
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
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
Print the aggregated capability matrix:
|
|
290
|
+
|
|
291
|
+
```powershell
|
|
292
|
+
python scripts/generate_pkt.py --coverage-report
|
|
293
|
+
python scripts/generate_pkt.py --coverage-report --device-family "access points"
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
Inspect an existing `.pkt` inventory:
|
|
297
|
+
|
|
298
|
+
```powershell
|
|
299
|
+
python scripts/generate_pkt.py --inventory input\lab.pkt
|
|
300
|
+
python scripts/generate_pkt.py --inventory input\lab.pkt --inventory-capabilities
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
Edit an existing `.pkt` directly from a prompt:
|
|
304
|
+
|
|
305
|
+
```powershell
|
|
306
|
+
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
|
|
307
|
+
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
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
Decode a `.pkt` back to XML for inspection:
|
|
311
|
+
|
|
312
|
+
```powershell
|
|
313
|
+
python scripts/generate_pkt.py --decode output\minimal.pkt --xml-out output\minimal.xml
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
Verify a generated file. The structural tier is headless; `--open` launches
|
|
317
|
+
Packet Tracer and waits until the file's own window appears:
|
|
318
|
+
|
|
319
|
+
```powershell
|
|
320
|
+
python scripts/pkt_verify.py output\minimal.pkt
|
|
321
|
+
python scripts/pkt_verify.py output\minimal.pkt --open
|
|
322
|
+
python scripts/generate_pkt.py --validate-open output\minimal.pkt
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
A file that fails the structural tier is never handed to Packet Tracer.
|
|
326
|
+
|
|
327
|
+
Inspect what the skill has learned from previous runs:
|
|
328
|
+
|
|
329
|
+
```powershell
|
|
330
|
+
python scripts/usage_ledger.py
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
Learning is local and on by default. Prompts are stored only as a non-reversible
|
|
334
|
+
fingerprint, the ledger lives under gitignored `output/`, and it is never
|
|
335
|
+
committed or packaged. Set `PKT_USAGE_LEDGER=off` to disable it, or point it at
|
|
336
|
+
another path. Deleting the ledger changes results in no way except donor
|
|
337
|
+
ordering.
|