deepline 0.3.97 → 0.3.98

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 (36) hide show
  1. package/dist/bundling-sources/sdk/src/client.ts +144 -4
  2. package/dist/bundling-sources/sdk/src/index.ts +17 -4
  3. package/dist/bundling-sources/sdk/src/monitor-fleets.ts +1 -0
  4. package/dist/bundling-sources/sdk/src/monitor-input-contract.ts +1 -0
  5. package/dist/bundling-sources/sdk/src/monitors.ts +8 -25
  6. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  7. package/dist/bundling-sources/shared_libs/integration-contracts/index.ts +1 -0
  8. package/dist/bundling-sources/shared_libs/integration-contracts/monitor-fleet-contract.ts +218 -16
  9. package/dist/bundling-sources/shared_libs/integration-contracts/monitor-input-contract.ts +455 -0
  10. package/dist/bundling-sources/shared_libs/monitors/fleets/plan.ts +6 -1
  11. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-batch-operation.ts +2 -1
  12. package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +12 -0
  13. package/dist/bundling-sources/shared_libs/observability/scheduled-work-manual.ts +1 -0
  14. package/dist/bundling-sources/shared_libs/play-runtime/internal-bootstrap-token.ts +19 -3
  15. package/dist/bundling-sources/shared_libs/plays/bundling/index.ts +5 -1
  16. package/dist/cli/index.js +1004 -289
  17. package/dist/cli/index.mjs +1004 -289
  18. package/dist/index.d.mts +43 -24
  19. package/dist/index.d.ts +43 -24
  20. package/dist/index.js +604 -41
  21. package/dist/index.mjs +600 -41
  22. package/dist/install-integrity.json +6 -0
  23. package/dist/monitor-fleet-contract.d.mts +44 -8
  24. package/dist/monitor-fleet-contract.d.ts +44 -8
  25. package/dist/monitor-fleet-contract.js +354 -27
  26. package/dist/monitor-fleet-contract.mjs +343 -27
  27. package/dist/monitor-input-contract.d.mts +33 -0
  28. package/dist/monitor-input-contract.d.ts +33 -0
  29. package/dist/monitor-input-contract.js +392 -0
  30. package/dist/monitor-input-contract.mjs +353 -0
  31. package/dist/plays/bundle-play-file.mjs +1 -1
  32. package/dist/release.d.mts +1 -1
  33. package/dist/release.d.ts +1 -1
  34. package/dist/release.js +1 -1
  35. package/dist/release.mjs +1 -1
  36. package/package.json +7 -1
@@ -12,6 +12,7 @@
12
12
  "dist/bundling-sources/sdk/src/index.ts",
13
13
  "dist/bundling-sources/sdk/src/monitor-fleet-contract.ts",
14
14
  "dist/bundling-sources/sdk/src/monitor-fleets.ts",
15
+ "dist/bundling-sources/sdk/src/monitor-input-contract.ts",
15
16
  "dist/bundling-sources/sdk/src/monitors.ts",
16
17
  "dist/bundling-sources/sdk/src/pagination.ts",
17
18
  "dist/bundling-sources/sdk/src/play.ts",
@@ -28,6 +29,7 @@
28
29
  "dist/bundling-sources/shared_libs/integration-contracts/bettercontact/execution-policy.ts",
29
30
  "dist/bundling-sources/shared_libs/integration-contracts/index.ts",
30
31
  "dist/bundling-sources/shared_libs/integration-contracts/monitor-fleet-contract.ts",
32
+ "dist/bundling-sources/shared_libs/integration-contracts/monitor-input-contract.ts",
31
33
  "dist/bundling-sources/shared_libs/integration-contracts/README.md",
32
34
  "dist/bundling-sources/shared_libs/integration-contracts/theirstack/execution-policy.ts",
33
35
  "dist/bundling-sources/shared_libs/monitors/analytics-install-guides.ts",
@@ -517,6 +519,10 @@
517
519
  "dist/monitor-fleet-contract.d.ts",
518
520
  "dist/monitor-fleet-contract.js",
519
521
  "dist/monitor-fleet-contract.mjs",
522
+ "dist/monitor-input-contract.d.mts",
523
+ "dist/monitor-input-contract.d.ts",
524
+ "dist/monitor-input-contract.js",
525
+ "dist/monitor-input-contract.mjs",
520
526
  "dist/plays/bundle-play-file.d.mts",
521
527
  "dist/plays/bundle-play-file.d.ts",
522
528
  "dist/plays/bundle-play-file.mjs",
@@ -12,12 +12,18 @@ declare const MONITOR_FLEET_FRONTIER_MAX_ROWS = 10000;
12
12
  * edition: a future syntax change can add a reader without reinterpreting a
13
13
  * stored Fleet under new rules.
14
14
  */
15
- declare const MONITOR_FLEET_AUTHORING_CONTRACT_EDITION: 1;
16
- declare const SUPPORTED_MONITOR_FLEET_AUTHORING_CONTRACT_EDITIONS: readonly [1];
15
+ declare const MONITOR_FLEET_AUTHORING_CONTRACT_EDITION: 2;
16
+ declare const SUPPORTED_MONITOR_FLEET_AUTHORING_CONTRACT_EDITIONS: readonly [1, 2];
17
17
  type MonitorFleetAuthoringContractEdition = (typeof SUPPORTED_MONITOR_FLEET_AUTHORING_CONTRACT_EDITIONS)[number];
18
18
  declare const MONITOR_FLEET_AUTHORING_CONTRACT_CHANGELOG: readonly [{
19
19
  readonly edition: 1;
20
- readonly changed: "Initial Fleet JSON contract: bounded sticky table membership, one daily sync, and a seven-day removal grace.";
20
+ readonly changed: "Initial Fleet JSON contract: bounded sticky table membership, source refresh, and a seven-day removal grace.";
21
+ readonly compatibilityOwner: "Monitors Runtime";
22
+ readonly newWritesEnd: null;
23
+ readonly readerRemoval: null;
24
+ }, {
25
+ readonly edition: 2;
26
+ readonly changed: "Canonical table-backed Fleet envelope with one Handlebars MonitorSpec template.";
21
27
  readonly compatibilityOwner: "Monitors Runtime";
22
28
  readonly newWritesEnd: null;
23
29
  readonly readerRemoval: null;
@@ -39,11 +45,11 @@ declare const MONITOR_FLEET_DOCUMENTATION: {
39
45
  readonly authoredFields: {
40
46
  readonly id: "Stable lowercase fleet id used by sync, get, and deactivate.";
41
47
  readonly source: "Customer DB table, unique row key, and optional equality filters that select candidate rows.";
42
- readonly member: "Ordinary monitor tool, stable key template, and payload evaluated for each selected source row.";
48
+ readonly monitor: "One Batch-compatible MonitorSpec. Direct Handlebars source-row fields such as {{domain}} are rendered for each selected row.";
43
49
  readonly selection: "Deterministic ranking and an active-member limit between 1 and 1,000.";
44
50
  };
45
51
  readonly fixedPolicy: {
46
- readonly cadence: "daily";
52
+ readonly cadence: "60s fair bounded source refresh";
47
53
  readonly membership: "sticky";
48
54
  readonly removalGrace: "7d";
49
55
  readonly onRemoved: "deactivate";
@@ -51,7 +57,8 @@ declare const MONITOR_FLEET_DOCUMENTATION: {
51
57
  readonly billing: "No Fleet fee, permit, or renewal. Dry-run reports ordinary monitor lifecycle charges due now.";
52
58
  };
53
59
  readonly stickyMembership: "Ranking fills vacancies but never replaces a current member merely because another row ranks higher.";
54
- readonly columnExpression: "Use { \"$fleet\": \"column\", \"name\": \"column_name\" } in a member key or payload to read a value from each source row.";
60
+ readonly templating: "Use direct Handlebars fields such as {{domain}} in monitor key, name, or payload. Helpers, blocks, partials, paths, and prototype access are disabled.";
61
+ readonly legacyCompatibility: "Edition 1 member/$fleet files remain readable with a lint warning; new files should use version: 2, kind: \"fleet\", and monitor.";
55
62
  };
56
63
  type MonitorFleetColumn = {
57
64
  $fleet: 'column';
@@ -62,7 +69,7 @@ type MonitorFleetTemplate = {
62
69
  parts: Array<string | MonitorFleetColumn>;
63
70
  };
64
71
  type MonitorFleetExpression = MonitorFleetColumn | MonitorFleetTemplate;
65
- type MonitorFleetDefinition = {
72
+ type MonitorFleetDefinitionV1 = {
66
73
  /** Stable lowercase fleet id, used by CLI and API lifecycle commands. */
67
74
  id: string;
68
75
  /** Customer DB rows that may become members. */
@@ -96,6 +103,24 @@ type MonitorFleetDefinition = {
96
103
  membership: 'sticky';
97
104
  };
98
105
  };
106
+ /**
107
+ * Edition 2 keeps the public file self-describing and aligns the rendered
108
+ * member with Batch exactly. Only source-row values may be interpolated.
109
+ */
110
+ type MonitorFleetDefinitionV2 = {
111
+ version: 2;
112
+ kind: 'fleet';
113
+ id: string;
114
+ source: MonitorFleetDefinitionV1['source'];
115
+ monitor: {
116
+ key: string;
117
+ tool: string;
118
+ name?: string;
119
+ payload: Record<string, unknown>;
120
+ };
121
+ selection: MonitorFleetDefinitionV1['selection'];
122
+ };
123
+ type MonitorFleetDefinition = MonitorFleetDefinitionV1 | MonitorFleetDefinitionV2;
99
124
  type MonitorFleetContractIssue = {
100
125
  path: string;
101
126
  code: string;
@@ -114,6 +139,7 @@ type MonitorFleetAuthoringContractResult = {
114
139
  declare function fleetColumn(name: string): MonitorFleetColumn;
115
140
  declare function fleetKey(...parts: Array<string | MonitorFleetColumn>): MonitorFleetTemplate;
116
141
  declare function defineMonitorFleet<const T extends MonitorFleetDefinition>(definition: T): T;
142
+ /** Validate the declared edition, or detect canonical v2 versus legacy v1. */
117
143
  declare function validateMonitorFleetDefinition(value: unknown): {
118
144
  valid: boolean;
119
145
  definition?: MonitorFleetDefinition;
@@ -126,6 +152,16 @@ declare function validateMonitorFleetDefinition(value: unknown): {
126
152
  * preflight, which returns the real plan and the credits due.
127
153
  */
128
154
  declare function admitMonitorFleetAuthoringContract(value: unknown, edition?: number): MonitorFleetAuthoringContractResult;
155
+ /**
156
+ * Fast provider-free admission shared by the Fleet CLI, SDK, and API. Legacy
157
+ * documents remain executable but receive an actionable migration warning.
158
+ */
159
+ declare function lintMonitorFleetInput(value: unknown): {
160
+ normalized?: MonitorFleetDefinition;
161
+ issues: Array<MonitorFleetContractIssue & {
162
+ severity: 'error' | 'warning';
163
+ }>;
164
+ };
129
165
  declare function evaluateMonitorFleetValue(value: unknown, row: Record<string, unknown>): unknown;
130
166
 
131
- export { type AdmittedMonitorFleetAuthoringContract, MONITOR_FLEET_AUTHORING_CONTRACT_CHANGELOG, MONITOR_FLEET_AUTHORING_CONTRACT_EDITION, MONITOR_FLEET_DOCUMENTATION, MONITOR_FLEET_FRONTIER_MAX_ROWS, MONITOR_FLEET_MAX_MEMBERS, MONITOR_FLEET_REMOVAL_GRACE_MS, type MonitorFleetAuthoringContractEdition, type MonitorFleetAuthoringContractResult, type MonitorFleetColumn, type MonitorFleetContractIssue, type MonitorFleetDefinition, type MonitorFleetExpression, type MonitorFleetTemplate, SUPPORTED_MONITOR_FLEET_AUTHORING_CONTRACT_EDITIONS, admitMonitorFleetAuthoringContract, defineMonitorFleet, evaluateMonitorFleetValue, fleetColumn, fleetKey, validateMonitorFleetDefinition };
167
+ export { type AdmittedMonitorFleetAuthoringContract, MONITOR_FLEET_AUTHORING_CONTRACT_CHANGELOG, MONITOR_FLEET_AUTHORING_CONTRACT_EDITION, MONITOR_FLEET_DOCUMENTATION, MONITOR_FLEET_FRONTIER_MAX_ROWS, MONITOR_FLEET_MAX_MEMBERS, MONITOR_FLEET_REMOVAL_GRACE_MS, type MonitorFleetAuthoringContractEdition, type MonitorFleetAuthoringContractResult, type MonitorFleetColumn, type MonitorFleetContractIssue, type MonitorFleetDefinition, type MonitorFleetDefinitionV1, type MonitorFleetDefinitionV2, type MonitorFleetExpression, type MonitorFleetTemplate, SUPPORTED_MONITOR_FLEET_AUTHORING_CONTRACT_EDITIONS, admitMonitorFleetAuthoringContract, defineMonitorFleet, evaluateMonitorFleetValue, fleetColumn, fleetKey, lintMonitorFleetInput, validateMonitorFleetDefinition };
@@ -12,12 +12,18 @@ declare const MONITOR_FLEET_FRONTIER_MAX_ROWS = 10000;
12
12
  * edition: a future syntax change can add a reader without reinterpreting a
13
13
  * stored Fleet under new rules.
14
14
  */
15
- declare const MONITOR_FLEET_AUTHORING_CONTRACT_EDITION: 1;
16
- declare const SUPPORTED_MONITOR_FLEET_AUTHORING_CONTRACT_EDITIONS: readonly [1];
15
+ declare const MONITOR_FLEET_AUTHORING_CONTRACT_EDITION: 2;
16
+ declare const SUPPORTED_MONITOR_FLEET_AUTHORING_CONTRACT_EDITIONS: readonly [1, 2];
17
17
  type MonitorFleetAuthoringContractEdition = (typeof SUPPORTED_MONITOR_FLEET_AUTHORING_CONTRACT_EDITIONS)[number];
18
18
  declare const MONITOR_FLEET_AUTHORING_CONTRACT_CHANGELOG: readonly [{
19
19
  readonly edition: 1;
20
- readonly changed: "Initial Fleet JSON contract: bounded sticky table membership, one daily sync, and a seven-day removal grace.";
20
+ readonly changed: "Initial Fleet JSON contract: bounded sticky table membership, source refresh, and a seven-day removal grace.";
21
+ readonly compatibilityOwner: "Monitors Runtime";
22
+ readonly newWritesEnd: null;
23
+ readonly readerRemoval: null;
24
+ }, {
25
+ readonly edition: 2;
26
+ readonly changed: "Canonical table-backed Fleet envelope with one Handlebars MonitorSpec template.";
21
27
  readonly compatibilityOwner: "Monitors Runtime";
22
28
  readonly newWritesEnd: null;
23
29
  readonly readerRemoval: null;
@@ -39,11 +45,11 @@ declare const MONITOR_FLEET_DOCUMENTATION: {
39
45
  readonly authoredFields: {
40
46
  readonly id: "Stable lowercase fleet id used by sync, get, and deactivate.";
41
47
  readonly source: "Customer DB table, unique row key, and optional equality filters that select candidate rows.";
42
- readonly member: "Ordinary monitor tool, stable key template, and payload evaluated for each selected source row.";
48
+ readonly monitor: "One Batch-compatible MonitorSpec. Direct Handlebars source-row fields such as {{domain}} are rendered for each selected row.";
43
49
  readonly selection: "Deterministic ranking and an active-member limit between 1 and 1,000.";
44
50
  };
45
51
  readonly fixedPolicy: {
46
- readonly cadence: "daily";
52
+ readonly cadence: "60s fair bounded source refresh";
47
53
  readonly membership: "sticky";
48
54
  readonly removalGrace: "7d";
49
55
  readonly onRemoved: "deactivate";
@@ -51,7 +57,8 @@ declare const MONITOR_FLEET_DOCUMENTATION: {
51
57
  readonly billing: "No Fleet fee, permit, or renewal. Dry-run reports ordinary monitor lifecycle charges due now.";
52
58
  };
53
59
  readonly stickyMembership: "Ranking fills vacancies but never replaces a current member merely because another row ranks higher.";
54
- readonly columnExpression: "Use { \"$fleet\": \"column\", \"name\": \"column_name\" } in a member key or payload to read a value from each source row.";
60
+ readonly templating: "Use direct Handlebars fields such as {{domain}} in monitor key, name, or payload. Helpers, blocks, partials, paths, and prototype access are disabled.";
61
+ readonly legacyCompatibility: "Edition 1 member/$fleet files remain readable with a lint warning; new files should use version: 2, kind: \"fleet\", and monitor.";
55
62
  };
56
63
  type MonitorFleetColumn = {
57
64
  $fleet: 'column';
@@ -62,7 +69,7 @@ type MonitorFleetTemplate = {
62
69
  parts: Array<string | MonitorFleetColumn>;
63
70
  };
64
71
  type MonitorFleetExpression = MonitorFleetColumn | MonitorFleetTemplate;
65
- type MonitorFleetDefinition = {
72
+ type MonitorFleetDefinitionV1 = {
66
73
  /** Stable lowercase fleet id, used by CLI and API lifecycle commands. */
67
74
  id: string;
68
75
  /** Customer DB rows that may become members. */
@@ -96,6 +103,24 @@ type MonitorFleetDefinition = {
96
103
  membership: 'sticky';
97
104
  };
98
105
  };
106
+ /**
107
+ * Edition 2 keeps the public file self-describing and aligns the rendered
108
+ * member with Batch exactly. Only source-row values may be interpolated.
109
+ */
110
+ type MonitorFleetDefinitionV2 = {
111
+ version: 2;
112
+ kind: 'fleet';
113
+ id: string;
114
+ source: MonitorFleetDefinitionV1['source'];
115
+ monitor: {
116
+ key: string;
117
+ tool: string;
118
+ name?: string;
119
+ payload: Record<string, unknown>;
120
+ };
121
+ selection: MonitorFleetDefinitionV1['selection'];
122
+ };
123
+ type MonitorFleetDefinition = MonitorFleetDefinitionV1 | MonitorFleetDefinitionV2;
99
124
  type MonitorFleetContractIssue = {
100
125
  path: string;
101
126
  code: string;
@@ -114,6 +139,7 @@ type MonitorFleetAuthoringContractResult = {
114
139
  declare function fleetColumn(name: string): MonitorFleetColumn;
115
140
  declare function fleetKey(...parts: Array<string | MonitorFleetColumn>): MonitorFleetTemplate;
116
141
  declare function defineMonitorFleet<const T extends MonitorFleetDefinition>(definition: T): T;
142
+ /** Validate the declared edition, or detect canonical v2 versus legacy v1. */
117
143
  declare function validateMonitorFleetDefinition(value: unknown): {
118
144
  valid: boolean;
119
145
  definition?: MonitorFleetDefinition;
@@ -126,6 +152,16 @@ declare function validateMonitorFleetDefinition(value: unknown): {
126
152
  * preflight, which returns the real plan and the credits due.
127
153
  */
128
154
  declare function admitMonitorFleetAuthoringContract(value: unknown, edition?: number): MonitorFleetAuthoringContractResult;
155
+ /**
156
+ * Fast provider-free admission shared by the Fleet CLI, SDK, and API. Legacy
157
+ * documents remain executable but receive an actionable migration warning.
158
+ */
159
+ declare function lintMonitorFleetInput(value: unknown): {
160
+ normalized?: MonitorFleetDefinition;
161
+ issues: Array<MonitorFleetContractIssue & {
162
+ severity: 'error' | 'warning';
163
+ }>;
164
+ };
129
165
  declare function evaluateMonitorFleetValue(value: unknown, row: Record<string, unknown>): unknown;
130
166
 
131
- export { type AdmittedMonitorFleetAuthoringContract, MONITOR_FLEET_AUTHORING_CONTRACT_CHANGELOG, MONITOR_FLEET_AUTHORING_CONTRACT_EDITION, MONITOR_FLEET_DOCUMENTATION, MONITOR_FLEET_FRONTIER_MAX_ROWS, MONITOR_FLEET_MAX_MEMBERS, MONITOR_FLEET_REMOVAL_GRACE_MS, type MonitorFleetAuthoringContractEdition, type MonitorFleetAuthoringContractResult, type MonitorFleetColumn, type MonitorFleetContractIssue, type MonitorFleetDefinition, type MonitorFleetExpression, type MonitorFleetTemplate, SUPPORTED_MONITOR_FLEET_AUTHORING_CONTRACT_EDITIONS, admitMonitorFleetAuthoringContract, defineMonitorFleet, evaluateMonitorFleetValue, fleetColumn, fleetKey, validateMonitorFleetDefinition };
167
+ export { type AdmittedMonitorFleetAuthoringContract, MONITOR_FLEET_AUTHORING_CONTRACT_CHANGELOG, MONITOR_FLEET_AUTHORING_CONTRACT_EDITION, MONITOR_FLEET_DOCUMENTATION, MONITOR_FLEET_FRONTIER_MAX_ROWS, MONITOR_FLEET_MAX_MEMBERS, MONITOR_FLEET_REMOVAL_GRACE_MS, type MonitorFleetAuthoringContractEdition, type MonitorFleetAuthoringContractResult, type MonitorFleetColumn, type MonitorFleetContractIssue, type MonitorFleetDefinition, type MonitorFleetDefinitionV1, type MonitorFleetDefinitionV2, type MonitorFleetExpression, type MonitorFleetTemplate, SUPPORTED_MONITOR_FLEET_AUTHORING_CONTRACT_EDITIONS, admitMonitorFleetAuthoringContract, defineMonitorFleet, evaluateMonitorFleetValue, fleetColumn, fleetKey, lintMonitorFleetInput, validateMonitorFleetDefinition };