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,567 +0,0 @@
1
- erDiagram
2
- WorkflowAuditLog {
3
- string record_type "NOT NULL"
4
- int record_id "NOT NULL"
5
- string workflow_name "NOT NULL"
6
- int workflow_version
7
- string transition_name "NOT NULL"
8
- string from_state "NOT NULL"
9
- string to_state "NOT NULL"
10
- int user_id
11
- json user_snapshot
12
- string comment
13
- json metadata
14
- datetime created_at
15
- }
16
- Article {
17
- string title "NOT NULL"
18
- text body
19
- string status
20
- int word_count
21
- datetime created_at
22
- datetime updated_at
23
- integer category_id FK
24
- integer author_id FK
25
- }
26
- ArticleTag {
27
- datetime created_at
28
- datetime updated_at
29
- integer article_id FK
30
- integer tag_id FK
31
- }
32
- Author {
33
- string name "NOT NULL"
34
- email email
35
- string bio
36
- datetime created_at
37
- datetime updated_at
38
- }
39
- Category {
40
- string name "NOT NULL"
41
- string description
42
- int parent_id
43
- datetime created_at
44
- datetime updated_at
45
- }
46
- Comment {
47
- string body "NOT NULL"
48
- string author_name "NOT NULL"
49
- int position
50
- datetime created_at
51
- datetime updated_at
52
- integer article_id FK
53
- }
54
- CustomFieldDefinition {
55
- string target_model "NOT NULL"
56
- string field_name "NOT NULL"
57
- string custom_type "NOT NULL"
58
- string label "NOT NULL"
59
- string description
60
- string section
61
- int position
62
- bool active
63
- bool required
64
- string default_value
65
- string placeholder
66
- string hint
67
- int min_length
68
- int max_length
69
- float min_value
70
- float max_value
71
- int precision
72
- json enum_values
73
- bool show_in_table
74
- bool show_in_form
75
- bool show_in_show
76
- bool sortable
77
- bool searchable
78
- string input_type
79
- string renderer
80
- json renderer_options
81
- string column_width
82
- json extra_validations
83
- json readable_by_roles
84
- json writable_by_roles
85
- datetime created_at
86
- datetime updated_at
87
- }
88
- Department {
89
- string name "NOT NULL"
90
- string code "NOT NULL"
91
- int parent_id
92
- datetime created_at
93
- datetime updated_at
94
- }
95
- Employee {
96
- string name "NOT NULL"
97
- email email
98
- string role
99
- string status
100
- datetime created_at
101
- datetime updated_at
102
- integer department_id FK
103
- integer mentor_id FK
104
- }
105
- EmployeeSkill {
106
- datetime created_at
107
- datetime updated_at
108
- integer employee_id FK
109
- integer skill_id FK
110
- }
111
- Feature {
112
- string name "NOT NULL"
113
- string category "NOT NULL"
114
- string description
115
- string config_example
116
- string demo_path
117
- string demo_hint
118
- string status
119
- datetime created_at
120
- datetime updated_at
121
- }
122
- GapfreeSequence {
123
- string seq_model "NOT NULL"
124
- string seq_field "NOT NULL"
125
- string scope_key "NOT NULL"
126
- int current_value
127
- datetime created_at
128
- datetime updated_at
129
- }
130
- Group {
131
- string name "NOT NULL"
132
- string label
133
- string description
134
- string external_id
135
- string source
136
- bool active
137
- datetime created_at
138
- datetime updated_at
139
- }
140
- GroupMembership {
141
- int user_id "NOT NULL"
142
- string source
143
- datetime created_at
144
- datetime updated_at
145
- integer group_id FK
146
- }
147
- GroupRoleMapping {
148
- string role_name "NOT NULL"
149
- datetime created_at
150
- datetime updated_at
151
- integer group_id FK
152
- }
153
- IngredientDef {
154
- string name "NOT NULL"
155
- string quantity
156
- string unit
157
- string notes
158
- bool optional
159
- datetime created_at
160
- datetime updated_at
161
- }
162
- PermissionConfig {
163
- string target_model "NOT NULL"
164
- json definition "NOT NULL"
165
- bool active
166
- string notes
167
- datetime created_at
168
- datetime updated_at
169
- }
170
- Pipeline {
171
- string name "NOT NULL"
172
- string description
173
- datetime created_at
174
- datetime updated_at
175
- }
176
- PipelineStage {
177
- string name "NOT NULL"
178
- int position
179
- color color
180
- int pipeline_id
181
- datetime created_at
182
- datetime updated_at
183
- integer pipeline_id FK
184
- }
185
- Project {
186
- string name "NOT NULL"
187
- string status
188
- datetime created_at
189
- datetime updated_at
190
- integer department_id FK
191
- integer lead_id FK
192
- }
193
- Role {
194
- string name "NOT NULL"
195
- string label
196
- string description
197
- bool active
198
- int position
199
- datetime created_at
200
- datetime updated_at
201
- }
202
- SavedFilter {
203
- string name "NOT NULL"
204
- string description
205
- string target_presenter "NOT NULL"
206
- json condition_tree "NOT NULL"
207
- string ql_text
208
- string visibility
209
- int owner_id "NOT NULL"
210
- string target_role
211
- string target_group
212
- int position
213
- string icon
214
- string color
215
- bool pinned
216
- bool default_filter
217
- datetime created_at
218
- datetime updated_at
219
- }
220
- ShowcaseAggregate {
221
- string name "NOT NULL"
222
- string description
223
- string status
224
- float budget
225
- int company_id
226
- datetime created_at
227
- datetime updated_at
228
- integer company_id FK
229
- }
230
- ShowcaseAggregateCompany {
231
- string name "NOT NULL"
232
- string country
233
- datetime created_at
234
- datetime updated_at
235
- }
236
- ShowcaseAggregateItem {
237
- string title "NOT NULL"
238
- string status
239
- float hours
240
- float cost
241
- int priority_score
242
- date due_date
243
- string assignee
244
- datetime created_at
245
- datetime updated_at
246
- integer showcase_aggregate_id FK
247
- }
248
- ShowcaseArray {
249
- string title "NOT NULL"
250
- string description
251
- array tags
252
- array categories
253
- array scores
254
- array measurements
255
- array default_labels
256
- string record_type
257
- bool featured
258
- datetime created_at
259
- datetime updated_at
260
- }
261
- ShowcaseAttachment {
262
- string title "NOT NULL"
263
- attachment avatar
264
- attachment resume
265
- attachment gallery
266
- attachment documents
267
- datetime created_at
268
- datetime updated_at
269
- }
270
- ShowcaseCondition {
271
- string title "NOT NULL"
272
- string status
273
- string priority
274
- float amount
275
- float budget_limit
276
- int author_id
277
- date due_date
278
- string code
279
- string description
280
- datetime created_at
281
- datetime updated_at
282
- integer showcase_condition_category_id FK
283
- }
284
- ShowcaseConditionCategory {
285
- string name "NOT NULL"
286
- string industry
287
- string country_code
288
- bool verified
289
- datetime created_at
290
- datetime updated_at
291
- }
292
- ShowcaseConditionTask {
293
- string title "NOT NULL"
294
- string status
295
- string reviewer_name
296
- datetime created_at
297
- datetime updated_at
298
- integer showcase_condition_id FK
299
- }
300
- ShowcaseConditionThreshold {
301
- string key "NOT NULL"
302
- float threshold "NOT NULL"
303
- string label
304
- datetime created_at
305
- datetime updated_at
306
- }
307
- ShowcaseDeleteReason {
308
- string reason "NOT NULL"
309
- bool notify_owner
310
- datetime created_at
311
- datetime updated_at
312
- }
313
- ShowcaseExtensibility {
314
- string name "NOT NULL"
315
- string currency
316
- float amount
317
- int score
318
- string normalized_name
319
- datetime created_at
320
- datetime updated_at
321
- }
322
- ShowcaseField {
323
- string title "NOT NULL"
324
- string description
325
- text notes
326
- int count
327
- float rating_value
328
- float price
329
- bool is_active
330
- date start_date
331
- datetime event_time
332
- string status
333
- string priority
334
- json metadata
335
- string external_id
336
- email email
337
- phone phone
338
- url website
339
- color brand_color
340
- datetime created_at
341
- datetime updated_at
342
- }
343
- ShowcaseForm {
344
- string name "NOT NULL"
345
- string form_type
346
- int priority
347
- int satisfaction
348
- bool is_premium
349
- text detailed_notes
350
- json config_data
351
- string reason
352
- string rejection_reason
353
- string advanced_field_1
354
- string advanced_field_2
355
- datetime created_at
356
- datetime updated_at
357
- }
358
- ShowcaseItemClass {
359
- string name "NOT NULL"
360
- string status
361
- string priority
362
- int score
363
- float amount
364
- string code
365
- email email
366
- string notes
367
- date due_date
368
- datetime created_at
369
- datetime updated_at
370
- }
371
- ShowcaseModel {
372
- string name "NOT NULL"
373
- string code "NOT NULL"
374
- string status
375
- float amount "NOT NULL"
376
- date due_date
377
- date auto_date
378
- string computed_label
379
- float computed_score
380
- email email
381
- phone phone
382
- url website
383
- int max_value
384
- int min_value
385
- json tags_json
386
- datetime created_at
387
- datetime updated_at
388
- }
389
- ShowcasePermission {
390
- string title "NOT NULL"
391
- string status
392
- int owner_id
393
- int assignee_id
394
- string priority
395
- bool confidential
396
- string internal_notes
397
- string public_notes
398
- datetime created_at
399
- datetime updated_at
400
- }
401
- ShowcasePositioning {
402
- string name "NOT NULL"
403
- string description
404
- int position
405
- string status
406
- string priority
407
- datetime created_at
408
- datetime updated_at
409
- }
410
- ShowcaseQuickNote {
411
- string title "NOT NULL"
412
- string body
413
- string priority
414
- datetime created_at
415
- datetime updated_at
416
- }
417
- ShowcaseRecipe {
418
- string title "NOT NULL"
419
- string cuisine
420
- int servings
421
- json steps
422
- json ingredients
423
- datetime created_at
424
- datetime updated_at
425
- }
426
- ShowcaseSearch {
427
- string title "NOT NULL"
428
- string description
429
- int quantity
430
- float rating
431
- float price
432
- bool published
433
- date release_date
434
- datetime last_reviewed_at
435
- string status
436
- string priority
437
- string tracking_id
438
- email contact_email
439
- phone contact_phone
440
- url source_url
441
- datetime created_at
442
- datetime updated_at
443
- integer department_id FK
444
- integer category_id FK
445
- integer author_id FK
446
- }
447
- ShowcaseSequence {
448
- string ticket_code
449
- string invoice_number
450
- string category_seq
451
- int raw_counter
452
- int order_ref
453
- string backfill_code
454
- string title "NOT NULL"
455
- string category
456
- string description
457
- datetime created_at
458
- datetime updated_at
459
- }
460
- ShowcaseSoftDelete {
461
- string title "NOT NULL"
462
- string content
463
- string status
464
- string priority
465
- datetime created_at
466
- datetime updated_at
467
- }
468
- ShowcaseSoftDeleteItem {
469
- string name "NOT NULL"
470
- string notes
471
- datetime created_at
472
- datetime updated_at
473
- integer showcase_soft_delete_id FK
474
- }
475
- ShowcaseUserstamps {
476
- string title "NOT NULL"
477
- string content
478
- string status
479
- string priority
480
- datetime created_at
481
- datetime updated_at
482
- }
483
- ShowcaseVirtualField {
484
- string name "NOT NULL"
485
- json properties
486
- string color
487
- int priority
488
- float unit_price
489
- bool featured
490
- string category
491
- string warehouse
492
- date release_date
493
- string sku_code
494
- string city
495
- string country
496
- string full_location
497
- string priority_label
498
- datetime created_at
499
- datetime updated_at
500
- }
501
- ShowcaseWorkflow {
502
- string title "NOT NULL"
503
- string description
504
- string status
505
- string priority
506
- string category
507
- float amount
508
- int assigned_to_id
509
- datetime submitted_at
510
- int submitted_by
511
- string submitted_by_name
512
- datetime reviewed_at
513
- datetime approved_at
514
- datetime completed_at
515
- string rejection_reason
516
- string notes
517
- datetime created_at
518
- datetime updated_at
519
- }
520
- Skill {
521
- string name "NOT NULL"
522
- string category
523
- datetime created_at
524
- datetime updated_at
525
- }
526
- Tag {
527
- string name "NOT NULL"
528
- color color
529
- datetime created_at
530
- datetime updated_at
531
- }
532
- WeatherStation {
533
- string name
534
- string country
535
- string region
536
- float latitude
537
- float longitude
538
- int elevation
539
- string station_type
540
- string status
541
- datetime last_reading_at
542
- datetime created_at
543
- datetime updated_at
544
- }
545
-
546
- Article }|--|| Category : "category"
547
- Article }|--|| Author : "author"
548
- ArticleTag }|--|| Article : "article"
549
- ArticleTag }|--|| Tag : "tag"
550
- Comment }|--|| Article : "article"
551
- Employee }|--|| Department : "department"
552
- Employee }o--|| Employee : "mentor"
553
- EmployeeSkill }|--|| Employee : "employee"
554
- EmployeeSkill }|--|| Skill : "skill"
555
- GroupMembership }|--|| Group : "group"
556
- GroupRoleMapping }|--|| Group : "group"
557
- PipelineStage }|--|| Pipeline : "pipeline"
558
- Project }|--|| Department : "department"
559
- Project }o--|| Employee : "lead"
560
- ShowcaseAggregate }o--|| ShowcaseAggregateCompany : "showcase_aggregate_company"
561
- ShowcaseAggregateItem }|--|| ShowcaseAggregate : "showcase_aggregate"
562
- ShowcaseCondition }o--|| ShowcaseConditionCategory : "showcase_condition_category"
563
- ShowcaseConditionTask }|--|| ShowcaseCondition : "showcase_condition"
564
- ShowcaseSearch }o--|| Department : "department"
565
- ShowcaseSearch }o--|| Category : "category"
566
- ShowcaseSearch }o--|| Author : "author"
567
- ShowcaseSoftDeleteItem }|--|| ShowcaseSoftDelete : "showcase_soft_delete"
data/examples/todo/erd.md DELETED
@@ -1,21 +0,0 @@
1
- erDiagram
2
- TodoItem {
3
- string title "NOT NULL"
4
- bool completed
5
- date start_date
6
- date due_date "NOT NULL"
7
- int position
8
- attachment attachment
9
- datetime created_at
10
- datetime updated_at
11
- integer todo_list_id FK
12
- }
13
- TodoList {
14
- string title "NOT NULL"
15
- string description
16
- attachment cover_image
17
- datetime created_at
18
- datetime updated_at
19
- }
20
-
21
- TodoItem }|--|| TodoList : "todo_list"