node-type-registry 0.34.0 → 0.35.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 (59) hide show
  1. package/blueprint-types.generated.d.ts +256 -59
  2. package/blueprint-types.generated.js +30 -0
  3. package/codegen/generate-types.js +3 -1
  4. package/data/data-aggregate-limit-counter.d.ts +1 -1
  5. package/data/data-aggregate-limit-counter.js +4 -4
  6. package/data/data-billing-meter.d.ts +1 -1
  7. package/data/data-billing-meter.js +4 -4
  8. package/data/data-chunks.d.ts +2 -2
  9. package/data/data-chunks.js +6 -6
  10. package/data/data-feature-flag.d.ts +1 -1
  11. package/data/data-feature-flag.js +4 -4
  12. package/data/data-file-embedding.d.ts +1 -1
  13. package/data/data-file-embedding.js +8 -27
  14. package/data/data-image-embedding.d.ts +4 -4
  15. package/data/data-image-embedding.js +13 -31
  16. package/data/data-job-trigger.d.ts +1 -1
  17. package/data/data-job-trigger.js +4 -4
  18. package/data/data-limit-counter.d.ts +1 -1
  19. package/data/data-limit-counter.js +4 -4
  20. package/data/index.d.ts +10 -8
  21. package/data/index.js +13 -9
  22. package/data/process-extraction.d.ts +14 -0
  23. package/data/process-extraction.js +108 -0
  24. package/data/process-image-versions.d.ts +15 -0
  25. package/data/process-image-versions.js +139 -0
  26. package/data/search-vector.js +1 -16
  27. package/esm/blueprint-types.generated.d.ts +256 -59
  28. package/esm/blueprint-types.generated.js +30 -0
  29. package/esm/codegen/generate-types.js +3 -1
  30. package/esm/data/data-aggregate-limit-counter.d.ts +1 -1
  31. package/esm/data/data-aggregate-limit-counter.js +3 -3
  32. package/esm/data/data-billing-meter.d.ts +1 -1
  33. package/esm/data/data-billing-meter.js +3 -3
  34. package/esm/data/data-chunks.d.ts +2 -2
  35. package/esm/data/data-chunks.js +5 -5
  36. package/esm/data/data-feature-flag.d.ts +1 -1
  37. package/esm/data/data-feature-flag.js +3 -3
  38. package/esm/data/data-file-embedding.d.ts +1 -1
  39. package/esm/data/data-file-embedding.js +7 -26
  40. package/esm/data/data-image-embedding.d.ts +4 -4
  41. package/esm/data/data-image-embedding.js +12 -30
  42. package/esm/data/data-job-trigger.d.ts +1 -1
  43. package/esm/data/data-job-trigger.js +3 -3
  44. package/esm/data/data-limit-counter.d.ts +1 -1
  45. package/esm/data/data-limit-counter.js +3 -3
  46. package/esm/data/index.d.ts +10 -8
  47. package/esm/data/index.js +10 -8
  48. package/esm/data/process-extraction.d.ts +14 -0
  49. package/esm/data/process-extraction.js +105 -0
  50. package/esm/data/process-image-versions.d.ts +15 -0
  51. package/esm/data/process-image-versions.js +136 -0
  52. package/esm/data/search-vector.js +1 -16
  53. package/esm/module-presets/auth-hardened.js +4 -2
  54. package/esm/module-presets/b2b-storage.js +4 -2
  55. package/esm/module-presets/b2b.js +4 -2
  56. package/module-presets/auth-hardened.js +4 -2
  57. package/module-presets/b2b-storage.js +4 -2
  58. package/module-presets/b2b.js +4 -2
  59. package/package.json +2 -2
@@ -1,13 +1,13 @@
1
- export const DataFileEmbedding = {
2
- name: 'DataFileEmbedding',
1
+ export const ProcessFileEmbedding = {
2
+ name: 'ProcessFileEmbedding',
3
3
  slug: 'data_file_embedding',
4
- category: 'data',
4
+ category: 'process',
5
5
  display_name: 'File Embedding',
6
6
  description: 'Generic, MIME-scoped embedding node for file tables. Supports two modes: ' +
7
7
  'direct (whole-file to single vector, e.g. CLIP for images) when extraction ' +
8
8
  'is omitted, or extract (file to text to chunks to per-chunk vectors) when ' +
9
- 'extraction config is provided. Composes SearchVector + DataJobTrigger + ' +
10
- 'DataChunks (enabled by default in extract mode) internally. Multiple ' +
9
+ 'extraction config is provided. Composes SearchVector + JobTrigger + ' +
10
+ 'ProcessChunks (enabled by default in extract mode) internally. Multiple ' +
11
11
  'instances can coexist on the same table with different MIME scopes, field ' +
12
12
  'names, and embedding strategies.',
13
13
  parameter_schema: {
@@ -103,25 +103,19 @@ export const DataFileEmbedding = {
103
103
  format: 'column-ref',
104
104
  description: 'JSONB field for extraction metadata (page count, language, etc.)',
105
105
  default: 'extracted_metadata'
106
- },
107
- status_field: {
108
- type: 'string',
109
- format: 'column-ref',
110
- description: 'Extraction lifecycle status field',
111
- default: 'extraction_status'
112
106
  }
113
107
  }
114
108
  },
115
109
  // ── Chunking (enabled by default in extract mode) ──────────────
116
110
  include_chunks: {
117
111
  type: 'boolean',
118
- description: 'Whether to create a chunks table via DataChunks. Defaults to true ' +
112
+ description: 'Whether to create a chunks table via ProcessChunks. Defaults to true ' +
119
113
  'when extraction is provided, false in direct mode. Set explicitly ' +
120
114
  'to override.',
121
115
  },
122
116
  chunks: {
123
117
  type: 'object',
124
- description: 'Chunking configuration passed through to DataChunks. When ' +
118
+ description: 'Chunking configuration passed through to ProcessChunks. When ' +
125
119
  'include_chunks is true (or defaults to true in extract mode), these ' +
126
120
  'params configure the chunks table, embedding dimensions, strategy, etc.',
127
121
  properties: {
@@ -163,19 +157,6 @@ export const DataFileEmbedding = {
163
157
  default: 'generate_chunks'
164
158
  }
165
159
  }
166
- },
167
- // ── Stale tracking (meaningful in extract mode) ────────────────
168
- stale_strategy: {
169
- type: 'string',
170
- enum: ['column', 'null', 'hash'],
171
- description: 'Strategy for tracking embedding staleness when extraction is enabled. ' +
172
- 'column: embedding_stale boolean. null: set embedding to NULL. hash: md5 hash.',
173
- default: 'column'
174
- },
175
- include_stale_field: {
176
- type: 'boolean',
177
- description: 'Whether to include the embedding_stale boolean field (extract mode)',
178
- default: true
179
160
  }
180
161
  }
181
162
  },
@@ -1,14 +1,14 @@
1
1
  import type { NodeTypeDefinition } from '../types';
2
2
  /**
3
- * Image-specific preset of DataFileEmbedding.
3
+ * Image-specific preset of ProcessFileEmbedding.
4
4
  *
5
5
  * At the SQL layer, data_image_embedding delegates entirely to
6
6
  * data_file_embedding, merging image-specific defaults before forwarding.
7
- * The parameter schema here is intentionally identical to DataFileEmbedding;
7
+ * The parameter schema here is intentionally identical to ProcessFileEmbedding;
8
8
  * only the defaults differ (dimensions: 512, task: process_image_embedding,
9
9
  * mime_patterns: ['image/%']).
10
10
  *
11
11
  * Kept as a separate node type for backward compatibility — existing
12
- * blueprints that reference DataImageEmbedding continue to work unchanged.
12
+ * blueprints that reference ProcessImageEmbedding continue to work unchanged.
13
13
  */
14
- export declare const DataImageEmbedding: NodeTypeDefinition;
14
+ export declare const ProcessImageEmbedding: NodeTypeDefinition;
@@ -1,28 +1,28 @@
1
1
  /**
2
- * Image-specific preset of DataFileEmbedding.
2
+ * Image-specific preset of ProcessFileEmbedding.
3
3
  *
4
4
  * At the SQL layer, data_image_embedding delegates entirely to
5
5
  * data_file_embedding, merging image-specific defaults before forwarding.
6
- * The parameter schema here is intentionally identical to DataFileEmbedding;
6
+ * The parameter schema here is intentionally identical to ProcessFileEmbedding;
7
7
  * only the defaults differ (dimensions: 512, task: process_image_embedding,
8
8
  * mime_patterns: ['image/%']).
9
9
  *
10
10
  * Kept as a separate node type for backward compatibility — existing
11
- * blueprints that reference DataImageEmbedding continue to work unchanged.
11
+ * blueprints that reference ProcessImageEmbedding continue to work unchanged.
12
12
  */
13
- export const DataImageEmbedding = {
14
- name: 'DataImageEmbedding',
13
+ export const ProcessImageEmbedding = {
14
+ name: 'ProcessImageEmbedding',
15
15
  slug: 'data_image_embedding',
16
- category: 'data',
16
+ category: 'process',
17
17
  display_name: 'Image Embedding',
18
- description: 'Image-specific preset of DataFileEmbedding. Delegates to DataFileEmbedding ' +
18
+ description: 'Image-specific preset of ProcessFileEmbedding. Delegates to ProcessFileEmbedding ' +
19
19
  'with image-oriented defaults: dimensions=512 (CLIP), mime_patterns=[\'image/%\'], ' +
20
20
  'task_identifier=\'process_image_embedding\', direct mode (no extraction). ' +
21
- 'Accepts all DataFileEmbedding parameters — any overrides are forwarded through.',
21
+ 'Accepts all ProcessFileEmbedding parameters — any overrides are forwarded through.',
22
22
  parameter_schema: {
23
23
  type: 'object',
24
24
  properties: {
25
- // ── Vector config (passed through to DataFileEmbedding) ──────────
25
+ // ── Vector config (passed through to ProcessFileEmbedding) ──────────
26
26
  field_name: {
27
27
  type: 'string',
28
28
  format: 'column-ref',
@@ -93,7 +93,7 @@ export const DataImageEmbedding = {
93
93
  // ── Extraction config (optional — enables extract mode) ────────
94
94
  extraction: {
95
95
  type: 'object',
96
- description: 'Text extraction configuration. Forwarded to DataFileEmbedding. ' +
96
+ description: 'Text extraction configuration. Forwarded to ProcessFileEmbedding. ' +
97
97
  'When present, enables extract mode (e.g., OCR for images).',
98
98
  properties: {
99
99
  text_field: {
@@ -107,19 +107,13 @@ export const DataImageEmbedding = {
107
107
  format: 'column-ref',
108
108
  description: 'JSONB field for extraction metadata',
109
109
  default: 'extracted_metadata'
110
- },
111
- status_field: {
112
- type: 'string',
113
- format: 'column-ref',
114
- description: 'Extraction lifecycle status field',
115
- default: 'extraction_status'
116
110
  }
117
111
  }
118
112
  },
119
- // ── Chunking config (optional — forwarded to DataFileEmbedding) ─
113
+ // ── Chunking config (optional — forwarded to ProcessFileEmbedding) ─
120
114
  chunks: {
121
115
  type: 'object',
122
- description: 'Chunking configuration. Forwarded to DataFileEmbedding. ' +
116
+ description: 'Chunking configuration. Forwarded to ProcessFileEmbedding. ' +
123
117
  'Only meaningful when extraction is also provided.',
124
118
  properties: {
125
119
  content_field_name: {
@@ -138,18 +132,6 @@ export const DataImageEmbedding = {
138
132
  enqueue_chunking_job: { type: 'boolean', default: true },
139
133
  chunking_task_name: { type: 'string', default: 'generate_chunks' }
140
134
  }
141
- },
142
- // ── Stale tracking (forwarded to DataFileEmbedding) ────────────
143
- stale_strategy: {
144
- type: 'string',
145
- enum: ['column', 'null', 'hash'],
146
- description: 'Strategy for tracking embedding staleness in extract mode',
147
- default: 'column'
148
- },
149
- include_stale_field: {
150
- type: 'boolean',
151
- description: 'Whether to include the embedding_stale boolean field',
152
- default: true
153
135
  }
154
136
  }
155
137
  },
@@ -1,2 +1,2 @@
1
1
  import type { NodeTypeDefinition } from '../types';
2
- export declare const DataJobTrigger: NodeTypeDefinition;
2
+ export declare const JobTrigger: NodeTypeDefinition;
@@ -23,10 +23,10 @@ const triggerConditionSchema = {
23
23
  NOT: { $ref: '#/$defs/triggerCondition', description: 'Negated condition.' }
24
24
  }
25
25
  };
26
- export const DataJobTrigger = {
27
- name: 'DataJobTrigger',
26
+ export const JobTrigger = {
27
+ name: 'JobTrigger',
28
28
  slug: 'data_job_trigger',
29
- category: 'data',
29
+ category: 'job',
30
30
  display_name: 'Job Trigger',
31
31
  description: 'Dynamically creates PostgreSQL triggers that enqueue jobs via app_jobs.add_job() when table rows are inserted, updated, or deleted. Supports configurable payload strategies (full row, row ID, selected fields, or custom mapping), conditional firing via WHEN clauses, watched field changes, and extended job options (queue, priority, delay, max attempts).',
32
32
  parameter_schema: {
@@ -1,2 +1,2 @@
1
1
  import type { NodeTypeDefinition } from '../types';
2
- export declare const DataLimitCounter: NodeTypeDefinition;
2
+ export declare const LimitCounter: NodeTypeDefinition;
@@ -1,7 +1,7 @@
1
- export const DataLimitCounter = {
2
- name: 'DataLimitCounter',
1
+ export const LimitCounter = {
2
+ name: 'LimitCounter',
3
3
  slug: 'data_limit_counter',
4
- category: 'data',
4
+ category: 'limit',
5
5
  display_name: 'Limit Counter',
6
6
  description: 'Declaratively attaches limit-tracking triggers to a table. On INSERT the named limit is incremented; on DELETE it is decremented. Requires a provisioned limits_module for the target scope.',
7
7
  parameter_schema: {
@@ -2,25 +2,27 @@ export { CheckGreaterThan } from './check-greater-than';
2
2
  export { CheckLessThan } from './check-less-than';
3
3
  export { CheckNotEqual } from './check-not-equal';
4
4
  export { CheckOneOf } from './check-one-of';
5
- export { DataAggregateLimitCounter } from './data-aggregate-limit-counter';
6
- export { DataBillingMeter } from './data-billing-meter';
5
+ export { LimitAggregate } from './data-aggregate-limit-counter';
6
+ export { BillingMeter } from './data-billing-meter';
7
7
  export { DataBulk } from './data-bulk';
8
- export { DataChunks } from './data-chunks';
8
+ export { ProcessChunks } from './data-chunks';
9
9
  export { DataCompositeField } from './data-composite-field';
10
10
  export { DataDirectOwner } from './data-direct-owner';
11
11
  export { DataEntityMembership } from './data-entity-membership';
12
- export { DataFileEmbedding } from './data-file-embedding';
13
- export { DataFeatureFlag } from './data-feature-flag';
12
+ export { ProcessFileEmbedding } from './data-file-embedding';
13
+ export { LimitFeatureFlag } from './data-feature-flag';
14
14
  export { DataForceCurrentUser } from './data-force-current-user';
15
15
  export { DataId } from './data-id';
16
- export { DataImageEmbedding } from './data-image-embedding';
16
+ export { ProcessImageEmbedding } from './data-image-embedding';
17
17
  export { DataImmutableFields } from './data-immutable-fields';
18
18
  export { DataInflection } from './data-inflection';
19
19
  export { DataInheritFromParent } from './data-inherit-from-parent';
20
- export { DataJobTrigger } from './data-job-trigger';
21
- export { DataLimitCounter } from './data-limit-counter';
20
+ export { JobTrigger } from './data-job-trigger';
21
+ export { LimitCounter } from './data-limit-counter';
22
22
  export { DataJsonb } from './data-jsonb';
23
23
  export { DataOwnedFields } from './data-owned-fields';
24
+ export { ProcessExtraction } from './process-extraction';
25
+ export { ProcessImageVersions } from './process-image-versions';
24
26
  export { DataOwnershipInEntity } from './data-ownership-in-entity';
25
27
  export { DataPeoplestamps } from './data-peoplestamps';
26
28
  export { DataPublishable } from './data-publishable';
package/esm/data/index.js CHANGED
@@ -2,25 +2,27 @@ export { CheckGreaterThan } from './check-greater-than';
2
2
  export { CheckLessThan } from './check-less-than';
3
3
  export { CheckNotEqual } from './check-not-equal';
4
4
  export { CheckOneOf } from './check-one-of';
5
- export { DataAggregateLimitCounter } from './data-aggregate-limit-counter';
6
- export { DataBillingMeter } from './data-billing-meter';
5
+ export { LimitAggregate } from './data-aggregate-limit-counter';
6
+ export { BillingMeter } from './data-billing-meter';
7
7
  export { DataBulk } from './data-bulk';
8
- export { DataChunks } from './data-chunks';
8
+ export { ProcessChunks } from './data-chunks';
9
9
  export { DataCompositeField } from './data-composite-field';
10
10
  export { DataDirectOwner } from './data-direct-owner';
11
11
  export { DataEntityMembership } from './data-entity-membership';
12
- export { DataFileEmbedding } from './data-file-embedding';
13
- export { DataFeatureFlag } from './data-feature-flag';
12
+ export { ProcessFileEmbedding } from './data-file-embedding';
13
+ export { LimitFeatureFlag } from './data-feature-flag';
14
14
  export { DataForceCurrentUser } from './data-force-current-user';
15
15
  export { DataId } from './data-id';
16
- export { DataImageEmbedding } from './data-image-embedding';
16
+ export { ProcessImageEmbedding } from './data-image-embedding';
17
17
  export { DataImmutableFields } from './data-immutable-fields';
18
18
  export { DataInflection } from './data-inflection';
19
19
  export { DataInheritFromParent } from './data-inherit-from-parent';
20
- export { DataJobTrigger } from './data-job-trigger';
21
- export { DataLimitCounter } from './data-limit-counter';
20
+ export { JobTrigger } from './data-job-trigger';
21
+ export { LimitCounter } from './data-limit-counter';
22
22
  export { DataJsonb } from './data-jsonb';
23
23
  export { DataOwnedFields } from './data-owned-fields';
24
+ export { ProcessExtraction } from './process-extraction';
25
+ export { ProcessImageVersions } from './process-image-versions';
24
26
  export { DataOwnershipInEntity } from './data-ownership-in-entity';
25
27
  export { DataPeoplestamps } from './data-peoplestamps';
26
28
  export { DataPublishable } from './data-publishable';
@@ -0,0 +1,14 @@
1
+ import type { NodeTypeDefinition } from '../types';
2
+ /**
3
+ * File extraction processing node.
4
+ *
5
+ * Composes a JobTrigger that fires when a file transitions to status = 'uploaded'
6
+ * (or on INSERT if confirm_upload is not enabled). The trigger enqueues a
7
+ * text-extraction job that converts the file contents (PDF, DOCX, HTML, etc.)
8
+ * into plain text or markdown, storing the result in configurable output fields.
9
+ *
10
+ * The extraction worker is external (Knative function) — this node only creates
11
+ * the trigger infrastructure and output fields. The worker calls back into the
12
+ * database to write extracted text and metadata.
13
+ */
14
+ export declare const ProcessExtraction: NodeTypeDefinition;
@@ -0,0 +1,105 @@
1
+ /**
2
+ * File extraction processing node.
3
+ *
4
+ * Composes a JobTrigger that fires when a file transitions to status = 'uploaded'
5
+ * (or on INSERT if confirm_upload is not enabled). The trigger enqueues a
6
+ * text-extraction job that converts the file contents (PDF, DOCX, HTML, etc.)
7
+ * into plain text or markdown, storing the result in configurable output fields.
8
+ *
9
+ * The extraction worker is external (Knative function) — this node only creates
10
+ * the trigger infrastructure and output fields. The worker calls back into the
11
+ * database to write extracted text and metadata.
12
+ */
13
+ export const ProcessExtraction = {
14
+ name: 'ProcessExtraction',
15
+ slug: 'process_extraction',
16
+ category: 'process',
17
+ display_name: 'File Extraction',
18
+ description: 'Creates extraction output fields and a job trigger for file text extraction. ' +
19
+ 'Fires when a file is uploaded (status = \'uploaded\') or on INSERT. ' +
20
+ 'The external worker extracts text/metadata from the file (PDF, DOCX, HTML, etc.) ' +
21
+ 'and writes the result back to the configured output fields. ' +
22
+ 'Typically used upstream of ProcessFileEmbedding or ProcessChunks.',
23
+ parameter_schema: {
24
+ type: 'object',
25
+ properties: {
26
+ // ── Output fields ─────────────────────────────────────────────
27
+ text_field: {
28
+ type: 'string',
29
+ format: 'column-ref',
30
+ description: 'Field to store extracted text/markdown',
31
+ default: 'extracted_text'
32
+ },
33
+ metadata_field: {
34
+ type: 'string',
35
+ format: 'column-ref',
36
+ description: 'JSONB field for extraction metadata (page count, language, etc.)',
37
+ default: 'extracted_metadata'
38
+ },
39
+ // ── MIME scoping ──────────────────────────────────────────────
40
+ mime_patterns: {
41
+ type: 'array',
42
+ items: { type: 'string' },
43
+ description: 'MIME type LIKE patterns to match. Multiple patterns are OR\'d together. ' +
44
+ 'Examples: [\'application/pdf\', \'text/%\'], [\'application/vnd.openxmlformats%\'].',
45
+ default: ['application/pdf', 'text/%']
46
+ },
47
+ // ── Job routing ───────────────────────────────────────────────
48
+ task_identifier: {
49
+ type: 'string',
50
+ description: 'Job task identifier for the extraction worker',
51
+ default: 'extract_file_text'
52
+ },
53
+ events: {
54
+ type: 'array',
55
+ items: { type: 'string', enum: ['INSERT', 'UPDATE'] },
56
+ description: 'Trigger events that fire the job',
57
+ default: ['INSERT']
58
+ },
59
+ payload_custom: {
60
+ type: 'object',
61
+ additionalProperties: { type: 'string', format: 'column-ref' },
62
+ description: 'Custom payload key-to-column mapping for the job trigger',
63
+ default: {
64
+ file_id: 'id',
65
+ key: 'key',
66
+ mime_type: 'mime_type',
67
+ bucket_id: 'bucket_id'
68
+ }
69
+ },
70
+ trigger_conditions: {
71
+ description: 'Additional compound conditions beyond MIME filtering. ' +
72
+ 'Merged with the auto-generated MIME conditions via AND. ' +
73
+ 'Use this to add status checks (e.g., status = \'uploaded\').',
74
+ 'x-codegen-type': 'TriggerCondition | TriggerCondition[]',
75
+ oneOf: [
76
+ { $ref: '#/$defs/triggerCondition' },
77
+ { type: 'array', items: { $ref: '#/$defs/triggerCondition' } }
78
+ ]
79
+ },
80
+ // ── Job options ───────────────────────────────────────────────
81
+ queue_name: {
82
+ type: 'string',
83
+ description: 'Job queue name for extraction tasks',
84
+ default: 'extraction'
85
+ },
86
+ max_attempts: {
87
+ type: 'integer',
88
+ description: 'Maximum number of retry attempts',
89
+ default: 5
90
+ },
91
+ priority: {
92
+ type: 'integer',
93
+ description: 'Job priority (lower = higher priority)',
94
+ default: 0
95
+ }
96
+ }
97
+ },
98
+ tags: [
99
+ 'extraction',
100
+ 'files',
101
+ 'processing',
102
+ 'jobs',
103
+ 'text'
104
+ ]
105
+ };
@@ -0,0 +1,15 @@
1
+ import type { NodeTypeDefinition } from '../types';
2
+ /**
3
+ * Image version processing node.
4
+ *
5
+ * Composes a JobTrigger that fires when an image file transitions to
6
+ * status = 'uploaded' (or on INSERT if confirm_upload is not enabled).
7
+ * The trigger enqueues an image-processing job that generates resized,
8
+ * cropped, or reformatted variants of the source image.
9
+ *
10
+ * The image processing worker is external (Knative function) — this node
11
+ * only creates the trigger infrastructure. The worker generates the variants
12
+ * and writes them back to the storage system as new file records linked to
13
+ * the source file.
14
+ */
15
+ export declare const ProcessImageVersions: NodeTypeDefinition;
@@ -0,0 +1,136 @@
1
+ /**
2
+ * Image version processing node.
3
+ *
4
+ * Composes a JobTrigger that fires when an image file transitions to
5
+ * status = 'uploaded' (or on INSERT if confirm_upload is not enabled).
6
+ * The trigger enqueues an image-processing job that generates resized,
7
+ * cropped, or reformatted variants of the source image.
8
+ *
9
+ * The image processing worker is external (Knative function) — this node
10
+ * only creates the trigger infrastructure. The worker generates the variants
11
+ * and writes them back to the storage system as new file records linked to
12
+ * the source file.
13
+ */
14
+ export const ProcessImageVersions = {
15
+ name: 'ProcessImageVersions',
16
+ slug: 'process_image_versions',
17
+ category: 'process',
18
+ display_name: 'Image Versions',
19
+ description: 'Creates a job trigger for image variant generation. ' +
20
+ 'Fires when an image file is uploaded (status = \'uploaded\') or on INSERT. ' +
21
+ 'The external worker generates resized, cropped, or reformatted versions ' +
22
+ '(thumbnails, previews, WebP conversions, etc.) and stores them as new ' +
23
+ 'file records linked to the source image.',
24
+ parameter_schema: {
25
+ type: 'object',
26
+ required: ['versions'],
27
+ properties: {
28
+ // ── Version definitions ───────────────────────────────────────
29
+ versions: {
30
+ type: 'array',
31
+ items: {
32
+ type: 'object',
33
+ properties: {
34
+ name: {
35
+ type: 'string',
36
+ description: 'Version identifier (e.g., "thumb", "preview", "hero")'
37
+ },
38
+ width: {
39
+ type: 'integer',
40
+ description: 'Target width in pixels'
41
+ },
42
+ height: {
43
+ type: 'integer',
44
+ description: 'Target height in pixels'
45
+ },
46
+ fit: {
47
+ type: 'string',
48
+ enum: ['cover', 'contain', 'fill', 'inside', 'outside'],
49
+ description: 'Resize fitting strategy',
50
+ default: 'cover'
51
+ },
52
+ format: {
53
+ type: 'string',
54
+ enum: ['jpeg', 'png', 'webp', 'avif'],
55
+ description: 'Output image format',
56
+ default: 'webp'
57
+ },
58
+ quality: {
59
+ type: 'integer',
60
+ description: 'Output quality (1-100)',
61
+ default: 80
62
+ }
63
+ },
64
+ required: ['name']
65
+ },
66
+ description: 'Array of version definitions. Each version specifies dimensions, ' +
67
+ 'format, and quality for a generated image variant. ' +
68
+ 'Required — the blueprint must explicitly define what variants to generate.',
69
+ minItems: 1
70
+ },
71
+ // ── MIME scoping ──────────────────────────────────────────────
72
+ mime_patterns: {
73
+ type: 'array',
74
+ items: { type: 'string' },
75
+ description: 'MIME type LIKE patterns to match. Defaults to all image types.',
76
+ default: ['image/%']
77
+ },
78
+ // ── Job routing ───────────────────────────────────────────────
79
+ task_identifier: {
80
+ type: 'string',
81
+ description: 'Job task identifier for the image processing worker',
82
+ default: 'process_image_versions'
83
+ },
84
+ events: {
85
+ type: 'array',
86
+ items: { type: 'string', enum: ['INSERT', 'UPDATE'] },
87
+ description: 'Trigger events that fire the job',
88
+ default: ['INSERT']
89
+ },
90
+ payload_custom: {
91
+ type: 'object',
92
+ additionalProperties: { type: 'string', format: 'column-ref' },
93
+ description: 'Custom payload key-to-column mapping for the job trigger',
94
+ default: {
95
+ file_id: 'id',
96
+ key: 'key',
97
+ mime_type: 'mime_type',
98
+ bucket_id: 'bucket_id'
99
+ }
100
+ },
101
+ trigger_conditions: {
102
+ description: 'Additional compound conditions beyond MIME filtering. ' +
103
+ 'Merged with the auto-generated MIME conditions via AND.',
104
+ 'x-codegen-type': 'TriggerCondition | TriggerCondition[]',
105
+ oneOf: [
106
+ { $ref: '#/$defs/triggerCondition' },
107
+ { type: 'array', items: { $ref: '#/$defs/triggerCondition' } }
108
+ ]
109
+ },
110
+ // ── Job options ───────────────────────────────────────────────
111
+ queue_name: {
112
+ type: 'string',
113
+ description: 'Job queue name for image processing tasks',
114
+ default: 'image_processing'
115
+ },
116
+ max_attempts: {
117
+ type: 'integer',
118
+ description: 'Maximum number of retry attempts',
119
+ default: 5
120
+ },
121
+ priority: {
122
+ type: 'integer',
123
+ description: 'Job priority (lower = higher priority)',
124
+ default: 0
125
+ }
126
+ }
127
+ },
128
+ tags: [
129
+ 'images',
130
+ 'processing',
131
+ 'jobs',
132
+ 'resize',
133
+ 'thumbnails',
134
+ 'files'
135
+ ]
136
+ };
@@ -3,7 +3,7 @@ export const SearchVector = {
3
3
  slug: 'search_vector',
4
4
  category: 'search',
5
5
  display_name: 'Vector Search',
6
- description: 'Adds a vector embedding column with HNSW or IVFFlat index for similarity search. Supports configurable dimensions, distance metrics (cosine, l2, ip), stale tracking strategies (column, null, hash), and automatic job enqueue triggers for embedding generation.',
6
+ description: 'Adds a vector embedding column with HNSW or IVFFlat index for similarity search. Supports configurable dimensions, distance metrics (cosine, l2, ip), per-field {field_name}_updated_at timestamp tracking (read-only in GraphQL), and automatic job enqueue triggers for embedding generation.',
7
7
  parameter_schema: {
8
8
  type: 'object',
9
9
  properties: {
@@ -42,11 +42,6 @@ export const SearchVector = {
42
42
  description: 'Index-specific options. HNSW: {m, ef_construction}. IVFFlat: {lists}.',
43
43
  default: {}
44
44
  },
45
- include_stale_field: {
46
- type: 'boolean',
47
- description: 'When stale_strategy is column, adds an embedding_stale boolean field',
48
- default: true
49
- },
50
45
  source_fields: {
51
46
  type: 'array',
52
47
  items: {
@@ -65,16 +60,6 @@ export const SearchVector = {
65
60
  description: 'Task identifier for the job queue',
66
61
  default: 'generate_embedding'
67
62
  },
68
- stale_strategy: {
69
- type: 'string',
70
- enum: [
71
- 'column',
72
- 'null',
73
- 'hash'
74
- ],
75
- description: 'Strategy for tracking embedding staleness. column: embedding_stale boolean. null: set embedding to NULL. hash: md5 hash of source fields.',
76
- default: 'column'
77
- },
78
63
  chunks: {
79
64
  type: 'object',
80
65
  description: 'Chunking configuration for long-text embedding. Creates an embedding_chunks record that drives automatic text splitting and per-chunk embedding. Omit to skip chunking.',
@@ -46,7 +46,8 @@ export const PresetAuthHardened = {
46
46
  'identity_providers_module',
47
47
  'webauthn_credentials_module',
48
48
  'webauthn_auth_module',
49
- 'phone_numbers_module'
49
+ 'phone_numbers_module',
50
+ 'devices_module'
50
51
  ],
51
52
  includes_notes: {
52
53
  rate_limits_module: 'Throttling for sign-in, password reset, sign-up, and IP-based gates.',
@@ -55,7 +56,8 @@ export const PresetAuthHardened = {
55
56
  webauthn_credentials_module: 'Per-user passkey storage.',
56
57
  webauthn_auth_module: 'Passkey challenge + assertion runtime.',
57
58
  session_secrets_module: 'Nonces for magic links, email OTP, and WebAuthn challenges.',
58
- phone_numbers_module: 'SMS sign-in / MFA support.'
59
+ phone_numbers_module: 'SMS sign-in / MFA support.',
60
+ devices_module: 'Device tracking and trusted-device MFA bypass.'
59
61
  },
60
62
  omits_notes: {
61
63
  'memberships_module:org': 'No orgs / teams — use `b2b` when you need multi-tenancy.',
@@ -58,10 +58,12 @@ export const PresetB2bStorage = {
58
58
  'hierarchy_module:org',
59
59
  'invites_module:app',
60
60
  'invites_module:org',
61
- 'storage_module'
61
+ 'storage_module',
62
+ 'devices_module'
62
63
  ],
63
64
  includes_notes: {
64
- storage_module: 'File upload infrastructure: app_buckets + app_files tables with RLS. Entity-type storage scopes layered on top via `has_storage=true`.'
65
+ storage_module: 'File upload infrastructure: app_buckets + app_files tables with RLS. Entity-type storage scopes layered on top via `has_storage=true`.',
66
+ devices_module: 'Device tracking and trusted-device MFA bypass.'
65
67
  },
66
68
  omits_notes: {
67
69
  crypto_addresses_module: 'Not a web3 preset.'