@wowok/agent-mcp 2.3.16 → 2.3.18
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/dist/customer/index.d.ts +9 -0
- package/dist/customer/index.js +9 -0
- package/dist/customer/industry-risks.d.ts +4 -0
- package/dist/customer/industry-risks.js +14 -0
- package/dist/customer/user-preferences.d.ts +3 -0
- package/dist/customer/user-preferences.js +9 -0
- package/dist/experience/realtime-feedback.js +17 -0
- package/dist/index.js +360 -273
- package/dist/knowledge/acquisition-flywheel.d.ts +3 -0
- package/dist/knowledge/acquisition-flywheel.js +9 -0
- package/dist/knowledge/guard-ledger.d.ts +19 -0
- package/dist/knowledge/guard-ledger.js +219 -0
- package/dist/knowledge/guard-puzzle.d.ts +93 -0
- package/dist/knowledge/guard-puzzle.js +278 -0
- package/dist/knowledge/guard-risk.d.ts +60 -0
- package/dist/knowledge/guard-risk.js +474 -0
- package/dist/knowledge/guard-translation.d.ts +46 -0
- package/dist/knowledge/guard-translation.js +487 -0
- package/dist/knowledge/index.d.ts +13 -0
- package/dist/knowledge/index.js +13 -0
- package/dist/knowledge/industry-registry.d.ts +1 -2
- package/dist/knowledge/industry-registry.js +23 -3
- package/dist/knowledge/safety-rules.js +61 -0
- package/dist/knowledge/tool-constraints.js +12 -22
- package/dist/safety/confirm-gate.d.ts +4 -2
- package/dist/safety/confirm-gate.js +48 -4
- package/dist/schema/call/allocation.d.ts +24 -14
- package/dist/schema/call/arbitration.d.ts +142 -132
- package/dist/schema/call/base.d.ts +901 -43
- package/dist/schema/call/base.js +66 -2
- package/dist/schema/call/bridge-handler.js +15 -2
- package/dist/schema/call/bridge.d.ts +769 -1
- package/dist/schema/call/bridge.js +37 -0
- package/dist/schema/call/contact.d.ts +10 -0
- package/dist/schema/call/demand.d.ts +10 -0
- package/dist/schema/call/guard.d.ts +76 -46
- package/dist/schema/call/handler.js +46 -14
- package/dist/schema/call/machine.d.ts +158 -138
- package/dist/schema/call/order.d.ts +10 -0
- package/dist/schema/call/payment.d.ts +10 -0
- package/dist/schema/call/permission.d.ts +232 -222
- package/dist/schema/call/personal.d.ts +10 -0
- package/dist/schema/call/progress.d.ts +10 -0
- package/dist/schema/call/proof.d.ts +20 -0
- package/dist/schema/call/repository.d.ts +32 -22
- package/dist/schema/call/reward.d.ts +10 -0
- package/dist/schema/call/semantic.d.ts +9 -2
- package/dist/schema/call/semantic.js +409 -21
- package/dist/schema/call/service.d.ts +20 -10
- package/dist/schema/call/treasury.d.ts +10 -0
- package/dist/schema/config/index.d.ts +18 -0
- package/dist/schema/config/index.js +17 -0
- package/dist/schema/index.d.ts +6 -0
- package/dist/schema/index.js +5 -0
- package/dist/schema/local/index.d.ts +9 -9
- package/dist/schema/local/index.js +9 -0
- package/dist/schema/messenger/index.d.ts +350 -29
- package/dist/schema/messenger/index.js +17 -17
- package/dist/schema/operations.d.ts +1667 -545
- package/dist/schema/operations.js +91 -96
- package/dist/schema/project/index.d.ts +21 -0
- package/dist/schema/project/index.js +32 -0
- package/dist/schema/query/index.d.ts +1074 -168
- package/dist/schema/query/index.js +8 -8
- package/dist/schema/schema-query/index.d.ts +33 -0
- package/dist/schema/schema-query/index.js +36 -0
- package/dist/schema/schema-version.d.ts +25 -0
- package/dist/schema/schema-version.js +76 -0
- package/dist/schema/trust/index.d.ts +407 -0
- package/dist/schema/trust/index.js +113 -0
- package/dist/schemas/bridge_operation.output.json +224 -0
- package/dist/schemas/bridge_operation.schema.json +67 -8
- package/dist/schemas/config_operation.output.json +18 -0
- package/dist/schemas/config_operation.schema.json +34 -0
- package/dist/schemas/guard-node-schema.json +82 -0
- package/dist/schemas/guard2file.schema.json +8 -0
- package/dist/schemas/index.json +19 -1
- package/dist/schemas/machineNode2file.schema.json +8 -0
- package/dist/schemas/messenger_operation.output.json +224 -0
- package/dist/schemas/onchain_events.output.json +718 -0
- package/dist/schemas/onchain_operations.output.json +277 -2
- package/dist/schemas/onchain_operations.schema.json +19 -16
- package/dist/schemas/onchain_operations_allocation.schema.json +8 -0
- package/dist/schemas/onchain_operations_arbitration.schema.json +8 -0
- package/dist/schemas/onchain_operations_contact.schema.json +8 -0
- package/dist/schemas/onchain_operations_demand.schema.json +8 -0
- package/dist/schemas/onchain_operations_gen_passport.schema.json +16 -0
- package/dist/schemas/onchain_operations_guard.schema.json +11 -16
- package/dist/schemas/onchain_operations_machine.schema.json +8 -0
- package/dist/schemas/onchain_operations_order.schema.json +8 -0
- package/dist/schemas/onchain_operations_payment.schema.json +8 -0
- package/dist/schemas/onchain_operations_permission.schema.json +8 -0
- package/dist/schemas/onchain_operations_personal.schema.json +8 -0
- package/dist/schemas/onchain_operations_progress.schema.json +8 -0
- package/dist/schemas/onchain_operations_repository.schema.json +8 -0
- package/dist/schemas/onchain_operations_reward.schema.json +8 -0
- package/dist/schemas/onchain_operations_service.schema.json +8 -0
- package/dist/schemas/onchain_operations_treasury.schema.json +8 -0
- package/dist/schemas/onchain_table_data.output.json +718 -0
- package/dist/schemas/project_operation.output.json +18 -0
- package/dist/schemas/project_operation.schema.json +42 -0
- package/dist/schemas/query_toolkit.schema.json +360 -368
- package/dist/schemas/schema_query.schema.json +6 -3
- package/dist/schemas/trust_score.output.json +327 -0
- package/dist/schemas/trust_score.schema.json +46 -0
- package/package.json +2 -2
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { CUSTOMER_INTELLIGENCE_VERSION, RISK_LEVELS, RISK_DIMENSION_MAX, type PuzzleDepth, type ServiceBasics, type WorkflowAnalysis, type FundSafety, type TrustSignals, type MerchantBehavior, type MarketContext, type InfoPuzzle, type RiskDimensionName, type RiskCheck, type RiskDimensionScore, type RiskLevel, type RiskScore, type UserPreferences, type ReminderPriority, type Reminder, type GameScenario, type GameStrategy, type CustomerAdvice, } from "./types.js";
|
|
2
|
+
export { assembleServiceBasics, assembleWorkflowAnalysis, assembleFundSafety, assembleTrustSignals, assembleMerchantBehavior, assembleMarketContext, assembleInfoPuzzle, type ServiceRawData, type MachineNodeRaw, type ReviewRaw, type EventRaw, type PuzzleRawData, } from "./info-puzzle.js";
|
|
3
|
+
export { riskLevelFromScore, riskLevelLabel, riskLevelEmoji, assessRisk, passesRiskThreshold, } from "./risk-assessment.js";
|
|
4
|
+
export { getIndustryRiskChecks, getIndustryNeeds, checkIndustryNeeds, assessIndustryRisks, inferIndustry, type IndustryNeedTier, type IndustryNeed, type IndustryRiskCheck, type IndustryRiskResult, } from "./industry-risks.js";
|
|
5
|
+
export { getDefaultPreferences, getIndustryTemplate, inferPreferences, matchServiceToPreferences, mergePreferences, validatePreferences, SUPPORTED_INDUSTRIES, type Industry, type IndustryTemplate, type OrderHistoryEntry, type PreferenceInference, type ServiceForMatching, type PreferenceMatchResult, } from "./user-preferences.js";
|
|
6
|
+
export { monitorOrder, sortAlerts, getCriticalAlerts, getActionableAlerts, summarizeAlerts, isBlockingAlert, alertsToReminders, type AlertSeverity, type AlertCategory, type MonitorAlert, type OrderSnapshot, type OrderHistorySnapshot, type OrderMonitorContext, type MonitorThresholds, } from "./order-monitor.js";
|
|
7
|
+
export { recommendStrategy, detectScenarios, flowMigrationStrategy, repeatGameStrategy, rightsProtectionStrategy, type StrategyContext, type StrategyRecommendation, } from "./order-strategy.js";
|
|
8
|
+
export { generatePostPurchaseAdvice, trackRefund, handleQualityIssue, handleMerchantUnreachable, arbitrationSupport, generateArbitrationTemplate, type PostPurchasePhase, type PostPurchaseContext, type PostPurchaseAction, } from "./post-purchase.js";
|
|
9
|
+
export { generateReminders, sortAndCapReminders, generateMultiStageReminders, isBlocking, getBlockingReminders, summarizeReminders, topReminders, type ReminderStage, type ReminderContext, } from "./reminder-system.js";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { CUSTOMER_INTELLIGENCE_VERSION, RISK_LEVELS, RISK_DIMENSION_MAX, } from "./types.js";
|
|
2
|
+
export { assembleServiceBasics, assembleWorkflowAnalysis, assembleFundSafety, assembleTrustSignals, assembleMerchantBehavior, assembleMarketContext, assembleInfoPuzzle, } from "./info-puzzle.js";
|
|
3
|
+
export { riskLevelFromScore, riskLevelLabel, riskLevelEmoji, assessRisk, passesRiskThreshold, } from "./risk-assessment.js";
|
|
4
|
+
export { getIndustryRiskChecks, getIndustryNeeds, checkIndustryNeeds, assessIndustryRisks, inferIndustry, } from "./industry-risks.js";
|
|
5
|
+
export { getDefaultPreferences, getIndustryTemplate, inferPreferences, matchServiceToPreferences, mergePreferences, validatePreferences, SUPPORTED_INDUSTRIES, } from "./user-preferences.js";
|
|
6
|
+
export { monitorOrder, sortAlerts, getCriticalAlerts, getActionableAlerts, summarizeAlerts, isBlockingAlert, alertsToReminders, } from "./order-monitor.js";
|
|
7
|
+
export { recommendStrategy, detectScenarios, flowMigrationStrategy, repeatGameStrategy, rightsProtectionStrategy, } from "./order-strategy.js";
|
|
8
|
+
export { generatePostPurchaseAdvice, trackRefund, handleQualityIssue, handleMerchantUnreachable, arbitrationSupport, generateArbitrationTemplate, } from "./post-purchase.js";
|
|
9
|
+
export { generateReminders, sortAndCapReminders, generateMultiStageReminders, isBlocking, getBlockingReminders, summarizeReminders, topReminders, } from "./reminder-system.js";
|
|
@@ -25,6 +25,10 @@ export interface IndustryRiskResult {
|
|
|
25
25
|
score_adjustment: number;
|
|
26
26
|
summary: string;
|
|
27
27
|
}
|
|
28
|
+
export declare function _setRegistryLookup(fn: ((industry: string) => {
|
|
29
|
+
risk_checks?: IndustryRiskCheck[];
|
|
30
|
+
needs?: IndustryNeed[];
|
|
31
|
+
} | undefined) | null): void;
|
|
28
32
|
export declare function getIndustryRiskChecks(industry: Industry): IndustryRiskCheck[];
|
|
29
33
|
export declare function getIndustryNeeds(industry: Industry): IndustryNeed[];
|
|
30
34
|
export declare function checkIndustryNeeds(puzzle: InfoPuzzle, industry: Industry): {
|
|
@@ -353,10 +353,24 @@ const INDUSTRY_NEEDS = {
|
|
|
353
353
|
},
|
|
354
354
|
],
|
|
355
355
|
};
|
|
356
|
+
let _registryLookup = null;
|
|
357
|
+
export function _setRegistryLookup(fn) {
|
|
358
|
+
_registryLookup = fn;
|
|
359
|
+
}
|
|
356
360
|
export function getIndustryRiskChecks(industry) {
|
|
361
|
+
if (_registryLookup) {
|
|
362
|
+
const profile = _registryLookup(industry);
|
|
363
|
+
if (profile?.risk_checks)
|
|
364
|
+
return profile.risk_checks;
|
|
365
|
+
}
|
|
357
366
|
return INDUSTRY_RISK_CHECKS[industry];
|
|
358
367
|
}
|
|
359
368
|
export function getIndustryNeeds(industry) {
|
|
369
|
+
if (_registryLookup) {
|
|
370
|
+
const profile = _registryLookup(industry);
|
|
371
|
+
if (profile?.needs)
|
|
372
|
+
return profile.needs;
|
|
373
|
+
}
|
|
360
374
|
return INDUSTRY_NEEDS[industry];
|
|
361
375
|
}
|
|
362
376
|
export function checkIndustryNeeds(puzzle, industry) {
|
|
@@ -12,6 +12,9 @@ export interface IndustryTemplate {
|
|
|
12
12
|
after_sales_expectation: UserPreferences["after_sales_expectation"];
|
|
13
13
|
}
|
|
14
14
|
export declare function getDefaultPreferences(industry?: Industry): UserPreferences;
|
|
15
|
+
export declare function _setRegistryLookup(fn: ((industry: string) => {
|
|
16
|
+
preference_template?: IndustryTemplate;
|
|
17
|
+
} | undefined) | null): void;
|
|
15
18
|
export declare function getIndustryTemplate(industry: Industry): IndustryTemplate;
|
|
16
19
|
export interface OrderHistoryEntry {
|
|
17
20
|
service_id: string;
|
|
@@ -79,7 +79,16 @@ export function getDefaultPreferences(industry) {
|
|
|
79
79
|
after_sales_expectation: tpl.after_sales_expectation,
|
|
80
80
|
};
|
|
81
81
|
}
|
|
82
|
+
let _registryLookup = null;
|
|
83
|
+
export function _setRegistryLookup(fn) {
|
|
84
|
+
_registryLookup = fn;
|
|
85
|
+
}
|
|
82
86
|
export function getIndustryTemplate(industry) {
|
|
87
|
+
if (_registryLookup) {
|
|
88
|
+
const profile = _registryLookup(industry);
|
|
89
|
+
if (profile?.preference_template)
|
|
90
|
+
return { ...profile.preference_template };
|
|
91
|
+
}
|
|
83
92
|
return { ...INDUSTRY_TEMPLATES[industry] };
|
|
84
93
|
}
|
|
85
94
|
export function inferPreferences(history, basePrefs) {
|
|
@@ -2,6 +2,8 @@ import { distillIntent, extractSignals } from "./intent-distill.js";
|
|
|
2
2
|
import { getProfile, updateFromOperation } from "./user-profile.js";
|
|
3
3
|
import { findMatches, recordSignature } from "./experience-reuse.js";
|
|
4
4
|
import { EXPERIENCE_LAYER_VERSION } from "./types.js";
|
|
5
|
+
import { isEnabled as isRuntimeEnabled } from "../config/index.js";
|
|
6
|
+
import { recordIndustrySignal } from "../knowledge/flywheel-loop.js";
|
|
5
7
|
export { EXPERIENCE_LAYER_VERSION };
|
|
6
8
|
export function getExperienceFeedback(operation_type, data, baseIntent) {
|
|
7
9
|
try {
|
|
@@ -30,6 +32,21 @@ export function recordOperationOutcome(operation_type, data, baseIntent, outcome
|
|
|
30
32
|
error_code: errorCode,
|
|
31
33
|
});
|
|
32
34
|
updateFromOperation(distilled.primary_intent, distilled.scenario, outcome, errorCode, referencedObjects);
|
|
35
|
+
try {
|
|
36
|
+
if (isRuntimeEnabled("industry_evolution")) {
|
|
37
|
+
const industryHint = (typeof data?.industry === "string" && data.industry.trim())
|
|
38
|
+
? data.industry.trim()
|
|
39
|
+
: undefined;
|
|
40
|
+
if (industryHint) {
|
|
41
|
+
const signalOutcome = outcome === "success"
|
|
42
|
+
? { success: true }
|
|
43
|
+
: { success: false, error_code: errorCode };
|
|
44
|
+
recordIndustrySignal(industryHint, { type: operation_type, data }, signalOutcome);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
catch {
|
|
49
|
+
}
|
|
33
50
|
}
|
|
34
51
|
catch {
|
|
35
52
|
}
|