@frost1994/agentic-core 1.0.0 → 1.0.3
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/README.md +5 -5
- package/dist/index.cjs +324 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +505 -5
- package/dist/index.js +324 -0
- package/dist/index.js.map +1 -1
- package/dist/protocol.d.ts +384 -5
- package/package.json +1 -1
- package/LICENSE +0 -201
package/dist/protocol.d.ts
CHANGED
|
@@ -15,6 +15,15 @@ export declare type AiOpenMode = 'launcher' | 'floating' | 'drawer' | 'fullscree
|
|
|
15
15
|
|
|
16
16
|
export declare type AiThemeMode = 'system' | 'light' | 'dark' | 'custom';
|
|
17
17
|
|
|
18
|
+
/** A backend-produced insight (never re-derived from rows on the client). */
|
|
19
|
+
declare interface AnalysisInsight {
|
|
20
|
+
type: InsightType;
|
|
21
|
+
title: string;
|
|
22
|
+
detail: string;
|
|
23
|
+
/** Optional references to column keys / row indices backing the insight. */
|
|
24
|
+
refs?: string[];
|
|
25
|
+
}
|
|
26
|
+
|
|
18
27
|
export declare interface AssistantMessage {
|
|
19
28
|
id: string;
|
|
20
29
|
conversationId: string;
|
|
@@ -58,6 +67,66 @@ export declare interface AssistantMessage {
|
|
|
58
67
|
};
|
|
59
68
|
}
|
|
60
69
|
|
|
70
|
+
/**
|
|
71
|
+
* Card payload — discriminated union on `kind`. Mirrors Java `sealed interface
|
|
72
|
+
* CardData permits SqlCard, TableCard, ChartCard, MetricCard, SourceCard,
|
|
73
|
+
* SuggestionCard, GlossaryCard, AnalysisCard, CitationCard`.
|
|
74
|
+
*/
|
|
75
|
+
declare type CardData = {
|
|
76
|
+
kind: 'sql';
|
|
77
|
+
sql: string;
|
|
78
|
+
dialect: Dialect;
|
|
79
|
+
tables: string[];
|
|
80
|
+
estimatedRows: number;
|
|
81
|
+
isReadonly: boolean;
|
|
82
|
+
isSensitive: boolean;
|
|
83
|
+
explanation?: string;
|
|
84
|
+
} | {
|
|
85
|
+
kind: 'table';
|
|
86
|
+
columns: ColumnDef[];
|
|
87
|
+
rows: Row[];
|
|
88
|
+
total: number;
|
|
89
|
+
truncated?: boolean;
|
|
90
|
+
} | {
|
|
91
|
+
kind: 'chart';
|
|
92
|
+
spec: ChartSpec;
|
|
93
|
+
} | {
|
|
94
|
+
kind: 'metric';
|
|
95
|
+
items: MetricItem[];
|
|
96
|
+
} | {
|
|
97
|
+
kind: 'source';
|
|
98
|
+
items: SourceItem[];
|
|
99
|
+
} | {
|
|
100
|
+
kind: 'suggestion';
|
|
101
|
+
items: SuggestionItem[];
|
|
102
|
+
} | {
|
|
103
|
+
kind: 'glossary';
|
|
104
|
+
columns: ColumnDef[];
|
|
105
|
+
} | {
|
|
106
|
+
kind: 'analysis';
|
|
107
|
+
insights: AnalysisInsight[];
|
|
108
|
+
} | {
|
|
109
|
+
kind: 'citation';
|
|
110
|
+
items: CitationItem[];
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* v2 protocol — card payloads (discriminated union on `kind`).
|
|
115
|
+
*
|
|
116
|
+
* Per REARCHITECTURE-PLAN §4.3 / §4.4: rich content is delivered through a
|
|
117
|
+
* single `card` event whose `data` is a strongly-typed, `kind`-discriminated
|
|
118
|
+
* union. Adding a new card = adding a new `kind` here + one frontend registry
|
|
119
|
+
* entry; the core envelope (events.ts) never changes (CLAUDE.md §12 扩展预留).
|
|
120
|
+
*
|
|
121
|
+
* These types MUST stay shape-for-shape identical to the Java sealed records
|
|
122
|
+
* (`CardData` permits SqlCard/TableCard/... ) so the shared golden fixture
|
|
123
|
+
* (see __fixtures__/golden-events.ts) round-trips on both sides.
|
|
124
|
+
*
|
|
125
|
+
* Pure TS — zero Vue / framework dependency.
|
|
126
|
+
*/
|
|
127
|
+
/** Closed enum of card kinds. The `card` event carries one of these. */
|
|
128
|
+
declare type CardKind = 'sql' | 'table' | 'chart' | 'metric' | 'source' | 'suggestion' | 'glossary' | 'analysis' | 'citation';
|
|
129
|
+
|
|
61
130
|
export declare interface ChartConfig {
|
|
62
131
|
type: 'bar' | 'line' | 'pie' | 'heatmap' | 'gantt' | 'scatter';
|
|
63
132
|
title: string;
|
|
@@ -65,6 +134,64 @@ export declare interface ChartConfig {
|
|
|
65
134
|
options?: Record<string, unknown>;
|
|
66
135
|
}
|
|
67
136
|
|
|
137
|
+
/** Encoding: which column keys map to which visual channels. */
|
|
138
|
+
declare interface ChartEncoding {
|
|
139
|
+
/** Column key for the x axis (category / time). */
|
|
140
|
+
x: string;
|
|
141
|
+
/** One or more column keys for the y axis (measures). */
|
|
142
|
+
y: string[];
|
|
143
|
+
/** Optional column key used to split into series. */
|
|
144
|
+
series?: string;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Closed enum of neutral chart kinds. `''` means "no suitable chart — fall back
|
|
149
|
+
* to table" (mirrors WrenAI's empty chart_type). Frontend maps these to ECharts.
|
|
150
|
+
*/
|
|
151
|
+
declare type ChartKind = '' | 'bar' | 'line' | 'pie' | 'scatter' | 'area' | 'grouped-bar' | 'stacked-bar';
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Neutral, framework-agnostic chart spec. Backend owns the spec; frontend owns
|
|
155
|
+
* the ECharts mapping. `data` is the full result set (rows) for plotting.
|
|
156
|
+
*/
|
|
157
|
+
declare interface ChartSpec {
|
|
158
|
+
chartKind: ChartKind;
|
|
159
|
+
title?: string;
|
|
160
|
+
encoding: ChartEncoding;
|
|
161
|
+
data: Row[];
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/** A knowledge-base citation entry (Phase 2 预留). */
|
|
165
|
+
declare interface CitationItem {
|
|
166
|
+
docName: string;
|
|
167
|
+
page: number;
|
|
168
|
+
section: string;
|
|
169
|
+
content: string;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* A result-table / glossary column. Semantic fields (displayName/role/...) come
|
|
174
|
+
* from the backend semantic layer — never re-derived on the client.
|
|
175
|
+
*/
|
|
176
|
+
declare interface ColumnDef {
|
|
177
|
+
key: string;
|
|
178
|
+
title: string;
|
|
179
|
+
type?: string;
|
|
180
|
+
/** Business-friendly Chinese name, e.g. "设备温度". */
|
|
181
|
+
displayName?: string;
|
|
182
|
+
/** Semantic role for analysis/charting. */
|
|
183
|
+
role?: ColumnRole;
|
|
184
|
+
/** Human description, e.g. "通信状态(0正常/1异常)". */
|
|
185
|
+
description?: string;
|
|
186
|
+
/** Display unit, e.g. "℃", "件". */
|
|
187
|
+
unit?: string;
|
|
188
|
+
/** Sensitive columns are stripped before the LLM; flagged here for UI only. */
|
|
189
|
+
sensitive?: boolean;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/** Semantic role of a result column (drives glossary + analysis). */
|
|
193
|
+
declare type ColumnRole = 'dimension' | 'metric' | 'time';
|
|
194
|
+
|
|
68
195
|
export declare interface Conversation {
|
|
69
196
|
id: string;
|
|
70
197
|
title: string;
|
|
@@ -102,6 +229,9 @@ export declare interface CreateAiAssistantOptions {
|
|
|
102
229
|
onEvent?: (event: unknown) => void;
|
|
103
230
|
}
|
|
104
231
|
|
|
232
|
+
/** SQL dialect produced by the engine (closed set; never free-form). */
|
|
233
|
+
declare type Dialect = 'mysql' | 'postgresql';
|
|
234
|
+
|
|
105
235
|
export declare interface FeaturesConfig {
|
|
106
236
|
enableVoice?: boolean;
|
|
107
237
|
enableFileUpload?: boolean;
|
|
@@ -112,17 +242,51 @@ export declare interface FeaturesConfig {
|
|
|
112
242
|
enableActionConfirm?: boolean;
|
|
113
243
|
}
|
|
114
244
|
|
|
245
|
+
/** Why a run finished. */
|
|
246
|
+
declare type FinishReason = 'stop' | 'length' | 'tool_calls' | 'content_filter' | 'error';
|
|
247
|
+
|
|
115
248
|
export declare interface I18nConfig {
|
|
116
249
|
locale?: string;
|
|
117
250
|
messages?: Record<string, string>;
|
|
118
251
|
}
|
|
119
252
|
|
|
253
|
+
/** Type of an analysis insight (drives icon/severity on the client). */
|
|
254
|
+
declare type InsightType = 'trend' | 'outlier' | 'comparison' | 'summary' | 'anomaly';
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* RFC 6902 JSON Patch op (subset) used by `card.patch` for in-place updates.
|
|
258
|
+
* Kept narrow on purpose; the transitional path may instead re-send the full
|
|
259
|
+
* `card` with the same id.
|
|
260
|
+
*/
|
|
261
|
+
declare interface JsonPatchOp {
|
|
262
|
+
op: 'add' | 'remove' | 'replace';
|
|
263
|
+
path: string;
|
|
264
|
+
value?: string | number | boolean | null | Record<string, unknown> | unknown[];
|
|
265
|
+
}
|
|
266
|
+
|
|
120
267
|
export declare type MessageRole = 'user' | 'assistant' | 'system' | 'tool';
|
|
121
268
|
|
|
122
269
|
export declare type MessageStatus = 'pending' | 'streaming' | 'success' | 'failed';
|
|
123
270
|
|
|
124
271
|
export declare type MessageType = 'text' | 'markdown' | 'chart' | 'table' | 'tool' | 'error' | 'sql' | 'metric' | 'action' | 'source';
|
|
125
272
|
|
|
273
|
+
/** A single KPI / metric tile. Multiple tiles share one metric card. */
|
|
274
|
+
declare interface MetricItem {
|
|
275
|
+
label: string;
|
|
276
|
+
value: string | number;
|
|
277
|
+
unit?: string;
|
|
278
|
+
trend?: MetricTrend;
|
|
279
|
+
/** Display format hint, e.g. "percent", "currency", "integer". */
|
|
280
|
+
format?: string;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
/** A trend annotation on a metric value. */
|
|
284
|
+
declare interface MetricTrend {
|
|
285
|
+
value: number;
|
|
286
|
+
direction: TrendDirection;
|
|
287
|
+
label?: string;
|
|
288
|
+
}
|
|
289
|
+
|
|
126
290
|
export declare interface ModelOption {
|
|
127
291
|
code: string;
|
|
128
292
|
name: string;
|
|
@@ -144,6 +308,32 @@ export declare interface PageContext {
|
|
|
144
308
|
extras?: Record<string, unknown>;
|
|
145
309
|
}
|
|
146
310
|
|
|
311
|
+
/** Risk level for a proposed write action (Action Center 二次确认). */
|
|
312
|
+
declare type RiskLevel = 'safe' | 'caution' | 'danger';
|
|
313
|
+
|
|
314
|
+
/** A single result row: column key → cell value. */
|
|
315
|
+
declare type Row = Record<string, string | number | boolean | null>;
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* A data-source provenance entry. Discriminated on `kind` to remove the v1
|
|
319
|
+
* polymorphism where `table` was sometimes a real table, sometimes a tool name.
|
|
320
|
+
*/
|
|
321
|
+
declare type SourceItem = {
|
|
322
|
+
kind: 'table';
|
|
323
|
+
name: string;
|
|
324
|
+
query?: string;
|
|
325
|
+
rowCount: number | null;
|
|
326
|
+
durationMs: number;
|
|
327
|
+
timestamp: string;
|
|
328
|
+
} | {
|
|
329
|
+
kind: 'tool';
|
|
330
|
+
name: string;
|
|
331
|
+
query?: string;
|
|
332
|
+
rowCount: number | null;
|
|
333
|
+
durationMs: number;
|
|
334
|
+
timestamp: string;
|
|
335
|
+
};
|
|
336
|
+
|
|
147
337
|
export declare interface SourceRef {
|
|
148
338
|
table: string;
|
|
149
339
|
query: string;
|
|
@@ -235,12 +425,143 @@ export declare type StreamEvent = {
|
|
|
235
425
|
ts: number;
|
|
236
426
|
};
|
|
237
427
|
|
|
428
|
+
/**
|
|
429
|
+
* The full v2 stream-event union. Discriminated on `type`; every member carries
|
|
430
|
+
* a monotonic `seq`.
|
|
431
|
+
*/
|
|
432
|
+
declare type StreamEvent_2 = {
|
|
433
|
+
type: 'run.start';
|
|
434
|
+
seq: number;
|
|
435
|
+
conversationId: string;
|
|
436
|
+
messageId: string;
|
|
437
|
+
} | {
|
|
438
|
+
type: 'run.finish';
|
|
439
|
+
seq: number;
|
|
440
|
+
reason: FinishReason;
|
|
441
|
+
usage: Usage;
|
|
442
|
+
latencyMs: number;
|
|
443
|
+
} | {
|
|
444
|
+
type: 'run.error';
|
|
445
|
+
seq: number;
|
|
446
|
+
code: string;
|
|
447
|
+
message: string;
|
|
448
|
+
retriable: boolean;
|
|
449
|
+
} | {
|
|
450
|
+
type: 'text.start';
|
|
451
|
+
seq: number;
|
|
452
|
+
partId: string;
|
|
453
|
+
} | {
|
|
454
|
+
type: 'text.delta';
|
|
455
|
+
seq: number;
|
|
456
|
+
partId: string;
|
|
457
|
+
delta: string;
|
|
458
|
+
} | {
|
|
459
|
+
type: 'text.end';
|
|
460
|
+
seq: number;
|
|
461
|
+
partId: string;
|
|
462
|
+
} | {
|
|
463
|
+
type: 'reasoning.start';
|
|
464
|
+
seq: number;
|
|
465
|
+
partId: string;
|
|
466
|
+
} | {
|
|
467
|
+
type: 'reasoning.delta';
|
|
468
|
+
seq: number;
|
|
469
|
+
partId: string;
|
|
470
|
+
delta: string;
|
|
471
|
+
} | {
|
|
472
|
+
type: 'reasoning.end';
|
|
473
|
+
seq: number;
|
|
474
|
+
partId: string;
|
|
475
|
+
} | {
|
|
476
|
+
type: 'tool.start';
|
|
477
|
+
seq: number;
|
|
478
|
+
toolCallId: string;
|
|
479
|
+
toolName: string;
|
|
480
|
+
} | {
|
|
481
|
+
type: 'tool.input.delta';
|
|
482
|
+
seq: number;
|
|
483
|
+
toolCallId: string;
|
|
484
|
+
delta: string;
|
|
485
|
+
} | {
|
|
486
|
+
type: 'tool.input';
|
|
487
|
+
seq: number;
|
|
488
|
+
toolCallId: string;
|
|
489
|
+
input: Record<string, string | number | boolean | null>;
|
|
490
|
+
} | {
|
|
491
|
+
type: 'tool.executing';
|
|
492
|
+
seq: number;
|
|
493
|
+
toolCallId: string;
|
|
494
|
+
} | {
|
|
495
|
+
type: 'tool.output';
|
|
496
|
+
seq: number;
|
|
497
|
+
toolCallId: string;
|
|
498
|
+
output: ToolOutput;
|
|
499
|
+
status: ToolStatus;
|
|
500
|
+
} | {
|
|
501
|
+
type: 'tool.error';
|
|
502
|
+
seq: number;
|
|
503
|
+
toolCallId: string;
|
|
504
|
+
error: string;
|
|
505
|
+
} | {
|
|
506
|
+
type: 'card';
|
|
507
|
+
seq: number;
|
|
508
|
+
id: string;
|
|
509
|
+
kind: CardKind;
|
|
510
|
+
data: CardData;
|
|
511
|
+
status?: string;
|
|
512
|
+
transient?: boolean;
|
|
513
|
+
} | {
|
|
514
|
+
type: 'card.patch';
|
|
515
|
+
seq: number;
|
|
516
|
+
id: string;
|
|
517
|
+
patch: JsonPatchOp[];
|
|
518
|
+
} | {
|
|
519
|
+
type: 'action.proposed';
|
|
520
|
+
seq: number;
|
|
521
|
+
actionId: string;
|
|
522
|
+
title: string;
|
|
523
|
+
summary?: string;
|
|
524
|
+
riskLevel: RiskLevel;
|
|
525
|
+
params: Record<string, string | number | boolean | null>;
|
|
526
|
+
} | {
|
|
527
|
+
type: 'clarify';
|
|
528
|
+
seq: number;
|
|
529
|
+
question: string;
|
|
530
|
+
options?: string[];
|
|
531
|
+
};
|
|
532
|
+
|
|
533
|
+
/** Convenience: the closed set of v2 event `type` discriminants. */
|
|
534
|
+
declare type StreamEventType = StreamEvent_2['type'];
|
|
535
|
+
|
|
536
|
+
/** A structured follow-up suggestion (programmatically routable). */
|
|
537
|
+
declare interface SuggestionItem {
|
|
538
|
+
text: string;
|
|
539
|
+
/** Optional intent code for programmatic routing. */
|
|
540
|
+
intent?: string;
|
|
541
|
+
/** Optional pre-filled params for the routed intent. */
|
|
542
|
+
params?: Record<string, string | number | boolean | null>;
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
/**
|
|
546
|
+
* A result-table column. The semantic fields (displayName/description/role) are
|
|
547
|
+
* optional and backward-compatible: when the backend populates them from the
|
|
548
|
+
* registered column metadata (ColumnConfigDTO) they drive the 字段说明 glossary
|
|
549
|
+
* and the table-header tooltip; when absent the table renders exactly as before.
|
|
550
|
+
*/
|
|
551
|
+
export declare interface TableColumn {
|
|
552
|
+
key: string;
|
|
553
|
+
title: string;
|
|
554
|
+
type?: string;
|
|
555
|
+
/** Business-friendly Chinese name (e.g. "虚拟温度") for the glossary. */
|
|
556
|
+
displayName?: string;
|
|
557
|
+
/** Human description of the column (e.g. "设备ID", "通信状态(0正常/1异常)"). */
|
|
558
|
+
description?: string;
|
|
559
|
+
/** Semantic role for analysis: dimension / metric / time. */
|
|
560
|
+
role?: 'dimension' | 'metric' | 'time';
|
|
561
|
+
}
|
|
562
|
+
|
|
238
563
|
export declare interface TableResult {
|
|
239
|
-
columns:
|
|
240
|
-
key: string;
|
|
241
|
-
title: string;
|
|
242
|
-
type?: string;
|
|
243
|
-
}[];
|
|
564
|
+
columns: TableColumn[];
|
|
244
565
|
rows: Record<string, unknown>[];
|
|
245
566
|
total?: number;
|
|
246
567
|
}
|
|
@@ -261,6 +582,23 @@ export declare interface ToolDefinition {
|
|
|
261
582
|
|
|
262
583
|
export declare type ToolExecutor = (args: Record<string, unknown>) => Promise<unknown>;
|
|
263
584
|
|
|
585
|
+
/**
|
|
586
|
+
* Structured tool result (replaces v1's perpetually-null `result`). Always a
|
|
587
|
+
* populated object describing what the tool did.
|
|
588
|
+
*/
|
|
589
|
+
declare interface ToolOutput {
|
|
590
|
+
executed: boolean;
|
|
591
|
+
rowCount?: number;
|
|
592
|
+
durationMs?: number;
|
|
593
|
+
/** Optional human-readable summary of the tool outcome. */
|
|
594
|
+
summary?: string;
|
|
595
|
+
/** Optional structured payload (kept open for tool-specific extras). */
|
|
596
|
+
data?: Record<string, string | number | boolean | null>;
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
/** Tool-call lifecycle status carried by `tool.output`. */
|
|
600
|
+
declare type ToolStatus = 'output-available' | 'output-error';
|
|
601
|
+
|
|
264
602
|
export declare interface ToolStep {
|
|
265
603
|
stepId: string;
|
|
266
604
|
toolName: string;
|
|
@@ -286,6 +624,16 @@ export declare interface TransportConfig {
|
|
|
286
624
|
fetchFallback?: boolean;
|
|
287
625
|
}
|
|
288
626
|
|
|
627
|
+
/** Direction of a metric trend. */
|
|
628
|
+
declare type TrendDirection = 'up' | 'down' | 'flat';
|
|
629
|
+
|
|
630
|
+
/** Token usage, filled authoritatively on `run.finish` (fixes v1 durationMs=0). */
|
|
631
|
+
declare interface Usage {
|
|
632
|
+
prompt: number;
|
|
633
|
+
completion: number;
|
|
634
|
+
total: number;
|
|
635
|
+
}
|
|
636
|
+
|
|
289
637
|
export declare interface UserInfo {
|
|
290
638
|
userId: string;
|
|
291
639
|
username: string;
|
|
@@ -295,4 +643,35 @@ export declare interface UserInfo {
|
|
|
295
643
|
dataScope?: 'all' | 'org' | 'area' | 'self';
|
|
296
644
|
}
|
|
297
645
|
|
|
646
|
+
declare namespace v2 {
|
|
647
|
+
export {
|
|
648
|
+
StreamEvent_2 as StreamEvent,
|
|
649
|
+
StreamEventType,
|
|
650
|
+
Usage,
|
|
651
|
+
FinishReason,
|
|
652
|
+
ToolStatus,
|
|
653
|
+
ToolOutput,
|
|
654
|
+
RiskLevel,
|
|
655
|
+
JsonPatchOp,
|
|
656
|
+
CardData,
|
|
657
|
+
CardKind,
|
|
658
|
+
Dialect,
|
|
659
|
+
ColumnRole,
|
|
660
|
+
ColumnDef,
|
|
661
|
+
Row,
|
|
662
|
+
ChartKind,
|
|
663
|
+
ChartEncoding,
|
|
664
|
+
ChartSpec,
|
|
665
|
+
TrendDirection,
|
|
666
|
+
MetricTrend,
|
|
667
|
+
MetricItem,
|
|
668
|
+
SourceItem,
|
|
669
|
+
SuggestionItem,
|
|
670
|
+
InsightType,
|
|
671
|
+
AnalysisInsight,
|
|
672
|
+
CitationItem
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
export { v2 }
|
|
676
|
+
|
|
298
677
|
export { }
|
package/package.json
CHANGED
package/LICENSE
DELETED
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
Apache License
|
|
2
|
-
Version 2.0, January 2004
|
|
3
|
-
http://www.apache.org/licenses/
|
|
4
|
-
|
|
5
|
-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
-
|
|
7
|
-
1. Definitions.
|
|
8
|
-
|
|
9
|
-
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
-
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
-
|
|
12
|
-
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
-
the copyright owner that is granting the License.
|
|
14
|
-
|
|
15
|
-
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
-
other entities that control, are controlled by, or are under common
|
|
17
|
-
control with that entity. For the purposes of this definition,
|
|
18
|
-
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
-
direction or management of such entity, whether by contract or
|
|
20
|
-
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
-
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
-
|
|
23
|
-
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
-
exercising permissions granted by this License.
|
|
25
|
-
|
|
26
|
-
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
-
including but not limited to software source code, documentation
|
|
28
|
-
source, and configuration files.
|
|
29
|
-
|
|
30
|
-
"Object" form shall mean any form resulting from mechanical
|
|
31
|
-
transformation or translation of a Source form, including but
|
|
32
|
-
not limited to compiled object code, generated documentation,
|
|
33
|
-
and conversions to other media types.
|
|
34
|
-
|
|
35
|
-
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
-
Object form, made available under the License, as indicated by a
|
|
37
|
-
copyright notice that is included in or attached to the work
|
|
38
|
-
(an example is provided in the Appendix below).
|
|
39
|
-
|
|
40
|
-
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
-
form, that is based on (or derived from) the Work and for which the
|
|
42
|
-
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
-
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
-
of this License, Derivative Works shall not include works that remain
|
|
45
|
-
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
-
the Work and Derivative Works thereof.
|
|
47
|
-
|
|
48
|
-
"Contribution" shall mean any work of authorship, including
|
|
49
|
-
the original version of the Work and any modifications or additions
|
|
50
|
-
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
-
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
-
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
-
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
-
means any form of electronic, verbal, or written communication sent
|
|
55
|
-
to the Licensor or its representatives, including but not limited to
|
|
56
|
-
communication on electronic mailing lists, source code control systems,
|
|
57
|
-
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
-
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
-
excluding communication that is conspicuously marked or otherwise
|
|
60
|
-
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
-
|
|
62
|
-
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
-
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
-
subsequently incorporated within the Work.
|
|
65
|
-
|
|
66
|
-
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
-
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
-
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
-
Work and such Derivative Works in Source or Object form.
|
|
72
|
-
|
|
73
|
-
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
-
(except as stated in this section) patent license to make, have made,
|
|
77
|
-
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
-
where such license applies only to those patent claims licensable
|
|
79
|
-
by such Contributor that are necessarily infringed by their
|
|
80
|
-
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
-
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
-
institute patent litigation against any entity (including a
|
|
83
|
-
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
-
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
-
or contributory patent infringement, then any patent licenses
|
|
86
|
-
granted to You under this License for that Work shall terminate
|
|
87
|
-
as of the date such litigation is filed.
|
|
88
|
-
|
|
89
|
-
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
-
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
-
modifications, and in Source or Object form, provided that You
|
|
92
|
-
meet the following conditions:
|
|
93
|
-
|
|
94
|
-
(a) You must give any other recipients of the Work or Derivative
|
|
95
|
-
Works a copy of this License; and
|
|
96
|
-
|
|
97
|
-
(b) You must cause any modified files to carry prominent notices
|
|
98
|
-
stating that You changed the files; and
|
|
99
|
-
|
|
100
|
-
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
-
that You distribute, all copyright, patent, trademark, and
|
|
102
|
-
attribution notices from the Source form of the Work,
|
|
103
|
-
excluding those notices that do not pertain to any part of
|
|
104
|
-
the Derivative Works; and
|
|
105
|
-
|
|
106
|
-
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
-
distribution, then any Derivative Works that You distribute must
|
|
108
|
-
include a readable copy of the attribution notices contained
|
|
109
|
-
within such NOTICE file, excluding those notices that do not
|
|
110
|
-
pertain to any part of the Derivative Works, in at least one
|
|
111
|
-
of the following places: within a NOTICE text file distributed
|
|
112
|
-
as part of the Derivative Works; within the Source form or
|
|
113
|
-
documentation, if provided along with the Derivative Works; or,
|
|
114
|
-
within a display generated by the Derivative Works, if and
|
|
115
|
-
wherever such third-party notices normally appear. The contents
|
|
116
|
-
of the NOTICE file are for informational purposes only and
|
|
117
|
-
do not modify the License. You may add Your own attribution
|
|
118
|
-
notices within Derivative Works that You distribute, alongside
|
|
119
|
-
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
-
that such additional attribution notices cannot be construed
|
|
121
|
-
as modifying the License.
|
|
122
|
-
|
|
123
|
-
You may add Your own copyright statement to Your modifications and
|
|
124
|
-
may provide additional or different license terms and conditions
|
|
125
|
-
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
-
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
-
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
-
the conditions stated in this License.
|
|
129
|
-
|
|
130
|
-
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
-
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
-
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
-
this License, without any additional terms or conditions.
|
|
134
|
-
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
-
the terms of any separate license agreement you may have executed
|
|
136
|
-
with Licensor regarding such Contributions.
|
|
137
|
-
|
|
138
|
-
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
-
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
-
except as required for reasonable and customary use in describing the
|
|
141
|
-
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
-
|
|
143
|
-
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
-
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
-
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
-
implied, including, without limitation, any warranties or conditions
|
|
148
|
-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
-
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
-
appropriateness of using or redistributing the Work and assume any
|
|
151
|
-
risks associated with Your exercise of permissions under this License.
|
|
152
|
-
|
|
153
|
-
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
-
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
-
unless required by applicable law (such as deliberate and grossly
|
|
156
|
-
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
-
liable to You for damages, including any direct, indirect, special,
|
|
158
|
-
incidental, or consequential damages of any character arising as a
|
|
159
|
-
result of this License or out of the use or inability to use the
|
|
160
|
-
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
-
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
-
other commercial damages or losses), even if such Contributor
|
|
163
|
-
has been advised of the possibility of such damages.
|
|
164
|
-
|
|
165
|
-
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
-
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
-
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
-
or other liability obligations and/or rights consistent with this
|
|
169
|
-
License. However, in accepting such obligations, You may act only
|
|
170
|
-
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
-
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
-
defend, and hold each Contributor harmless for any liability
|
|
173
|
-
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
-
of your accepting any such warranty or additional liability.
|
|
175
|
-
|
|
176
|
-
END OF TERMS AND CONDITIONS
|
|
177
|
-
|
|
178
|
-
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
-
|
|
180
|
-
To apply the Apache License to your work, attach the following
|
|
181
|
-
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
-
replaced with your own identifying information. (Don't include
|
|
183
|
-
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
-
comment syntax for the file format. We also recommend that a
|
|
185
|
-
file or class name and description of purpose be included on the
|
|
186
|
-
same "printed page" as the copyright notice for easier
|
|
187
|
-
identification within third-party archives.
|
|
188
|
-
|
|
189
|
-
Copyright 2026 frost1994
|
|
190
|
-
|
|
191
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
-
you may not use this file except in compliance with the License.
|
|
193
|
-
You may obtain a copy of the License at
|
|
194
|
-
|
|
195
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
-
|
|
197
|
-
Unless required by applicable law or agreed to in writing, software
|
|
198
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
-
See the License for the specific language governing permissions and
|
|
201
|
-
limitations under the License.
|