@blogic-cz/agent-tools 1.4.1 → 1.5.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 (92) hide show
  1. package/README.md +16 -2
  2. package/dist/az-tool/config.d.ts.map +1 -1
  3. package/dist/az-tool/profile.d.ts.map +1 -1
  4. package/dist/az-tool/service.d.ts +2 -2
  5. package/dist/azdo-tool/build.d.ts +8 -8
  6. package/dist/azdo-tool/config.d.ts.map +1 -1
  7. package/dist/azdo-tool/service.d.ts +2 -2
  8. package/dist/config/loader.d.ts.map +1 -1
  9. package/dist/config/types.d.ts +2 -0
  10. package/dist/config/types.d.ts.map +1 -1
  11. package/dist/credential-guard/index.d.ts.map +1 -1
  12. package/dist/db-tool/schema.d.ts.map +1 -1
  13. package/dist/db-tool/service.d.ts +1 -1
  14. package/dist/db-tool/sql-client.d.ts.map +1 -1
  15. package/dist/gh-tool/api.d.ts.map +1 -1
  16. package/dist/gh-tool/config.d.ts.map +1 -1
  17. package/dist/gh-tool/gist.d.ts.map +1 -1
  18. package/dist/gh-tool/issue/commands.d.ts +1 -1
  19. package/dist/gh-tool/issue/triage.d.ts +1 -1
  20. package/dist/gh-tool/issue/triage.d.ts.map +1 -1
  21. package/dist/gh-tool/pr/commands.d.ts +10 -10
  22. package/dist/gh-tool/pr/commands.d.ts.map +1 -1
  23. package/dist/gh-tool/pr/core.d.ts +19 -19
  24. package/dist/gh-tool/pr/core.d.ts.map +1 -1
  25. package/dist/gh-tool/pr/stack.d.ts +13 -13
  26. package/dist/gh-tool/repo.d.ts +1 -1
  27. package/dist/gh-tool/service.d.ts +1 -1
  28. package/dist/gh-tool/text-input.d.ts.map +1 -1
  29. package/dist/gh-tool/workflow.d.ts +7 -7
  30. package/dist/gh-tool/workflow.d.ts.map +1 -1
  31. package/dist/k8s-tool/context.d.ts.map +1 -1
  32. package/dist/k8s-tool/security.d.ts.map +1 -1
  33. package/dist/k8s-tool/service.d.ts +2 -2
  34. package/dist/logs-tool/index.d.ts +1 -1
  35. package/dist/logs-tool/index.d.ts.map +1 -1
  36. package/dist/logs-tool/service.d.ts.map +1 -1
  37. package/dist/observability-tool/shared.d.ts.map +1 -1
  38. package/dist/session-tool/claude-code.d.ts.map +1 -1
  39. package/dist/session-tool/codex.d.ts +3 -1
  40. package/dist/session-tool/codex.d.ts.map +1 -1
  41. package/dist/session-tool/index.d.ts +1 -1
  42. package/dist/session-tool/index.d.ts.map +1 -1
  43. package/dist/session-tool/pi.d.ts.map +1 -1
  44. package/dist/session-tool/service.d.ts.map +1 -1
  45. package/dist/session-tool/summaries.d.ts.map +1 -1
  46. package/dist/session-tool/types.d.ts.map +1 -1
  47. package/dist/shared/audit.d.ts.map +1 -1
  48. package/dist/shared/azure-credentials.d.ts.map +1 -1
  49. package/dist/shared/binary-preflight.d.ts.map +1 -1
  50. package/dist/shared/cli.d.ts.map +1 -1
  51. package/dist/shared/error-renderer.d.ts.map +1 -1
  52. package/dist/shared/exec.d.ts.map +1 -1
  53. package/dist/shared/format.d.ts.map +1 -1
  54. package/dist/shared/path.d.ts.map +1 -1
  55. package/dist/shared/poll-until-resolved.d.ts.map +1 -1
  56. package/dist/shared/prerequisites/driver-commands.d.ts.map +1 -1
  57. package/dist/shared/prerequisites/errors.d.ts.map +1 -1
  58. package/dist/shared/prerequisites/guardian.d.ts.map +1 -1
  59. package/dist/shared/prerequisites/runtime.d.ts.map +1 -1
  60. package/dist/shared/prerequisites/store.d.ts.map +1 -1
  61. package/dist/shared/retry-transient.d.ts.map +1 -1
  62. package/dist/shared/schema-dump.d.ts.map +1 -1
  63. package/dist/shared/throttle.d.ts.map +1 -1
  64. package/package.json +13 -13
  65. package/schemas/agent-tools.schema.json +8 -0
  66. package/src/audit-tool/index.ts +4 -4
  67. package/src/az-tool/index.ts +4 -4
  68. package/src/azdo-tool/index.ts +11 -11
  69. package/src/config/loader.ts +1 -0
  70. package/src/config/types.ts +2 -0
  71. package/src/credential-guard/claude-hook.ts +8 -2
  72. package/src/credential-guard/index.ts +212 -3
  73. package/src/db-tool/index.ts +12 -12
  74. package/src/gh-tool/branch.ts +4 -4
  75. package/src/gh-tool/gist.ts +20 -20
  76. package/src/gh-tool/issue/commands.ts +33 -33
  77. package/src/gh-tool/issue/triage.ts +5 -5
  78. package/src/gh-tool/pr/commands.ts +108 -112
  79. package/src/gh-tool/pr/core.ts +4 -6
  80. package/src/gh-tool/release.ts +30 -30
  81. package/src/gh-tool/repo.ts +7 -7
  82. package/src/gh-tool/workflow.ts +24 -24
  83. package/src/k8s-tool/index.ts +21 -21
  84. package/src/logs-tool/index.ts +7 -10
  85. package/src/logs-tool/transformers.ts +1 -1
  86. package/src/observability-tool/logs.ts +4 -4
  87. package/src/observability-tool/metrics.ts +4 -4
  88. package/src/observability-tool/shared.ts +2 -2
  89. package/src/observability-tool/trace.ts +10 -10
  90. package/src/session-tool/index.ts +8 -14
  91. package/src/shared/format.ts +1 -1
  92. package/src/shared/log-transform.ts +1 -1
@@ -529,12 +529,10 @@ export const detectPRStatus = Effect.fn("pr.detectPRStatus")(function* () {
529
529
  },
530
530
  { concurrency: "unbounded" },
531
531
  ).pipe(
532
- Effect.map(
533
- (r): BranchResult => ({
534
- branch: branchName,
535
- ...r,
536
- }),
537
- ),
532
+ Effect.map((r): BranchResult => ({
533
+ branch: branchName,
534
+ ...r,
535
+ })),
538
536
  ),
539
537
  ),
540
538
  { concurrency: "unbounded" },
@@ -348,53 +348,53 @@ const releaseStatus = Effect.fn("release.releaseStatus")(function* (repo: string
348
348
  export const releaseCreateCommand = Command.make(
349
349
  "create",
350
350
  {
351
- body: Flag.string("body").pipe(
351
+ body: Flag.String("body").pipe(
352
352
  Flag.withDescription("Release notes body (markdown)"),
353
353
  Flag.optional,
354
354
  ),
355
- bodyFile: Flag.string("body-file").pipe(
355
+ bodyFile: Flag.String("body-file").pipe(
356
356
  Flag.withDescription("Read release notes body from a file path or '-' for stdin"),
357
357
  Flag.optional,
358
358
  ),
359
- draft: Flag.boolean("draft").pipe(
359
+ draft: Flag.Boolean("draft").pipe(
360
360
  Flag.withDescription("Create as draft release"),
361
361
  Flag.withDefault(false),
362
362
  ),
363
363
  format: formatOption,
364
- generateNotes: Flag.boolean("generate-notes").pipe(
364
+ generateNotes: Flag.Boolean("generate-notes").pipe(
365
365
  Flag.withDescription("Automatically generate release notes"),
366
366
  Flag.withDefault(false),
367
367
  ),
368
- latest: Flag.boolean("latest").pipe(
368
+ latest: Flag.Boolean("latest").pipe(
369
369
  Flag.withDescription("Mark this release as latest (true/false). Omit to leave unchanged"),
370
370
  Flag.optional,
371
371
  ),
372
- notesFile: Flag.string("notes-file").pipe(
372
+ notesFile: Flag.String("notes-file").pipe(
373
373
  Flag.withDescription("Path to release notes file (passed to gh --notes-file)"),
374
374
  Flag.optional,
375
375
  ),
376
- notesStartTag: Flag.string("notes-start-tag").pipe(
376
+ notesStartTag: Flag.String("notes-start-tag").pipe(
377
377
  Flag.withDescription("Tag to start generating notes from"),
378
378
  Flag.optional,
379
379
  ),
380
- prerelease: Flag.boolean("prerelease").pipe(
380
+ prerelease: Flag.Boolean("prerelease").pipe(
381
381
  Flag.withDescription("Mark as pre-release"),
382
382
  Flag.withDefault(false),
383
383
  ),
384
- repo: Flag.string("repo").pipe(
384
+ repo: Flag.String("repo").pipe(
385
385
  Flag.withDescription("Target repository (owner/name). Defaults to current repo"),
386
386
  Flag.optional,
387
387
  ),
388
- tag: Flag.string("tag").pipe(Flag.withDescription("Tag name for release (e.g., v1.2.3)")),
389
- target: Flag.string("target").pipe(
388
+ tag: Flag.String("tag").pipe(Flag.withDescription("Tag name for release (e.g., v1.2.3)")),
389
+ target: Flag.String("target").pipe(
390
390
  Flag.withDescription("Target branch or commit SHA for tag"),
391
391
  Flag.optional,
392
392
  ),
393
- title: Flag.string("title").pipe(
393
+ title: Flag.String("title").pipe(
394
394
  Flag.withDescription("Release title (defaults to tag)"),
395
395
  Flag.optional,
396
396
  ),
397
- verifyTag: Flag.boolean("verify-tag").pipe(
397
+ verifyTag: Flag.Boolean("verify-tag").pipe(
398
398
  Flag.withDescription("Abort if tag does not already exist in remote"),
399
399
  Flag.withDefault(false),
400
400
  ),
@@ -452,11 +452,11 @@ export const releaseListCommand = Command.make(
452
452
  "list",
453
453
  {
454
454
  format: formatOption,
455
- limit: Flag.integer("limit").pipe(
455
+ limit: Flag.Int("limit").pipe(
456
456
  Flag.withDescription("Maximum number of releases to return"),
457
457
  Flag.withDefault(10),
458
458
  ),
459
- repo: Flag.string("repo").pipe(
459
+ repo: Flag.String("repo").pipe(
460
460
  Flag.withDescription("Target repository (owner/name). Defaults to current repo"),
461
461
  Flag.optional,
462
462
  ),
@@ -476,11 +476,11 @@ export const releaseViewCommand = Command.make(
476
476
  "view",
477
477
  {
478
478
  format: formatOption,
479
- repo: Flag.string("repo").pipe(
479
+ repo: Flag.String("repo").pipe(
480
480
  Flag.withDescription("Target repository (owner/name). Defaults to current repo"),
481
481
  Flag.optional,
482
482
  ),
483
- tag: Flag.string("tag").pipe(Flag.withDescription("Release tag to view (e.g., v1.2.3)")),
483
+ tag: Flag.String("tag").pipe(Flag.withDescription("Release tag to view (e.g., v1.2.3)")),
484
484
  },
485
485
  ({ format, repo, tag }) =>
486
486
  Effect.gen(function* () {
@@ -496,33 +496,33 @@ export const releaseViewCommand = Command.make(
496
496
  export const releaseEditCommand = Command.make(
497
497
  "edit",
498
498
  {
499
- body: Flag.string("body").pipe(
499
+ body: Flag.String("body").pipe(
500
500
  Flag.withDescription("New release notes body (markdown)"),
501
501
  Flag.optional,
502
502
  ),
503
- bodyFile: Flag.string("body-file").pipe(
503
+ bodyFile: Flag.String("body-file").pipe(
504
504
  Flag.withDescription("Read release notes body from a file path or '-' for stdin"),
505
505
  Flag.optional,
506
506
  ),
507
- draft: Flag.boolean("draft").pipe(
507
+ draft: Flag.Boolean("draft").pipe(
508
508
  Flag.withDescription("Set draft status (true/false). Omit to keep current value"),
509
509
  Flag.optional,
510
510
  ),
511
511
  format: formatOption,
512
- latest: Flag.boolean("latest").pipe(
512
+ latest: Flag.Boolean("latest").pipe(
513
513
  Flag.withDescription("Set latest status (true/false). Omit to keep current value"),
514
514
  Flag.optional,
515
515
  ),
516
- prerelease: Flag.boolean("prerelease").pipe(
516
+ prerelease: Flag.Boolean("prerelease").pipe(
517
517
  Flag.withDescription("Set prerelease status (true/false). Omit to keep current value"),
518
518
  Flag.optional,
519
519
  ),
520
- repo: Flag.string("repo").pipe(
520
+ repo: Flag.String("repo").pipe(
521
521
  Flag.withDescription("Target repository (owner/name). Defaults to current repo"),
522
522
  Flag.optional,
523
523
  ),
524
- tag: Flag.string("tag").pipe(Flag.withDescription("Release tag to edit (e.g., v1.2.3)")),
525
- title: Flag.string("title").pipe(Flag.withDescription("New release title"), Flag.optional),
524
+ tag: Flag.String("tag").pipe(Flag.withDescription("Release tag to edit (e.g., v1.2.3)")),
525
+ title: Flag.String("title").pipe(Flag.withDescription("New release title"), Flag.optional),
526
526
  },
527
527
  ({ body, bodyFile, draft, format, latest, prerelease, repo, tag, title }) =>
528
528
  Effect.gen(function* () {
@@ -552,20 +552,20 @@ export const releaseEditCommand = Command.make(
552
552
  export const releaseDeleteCommand = Command.make(
553
553
  "delete",
554
554
  {
555
- cleanupTag: Flag.boolean("cleanup-tag").pipe(
555
+ cleanupTag: Flag.Boolean("cleanup-tag").pipe(
556
556
  Flag.withDescription("Also delete the git tag from remote"),
557
557
  Flag.withDefault(false),
558
558
  ),
559
- confirm: Flag.boolean("confirm").pipe(
559
+ confirm: Flag.Boolean("confirm").pipe(
560
560
  Flag.withDescription("Actually delete release (without this flag, only shows dry-run)"),
561
561
  Flag.withDefault(false),
562
562
  ),
563
563
  format: formatOption,
564
- repo: Flag.string("repo").pipe(
564
+ repo: Flag.String("repo").pipe(
565
565
  Flag.withDescription("Target repository (owner/name). Defaults to current repo"),
566
566
  Flag.optional,
567
567
  ),
568
- tag: Flag.string("tag").pipe(Flag.withDescription("Release tag to delete (e.g., v1.2.3)")),
568
+ tag: Flag.String("tag").pipe(Flag.withDescription("Release tag to delete (e.g., v1.2.3)")),
569
569
  },
570
570
  ({ cleanupTag, confirm, format, repo, tag }) =>
571
571
  Effect.gen(function* () {
@@ -584,7 +584,7 @@ export const releaseStatusCommand = Command.make(
584
584
  "status",
585
585
  {
586
586
  format: formatOption,
587
- repo: Flag.string("repo").pipe(
587
+ repo: Flag.String("repo").pipe(
588
588
  Flag.withDescription("Target repository (owner/name). Defaults to current repo"),
589
589
  Flag.optional,
590
590
  ),
@@ -89,7 +89,7 @@ const searchOrgCode = Effect.fn("repo.searchOrgCode")(function* (opts: {
89
89
  // CLI Commands
90
90
  // ---------------------------------------------------------------------------
91
91
 
92
- const repoOption = Flag.string("repo").pipe(
92
+ const repoOption = Flag.String("repo").pipe(
93
93
  Flag.withDescription("Target repository profile name or owner/name"),
94
94
  Flag.optional,
95
95
  );
@@ -114,12 +114,12 @@ export const repoListCommand = Command.make(
114
114
  "list",
115
115
  {
116
116
  format: formatOption,
117
- limit: Flag.integer("limit").pipe(
117
+ limit: Flag.Int("limit").pipe(
118
118
  Flag.withDescription("Maximum number of repositories to return"),
119
119
  Flag.withDefault(30),
120
120
  ),
121
- org: Flag.string("org").pipe(Flag.withDescription("GitHub organization slug")),
122
- visibility: Flag.choice("visibility", ["public", "private", "all"]).pipe(
121
+ org: Flag.String("org").pipe(Flag.withDescription("GitHub organization slug")),
122
+ visibility: Flag.Literals("visibility", ["public", "private", "all"]).pipe(
123
123
  Flag.withDescription("Filter by repository visibility"),
124
124
  Flag.optional,
125
125
  ),
@@ -141,12 +141,12 @@ export const repoSearchCodeCommand = Command.make(
141
141
  "search-code",
142
142
  {
143
143
  format: formatOption,
144
- limit: Flag.integer("limit").pipe(
144
+ limit: Flag.Int("limit").pipe(
145
145
  Flag.withDescription("Maximum number of results to return"),
146
146
  Flag.withDefault(30),
147
147
  ),
148
- org: Flag.string("org").pipe(Flag.withDescription("GitHub organization slug")),
149
- query: Flag.string("query").pipe(Flag.withDescription("Code search query")),
148
+ org: Flag.String("org").pipe(Flag.withDescription("GitHub organization slug")),
149
+ query: Flag.String("query").pipe(Flag.withDescription("Code search query")),
150
150
  },
151
151
  ({ format, limit, org, query }) =>
152
152
  Effect.gen(function* () {
@@ -50,7 +50,7 @@ export type LogEntry = {
50
50
  message: string;
51
51
  };
52
52
 
53
- const repoOption = Flag.string("repo").pipe(
53
+ const repoOption = Flag.String("repo").pipe(
54
54
  Flag.withDescription("Target repository profile name or owner/name. Defaults to current repo"),
55
55
  Flag.optional,
56
56
  );
@@ -686,17 +686,17 @@ export const fetchJobLogs = Effect.fn("workflow.fetchJobLogs")(function* (opts:
686
686
  export const workflowListCommand = Command.make(
687
687
  "list",
688
688
  {
689
- branch: Flag.string("branch").pipe(
689
+ branch: Flag.String("branch").pipe(
690
690
  Flag.withDescription("Filter by branch name"),
691
691
  Flag.optional,
692
692
  ),
693
693
  format: formatOption,
694
- limit: Flag.integer("limit").pipe(
694
+ limit: Flag.Int("limit").pipe(
695
695
  Flag.withDescription("Maximum number of runs to return"),
696
696
  Flag.withDefault(10),
697
697
  ),
698
698
  repo: repoOption,
699
- status: Flag.choice("status", [
699
+ status: Flag.Literals("status", [
700
700
  "queued",
701
701
  "in_progress",
702
702
  "completed",
@@ -710,7 +710,7 @@ export const workflowListCommand = Command.make(
710
710
  "timed_out",
711
711
  "waiting",
712
712
  ]).pipe(Flag.withDescription("Filter by run status"), Flag.optional),
713
- workflow: Flag.string("workflow").pipe(
713
+ workflow: Flag.String("workflow").pipe(
714
714
  Flag.withDescription("Filter by workflow file name (e.g., build-and-deploy.yml)"),
715
715
  Flag.optional,
716
716
  ),
@@ -736,7 +736,7 @@ export const workflowViewCommand = Command.make(
736
736
  {
737
737
  format: formatOption,
738
738
  repo: repoOption,
739
- run: Flag.integer("run").pipe(Flag.withDescription("Workflow run ID")),
739
+ run: Flag.Int("run").pipe(Flag.withDescription("Workflow run ID")),
740
740
  },
741
741
  ({ format, repo, run }) =>
742
742
  Effect.gen(function* () {
@@ -751,7 +751,7 @@ export const workflowJobsCommand = Command.make(
751
751
  {
752
752
  format: formatOption,
753
753
  repo: repoOption,
754
- run: Flag.integer("run").pipe(Flag.withDescription("Workflow run ID")),
754
+ run: Flag.Int("run").pipe(Flag.withDescription("Workflow run ID")),
755
755
  },
756
756
  ({ format, repo, run }) =>
757
757
  Effect.gen(function* () {
@@ -764,13 +764,13 @@ export const workflowJobsCommand = Command.make(
764
764
  export const workflowLogsCommand = Command.make(
765
765
  "logs",
766
766
  {
767
- failedOnly: Flag.boolean("failed-only").pipe(
767
+ failedOnly: Flag.Boolean("failed-only").pipe(
768
768
  Flag.withDescription("Only show logs from failed jobs (default: true)"),
769
769
  Flag.withDefault(true),
770
770
  ),
771
771
  format: formatOption,
772
772
  repo: repoOption,
773
- run: Flag.integer("run").pipe(Flag.withDescription("Workflow run ID")),
773
+ run: Flag.Int("run").pipe(Flag.withDescription("Workflow run ID")),
774
774
  },
775
775
  ({ failedOnly, format, repo, run }) =>
776
776
  Effect.gen(function* () {
@@ -788,13 +788,13 @@ export const workflowLogsCommand = Command.make(
788
788
  export const workflowRerunCommand = Command.make(
789
789
  "rerun",
790
790
  {
791
- failedOnly: Flag.boolean("failed-only").pipe(
791
+ failedOnly: Flag.Boolean("failed-only").pipe(
792
792
  Flag.withDescription("Only rerun failed jobs (default: true)"),
793
793
  Flag.withDefault(true),
794
794
  ),
795
795
  format: formatOption,
796
796
  repo: repoOption,
797
- run: Flag.integer("run").pipe(Flag.withDescription("Workflow run ID to rerun")),
797
+ run: Flag.Int("run").pipe(Flag.withDescription("Workflow run ID to rerun")),
798
798
  },
799
799
  ({ failedOnly, format, repo, run }) =>
800
800
  Effect.gen(function* () {
@@ -809,7 +809,7 @@ export const workflowCancelCommand = Command.make(
809
809
  {
810
810
  format: formatOption,
811
811
  repo: repoOption,
812
- run: Flag.integer("run").pipe(Flag.withDescription("Workflow run ID to cancel")),
812
+ run: Flag.Int("run").pipe(Flag.withDescription("Workflow run ID to cancel")),
813
813
  },
814
814
  ({ format, repo, run }) =>
815
815
  Effect.gen(function* () {
@@ -823,17 +823,17 @@ export const workflowRunCommand = Command.make(
823
823
  "run",
824
824
  {
825
825
  field: Param.variadic(
826
- Param.string(Param.flagKind, "field").pipe(
826
+ Param.String(Param.flagKind, "field").pipe(
827
827
  Param.withAlias("f"),
828
828
  Param.withDescription("Workflow input as key=value; may be repeated"),
829
829
  ),
830
830
  ),
831
831
  format: formatOption,
832
- ref: Flag.string("ref").pipe(
832
+ ref: Flag.String("ref").pipe(
833
833
  Flag.withDescription("Git ref to run the workflow on (branch, tag, or SHA)"),
834
834
  ),
835
835
  repo: repoOption,
836
- workflow: Flag.string("workflow").pipe(
836
+ workflow: Flag.String("workflow").pipe(
837
837
  Flag.withDescription("Workflow file name (e.g., build.yml) or workflow ID"),
838
838
  ),
839
839
  },
@@ -873,14 +873,14 @@ export const workflowWatchCommand = Command.make(
873
873
  "watch",
874
874
  {
875
875
  format: formatOption,
876
- frames: Flag.boolean("frames").pipe(
876
+ frames: Flag.Boolean("frames").pipe(
877
877
  Flag.withDescription(
878
878
  "Include the raw watch progress frames (large); omitted by default — final status/conclusion/jobs are always returned",
879
879
  ),
880
880
  ),
881
881
  repo: repoOption,
882
- run: Flag.integer("run").pipe(Flag.withDescription("Workflow run ID to watch")),
883
- timeout: Flag.integer("timeout").pipe(
882
+ run: Flag.Int("run").pipe(Flag.withDescription("Workflow run ID to watch")),
883
+ timeout: Flag.Int("timeout").pipe(
884
884
  Flag.withDescription(
885
885
  `Max seconds to block before returning a snapshot (default: ${DEFAULT_WATCH_RUN_TIMEOUT_SECONDS}, minimum 1)`,
886
886
  ),
@@ -902,20 +902,20 @@ export const workflowWatchCommand = Command.make(
902
902
  export const workflowJobLogsCommand = Command.make(
903
903
  "job-logs",
904
904
  {
905
- diagnose: Flag.boolean("diagnose").pipe(
905
+ diagnose: Flag.Boolean("diagnose").pipe(
906
906
  Flag.withDescription("Return concise failure diagnosis metadata without log entries"),
907
907
  Flag.withDefault(false),
908
908
  ),
909
- failedStepsOnly: Flag.boolean("failed-steps-only").pipe(
909
+ failedStepsOnly: Flag.Boolean("failed-steps-only").pipe(
910
910
  Flag.withDescription("Only show logs from failed steps (default: false)"),
911
911
  Flag.withDefault(false),
912
912
  ),
913
913
  format: formatOption,
914
- job: Flag.string("job").pipe(
914
+ job: Flag.String("job").pipe(
915
915
  Flag.withDescription("Job name to fetch logs for (exact or partial match)"),
916
916
  ),
917
917
  repo: repoOption,
918
- run: Flag.integer("run").pipe(Flag.withDescription("Workflow run ID")),
918
+ run: Flag.Int("run").pipe(Flag.withDescription("Workflow run ID")),
919
919
  },
920
920
  ({ diagnose, failedStepsOnly, format, job, repo, run }) =>
921
921
  Effect.gen(function* () {
@@ -945,12 +945,12 @@ export const workflowAnnotationsCommand = Command.make(
945
945
  "annotations",
946
946
  {
947
947
  format: formatOption,
948
- job: Flag.string("job").pipe(
948
+ job: Flag.String("job").pipe(
949
949
  Flag.withDescription("Filter to a specific job name (exact or partial match)"),
950
950
  Flag.optional,
951
951
  ),
952
952
  repo: repoOption,
953
- run: Flag.integer("run").pipe(Flag.withDescription("Workflow run ID")),
953
+ run: Flag.Int("run").pipe(Flag.withDescription("Workflow run ID")),
954
954
  },
955
955
  ({ format, job, repo, run }) =>
956
956
  Effect.gen(function* () {
@@ -188,18 +188,18 @@ const logTransformedResult = (
188
188
  });
189
189
 
190
190
  const commonFlags = {
191
- env: Flag.optional(Flag.string("env")).pipe(
191
+ env: Flag.optional(Flag.String("env")).pipe(
192
192
  Flag.withDescription(
193
193
  "Target environment (e.g. test, prod). Falls back to defaultEnvironment in config.",
194
194
  ),
195
195
  ),
196
- dryRun: Flag.boolean("dry-run").pipe(
196
+ dryRun: Flag.Boolean("dry-run").pipe(
197
197
  Flag.withAlias("d"),
198
198
  Flag.withDescription("Show command without executing"),
199
199
  Flag.withDefault(false),
200
200
  ),
201
201
  format: formatOption,
202
- profile: Flag.optional(Flag.string("profile")).pipe(
202
+ profile: Flag.optional(Flag.String("profile")).pipe(
203
203
  Flag.withDescription("Kubernetes profile name (if multiple configured)"),
204
204
  ),
205
205
  };
@@ -235,7 +235,7 @@ const kubectlCommand = Command.make(
235
235
  "kubectl",
236
236
  {
237
237
  ...commonFlags,
238
- cmd: Flag.string("cmd").pipe(
238
+ cmd: Flag.String("cmd").pipe(
239
239
  Flag.withDescription('kubectl command (without "kubectl" prefix)'),
240
240
  ),
241
241
  },
@@ -302,15 +302,15 @@ const podsCommand = Command.make(
302
302
  "pods",
303
303
  {
304
304
  ...commonFlags,
305
- namespace: Flag.string("namespace").pipe(
305
+ namespace: Flag.String("namespace").pipe(
306
306
  Flag.withDescription("Namespace to query"),
307
307
  Flag.optional,
308
308
  ),
309
- label: Flag.string("label").pipe(
309
+ label: Flag.String("label").pipe(
310
310
  Flag.withDescription("Label selector (key=value)"),
311
311
  Flag.optional,
312
312
  ),
313
- wide: Flag.boolean("wide").pipe(
313
+ wide: Flag.Boolean("wide").pipe(
314
314
  Flag.withDescription("Show additional pod information"),
315
315
  Flag.withDefault(false),
316
316
  ),
@@ -334,17 +334,17 @@ const logsCommand = Command.make(
334
334
  "logs",
335
335
  {
336
336
  ...commonFlags,
337
- pod: Flag.string("pod").pipe(Flag.withDescription("Pod name")),
338
- namespace: Flag.string("namespace").pipe(
337
+ pod: Flag.String("pod").pipe(Flag.withDescription("Pod name")),
338
+ namespace: Flag.String("namespace").pipe(
339
339
  Flag.withDescription("Namespace containing the pod"),
340
340
  Flag.optional,
341
341
  ),
342
- container: Flag.string("container").pipe(
342
+ container: Flag.String("container").pipe(
343
343
  Flag.withDescription("Container name (for multi-container pods)"),
344
344
  Flag.optional,
345
345
  ),
346
- tail: Flag.integer("tail").pipe(Flag.withDescription("Show last N log lines"), Flag.optional),
347
- follow: Flag.boolean("follow").pipe(
346
+ tail: Flag.Int("tail").pipe(Flag.withDescription("Show last N log lines"), Flag.optional),
347
+ follow: Flag.Boolean("follow").pipe(
348
348
  Flag.withAlias("f"),
349
349
  Flag.withDescription("Stream logs in real time"),
350
350
  Flag.withDefault(false),
@@ -374,11 +374,11 @@ const describeCommand = Command.make(
374
374
  "describe",
375
375
  {
376
376
  ...commonFlags,
377
- resource: Flag.string("resource").pipe(
377
+ resource: Flag.String("resource").pipe(
378
378
  Flag.withDescription("Resource type (pod, deploy, svc, etc.)"),
379
379
  ),
380
- name: Flag.string("name").pipe(Flag.withDescription("Resource name")),
381
- namespace: Flag.string("namespace").pipe(
380
+ name: Flag.String("name").pipe(Flag.withDescription("Resource name")),
381
+ namespace: Flag.String("namespace").pipe(
382
382
  Flag.withDescription("Namespace containing the resource"),
383
383
  Flag.optional,
384
384
  ),
@@ -398,15 +398,15 @@ const execCommand = Command.make(
398
398
  "exec",
399
399
  {
400
400
  ...commonFlags,
401
- pod: Flag.string("pod").pipe(Flag.withDescription("Pod name")),
402
- execCmd: Flag.string("exec-cmd").pipe(
401
+ pod: Flag.String("pod").pipe(Flag.withDescription("Pod name")),
402
+ execCmd: Flag.String("exec-cmd").pipe(
403
403
  Flag.withDescription("Allowlisted diagnostic: redis-cli PING/INFO or ls"),
404
404
  ),
405
- namespace: Flag.string("namespace").pipe(
405
+ namespace: Flag.String("namespace").pipe(
406
406
  Flag.withDescription("Namespace containing the pod"),
407
407
  Flag.optional,
408
408
  ),
409
- container: Flag.string("container").pipe(
409
+ container: Flag.String("container").pipe(
410
410
  Flag.withDescription("Container name (for multi-container pods)"),
411
411
  Flag.optional,
412
412
  ),
@@ -430,11 +430,11 @@ const topCommand = Command.make(
430
430
  "top",
431
431
  {
432
432
  ...commonFlags,
433
- namespace: Flag.string("namespace").pipe(
433
+ namespace: Flag.String("namespace").pipe(
434
434
  Flag.withDescription("Namespace to inspect"),
435
435
  Flag.optional,
436
436
  ),
437
- sortBy: Flag.choice("sort-by", ["cpu", "memory"] as const).pipe(
437
+ sortBy: Flag.Literals("sort-by", ["cpu", "memory"] as const).pipe(
438
438
  Flag.withDescription("Sort metrics output when supported by kubectl"),
439
439
  Flag.optional,
440
440
  ),
@@ -34,7 +34,7 @@ import { LogsConfigError, LogsNotFoundError, LogsReadError, LogsTimeoutError } f
34
34
  import { LogsService, LogsServiceLayer } from "./service";
35
35
 
36
36
  const profileOption = Flag.optional(
37
- Flag.string("profile").pipe(
37
+ Flag.String("profile").pipe(
38
38
  Flag.withDescription(
39
39
  "Named profile from agent-tools.json5 logs section (default: 'default' key or single entry)",
40
40
  ),
@@ -95,7 +95,7 @@ const buildSource = (
95
95
  const listCommand = Command.make(
96
96
  "list",
97
97
  {
98
- env: Flag.optional(Flag.string("env")).pipe(
98
+ env: Flag.optional(Flag.String("env")).pipe(
99
99
  Flag.withDescription(
100
100
  "Target environment (e.g. local, test, prod). Falls back to defaultEnvironment in config.",
101
101
  ),
@@ -148,29 +148,26 @@ const listCommand = Command.make(
148
148
  const readCommand = Command.make(
149
149
  "read",
150
150
  {
151
- env: Flag.optional(Flag.string("env")).pipe(
151
+ env: Flag.optional(Flag.String("env")).pipe(
152
152
  Flag.withDescription(
153
153
  "Target environment (e.g. local, test, prod). Falls back to defaultEnvironment in config.",
154
154
  ),
155
155
  ),
156
- file: Flag.string("file").pipe(
156
+ file: Flag.String("file").pipe(
157
157
  Flag.withDescription("Specific log file to read"),
158
158
  Flag.optional,
159
159
  ),
160
160
  format: formatOption,
161
- grep: Flag.string("grep").pipe(
161
+ grep: Flag.String("grep").pipe(
162
162
  Flag.withDescription("Filter lines containing case-insensitive literal text"),
163
163
  Flag.optional,
164
164
  ),
165
- pretty: Flag.boolean("pretty").pipe(
165
+ pretty: Flag.Boolean("pretty").pipe(
166
166
  Flag.withDescription("Pretty-print JSON log entries"),
167
167
  Flag.withDefault(false),
168
168
  ),
169
169
  profile: profileOption,
170
- tail: Flag.integer("tail").pipe(
171
- Flag.withDescription("Show last N lines"),
172
- Flag.withDefault(100),
173
- ),
170
+ tail: Flag.Int("tail").pipe(Flag.withDescription("Show last N lines"), Flag.withDefault(100)),
174
171
  },
175
172
  ({ env, file, format, grep, pretty, profile, tail }) =>
176
173
  Effect.gen(function* () {
@@ -204,7 +204,7 @@ function transformJsonLines(lines: ReadonlyArray<string>): string {
204
204
  const ordered = LEVEL_ORDER.flatMap((level) =>
205
205
  parsedLines
206
206
  .filter((entry) => entry.level === level)
207
- .sort((a, b) => a.originalIndex - b.originalIndex),
207
+ .toSorted((a, b) => a.originalIndex - b.originalIndex),
208
208
  );
209
209
 
210
210
  const output: Array<string> = [];
@@ -104,19 +104,19 @@ export function extractLogsFromDsQuery(response: {
104
104
  const queryCommand = Command.make(
105
105
  "query",
106
106
  {
107
- logql: Argument.string("logql"),
107
+ logql: Argument.String("logql"),
108
108
  format: formatOption,
109
109
  env: envOption,
110
110
  profile: profileOption,
111
- start: Flag.string("start").pipe(
111
+ start: Flag.String("start").pipe(
112
112
  Flag.withDescription("Start time (default: now-1h)"),
113
113
  Flag.withDefault("now-1h"),
114
114
  ),
115
- end: Flag.string("end").pipe(
115
+ end: Flag.String("end").pipe(
116
116
  Flag.withDescription("End time (default: now)"),
117
117
  Flag.withDefault("now"),
118
118
  ),
119
- limit: Flag.integer("limit").pipe(
119
+ limit: Flag.Int("limit").pipe(
120
120
  Flag.withDescription("Max log lines (default: 100)"),
121
121
  Flag.withDefault(100),
122
122
  ),
@@ -15,19 +15,19 @@ import {
15
15
  const queryCommand = Command.make(
16
16
  "query",
17
17
  {
18
- promql: Argument.string("promql"),
18
+ promql: Argument.String("promql"),
19
19
  format: formatOption,
20
20
  env: envOption,
21
21
  profile: profileOption,
22
- start: Flag.string("start").pipe(
22
+ start: Flag.String("start").pipe(
23
23
  Flag.withDescription("Start time (default: now-1h)"),
24
24
  Flag.withDefault("now-1h"),
25
25
  ),
26
- end: Flag.string("end").pipe(
26
+ end: Flag.String("end").pipe(
27
27
  Flag.withDescription("End time (default: now)"),
28
28
  Flag.withDefault("now"),
29
29
  ),
30
- step: Flag.integer("step").pipe(
30
+ step: Flag.Int("step").pipe(
31
31
  Flag.withDescription("Step in seconds (default: 60)"),
32
32
  Flag.withDefault(60),
33
33
  ),
@@ -34,13 +34,13 @@ export function formatObservabilityError(error: unknown): string {
34
34
  return String(error);
35
35
  }
36
36
 
37
- export const envOption = Flag.string("env").pipe(
37
+ export const envOption = Flag.String("env").pipe(
38
38
  Flag.withDescription("Target environment name from agent-tools config (default: local)"),
39
39
  Flag.withDefault("local"),
40
40
  );
41
41
 
42
42
  export const profileOption = Flag.optional(
43
- Flag.string("profile").pipe(
43
+ Flag.String("profile").pipe(
44
44
  Flag.withDescription(
45
45
  "Observability profile name from agent-tools config (default: 'default' key or single entry)",
46
46
  ),