Skip to content

Commit 655c814

Browse files
committed
feat: add ContextCommands field to transcript.Platform
Part of #129 — context-aware command restrictions.
1 parent 03ec41d commit 655c814

1 file changed

Lines changed: 11 additions & 10 deletions

File tree

transcript/transcript.go

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,17 @@ type Scenario struct {
2525

2626
// Platform defines a simulated device platform and its command transcripts.
2727
type Platform struct {
28-
Vendor string `yaml:"vendor" json:"vendor"`
29-
Hostname string `yaml:"hostname" json:"hostname"`
30-
Username string `yaml:"username" json:"username"`
31-
Password string `yaml:"password" json:"password"`
32-
PromptFormat string `yaml:"prompt_format" json:"prompt_format"`
33-
CommandTranscripts map[string]string `yaml:"command_transcripts" json:"command_transcripts"`
34-
ContextSearch map[string]string `yaml:"context_search" json:"context_search"`
35-
ContextHierarchy map[string]string `yaml:"context_hierarchy" json:"context_hierarchy"`
36-
ContextPrefixLines map[string]string `yaml:"context_prefix_lines" json:"context_prefix_lines"`
37-
EndContext string `yaml:"end_context" json:"end_context"`
28+
Vendor string `yaml:"vendor" json:"vendor"`
29+
Hostname string `yaml:"hostname" json:"hostname"`
30+
Username string `yaml:"username" json:"username"`
31+
Password string `yaml:"password" json:"password"`
32+
PromptFormat string `yaml:"prompt_format" json:"prompt_format"`
33+
CommandTranscripts map[string]string `yaml:"command_transcripts" json:"command_transcripts"`
34+
ContextSearch map[string]string `yaml:"context_search" json:"context_search"`
35+
ContextHierarchy map[string]string `yaml:"context_hierarchy" json:"context_hierarchy"`
36+
ContextPrefixLines map[string]string `yaml:"context_prefix_lines" json:"context_prefix_lines"`
37+
ContextCommands map[string][]string `yaml:"context_commands" json:"context_commands"`
38+
EndContext string `yaml:"end_context" json:"end_context"`
3839
}
3940

4041
// Map holds all platforms and scenarios defined in a transcript map YAML file.

0 commit comments

Comments
 (0)