@trace.market/types 0.3.0 → 0.4.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/CHANGELOG.md +11 -0
- package/package.json +1 -1
- package/src/descriptions.json +50 -5
- package/src/descriptions.ts +48 -3
- package/src/index.d.ts +19 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [0.4.0] - 2026-01-19
|
|
6
|
+
|
|
7
|
+
### ⚠ BREAKING CHANGES
|
|
8
|
+
- **Transport**: `weight` definition changed from "share (0-1)" to "Total vehicle payload in tonnes". This requires data migration for existing records.
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
- **Process Types**: Added `PyrolysisProcess` and `DistillationProcess`.
|
|
12
|
+
- **ToolInstance**: Added `specs` (flexible map for capacity, material, etc.) and `components` (nested tools) to support complex equipment hierarchies like pyrolysis reactors.
|
|
13
|
+
- **Process**: Added `parameters` to `GenericProcess` for capturing real-time or run-specific data (pressure, speed, etc.).
|
|
14
|
+
- **Icons**: Added icons for new processes (`local_fire_department` for Pyrolysis, `science` for Distillation).
|
|
15
|
+
|
|
5
16
|
## [0.3.0] - 2026-01-19
|
|
6
17
|
|
|
7
18
|
### ⚠ BREAKING CHANGES
|
package/package.json
CHANGED
package/src/descriptions.json
CHANGED
|
@@ -340,12 +340,12 @@
|
|
|
340
340
|
]
|
|
341
341
|
},
|
|
342
342
|
"weight": {
|
|
343
|
-
"label": "
|
|
344
|
-
"description": "
|
|
343
|
+
"label": "Total Payload (t)",
|
|
344
|
+
"description": "Total payload capacity of the vehicle in tonnes",
|
|
345
345
|
"examples": [
|
|
346
|
-
"
|
|
347
|
-
"0
|
|
348
|
-
"
|
|
346
|
+
"3.5",
|
|
347
|
+
"24.0",
|
|
348
|
+
"40.0"
|
|
349
349
|
]
|
|
350
350
|
},
|
|
351
351
|
"deparetureTime": {
|
|
@@ -415,6 +415,10 @@
|
|
|
415
415
|
"label": "HR",
|
|
416
416
|
"description": "Human resources assigned to this process"
|
|
417
417
|
},
|
|
418
|
+
"parameters": {
|
|
419
|
+
"label": "Parameters",
|
|
420
|
+
"description": "Process-specific operating parameters (pressure, speed, etc.)"
|
|
421
|
+
},
|
|
418
422
|
"knowHow": {
|
|
419
423
|
"label": "Know-How",
|
|
420
424
|
"description": "Recipe or process instructions - can be full data or token ID reference"
|
|
@@ -528,6 +532,34 @@
|
|
|
528
532
|
}
|
|
529
533
|
}
|
|
530
534
|
},
|
|
535
|
+
"PyrolysisProcess": {
|
|
536
|
+
"name": "Pyrolysis",
|
|
537
|
+
"header": "Thermal decomposition of organic material in the absence of oxygen",
|
|
538
|
+
"fields": {
|
|
539
|
+
"toolInstance": {
|
|
540
|
+
"label": "Reactor System",
|
|
541
|
+
"description": "Pyrolysis equipment setup"
|
|
542
|
+
},
|
|
543
|
+
"knowHow": {
|
|
544
|
+
"label": "Protocol",
|
|
545
|
+
"description": "Pyrolysis operating parameters"
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
},
|
|
549
|
+
"DistillationProcess": {
|
|
550
|
+
"name": "Distillation",
|
|
551
|
+
"header": "Separation of components based on boiling points",
|
|
552
|
+
"fields": {
|
|
553
|
+
"toolInstance": {
|
|
554
|
+
"label": "Distiller",
|
|
555
|
+
"description": "Distillation column or reactor"
|
|
556
|
+
},
|
|
557
|
+
"knowHow": {
|
|
558
|
+
"label": "Protocol",
|
|
559
|
+
"description": "Distillation operating parameters"
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
},
|
|
531
563
|
"Facility": {
|
|
532
564
|
"name": "Facility",
|
|
533
565
|
"header": "A physical location where processing occurs - shown on interactive map",
|
|
@@ -673,6 +705,19 @@
|
|
|
673
705
|
"hash": {
|
|
674
706
|
"label": "Hash",
|
|
675
707
|
"description": "Unique hash identifier for the tool"
|
|
708
|
+
},
|
|
709
|
+
"specs": {
|
|
710
|
+
"label": "Specifications",
|
|
711
|
+
"description": "Technical specifications (material, capacity, pressure, etc.)",
|
|
712
|
+
"examples": [
|
|
713
|
+
"Material: Steel",
|
|
714
|
+
"Max Pressure: 5 bar",
|
|
715
|
+
"Capacity: 500kg"
|
|
716
|
+
]
|
|
717
|
+
},
|
|
718
|
+
"components": {
|
|
719
|
+
"label": "Components",
|
|
720
|
+
"description": "Sub-components of the tool system (e.g. burners, pumps)"
|
|
676
721
|
}
|
|
677
722
|
}
|
|
678
723
|
},
|
package/src/descriptions.ts
CHANGED
|
@@ -234,9 +234,9 @@ export const typeDescriptions: Record<string, TypeDescription> = {
|
|
|
234
234
|
examples: ['hydrogen', 'electric', 'diesel', 'petrol', 'kerosene'],
|
|
235
235
|
},
|
|
236
236
|
weight: {
|
|
237
|
-
label: '
|
|
238
|
-
description: '
|
|
239
|
-
examples: ['
|
|
237
|
+
label: 'Total Payload (t)',
|
|
238
|
+
description: 'Total payload capacity of the vehicle in tonnes',
|
|
239
|
+
examples: ['3.5', '24.0', '40.0'],
|
|
240
240
|
},
|
|
241
241
|
deparetureTime: {
|
|
242
242
|
label: 'Departure Time',
|
|
@@ -297,6 +297,10 @@ export const typeDescriptions: Record<string, TypeDescription> = {
|
|
|
297
297
|
label: 'HR',
|
|
298
298
|
description: 'Human resources assigned to this process',
|
|
299
299
|
},
|
|
300
|
+
parameters: {
|
|
301
|
+
label: 'Parameters',
|
|
302
|
+
description: 'Process-specific operating parameters (pressure, speed, etc.)',
|
|
303
|
+
},
|
|
300
304
|
knowHow: {
|
|
301
305
|
label: 'Know-How',
|
|
302
306
|
description: 'Recipe or process instructions - can be full data or token ID reference',
|
|
@@ -406,6 +410,34 @@ export const typeDescriptions: Record<string, TypeDescription> = {
|
|
|
406
410
|
},
|
|
407
411
|
},
|
|
408
412
|
},
|
|
413
|
+
PyrolysisProcess: {
|
|
414
|
+
name: 'Pyrolysis',
|
|
415
|
+
header: 'Thermal decomposition of organic material in the absence of oxygen',
|
|
416
|
+
fields: {
|
|
417
|
+
toolInstance: {
|
|
418
|
+
label: 'Reactor System',
|
|
419
|
+
description: 'Pyrolysis equipment setup',
|
|
420
|
+
},
|
|
421
|
+
knowHow: {
|
|
422
|
+
label: 'Protocol',
|
|
423
|
+
description: 'Pyrolysis operating parameters',
|
|
424
|
+
},
|
|
425
|
+
},
|
|
426
|
+
},
|
|
427
|
+
DistillationProcess: {
|
|
428
|
+
name: 'Distillation',
|
|
429
|
+
header: 'Separation of components based on boiling points',
|
|
430
|
+
fields: {
|
|
431
|
+
toolInstance: {
|
|
432
|
+
label: 'Distiller',
|
|
433
|
+
description: 'Distillation column or reactor',
|
|
434
|
+
},
|
|
435
|
+
knowHow: {
|
|
436
|
+
label: 'Protocol',
|
|
437
|
+
description: 'Distillation operating parameters',
|
|
438
|
+
},
|
|
439
|
+
},
|
|
440
|
+
},
|
|
409
441
|
Facility: {
|
|
410
442
|
name: 'Facility',
|
|
411
443
|
header: 'A physical location where processing occurs - shown on interactive map',
|
|
@@ -507,6 +539,15 @@ export const typeDescriptions: Record<string, TypeDescription> = {
|
|
|
507
539
|
label: 'Hash',
|
|
508
540
|
description: 'Unique hash identifier for the tool',
|
|
509
541
|
},
|
|
542
|
+
specs: {
|
|
543
|
+
label: 'Specifications',
|
|
544
|
+
description: 'Technical specifications (material, capacity, pressure, etc.)',
|
|
545
|
+
examples: ['Material: Steel', 'Max Pressure: 5 bar', 'Capacity: 500kg'],
|
|
546
|
+
},
|
|
547
|
+
components: {
|
|
548
|
+
label: 'Components',
|
|
549
|
+
description: 'Sub-components of the tool system (e.g. burners, pumps)',
|
|
550
|
+
},
|
|
510
551
|
},
|
|
511
552
|
},
|
|
512
553
|
Hr: {
|
|
@@ -691,6 +732,8 @@ export function getProcessIcon(processType: string): string {
|
|
|
691
732
|
milling: 'deblur',
|
|
692
733
|
freezedrying: 'ac_unit',
|
|
693
734
|
harvest: 'agriculture',
|
|
735
|
+
pyrolysis: 'local_fire_department',
|
|
736
|
+
distillation: 'science',
|
|
694
737
|
};
|
|
695
738
|
return icons[processType] || 'question_mark';
|
|
696
739
|
}
|
|
@@ -708,6 +751,8 @@ export function getProcessLabel(processType: string): string {
|
|
|
708
751
|
milling: 'Milling',
|
|
709
752
|
freezedrying: 'Freeze-drying',
|
|
710
753
|
harvest: 'Harvesting',
|
|
754
|
+
pyrolysis: 'Pyrolysis',
|
|
755
|
+
distillation: 'Distillation',
|
|
711
756
|
};
|
|
712
757
|
return labels[processType] || 'Unknown process';
|
|
713
758
|
}
|
package/src/index.d.ts
CHANGED
|
@@ -61,7 +61,9 @@ export type Process =
|
|
|
61
61
|
| BlendingProcess
|
|
62
62
|
| SaleProcess
|
|
63
63
|
| HarvestProcess
|
|
64
|
-
| CookingProcess
|
|
64
|
+
| CookingProcess
|
|
65
|
+
| PyrolysisProcess
|
|
66
|
+
| DistillationProcess;
|
|
65
67
|
|
|
66
68
|
export interface GenericProcess {
|
|
67
69
|
timestamp: number;
|
|
@@ -72,6 +74,7 @@ export interface GenericProcess {
|
|
|
72
74
|
impacts?: Impact[];
|
|
73
75
|
price?: Price;
|
|
74
76
|
hr?: Hr;
|
|
77
|
+
parameters?: Record<string, string | number | boolean>; // Flexible process parameters (pressure, speed, etc.)
|
|
75
78
|
}
|
|
76
79
|
|
|
77
80
|
export interface PrintingProcess extends GenericProcess {
|
|
@@ -115,6 +118,18 @@ export interface CookingProcess extends GenericProcess {
|
|
|
115
118
|
knowHow?: TokenIdOr<KnowHow>;
|
|
116
119
|
}
|
|
117
120
|
|
|
121
|
+
export interface PyrolysisProcess extends GenericProcess {
|
|
122
|
+
type: "pyrolysis";
|
|
123
|
+
toolInstance?: TokenIdOr<ToolInstance>;
|
|
124
|
+
knowHow?: TokenIdOr<KnowHow>;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export interface DistillationProcess extends GenericProcess {
|
|
128
|
+
type: "distillation";
|
|
129
|
+
toolInstance?: TokenIdOr<ToolInstance>;
|
|
130
|
+
knowHow?: TokenIdOr<KnowHow>;
|
|
131
|
+
}
|
|
132
|
+
|
|
118
133
|
export interface Price {
|
|
119
134
|
amount: number;
|
|
120
135
|
currency: string;
|
|
@@ -139,7 +154,7 @@ export type InputInstance = LocalInputInstance | TransportedInputInstance;
|
|
|
139
154
|
export interface Transport {
|
|
140
155
|
method: TransportMethod;
|
|
141
156
|
fuelType: "hydrogen" | "electric" | "diesel" | "petrol" | "kerosene";
|
|
142
|
-
weight: number;
|
|
157
|
+
weight: number; // Total vehicle payload capacity in tonnes
|
|
143
158
|
deparetureTime: number;
|
|
144
159
|
duration: number;
|
|
145
160
|
}
|
|
@@ -200,6 +215,8 @@ export interface ToolInstance {
|
|
|
200
215
|
ratedPowerKW?: number;
|
|
201
216
|
providerSDomain: string;
|
|
202
217
|
hash: string;
|
|
218
|
+
specs?: Record<string, string | number | boolean>; // Flexible specs (material, capacity, pressure)
|
|
219
|
+
components?: TokenIdOr<ToolInstance>[]; // Sub-components (burners, sensors)
|
|
203
220
|
}
|
|
204
221
|
|
|
205
222
|
export interface Hr {
|