lcp 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 (109) hide show
  1. checksums.yaml +4 -4
  2. data/.claude/skills/lcp-custom-field/SKILL.md +10 -1
  3. data/.claude/skills/lcp-custom-field/agents/openai.yaml +4 -0
  4. data/.claude/skills/lcp-getting-started/SKILL.md +1 -1
  5. data/.claude/skills/lcp-getting-started/agents/openai.yaml +4 -0
  6. data/.claude/skills/lcp-host-binding/agents/openai.yaml +4 -0
  7. data/.claude/skills/lcp-model/agents/openai.yaml +4 -0
  8. data/.claude/skills/lcp-permissions/agents/openai.yaml +4 -0
  9. data/.claude/skills/lcp-presenter/agents/openai.yaml +4 -0
  10. data/.claude/skills/lcp-workflow/SKILL.md +10 -2
  11. data/.claude/skills/lcp-workflow/agents/openai.yaml +4 -0
  12. data/CHANGELOG.md +59 -1
  13. data/app/assets/javascripts/lcp_ruby/dev_toolbar.js +5 -6
  14. data/app/controllers/concerns/lcp_ruby/zone_resolution.rb +14 -1
  15. data/app/helpers/lcp_ruby/display/card_helper.rb +71 -16
  16. data/app/helpers/lcp_ruby/display_helper.rb +30 -3
  17. data/app/helpers/lcp_ruby/display_template_helper.rb +3 -3
  18. data/app/helpers/lcp_ruby/layout_helper.rb +49 -8
  19. data/app/helpers/lcp_ruby/tree_helper.rb +24 -3
  20. data/app/models/lcp_ruby/user.rb +10 -0
  21. data/app/views/layouts/lcp_ruby/application.html.erb +42 -20
  22. data/app/views/layouts/lcp_ruby/auth.html.erb +6 -1
  23. data/app/views/lcp_ruby/resources/_show_sections.html.erb +24 -17
  24. data/app/views/lcp_ruby/resources/_table_index.html.erb +12 -17
  25. data/app/views/lcp_ruby/widgets/_markdown.html.erb +13 -0
  26. data/app/views/lcp_ruby/widgets/_presenter_zone.html.erb +23 -7
  27. data/app/views/lcp_ruby/widgets/_rich_text.html.erb +25 -0
  28. data/docs/README.md +3 -0
  29. data/docs/feature-catalog.md +5 -2
  30. data/docs/feature-catalog.yml +89 -9
  31. data/docs/getting-started.md +38 -22
  32. data/docs/guides/dashboards.md +44 -1
  33. data/docs/guides/display-types.md +6 -0
  34. data/docs/guides/host-application.md +1 -1
  35. data/docs/guides/windows-setup.md +211 -0
  36. data/docs/guides/workflow.md +1 -1
  37. data/docs/reference/asset-pipeline.md +79 -0
  38. data/docs/reference/pages.md +50 -1
  39. data/docs/reference/presenters.md +6 -0
  40. data/docs/reference/workflow.md +2 -2
  41. data/examples/crm/Gemfile +3 -0
  42. data/examples/crm/Gemfile.lock +14 -9
  43. data/examples/crm/app/assets/config/manifest.js +4 -0
  44. data/examples/hr/Gemfile +3 -0
  45. data/examples/hr/Gemfile.lock +14 -9
  46. data/examples/hr/app/assets/config/manifest.js +4 -0
  47. data/examples/showcase/Gemfile +3 -0
  48. data/examples/showcase/Gemfile.lock +12 -9
  49. data/examples/showcase/app/assets/config/manifest.js +4 -0
  50. data/examples/showcase/config/lcp_ruby/pages/main_dashboard.yml +17 -2
  51. data/examples/showcase/config/locales/cs.yml +8 -0
  52. data/examples/showcase/config/locales/en.yml +8 -0
  53. data/examples/todo/Gemfile +3 -0
  54. data/examples/todo/Gemfile.lock +14 -9
  55. data/examples/todo/app/assets/config/manifest.js +4 -0
  56. data/exe/lcp +1 -1
  57. data/lib/generators/lcp_ruby/agent_setup_generator.rb +12 -9
  58. data/lib/generators/lcp_ruby/claude_skills_generator.rb +23 -19
  59. data/lib/generators/lcp_ruby/install_generator.rb +171 -3
  60. data/lib/generators/lcp_ruby/templates/agent_setup/agents_md.md +2 -1
  61. data/lib/generators/lcp_ruby/templates/agent_setup/claude_md.md +3 -2
  62. data/lib/generators/lcp_ruby/templates/install/menu.yml.tt +4 -0
  63. data/lib/generators/lcp_ruby/templates/monitoring/page.yml +5 -0
  64. data/lib/lcp_ruby/app_template.rb +37 -1
  65. data/lib/lcp_ruby/array_query.rb +33 -10
  66. data/lib/lcp_ruby/cli/new_command.rb +9 -4
  67. data/lib/lcp_ruby/cli/run_command.rb +98 -11
  68. data/lib/lcp_ruby/cli/skills_command.rb +27 -15
  69. data/lib/lcp_ruby/cli.rb +5 -1
  70. data/lib/lcp_ruby/configuration.rb +13 -2
  71. data/lib/lcp_ruby/custom_fields/applicator.rb +8 -0
  72. data/lib/lcp_ruby/custom_fields/query.rb +28 -20
  73. data/lib/lcp_ruby/display/markdown_sanitize.rb +36 -0
  74. data/lib/lcp_ruby/display/renderers/markdown.rb +6 -13
  75. data/lib/lcp_ruby/engine.rb +185 -1
  76. data/lib/lcp_ruby/export/data_generator.rb +5 -1
  77. data/lib/lcp_ruby/export/value_formatter.rb +34 -0
  78. data/lib/lcp_ruby/grouped_query/builder.rb +21 -0
  79. data/lib/lcp_ruby/metadata/configuration_validator.rb +5 -5
  80. data/lib/lcp_ruby/metadata/field_path.rb +57 -0
  81. data/lib/lcp_ruby/metadata/loader.rb +33 -1
  82. data/lib/lcp_ruby/metadata/menu_definition.rb +32 -2
  83. data/lib/lcp_ruby/metadata/menu_item.rb +53 -4
  84. data/lib/lcp_ruby/metadata/model_definition.rb +9 -0
  85. data/lib/lcp_ruby/metadata/zone_definition.rb +12 -5
  86. data/lib/lcp_ruby/metrics/json_query.rb +5 -0
  87. data/lib/lcp_ruby/model_factory/builder.rb +5 -0
  88. data/lib/lcp_ruby/model_factory/json_type_applicator.rb +35 -0
  89. data/lib/lcp_ruby/model_factory/label_method_builder.rb +3 -19
  90. data/lib/lcp_ruby/model_factory/schema_manager.rb +19 -0
  91. data/lib/lcp_ruby/pages/definition_validator.rb +13 -0
  92. data/lib/lcp_ruby/presenter/field_value_resolver.rb +36 -19
  93. data/lib/lcp_ruby/schemas/page.json +33 -1
  94. data/lib/lcp_ruby/search/custom_field_filter.rb +5 -0
  95. data/lib/lcp_ruby/skills_installer.rb +15 -2
  96. data/lib/lcp_ruby/tasks/doctor.rb +13 -8
  97. data/lib/lcp_ruby/version.rb +1 -1
  98. data/lib/lcp_ruby/widgets/data_resolver.rb +42 -1
  99. data/lib/lcp_ruby/widgets/date_grouper.rb +19 -0
  100. data/lib/lcp_ruby/workflow/contract_validator.rb +1 -1
  101. data/lib/lcp_ruby/workflow/model_source.rb +2 -2
  102. data/lib/lcp_ruby.rb +18 -0
  103. data/lib/tasks/lcp_ruby_db.rake +8 -1
  104. data/lib/tasks/lcp_ruby_i18n_check.rake +8 -0
  105. metadata +34 -24
  106. data/examples/crm/erd.md +0 -163
  107. data/examples/hr/erd.md +0 -396
  108. data/examples/showcase/erd.md +0 -567
  109. data/examples/todo/erd.md +0 -21
@@ -1,13 +1,14 @@
1
1
  PATH
2
2
  remote: ../..
3
3
  specs:
4
- lcp (0.1.0)
4
+ lcp (0.2.0)
5
5
  commonmarker (~> 2.0)
6
+ csv (>= 3.2)
6
7
  devise (>= 4.9, < 6.0)
7
8
  json_schemer (~> 2.0)
8
9
  jwt (~> 2.7)
9
10
  kaminari (~> 1.2)
10
- omniauth-rails_csrf_protection (~> 1.0)
11
+ omniauth-rails_csrf_protection (~> 2.0)
11
12
  omniauth_openid_connect (~> 0.8)
12
13
  ostruct (>= 0.6)
13
14
  positioning (~> 0.4)
@@ -16,7 +17,6 @@ PATH
16
17
  ransack (~> 4.0)
17
18
  stimulus-rails (~> 1.3)
18
19
  turbo-rails (~> 2.0)
19
- view_component (~> 3.0)
20
20
 
21
21
  GEM
22
22
  remote: https://rubygems.org/
@@ -108,12 +108,14 @@ GEM
108
108
  commonmarker (2.8.2-aarch64-linux-musl)
109
109
  commonmarker (2.8.2-arm-linux)
110
110
  commonmarker (2.8.2-arm64-darwin)
111
+ commonmarker (2.8.2-x64-mingw-ucrt)
111
112
  commonmarker (2.8.2-x86_64-darwin)
112
113
  commonmarker (2.8.2-x86_64-linux)
113
114
  commonmarker (2.8.2-x86_64-linux-musl)
114
115
  concurrent-ruby (1.3.6)
115
116
  connection_pool (3.0.2)
116
117
  crass (1.0.6)
118
+ csv (3.3.5)
117
119
  date (3.5.1)
118
120
  devise (5.0.4)
119
121
  bcrypt (~> 3.0)
@@ -139,6 +141,7 @@ GEM
139
141
  ffi (1.17.3-arm-linux-gnu)
140
142
  ffi (1.17.3-arm-linux-musl)
141
143
  ffi (1.17.3-arm64-darwin)
144
+ ffi (1.17.3-x64-mingw-ucrt)
142
145
  ffi (1.17.3-x86_64-darwin)
143
146
  ffi (1.17.3-x86_64-linux-gnu)
144
147
  ffi (1.17.3-x86_64-linux-musl)
@@ -195,7 +198,6 @@ GEM
195
198
  net-pop
196
199
  net-smtp
197
200
  marcel (1.1.0)
198
- method_source (1.1.0)
199
201
  mini_magick (5.3.1)
200
202
  logger
201
203
  mini_mime (1.1.5)
@@ -223,6 +225,8 @@ GEM
223
225
  racc (~> 1.4)
224
226
  nokogiri (1.19.0-arm64-darwin)
225
227
  racc (~> 1.4)
228
+ nokogiri (1.19.0-x64-mingw-ucrt)
229
+ racc (~> 1.4)
226
230
  nokogiri (1.19.0-x86_64-darwin)
227
231
  racc (~> 1.4)
228
232
  nokogiri (1.19.0-x86_64-linux-gnu)
@@ -234,7 +238,7 @@ GEM
234
238
  logger
235
239
  rack (>= 2.2.3)
236
240
  rack-protection
237
- omniauth-rails_csrf_protection (1.0.2)
241
+ omniauth-rails_csrf_protection (2.0.1)
238
242
  actionpack (>= 4.2)
239
243
  omniauth (~> 2.0)
240
244
  omniauth_openid_connect (0.8.0)
@@ -352,6 +356,7 @@ GEM
352
356
  sqlite3 (1.7.3-aarch64-linux)
353
357
  sqlite3 (1.7.3-arm-linux)
354
358
  sqlite3 (1.7.3-arm64-darwin)
359
+ sqlite3 (1.7.3-x64-mingw-ucrt)
355
360
  sqlite3 (1.7.3-x86_64-darwin)
356
361
  sqlite3 (1.7.3-x86_64-linux)
357
362
  stimulus-rails (1.3.4)
@@ -370,15 +375,13 @@ GEM
370
375
  railties (>= 7.1.0)
371
376
  tzinfo (2.0.6)
372
377
  concurrent-ruby (~> 1.0)
378
+ tzinfo-data (1.2026.2)
379
+ tzinfo (>= 1.0.0)
373
380
  uri (1.1.1)
374
381
  useragent (0.16.11)
375
382
  validate_url (1.0.15)
376
383
  activemodel (>= 3.0.0)
377
384
  public_suffix
378
- view_component (3.24.0)
379
- activesupport (>= 5.2.0, < 8.2)
380
- concurrent-ruby (~> 1)
381
- method_source (~> 1.0)
382
385
  warden (1.2.9)
383
386
  rack (>= 2.0.9)
384
387
  webfinger (2.1.3)
@@ -399,6 +402,7 @@ PLATFORMS
399
402
  arm-linux-gnu
400
403
  arm-linux-musl
401
404
  arm64-darwin
405
+ x64-mingw-ucrt
402
406
  x86_64-darwin
403
407
  x86_64-linux
404
408
  x86_64-linux-gnu
@@ -412,6 +416,7 @@ DEPENDENCIES
412
416
  rails (~> 7.1)
413
417
  sprockets-rails
414
418
  sqlite3 (~> 1.4)
419
+ tzinfo-data
415
420
 
416
421
  BUNDLED WITH
417
422
  2.5.16
@@ -1,3 +1,7 @@
1
1
  //= link_directory ../stylesheets .css
2
2
  //= link Chart.bundle.js
3
3
  //= link chartkick.js
4
+ //= link lcp_ruby/application.js
5
+ //= link lcp_ruby/application.css
6
+ //= link lcp_ruby/tom-select.css
7
+ //= link lcp_ruby/tom-select.complete.min.js
data/examples/hr/Gemfile CHANGED
@@ -4,6 +4,9 @@ gem "rails", "~> 7.1"
4
4
  gem "sqlite3", "~> 1.4"
5
5
  gem "puma", "~> 6.0"
6
6
  gem "sprockets-rails"
7
+
8
+ # Windows has no system zoneinfo database; bundle the pure-Ruby fallback.
9
+ gem "tzinfo-data", platforms: %i[ windows jruby ]
7
10
  gem "image_processing", "~> 1.2"
8
11
  gem "lcp", path: "../.."
9
12
  gem "faker"
@@ -1,13 +1,14 @@
1
1
  PATH
2
2
  remote: ../..
3
3
  specs:
4
- lcp (0.1.0)
4
+ lcp (0.2.0)
5
5
  commonmarker (~> 2.0)
6
+ csv (>= 3.2)
6
7
  devise (>= 4.9, < 6.0)
7
8
  json_schemer (~> 2.0)
8
9
  jwt (~> 2.7)
9
10
  kaminari (~> 1.2)
10
- omniauth-rails_csrf_protection (~> 1.0)
11
+ omniauth-rails_csrf_protection (~> 2.0)
11
12
  omniauth_openid_connect (~> 0.8)
12
13
  ostruct (>= 0.6)
13
14
  positioning (~> 0.4)
@@ -16,7 +17,6 @@ PATH
16
17
  ransack (~> 4.0)
17
18
  stimulus-rails (~> 1.3)
18
19
  turbo-rails (~> 2.0)
19
- view_component (~> 3.0)
20
20
 
21
21
  GEM
22
22
  remote: https://rubygems.org/
@@ -107,12 +107,14 @@ GEM
107
107
  commonmarker (2.8.2-aarch64-linux-musl)
108
108
  commonmarker (2.8.2-arm-linux)
109
109
  commonmarker (2.8.2-arm64-darwin)
110
+ commonmarker (2.8.2-x64-mingw-ucrt)
110
111
  commonmarker (2.8.2-x86_64-darwin)
111
112
  commonmarker (2.8.2-x86_64-linux)
112
113
  commonmarker (2.8.2-x86_64-linux-musl)
113
114
  concurrent-ruby (1.3.6)
114
115
  connection_pool (3.0.2)
115
116
  crass (1.0.6)
117
+ csv (3.3.5)
116
118
  date (3.5.1)
117
119
  devise (5.0.4)
118
120
  bcrypt (~> 3.0)
@@ -140,6 +142,7 @@ GEM
140
142
  ffi (1.17.3-arm-linux-gnu)
141
143
  ffi (1.17.3-arm-linux-musl)
142
144
  ffi (1.17.3-arm64-darwin)
145
+ ffi (1.17.3-x64-mingw-ucrt)
143
146
  ffi (1.17.3-x86_64-darwin)
144
147
  ffi (1.17.3-x86_64-linux-gnu)
145
148
  ffi (1.17.3-x86_64-linux-musl)
@@ -197,7 +200,6 @@ GEM
197
200
  net-pop
198
201
  net-smtp
199
202
  marcel (1.1.0)
200
- method_source (1.1.0)
201
203
  mini_magick (5.3.1)
202
204
  logger
203
205
  mini_mime (1.1.5)
@@ -226,6 +228,8 @@ GEM
226
228
  racc (~> 1.4)
227
229
  nokogiri (1.19.1-arm64-darwin)
228
230
  racc (~> 1.4)
231
+ nokogiri (1.19.1-x64-mingw-ucrt)
232
+ racc (~> 1.4)
229
233
  nokogiri (1.19.1-x86_64-darwin)
230
234
  racc (~> 1.4)
231
235
  nokogiri (1.19.1-x86_64-linux-gnu)
@@ -237,7 +241,7 @@ GEM
237
241
  logger
238
242
  rack (>= 2.2.3)
239
243
  rack-protection
240
- omniauth-rails_csrf_protection (1.0.2)
244
+ omniauth-rails_csrf_protection (2.0.1)
241
245
  actionpack (>= 4.2)
242
246
  omniauth (~> 2.0)
243
247
  omniauth_openid_connect (0.8.0)
@@ -355,6 +359,7 @@ GEM
355
359
  sqlite3 (1.7.3-aarch64-linux)
356
360
  sqlite3 (1.7.3-arm-linux)
357
361
  sqlite3 (1.7.3-arm64-darwin)
362
+ sqlite3 (1.7.3-x64-mingw-ucrt)
358
363
  sqlite3 (1.7.3-x86_64-darwin)
359
364
  sqlite3 (1.7.3-x86_64-linux)
360
365
  stimulus-rails (1.3.4)
@@ -373,15 +378,13 @@ GEM
373
378
  railties (>= 7.1.0)
374
379
  tzinfo (2.0.6)
375
380
  concurrent-ruby (~> 1.0)
381
+ tzinfo-data (1.2026.2)
382
+ tzinfo (>= 1.0.0)
376
383
  uri (1.1.1)
377
384
  useragent (0.16.11)
378
385
  validate_url (1.0.15)
379
386
  activemodel (>= 3.0.0)
380
387
  public_suffix
381
- view_component (3.24.0)
382
- activesupport (>= 5.2.0, < 8.2)
383
- concurrent-ruby (~> 1)
384
- method_source (~> 1.0)
385
388
  warden (1.2.9)
386
389
  rack (>= 2.0.9)
387
390
  webfinger (2.1.3)
@@ -401,6 +404,7 @@ PLATFORMS
401
404
  arm-linux-gnu
402
405
  arm-linux-musl
403
406
  arm64-darwin
407
+ x64-mingw-ucrt
404
408
  x86_64-darwin
405
409
  x86_64-linux
406
410
  x86_64-linux-gnu
@@ -414,6 +418,7 @@ DEPENDENCIES
414
418
  rails (~> 7.1)
415
419
  sprockets-rails
416
420
  sqlite3 (~> 1.4)
421
+ tzinfo-data
417
422
 
418
423
  BUNDLED WITH
419
424
  2.5.16
@@ -1 +1,5 @@
1
1
  //= link_directory ../stylesheets .css
2
+ //= link lcp_ruby/application.js
3
+ //= link lcp_ruby/application.css
4
+ //= link lcp_ruby/tom-select.css
5
+ //= link lcp_ruby/tom-select.complete.min.js
@@ -4,6 +4,9 @@ gem "rails", "~> 7.1"
4
4
  gem "sqlite3", "~> 1.4"
5
5
  gem "puma", "~> 6.0"
6
6
  gem "sprockets-rails"
7
+
8
+ # Windows has no system zoneinfo database; bundle the pure-Ruby fallback.
9
+ gem "tzinfo-data", platforms: %i[ windows jruby ]
7
10
  gem "chartkick"
8
11
  gem "caxlsx"
9
12
  gem "roo"
@@ -1,13 +1,14 @@
1
1
  PATH
2
2
  remote: ../..
3
3
  specs:
4
- lcp (0.1.0)
4
+ lcp (0.2.0)
5
5
  commonmarker (~> 2.0)
6
+ csv (>= 3.2)
6
7
  devise (>= 4.9, < 6.0)
7
8
  json_schemer (~> 2.0)
8
9
  jwt (~> 2.7)
9
10
  kaminari (~> 1.2)
10
- omniauth-rails_csrf_protection (~> 1.0)
11
+ omniauth-rails_csrf_protection (~> 2.0)
11
12
  omniauth_openid_connect (~> 0.8)
12
13
  ostruct (>= 0.6)
13
14
  positioning (~> 0.4)
@@ -16,7 +17,6 @@ PATH
16
17
  ransack (~> 4.0)
17
18
  stimulus-rails (~> 1.3)
18
19
  turbo-rails (~> 2.0)
19
- view_component (~> 3.0)
20
20
 
21
21
  GEM
22
22
  remote: https://rubygems.org/
@@ -114,6 +114,7 @@ GEM
114
114
  commonmarker (2.8.2-aarch64-linux-musl)
115
115
  commonmarker (2.8.2-arm-linux)
116
116
  commonmarker (2.8.2-arm64-darwin)
117
+ commonmarker (2.8.2-x64-mingw-ucrt)
117
118
  commonmarker (2.8.2-x86_64-darwin)
118
119
  commonmarker (2.8.2-x86_64-linux)
119
120
  commonmarker (2.8.2-x86_64-linux-musl)
@@ -193,7 +194,6 @@ GEM
193
194
  net-pop
194
195
  net-smtp
195
196
  marcel (1.1.0)
196
- method_source (1.1.0)
197
197
  mini_mime (1.1.5)
198
198
  minitest (6.0.1)
199
199
  prism (~> 1.5)
@@ -219,6 +219,8 @@ GEM
219
219
  racc (~> 1.4)
220
220
  nokogiri (1.19.1-arm64-darwin)
221
221
  racc (~> 1.4)
222
+ nokogiri (1.19.1-x64-mingw-ucrt)
223
+ racc (~> 1.4)
222
224
  nokogiri (1.19.1-x86_64-darwin)
223
225
  racc (~> 1.4)
224
226
  nokogiri (1.19.1-x86_64-linux-gnu)
@@ -230,7 +232,7 @@ GEM
230
232
  logger
231
233
  rack (>= 2.2.3)
232
234
  rack-protection
233
- omniauth-rails_csrf_protection (1.0.2)
235
+ omniauth-rails_csrf_protection (2.0.1)
234
236
  actionpack (>= 4.2)
235
237
  omniauth (~> 2.0)
236
238
  omniauth_openid_connect (0.8.0)
@@ -358,6 +360,7 @@ GEM
358
360
  sqlite3 (1.7.3-aarch64-linux)
359
361
  sqlite3 (1.7.3-arm-linux)
360
362
  sqlite3 (1.7.3-arm64-darwin)
363
+ sqlite3 (1.7.3-x64-mingw-ucrt)
361
364
  sqlite3 (1.7.3-x86_64-darwin)
362
365
  sqlite3 (1.7.3-x86_64-linux)
363
366
  stimulus-rails (1.3.4)
@@ -376,15 +379,13 @@ GEM
376
379
  railties (>= 7.1.0)
377
380
  tzinfo (2.0.6)
378
381
  concurrent-ruby (~> 1.0)
382
+ tzinfo-data (1.2026.2)
383
+ tzinfo (>= 1.0.0)
379
384
  uri (1.1.1)
380
385
  useragent (0.16.11)
381
386
  validate_url (1.0.15)
382
387
  activemodel (>= 3.0.0)
383
388
  public_suffix
384
- view_component (3.24.0)
385
- activesupport (>= 5.2.0, < 8.2)
386
- concurrent-ruby (~> 1)
387
- method_source (~> 1.0)
388
389
  warden (1.2.9)
389
390
  rack (>= 2.0.9)
390
391
  webfinger (2.1.3)
@@ -405,6 +406,7 @@ PLATFORMS
405
406
  arm-linux-gnu
406
407
  arm-linux-musl
407
408
  arm64-darwin
409
+ x64-mingw-ucrt
408
410
  x86_64-darwin
409
411
  x86_64-linux
410
412
  x86_64-linux-gnu
@@ -420,6 +422,7 @@ DEPENDENCIES
420
422
  rubocop-ast (~> 1.49)
421
423
  sprockets-rails
422
424
  sqlite3 (~> 1.4)
425
+ tzinfo-data
423
426
 
424
427
  BUNDLED WITH
425
428
  2.5.16
@@ -1,3 +1,7 @@
1
1
  //= link_directory ../stylesheets .css
2
2
  //= link Chart.bundle.js
3
3
  //= link chartkick.js
4
+ //= link lcp_ruby/application.js
5
+ //= link lcp_ruby/application.css
6
+ //= link lcp_ruby/tom-select.css
7
+ //= link lcp_ruby/tom-select.complete.min.js
@@ -38,11 +38,15 @@ page:
38
38
  label_key: lcp_ruby.dashboard.total_features
39
39
  position: { row: 1, col: 7, width: 3, height: 1 }
40
40
 
41
+ # Demonstrates the `markdown` widget — Commonmarker-rendered i18n
42
+ # source, sanitized in the partial. Prefer markdown over rich_text
43
+ # when the locale source is hand-authored (safer XSS surface,
44
+ # friendlier authoring than raw HTML).
41
45
  - name: welcome_note
42
46
  type: widget
43
47
  widget:
44
- type: text
45
- content_key: lcp_ruby.dashboard.welcome
48
+ type: markdown
49
+ content_key: lcp_ruby.dashboard.welcome_md
46
50
  position: { row: 1, col: 10, width: 3, height: 1 }
47
51
 
48
52
  - name: recent_employees
@@ -72,6 +76,17 @@ page:
72
76
  role: admin
73
77
  position: { row: 4, col: 1, width: 4, height: 1 }
74
78
 
79
+ # Demonstrates the `rich_text` widget — raw HTML pass-through. Trust
80
+ # model: same as any engine view that calls `raw` (author-controlled
81
+ # locale files). Use markdown when the source might come from outside
82
+ # code review (translation pipelines).
83
+ - name: announcement
84
+ type: widget
85
+ widget:
86
+ type: rich_text
87
+ content_key: lcp_ruby.dashboard.announcement_html
88
+ position: { row: 4, col: 5, width: 8, height: 1 }
89
+
75
90
  - name: employees_by_role
76
91
  type: widget
77
92
  widget:
@@ -1689,6 +1689,14 @@ cs:
1689
1689
  workflow_version: Verze workflow
1690
1690
  one: Záznam workflow
1691
1691
  other: Záznamy workflow
1692
+ dashboard:
1693
+ welcome_md: |
1694
+ ## Vítejte
1695
+
1696
+ Tento dashboard kombinuje **KPI karty**, seznamy, grafy a *textové* widgety.
1697
+ announcement_html: '<strong>Upozornění:</strong> widget <code>rich_text</code>
1698
+ propouští i18n zdroj přes <code>raw</code>. Pro překlady mimo code review
1699
+ použijte raději <code>markdown</code> widget.'
1692
1700
  monitoring:
1693
1701
  error_count: Zaznamenaných chyb
1694
1702
  models_loaded: Načtené modely
@@ -57,6 +57,14 @@ en:
57
57
  '
58
58
  departments_count: Departments
59
59
  total_employees: Total Employees
60
+ dashboard:
61
+ welcome_md: |
62
+ ## Welcome
63
+
64
+ This dashboard mixes **KPIs**, lists, charts, and *text-style* widgets.
65
+ announcement_html: '<strong>Heads up:</strong> the <code>rich_text</code> widget pipes
66
+ i18n source through <code>raw</code>. Use the <code>markdown</code> widget when
67
+ translations might originate outside code review.'
60
68
  monitoring:
61
69
  error_count: Errors Logged
62
70
  models_loaded: Models Loaded
@@ -4,5 +4,8 @@ gem "rails", "~> 7.1"
4
4
  gem "sqlite3", "~> 1.4"
5
5
  gem "puma", "~> 6.0"
6
6
  gem "sprockets-rails"
7
+
8
+ # Windows has no system zoneinfo database; bundle the pure-Ruby fallback.
9
+ gem "tzinfo-data", platforms: %i[ windows jruby ]
7
10
  gem "image_processing", "~> 1.2"
8
11
  gem "lcp", path: "../.."
@@ -1,13 +1,14 @@
1
1
  PATH
2
2
  remote: ../..
3
3
  specs:
4
- lcp (0.1.0)
4
+ lcp (0.2.0)
5
5
  commonmarker (~> 2.0)
6
+ csv (>= 3.2)
6
7
  devise (>= 4.9, < 6.0)
7
8
  json_schemer (~> 2.0)
8
9
  jwt (~> 2.7)
9
10
  kaminari (~> 1.2)
10
- omniauth-rails_csrf_protection (~> 1.0)
11
+ omniauth-rails_csrf_protection (~> 2.0)
11
12
  omniauth_openid_connect (~> 0.8)
12
13
  ostruct (>= 0.6)
13
14
  positioning (~> 0.4)
@@ -16,7 +17,6 @@ PATH
16
17
  ransack (~> 4.0)
17
18
  stimulus-rails (~> 1.3)
18
19
  turbo-rails (~> 2.0)
19
- view_component (~> 3.0)
20
20
 
21
21
  GEM
22
22
  remote: https://rubygems.org/
@@ -107,12 +107,14 @@ GEM
107
107
  commonmarker (2.8.2-aarch64-linux-musl)
108
108
  commonmarker (2.8.2-arm-linux)
109
109
  commonmarker (2.8.2-arm64-darwin)
110
+ commonmarker (2.8.2-x64-mingw-ucrt)
110
111
  commonmarker (2.8.2-x86_64-darwin)
111
112
  commonmarker (2.8.2-x86_64-linux)
112
113
  commonmarker (2.8.2-x86_64-linux-musl)
113
114
  concurrent-ruby (1.3.6)
114
115
  connection_pool (3.0.2)
115
116
  crass (1.0.6)
117
+ csv (3.3.5)
116
118
  date (3.5.1)
117
119
  devise (5.0.4)
118
120
  bcrypt (~> 3.0)
@@ -138,6 +140,7 @@ GEM
138
140
  ffi (1.17.3-arm-linux-gnu)
139
141
  ffi (1.17.3-arm-linux-musl)
140
142
  ffi (1.17.3-arm64-darwin)
143
+ ffi (1.17.3-x64-mingw-ucrt)
141
144
  ffi (1.17.3-x86_64-darwin)
142
145
  ffi (1.17.3-x86_64-linux-gnu)
143
146
  ffi (1.17.3-x86_64-linux-musl)
@@ -194,7 +197,6 @@ GEM
194
197
  net-pop
195
198
  net-smtp
196
199
  marcel (1.1.0)
197
- method_source (1.1.0)
198
200
  mini_magick (5.3.1)
199
201
  logger
200
202
  mini_mime (1.1.5)
@@ -222,6 +224,8 @@ GEM
222
224
  racc (~> 1.4)
223
225
  nokogiri (1.19.0-arm64-darwin)
224
226
  racc (~> 1.4)
227
+ nokogiri (1.19.0-x64-mingw-ucrt)
228
+ racc (~> 1.4)
225
229
  nokogiri (1.19.0-x86_64-darwin)
226
230
  racc (~> 1.4)
227
231
  nokogiri (1.19.0-x86_64-linux-gnu)
@@ -233,7 +237,7 @@ GEM
233
237
  logger
234
238
  rack (>= 2.2.3)
235
239
  rack-protection
236
- omniauth-rails_csrf_protection (1.0.2)
240
+ omniauth-rails_csrf_protection (2.0.1)
237
241
  actionpack (>= 4.2)
238
242
  omniauth (~> 2.0)
239
243
  omniauth_openid_connect (0.8.0)
@@ -351,6 +355,7 @@ GEM
351
355
  sqlite3 (1.7.3-aarch64-linux)
352
356
  sqlite3 (1.7.3-arm-linux)
353
357
  sqlite3 (1.7.3-arm64-darwin)
358
+ sqlite3 (1.7.3-x64-mingw-ucrt)
354
359
  sqlite3 (1.7.3-x86_64-darwin)
355
360
  sqlite3 (1.7.3-x86_64-linux)
356
361
  stimulus-rails (1.3.4)
@@ -369,15 +374,13 @@ GEM
369
374
  railties (>= 7.1.0)
370
375
  tzinfo (2.0.6)
371
376
  concurrent-ruby (~> 1.0)
377
+ tzinfo-data (1.2026.2)
378
+ tzinfo (>= 1.0.0)
372
379
  uri (1.1.1)
373
380
  useragent (0.16.11)
374
381
  validate_url (1.0.15)
375
382
  activemodel (>= 3.0.0)
376
383
  public_suffix
377
- view_component (3.24.0)
378
- activesupport (>= 5.2.0, < 8.2)
379
- concurrent-ruby (~> 1)
380
- method_source (~> 1.0)
381
384
  warden (1.2.9)
382
385
  rack (>= 2.0.9)
383
386
  webfinger (2.1.3)
@@ -398,6 +401,7 @@ PLATFORMS
398
401
  arm-linux-gnu
399
402
  arm-linux-musl
400
403
  arm64-darwin
404
+ x64-mingw-ucrt
401
405
  x86_64-darwin
402
406
  x86_64-linux
403
407
  x86_64-linux-gnu
@@ -410,6 +414,7 @@ DEPENDENCIES
410
414
  rails (~> 7.1)
411
415
  sprockets-rails
412
416
  sqlite3 (~> 1.4)
417
+ tzinfo-data
413
418
 
414
419
  BUNDLED WITH
415
420
  2.5.16
@@ -1 +1,5 @@
1
1
  //= link_directory ../stylesheets .css
2
+ //= link lcp_ruby/application.js
3
+ //= link lcp_ruby/application.css
4
+ //= link lcp_ruby/tom-select.css
5
+ //= link lcp_ruby/tom-select.complete.min.js
data/exe/lcp CHANGED
@@ -4,7 +4,7 @@
4
4
  # Must duplicate MINIMUM_RUBY_VERSION here — this script runs before
5
5
  # `require_relative` resolves any Ruby code from lib/. Keep in sync with
6
6
  # `LcpRuby::CLI::NewCommand::MINIMUM_RUBY_VERSION`.
7
- minimum_ruby = "3.1"
7
+ minimum_ruby = "3.2"
8
8
  if Gem::Version.new(RUBY_VERSION) < Gem::Version.new(minimum_ruby)
9
9
  warn "Error: lcp requires Ruby #{minimum_ruby}+ (you have #{RUBY_VERSION})."
10
10
  warn "Install Ruby #{minimum_ruby} or newer (rbenv install, asdf install ruby, ...) and re-run."
@@ -6,7 +6,7 @@ require "lcp_ruby/skills_installer"
6
6
  module LcpRuby
7
7
  module Generators
8
8
  # Sets up agent affordances in a host app: copies/refreshes the bundled
9
- # `lcp-*` Claude Code skills and writes the two thin entrypoint files
9
+ # `lcp-*` AI authoring skills and writes the two thin entrypoint files
10
10
  # (`CLAUDE.md` canonical orientation + `AGENTS.md` pointer) at the project
11
11
  # root.
12
12
  #
@@ -22,15 +22,17 @@ module LcpRuby
22
22
 
23
23
  BEGIN_MARK = "<!-- lcp:begin -->"
24
24
  END_MARK = "<!-- lcp:end -->"
25
-
26
25
  def install_skills
27
- result = LcpRuby::SkillsInstaller.new(
28
- target: File.join(destination_root, ".claude", "skills")
29
- ).call
26
+ LcpRuby::SkillsInstaller.agent_skill_targets(root: destination_root).each do |agent, target|
27
+ result = LcpRuby::SkillsInstaller.new(
28
+ target: target
29
+ ).call
30
30
 
31
- result.created.each { |n| say_status :create, ".claude/skills/#{n}", :green }
32
- result.updated.each { |n| say_status :update, ".claude/skills/#{n}", :yellow }
33
- result.removed.each { |n| say_status :remove, ".claude/skills/#{n}", :red }
31
+ relative_target = File.join(LcpRuby::SkillsInstaller::AGENT_DIRECTORIES.fetch(agent), "skills")
32
+ result.created.each { |n| say_status :create, "#{relative_target}/#{n}", :green }
33
+ result.updated.each { |n| say_status :update, "#{relative_target}/#{n}", :yellow }
34
+ result.removed.each { |n| say_status :remove, "#{relative_target}/#{n}", :red }
35
+ end
34
36
  end
35
37
 
36
38
  def write_claude_md
@@ -44,7 +46,8 @@ module LcpRuby
44
46
  def show_post_install_message
45
47
  say ""
46
48
  say "LCP agent affordances ready.", :green
47
- say " - .claude/skills/lcp-* (authoring skills, auto-trigger in Claude Code)"
49
+ say " - .claude/skills/lcp-* (authoring skills for Claude Code)"
50
+ say " - .codex/skills/lcp-* (authoring skills for Codex)"
48
51
  say " - CLAUDE.md / AGENTS.md (orientation for AI agents)"
49
52
  say ""
50
53
  say "Re-run after `bundle update lcp` to refresh: rails generate lcp_ruby:agent_setup"