@native-knowledge/knowledge-sdk 0.0.0-stage → 0.1.0-rc.2
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/LICENSE +202 -0
- package/NOTICE +29 -0
- package/README.md +34 -2
- package/dist/agent-entry.d.ts +291 -0
- package/dist/agent-entry.js +153 -0
- package/dist/agent-guidance-error.d.ts +15 -0
- package/dist/agent-guidance-error.js +46 -0
- package/dist/auth.d.ts +124 -0
- package/dist/auth.js +165 -0
- package/dist/index.d.ts +290 -0
- package/dist/index.js +166 -0
- package/dist/internal/contracts/artifact.d.ts +120 -0
- package/dist/internal/contracts/artifact.js +103 -0
- package/dist/internal/contracts/collection-control.d.ts +160 -0
- package/dist/internal/contracts/collection-control.js +69 -0
- package/dist/internal/contracts/collection.d.ts +263 -0
- package/dist/internal/contracts/collection.js +174 -0
- package/dist/internal/contracts/common.d.ts +17 -0
- package/dist/internal/contracts/common.js +16 -0
- package/dist/internal/contracts/currentness.d.ts +477 -0
- package/dist/internal/contracts/currentness.js +221 -0
- package/dist/internal/contracts/event.d.ts +60 -0
- package/dist/internal/contracts/event.js +35 -0
- package/dist/internal/contracts/evidence.d.ts +202 -0
- package/dist/internal/contracts/evidence.js +171 -0
- package/dist/internal/contracts/index.d.ts +54 -0
- package/dist/internal/contracts/index.js +54 -0
- package/dist/internal/contracts/material-capability.d.ts +88 -0
- package/dist/internal/contracts/material-capability.js +8 -0
- package/dist/internal/contracts/material-carrier.d.ts +104 -0
- package/dist/internal/contracts/material-carrier.js +15 -0
- package/dist/internal/contracts/material-context.d.ts +28 -0
- package/dist/internal/contracts/material-context.js +9 -0
- package/dist/internal/contracts/material-read.d.ts +152 -0
- package/dist/internal/contracts/material-read.js +12 -0
- package/dist/internal/contracts/observation.d.ts +75 -0
- package/dist/internal/contracts/observation.js +39 -0
- package/dist/internal/contracts/persistence.d.ts +370 -0
- package/dist/internal/contracts/persistence.js +239 -0
- package/dist/internal/contracts/project-intent.d.ts +218 -0
- package/dist/internal/contracts/project-intent.js +121 -0
- package/dist/internal/contracts/projection.d.ts +380 -0
- package/dist/internal/contracts/projection.js +194 -0
- package/dist/internal/contracts/public-reference.d.ts +237 -0
- package/dist/internal/contracts/public-reference.js +87 -0
- package/dist/internal/contracts/reference-record.d.ts +124 -0
- package/dist/internal/contracts/reference-record.js +55 -0
- package/dist/internal/contracts/remote-file.d.ts +128 -0
- package/dist/internal/contracts/remote-file.js +159 -0
- package/dist/internal/contracts/resource-scope.d.ts +40 -0
- package/dist/internal/contracts/resource-scope.js +38 -0
- package/dist/internal/contracts/review-packet.d.ts +274 -0
- package/dist/internal/contracts/review-packet.js +61 -0
- package/dist/internal/contracts/review-plane.d.ts +90 -0
- package/dist/internal/contracts/review-plane.js +89 -0
- package/dist/internal/contracts/rich-document.d.ts +641 -0
- package/dist/internal/contracts/rich-document.js +184 -0
- package/dist/internal/contracts/runtime-compatibility.d.ts +22 -0
- package/dist/internal/contracts/runtime-compatibility.js +55 -0
- package/dist/internal/contracts/runtime.d.ts +59 -0
- package/dist/internal/contracts/runtime.js +68 -0
- package/dist/internal/contracts/scheduler.d.ts +348 -0
- package/dist/internal/contracts/scheduler.js +256 -0
- package/dist/internal/contracts/signal.d.ts +113 -0
- package/dist/internal/contracts/signal.js +77 -0
- package/dist/internal/contracts/source-governance.d.ts +375 -0
- package/dist/internal/contracts/source-governance.js +194 -0
- package/dist/internal/contracts/source.d.ts +62 -0
- package/dist/internal/contracts/source.js +32 -0
- package/dist/internal/contracts/tenant-budget.d.ts +59 -0
- package/dist/internal/contracts/tenant-budget.js +34 -0
- package/dist/internal/contracts/tenant-collection-request.d.ts +209 -0
- package/dist/internal/contracts/tenant-collection-request.js +58 -0
- package/dist/internal/contracts/tenant-collection.d.ts +199 -0
- package/dist/internal/contracts/tenant-collection.js +66 -0
- package/dist/internal/contracts/tenant-currentness.d.ts +117 -0
- package/dist/internal/contracts/tenant-currentness.js +26 -0
- package/dist/internal/contracts/tenant-management.d.ts +286 -0
- package/dist/internal/contracts/tenant-management.js +27 -0
- package/dist/internal/contracts/tenant-material-api.d.ts +584 -0
- package/dist/internal/contracts/tenant-material-api.js +46 -0
- package/dist/internal/contracts/tenant-material-json-schema.js +16 -0
- package/dist/internal/contracts/tenant-pdf-text.d.ts +27 -0
- package/dist/internal/contracts/tenant-pdf-text.js +13 -0
- package/dist/internal/contracts/tenant-project-control.d.ts +94 -0
- package/dist/internal/contracts/tenant-project-control.js +19 -0
- package/dist/internal/contracts/tenant-public-reference.d.ts +179 -0
- package/dist/internal/contracts/tenant-public-reference.js +26 -0
- package/dist/internal/contracts/tenant-resource-api.d.ts +738 -0
- package/dist/internal/contracts/tenant-resource-api.js +70 -0
- package/dist/internal/contracts/tenant-resource.d.ts +298 -0
- package/dist/internal/contracts/tenant-resource.js +118 -0
- package/dist/internal/contracts/tenant-rich-document.d.ts +317 -0
- package/dist/internal/contracts/tenant-rich-document.js +17 -0
- package/dist/internal/contracts/tenant-source-binding.d.ts +44 -0
- package/dist/internal/contracts/tenant-source-binding.js +33 -0
- package/dist/internal/contracts/tenant-source-bridge.d.ts +70 -0
- package/dist/internal/contracts/tenant-source-bridge.js +9 -0
- package/dist/internal/contracts/tenant-source-cutover.d.ts +226 -0
- package/dist/internal/contracts/tenant-source-cutover.js +26 -0
- package/dist/internal/contracts/tenant-source-document.d.ts +163 -0
- package/dist/internal/contracts/tenant-source-document.js +38 -0
- package/dist/internal/contracts/tenant-source-lease.d.ts +1 -0
- package/dist/internal/contracts/tenant-source-lease.js +5 -0
- package/dist/internal/contracts/tenant-source.d.ts +223 -0
- package/dist/internal/contracts/tenant-source.js +83 -0
- package/dist/internal/contracts/tenant-web-collection.d.ts +287 -0
- package/dist/internal/contracts/tenant-web-collection.js +118 -0
- package/dist/internal/contracts/tenant-web-content-plan.d.ts +86 -0
- package/dist/internal/contracts/tenant-web-content-plan.js +39 -0
- package/dist/internal/contracts/tenant-web-content-result.d.ts +63 -0
- package/dist/internal/contracts/tenant-web-content-result.js +15 -0
- package/dist/internal/contracts/tenant-web-content.d.ts +383 -0
- package/dist/internal/contracts/tenant-web-content.js +16 -0
- package/dist/internal/contracts/tenant-web-crawl.d.ts +310 -0
- package/dist/internal/contracts/tenant-web-crawl.js +55 -0
- package/dist/internal/contracts/tenant-web-dynamic.d.ts +698 -0
- package/dist/internal/contracts/tenant-web-dynamic.js +68 -0
- package/dist/internal/contracts/tenant-web-results.d.ts +66 -0
- package/dist/internal/contracts/tenant-web-results.js +41 -0
- package/dist/internal/contracts/tenant-web-workflow.d.ts +494 -0
- package/dist/internal/contracts/tenant-web-workflow.js +29 -0
- package/dist/internal/serving-contracts/agent-catalog.d.ts +70 -0
- package/dist/internal/serving-contracts/agent-catalog.js +56 -0
- package/dist/internal/serving-contracts/agent-entry.d.ts +13148 -0
- package/dist/internal/serving-contracts/agent-entry.js +57 -0
- package/dist/internal/serving-contracts/agent-guidance-shapes.d.ts +263 -0
- package/dist/internal/serving-contracts/agent-guidance-shapes.js +12 -0
- package/dist/internal/serving-contracts/agent-input-hints.d.ts +24 -0
- package/dist/internal/serving-contracts/agent-input-hints.js +104 -0
- package/dist/internal/serving-contracts/body-search.d.ts +231 -0
- package/dist/internal/serving-contracts/body-search.js +16 -0
- package/dist/internal/serving-contracts/consumer.d.ts +989 -0
- package/dist/internal/serving-contracts/consumer.js +45 -0
- package/dist/internal/serving-contracts/core.d.ts +333 -0
- package/dist/internal/serving-contracts/core.js +76 -0
- package/dist/internal/serving-contracts/http.d.ts +2874 -0
- package/dist/internal/serving-contracts/http.js +64 -0
- package/dist/internal/serving-contracts/index.d.ts +24 -0
- package/dist/internal/serving-contracts/index.js +25 -0
- package/dist/internal/serving-contracts/management.d.ts +424 -0
- package/dist/internal/serving-contracts/management.js +15 -0
- package/dist/internal/serving-contracts/material-capabilities.d.ts +508 -0
- package/dist/internal/serving-contracts/material-capabilities.js +14 -0
- package/dist/internal/serving-contracts/material-index-status.d.ts +55 -0
- package/dist/internal/serving-contracts/material-index-status.js +5 -0
- package/dist/internal/serving-contracts/mcp.d.ts +2218 -0
- package/dist/internal/serving-contracts/mcp.js +140 -0
- package/dist/internal/serving-contracts/tenant-governance.d.ts +236 -0
- package/dist/internal/serving-contracts/tenant-governance.js +13 -0
- package/dist/internal/serving-contracts/tenant-management.d.ts +6276 -0
- package/dist/internal/serving-contracts/tenant-management.js +89 -0
- package/dist/internal/serving-contracts/tenant-project.d.ts +7550 -0
- package/dist/internal/serving-contracts/tenant-project.js +39 -0
- package/dist/internal/serving-contracts/tenant-runtime.d.ts +9674 -0
- package/dist/internal/serving-contracts/tenant-runtime.js +37 -0
- package/dist/internal/serving-contracts/tenant-session.d.ts +87 -0
- package/dist/internal/serving-contracts/tenant-session.js +8 -0
- package/dist/internal/serving-contracts/tenant-web-content.d.ts +4606 -0
- package/dist/internal/serving-contracts/tenant-web-content.js +20 -0
- package/dist/internal/serving-contracts/tenant-web-crawl.d.ts +2958 -0
- package/dist/internal/serving-contracts/tenant-web-crawl.js +13 -0
- package/dist/internal/serving-contracts/tenant-web-dynamic.d.ts +3902 -0
- package/dist/internal/serving-contracts/tenant-web-dynamic.js +20 -0
- package/dist/internal/serving-contracts/tenant-web-workflow.d.ts +5750 -0
- package/dist/internal/serving-contracts/tenant-web-workflow.js +36 -0
- package/dist/internal/serving-contracts/tenant-web.d.ts +6418 -0
- package/dist/internal/serving-contracts/tenant-web.js +53 -0
- package/dist/internal/serving-contracts/tenant-workspace.d.ts +6451 -0
- package/dist/internal/serving-contracts/tenant-workspace.js +28 -0
- package/dist/internal/serving-contracts/workflow.d.ts +439 -0
- package/dist/internal/serving-contracts/workflow.js +37 -0
- package/dist/material-stream.d.ts +18 -0
- package/dist/material-stream.js +29 -0
- package/dist/oauth.d.ts +268 -0
- package/dist/oauth.js +539 -0
- package/dist/resource.d.ts +88 -0
- package/dist/resource.js +123 -0
- package/dist/session.d.ts +4 -0
- package/dist/session.js +3 -0
- package/dist/tenant-client.d.ts +169 -0
- package/dist/tenant-client.js +58 -0
- package/dist/tenant-management.d.ts +240 -0
- package/dist/tenant-management.js +149 -0
- package/dist/tenant-project.d.ts +57 -0
- package/dist/tenant-project.js +63 -0
- package/dist/tenant-runtime.d.ts +174 -0
- package/dist/tenant-runtime.js +17 -0
- package/dist/tenant-web-content.d.ts +44 -0
- package/dist/tenant-web-content.js +70 -0
- package/dist/tenant-web-crawl.d.ts +42 -0
- package/dist/tenant-web-crawl.js +39 -0
- package/dist/tenant-web-dynamic.d.ts +42 -0
- package/dist/tenant-web-dynamic.js +39 -0
- package/dist/tenant-web-workflow.d.ts +43 -0
- package/dist/tenant-web-workflow.js +63 -0
- package/dist/tenant-web.d.ts +42 -0
- package/dist/tenant-web.js +39 -0
- package/dist/tenant-workspace.d.ts +36 -0
- package/dist/tenant-workspace.js +21 -0
- package/dist/token-provider.d.ts +14 -0
- package/dist/token-provider.js +21 -0
- package/package.json +45 -3
|
@@ -0,0 +1,348 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const TIPP_UNIVERSE_MAX_RESOURCE_BYTES: number;
|
|
3
|
+
export declare const schedulerInvocationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
4
|
+
command: z.ZodLiteral<"business-information-collect">;
|
|
5
|
+
maxSources: z.ZodDefault<z.ZodNumber>;
|
|
6
|
+
maxResourceBytes: z.ZodDefault<z.ZodNumber>;
|
|
7
|
+
fileRootsFile: z.ZodOptional<z.ZodString>;
|
|
8
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
9
|
+
command: z.ZodLiteral<"pk-import-rules-project">;
|
|
10
|
+
acquireLinkedDocuments: z.ZodDefault<z.ZodBoolean>;
|
|
11
|
+
documentBatch: z.ZodDefault<z.ZodNumber>;
|
|
12
|
+
maxDocumentBytes: z.ZodDefault<z.ZodNumber>;
|
|
13
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
14
|
+
command: z.ZodLiteral<"acquisition-run">;
|
|
15
|
+
programDirectory: z.ZodString;
|
|
16
|
+
fileRootsFile: z.ZodOptional<z.ZodString>;
|
|
17
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
18
|
+
command: z.ZodLiteral<"collection-tick">;
|
|
19
|
+
maxResourceBytes: z.ZodDefault<z.ZodNumber>;
|
|
20
|
+
batchLimit: z.ZodDefault<z.ZodNumber>;
|
|
21
|
+
fileRootsFile: z.ZodOptional<z.ZodString>;
|
|
22
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
23
|
+
command: z.ZodLiteral<"collection-projection-tick">;
|
|
24
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
25
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
26
|
+
command: z.ZodLiteral<"project-projection-tick">;
|
|
27
|
+
maxRows: z.ZodOptional<z.ZodNumber>;
|
|
28
|
+
maxDependencyRows: z.ZodOptional<z.ZodNumber>;
|
|
29
|
+
maxBytes: z.ZodOptional<z.ZodNumber>;
|
|
30
|
+
maxMs: z.ZodOptional<z.ZodNumber>;
|
|
31
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
32
|
+
command: z.ZodLiteral<"review-packet-project">;
|
|
33
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
34
|
+
command: z.ZodLiteral<"auto-publication-tick">;
|
|
35
|
+
concurrency: z.ZodOptional<z.ZodNumber>;
|
|
36
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
37
|
+
command: z.ZodLiteral<"public-reference-tick">;
|
|
38
|
+
policyFile: z.ZodString;
|
|
39
|
+
identityDatabase: z.ZodString;
|
|
40
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
41
|
+
command: z.ZodLiteral<"feed-project">;
|
|
42
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
43
|
+
command: z.ZodLiteral<"procurement-project">;
|
|
44
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
45
|
+
command: z.ZodLiteral<"pk-valuation-status-project">;
|
|
46
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
47
|
+
command: z.ZodLiteral<"pk-standards-project">;
|
|
48
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
49
|
+
command: z.ZodLiteral<"cpec-project">;
|
|
50
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
51
|
+
command: z.ZodLiteral<"tipp-universe-project">;
|
|
52
|
+
chapterBatch: z.ZodDefault<z.ZodNumber>;
|
|
53
|
+
maxResourceBytes: z.ZodDefault<z.ZodNumber>;
|
|
54
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
55
|
+
command: z.ZodLiteral<"tipp-detail-project">;
|
|
56
|
+
detailBatch: z.ZodDefault<z.ZodNumber>;
|
|
57
|
+
detailConcurrency: z.ZodOptional<z.ZodNumber>;
|
|
58
|
+
maxResourceBytes: z.ZodDefault<z.ZodNumber>;
|
|
59
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
60
|
+
command: z.ZodLiteral<"tipp-tariff-project">;
|
|
61
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
62
|
+
command: z.ZodLiteral<"tipp-regulatory-project">;
|
|
63
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
64
|
+
command: z.ZodLiteral<"pk-tariff-reconciliation-project">;
|
|
65
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
66
|
+
command: z.ZodLiteral<"signal-collect">;
|
|
67
|
+
programFile: z.ZodString;
|
|
68
|
+
profile: z.ZodEnum<{
|
|
69
|
+
trends: "trends";
|
|
70
|
+
hn: "hn";
|
|
71
|
+
github: "github";
|
|
72
|
+
autocomplete: "autocomplete";
|
|
73
|
+
youtube: "youtube";
|
|
74
|
+
tiktok: "tiktok";
|
|
75
|
+
douyin: "douyin";
|
|
76
|
+
meta: "meta";
|
|
77
|
+
"deep-social": "deep-social";
|
|
78
|
+
}>;
|
|
79
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
80
|
+
command: z.ZodLiteral<"signal-compose">;
|
|
81
|
+
programFile: z.ZodString;
|
|
82
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
83
|
+
command: z.ZodLiteral<"customs-corpus-run">;
|
|
84
|
+
programFile: z.ZodString;
|
|
85
|
+
adapter: z.ZodEnum<{
|
|
86
|
+
"us-hts": "us-hts";
|
|
87
|
+
"us-cross": "us-cross";
|
|
88
|
+
"ca-tariff": "ca-tariff";
|
|
89
|
+
"ca-rulings": "ca-rulings";
|
|
90
|
+
"eu-ebti": "eu-ebti";
|
|
91
|
+
"pk-tariff": "pk-tariff";
|
|
92
|
+
"pk-import-sro": "pk-import-sro";
|
|
93
|
+
"pk-tax-authorities": "pk-tax-authorities";
|
|
94
|
+
"pk-classification": "pk-classification";
|
|
95
|
+
"pk-valuation": "pk-valuation";
|
|
96
|
+
"za-determinations": "za-determinations";
|
|
97
|
+
"eg-nafeza": "eg-nafeza";
|
|
98
|
+
"ae-tariff": "ae-tariff";
|
|
99
|
+
"sa-tariff": "sa-tariff";
|
|
100
|
+
"ru-eaeu": "ru-eaeu";
|
|
101
|
+
}>;
|
|
102
|
+
refreshStoredDocuments: z.ZodOptional<z.ZodBoolean>;
|
|
103
|
+
refreshRemoteBundle: z.ZodOptional<z.ZodBoolean>;
|
|
104
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
105
|
+
command: z.ZodLiteral<"location-corpus-run">;
|
|
106
|
+
programFile: z.ZodString;
|
|
107
|
+
adapter: z.ZodLiteral<"unlocode">;
|
|
108
|
+
}, z.core.$strict>], "command">;
|
|
109
|
+
export declare const scheduledWorkloadSchema: z.ZodObject<{
|
|
110
|
+
workloadId: z.ZodString;
|
|
111
|
+
projectKey: z.ZodString;
|
|
112
|
+
priority: z.ZodNumber;
|
|
113
|
+
intervalSeconds: z.ZodNumber;
|
|
114
|
+
timeoutSeconds: z.ZodDefault<z.ZodNumber>;
|
|
115
|
+
assignmentFile: z.ZodString;
|
|
116
|
+
initialDueAt: z.ZodOptional<z.ZodISODateTime>;
|
|
117
|
+
invocation: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
118
|
+
command: z.ZodLiteral<"business-information-collect">;
|
|
119
|
+
maxSources: z.ZodDefault<z.ZodNumber>;
|
|
120
|
+
maxResourceBytes: z.ZodDefault<z.ZodNumber>;
|
|
121
|
+
fileRootsFile: z.ZodOptional<z.ZodString>;
|
|
122
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
123
|
+
command: z.ZodLiteral<"pk-import-rules-project">;
|
|
124
|
+
acquireLinkedDocuments: z.ZodDefault<z.ZodBoolean>;
|
|
125
|
+
documentBatch: z.ZodDefault<z.ZodNumber>;
|
|
126
|
+
maxDocumentBytes: z.ZodDefault<z.ZodNumber>;
|
|
127
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
128
|
+
command: z.ZodLiteral<"acquisition-run">;
|
|
129
|
+
programDirectory: z.ZodString;
|
|
130
|
+
fileRootsFile: z.ZodOptional<z.ZodString>;
|
|
131
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
132
|
+
command: z.ZodLiteral<"collection-tick">;
|
|
133
|
+
maxResourceBytes: z.ZodDefault<z.ZodNumber>;
|
|
134
|
+
batchLimit: z.ZodDefault<z.ZodNumber>;
|
|
135
|
+
fileRootsFile: z.ZodOptional<z.ZodString>;
|
|
136
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
137
|
+
command: z.ZodLiteral<"collection-projection-tick">;
|
|
138
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
139
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
140
|
+
command: z.ZodLiteral<"project-projection-tick">;
|
|
141
|
+
maxRows: z.ZodOptional<z.ZodNumber>;
|
|
142
|
+
maxDependencyRows: z.ZodOptional<z.ZodNumber>;
|
|
143
|
+
maxBytes: z.ZodOptional<z.ZodNumber>;
|
|
144
|
+
maxMs: z.ZodOptional<z.ZodNumber>;
|
|
145
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
146
|
+
command: z.ZodLiteral<"review-packet-project">;
|
|
147
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
148
|
+
command: z.ZodLiteral<"auto-publication-tick">;
|
|
149
|
+
concurrency: z.ZodOptional<z.ZodNumber>;
|
|
150
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
151
|
+
command: z.ZodLiteral<"public-reference-tick">;
|
|
152
|
+
policyFile: z.ZodString;
|
|
153
|
+
identityDatabase: z.ZodString;
|
|
154
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
155
|
+
command: z.ZodLiteral<"feed-project">;
|
|
156
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
157
|
+
command: z.ZodLiteral<"procurement-project">;
|
|
158
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
159
|
+
command: z.ZodLiteral<"pk-valuation-status-project">;
|
|
160
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
161
|
+
command: z.ZodLiteral<"pk-standards-project">;
|
|
162
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
163
|
+
command: z.ZodLiteral<"cpec-project">;
|
|
164
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
165
|
+
command: z.ZodLiteral<"tipp-universe-project">;
|
|
166
|
+
chapterBatch: z.ZodDefault<z.ZodNumber>;
|
|
167
|
+
maxResourceBytes: z.ZodDefault<z.ZodNumber>;
|
|
168
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
169
|
+
command: z.ZodLiteral<"tipp-detail-project">;
|
|
170
|
+
detailBatch: z.ZodDefault<z.ZodNumber>;
|
|
171
|
+
detailConcurrency: z.ZodOptional<z.ZodNumber>;
|
|
172
|
+
maxResourceBytes: z.ZodDefault<z.ZodNumber>;
|
|
173
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
174
|
+
command: z.ZodLiteral<"tipp-tariff-project">;
|
|
175
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
176
|
+
command: z.ZodLiteral<"tipp-regulatory-project">;
|
|
177
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
178
|
+
command: z.ZodLiteral<"pk-tariff-reconciliation-project">;
|
|
179
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
180
|
+
command: z.ZodLiteral<"signal-collect">;
|
|
181
|
+
programFile: z.ZodString;
|
|
182
|
+
profile: z.ZodEnum<{
|
|
183
|
+
trends: "trends";
|
|
184
|
+
hn: "hn";
|
|
185
|
+
github: "github";
|
|
186
|
+
autocomplete: "autocomplete";
|
|
187
|
+
youtube: "youtube";
|
|
188
|
+
tiktok: "tiktok";
|
|
189
|
+
douyin: "douyin";
|
|
190
|
+
meta: "meta";
|
|
191
|
+
"deep-social": "deep-social";
|
|
192
|
+
}>;
|
|
193
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
194
|
+
command: z.ZodLiteral<"signal-compose">;
|
|
195
|
+
programFile: z.ZodString;
|
|
196
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
197
|
+
command: z.ZodLiteral<"customs-corpus-run">;
|
|
198
|
+
programFile: z.ZodString;
|
|
199
|
+
adapter: z.ZodEnum<{
|
|
200
|
+
"us-hts": "us-hts";
|
|
201
|
+
"us-cross": "us-cross";
|
|
202
|
+
"ca-tariff": "ca-tariff";
|
|
203
|
+
"ca-rulings": "ca-rulings";
|
|
204
|
+
"eu-ebti": "eu-ebti";
|
|
205
|
+
"pk-tariff": "pk-tariff";
|
|
206
|
+
"pk-import-sro": "pk-import-sro";
|
|
207
|
+
"pk-tax-authorities": "pk-tax-authorities";
|
|
208
|
+
"pk-classification": "pk-classification";
|
|
209
|
+
"pk-valuation": "pk-valuation";
|
|
210
|
+
"za-determinations": "za-determinations";
|
|
211
|
+
"eg-nafeza": "eg-nafeza";
|
|
212
|
+
"ae-tariff": "ae-tariff";
|
|
213
|
+
"sa-tariff": "sa-tariff";
|
|
214
|
+
"ru-eaeu": "ru-eaeu";
|
|
215
|
+
}>;
|
|
216
|
+
refreshStoredDocuments: z.ZodOptional<z.ZodBoolean>;
|
|
217
|
+
refreshRemoteBundle: z.ZodOptional<z.ZodBoolean>;
|
|
218
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
219
|
+
command: z.ZodLiteral<"location-corpus-run">;
|
|
220
|
+
programFile: z.ZodString;
|
|
221
|
+
adapter: z.ZodLiteral<"unlocode">;
|
|
222
|
+
}, z.core.$strict>], "command">;
|
|
223
|
+
}, z.core.$strict>;
|
|
224
|
+
export declare const nodeSchedulerManifestSchema: z.ZodObject<{
|
|
225
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
226
|
+
nodeId: z.ZodString;
|
|
227
|
+
capabilities: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
228
|
+
maxWorkloadsPerTick: z.ZodDefault<z.ZodNumber>;
|
|
229
|
+
workloads: z.ZodArray<z.ZodObject<{
|
|
230
|
+
workloadId: z.ZodString;
|
|
231
|
+
projectKey: z.ZodString;
|
|
232
|
+
priority: z.ZodNumber;
|
|
233
|
+
intervalSeconds: z.ZodNumber;
|
|
234
|
+
timeoutSeconds: z.ZodDefault<z.ZodNumber>;
|
|
235
|
+
assignmentFile: z.ZodString;
|
|
236
|
+
initialDueAt: z.ZodOptional<z.ZodISODateTime>;
|
|
237
|
+
invocation: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
238
|
+
command: z.ZodLiteral<"business-information-collect">;
|
|
239
|
+
maxSources: z.ZodDefault<z.ZodNumber>;
|
|
240
|
+
maxResourceBytes: z.ZodDefault<z.ZodNumber>;
|
|
241
|
+
fileRootsFile: z.ZodOptional<z.ZodString>;
|
|
242
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
243
|
+
command: z.ZodLiteral<"pk-import-rules-project">;
|
|
244
|
+
acquireLinkedDocuments: z.ZodDefault<z.ZodBoolean>;
|
|
245
|
+
documentBatch: z.ZodDefault<z.ZodNumber>;
|
|
246
|
+
maxDocumentBytes: z.ZodDefault<z.ZodNumber>;
|
|
247
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
248
|
+
command: z.ZodLiteral<"acquisition-run">;
|
|
249
|
+
programDirectory: z.ZodString;
|
|
250
|
+
fileRootsFile: z.ZodOptional<z.ZodString>;
|
|
251
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
252
|
+
command: z.ZodLiteral<"collection-tick">;
|
|
253
|
+
maxResourceBytes: z.ZodDefault<z.ZodNumber>;
|
|
254
|
+
batchLimit: z.ZodDefault<z.ZodNumber>;
|
|
255
|
+
fileRootsFile: z.ZodOptional<z.ZodString>;
|
|
256
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
257
|
+
command: z.ZodLiteral<"collection-projection-tick">;
|
|
258
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
259
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
260
|
+
command: z.ZodLiteral<"project-projection-tick">;
|
|
261
|
+
maxRows: z.ZodOptional<z.ZodNumber>;
|
|
262
|
+
maxDependencyRows: z.ZodOptional<z.ZodNumber>;
|
|
263
|
+
maxBytes: z.ZodOptional<z.ZodNumber>;
|
|
264
|
+
maxMs: z.ZodOptional<z.ZodNumber>;
|
|
265
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
266
|
+
command: z.ZodLiteral<"review-packet-project">;
|
|
267
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
268
|
+
command: z.ZodLiteral<"auto-publication-tick">;
|
|
269
|
+
concurrency: z.ZodOptional<z.ZodNumber>;
|
|
270
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
271
|
+
command: z.ZodLiteral<"public-reference-tick">;
|
|
272
|
+
policyFile: z.ZodString;
|
|
273
|
+
identityDatabase: z.ZodString;
|
|
274
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
275
|
+
command: z.ZodLiteral<"feed-project">;
|
|
276
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
277
|
+
command: z.ZodLiteral<"procurement-project">;
|
|
278
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
279
|
+
command: z.ZodLiteral<"pk-valuation-status-project">;
|
|
280
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
281
|
+
command: z.ZodLiteral<"pk-standards-project">;
|
|
282
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
283
|
+
command: z.ZodLiteral<"cpec-project">;
|
|
284
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
285
|
+
command: z.ZodLiteral<"tipp-universe-project">;
|
|
286
|
+
chapterBatch: z.ZodDefault<z.ZodNumber>;
|
|
287
|
+
maxResourceBytes: z.ZodDefault<z.ZodNumber>;
|
|
288
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
289
|
+
command: z.ZodLiteral<"tipp-detail-project">;
|
|
290
|
+
detailBatch: z.ZodDefault<z.ZodNumber>;
|
|
291
|
+
detailConcurrency: z.ZodOptional<z.ZodNumber>;
|
|
292
|
+
maxResourceBytes: z.ZodDefault<z.ZodNumber>;
|
|
293
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
294
|
+
command: z.ZodLiteral<"tipp-tariff-project">;
|
|
295
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
296
|
+
command: z.ZodLiteral<"tipp-regulatory-project">;
|
|
297
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
298
|
+
command: z.ZodLiteral<"pk-tariff-reconciliation-project">;
|
|
299
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
300
|
+
command: z.ZodLiteral<"signal-collect">;
|
|
301
|
+
programFile: z.ZodString;
|
|
302
|
+
profile: z.ZodEnum<{
|
|
303
|
+
trends: "trends";
|
|
304
|
+
hn: "hn";
|
|
305
|
+
github: "github";
|
|
306
|
+
autocomplete: "autocomplete";
|
|
307
|
+
youtube: "youtube";
|
|
308
|
+
tiktok: "tiktok";
|
|
309
|
+
douyin: "douyin";
|
|
310
|
+
meta: "meta";
|
|
311
|
+
"deep-social": "deep-social";
|
|
312
|
+
}>;
|
|
313
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
314
|
+
command: z.ZodLiteral<"signal-compose">;
|
|
315
|
+
programFile: z.ZodString;
|
|
316
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
317
|
+
command: z.ZodLiteral<"customs-corpus-run">;
|
|
318
|
+
programFile: z.ZodString;
|
|
319
|
+
adapter: z.ZodEnum<{
|
|
320
|
+
"us-hts": "us-hts";
|
|
321
|
+
"us-cross": "us-cross";
|
|
322
|
+
"ca-tariff": "ca-tariff";
|
|
323
|
+
"ca-rulings": "ca-rulings";
|
|
324
|
+
"eu-ebti": "eu-ebti";
|
|
325
|
+
"pk-tariff": "pk-tariff";
|
|
326
|
+
"pk-import-sro": "pk-import-sro";
|
|
327
|
+
"pk-tax-authorities": "pk-tax-authorities";
|
|
328
|
+
"pk-classification": "pk-classification";
|
|
329
|
+
"pk-valuation": "pk-valuation";
|
|
330
|
+
"za-determinations": "za-determinations";
|
|
331
|
+
"eg-nafeza": "eg-nafeza";
|
|
332
|
+
"ae-tariff": "ae-tariff";
|
|
333
|
+
"sa-tariff": "sa-tariff";
|
|
334
|
+
"ru-eaeu": "ru-eaeu";
|
|
335
|
+
}>;
|
|
336
|
+
refreshStoredDocuments: z.ZodOptional<z.ZodBoolean>;
|
|
337
|
+
refreshRemoteBundle: z.ZodOptional<z.ZodBoolean>;
|
|
338
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
339
|
+
command: z.ZodLiteral<"location-corpus-run">;
|
|
340
|
+
programFile: z.ZodString;
|
|
341
|
+
adapter: z.ZodLiteral<"unlocode">;
|
|
342
|
+
}, z.core.$strict>], "command">;
|
|
343
|
+
}, z.core.$strict>>;
|
|
344
|
+
}, z.core.$strict>;
|
|
345
|
+
export type SchedulerInvocation = z.infer<typeof schedulerInvocationSchema>;
|
|
346
|
+
export type ScheduledWorkload = z.infer<typeof scheduledWorkloadSchema>;
|
|
347
|
+
export type NodeSchedulerManifest = z.infer<typeof nodeSchedulerManifestSchema>;
|
|
348
|
+
export declare const scheduledWorkerCommands: readonly string[];
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { idSchema, isoDateTimeSchema, projectKeySchema, schemaVersionSchema } from './common.js';
|
|
3
|
+
import { signalProfileNameSchema } from './signal.js';
|
|
4
|
+
import { runtimeCapabilitySchema } from './runtime.js';
|
|
5
|
+
export const TIPP_UNIVERSE_MAX_RESOURCE_BYTES = 8 * 1024 * 1024;
|
|
6
|
+
const deploymentPathSchema = z.string().trim().min(1).max(4096).refine((value) => !value.includes('\0'), 'path must not contain NUL');
|
|
7
|
+
const scheduledWorkloadBaseSchema = z.object({
|
|
8
|
+
workloadId: idSchema,
|
|
9
|
+
projectKey: projectKeySchema,
|
|
10
|
+
priority: z.number().int().min(0).max(1000),
|
|
11
|
+
intervalSeconds: z.number().int().min(60).max(7 * 24 * 60 * 60),
|
|
12
|
+
timeoutSeconds: z.number().int().min(30).max(2 * 60 * 60).default(15 * 60),
|
|
13
|
+
assignmentFile: deploymentPathSchema,
|
|
14
|
+
initialDueAt: isoDateTimeSchema.optional(),
|
|
15
|
+
}).strict();
|
|
16
|
+
const acquisitionInvocationSchema = z.object({
|
|
17
|
+
command: z.literal('acquisition-run'),
|
|
18
|
+
programDirectory: deploymentPathSchema,
|
|
19
|
+
fileRootsFile: deploymentPathSchema.optional(),
|
|
20
|
+
}).strict();
|
|
21
|
+
const reviewPacketInvocationSchema = z.object({
|
|
22
|
+
command: z.literal('review-packet-project'),
|
|
23
|
+
}).strict();
|
|
24
|
+
// 自动发布只消费已持久化的事件和 Agent 输入,不触发任何来源采集。
|
|
25
|
+
const autoPublicationInvocationSchema = z.object({
|
|
26
|
+
command: z.literal('auto-publication-tick'),
|
|
27
|
+
// 同项目发布并发有固定上限;旧 manifest 无此字段时采用 Runner 默认值。
|
|
28
|
+
concurrency: z.number().int().min(1).max(4).optional(),
|
|
29
|
+
}).strict();
|
|
30
|
+
const publicReferenceInvocationSchema = z.object({ command: z.literal('public-reference-tick'), policyFile: deploymentPathSchema, identityDatabase: deploymentPathSchema }).strict();
|
|
31
|
+
const feedProjectInvocationSchema = z.object({
|
|
32
|
+
command: z.literal('feed-project'),
|
|
33
|
+
}).strict();
|
|
34
|
+
const procurementProjectInvocationSchema = z.object({
|
|
35
|
+
command: z.literal('procurement-project'),
|
|
36
|
+
}).strict();
|
|
37
|
+
const pkValuationStatusProjectInvocationSchema = z.object({
|
|
38
|
+
command: z.literal('pk-valuation-status-project'),
|
|
39
|
+
}).strict();
|
|
40
|
+
const pkStandardsProjectInvocationSchema = z.object({
|
|
41
|
+
command: z.literal('pk-standards-project'),
|
|
42
|
+
}).strict();
|
|
43
|
+
const cpecProjectInvocationSchema = z.object({
|
|
44
|
+
command: z.literal('cpec-project'),
|
|
45
|
+
}).strict();
|
|
46
|
+
const tippUniverseProjectInvocationSchema = z.object({
|
|
47
|
+
command: z.literal('tipp-universe-project'),
|
|
48
|
+
chapterBatch: z.number().int().min(1).max(96).default(4),
|
|
49
|
+
maxResourceBytes: z.number().int().min(64 * 1024).max(16 * 1024 * 1024).default(TIPP_UNIVERSE_MAX_RESOURCE_BYTES),
|
|
50
|
+
}).strict();
|
|
51
|
+
const tippDetailProjectInvocationSchema = z.object({
|
|
52
|
+
command: z.literal('tipp-detail-project'),
|
|
53
|
+
detailBatch: z.number().int().min(1).max(1000).default(50),
|
|
54
|
+
detailConcurrency: z.number().int().min(1).max(4).optional(),
|
|
55
|
+
maxResourceBytes: z.number().int().min(64 * 1024).max(16 * 1024 * 1024).default(4 * 1024 * 1024),
|
|
56
|
+
}).strict();
|
|
57
|
+
const tippTariffProjectInvocationSchema = z.object({
|
|
58
|
+
command: z.literal('tipp-tariff-project'),
|
|
59
|
+
}).strict();
|
|
60
|
+
const tippRegulatoryProjectInvocationSchema = z.object({
|
|
61
|
+
command: z.literal('tipp-regulatory-project'),
|
|
62
|
+
}).strict();
|
|
63
|
+
const pkTariffReconciliationProjectInvocationSchema = z.object({
|
|
64
|
+
command: z.literal('pk-tariff-reconciliation-project'),
|
|
65
|
+
}).strict();
|
|
66
|
+
const collectionInvocationSchema = z.object({
|
|
67
|
+
command: z.literal('collection-tick'),
|
|
68
|
+
maxResourceBytes: z.number().int().min(1024).max(64 * 1024 * 1024).default(16 * 1024 * 1024),
|
|
69
|
+
batchLimit: z.number().int().min(1).max(10_000).default(100),
|
|
70
|
+
fileRootsFile: deploymentPathSchema.optional(),
|
|
71
|
+
}).strict();
|
|
72
|
+
const collectionProjectionInvocationSchema = z.object({ command: z.literal('collection-projection-tick'), limit: z.number().int().min(1).max(100).default(25) }).strict();
|
|
73
|
+
const signalCollectInvocationSchema = z.object({
|
|
74
|
+
command: z.literal('signal-collect'),
|
|
75
|
+
programFile: deploymentPathSchema,
|
|
76
|
+
profile: signalProfileNameSchema,
|
|
77
|
+
}).strict();
|
|
78
|
+
const signalComposeInvocationSchema = z.object({
|
|
79
|
+
command: z.literal('signal-compose'),
|
|
80
|
+
programFile: deploymentPathSchema,
|
|
81
|
+
}).strict();
|
|
82
|
+
const customsCorpusInvocationSchema = z.object({
|
|
83
|
+
command: z.literal('customs-corpus-run'),
|
|
84
|
+
programFile: deploymentPathSchema,
|
|
85
|
+
adapter: z.enum(['us-hts', 'us-cross', 'ca-tariff', 'ca-rulings', 'eu-ebti', 'pk-tariff', 'pk-import-sro', 'pk-tax-authorities', 'pk-classification', 'pk-valuation', 'za-determinations', 'eg-nafeza', 'ae-tariff', 'sa-tariff', 'ru-eaeu']),
|
|
86
|
+
refreshStoredDocuments: z.boolean().optional(),
|
|
87
|
+
// GCC 重新访问官方来源必须显式启用,历史文件导入不触发网络。
|
|
88
|
+
refreshRemoteBundle: z.boolean().optional(),
|
|
89
|
+
}).strict();
|
|
90
|
+
const locationCorpusInvocationSchema = z.object({
|
|
91
|
+
command: z.literal('location-corpus-run'),
|
|
92
|
+
programFile: deploymentPathSchema,
|
|
93
|
+
adapter: z.literal('unlocode'),
|
|
94
|
+
}).strict();
|
|
95
|
+
export const schedulerInvocationSchema = z.discriminatedUnion('command', [
|
|
96
|
+
z.object({ command: z.literal('business-information-collect'), maxSources: z.number().int().min(1).max(32).default(8), maxResourceBytes: z.number().int().min(1024).max(16 * 1024 * 1024).default(2 * 1024 * 1024), fileRootsFile: deploymentPathSchema.optional() }).strict(),
|
|
97
|
+
z.object({ command: z.literal('pk-import-rules-project'), acquireLinkedDocuments: z.boolean().default(false), documentBatch: z.number().int().min(1).max(50).default(20), maxDocumentBytes: z.number().int().min(1024).max(32 * 1024 * 1024).default(16 * 1024 * 1024) }).strict(),
|
|
98
|
+
acquisitionInvocationSchema,
|
|
99
|
+
collectionInvocationSchema,
|
|
100
|
+
collectionProjectionInvocationSchema,
|
|
101
|
+
z.object({ command: z.literal('project-projection-tick'),
|
|
102
|
+
maxRows: z.number().int().min(1).max(100).optional(),
|
|
103
|
+
maxDependencyRows: z.number().int().min(1).max(10000).optional(),
|
|
104
|
+
maxBytes: z.number().int().min(1).max(16 * 1024 ** 3).optional(),
|
|
105
|
+
maxMs: z.number().int().min(1).max(600000).optional(),
|
|
106
|
+
}).strict(),
|
|
107
|
+
reviewPacketInvocationSchema,
|
|
108
|
+
autoPublicationInvocationSchema,
|
|
109
|
+
publicReferenceInvocationSchema,
|
|
110
|
+
feedProjectInvocationSchema,
|
|
111
|
+
procurementProjectInvocationSchema,
|
|
112
|
+
pkValuationStatusProjectInvocationSchema,
|
|
113
|
+
pkStandardsProjectInvocationSchema,
|
|
114
|
+
cpecProjectInvocationSchema,
|
|
115
|
+
tippUniverseProjectInvocationSchema,
|
|
116
|
+
tippDetailProjectInvocationSchema,
|
|
117
|
+
tippTariffProjectInvocationSchema,
|
|
118
|
+
tippRegulatoryProjectInvocationSchema,
|
|
119
|
+
pkTariffReconciliationProjectInvocationSchema,
|
|
120
|
+
signalCollectInvocationSchema,
|
|
121
|
+
signalComposeInvocationSchema,
|
|
122
|
+
customsCorpusInvocationSchema,
|
|
123
|
+
locationCorpusInvocationSchema,
|
|
124
|
+
]);
|
|
125
|
+
export const scheduledWorkloadSchema = scheduledWorkloadBaseSchema.extend({
|
|
126
|
+
invocation: schedulerInvocationSchema,
|
|
127
|
+
}).strict().superRefine((value, ctx) => {
|
|
128
|
+
let expected;
|
|
129
|
+
switch (value.invocation.command) {
|
|
130
|
+
case 'acquisition-run':
|
|
131
|
+
expected = `project:${value.projectKey}:acquisition`;
|
|
132
|
+
break;
|
|
133
|
+
case 'collection-projection-tick':
|
|
134
|
+
expected = `project:${value.projectKey}:material-projection`;
|
|
135
|
+
break;
|
|
136
|
+
case 'project-projection-tick':
|
|
137
|
+
expected = `project:${value.projectKey}:catalog-projection`;
|
|
138
|
+
break;
|
|
139
|
+
case 'collection-tick':
|
|
140
|
+
expected = `project:${value.projectKey}:collection`;
|
|
141
|
+
break;
|
|
142
|
+
case 'review-packet-project':
|
|
143
|
+
expected = `project:${value.projectKey}:review-packets`;
|
|
144
|
+
break;
|
|
145
|
+
case 'auto-publication-tick':
|
|
146
|
+
expected = `project:${value.projectKey}:auto-publication`;
|
|
147
|
+
break;
|
|
148
|
+
case 'public-reference-tick':
|
|
149
|
+
expected = `project:${value.projectKey}:public-reference-publication`;
|
|
150
|
+
break;
|
|
151
|
+
case 'feed-project':
|
|
152
|
+
expected = `project:${value.projectKey}:feed-project`;
|
|
153
|
+
break;
|
|
154
|
+
case 'procurement-project':
|
|
155
|
+
expected = `project:${value.projectKey}:procurement-project`;
|
|
156
|
+
break;
|
|
157
|
+
case 'pk-valuation-status-project':
|
|
158
|
+
expected = `project:${value.projectKey}:pk-valuation-status-project`;
|
|
159
|
+
break;
|
|
160
|
+
case 'pk-standards-project':
|
|
161
|
+
expected = `project:${value.projectKey}:pk-standards-project`;
|
|
162
|
+
break;
|
|
163
|
+
case 'pk-import-rules-project':
|
|
164
|
+
expected = `project:${value.projectKey}:pk-import-rules-project`;
|
|
165
|
+
break;
|
|
166
|
+
case 'cpec-project':
|
|
167
|
+
expected = `project:${value.projectKey}:cpec-project`;
|
|
168
|
+
break;
|
|
169
|
+
case 'business-information-collect':
|
|
170
|
+
expected = `project:${value.projectKey}:business-information-collect`;
|
|
171
|
+
break;
|
|
172
|
+
case 'tipp-universe-project':
|
|
173
|
+
expected = `project:${value.projectKey}:tipp-universe-project`;
|
|
174
|
+
break;
|
|
175
|
+
case 'tipp-detail-project':
|
|
176
|
+
expected = `project:${value.projectKey}:tipp-detail-project`;
|
|
177
|
+
break;
|
|
178
|
+
case 'tipp-tariff-project':
|
|
179
|
+
expected = `project:${value.projectKey}:tipp-tariff-project`;
|
|
180
|
+
break;
|
|
181
|
+
case 'tipp-regulatory-project':
|
|
182
|
+
expected = `project:${value.projectKey}:tipp-regulatory-project`;
|
|
183
|
+
break;
|
|
184
|
+
case 'pk-tariff-reconciliation-project':
|
|
185
|
+
expected = `project:${value.projectKey}:pk-tariff-reconciliation-project`;
|
|
186
|
+
break;
|
|
187
|
+
case 'signal-collect':
|
|
188
|
+
expected = `project:${value.projectKey}:signal:${value.invocation.profile}`;
|
|
189
|
+
break;
|
|
190
|
+
case 'signal-compose':
|
|
191
|
+
expected = `project:${value.projectKey}:signal:compose`;
|
|
192
|
+
break;
|
|
193
|
+
case 'customs-corpus-run':
|
|
194
|
+
expected = `project:${value.projectKey}:customs:${value.invocation.adapter}`;
|
|
195
|
+
break;
|
|
196
|
+
case 'location-corpus-run':
|
|
197
|
+
expected = `project:${value.projectKey}:locations:${value.invocation.adapter}`;
|
|
198
|
+
break;
|
|
199
|
+
}
|
|
200
|
+
if (value.workloadId !== expected) {
|
|
201
|
+
ctx.addIssue({ code: 'custom', path: ['workloadId'], message: `workloadId must be ${expected}` });
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
export const nodeSchedulerManifestSchema = z.object({
|
|
205
|
+
schemaVersion: schemaVersionSchema,
|
|
206
|
+
nodeId: idSchema,
|
|
207
|
+
capabilities: z.array(runtimeCapabilitySchema).max(128).default(['network:http']),
|
|
208
|
+
maxWorkloadsPerTick: z.number().int().min(1).max(32).default(8),
|
|
209
|
+
workloads: z.array(scheduledWorkloadSchema).max(256),
|
|
210
|
+
}).strict().superRefine((value, ctx) => {
|
|
211
|
+
const seen = new Set();
|
|
212
|
+
const capabilities = new Set(value.capabilities);
|
|
213
|
+
value.workloads.forEach((workload, index) => {
|
|
214
|
+
if (seen.has(workload.workloadId))
|
|
215
|
+
ctx.addIssue({ code: 'custom', path: ['workloads', index, 'workloadId'], message: 'duplicate workloadId' });
|
|
216
|
+
seen.add(workload.workloadId);
|
|
217
|
+
if (workload.invocation.command === 'business-information-collect' && !capabilities.has('network:http'))
|
|
218
|
+
ctx.addIssue({ code: 'custom', path: ['workloads', index, 'invocation'], message: 'public business collection requires network:http capability' });
|
|
219
|
+
if ((workload.invocation.command === 'collection-tick' || workload.invocation.command === 'collection-projection-tick') && !capabilities.has('network:http')) {
|
|
220
|
+
ctx.addIssue({ code: 'custom', path: ['workloads', index, 'invocation'], message: 'collection tick requires network:http capability' });
|
|
221
|
+
}
|
|
222
|
+
if (workload.invocation.command === 'signal-collect') {
|
|
223
|
+
if (!capabilities.has('network:http')) {
|
|
224
|
+
ctx.addIssue({ code: 'custom', path: ['workloads', index, 'invocation'], message: 'signal collection requires network:http capability' });
|
|
225
|
+
}
|
|
226
|
+
if (['tiktok', 'douyin', 'meta', 'deep-social'].includes(workload.invocation.profile) && !capabilities.has('browser:playwright')) {
|
|
227
|
+
ctx.addIssue({ code: 'custom', path: ['workloads', index, 'invocation'], message: `profile ${workload.invocation.profile} requires browser:playwright capability` });
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
if (workload.invocation.command === 'location-corpus-run' && !capabilities.has('network:http')) {
|
|
231
|
+
ctx.addIssue({ code: 'custom', path: ['workloads', index, 'invocation'], message: 'reference corpus collection requires network:http capability' });
|
|
232
|
+
}
|
|
233
|
+
if (workload.invocation.command === 'tipp-universe-project' && !capabilities.has('network:http')) {
|
|
234
|
+
ctx.addIssue({ code: 'custom', path: ['workloads', index, 'invocation'], message: 'TIPP universe collection requires network:http capability' });
|
|
235
|
+
}
|
|
236
|
+
if (workload.invocation.command === 'tipp-detail-project' && !capabilities.has('network:http')) {
|
|
237
|
+
ctx.addIssue({ code: 'custom', path: ['workloads', index, 'invocation'], message: 'TIPP detail collection requires network:http capability' });
|
|
238
|
+
}
|
|
239
|
+
if (workload.invocation.command === 'customs-corpus-run') {
|
|
240
|
+
if (workload.invocation.refreshRemoteBundle) {
|
|
241
|
+
if (!['ae-tariff', 'sa-tariff'].includes(workload.invocation.adapter))
|
|
242
|
+
ctx.addIssue({ code: 'custom', path: ['workloads', index, 'invocation', 'refreshRemoteBundle'], message: 'GCC refresh requires ae-tariff or sa-tariff adapter' });
|
|
243
|
+
if (!capabilities.has('network:http'))
|
|
244
|
+
ctx.addIssue({ code: 'custom', path: ['workloads', index, 'invocation'], message: 'GCC refresh requires network:http capability' });
|
|
245
|
+
}
|
|
246
|
+
if (workload.invocation.refreshStoredDocuments && !['pk-import-sro', 'ru-eaeu'].includes(workload.invocation.adapter)) {
|
|
247
|
+
ctx.addIssue({ code: 'custom', path: ['workloads', index, 'invocation', 'refreshStoredDocuments'], message: 'stored document refresh requires pk-import-sro or ru-eaeu adapter' });
|
|
248
|
+
}
|
|
249
|
+
const localVerifiedBundleAdapter = ['pk-valuation', 'za-determinations', 'ae-tariff', 'sa-tariff'].includes(workload.invocation.adapter);
|
|
250
|
+
if (!localVerifiedBundleAdapter && !capabilities.has('network:http')) {
|
|
251
|
+
ctx.addIssue({ code: 'custom', path: ['workloads', index, 'invocation'], message: `customs adapter ${workload.invocation.adapter} requires network:http capability` });
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
});
|
|
255
|
+
});
|
|
256
|
+
export const scheduledWorkerCommands = schedulerInvocationSchema.options.map(option => option.shape.command.value);
|