@grepr/cli 1.14.13-7f3738f → 1.15.0-48d68ee

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 (85) hide show
  1. package/build/dist/commands/job-draft-command.d.ts.map +1 -1
  2. package/build/dist/commands/job-draft-command.js +6 -71
  3. package/build/dist/commands/job-draft-command.js.map +1 -1
  4. package/build/dist/docs-index/index.json +1 -1
  5. package/build/dist/grepr.d.ts.map +1 -1
  6. package/build/dist/grepr.js +0 -2
  7. package/build/dist/grepr.js.map +1 -1
  8. package/build/dist/lib/backfill.js +4 -8
  9. package/build/dist/lib/backfill.js.map +1 -1
  10. package/build/dist/lib/job-patch.d.ts +15 -31
  11. package/build/dist/lib/job-patch.d.ts.map +1 -1
  12. package/build/dist/lib/job-patch.js +39 -709
  13. package/build/dist/lib/job-patch.js.map +1 -1
  14. package/build/dist/lib/job-plan.d.ts +3 -6
  15. package/build/dist/lib/job-plan.d.ts.map +1 -1
  16. package/build/dist/lib/job-plan.js +5 -55
  17. package/build/dist/lib/job-plan.js.map +1 -1
  18. package/build/dist/lib/option-parsers.d.ts +0 -5
  19. package/build/dist/lib/option-parsers.d.ts.map +1 -1
  20. package/build/dist/lib/option-parsers.js +0 -7
  21. package/build/dist/lib/option-parsers.js.map +1 -1
  22. package/build/dist/lib/signal-source.d.ts +1 -1
  23. package/build/dist/lib/signal-source.d.ts.map +1 -1
  24. package/build/dist/lib/signal-source.js +10 -69
  25. package/build/dist/lib/signal-source.js.map +1 -1
  26. package/build/dist/openapi/openApiTypes.d.ts +238 -16
  27. package/build/dist/openapi/openApiTypes.d.ts.map +1 -1
  28. package/build/dist/openapi/openApiTypes.js +26 -0
  29. package/build/dist/openapi/openApiTypes.js.map +1 -1
  30. package/build/dist/openapi-docs/api/Agents/create_2.md +1 -1
  31. package/build/dist/openapi-docs/api/Agents/investigations.md +1 -1
  32. package/build/dist/openapi-docs/api/Agents/update.md +1 -1
  33. package/build/dist/openapi-docs/api/Datasets/getDatasetDataTypes.md +25 -0
  34. package/build/dist/openapi-docs/schemas/AgentConfigCreate.md +6 -0
  35. package/build/dist/openapi-docs/schemas/AgentConfigPayload.md +6 -0
  36. package/build/dist/openapi-docs/schemas/AgentConfigUpdate.md +6 -0
  37. package/build/dist/openapi-docs/schemas/AgentDecisionConfiguration.md +19 -0
  38. package/build/dist/openapi-docs/schemas/AgentSchedule.md +16 -0
  39. package/build/dist/openapi-docs/schemas/AnalyticsDiagnostic.md +4 -1
  40. package/build/dist/openapi-docs/schemas/AnalyticsDiagnosticRange.md +19 -0
  41. package/build/dist/openapi-docs/schemas/AnalyticsDraftRequest.md +2 -2
  42. package/build/dist/openapi-docs/schemas/AnalyticsField.md +6 -0
  43. package/build/dist/openapi-docs/schemas/AnalyticsQuery.md +3 -0
  44. package/build/dist/openapi-docs/schemas/AnalyticsResultGrouping.md +23 -0
  45. package/build/dist/openapi-docs/schemas/AnalyticsResultShape.md +22 -0
  46. package/build/dist/openapi-docs/schemas/AnalyticsTableBinding.md +1 -1
  47. package/build/dist/openapi-docs/schemas/AnalyticsVocabularyResponse.md +4 -0
  48. package/build/dist/openapi-docs/schemas/AthenaAgentSessionsSource.md +1 -1
  49. package/build/dist/openapi-docs/schemas/AthenaAnalyticsSource.md +3 -3
  50. package/build/dist/openapi-docs/schemas/ChangeFinding.md +1 -1
  51. package/build/dist/openapi-docs/schemas/DatasetDataTypes.md +9 -0
  52. package/build/dist/openapi-docs/schemas/DecisionOutcome.md +11 -0
  53. package/build/dist/openapi-docs/schemas/EventRecord.md +11 -0
  54. package/build/dist/openapi-docs/schemas/InvestigationSummary.md +1 -1
  55. package/build/dist/openapi-docs/schemas/InvestigationTranscript.md +4 -1
  56. package/build/dist/openapi-docs/schemas/IssueRun.md +1 -1
  57. package/build/dist/openapi-docs/schemas/PipelineChangeRequest.md +4 -0
  58. package/build/dist/openapi-docs/schemas/SignalDecision.md +14 -0
  59. package/build/dist/openapi-docs/schemas/SqlAnalyticsQuery.md +29 -0
  60. package/build/dist/openapi-docs/schemas/SqlAnalyticsTable.md +16 -0
  61. package/build/dist/openapi-docs/schemas/TrinoAnalyticsSource.md +3 -3
  62. package/build/dist/openapi-docs/schemas/TrinoRawLogsSource.md +1 -1
  63. package/build/dist/openapi-docs/schemas/TrinoRawSpanSource.md +1 -1
  64. package/build/dist/openapi-docs/schemas/TrinoReducerLogSource.md +1 -1
  65. package/build/dist/types.d.ts +8 -37
  66. package/build/dist/types.d.ts.map +1 -1
  67. package/build/dist/types.js +0 -69
  68. package/build/dist/types.js.map +1 -1
  69. package/package.json +1 -1
  70. package/build/dist/commands/job-to-test-command.d.ts +0 -74
  71. package/build/dist/commands/job-to-test-command.d.ts.map +0 -1
  72. package/build/dist/commands/job-to-test-command.js +0 -161
  73. package/build/dist/commands/job-to-test-command.js.map +0 -1
  74. package/build/dist/lib/job-graph-log-pipeline-constants.d.ts +0 -12
  75. package/build/dist/lib/job-graph-log-pipeline-constants.d.ts.map +0 -1
  76. package/build/dist/lib/job-graph-log-pipeline-constants.js +0 -16
  77. package/build/dist/lib/job-graph-log-pipeline-constants.js.map +0 -1
  78. package/build/dist/lib/job-graph-transformer.d.ts +0 -119
  79. package/build/dist/lib/job-graph-transformer.d.ts.map +0 -1
  80. package/build/dist/lib/job-graph-transformer.js +0 -767
  81. package/build/dist/lib/job-graph-transformer.js.map +0 -1
  82. package/build/dist/lib/job-graph-utils.d.ts +0 -50
  83. package/build/dist/lib/job-graph-utils.d.ts.map +0 -1
  84. package/build/dist/lib/job-graph-utils.js +0 -90
  85. package/build/dist/lib/job-graph-utils.js.map +0 -1
@@ -1,119 +0,0 @@
1
- /**
2
- * Job graph transformation utilities for converting production jobs to test configurations.
3
- *
4
- * This module provides functions to transform a production job definition into a test job
5
- * by replacing sources, sinks, and adding test-specific tagging. The transformations are
6
- * purely functional - they do not make any API calls or create resources.
7
- *
8
- * Key transformations:
9
- * - Source replacement: Replace vendor sources with dataset queries or keep originals with limits
10
- * - Sink replacement: Replace vendor sinks with synchronous test sinks or test dataset sinks
11
- * - Test tagging: Add test run ID and sink name tags to track test data
12
- *
13
- * The transformed job can then be executed using the standard job:create command.
14
- */
15
- import { JobExecution, JobProcessing } from '../types.js';
16
- import { SchemaCreateJob } from '../openapi/openApiTypes.js';
17
- /**
18
- * Options for transforming a job to a test configuration.
19
- */
20
- export interface JobToTestOptions {
21
- /** Target execution type (default: keep original) */
22
- execution?: JobExecution;
23
- /** Target processing type (default: keep original) */
24
- processing?: JobProcessing;
25
- /** Path to sample data file (not yet implemented) */
26
- sampleDataFile?: string;
27
- /** Dataset ID to use as data source (requires start and end) */
28
- datasetId?: string;
29
- /** Query to filter dataset source data (optional, requires datasetId) */
30
- query?: string;
31
- /** Start time for dataset query (ISO 8601 format) */
32
- start?: string;
33
- /** End time for dataset query (ISO 8601 format) */
34
- end?: string;
35
- /** Record limit for batch sources (default: 1000) */
36
- limitRecords?: number;
37
- /** Dataset ID for async test output (enables tagging) */
38
- testDataset?: string;
39
- /** Custom test run identifier (default: auto-generated) */
40
- testTag?: string;
41
- /** Custom test job name (default: {original}_test) */
42
- testName?: string;
43
- /**
44
- * Tuning for the logs-event-sampler inserted after each live source in a
45
- * source-preserving draft. Omitted fields fall back to the UI's draft
46
- * defaults (see {@link DEFAULT_DRAFT_SAMPLER_BURST}).
47
- */
48
- sampler?: DraftSamplerOptions;
49
- }
50
- /** Sampler knobs for a source-preserving draft, mirroring the UI's logs-event-sampler. */
51
- export interface DraftSamplerOptions {
52
- /** `maxAllowedRate` in messages/sec; omitted -> server default applies. */
53
- maxAllowedRate?: number;
54
- /** `maxBurstLimit` in messages; omitted -> {@link DEFAULT_DRAFT_SAMPLER_BURST}. */
55
- maxBurstLimit?: number;
56
- }
57
- /**
58
- * Default `maxBurstLimit` for a draft logs-event-sampler. Matches the UI's
59
- * template-draft fallback (`logSampler?.maxBurstLimit ?? 1000`) so CLI raw-job
60
- * drafts sample at the same rate as the UI's template drafts. `maxAllowedRate`
61
- * has no CLI default: when unset we omit it and let the server default apply,
62
- * exactly as the UI does.
63
- */
64
- export declare const DEFAULT_DRAFT_SAMPLER_BURST = 1000;
65
- /**
66
- * Transforms a production job configuration into a test job configuration.
67
- *
68
- * This is the main entry point for job transformation. It applies the following changes:
69
- * 1. Renames the job (appends "_test" or uses custom name)
70
- * 2. Updates execution and processing types if specified
71
- * 3. Adds test run ID tag to job tags
72
- * 4. Transforms sources (replace with dataset query, sample data, or add limits)
73
- * 5. Transforms sinks (replace with sync sink or test dataset sinks)
74
- * 6. Adds test tagging operations before sinks
75
- *
76
- * The transformation is purely functional and does not make any API calls.
77
- *
78
- * @param originalJob - The production job to transform
79
- * @param options - Transformation options
80
- * @returns A new job configuration suitable for testing
81
- * @throws Error if job graph is missing or invalid
82
- *
83
- * @example
84
- * const testJob = transformJobToTest(prodJob, {
85
- * execution: 'SYNCHRONOUS',
86
- * processing: 'BATCH',
87
- * datasetId: 'my_dataset',
88
- * start: '2025-01-01T00:00:00Z',
89
- * end: '2025-01-01T01:00:00Z',
90
- * limitRecords: 100
91
- * });
92
- */
93
- export declare function transformJobToTest(originalJob: SchemaCreateJob, options: JobToTestOptions): SchemaCreateJob;
94
- /**
95
- * Build a source-preserving draft from a job-graph pipeline: keep the proposed
96
- * source vertices streaming live (so add/remove-source edits are exercised),
97
- * interpose a logs-event-sampler after each live source to bound per-source
98
- * volume, strip production sinks, and fan output into a shared logs-sync-sink.
99
- * Mirrors the UI's template draft mode for raw (non-templated) jobs. Verifies
100
- * the graph runs, not external sink delivery.
101
- */
102
- export declare function transformJobGraphToSourcePreservingDraft(originalJob: SchemaCreateJob, options?: JobToTestOptions): SchemaCreateJob;
103
- /**
104
- * Displays a summary of the transformations applied to a job.
105
- *
106
- * This shows a before/after comparison including:
107
- * - Job name changes
108
- * - Execution type changes
109
- * - Processing type changes
110
- * - operation and edge changes
111
- * - Test run ID
112
- *
113
- * The output is formatted for console display.
114
- *
115
- * @param originalJob - The original production job
116
- * @param transformedJob - The transformed test job
117
- */
118
- export declare function showDiff(originalJob: SchemaCreateJob, transformedJob: SchemaCreateJob): void;
119
- //# sourceMappingURL=job-graph-transformer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"job-graph-transformer.d.ts","sourceRoot":"","sources":["../../../src/main/typescript/lib/job-graph-transformer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAiC,YAAY,EAAE,aAAa,EAAyB,MAAM,aAAa,CAAC;AAChH,OAAO,EAGL,eAAe,EAmBhB,MAAM,wBAAwB,CAAC;AAchC;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,qDAAqD;IACrD,SAAS,CAAC,EAAE,YAAY,CAAC;IAEzB,sDAAsD;IACtD,UAAU,CAAC,EAAE,aAAa,CAAC;IAE3B,qDAAqD;IACrD,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB,gEAAgE;IAChE,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,yEAAyE;IACzE,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,qDAAqD;IACrD,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,mDAAmD;IACnD,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb,qDAAqD;IACrD,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,yDAAyD;IACzD,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,2DAA2D;IAC3D,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,sDAAsD;IACtD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;OAIG;IACH,OAAO,CAAC,EAAE,mBAAmB,CAAC;CAC/B;AAED,0FAA0F;AAC1F,MAAM,WAAW,mBAAmB;IAClC,2EAA2E;IAC3E,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,mFAAmF;IACnF,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B,OAAO,CAAC;AAEhD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,kBAAkB,CAChC,WAAW,EAAE,eAAe,EAC5B,OAAO,EAAE,gBAAgB,GACxB,eAAe,CAwDjB;AA+dD;;;;;;;GAOG;AACH,wBAAgB,wCAAwC,CACtD,WAAW,EAAE,eAAe,EAC5B,OAAO,GAAE,gBAAqB,GAC7B,eAAe,CAqFjB;AA8ID;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,QAAQ,CACtB,WAAW,EAAE,eAAe,EAC5B,cAAc,EAAE,eAAe,GAC9B,IAAI,CA4EN"}