node-type-registry 0.36.0 → 0.37.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.
- package/blueprint-types.generated.d.ts +39 -0
- package/codegen/generate-types.js +37 -1
- package/conditions/index.d.ts +1 -0
- package/conditions/index.js +8 -0
- package/conditions/trigger-condition.d.ts +35 -0
- package/conditions/trigger-condition.js +97 -0
- package/data/data-aggregate-limit-counter.d.ts +1 -1
- package/data/data-aggregate-limit-counter.js +7 -7
- package/data/data-billing-meter.d.ts +1 -1
- package/data/data-billing-meter.js +7 -7
- package/data/data-chunks.js +20 -0
- package/data/data-feature-flag.d.ts +1 -1
- package/data/data-feature-flag.js +7 -7
- package/data/data-file-embedding.js +22 -10
- package/data/data-image-embedding.js +15 -9
- package/data/data-job-trigger.js +3 -53
- package/data/data-limit-counter.d.ts +1 -1
- package/data/data-limit-counter.js +7 -7
- package/data/data-meter-rate-limit.d.ts +2 -0
- package/data/data-meter-rate-limit.js +42 -0
- package/data/event-tracker.d.ts +2 -0
- package/data/event-tracker.js +74 -0
- package/data/index.d.ts +9 -4
- package/data/index.js +15 -5
- package/data/limit-warning-aggregate.d.ts +2 -0
- package/data/limit-warning-aggregate.js +27 -0
- package/data/limit-warning-counter.d.ts +2 -0
- package/data/limit-warning-counter.js +33 -0
- package/data/limit-warning-rate.d.ts +2 -0
- package/data/limit-warning-rate.js +33 -0
- package/data/process-extraction.js +15 -10
- package/data/process-image-versions.js +3 -9
- package/data/search-unified.js +8 -0
- package/data/search-vector.js +12 -0
- package/esm/blueprint-types.generated.d.ts +39 -0
- package/esm/codegen/generate-types.js +37 -1
- package/esm/conditions/index.d.ts +1 -0
- package/esm/conditions/index.js +1 -0
- package/esm/conditions/trigger-condition.d.ts +35 -0
- package/esm/conditions/trigger-condition.js +94 -0
- package/esm/data/data-aggregate-limit-counter.d.ts +1 -1
- package/esm/data/data-aggregate-limit-counter.js +6 -6
- package/esm/data/data-billing-meter.d.ts +1 -1
- package/esm/data/data-billing-meter.js +6 -6
- package/esm/data/data-chunks.js +20 -0
- package/esm/data/data-feature-flag.d.ts +1 -1
- package/esm/data/data-feature-flag.js +6 -6
- package/esm/data/data-file-embedding.js +22 -10
- package/esm/data/data-image-embedding.js +15 -9
- package/esm/data/data-job-trigger.js +3 -53
- package/esm/data/data-limit-counter.d.ts +1 -1
- package/esm/data/data-limit-counter.js +6 -6
- package/esm/data/data-meter-rate-limit.d.ts +2 -0
- package/esm/data/data-meter-rate-limit.js +39 -0
- package/esm/data/event-tracker.d.ts +2 -0
- package/esm/data/event-tracker.js +71 -0
- package/esm/data/index.d.ts +9 -4
- package/esm/data/index.js +9 -4
- package/esm/data/limit-warning-aggregate.d.ts +2 -0
- package/esm/data/limit-warning-aggregate.js +24 -0
- package/esm/data/limit-warning-counter.d.ts +2 -0
- package/esm/data/limit-warning-counter.js +30 -0
- package/esm/data/limit-warning-rate.d.ts +2 -0
- package/esm/data/limit-warning-rate.js +30 -0
- package/esm/data/process-extraction.js +15 -10
- package/esm/data/process-image-versions.js +3 -9
- package/esm/data/search-unified.js +8 -0
- package/esm/data/search-vector.js +12 -0
- package/esm/index.d.ts +1 -0
- package/esm/index.js +1 -0
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export const LimitWarningCounter = {
|
|
2
|
+
name: 'LimitWarningCounter',
|
|
3
|
+
slug: 'limit_warning_counter',
|
|
4
|
+
category: 'limit_warning',
|
|
5
|
+
display_name: 'Warning Counter',
|
|
6
|
+
description: 'Attaches an AFTER INSERT trigger that checks if the actor\'s current usage has crossed any warning threshold configured in the limit_warnings table. If a threshold is reached for the first time, enqueues a background job (e.g. email notification). Uses limit_warning_state for one-time dedup per warning/actor pair. Requires a provisioned limits_module with limit_warnings enabled.',
|
|
7
|
+
parameter_schema: {
|
|
8
|
+
type: 'object',
|
|
9
|
+
properties: {
|
|
10
|
+
limit_name: {
|
|
11
|
+
type: 'string',
|
|
12
|
+
description: 'Name of the limit to watch (must match a limit_warnings.name entry, e.g. "projects", "members")',
|
|
13
|
+
},
|
|
14
|
+
scope: {
|
|
15
|
+
type: 'string',
|
|
16
|
+
enum: ['app', 'org'],
|
|
17
|
+
description: 'Limit scope: "app" (membership_type=1, user-level) or "org" (membership_type=2, entity-level)',
|
|
18
|
+
default: 'app',
|
|
19
|
+
},
|
|
20
|
+
actor_field: {
|
|
21
|
+
type: 'string',
|
|
22
|
+
format: 'column-ref',
|
|
23
|
+
description: 'Column on the target table that holds the actor id for limit lookup',
|
|
24
|
+
default: 'owner_id',
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
required: ['limit_name'],
|
|
28
|
+
},
|
|
29
|
+
tags: ['limits', 'triggers', 'warning', 'notifications'],
|
|
30
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export const LimitWarningRate = {
|
|
2
|
+
name: 'LimitWarningRate',
|
|
3
|
+
slug: 'limit_warning_rate',
|
|
4
|
+
category: 'limit_warning',
|
|
5
|
+
display_name: 'Warning Rate Limit',
|
|
6
|
+
description: 'Attaches an AFTER INSERT trigger that checks if the actor\'s current request count in the active sliding window has crossed any warning threshold configured in the limit_warnings table. If a threshold is reached for the first time, enqueues a background job (e.g. email notification). Uses limit_warning_state for one-time dedup per warning/actor pair. Requires both a limits_module with limit_warnings enabled and a rate_limit_meters_module.',
|
|
7
|
+
parameter_schema: {
|
|
8
|
+
type: 'object',
|
|
9
|
+
properties: {
|
|
10
|
+
meter_slug: {
|
|
11
|
+
type: 'string',
|
|
12
|
+
description: 'Slug of the billing meter to check rate limits against (must match a meters table entry)',
|
|
13
|
+
},
|
|
14
|
+
entity_field: {
|
|
15
|
+
type: 'string',
|
|
16
|
+
format: 'column-ref',
|
|
17
|
+
description: 'Column on the target table that holds the entity id for rate limit lookup',
|
|
18
|
+
default: 'entity_id',
|
|
19
|
+
},
|
|
20
|
+
actor_field: {
|
|
21
|
+
type: 'string',
|
|
22
|
+
format: 'column-ref',
|
|
23
|
+
description: 'Column on the target table that holds the actor id for rate limit lookup',
|
|
24
|
+
default: 'owner_id',
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
required: ['meter_slug'],
|
|
28
|
+
},
|
|
29
|
+
tags: ['rate-limits', 'triggers', 'warning', 'notifications', 'metering'],
|
|
30
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { conditionDefs, triggerConditionsProperty } from '../conditions';
|
|
1
2
|
/**
|
|
2
3
|
* File extraction processing node.
|
|
3
4
|
*
|
|
@@ -22,6 +23,7 @@ export const ProcessExtraction = {
|
|
|
22
23
|
'Typically used upstream of ProcessFileEmbedding or ProcessChunks.',
|
|
23
24
|
parameter_schema: {
|
|
24
25
|
type: 'object',
|
|
26
|
+
$defs: conditionDefs,
|
|
25
27
|
properties: {
|
|
26
28
|
// ── Output fields ─────────────────────────────────────────────
|
|
27
29
|
text_field: {
|
|
@@ -36,6 +38,18 @@ export const ProcessExtraction = {
|
|
|
36
38
|
description: 'JSONB field for extraction metadata (page count, language, etc.)',
|
|
37
39
|
default: 'extracted_metadata'
|
|
38
40
|
},
|
|
41
|
+
// ── Model config (optional — flows into job payload) ──────────
|
|
42
|
+
extraction_model: {
|
|
43
|
+
type: 'string',
|
|
44
|
+
description: 'Extraction model identifier (e.g. a vision model for OCR, an LLM for ' +
|
|
45
|
+
'structured extraction). Included in the job payload so the worker knows ' +
|
|
46
|
+
'which model to use. When null, the worker falls back to runtime config.'
|
|
47
|
+
},
|
|
48
|
+
extraction_provider: {
|
|
49
|
+
type: 'string',
|
|
50
|
+
description: 'Extraction provider name (e.g. "ollama", "openai"). ' +
|
|
51
|
+
'When null, the worker falls back to runtime config.'
|
|
52
|
+
},
|
|
39
53
|
// ── MIME scoping ──────────────────────────────────────────────
|
|
40
54
|
mime_patterns: {
|
|
41
55
|
type: 'array',
|
|
@@ -67,16 +81,7 @@ export const ProcessExtraction = {
|
|
|
67
81
|
bucket_id: 'bucket_id'
|
|
68
82
|
}
|
|
69
83
|
},
|
|
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
|
-
},
|
|
84
|
+
trigger_conditions: triggerConditionsProperty,
|
|
80
85
|
// ── Job options ───────────────────────────────────────────────
|
|
81
86
|
queue_name: {
|
|
82
87
|
type: 'string',
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { conditionDefs, triggerConditionsProperty } from '../conditions';
|
|
1
2
|
/**
|
|
2
3
|
* Image version processing node.
|
|
3
4
|
*
|
|
@@ -23,6 +24,7 @@ export const ProcessImageVersions = {
|
|
|
23
24
|
'file records linked to the source image.',
|
|
24
25
|
parameter_schema: {
|
|
25
26
|
type: 'object',
|
|
27
|
+
$defs: conditionDefs,
|
|
26
28
|
required: ['versions'],
|
|
27
29
|
properties: {
|
|
28
30
|
// ── Version definitions ───────────────────────────────────────
|
|
@@ -98,15 +100,7 @@ export const ProcessImageVersions = {
|
|
|
98
100
|
bucket_id: 'bucket_id'
|
|
99
101
|
}
|
|
100
102
|
},
|
|
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
|
-
},
|
|
103
|
+
trigger_conditions: triggerConditionsProperty,
|
|
110
104
|
// ── Job options ───────────────────────────────────────────────
|
|
111
105
|
queue_name: {
|
|
112
106
|
type: 'string',
|
|
@@ -108,6 +108,14 @@ export const SearchUnified = {
|
|
|
108
108
|
format: 'column-ref'
|
|
109
109
|
}
|
|
110
110
|
},
|
|
111
|
+
embedding_model: {
|
|
112
|
+
type: 'string',
|
|
113
|
+
description: 'Embedding model identifier. When null, the worker falls back to runtime config.'
|
|
114
|
+
},
|
|
115
|
+
embedding_provider: {
|
|
116
|
+
type: 'string',
|
|
117
|
+
description: 'Embedding provider name. When null, the worker falls back to runtime config.'
|
|
118
|
+
},
|
|
111
119
|
search_score_weight: {
|
|
112
120
|
type: 'number',
|
|
113
121
|
default: 1
|
|
@@ -50,6 +50,18 @@ export const SearchVector = {
|
|
|
50
50
|
},
|
|
51
51
|
description: 'Column names that feed the embedding. Used by stale trigger to detect content changes.'
|
|
52
52
|
},
|
|
53
|
+
// ── Model config (optional — flows into job payload) ──────────
|
|
54
|
+
embedding_model: {
|
|
55
|
+
type: 'string',
|
|
56
|
+
description: 'Embedding model identifier (e.g. "nomic-embed-text", "text-embedding-3-small"). ' +
|
|
57
|
+
'Included in the job payload so the worker knows which model to use. ' +
|
|
58
|
+
'When null, the worker falls back to runtime config (llm_module / env vars).'
|
|
59
|
+
},
|
|
60
|
+
embedding_provider: {
|
|
61
|
+
type: 'string',
|
|
62
|
+
description: 'Embedding provider name (e.g. "ollama", "openai"). ' +
|
|
63
|
+
'When null, the worker falls back to runtime config.'
|
|
64
|
+
},
|
|
53
65
|
enqueue_job: {
|
|
54
66
|
type: 'boolean',
|
|
55
67
|
description: 'Auto-create trigger that enqueues embedding generation jobs',
|
package/esm/index.d.ts
CHANGED
package/esm/index.js
CHANGED
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -39,6 +39,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
39
39
|
exports.allNodeTypes = void 0;
|
|
40
40
|
__exportStar(require("./authz"), exports);
|
|
41
41
|
__exportStar(require("./blueprint-types.generated"), exports);
|
|
42
|
+
__exportStar(require("./conditions"), exports);
|
|
42
43
|
__exportStar(require("./data"), exports);
|
|
43
44
|
__exportStar(require("./module-presets"), exports);
|
|
44
45
|
__exportStar(require("./relation"), exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-type-registry",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.37.0",
|
|
4
4
|
"description": "Node type definitions for the Constructive blueprint system. Single source of truth for all Authz*, Data*, Relation*, and View* node types.",
|
|
5
5
|
"author": "Constructive <developers@constructive.io>",
|
|
6
6
|
"main": "index.js",
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"registry",
|
|
48
48
|
"graphile"
|
|
49
49
|
],
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "62282a9e2b4a72a68c6c3c6a8729e3a0a42a54b2"
|
|
51
51
|
}
|