@jungjaehoon/mama-os 0.32.3 → 0.34.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/README.md +15 -17
- package/dist/agent/os-agent-capabilities.md +2 -2
- package/dist/api/graph-api.d.ts +4 -4
- package/dist/api/graph-api.d.ts.map +1 -1
- package/dist/api/graph-api.js +47 -78
- package/dist/api/graph-api.js.map +1 -1
- package/dist/api/index.d.ts +10 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +9 -2
- package/dist/api/index.js.map +1 -1
- package/dist/api/operator-handler.d.ts +1 -1
- package/dist/api/operator-handler.js +1 -1
- package/dist/api/runtime-status-handler.d.ts +41 -0
- package/dist/api/runtime-status-handler.d.ts.map +1 -0
- package/dist/api/runtime-status-handler.js +55 -0
- package/dist/api/runtime-status-handler.js.map +1 -0
- package/dist/cli/commands/start.d.ts.map +1 -1
- package/dist/cli/commands/start.js +58 -23
- package/dist/cli/commands/start.js.map +1 -1
- package/dist/cli/runtime/api-routes-init.d.ts +2 -0
- package/dist/cli/runtime/api-routes-init.d.ts.map +1 -1
- package/dist/cli/runtime/api-routes-init.js +62 -1
- package/dist/cli/runtime/api-routes-init.js.map +1 -1
- package/dist/cli/runtime/api-server-init.d.ts +12 -1
- package/dist/cli/runtime/api-server-init.d.ts.map +1 -1
- package/dist/cli/runtime/api-server-init.js +54 -0
- package/dist/cli/runtime/api-server-init.js.map +1 -1
- package/dist/cli/runtime/utilities.d.ts +1 -1
- package/dist/cli/runtime/utilities.d.ts.map +1 -1
- package/dist/cli/runtime/utilities.js +3 -1
- package/dist/cli/runtime/utilities.js.map +1 -1
- package/dist/gateways/message-router.d.ts +4 -0
- package/dist/gateways/message-router.d.ts.map +1 -1
- package/dist/gateways/message-router.js +62 -13
- package/dist/gateways/message-router.js.map +1 -1
- package/dist/gateways/owner-report-inbox.d.ts +40 -0
- package/dist/gateways/owner-report-inbox.d.ts.map +1 -0
- package/dist/gateways/owner-report-inbox.js +128 -0
- package/dist/gateways/owner-report-inbox.js.map +1 -0
- package/dist/gateways/report-projection-v1.d.ts +41 -0
- package/dist/gateways/report-projection-v1.d.ts.map +1 -0
- package/dist/gateways/report-projection-v1.js +160 -0
- package/dist/gateways/report-projection-v1.js.map +1 -0
- package/dist/gateways/session-store.d.ts +22 -0
- package/dist/gateways/session-store.d.ts.map +1 -1
- package/dist/gateways/session-store.js +76 -3
- package/dist/gateways/session-store.js.map +1 -1
- package/dist/gateways/telegram-message-ledger.d.ts +10 -0
- package/dist/gateways/telegram-message-ledger.d.ts.map +1 -1
- package/dist/gateways/telegram-message-ledger.js +23 -2
- package/dist/gateways/telegram-message-ledger.js.map +1 -1
- package/dist/gateways/telegram-report-context-store.d.ts +193 -0
- package/dist/gateways/telegram-report-context-store.d.ts.map +1 -0
- package/dist/gateways/telegram-report-context-store.js +612 -0
- package/dist/gateways/telegram-report-context-store.js.map +1 -0
- package/dist/gateways/telegram.d.ts +9 -0
- package/dist/gateways/telegram.d.ts.map +1 -1
- package/dist/gateways/telegram.js +100 -0
- package/dist/gateways/telegram.js.map +1 -1
- package/dist/gateways/types.d.ts +12 -0
- package/dist/gateways/types.d.ts.map +1 -1
- package/dist/multi-agent/dashboard-agent-persona.js +2 -2
- package/dist/operator/board-slot-instructions.d.ts +1 -1
- package/dist/operator/board-slot-instructions.js +1 -1
- package/dist/operator/operator-trigger-loop.d.ts +17 -1
- package/dist/operator/operator-trigger-loop.d.ts.map +1 -1
- package/dist/operator/operator-trigger-loop.js +87 -23
- package/dist/operator/operator-trigger-loop.js.map +1 -1
- package/dist/operator/report-delivery-coordinator.d.ts +82 -0
- package/dist/operator/report-delivery-coordinator.d.ts.map +1 -0
- package/dist/operator/report-delivery-coordinator.js +123 -0
- package/dist/operator/report-delivery-coordinator.js.map +1 -0
- package/dist/operator/situation-report.d.ts +7 -0
- package/dist/operator/situation-report.d.ts.map +1 -1
- package/dist/operator/situation-report.js +12 -0
- package/dist/operator/situation-report.js.map +1 -1
- package/package.json +1 -2
- package/public/viewer/js/modules/system.js +183 -0
- package/public/viewer/js/utils/ui-commands.js +4 -9
- package/public/viewer/log-viewer.html +2 -192
- package/public/viewer/operator/operator.css +1 -0
- package/public/viewer/operator/operator.js +14830 -0
- package/public/viewer/src/modules/system.ts +242 -0
- package/public/viewer/src/utils/ui-commands.ts +4 -8
- package/public/viewer/sw.js +44 -10
- package/public/viewer/viewer.css +338 -331
- package/public/viewer/viewer.html +388 -1472
- package/public/ui/assets/index-BDXDGEV6.js +0 -62
- package/public/ui/assets/index-po2tN0xq.css +0 -1
- package/public/ui/index.html +0 -14
- package/public/ui/theme-init.js +0 -20
- package/public/viewer/js/modules/agents.js +0 -1153
- package/public/viewer/js/modules/chat.js +0 -1993
- package/public/viewer/js/modules/connector-feed.js +0 -352
- package/public/viewer/js/modules/dashboard.js +0 -456
- package/public/viewer/js/modules/entity-audit.js +0 -106
- package/public/viewer/js/modules/entity-review.js +0 -66
- package/public/viewer/js/modules/settings.js +0 -1257
- package/public/viewer/src/modules/agents.ts +0 -1302
- package/public/viewer/src/modules/chat.ts +0 -2426
- package/public/viewer/src/modules/connector-feed.ts +0 -391
- package/public/viewer/src/modules/dashboard.ts +0 -498
- package/public/viewer/src/modules/entity-audit.ts +0 -154
- package/public/viewer/src/modules/entity-review.ts +0 -175
- package/public/viewer/src/modules/settings.ts +0 -1547
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Entity Review Queue Module
|
|
3
|
-
*
|
|
4
|
-
* Minimal review surface for canonical entity resolution candidates.
|
|
5
|
-
* Data layer is intentionally DOM-free so it can be unit-tested in node.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
/* eslint-env browser */
|
|
9
|
-
|
|
10
|
-
import { API } from '../utils/api.js';
|
|
11
|
-
|
|
12
|
-
export interface EntityCandidateRef {
|
|
13
|
-
kind: string;
|
|
14
|
-
id: string;
|
|
15
|
-
label: string;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export interface EntityCandidateSummary {
|
|
19
|
-
id: string;
|
|
20
|
-
candidate_kind: string;
|
|
21
|
-
status: string;
|
|
22
|
-
score_total: number;
|
|
23
|
-
left_ref: EntityCandidateRef;
|
|
24
|
-
right_ref: EntityCandidateRef;
|
|
25
|
-
created_at: string;
|
|
26
|
-
scope_kind: string | null;
|
|
27
|
-
scope_id: string | null;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export interface EntityCandidateEvidence {
|
|
31
|
-
id: string;
|
|
32
|
-
surface_form: string;
|
|
33
|
-
normalized_form: string;
|
|
34
|
-
lang: string | null;
|
|
35
|
-
script: string | null;
|
|
36
|
-
context_summary: string | null;
|
|
37
|
-
scope_kind: string | null;
|
|
38
|
-
scope_id: string | null;
|
|
39
|
-
source_connector: string;
|
|
40
|
-
source_raw_record_id: string;
|
|
41
|
-
timestamp_observed: number | null;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export interface EntityCandidateDetail extends EntityCandidateSummary {
|
|
45
|
-
score_structural: number;
|
|
46
|
-
score_string: number;
|
|
47
|
-
score_context: number;
|
|
48
|
-
score_graph: number;
|
|
49
|
-
score_embedding: number;
|
|
50
|
-
rule_trace: string[];
|
|
51
|
-
evidence: EntityCandidateEvidence[];
|
|
52
|
-
extractor_version: string;
|
|
53
|
-
embedding_model_version: string | null;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export interface EntityCandidateListResponse {
|
|
57
|
-
candidates: EntityCandidateSummary[];
|
|
58
|
-
next_cursor: string | null;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export interface EntityCandidateDetailResponse {
|
|
62
|
-
candidate: EntityCandidateDetail;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export interface EntityReviewActionResult {
|
|
66
|
-
candidate_id: string;
|
|
67
|
-
merge_action_id: string;
|
|
68
|
-
action: string;
|
|
69
|
-
actor_id: string;
|
|
70
|
-
created_at: string;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
export type ReviewAction = 'approve' | 'reject' | 'defer';
|
|
74
|
-
|
|
75
|
-
export interface CandidateListRenderState {
|
|
76
|
-
isEmpty: boolean;
|
|
77
|
-
total: number;
|
|
78
|
-
rows: Array<{
|
|
79
|
-
id: string;
|
|
80
|
-
scoreText: string;
|
|
81
|
-
leftLabel: string;
|
|
82
|
-
rightLabel: string;
|
|
83
|
-
scopeLabel: string;
|
|
84
|
-
createdAtIso: string;
|
|
85
|
-
}>;
|
|
86
|
-
nextCursor: string | null;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
export interface CandidateDetailRenderState {
|
|
90
|
-
id: string;
|
|
91
|
-
leftLabel: string;
|
|
92
|
-
rightLabel: string;
|
|
93
|
-
scoreBreakdown: Array<{ key: string; label: string; value: number }>;
|
|
94
|
-
ruleTrace: string[];
|
|
95
|
-
evidence: EntityCandidateEvidence[];
|
|
96
|
-
extractorVersion: string;
|
|
97
|
-
embeddingModelVersion: string;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
export class EntityReviewController {
|
|
101
|
-
private readonly endpoint: string;
|
|
102
|
-
|
|
103
|
-
constructor(opts: { endpoint?: string } = {}) {
|
|
104
|
-
this.endpoint = opts.endpoint ?? '/api/entities/candidates';
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
async fetchCandidates(
|
|
108
|
-
params: { limit?: number; cursor?: string | null } = {}
|
|
109
|
-
): Promise<EntityCandidateListResponse> {
|
|
110
|
-
const query: Record<string, string | number | null | undefined> = {};
|
|
111
|
-
if (typeof params.limit === 'number') query.limit = params.limit;
|
|
112
|
-
if (params.cursor) query.cursor = params.cursor;
|
|
113
|
-
return API.get<EntityCandidateListResponse>(this.endpoint, query);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
async fetchCandidate(id: string): Promise<EntityCandidateDetailResponse> {
|
|
117
|
-
return API.get<EntityCandidateDetailResponse>(`${this.endpoint}/${encodeURIComponent(id)}`);
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
async review(
|
|
121
|
-
id: string,
|
|
122
|
-
action: ReviewAction,
|
|
123
|
-
body: { reason?: string } = {}
|
|
124
|
-
): Promise<EntityReviewActionResult> {
|
|
125
|
-
return API.post<EntityReviewActionResult>(
|
|
126
|
-
`${this.endpoint}/${encodeURIComponent(id)}/${action}`,
|
|
127
|
-
body
|
|
128
|
-
);
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
export function buildListRenderState(
|
|
133
|
-
response: EntityCandidateListResponse
|
|
134
|
-
): CandidateListRenderState {
|
|
135
|
-
return {
|
|
136
|
-
isEmpty: response.candidates.length === 0,
|
|
137
|
-
total: response.candidates.length,
|
|
138
|
-
rows: response.candidates.map((c) => ({
|
|
139
|
-
id: c.id,
|
|
140
|
-
scoreText: c.score_total.toFixed(2),
|
|
141
|
-
leftLabel: c.left_ref.label,
|
|
142
|
-
rightLabel: c.right_ref.label,
|
|
143
|
-
scopeLabel: c.scope_kind ? `${c.scope_kind}:${c.scope_id ?? ''}` : 'global',
|
|
144
|
-
createdAtIso: c.created_at,
|
|
145
|
-
})),
|
|
146
|
-
nextCursor: response.next_cursor,
|
|
147
|
-
};
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
export function buildDetailRenderState(
|
|
151
|
-
response: EntityCandidateDetailResponse
|
|
152
|
-
): CandidateDetailRenderState {
|
|
153
|
-
const c = response.candidate;
|
|
154
|
-
return {
|
|
155
|
-
id: c.id,
|
|
156
|
-
leftLabel: c.left_ref.label,
|
|
157
|
-
rightLabel: c.right_ref.label,
|
|
158
|
-
scoreBreakdown: [
|
|
159
|
-
{ key: 'total', label: 'Total', value: c.score_total },
|
|
160
|
-
{ key: 'structural', label: 'Structural', value: c.score_structural },
|
|
161
|
-
{ key: 'string', label: 'String', value: c.score_string },
|
|
162
|
-
{ key: 'context', label: 'Context', value: c.score_context },
|
|
163
|
-
{ key: 'graph', label: 'Graph', value: c.score_graph },
|
|
164
|
-
{ key: 'embedding', label: 'Embedding', value: c.score_embedding },
|
|
165
|
-
],
|
|
166
|
-
ruleTrace: c.rule_trace,
|
|
167
|
-
evidence: c.evidence,
|
|
168
|
-
extractorVersion: c.extractor_version,
|
|
169
|
-
embeddingModelVersion: c.embedding_model_version ?? 'n/a',
|
|
170
|
-
};
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
export function renderEmptyState(): string {
|
|
174
|
-
return 'No candidates pending review.';
|
|
175
|
-
}
|