@ripla/godd-mcp 1.0.7-canary.9 → 1.0.7

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 (92) hide show
  1. package/README.md +457 -85
  2. package/dist/godd.cjs +293 -244
  3. package/dist/godd.js +1005 -321
  4. package/dist/index.js +148 -119
  5. package/notes/app/DESIGN.md +5 -2
  6. package/notes/app/e2e/fixtures.ts +39 -0
  7. package/notes/app/e2e/ja-typography-visual.spec.ts +185 -0
  8. package/notes/app/e2e/ja-typography-visual.spec.ts-snapshots/ja-typography-desktop-1280-chromium-linux.png +0 -0
  9. package/notes/app/e2e/ja-typography-visual.spec.ts-snapshots/ja-typography-mobile-360-chromium-linux.png +0 -0
  10. package/notes/app/e2e/rtl-logical-properties.spec.ts +36 -0
  11. package/notes/app/package-lock.json +0 -8
  12. package/notes/app/package.json +0 -1
  13. package/notes/app/playwright.config.ts +7 -0
  14. package/notes/app/pnpm-lock.yaml +0 -8
  15. package/notes/app/src/components/BranchSelectorModal.tsx +8 -8
  16. package/notes/app/src/components/CommentPanel.tsx +5 -5
  17. package/notes/app/src/components/DiffPreview.tsx +4 -4
  18. package/notes/app/src/components/FileContentView.tsx +1 -1
  19. package/notes/app/src/components/FileContextMenu.tsx +1 -1
  20. package/notes/app/src/components/FileInfoPanel.branch-tab.test.tsx +3 -35
  21. package/notes/app/src/components/IssueCommentThread.test.tsx +40 -19
  22. package/notes/app/src/components/IssueDetailView.test.tsx +3 -40
  23. package/notes/app/src/components/IssueList.tsx +3 -3
  24. package/notes/app/src/components/LabelSelector.tsx +1 -1
  25. package/notes/app/src/components/MarkdownEditor.tsx +1 -1
  26. package/notes/app/src/components/Skeleton.tsx +2 -2
  27. package/notes/app/src/components/ToastContainer.tsx +1 -1
  28. package/notes/app/src/components/TreeNode.tsx +6 -6
  29. package/notes/app/src/contexts/ToastContext.tsx +1 -1
  30. package/notes/app/src/hooks/useComments.ts +1 -1
  31. package/notes/app/src/hooks/useEditSession.ts +1 -1
  32. package/notes/app/src/lib/api.ts +1 -13
  33. package/notes/app/src/lib/csv-utils.ts +1 -1
  34. package/notes/app/src/lib/postLoginRedirect.ts +1 -1
  35. package/notes/app/src/lib/rtl-logical-properties.test.ts +59 -0
  36. package/notes/app/src/lib/user-colors.ts +1 -1
  37. package/notes/app/src/pages/MainPage.tsx +2 -2
  38. package/notes/app/src/pages/SettingsPage.test.tsx +40 -10
  39. package/notes/app/src/pages/SettingsPage.tsx +1 -1
  40. package/notes/app/src/pages/UserManagementPage.tsx +7 -7
  41. package/notes/app/src/styles/globals.css +17 -0
  42. package/notes/app/src/test/mockPeriodicSync.ts +68 -0
  43. package/notes/app/src/test/mocks.ts +1 -1
  44. package/package.json +7 -3
  45. package/templates/feedback/feedback-lambda/index.mjs +342 -0
  46. package/templates/feedback/frontend/FeedbackWidget.tsx +574 -0
  47. package/templates/feedback/frontend/api.ts +38 -0
  48. package/templates/feedback/frontend/composePinImage.ts +80 -0
  49. package/templates/feedback/frontend/config.ts +14 -0
  50. package/templates/feedback/frontend/types.ts +41 -0
  51. package/templates/feedback/terraform/Makefile +43 -0
  52. package/templates/feedback/terraform/backend.tf +10 -0
  53. package/templates/feedback/terraform/lambda.tf +95 -0
  54. package/templates/feedback/terraform/local.tf +12 -0
  55. package/templates/feedback/terraform/output.tf +9 -0
  56. package/templates/feedback/terraform/provider.tf +24 -0
  57. package/templates/feedback/terraform/variables.tf +25 -0
  58. package/templates/github-actions/aws/deploy-notes.yml.hbs +193 -10
  59. package/templates/notes-docs/001_project/README.md +0 -2
  60. package/templates/notes-docs/002_business_flow/README.md +19 -0
  61. package/templates/notes-docs/003_requirements/README.md +20 -0
  62. package/templates/notes-docs/003_requirements/questions.csv +1 -0
  63. package/templates/notes-docs/003_requirements/spec/README.md +11 -0
  64. package/templates/notes-docs/004_pages/README.md +22 -0
  65. package/templates/notes-docs/005_architecture/README.md +20 -0
  66. package/templates/notes-docs/006_development_workflow/README.md +67 -0
  67. package/templates/notes-docs/006_development_workflow/daily_flow.template.md +303 -0
  68. package/templates/notes-docs/006_development_workflow/git.template.md +72 -20
  69. package/templates/notes-docs/006_development_workflow/judgment.template.md +182 -0
  70. package/templates/notes-docs/006_development_workflow/workflow.template.md +167 -192
  71. package/templates/notes-docs/007_guides/README.md +85 -0
  72. package/templates/notes-docs/007_guides/bot-token-setup.md +174 -0
  73. package/templates/notes-docs/007_guides/getting_started.md +112 -0
  74. package/templates/notes-docs/007_guides/glossary.md +145 -0
  75. package/templates/notes-docs/007_guides/godd_notes_features.md +105 -0
  76. package/templates/notes-docs/007_guides/godd_notes_usage.md +28 -19
  77. package/templates/notes-docs/007_guides/godd_tools.md +129 -0
  78. package/templates/notes-docs/007_guides/godd_usage.md +88 -95
  79. package/templates/notes-docs/007_guides/infra/README.md +57 -0
  80. package/templates/notes-docs/007_guides/{setup_aws_accounts.md → infra/setup_aws_accounts.md} +3 -2
  81. package/templates/notes-docs/007_guides/{setup_infra.template.md → infra/setup_infra.template.md} +15 -4
  82. package/templates/notes-docs/007_guides/setup_godd.md +66 -23
  83. package/templates/notes-docs/007_guides/setup_godd_notes.md +95 -42
  84. package/templates/notes-docs/007_guides/setup_godd_notes.md.styles.json +2 -2
  85. package/templates/notes-docs/007_guides/setup_local_environment.template.md +81 -20
  86. package/templates/notes-docs/007_guides/troubleshooting.md +225 -0
  87. package/templates/notes-docs/999_ref/README.md +23 -0
  88. package/templates/notes-docs/GENERATED.md +1 -1
  89. package/templates/notes-docs/README.md +64 -34
  90. package/templates/terraform/aws/iam.tf.hbs +361 -4
  91. /package/templates/notes-docs/007_guides/{setup_aws_cost_alert.md → infra/setup_aws_cost_alert.md} +0 -0
  92. /package/templates/notes-docs/007_guides/{setup_aws_guard_duty.md → infra/setup_aws_guard_duty.md} +0 -0
@@ -24,17 +24,138 @@ resource "aws_iam_role" "github_actions" {
24
24
  }
25
25
  Action = "sts:AssumeRoleWithWebIdentity"
26
26
  Condition = {
27
- StringLike = {
28
- "token.actions.githubusercontent.com:sub" = "repo:${local.github_owner}/${local.github_repo}:*"
27
+ StringEquals = {
28
+ "token.actions.githubusercontent.com:aud" = "sts.amazonaws.com"
29
+ "token.actions.githubusercontent.com:sub" = "repo:${local.github_owner}/${local.github_repo}:ref:refs/heads/main"
29
30
  }
31
+ }
32
+ }]
33
+ })
34
+ }
35
+
36
+ resource "aws_iam_role" "github_actions_plan" {
37
+ name = "github-actions-${local.env}-plan"
38
+ tags = local.tags
39
+
40
+ assume_role_policy = jsonencode({
41
+ Version = "2012-10-17"
42
+ Statement = [{
43
+ Effect = "Allow"
44
+ Principal = {
45
+ Federated = aws_iam_openid_connect_provider.github.arn
46
+ }
47
+ Action = "sts:AssumeRoleWithWebIdentity"
48
+ Condition = {
30
49
  StringEquals = {
31
50
  "token.actions.githubusercontent.com:aud" = "sts.amazonaws.com"
32
51
  }
52
+ StringLike = {
53
+ "token.actions.githubusercontent.com:sub" = "repo:${local.github_owner}/${local.github_repo}:pull_request"
54
+ }
33
55
  }
34
56
  }]
35
57
  })
36
58
  }
37
59
 
60
+ resource "aws_iam_role_policy" "github_actions_plan" {
61
+ name = "${local.project}-github-actions-plan"
62
+ role = aws_iam_role.github_actions_plan.id
63
+
64
+ policy = jsonencode({
65
+ Version = "2012-10-17"
66
+ Statement = [
67
+ {
68
+ Sid = "TfStateRead"
69
+ Effect = "Allow"
70
+ Action = [
71
+ "s3:GetObject",
72
+ "s3:ListBucket",
73
+ ]
74
+ Resource = [
75
+ "arn:aws:s3:::godd-notes-tfstate-${local.account_id}",
76
+ "arn:aws:s3:::godd-notes-tfstate-${local.account_id}/*",
77
+ ]
78
+ },
79
+ {
80
+ Sid = "TfStateLock"
81
+ Effect = "Allow"
82
+ Action = [
83
+ "dynamodb:GetItem",
84
+ "dynamodb:PutItem",
85
+ "dynamodb:DeleteItem",
86
+ ]
87
+ Resource = "arn:aws:dynamodb:${local.region}:${local.account_id}:table/godd-notes-tfstate-lock"
88
+ },
89
+ {
90
+ Sid = "TfStateKMS"
91
+ Effect = "Allow"
92
+ Action = [
93
+ "kms:Decrypt",
94
+ "kms:DescribeKey",
95
+ ]
96
+ Resource = "*"
97
+ Condition = {
98
+ StringEquals = {
99
+ "kms:RequestAlias" = "alias/godd-tfstate"
100
+ }
101
+ }
102
+ },
103
+ {
104
+ Sid = "ReadOnlyDescribe"
105
+ Effect = "Allow"
106
+ Action = [
107
+ "ec2:Describe*",
108
+ "ecs:Describe*",
109
+ "ecs:List*",
110
+ "ecr:Describe*",
111
+ "ecr:List*",
112
+ "ecr:GetAuthorizationToken",
113
+ "elasticloadbalancing:Describe*",
114
+ "rds:Describe*",
115
+ "rds:ListTagsForResource",
116
+ "s3:GetBucket*",
117
+ "s3:GetObject",
118
+ "s3:ListBucket",
119
+ "s3:GetEncryptionConfiguration",
120
+ "s3:GetLifecycleConfiguration",
121
+ "s3:GetReplicationConfiguration",
122
+ "s3:GetAccelerateConfiguration",
123
+ "s3:GetBucketObjectLockConfiguration",
124
+ "s3:GetBucketPublicAccessBlock",
125
+ "cloudfront:GetDistribution",
126
+ "cloudfront:ListTagsForResource",
127
+ "cloudfront:GetOriginAccessControl",
128
+ "cloudfront:ListOriginAccessControls",
129
+ "logs:DescribeLogGroups",
130
+ "logs:ListTagsForResource",
131
+ "iam:GetRole",
132
+ "iam:GetRolePolicy",
133
+ "iam:ListRolePolicies",
134
+ "iam:ListAttachedRolePolicies",
135
+ "iam:ListInstanceProfilesForRole",
136
+ "iam:GetOpenIDConnectProvider",
137
+ "route53:GetHostedZone",
138
+ "route53:ListResourceRecordSets",
139
+ "route53:ListTagsForResource",
140
+ "acm:DescribeCertificate",
141
+ "acm:ListTagsForCertificate",
142
+ ]
143
+ Resource = "*"
144
+ },
145
+ {
146
+ Sid = "SecretsManagerReadOnly"
147
+ Effect = "Allow"
148
+ Action = [
149
+ "secretsmanager:DescribeSecret",
150
+ "secretsmanager:GetSecretValue",
151
+ "secretsmanager:GetResourcePolicy",
152
+ ]
153
+ Resource = "arn:aws:secretsmanager:${local.region}:${local.account_id}:secret:${local.project}-*"
154
+ },
155
+ ]
156
+ })
157
+ }
158
+
38
159
  resource "aws_iam_role_policy" "github_actions" {
39
160
  name = "${local.project}-github-actions"
40
161
  role = aws_iam_role.github_actions.id
@@ -54,6 +175,15 @@ resource "aws_iam_role_policy" "github_actions" {
54
175
  "ecr:InitiateLayerUpload",
55
176
  "ecr:UploadLayerPart",
56
177
  "ecr:CompleteLayerUpload",
178
+ "ecr:CreateRepository",
179
+ "ecr:DeleteRepository",
180
+ "ecr:DescribeRepositories",
181
+ "ecr:TagResource",
182
+ "ecr:UntagResource",
183
+ "ecr:PutLifecyclePolicy",
184
+ "ecr:GetLifecyclePolicy",
185
+ "ecr:DeleteLifecyclePolicy",
186
+ "ecr:ListTagsForResource",
57
187
  ]
58
188
  Resource = "*"
59
189
  },
@@ -61,18 +191,72 @@ resource "aws_iam_role_policy" "github_actions" {
61
191
  Sid = "ECS"
62
192
  Effect = "Allow"
63
193
  Action = [
194
+ "ecs:CreateCluster",
195
+ "ecs:DeleteCluster",
196
+ "ecs:DescribeClusters",
197
+ "ecs:CreateService",
64
198
  "ecs:UpdateService",
199
+ "ecs:DeleteService",
65
200
  "ecs:DescribeServices",
66
201
  "ecs:DescribeTaskDefinition",
67
202
  "ecs:RegisterTaskDefinition",
68
- "iam:PassRole",
203
+ "ecs:DeregisterTaskDefinition",
204
+ "ecs:ListTaskDefinitions",
205
+ "ecs:TagResource",
206
+ "ecs:UntagResource",
207
+ "ecs:ListTagsForResource",
69
208
  ]
70
209
  Resource = "*"
71
210
  },
211
+ {
212
+ Sid = "IAMTerraform"
213
+ Effect = "Allow"
214
+ Action = [
215
+ "iam:CreateRole",
216
+ "iam:DeleteRole",
217
+ "iam:GetRole",
218
+ "iam:UpdateRole",
219
+ "iam:TagRole",
220
+ "iam:UntagRole",
221
+ "iam:ListRolePolicies",
222
+ "iam:ListAttachedRolePolicies",
223
+ "iam:ListInstanceProfilesForRole",
224
+ "iam:PutRolePolicy",
225
+ "iam:GetRolePolicy",
226
+ "iam:DeleteRolePolicy",
227
+ "iam:AttachRolePolicy",
228
+ "iam:DetachRolePolicy",
229
+ "iam:PassRole",
230
+ ]
231
+ Resource = [
232
+ "arn:aws:iam::${local.account_id}:role/${local.project}-*",
233
+ "arn:aws:iam::${local.account_id}:role/ecs-*",
234
+ ]
235
+ },
72
236
  {
73
237
  Sid = "S3"
74
238
  Effect = "Allow"
75
239
  Action = [
240
+ "s3:CreateBucket",
241
+ "s3:DeleteBucket",
242
+ "s3:GetBucketPolicy",
243
+ "s3:PutBucketPolicy",
244
+ "s3:DeleteBucketPolicy",
245
+ "s3:GetBucketAcl",
246
+ "s3:GetBucketCORS",
247
+ "s3:GetBucketWebsite",
248
+ "s3:GetBucketVersioning",
249
+ "s3:GetBucketLogging",
250
+ "s3:GetBucketRequestPayment",
251
+ "s3:GetBucketTagging",
252
+ "s3:PutBucketTagging",
253
+ "s3:GetAccelerateConfiguration",
254
+ "s3:GetBucketObjectLockConfiguration",
255
+ "s3:GetEncryptionConfiguration",
256
+ "s3:GetLifecycleConfiguration",
257
+ "s3:GetReplicationConfiguration",
258
+ "s3:GetBucketPublicAccessBlock",
259
+ "s3:PutBucketPublicAccessBlock",
76
260
  "s3:PutObject",
77
261
  "s3:GetObject",
78
262
  "s3:DeleteObject",
@@ -83,12 +267,185 @@ resource "aws_iam_role_policy" "github_actions" {
83
267
  "arn:aws:s3:::${local.project}-${local.account_id}/*",
84
268
  ]
85
269
  },
270
+ {
271
+ Sid = "TfState"
272
+ Effect = "Allow"
273
+ Action = [
274
+ "s3:GetObject",
275
+ "s3:PutObject",
276
+ "s3:DeleteObject",
277
+ "s3:ListBucket",
278
+ ]
279
+ Resource = [
280
+ "arn:aws:s3:::godd-notes-tfstate-${local.account_id}",
281
+ "arn:aws:s3:::godd-notes-tfstate-${local.account_id}/*",
282
+ ]
283
+ },
284
+ {
285
+ Sid = "TfStateLock"
286
+ Effect = "Allow"
287
+ Action = [
288
+ "dynamodb:GetItem",
289
+ "dynamodb:PutItem",
290
+ "dynamodb:DeleteItem",
291
+ ]
292
+ Resource = "arn:aws:dynamodb:${local.region}:${local.account_id}:table/godd-notes-tfstate-lock"
293
+ },
294
+ {
295
+ Sid = "TfStateKMS"
296
+ Effect = "Allow"
297
+ Action = [
298
+ "kms:Encrypt",
299
+ "kms:Decrypt",
300
+ "kms:GenerateDataKey",
301
+ "kms:DescribeKey",
302
+ ]
303
+ Resource = "*"
304
+ Condition = {
305
+ StringEquals = {
306
+ "kms:RequestAlias" = "alias/godd-tfstate"
307
+ }
308
+ }
309
+ },
86
310
  {
87
311
  Sid = "CloudFront"
88
312
  Effect = "Allow"
89
313
  Action = [
90
- "cloudfront:CreateInvalidation",
314
+ "cloudfront:CreateDistribution",
315
+ "cloudfront:UpdateDistribution",
316
+ "cloudfront:DeleteDistribution",
91
317
  "cloudfront:GetDistribution",
318
+ "cloudfront:TagResource",
319
+ "cloudfront:UntagResource",
320
+ "cloudfront:ListTagsForResource",
321
+ "cloudfront:CreateInvalidation",
322
+ "cloudfront:CreateOriginAccessControl",
323
+ "cloudfront:UpdateOriginAccessControl",
324
+ "cloudfront:DeleteOriginAccessControl",
325
+ "cloudfront:GetOriginAccessControl",
326
+ "cloudfront:ListOriginAccessControls",
327
+ ]
328
+ Resource = "*"
329
+ },
330
+ {
331
+ Sid = "VPC"
332
+ Effect = "Allow"
333
+ Action = [
334
+ "ec2:CreateVpc",
335
+ "ec2:DeleteVpc",
336
+ "ec2:DescribeVpcs",
337
+ "ec2:DescribeVpcAttribute",
338
+ "ec2:ModifyVpcAttribute",
339
+ "ec2:CreateSubnet",
340
+ "ec2:DeleteSubnet",
341
+ "ec2:DescribeSubnets",
342
+ "ec2:CreateInternetGateway",
343
+ "ec2:DeleteInternetGateway",
344
+ "ec2:AttachInternetGateway",
345
+ "ec2:DetachInternetGateway",
346
+ "ec2:DescribeInternetGateways",
347
+ "ec2:CreateRouteTable",
348
+ "ec2:DeleteRouteTable",
349
+ "ec2:DescribeRouteTables",
350
+ "ec2:CreateRoute",
351
+ "ec2:DeleteRoute",
352
+ "ec2:AssociateRouteTable",
353
+ "ec2:DisassociateRouteTable",
354
+ "ec2:CreateSecurityGroup",
355
+ "ec2:DeleteSecurityGroup",
356
+ "ec2:DescribeSecurityGroups",
357
+ "ec2:DescribeSecurityGroupRules",
358
+ "ec2:AuthorizeSecurityGroupIngress",
359
+ "ec2:RevokeSecurityGroupIngress",
360
+ "ec2:AuthorizeSecurityGroupEgress",
361
+ "ec2:RevokeSecurityGroupEgress",
362
+ "ec2:CreateTags",
363
+ "ec2:DeleteTags",
364
+ "ec2:DescribeTags",
365
+ "ec2:DescribeAccountAttributes",
366
+ "ec2:DescribeNetworkInterfaces",
367
+ "ec2:DescribeAvailabilityZones",
368
+ ]
369
+ Resource = "*"
370
+ },
371
+ {
372
+ Sid = "ALB"
373
+ Effect = "Allow"
374
+ Action = [
375
+ "elasticloadbalancing:CreateLoadBalancer",
376
+ "elasticloadbalancing:DeleteLoadBalancer",
377
+ "elasticloadbalancing:DescribeLoadBalancers",
378
+ "elasticloadbalancing:DescribeLoadBalancerAttributes",
379
+ "elasticloadbalancing:ModifyLoadBalancerAttributes",
380
+ "elasticloadbalancing:CreateTargetGroup",
381
+ "elasticloadbalancing:DeleteTargetGroup",
382
+ "elasticloadbalancing:DescribeTargetGroups",
383
+ "elasticloadbalancing:DescribeTargetGroupAttributes",
384
+ "elasticloadbalancing:ModifyTargetGroupAttributes",
385
+ "elasticloadbalancing:CreateListener",
386
+ "elasticloadbalancing:DeleteListener",
387
+ "elasticloadbalancing:DescribeListeners",
388
+ "elasticloadbalancing:ModifyListener",
389
+ "elasticloadbalancing:CreateRule",
390
+ "elasticloadbalancing:DeleteRule",
391
+ "elasticloadbalancing:DescribeRules",
392
+ "elasticloadbalancing:ModifyRule",
393
+ "elasticloadbalancing:AddTags",
394
+ "elasticloadbalancing:RemoveTags",
395
+ "elasticloadbalancing:DescribeTags",
396
+ "elasticloadbalancing:SetSecurityGroups",
397
+ "elasticloadbalancing:SetSubnets",
398
+ ]
399
+ Resource = "*"
400
+ },
401
+ {
402
+ Sid = "RDS"
403
+ Effect = "Allow"
404
+ Action = [
405
+ "rds:CreateDBInstance",
406
+ "rds:DeleteDBInstance",
407
+ "rds:DescribeDBInstances",
408
+ "rds:ModifyDBInstance",
409
+ "rds:CreateDBSubnetGroup",
410
+ "rds:DeleteDBSubnetGroup",
411
+ "rds:DescribeDBSubnetGroups",
412
+ "rds:AddTagsToResource",
413
+ "rds:RemoveTagsFromResource",
414
+ "rds:ListTagsForResource",
415
+ ]
416
+ Resource = "*"
417
+ },
418
+ {
419
+ Sid = "SecretsManager"
420
+ Effect = "Allow"
421
+ Action = [
422
+ "secretsmanager:CreateSecret",
423
+ "secretsmanager:DeleteSecret",
424
+ "secretsmanager:DescribeSecret",
425
+ "secretsmanager:GetSecretValue",
426
+ "secretsmanager:PutSecretValue",
427
+ "secretsmanager:UpdateSecret",
428
+ "secretsmanager:TagResource",
429
+ "secretsmanager:UntagResource",
430
+ "secretsmanager:GetResourcePolicy",
431
+ "secretsmanager:PutResourcePolicy",
432
+ "secretsmanager:DeleteResourcePolicy",
433
+ ]
434
+ Resource = "arn:aws:secretsmanager:${local.region}:${local.account_id}:secret:${local.project}-*"
435
+ },
436
+ {
437
+ Sid = "CloudWatchLogs"
438
+ Effect = "Allow"
439
+ Action = [
440
+ "logs:CreateLogGroup",
441
+ "logs:DeleteLogGroup",
442
+ "logs:DescribeLogGroups",
443
+ "logs:PutRetentionPolicy",
444
+ "logs:TagResource",
445
+ "logs:UntagResource",
446
+ "logs:ListTagsForResource",
447
+ "logs:DescribeLogStreams",
448
+ "logs:GetLogEvents",
92
449
  ]
93
450
  Resource = "*"
94
451
  },