sxn 0.2.5 → 0.4.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.
data/lib/sxn/ui/table.rb CHANGED
@@ -89,6 +89,21 @@ module Sxn
89
89
  render_table(headers, rows)
90
90
  end
91
91
 
92
+ def templates(templates)
93
+ return empty_table("No templates defined") if templates.empty?
94
+
95
+ headers = %w[Name Description Projects]
96
+ rows = templates.map do |template|
97
+ [
98
+ template[:name],
99
+ template[:description] || "-",
100
+ template[:project_count].to_s
101
+ ]
102
+ end
103
+
104
+ render_table(headers, rows)
105
+ end
106
+
92
107
  # Add a header to the table output
93
108
  def header(title)
94
109
  puts "\n#{@pastel.bold.underline(title)}"
@@ -99,7 +114,9 @@ module Sxn
99
114
 
100
115
  def render_table(headers, rows)
101
116
  table = TTY::Table.new(header: headers, rows: rows)
102
- puts table.render(:unicode, padding: [0, 1])
117
+ # Use basic renderer to avoid terminal width detection issues
118
+ renderer = $stdout.tty? ? :unicode : :basic
119
+ puts table.render(renderer, padding: [0, 1])
103
120
  end
104
121
 
105
122
  def empty_table(message)
data/lib/sxn/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Sxn
4
- VERSION = "0.2.5"
4
+ VERSION = "0.4.0"
5
5
  end
data/lib/sxn.rb CHANGED
@@ -13,6 +13,7 @@ require_relative "sxn/templates"
13
13
  require_relative "sxn/ui"
14
14
  require_relative "sxn/commands"
15
15
  require_relative "sxn/CLI"
16
+ # MCP module is loaded on demand via require "sxn/mcp"
16
17
 
17
18
  module Sxn
18
19
  class << self
data/sxn.gemspec CHANGED
@@ -53,6 +53,7 @@ Gem::Specification.new do |spec|
53
53
  # MCP server dependencies
54
54
  spec.add_dependency "async", "~> 2.0" # Async operations
55
55
  spec.add_dependency "json-schema", "~> 4.0" # Schema validation
56
+ spec.add_dependency "mcp", "~> 0.4" # MCP server SDK
56
57
 
57
58
  # Security and encryption
58
59
  spec.add_dependency "bcrypt", "~> 3.1" # Password hashing
data/test.txt ADDED
@@ -0,0 +1 @@
1
+ content
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sxn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ernest Sim
@@ -163,6 +163,20 @@ dependencies:
163
163
  - - "~>"
164
164
  - !ruby/object:Gem::Version
165
165
  version: '4.0'
166
+ - !ruby/object:Gem::Dependency
167
+ name: mcp
168
+ requirement: !ruby/object:Gem::Requirement
169
+ requirements:
170
+ - - "~>"
171
+ - !ruby/object:Gem::Version
172
+ version: '0.4'
173
+ type: :runtime
174
+ prerelease: false
175
+ version_requirements: !ruby/object:Gem::Requirement
176
+ requirements:
177
+ - - "~>"
178
+ - !ruby/object:Gem::Version
179
+ version: '0.4'
166
180
  - !ruby/object:Gem::Dependency
167
181
  name: bcrypt
168
182
  requirement: !ruby/object:Gem::Requirement
@@ -449,6 +463,7 @@ email:
449
463
  - ernest.codes@gmail.com
450
464
  executables:
451
465
  - sxn
466
+ - sxn-mcp
452
467
  extensions: []
453
468
  extra_rdoc_files: []
454
469
  files:
@@ -501,30 +516,46 @@ files:
501
516
  - Rakefile
502
517
  - Steepfile
503
518
  - bin/sxn
519
+ - bin/sxn-mcp
520
+ - docs/MCP_IMPLEMENTATION.md
504
521
  - docs/parallel_testing.md
505
522
  - lib/sxn.rb
506
523
  - lib/sxn/CLI.rb
507
524
  - lib/sxn/commands.rb
508
525
  - lib/sxn/commands/init.rb
526
+ - lib/sxn/commands/mcp.rb
509
527
  - lib/sxn/commands/projects.rb
510
528
  - lib/sxn/commands/rules.rb
511
529
  - lib/sxn/commands/sessions.rb
530
+ - lib/sxn/commands/templates.rb
512
531
  - lib/sxn/commands/worktrees.rb
513
532
  - lib/sxn/config.rb
514
533
  - lib/sxn/config/config_cache.rb
515
534
  - lib/sxn/config/config_discovery.rb
516
535
  - lib/sxn/config/config_validator.rb
536
+ - lib/sxn/config/templates_config.rb
517
537
  - lib/sxn/core.rb
518
538
  - lib/sxn/core/config_manager.rb
519
539
  - lib/sxn/core/project_manager.rb
520
540
  - lib/sxn/core/rules_manager.rb
521
541
  - lib/sxn/core/session_config.rb
522
542
  - lib/sxn/core/session_manager.rb
543
+ - lib/sxn/core/template_manager.rb
523
544
  - lib/sxn/core/worktree_manager.rb
524
545
  - lib/sxn/database.rb
525
546
  - lib/sxn/database/errors.rb
526
547
  - lib/sxn/database/session_database.rb
527
548
  - lib/sxn/errors.rb
549
+ - lib/sxn/mcp.rb
550
+ - lib/sxn/mcp/prompts/workflow_prompts.rb
551
+ - lib/sxn/mcp/resources/session_resources.rb
552
+ - lib/sxn/mcp/server.rb
553
+ - lib/sxn/mcp/tools/base_tool.rb
554
+ - lib/sxn/mcp/tools/projects.rb
555
+ - lib/sxn/mcp/tools/rules.rb
556
+ - lib/sxn/mcp/tools/sessions.rb
557
+ - lib/sxn/mcp/tools/templates.rb
558
+ - lib/sxn/mcp/tools/worktrees.rb
528
559
  - lib/sxn/rules.rb
529
560
  - lib/sxn/rules/base_rule.rb
530
561
  - lib/sxn/rules/copy_files_rule.rb
@@ -612,6 +643,7 @@ files:
612
643
  - sig/sxn/ui/table.rbs
613
644
  - sig/sxn/version.rbs
614
645
  - sxn.gemspec
646
+ - test.txt
615
647
  homepage: https://github.com/idl3/sxn
616
648
  licenses:
617
649
  - MIT