@evomap/evolver-core 2.0.0-beta.9 → 2.0.1

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.
Files changed (201) hide show
  1. package/dist/algo/antiDistill.js +1 -167
  2. package/dist/algo/bans.js +1 -33
  3. package/dist/algo/candidateAssembly.d.ts +7 -2
  4. package/dist/algo/candidateAssembly.js +1 -205
  5. package/dist/algo/capabilityCandidates.js +1 -136
  6. package/dist/algo/confidence.js +1 -196
  7. package/dist/algo/conversationSniffer.js +1 -149
  8. package/dist/algo/cycleEngine.d.ts +23 -2
  9. package/dist/algo/cycleEngine.js +1 -425
  10. package/dist/algo/cycleFailureClassifier.js +1 -112
  11. package/dist/algo/epigenetics.js +1 -41
  12. package/dist/algo/evolutionEvent.js +1 -24
  13. package/dist/algo/exploration.d.ts +7 -0
  14. package/dist/algo/exploration.js +1 -55
  15. package/dist/algo/geneHealth.d.ts +2 -2
  16. package/dist/algo/geneHealth.js +1 -16
  17. package/dist/algo/geneIntake.js +1 -128
  18. package/dist/algo/genePromotion.js +1 -53
  19. package/dist/algo/geneSelection.d.ts +63 -5
  20. package/dist/algo/geneSelection.js +1 -246
  21. package/dist/algo/index.d.ts +2 -0
  22. package/dist/algo/index.js +1 -20
  23. package/dist/algo/memoryGraph.js +1 -86
  24. package/dist/algo/mutation.js +1 -22
  25. package/dist/algo/orchestrator.d.ts +8 -1
  26. package/dist/algo/orchestrator.js +1 -75
  27. package/dist/algo/publishEligibility.d.ts +34 -0
  28. package/dist/algo/publishEligibility.js +1 -0
  29. package/dist/algo/solidify.js +1 -63
  30. package/dist/algo/strategyPresets.js +1 -61
  31. package/dist/algo/ucb1.d.ts +53 -0
  32. package/dist/algo/ucb1.js +1 -0
  33. package/dist/assetstore/assetSidecarRecords.d.ts +7 -2
  34. package/dist/assetstore/assetSidecarRecords.js +238 -0
  35. package/dist/assetstore/assetSidecarRecovery.js +2 -2
  36. package/dist/assetstore/assetStoreHealth.d.ts +6 -0
  37. package/dist/assetstore/assetStoreHealth.js +56 -14
  38. package/dist/assetstore/assetStoreStorage.d.ts +1 -1
  39. package/dist/assetstore/assetStoreStorage.js +27 -9
  40. package/dist/assetstore/assetSyncLedger.d.ts +86 -0
  41. package/dist/assetstore/assetSyncLedger.js +683 -4
  42. package/dist/assetstore/index.d.ts +1 -0
  43. package/dist/assetstore/index.js +1 -0
  44. package/dist/assetstore/localAssetStoreSnapshot.d.ts +51 -0
  45. package/dist/assetstore/localAssetStoreSnapshot.js +329 -0
  46. package/dist/assetstore/localJsonl.d.ts +4 -2
  47. package/dist/assetstore/localJsonl.js +89 -9
  48. package/dist/assetstore/provenance.d.ts +80 -4
  49. package/dist/assetstore/provenance.js +313 -5
  50. package/dist/assetstore/provider.d.ts +58 -1
  51. package/dist/assetstore/provider.js +97 -6
  52. package/dist/benchmark/antiGeneBenchmark.d.ts +2 -0
  53. package/dist/benchmark/antiGeneBenchmark.js +1 -251
  54. package/dist/benchmark/antiGeneImpact.js +1 -34
  55. package/dist/benchmark/antiGeneRollout.d.ts +2 -0
  56. package/dist/benchmark/antiGeneRollout.js +1 -268
  57. package/dist/benchmark/benchmark.js +1 -26
  58. package/dist/benchmark/evolutionThesisSolver.js +1 -41
  59. package/dist/benchmark/index.d.ts +2 -1
  60. package/dist/benchmark/index.js +1 -6
  61. package/dist/benchmark/selectionFlatAbstention.d.ts +152 -0
  62. package/dist/benchmark/selectionFlatAbstention.js +1 -0
  63. package/dist/benchmark/thesis.js +1 -150
  64. package/dist/benchmark/triggerShift.js +1 -106
  65. package/dist/bootstrap/envFingerprint.d.ts +9 -0
  66. package/dist/bootstrap/envFingerprint.js +5 -0
  67. package/dist/bootstrap/index.d.ts +2 -1
  68. package/dist/bootstrap/index.js +2 -1
  69. package/dist/bootstrap/v1EnvCompat.d.ts +111 -0
  70. package/dist/bootstrap/v1EnvCompat.js +280 -0
  71. package/dist/cycle/cycleTimeline.js +1 -74
  72. package/dist/cycle/index.js +1 -2
  73. package/dist/cycle/stateMachine.js +1 -25
  74. package/dist/events/eventArchive.d.ts +2 -0
  75. package/dist/events/eventArchive.js +13 -3
  76. package/dist/events/eventSchema.d.ts +7 -7
  77. package/dist/events/eventStore.d.ts +2 -0
  78. package/dist/events/eventStore.js +5 -1
  79. package/dist/events/ingest.d.ts +1 -0
  80. package/dist/events/ingest.js +1 -0
  81. package/dist/events/paths.d.ts +3 -1
  82. package/dist/events/paths.js +4 -0
  83. package/dist/events/public.d.ts +2 -2
  84. package/dist/events/public.js +2 -2
  85. package/dist/events/reports.d.ts +2 -0
  86. package/dist/events/reports.js +4 -0
  87. package/dist/exec/autoExec.d.ts +43 -2
  88. package/dist/exec/autoExec.js +76 -9
  89. package/dist/exec/autonomousCycle.d.ts +22 -4
  90. package/dist/exec/autonomousCycle.js +64 -13
  91. package/dist/exec/claudeBridge.d.ts +32 -7
  92. package/dist/exec/claudeBridge.js +281 -29
  93. package/dist/exec/prompt.js +5 -1
  94. package/dist/exec/runnerRegistry.d.ts +68 -26
  95. package/dist/exec/runnerRegistry.js +307 -72
  96. package/dist/exec/selfPr.js +1 -7
  97. package/dist/feedback/envelope.d.ts +61 -0
  98. package/dist/feedback/envelope.js +168 -0
  99. package/dist/feedback/index.d.ts +1 -0
  100. package/dist/feedback/index.js +1 -0
  101. package/dist/hooks/hooks.js +1 -0
  102. package/dist/hub/agentDirectory.js +1 -104
  103. package/dist/hub/assetCallLog.d.ts +35 -1
  104. package/dist/hub/assetCallLog.js +1 -72
  105. package/dist/hub/bindings.d.ts +8 -1
  106. package/dist/hub/bindings.js +1 -110
  107. package/dist/hub/capability.d.ts +90 -3
  108. package/dist/hub/capability.js +1 -1
  109. package/dist/hub/conversationDistiller.js +1 -264
  110. package/dist/hub/fake.d.ts +2 -2
  111. package/dist/hub/fake.js +1 -70
  112. package/dist/hub/hubReview.js +1 -106
  113. package/dist/hub/index.js +1 -11
  114. package/dist/hub/ingest.js +1 -15
  115. package/dist/hub/questionGenerator.d.ts +5 -1
  116. package/dist/hub/questionGenerator.js +1 -406
  117. package/dist/hub/reuseDecision.js +1 -127
  118. package/dist/hub/sanitize.js +1 -322
  119. package/dist/index.d.ts +3 -1
  120. package/dist/index.js +4 -1
  121. package/dist/mailbox/dispatch.d.ts +1 -1
  122. package/dist/mailbox/dispatch.js +22 -6
  123. package/dist/mailbox/envelope.d.ts +7 -1
  124. package/dist/mailbox/envelope.js +9 -2
  125. package/dist/mailbox/ipcServer.d.ts +10 -2
  126. package/dist/mailbox/ipcServer.js +163 -13
  127. package/dist/mailbox/store.d.ts +89 -3
  128. package/dist/mailbox/store.js +895 -41
  129. package/dist/material/boundary.js +1 -14
  130. package/dist/material/consumer.js +1 -55
  131. package/dist/material/emit.js +1 -52
  132. package/dist/material/factory.js +1 -25
  133. package/dist/material/index.js +1 -9
  134. package/dist/material/materialArchive.js +1 -466
  135. package/dist/material/materialStore.js +1 -69
  136. package/dist/material/sampling.js +1 -39
  137. package/dist/material/sources.js +1 -33
  138. package/dist/material/watermark.js +1 -76
  139. package/dist/ops/evolutionGraphProjection.d.ts +20 -0
  140. package/dist/ops/evolutionGraphProjection.js +315 -0
  141. package/dist/ops/index.d.ts +2 -1
  142. package/dist/ops/index.js +2 -1
  143. package/dist/ops/selfUpdate.d.ts +8 -0
  144. package/dist/ops/selfUpdate.js +24 -8
  145. package/dist/personality/drift.js +1 -106
  146. package/dist/personality/events.js +1 -37
  147. package/dist/personality/evolveOps.js +1 -93
  148. package/dist/personality/index.js +1 -11
  149. package/dist/personality/mutate.js +1 -39
  150. package/dist/personality/pivot.js +1 -22
  151. package/dist/personality/prompt.js +1 -62
  152. package/dist/personality/riskGate.js +1 -80
  153. package/dist/personality/schema.d.ts +16 -16
  154. package/dist/personality/schema.js +1 -119
  155. package/dist/personality/select.js +1 -71
  156. package/dist/personality/stats.js +1 -82
  157. package/dist/personality/store.js +1 -92
  158. package/dist/schema/common.js +1 -17
  159. package/dist/schema/evolutionGraph.d.ts +784 -0
  160. package/dist/schema/evolutionGraph.js +1 -0
  161. package/dist/schema/index.d.ts +1 -0
  162. package/dist/schema/index.js +1 -5
  163. package/dist/schema/material.js +1 -50
  164. package/dist/schema/problem.js +1 -45
  165. package/dist/schema/proofOfWork.js +1 -9
  166. package/dist/schema/signal.d.ts +3 -3
  167. package/dist/schema/signal.js +1 -19
  168. package/dist/signals/curriculum.d.ts +55 -0
  169. package/dist/signals/curriculum.js +1 -0
  170. package/dist/signals/cycleHistoryFromEvents.js +1 -96
  171. package/dist/signals/expand.d.ts +15 -1
  172. package/dist/signals/expand.js +1 -125
  173. package/dist/signals/extractor.d.ts +2 -2
  174. package/dist/signals/extractor.js +1 -57
  175. package/dist/signals/index.d.ts +3 -1
  176. package/dist/signals/index.js +1 -6
  177. package/dist/signals/metaSignals.d.ts +4 -0
  178. package/dist/signals/metaSignals.js +1 -158
  179. package/dist/signals/signalGate.js +1 -40
  180. package/dist/signals/taskDomain.d.ts +22 -0
  181. package/dist/signals/taskDomain.js +1 -0
  182. package/dist/signals/traceSignals.js +1 -123
  183. package/dist/strategy/constraintAblation.js +1 -3074
  184. package/dist/strategy/constraintAblationPredicates.d.ts +31 -0
  185. package/dist/strategy/constraintAblationPredicates.js +1 -0
  186. package/dist/strategy/experiment.js +1 -63
  187. package/dist/strategy/index.js +1 -3
  188. package/dist/strategy/strategyPoint.js +1 -23
  189. package/dist/trace/index.d.ts +3 -1
  190. package/dist/trace/index.js +3 -1
  191. package/dist/trace/learningTrace.d.ts +209 -0
  192. package/dist/trace/learningTrace.js +276 -0
  193. package/dist/trace/proxyTurns.d.ts +31 -0
  194. package/dist/trace/proxyTurns.js +137 -0
  195. package/dist/verify/sandboxRunner.d.ts +28 -0
  196. package/dist/verify/sandboxRunner.js +218 -19
  197. package/dist/verify/sandboxedValidation.d.ts +9 -0
  198. package/dist/verify/sandboxedValidation.js +113 -13
  199. package/dist/verify/validation.d.ts +11 -1
  200. package/dist/verify/validation.js +31 -0
  201. package/package.json +5 -2
@@ -0,0 +1,168 @@
1
+ export const PRIORITY_AXES = Object.freeze([
2
+ 'task_success',
3
+ 'user_preference',
4
+ 'quality',
5
+ 'safety',
6
+ 'cost',
7
+ 'latency',
8
+ 'other',
9
+ ]);
10
+ export const LABELS = Object.freeze(['positive', 'negative', 'mixed', 'neutral']);
11
+ export const ATTENTION_LEVELS = Object.freeze(['full', 'limited', 'skimmed', 'unknown']);
12
+ export const EVIDENCE_KINDS = Object.freeze([
13
+ 'evolution_event',
14
+ 'evolution_outcome',
15
+ 'user_override',
16
+ 'review',
17
+ 'turn',
18
+ 'external',
19
+ ]);
20
+ export function clamp01(value) {
21
+ const n = Number(value);
22
+ if (!Number.isFinite(n))
23
+ return 0.5;
24
+ if (n < 0)
25
+ return 0;
26
+ if (n > 1)
27
+ return 1;
28
+ return n;
29
+ }
30
+ export function labelFromScalar(value) {
31
+ const scalar = clamp01(value);
32
+ if (scalar >= 0.6)
33
+ return 'positive';
34
+ if (scalar <= 0.4)
35
+ return 'negative';
36
+ return 'mixed';
37
+ }
38
+ export function normalizeAttention(input) {
39
+ const record = asRecord(input);
40
+ if (!record)
41
+ return { level: 'unknown' };
42
+ const attention = {
43
+ level: enumValue(record['level'], ATTENTION_LEVELS, 'unknown'),
44
+ };
45
+ const observedItems = nonNegativeInteger(record['observed_items']);
46
+ const elapsedMs = nonNegativeInteger(record['elapsed_ms']);
47
+ if (observedItems !== null)
48
+ attention.observed_items = observedItems;
49
+ if (elapsedMs !== null)
50
+ attention.elapsed_ms = elapsedMs;
51
+ return attention;
52
+ }
53
+ export function evidenceRef(kind, id, options = {}) {
54
+ const ref = {
55
+ kind: enumValue(kind, EVIDENCE_KINDS, 'external'),
56
+ id: String(id ?? '').trim() || 'unknown',
57
+ };
58
+ if (typeof options.summary === 'string' && options.summary.trim()) {
59
+ ref.summary = options.summary.trim();
60
+ }
61
+ return ref;
62
+ }
63
+ export function normalizeEvidenceRef(input) {
64
+ const record = asRecord(input);
65
+ if (!record)
66
+ return evidenceRef('external', 'unknown');
67
+ return evidenceRef(record['kind'], record['id'], { summary: record['summary'] });
68
+ }
69
+ export function envelopeUncertainty(scalar, attentionLevel, indecision, conflict) {
70
+ const normalizedScalar = clamp01(scalar);
71
+ const ambiguity = 1 - Math.abs(normalizedScalar - 0.5) * 2;
72
+ const attentionPenalty = {
73
+ full: 0,
74
+ limited: 0.15,
75
+ skimmed: 0.30,
76
+ unknown: 0.20,
77
+ };
78
+ return clamp01(0.10
79
+ + 0.30 * ambiguity
80
+ + attentionPenalty[attentionLevel]
81
+ + (indecision ? 0.25 : 0)
82
+ + (conflict ? 0.35 : 0));
83
+ }
84
+ export function fromScalarFeedback(options = {}) {
85
+ const input = options ?? {};
86
+ const scalar = clamp01(input.scalar);
87
+ const label = labelFromScalar(scalar);
88
+ const indecision = Boolean(input.indecision) || label === 'mixed';
89
+ const conflict = Boolean(input.conflict);
90
+ const evaluatorAttention = normalizeAttention(input.evaluator_attention ?? input.evaluatorAttention);
91
+ const priorityAxis = enumValue(input.priority_axis ?? input.priorityAxis, PRIORITY_AXES, 'task_success');
92
+ const evidence = input.evidence_ref ?? input.evidenceRef ?? evidenceRef('external', 'unknown');
93
+ return {
94
+ priority_axis: priorityAxis,
95
+ label,
96
+ scalar,
97
+ indecision,
98
+ conflict,
99
+ evaluator_attention: evaluatorAttention,
100
+ evidence_ref: normalizeEvidenceRef(evidence),
101
+ uncertainty: envelopeUncertainty(scalar, evaluatorAttention.level, indecision, conflict),
102
+ };
103
+ }
104
+ export function fromOutcomeScalar(outcome, options = {}) {
105
+ const record = asRecord(outcome);
106
+ if (!record)
107
+ return null;
108
+ const scalar = record['user_override'] ?? record['score'];
109
+ if (scalar === null || scalar === undefined)
110
+ return null;
111
+ return fromScalarFeedback({ ...options, scalar });
112
+ }
113
+ export function withConflict(envelope) {
114
+ const evaluatorAttention = normalizeAttention(envelope.evaluator_attention);
115
+ return {
116
+ ...envelope,
117
+ conflict: true,
118
+ evaluator_attention: evaluatorAttention,
119
+ uncertainty: envelopeUncertainty(envelope.scalar, evaluatorAttention.level, envelope.indecision, true),
120
+ };
121
+ }
122
+ export function withIndecision(envelope) {
123
+ const evaluatorAttention = normalizeAttention(envelope.evaluator_attention);
124
+ return {
125
+ ...envelope,
126
+ indecision: true,
127
+ evaluator_attention: evaluatorAttention,
128
+ uncertainty: envelopeUncertainty(envelope.scalar, evaluatorAttention.level, true, envelope.conflict),
129
+ };
130
+ }
131
+ export function aggregateFeedbackEnvelopes(envelopes) {
132
+ const list = Array.isArray(envelopes) ? envelopes.filter(Boolean) : [];
133
+ if (list.length === 0)
134
+ return { dominant_label: null, uncertainty: 1, sample_count: 0 };
135
+ const sampleCount = list.length;
136
+ const meanUncertainty = list.reduce((sum, envelope) => sum + clamp01(envelope.uncertainty), 0) / sampleCount;
137
+ const hasPositive = list.some((envelope) => envelope.label === 'positive');
138
+ const hasNegative = list.some((envelope) => envelope.label === 'negative');
139
+ const hasConflict = list.some((envelope) => envelope.conflict) || (hasPositive && hasNegative);
140
+ const hasIndecision = list.some((envelope) => envelope.indecision || envelope.label === 'mixed' || envelope.label === 'neutral');
141
+ const hasLowAttention = list.some((envelope) => normalizeAttention(envelope.evaluator_attention).level !== 'full');
142
+ const uncertainty = clamp01(meanUncertainty
143
+ + (hasConflict ? 0.25 : 0)
144
+ + (hasIndecision ? 0.10 : 0)
145
+ + (hasLowAttention ? 0.10 : 0));
146
+ let dominantLabel = null;
147
+ if (!hasConflict && !hasLowAttention && uncertainty < 0.5) {
148
+ if (hasPositive)
149
+ dominantLabel = 'positive';
150
+ else if (hasNegative)
151
+ dominantLabel = 'negative';
152
+ }
153
+ return { dominant_label: dominantLabel, uncertainty, sample_count: sampleCount };
154
+ }
155
+ function enumValue(value, allowed, fallback) {
156
+ return typeof value === 'string' && allowed.includes(value)
157
+ ? value
158
+ : fallback;
159
+ }
160
+ function nonNegativeInteger(value) {
161
+ const n = Number(value);
162
+ return Number.isFinite(n) ? Math.max(0, Math.floor(n)) : null;
163
+ }
164
+ function asRecord(value) {
165
+ return value !== null && typeof value === 'object' && !Array.isArray(value)
166
+ ? value
167
+ : null;
168
+ }
@@ -0,0 +1 @@
1
+ export * from './envelope.js';
@@ -0,0 +1 @@
1
+ export * from './envelope.js';
@@ -69,6 +69,7 @@ export function composeSessionStartWithRecap(base, recapCtx, estimateTokensOrOpt
69
69
  export function signalsFromToolUse(event) {
70
70
  const turn = {
71
71
  toolName: event.toolName,
72
+ ...(event.toolResult ? { toolResult: event.toolResult } : {}),
72
73
  ...(event.isError && event.toolResult ? { errorMessage: event.toolResult } : {}),
73
74
  ...(event.text ? { text: event.text } : {}),
74
75
  isMeta: false,
@@ -1,104 +1 @@
1
- export const AGENT_DIRECTORY_DEFAULT_LIMIT = 20;
2
- export const AGENT_DIRECTORY_MAX_LIMIT = 50;
3
- export const AGENT_DIRECTORY_DEFAULT_TIMEOUT_MS = 8_000;
4
- export const AGENT_DIRECTORY_MAX_TIMEOUT_MS = 30_000;
5
- export const AGENT_DIRECTORY_MAX_QUERY_LENGTH = 500;
6
- export const AGENT_DIRECTORY_MAX_SIGNAL_COUNT = 20;
7
- export const AGENT_DIRECTORY_MAX_SIGNAL_LENGTH = 64;
8
- export const AGENT_DIRECTORY_MAX_CURSOR_LENGTH = 256;
9
- export const AGENT_DIRECTORY_MAX_AGENT_ID_LENGTH = 128;
10
- export class AgentDirectoryInputError extends Error {
11
- code = 'invalid_request';
12
- }
13
- export function normalizeAgentSearchRequest(input) {
14
- const query = optionalText(input.query, 'query', AGENT_DIRECTORY_MAX_QUERY_LENGTH);
15
- const signals = normalizeSignals(input.signals);
16
- const availability = input.availability ? enumValue(input.availability, ['online', 'busy', 'offline', 'unknown'], 'availability') : undefined;
17
- if (!query && signals.length === 0)
18
- throw new AgentDirectoryInputError('query_or_signals_required');
19
- return {
20
- ...(query ? { query } : {}),
21
- ...(signals.length > 0 ? { signals } : {}),
22
- ...(availability ? { availability } : {}),
23
- ...(input.cursor ? { cursor: requiredText(input.cursor, 'cursor', AGENT_DIRECTORY_MAX_CURSOR_LENGTH) } : {}),
24
- limit: boundedInteger(input.limit, AGENT_DIRECTORY_DEFAULT_LIMIT, 1, AGENT_DIRECTORY_MAX_LIMIT, 'limit'),
25
- timeoutMs: boundedInteger(input.timeoutMs, AGENT_DIRECTORY_DEFAULT_TIMEOUT_MS, 100, AGENT_DIRECTORY_MAX_TIMEOUT_MS, 'timeout_ms'),
26
- sort: input.sort ? enumValue(input.sort, ['relevance', 'reputation', 'recent', 'availability'], 'sort') : 'relevance',
27
- order: input.order ? enumValue(input.order, ['asc', 'desc'], 'order') : 'desc',
28
- };
29
- }
30
- export function normalizeAgentTaskDiscoveryRequest(input) {
31
- const title = requiredText(input.title, 'title', AGENT_DIRECTORY_MAX_QUERY_LENGTH);
32
- const description = optionalText(input.description, 'description', AGENT_DIRECTORY_MAX_QUERY_LENGTH);
33
- const search = normalizeAgentSearchRequest({
34
- query: [title, description].filter(Boolean).join('\n'),
35
- signals: input.signals,
36
- availability: input.availability,
37
- sort: input.sort,
38
- order: input.order,
39
- cursor: input.cursor,
40
- limit: input.limit,
41
- timeoutMs: input.timeoutMs,
42
- });
43
- return { ...search, title, ...(description ? { description } : {}) };
44
- }
45
- export function normalizeAgentId(value) {
46
- return requiredText(value, 'agent_id', AGENT_DIRECTORY_MAX_AGENT_ID_LENGTH);
47
- }
48
- export function normalizeAgentDirectoryTimeout(value) {
49
- return boundedInteger(value, AGENT_DIRECTORY_DEFAULT_TIMEOUT_MS, 100, AGENT_DIRECTORY_MAX_TIMEOUT_MS, 'timeout_ms');
50
- }
51
- export function capabilityUnavailable(message = 'agent_directory_not_supported') {
52
- return { ok: false, error: { code: 'capability_unavailable', retryable: false, message } };
53
- }
54
- export function unsupportedAgentDirectoryCapability(message) {
55
- return {
56
- search: async () => capabilityUnavailable(message),
57
- getProfile: async () => capabilityUnavailable(message),
58
- discoverForTask: async () => capabilityUnavailable(message),
59
- };
60
- }
61
- function normalizeSignals(input) {
62
- if (input === undefined)
63
- return [];
64
- if (!Array.isArray(input))
65
- throw new AgentDirectoryInputError('signals_must_be_array');
66
- if (input.length > AGENT_DIRECTORY_MAX_SIGNAL_COUNT)
67
- throw new AgentDirectoryInputError('too_many_signals');
68
- const out = [];
69
- for (const value of input) {
70
- if (typeof value !== 'string')
71
- throw new AgentDirectoryInputError('signal_must_be_string');
72
- const signal = requiredText(value, 'signal', AGENT_DIRECTORY_MAX_SIGNAL_LENGTH);
73
- if (!out.includes(signal))
74
- out.push(signal);
75
- }
76
- return out;
77
- }
78
- function optionalText(value, field, maxLength) {
79
- if (value === undefined)
80
- return undefined;
81
- return requiredText(value, field, maxLength);
82
- }
83
- function requiredText(value, field, maxLength) {
84
- if (typeof value !== 'string')
85
- throw new AgentDirectoryInputError(`${field}_must_be_string`);
86
- const text = value.trim();
87
- if (!text)
88
- throw new AgentDirectoryInputError(`${field}_required`);
89
- if (text.length > maxLength)
90
- throw new AgentDirectoryInputError(`${field}_too_long`);
91
- return text;
92
- }
93
- function boundedInteger(value, fallback, min, max, field) {
94
- if (value === undefined)
95
- return fallback;
96
- if (!Number.isInteger(value) || value < min || value > max)
97
- throw new AgentDirectoryInputError(`${field}_out_of_range`);
98
- return value;
99
- }
100
- function enumValue(value, allowed, field) {
101
- if (!allowed.includes(value))
102
- throw new AgentDirectoryInputError(`${field}_invalid`);
103
- return value;
104
- }
1
+ const _0x4396fb=_0x43ac;function _0x43ac(_0x37f3de,_0x58bd8b){_0x37f3de=_0x37f3de-(0x22cb+-0x1b5b*0x1+-0x63b);const _0xdd8953=_0x1144();let _0x202c20=_0xdd8953[_0x37f3de];if(_0x43ac['\x58\x63\x4b\x6c\x70\x66']===undefined){var _0x548cd6=function(_0x3c8d23){const _0x3de2df='\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7a\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5a\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x2b\x2f\x3d';let _0x4251e5='',_0x296a2e='';for(let _0x2b8389=-0x2*-0x12cf+-0x20ff+-0x49f,_0x1e790c,_0x58d190,_0x3a6ea1=0x1dfc+0xfbc+0x2db8*-0x1;_0x58d190=_0x3c8d23['\x63\x68\x61\x72\x41\x74'](_0x3a6ea1++);~_0x58d190&&(_0x1e790c=_0x2b8389%(0x202c+0xb8d*0x1+-0x2bb5)?_0x1e790c*(-0xbf*0x33+0x2*0x7c5+-0x1*-0x16c3)+_0x58d190:_0x58d190,_0x2b8389++%(0x268a+-0x5*0x34+-0x2582))?_0x4251e5+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](-0x173c+0x1*0x13ed+0x44e*0x1&_0x1e790c>>(-(-0x5a8*0x3+-0x18*-0xa1+0x1e2)*_0x2b8389&-0x1e*0x88+-0xb*0x1f3+0x2567)):-0x1*0x174+0x1306*0x1+0xad*-0x1a){_0x58d190=_0x3de2df['\x69\x6e\x64\x65\x78\x4f\x66'](_0x58d190);}for(let _0x204d89=0x19*0x10d+0xe72+0x7*-0x5d1,_0x4af8fe=_0x4251e5['\x6c\x65\x6e\x67\x74\x68'];_0x204d89<_0x4af8fe;_0x204d89++){_0x296a2e+='\x25'+('\x30\x30'+_0x4251e5['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x204d89)['\x74\x6f\x53\x74\x72\x69\x6e\x67'](0xe6*-0x13+-0x73a+0x185c))['\x73\x6c\x69\x63\x65'](-(0x778+-0x2167*-0x1+-0x28dd));}return decodeURIComponent(_0x296a2e);};const _0x2484cd=function(_0x411e9f,_0x1c8d17){let _0x74d22e=[],_0xddec68=-0x7*-0x588+0x518+-0x2bd0,_0x221e4f,_0x13d17d='';_0x411e9f=_0x548cd6(_0x411e9f);let _0x546bcb;for(_0x546bcb=-0x1e23+-0x567+0x2*0x11c5;_0x546bcb<-0x636*0x1+-0x1*0x461+-0x45*-0x2b;_0x546bcb++){_0x74d22e[_0x546bcb]=_0x546bcb;}for(_0x546bcb=-0x3d7+0x1eb*-0x3+0x2*0x4cc;_0x546bcb<-0xfb*-0x20+0x1*0x1ac9+-0x3929;_0x546bcb++){_0xddec68=(_0xddec68+_0x74d22e[_0x546bcb]+_0x1c8d17['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x546bcb%_0x1c8d17['\x6c\x65\x6e\x67\x74\x68']))%(-0x15b7+-0xb*-0x232+0x16f*-0x1),_0x221e4f=_0x74d22e[_0x546bcb],_0x74d22e[_0x546bcb]=_0x74d22e[_0xddec68],_0x74d22e[_0xddec68]=_0x221e4f;}_0x546bcb=-0x6f2+0x1981*-0x1+0xd*0x27f,_0xddec68=0x469+0x7a2+-0xc0b*0x1;for(let _0x4e2f81=-0x1955+0x5fe+0x1*0x1357;_0x4e2f81<_0x411e9f['\x6c\x65\x6e\x67\x74\x68'];_0x4e2f81++){_0x546bcb=(_0x546bcb+(0x71*0x2e+0x2*0x933+-0x26b3))%(-0x2cb*0x9+-0x32*0x89+0x34e5),_0xddec68=(_0xddec68+_0x74d22e[_0x546bcb])%(-0xb40+0x1c14+-0xfd4),_0x221e4f=_0x74d22e[_0x546bcb],_0x74d22e[_0x546bcb]=_0x74d22e[_0xddec68],_0x74d22e[_0xddec68]=_0x221e4f,_0x13d17d+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](_0x411e9f['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x4e2f81)^_0x74d22e[(_0x74d22e[_0x546bcb]+_0x74d22e[_0xddec68])%(-0x221a+-0xdab*-0x2+0x7c4)]);}return _0x13d17d;};_0x43ac['\x6a\x73\x6f\x53\x68\x45']=_0x2484cd,_0x43ac['\x53\x4e\x6f\x67\x71\x61']={},_0x43ac['\x58\x63\x4b\x6c\x70\x66']=!![];}const _0x573b52=_0xdd8953[-0xc84+-0xe0d*-0x2+-0xf96],_0x5568c8=_0x37f3de+_0x573b52,_0x4a62d0=_0x43ac['\x53\x4e\x6f\x67\x71\x61'][_0x5568c8];return!_0x4a62d0?(_0x43ac['\x43\x47\x45\x4f\x6f\x51']===undefined&&(_0x43ac['\x43\x47\x45\x4f\x6f\x51']=!![]),_0x202c20=_0x43ac['\x6a\x73\x6f\x53\x68\x45'](_0x202c20,_0x58bd8b),_0x43ac['\x53\x4e\x6f\x67\x71\x61'][_0x5568c8]=_0x202c20):_0x202c20=_0x4a62d0,_0x202c20;}(function(_0x2e0ccf,_0x187add){const _0x3f8618=_0x43ac,_0x1bbd10=_0x2e0ccf();while(!![]){try{const _0x37be64=-parseInt(_0x3f8618(0x158,'\x74\x32\x58\x29'))/(-0x719+-0xc*0x1f7+0x1eae)+-parseInt(_0x3f8618(0x169,'\x6d\x71\x69\x34'))/(-0x59*-0x27+0x1916+-0x26a3)*(parseInt(_0x3f8618(0x13f,'\x64\x5e\x2a\x45'))/(0x2*0xff4+-0x8e1*0x1+-0x1704))+parseInt(_0x3f8618(0x13a,'\x6b\x61\x54\x4a'))/(0xc3d*-0x3+-0xc2a+0x30e5)+parseInt(_0x3f8618(0x15d,'\x41\x4c\x28\x55'))/(0xff7*0x1+-0x13b8*-0x1+-0x23aa)+parseInt(_0x3f8618(0x175,'\x49\x6e\x25\x56'))/(0x1*-0xd9f+0x184+0xc21)+-parseInt(_0x3f8618(0x156,'\x43\x28\x6c\x39'))/(-0x1*0x20c3+-0x16f9+0x5*0xb27)+parseInt(_0x3f8618(0x184,'\x67\x71\x5b\x42'))/(0x108d+-0xa56+-0x62f)*(parseInt(_0x3f8618(0x18a,'\x7a\x6b\x36\x5d'))/(0xc5b*-0x3+0x2228+0x2f2));if(_0x37be64===_0x187add)break;else _0x1bbd10['push'](_0x1bbd10['shift']());}catch(_0x4ed141){_0x1bbd10['push'](_0x1bbd10['shift']());}}}(_0x1144,-0x2*0x44c+-0x23d5*0x5+0x74ba*0xa));export const AGENT_DIRECTORY_DEFAULT_LIMIT=0x37*0x2f+-0x1b5c+-0x1157*-0x1;export const AGENT_DIRECTORY_MAX_LIMIT=0x1eab+-0x1*0x2241+0x4*0xf2;export const AGENT_DIRECTORY_DEFAULT_TIMEOUT_MS=-0x25*0x3e+-0x1bdd+0x1d7*0x25;export const AGENT_DIRECTORY_MAX_TIMEOUT_MS=-0x1*-0x30d7+0x5756+-0x12fd*0x1;export const AGENT_DIRECTORY_MAX_QUERY_LENGTH=0x935*0x1+0xf39+0x3bf*-0x6;export const AGENT_DIRECTORY_MAX_SIGNAL_COUNT=0x314*0xb+0x755*-0x4+-0x474;export const AGENT_DIRECTORY_MAX_SIGNAL_LENGTH=-0xa6e+0xe8*0x7+0x456;export const AGENT_DIRECTORY_MAX_CURSOR_LENGTH=0x1*-0x6f1+0x8a1+0xb0*-0x1;export const AGENT_DIRECTORY_MAX_AGENT_ID_LENGTH=-0xd*0xdf+0x1*0x15a2+-0x9cf;export class AgentDirectoryInputError extends Error{[_0x4396fb(0x17f,'\x6b\x61\x54\x4a')]=_0x4396fb(0x15a,'\x64\x54\x4b\x7a')+'\x72\x65\x71\x75\x65\x73\x74';}export function normalizeAgentSearchRequest(_0x40a921){const _0x1fc985=_0x4396fb,_0x1471e4=optionalText(_0x40a921['\x71\x75\x65\x72\x79'],'\x71\x75\x65\x72\x79',AGENT_DIRECTORY_MAX_QUERY_LENGTH),_0x58a4a4=normalizeSignals(_0x40a921[_0x1fc985(0x139,'\x36\x26\x4d\x55')]),_0x3c249f=_0x40a921[_0x1fc985(0x192,'\x41\x4c\x28\x55')+_0x1fc985(0x165,'\x47\x34\x39\x6d')]?enumValue(_0x40a921[_0x1fc985(0x18d,'\x5a\x77\x4a\x29')+'\x6c\x69\x74\x79'],[_0x1fc985(0x166,'\x5a\x52\x5e\x6a'),_0x1fc985(0x142,'\x6b\x47\x4a\x55'),_0x1fc985(0x160,'\x5a\x77\x4a\x29'),_0x1fc985(0x167,'\x7a\x5b\x4c\x66')],_0x1fc985(0x141,'\x6d\x71\x69\x34')+'\x6c\x69\x74\x79'):undefined;if(!_0x1471e4&&_0x58a4a4[_0x1fc985(0x18c,'\x30\x44\x43\x79')]===0x251*0xa+0x3*0xb45+0x1*-0x38f9)throw new AgentDirectoryInputError(_0x1fc985(0x16b,'\x34\x31\x53\x34')+_0x1fc985(0x172,'\x4b\x6a\x5e\x30')+_0x1fc985(0x16e,'\x7a\x5b\x4c\x66')+'\x64');return{..._0x1471e4?{'\x71\x75\x65\x72\x79':_0x1471e4}:{},..._0x58a4a4[_0x1fc985(0x190,'\x6b\x34\x40\x31')]>-0xb56+0x6*-0x346+-0x262*-0xd?{'\x73\x69\x67\x6e\x61\x6c\x73':_0x58a4a4}:{},..._0x3c249f?{'\x61\x76\x61\x69\x6c\x61\x62\x69\x6c\x69\x74\x79':_0x3c249f}:{},..._0x40a921[_0x1fc985(0x153,'\x7a\x6b\x36\x5d')]?{'\x63\x75\x72\x73\x6f\x72':requiredText(_0x40a921[_0x1fc985(0x150,'\x64\x54\x4b\x7a')],_0x1fc985(0x183,'\x63\x40\x73\x65'),AGENT_DIRECTORY_MAX_CURSOR_LENGTH)}:{},'\x6c\x69\x6d\x69\x74':boundedInteger(_0x40a921[_0x1fc985(0x176,'\x51\x49\x5b\x5b')],AGENT_DIRECTORY_DEFAULT_LIMIT,0x19c+0xd77*0x1+-0xf12,AGENT_DIRECTORY_MAX_LIMIT,_0x1fc985(0x179,'\x53\x47\x53\x79')),'\x74\x69\x6d\x65\x6f\x75\x74\x4d\x73':boundedInteger(_0x40a921[_0x1fc985(0x177,'\x4b\x6a\x5e\x30')+'\x73'],AGENT_DIRECTORY_DEFAULT_TIMEOUT_MS,-0x428+0x1826+-0x139a,AGENT_DIRECTORY_MAX_TIMEOUT_MS,_0x1fc985(0x154,'\x55\x45\x6f\x21')+'\x6d\x73'),'\x73\x6f\x72\x74':_0x40a921[_0x1fc985(0x17a,'\x45\x6b\x32\x40')]?enumValue(_0x40a921[_0x1fc985(0x189,'\x30\x44\x43\x79')],[_0x1fc985(0x148,'\x44\x71\x54\x77')+'\x65',_0x1fc985(0x180,'\x33\x58\x28\x76')+'\x6f\x6e',_0x1fc985(0x13e,'\x72\x65\x46\x6b'),_0x1fc985(0x16d,'\x53\x47\x53\x79')+_0x1fc985(0x138,'\x67\x6a\x4c\x66')],'\x73\x6f\x72\x74'):_0x1fc985(0x148,'\x44\x71\x54\x77')+'\x65','\x6f\x72\x64\x65\x72':_0x40a921[_0x1fc985(0x171,'\x35\x6d\x23\x4c')]?enumValue(_0x40a921[_0x1fc985(0x162,'\x47\x34\x39\x6d')],[_0x1fc985(0x145,'\x68\x50\x64\x46'),_0x1fc985(0x163,'\x31\x45\x47\x52')],_0x1fc985(0x171,'\x35\x6d\x23\x4c')):'\x64\x65\x73\x63'};}export function normalizeAgentTaskDiscoveryRequest(_0x3405e2){const _0x523939=_0x4396fb,_0x2f4540=requiredText(_0x3405e2['\x74\x69\x74\x6c\x65'],_0x523939(0x164,'\x44\x71\x54\x77'),AGENT_DIRECTORY_MAX_QUERY_LENGTH),_0x22724c=optionalText(_0x3405e2['\x64\x65\x73\x63\x72\x69\x70\x74'+_0x523939(0x17e,'\x57\x43\x75\x4a')],_0x523939(0x140,'\x6d\x41\x34\x42')+_0x523939(0x137,'\x4a\x28\x5d\x43'),AGENT_DIRECTORY_MAX_QUERY_LENGTH),_0xe42308=normalizeAgentSearchRequest({'\x71\x75\x65\x72\x79':[_0x2f4540,_0x22724c][_0x523939(0x178,'\x34\x31\x53\x34')](Boolean)['\x6a\x6f\x69\x6e']('\x0a'),'\x73\x69\x67\x6e\x61\x6c\x73':_0x3405e2[_0x523939(0x16c,'\x31\x45\x47\x52')],'\x61\x76\x61\x69\x6c\x61\x62\x69\x6c\x69\x74\x79':_0x3405e2[_0x523939(0x193,'\x6b\x61\x54\x4a')+'\x6c\x69\x74\x79'],'\x73\x6f\x72\x74':_0x3405e2['\x73\x6f\x72\x74'],'\x6f\x72\x64\x65\x72':_0x3405e2['\x6f\x72\x64\x65\x72'],'\x63\x75\x72\x73\x6f\x72':_0x3405e2[_0x523939(0x174,'\x30\x44\x43\x79')],'\x6c\x69\x6d\x69\x74':_0x3405e2[_0x523939(0x18f,'\x63\x40\x73\x65')],'\x74\x69\x6d\x65\x6f\x75\x74\x4d\x73':_0x3405e2[_0x523939(0x18b,'\x4a\x28\x5d\x43')+'\x73']});return{..._0xe42308,'\x74\x69\x74\x6c\x65':_0x2f4540,..._0x22724c?{'\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6f\x6e':_0x22724c}:{}};}export function normalizeAgentId(_0x3e041c){const _0x5f4881=_0x4396fb;return requiredText(_0x3e041c,_0x5f4881(0x13b,'\x75\x69\x67\x5d'),AGENT_DIRECTORY_MAX_AGENT_ID_LENGTH);}export function normalizeAgentDirectoryTimeout(_0x1e6e75){const _0x5820ed=_0x4396fb;return boundedInteger(_0x1e6e75,AGENT_DIRECTORY_DEFAULT_TIMEOUT_MS,-0x72*-0x2f+-0x94d*-0x1+-0x1dd7,AGENT_DIRECTORY_MAX_TIMEOUT_MS,_0x5820ed(0x15f,'\x43\x28\x6c\x39')+'\x6d\x73');}export function capabilityUnavailable(_0x3d5ab2=_0x4396fb(0x144,'\x6b\x34\x40\x31')+_0x4396fb(0x143,'\x6d\x71\x69\x34')+_0x4396fb(0x181,'\x34\x31\x53\x34')+_0x4396fb(0x13d,'\x23\x42\x76\x56')){const _0x314ab2=_0x4396fb;return{'\x6f\x6b':![],'\x65\x72\x72\x6f\x72':{'\x63\x6f\x64\x65':_0x314ab2(0x157,'\x39\x33\x5a\x71')+_0x314ab2(0x16f,'\x41\x4c\x28\x55')+_0x314ab2(0x188,'\x44\x71\x54\x77'),'\x72\x65\x74\x72\x79\x61\x62\x6c\x65':![],'\x6d\x65\x73\x73\x61\x67\x65':_0x3d5ab2}};}export function unsupportedAgentDirectoryCapability(_0x422209){return{'\x73\x65\x61\x72\x63\x68':async()=>capabilityUnavailable(_0x422209),'\x67\x65\x74\x50\x72\x6f\x66\x69\x6c\x65':async()=>capabilityUnavailable(_0x422209),'\x64\x69\x73\x63\x6f\x76\x65\x72\x46\x6f\x72\x54\x61\x73\x6b':async()=>capabilityUnavailable(_0x422209)};}function normalizeSignals(_0x3c8507){const _0x316515=_0x4396fb;if(_0x3c8507===undefined)return[];if(!Array[_0x316515(0x135,'\x6b\x34\x40\x31')](_0x3c8507))throw new AgentDirectoryInputError(_0x316515(0x155,'\x63\x54\x2a\x6e')+_0x316515(0x17b,'\x68\x34\x64\x4c')+_0x316515(0x16a,'\x35\x6d\x23\x4c'));if(_0x3c8507[_0x316515(0x152,'\x67\x71\x5b\x42')]>AGENT_DIRECTORY_MAX_SIGNAL_COUNT)throw new AgentDirectoryInputError(_0x316515(0x17c,'\x7a\x68\x75\x4c')+_0x316515(0x170,'\x30\x44\x43\x79'));const _0x5aff93=[];for(const _0x3284e3 of _0x3c8507){if(_0x316515(0x168,'\x57\x43\x75\x4a')!==_0x316515(0x14a,'\x33\x58\x28\x76')){if(_0x58d190===_0x3a6ea1)return _0x204d89;return _0x4af8fe(_0x411e9f,_0x1c8d17,_0x74d22e);}else{if(typeof _0x3284e3!==_0x316515(0x187,'\x24\x51\x47\x64'))throw new AgentDirectoryInputError(_0x316515(0x149,'\x47\x34\x39\x6d')+_0x316515(0x13c,'\x7a\x6b\x36\x5d')+_0x316515(0x146,'\x44\x6e\x44\x4d'));const _0x16f949=requiredText(_0x3284e3,_0x316515(0x182,'\x43\x28\x6c\x39'),AGENT_DIRECTORY_MAX_SIGNAL_LENGTH);if(!_0x5aff93[_0x316515(0x173,'\x48\x73\x69\x41')](_0x16f949))_0x5aff93[_0x316515(0x14c,'\x24\x51\x47\x64')](_0x16f949);}}return _0x5aff93;}function optionalText(_0x1e5afc,_0x31335b,_0x56c3f3){if(_0x1e5afc===undefined)return undefined;return requiredText(_0x1e5afc,_0x31335b,_0x56c3f3);}function requiredText(_0x470bfb,_0xfa686a,_0x4b041e){const _0x599919=_0x4396fb;if(typeof _0x470bfb!==_0x599919(0x15b,'\x21\x76\x6a\x70'))throw new AgentDirectoryInputError(_0xfa686a+(_0x599919(0x15e,'\x7a\x68\x75\x4c')+_0x599919(0x191,'\x7a\x68\x75\x4c')));const _0x5b8d79=_0x470bfb[_0x599919(0x14f,'\x30\x44\x43\x79')]();if(!_0x5b8d79)throw new AgentDirectoryInputError(_0xfa686a+(_0x599919(0x186,'\x6b\x47\x4a\x55')+'\x64'));if(_0x5b8d79['\x6c\x65\x6e\x67\x74\x68']>_0x4b041e)throw new AgentDirectoryInputError(_0xfa686a+('\x5f\x74\x6f\x6f\x5f\x6c\x6f\x6e'+'\x67'));return _0x5b8d79;}function boundedInteger(_0x1a8073,_0x4a4482,_0x393dde,_0x274493,_0x5139c9){const _0x537d01=_0x4396fb;if(_0x1a8073===undefined)return _0x4a4482;if(!Number[_0x537d01(0x17d,'\x23\x42\x76\x56')+'\x72'](_0x1a8073)||_0x1a8073<_0x393dde||_0x1a8073>_0x274493)throw new AgentDirectoryInputError(_0x5139c9+('\x5f\x6f\x75\x74\x5f\x6f\x66\x5f'+_0x537d01(0x161,'\x47\x34\x39\x6d')));return _0x1a8073;}function _0x1144(){const _0x5018a0=['\x57\x4f\x7a\x51\x57\x51\x56\x63\x48\x66\x79','\x71\x67\x5a\x63\x55\x31\x54\x61\x57\x52\x79\x32','\x61\x43\x6f\x70\x57\x34\x4a\x63\x47\x43\x6b\x33','\x43\x30\x42\x63\x4d\x43\x6f\x6f\x7a\x30\x76\x67\x68\x71','\x6c\x43\x6b\x4d\x57\x50\x72\x4c\x42\x43\x6f\x53\x57\x37\x53','\x57\x37\x6c\x63\x48\x64\x42\x64\x4a\x43\x6f\x50\x44\x53\x6f\x4e\x57\x4f\x75','\x44\x53\x6f\x5a\x57\x36\x34\x43\x57\x50\x70\x64\x47\x38\x6f\x70\x57\x34\x75','\x57\x37\x4c\x78\x57\x37\x4e\x64\x51\x4b\x54\x31\x57\x50\x42\x64\x47\x61','\x74\x64\x70\x64\x53\x6d\x6f\x6e\x77\x31\x52\x64\x49\x63\x34','\x64\x38\x6f\x70\x57\x35\x37\x63\x48\x43\x6b\x38','\x57\x4f\x46\x64\x52\x6d\x6f\x6b\x7a\x65\x35\x6c\x62\x73\x69','\x79\x49\x52\x64\x4e\x5a\x56\x64\x49\x57\x4a\x63\x4c\x59\x30','\x43\x64\x78\x64\x51\x38\x6f\x7a\x77\x4b\x4b','\x57\x52\x74\x63\x49\x30\x6e\x69\x57\x35\x79\x72\x57\x51\x4e\x64\x47\x76\x34\x6e\x57\x35\x54\x63\x57\x52\x79','\x77\x38\x6f\x34\x57\x36\x34\x50\x7a\x71','\x57\x51\x5a\x64\x54\x53\x6f\x6f\x7a\x4b\x39\x46\x68\x72\x57','\x7a\x66\x52\x63\x4b\x6d\x6f\x69\x45\x32\x47','\x57\x37\x2f\x63\x4d\x5a\x52\x64\x4a\x43\x6f\x58','\x57\x51\x58\x37\x66\x33\x75','\x57\x34\x44\x50\x57\x35\x62\x58\x57\x51\x5a\x64\x55\x6d\x6f\x56\x57\x35\x4b','\x57\x4f\x4a\x64\x49\x63\x48\x4b\x57\x50\x4b\x6f\x57\x35\x5a\x63\x54\x61','\x43\x6d\x6f\x6d\x57\x37\x33\x64\x54\x43\x6b\x50\x6d\x4e\x74\x64\x55\x47','\x57\x51\x58\x2f\x57\x52\x61','\x57\x36\x64\x64\x4e\x33\x31\x45','\x73\x53\x6f\x48\x57\x50\x5a\x63\x55\x33\x69\x6f\x45\x57\x4b','\x42\x66\x5a\x63\x49\x6d\x6f\x4a\x42\x77\x39\x7a\x68\x57','\x57\x51\x4a\x64\x4c\x57\x6d\x76\x57\x50\x69\x73','\x57\x34\x6e\x6c\x57\x51\x4a\x64\x56\x47\x69\x61','\x57\x4f\x64\x63\x55\x53\x6f\x47\x57\x34\x38\x66\x72\x38\x6b\x4c\x57\x34\x61','\x57\x37\x48\x36\x77\x43\x6f\x71\x57\x51\x78\x63\x4e\x6d\x6f\x43\x57\x52\x34','\x6e\x31\x6a\x69\x65\x6d\x6f\x4c\x6b\x6d\x6b\x44\x57\x35\x4f','\x75\x53\x6f\x6d\x57\x36\x4a\x63\x4a\x58\x64\x64\x50\x71','\x67\x6d\x6f\x65\x6f\x63\x65\x4a\x67\x47','\x79\x63\x2f\x64\x51\x38\x6f\x45','\x6c\x43\x6b\x4d\x61\x75\x4e\x63\x48\x53\x6f\x4c\x46\x33\x71\x50\x66\x68\x71','\x57\x36\x48\x75\x64\x53\x6b\x68\x57\x51\x68\x63\x4c\x30\x65\x73','\x46\x59\x78\x64\x54\x38\x6f\x6e\x71\x76\x6d','\x77\x47\x76\x77\x64\x73\x6a\x52\x72\x43\x6b\x6d','\x44\x53\x6f\x4f\x57\x36\x75\x42\x57\x4f\x46\x64\x48\x53\x6f\x75\x57\x34\x71','\x57\x34\x58\x78\x57\x52\x46\x64\x50\x62\x4b','\x57\x4f\x38\x69\x57\x52\x68\x64\x51\x6d\x6b\x51\x46\x71','\x57\x51\x70\x64\x4c\x64\x6e\x6a\x57\x50\x30\x62\x57\x35\x75','\x57\x36\x58\x79\x57\x34\x46\x64\x54\x4b\x4c\x31\x57\x4f\x6c\x64\x49\x61','\x57\x36\x6c\x64\x48\x4e\x48\x73\x6a\x53\x6b\x72\x6d\x62\x6d','\x57\x4f\x4f\x45\x57\x50\x37\x64\x56\x43\x6b\x53\x44\x68\x6d','\x57\x35\x66\x45\x57\x36\x4a\x63\x56\x6d\x6f\x4d\x6a\x4a\x39\x67\x78\x75\x43\x73\x70\x6d\x6b\x4c','\x57\x37\x76\x73\x64\x71','\x57\x52\x68\x64\x51\x6d\x6f\x36\x76\x61','\x65\x30\x74\x63\x47\x57\x5a\x63\x4d\x49\x69\x45','\x57\x52\x74\x63\x47\x59\x65\x6b\x46\x6d\x6f\x69\x68\x59\x52\x64\x4f\x57\x54\x4f\x6c\x47','\x6a\x6d\x6b\x32\x6b\x6d\x6b\x57\x57\x35\x58\x56\x57\x52\x6c\x63\x4a\x71','\x42\x43\x6f\x47\x72\x59\x42\x64\x4b\x53\x6f\x72\x77\x76\x71','\x44\x53\x6f\x6e\x57\x34\x64\x64\x56\x53\x6b\x35','\x57\x4f\x33\x63\x4f\x6d\x6b\x72\x6b\x73\x6a\x4b','\x6f\x4b\x6a\x49\x74\x53\x6f\x72\x57\x52\x6e\x53\x61\x6d\x6f\x6a\x57\x52\x72\x56\x45\x59\x53','\x57\x51\x47\x68\x57\x37\x64\x63\x4d\x6d\x6f\x69\x42\x43\x6b\x47\x6c\x71','\x65\x31\x68\x63\x47\x4c\x72\x6a\x57\x52\x75\x7a\x57\x36\x38','\x63\x4c\x76\x45\x67\x61','\x61\x65\x6c\x63\x47\x65\x4c\x6b\x57\x51\x79\x63\x57\x35\x4b','\x57\x4f\x69\x6b\x57\x52\x52\x64\x4f\x43\x6b\x51\x73\x4d\x35\x47','\x6e\x6d\x6b\x47\x57\x34\x53','\x63\x43\x6f\x48\x57\x37\x7a\x4f\x57\x4f\x34','\x57\x37\x34\x50\x57\x35\x56\x63\x4e\x43\x6f\x46\x7a\x53\x6b\x44','\x61\x38\x6f\x6e\x6e\x73\x79\x35\x68\x49\x6a\x65','\x57\x52\x38\x52\x74\x43\x6f\x58\x57\x4f\x33\x63\x47\x38\x6f\x32\x57\x52\x61','\x45\x38\x6f\x2b\x57\x50\x4e\x63\x52\x68\x65','\x57\x52\x38\x78\x57\x50\x37\x63\x51\x62\x62\x6e\x57\x52\x52\x64\x53\x43\x6b\x39\x57\x35\x6c\x63\x51\x61','\x75\x43\x6f\x6e\x57\x36\x4e\x63\x4a\x47','\x42\x6d\x6b\x53\x67\x53\x6b\x32\x77\x53\x6b\x4c\x57\x36\x5a\x63\x4c\x57','\x57\x52\x6c\x63\x47\x73\x61\x70\x46\x38\x6f\x6a\x79\x58\x74\x64\x55\x48\x6e\x50\x70\x64\x4f','\x7a\x5a\x6c\x64\x53\x6d\x6f\x68','\x57\x37\x71\x65\x65\x53\x6f\x71\x57\x51\x42\x63\x53\x57','\x66\x6d\x6b\x6e\x57\x51\x4a\x64\x4c\x4b\x4a\x64\x4b\x38\x6b\x64\x57\x34\x68\x64\x55\x65\x52\x63\x51\x71','\x57\x35\x4a\x64\x50\x38\x6f\x39\x57\x36\x43\x34\x78\x61','\x45\x38\x6f\x4d\x71\x71\x52\x64\x4e\x38\x6f\x67','\x57\x34\x68\x63\x50\x53\x6f\x47\x65\x58\x35\x6a\x77\x6d\x6b\x6a','\x57\x37\x68\x63\x4d\x66\x46\x63\x4e\x67\x52\x64\x52\x76\x4a\x63\x47\x71','\x57\x36\x52\x63\x48\x4c\x76\x70\x57\x34\x50\x6a\x57\x35\x52\x64\x4e\x43\x6b\x68\x57\x4f\x6c\x64\x48\x33\x30\x36','\x67\x30\x37\x64\x4d\x64\x68\x64\x54\x77\x70\x64\x54\x38\x6f\x46','\x77\x68\x75\x36\x65\x4d\x69\x31\x57\x52\x6e\x55\x57\x52\x75\x6b\x57\x37\x61','\x57\x36\x52\x63\x53\x53\x6b\x32\x68\x6d\x6f\x43\x57\x37\x61\x74\x77\x49\x6e\x6d\x6f\x47\x69','\x57\x37\x34\x46\x66\x53\x6f\x63\x57\x51\x78\x63\x51\x63\x52\x63\x51\x61','\x76\x58\x2f\x64\x47\x6d\x6b\x49\x57\x52\x4e\x64\x4b\x57','\x6e\x6d\x6f\x32\x74\x6d\x6f\x52\x66\x53\x6f\x32\x57\x52\x2f\x63\x49\x53\x6f\x33\x61\x64\x4a\x63\x4e\x74\x4b','\x57\x52\x38\x44\x57\x50\x68\x63\x52\x62\x30\x4e\x57\x35\x78\x64\x52\x53\x6b\x54\x57\x37\x4a\x63\x47\x65\x68\x64\x53\x47','\x57\x51\x70\x64\x49\x4a\x6a\x69\x57\x4f\x61\x57\x57\x35\x64\x63\x51\x61','\x57\x51\x2f\x64\x4c\x57\x4b\x45\x57\x50\x57\x6c\x57\x50\x52\x64\x48\x61','\x76\x62\x76\x72\x63\x63\x44\x4b\x71\x47','\x57\x52\x34\x4a\x72\x6d\x6f\x34\x57\x4f\x4b','\x57\x51\x6d\x57\x74\x53\x6f\x36\x57\x50\x34','\x6f\x53\x6b\x51\x57\x4f\x62\x4f','\x62\x43\x6f\x62\x6c\x73\x38\x51','\x57\x51\x61\x52\x78\x53\x6f\x4d','\x41\x53\x6b\x53\x66\x43\x6b\x5a\x71\x43\x6b\x4b','\x78\x6d\x6f\x56\x57\x36\x61\x64\x57\x4f\x4e\x64\x4e\x43\x6f\x74'];_0x1144=function(){return _0x5018a0;};return _0x1144();}function enumValue(_0x495b34,_0x1f970f,_0x1ebf48){const _0x28baa9=_0x4396fb;if(!_0x1f970f[_0x28baa9(0x14d,'\x5a\x52\x5e\x6a')](_0x495b34))throw new AgentDirectoryInputError(_0x1ebf48+_0x28baa9(0x18e,'\x7a\x5b\x4c\x66'));return _0x495b34;}
@@ -1,4 +1,5 @@
1
- export type AssetCallAction = 'hub_search_hit' | 'hub_search_miss' | 'asset_reuse' | 'asset_reference' | 'asset_publish' | 'asset_publish_skip' | 'hub_review_submitted' | 'hub_review_rejected' | 'hub_review_failed';
1
+ export type AssetCallAction = 'hub_search_hit' | 'hub_search_miss' | 'asset_reuse' | 'asset_reference' | 'asset_publish' | 'asset_publish_skip' | 'asset_inject' | 'asset_inject_shadow' | 'hub_review_submitted' | 'hub_review_rejected' | 'hub_review_failed';
2
+ export type TokensSavedBasis = 'measured' | 'cost_index' | 'estimated_blast_radius' | 'estimated_default';
2
3
  export interface AssetCallEntry {
3
4
  run_id?: string | null;
4
5
  action: AssetCallAction;
@@ -10,6 +11,9 @@ export interface AssetCallEntry {
10
11
  mode?: 'direct' | 'reference';
11
12
  signals?: readonly string[];
12
13
  reason?: string;
14
+ tokens_saved?: number | null;
15
+ tokens_saved_basis?: TokensSavedBasis | null;
16
+ tokens_spent?: number | null;
13
17
  extra?: Record<string, unknown>;
14
18
  }
15
19
  export interface AssetCallRecord extends AssetCallEntry {
@@ -30,6 +34,32 @@ export interface CallLogSummary {
30
34
  by_action: Record<string, number>;
31
35
  entries: AssetCallRecord[];
32
36
  }
37
+ export interface AssetReuseAttribution {
38
+ asset_id: string;
39
+ source_node_id: string | null;
40
+ chain_id: string | null;
41
+ reuse: number;
42
+ reference: number;
43
+ tokens_saved: number;
44
+ }
45
+ export interface ReuseAttributionSummary {
46
+ total_reuse: number;
47
+ total_reference: number;
48
+ total_tokens_saved: number;
49
+ by_asset: AssetReuseAttribution[];
50
+ }
51
+ export interface ReuseSavingsMetric {
52
+ tokens_saved: number;
53
+ tokens_saved_basis: TokensSavedBasis;
54
+ }
55
+ /** Measured derivation cost carried by an asset (or by a Hub wrapper's payload). */
56
+ export declare function assetDerivationTokenCost(asset: unknown): number | undefined;
57
+ /**
58
+ * Attribute savings without inventing a measured value: asset telemetry wins, then this node's publish-cost
59
+ * index, then the savings-core blast/default estimator. Reference reuse applies the same fractional discount
60
+ * to measured and estimated costs.
61
+ */
62
+ export declare function reuseSavingsForAsset(asset: unknown, mode: 'direct' | 'reference', indexedTokenCost?: unknown): ReuseSavingsMetric;
33
63
  export declare class AssetCallLog {
34
64
  private readonly path;
35
65
  private readonly now;
@@ -40,4 +70,8 @@ export declare class AssetCallLog {
40
70
  read(opts?: ReadOpts): AssetCallRecord[];
41
71
  /** Totals + per-action counts (for CLI / observability). */
42
72
  summarize(opts?: ReadOpts): CallLogSummary;
73
+ /** Local-only attribution rollup over reuse/reference audit rows. */
74
+ reuseAttributionSummary(opts?: ReadOpts): ReuseAttributionSummary;
75
+ /** Later valid publish rows win; malformed/non-positive costs never erase a prior measurement. */
76
+ assetCostIndex(opts?: ReadOpts): Record<string, number>;
43
77
  }
@@ -1,72 +1 @@
1
- // Append-only asset-call log (ported from v1 gep/assetCallLog.js). Records every hub-asset interaction across
2
- // evolution runs — search hits/misses, reuse/reference, publish, and review outcomes — as one JSONL line each.
3
- // This is the audit trail behind "which fetched assets actually got reused, and did the reuse pay off"; the
4
- // reuse-reward / quality-feedback loops read it. Best-effort by construction: a logging failure NEVER blocks
5
- // or fails an evolution. The log path is injected so it's testable without a real home dir.
6
- import { appendFileSync, existsSync, mkdirSync, readFileSync } from 'node:fs';
7
- import { dirname } from 'node:path';
8
- export class AssetCallLog {
9
- path;
10
- now;
11
- constructor(path, now = () => new Date()) {
12
- this.path = path;
13
- this.now = now;
14
- }
15
- /** Append one record (timestamped). Never throws — logging must not break evolution. */
16
- append(entry) {
17
- if (!entry || typeof entry !== 'object')
18
- return;
19
- try {
20
- mkdirSync(dirname(this.path), { recursive: true });
21
- const record = { timestamp: this.now().toISOString(), ...entry };
22
- appendFileSync(this.path, `${JSON.stringify(record)}\n`, 'utf8');
23
- }
24
- catch { /* non-fatal */ }
25
- }
26
- /** Read records with optional filters. Corrupt lines are skipped. */
27
- read(opts = {}) {
28
- if (!existsSync(this.path))
29
- return [];
30
- let entries = [];
31
- try {
32
- for (const line of readFileSync(this.path, 'utf8').split('\n')) {
33
- if (!line)
34
- continue;
35
- try {
36
- entries.push(JSON.parse(line));
37
- }
38
- catch { /* skip corrupt */ }
39
- }
40
- }
41
- catch {
42
- return [];
43
- }
44
- if (opts.since) {
45
- const sinceTs = new Date(opts.since).getTime();
46
- if (Number.isFinite(sinceTs))
47
- entries = entries.filter((e) => new Date(e.timestamp).getTime() >= sinceTs);
48
- }
49
- if (opts.run_id)
50
- entries = entries.filter((e) => e.run_id === opts.run_id);
51
- if (opts.action)
52
- entries = entries.filter((e) => e.action === opts.action);
53
- if (opts.last && Number.isFinite(opts.last) && opts.last > 0)
54
- entries = entries.slice(-opts.last);
55
- return entries;
56
- }
57
- /** Totals + per-action counts (for CLI / observability). */
58
- summarize(opts = {}) {
59
- const entries = this.read(opts);
60
- const byAction = {};
61
- const assets = new Set();
62
- const runs = new Set();
63
- for (const e of entries) {
64
- byAction[e.action] = (byAction[e.action] ?? 0) + 1;
65
- if (e.asset_id)
66
- assets.add(e.asset_id);
67
- if (e.run_id)
68
- runs.add(e.run_id);
69
- }
70
- return { total_entries: entries.length, unique_assets: assets.size, unique_runs: runs.size, by_action: byAction, entries };
71
- }
72
- }
1
+ const _0x182c10=_0x2e5d;(function(_0x30b981,_0x57d2ea){const _0x19c015=_0x2e5d,_0x15e914=_0x30b981();while(!![]){try{const _0x42e6ce=-parseInt(_0x19c015(0xcb,'\x5b\x57\x34\x68'))/(-0x220+-0xa15*-0x1+-0x7f4)+parseInt(_0x19c015(0xd7,'\x4d\x69\x61\x67'))/(-0x1*0x24d1+-0x11ec+0x36bf)+parseInt(_0x19c015(0x140,'\x57\x6e\x59\x41'))/(0x7*0x53+-0x243c+0x21fa)+parseInt(_0x19c015(0x102,'\x49\x21\x51\x42'))/(-0x83c*-0x3+-0x228c+0x4*0x277)*(-parseInt(_0x19c015(0x11e,'\x57\x23\x64\x32'))/(0x11f2+-0x1*-0x2bf+-0x14ac))+parseInt(_0x19c015(0xc4,'\x5b\x42\x30\x7a'))/(0x2539+0xc85+0xac*-0x4a)*(-parseInt(_0x19c015(0xfb,'\x7a\x49\x4d\x24'))/(-0x1*-0x1a3+0x22*-0xe+0x8*0x8))+parseInt(_0x19c015(0x10f,'\x6e\x4f\x26\x6c'))/(0x224d+0x10*0x89+-0x2ad5)*(parseInt(_0x19c015(0x151,'\x5b\x42\x30\x7a'))/(-0xa9a+-0xb*-0x2bd+-0x137c))+-parseInt(_0x19c015(0xaa,'\x36\x53\x24\x63'))/(0x1b43+-0x22b4*-0x1+-0x3ded)*(-parseInt(_0x19c015(0x10e,'\x78\x30\x47\x4c'))/(0xe81+0x55f+0x13d5*-0x1));if(_0x42e6ce===_0x57d2ea)break;else _0x15e914['push'](_0x15e914['shift']());}catch(_0xb0e03b){_0x15e914['push'](_0x15e914['shift']());}}}(_0x42c6,0x1b0dcf+0x1cdee1+-0x28ffd6*0x1));import{appendFileSync,existsSync,mkdirSync,readFileSync}from'\x6e\x6f\x64\x65\x3a\x66\x73';import{dirname}from'\x6e\x6f\x64\x65\x3a\x70\x61\x74\x68';function _0x42c6(){const _0x24e863=['\x57\x51\x46\x63\x4b\x53\x6b\x64\x62\x53\x6b\x36','\x57\x36\x66\x6e\x46\x43\x6b\x55\x57\x37\x31\x42\x57\x34\x2f\x63\x49\x47','\x57\x35\x48\x2f\x57\x4f\x50\x54\x57\x51\x30\x66\x73\x71','\x57\x52\x78\x63\x47\x43\x6b\x66\x76\x53\x6b\x48\x57\x52\x47','\x57\x37\x71\x4b\x57\x52\x66\x39\x57\x51\x64\x63\x50\x4d\x71\x69','\x57\x52\x75\x72\x57\x51\x37\x63\x52\x71','\x57\x34\x30\x4c\x57\x52\x76\x54','\x57\x35\x58\x6a\x71\x71','\x57\x37\x37\x63\x54\x77\x57\x6c\x57\x35\x43\x66\x57\x51\x42\x64\x47\x47','\x41\x48\x74\x63\x50\x57\x79\x36\x57\x51\x4b','\x57\x51\x74\x63\x47\x38\x6b\x66\x76\x57','\x57\x52\x6d\x44\x57\x51\x6c\x63\x52\x65\x75\x6d\x6f\x4b\x53','\x77\x67\x75\x69\x57\x4f\x74\x64\x48\x38\x6b\x55','\x6b\x78\x2f\x64\x4d\x43\x6f\x4e\x62\x71\x34','\x57\x37\x30\x4e\x42\x59\x4c\x37\x57\x52\x53\x69\x42\x71','\x6a\x4e\x4c\x49\x57\x4f\x69\x32\x57\x34\x4f','\x57\x35\x2f\x63\x54\x38\x6b\x46\x66\x6d\x6f\x75\x57\x52\x4b\x5a\x57\x35\x75\x48\x78\x38\x6f\x4a\x57\x4f\x78\x64\x4f\x57','\x68\x6d\x6f\x51\x44\x43\x6f\x64','\x69\x76\x66\x52\x57\x50\x31\x62','\x57\x34\x70\x63\x4b\x4d\x4f\x67\x57\x35\x79','\x45\x75\x56\x64\x52\x33\x43\x64','\x57\x36\x37\x63\x51\x4a\x30','\x57\x35\x42\x63\x48\x57\x48\x53\x72\x6d\x6f\x4d\x57\x4f\x6c\x63\x52\x47','\x57\x50\x53\x63\x75\x77\x57\x42\x71\x6d\x6f\x37\x6d\x62\x70\x64\x49\x38\x6b\x56\x76\x71','\x6d\x53\x6f\x36\x57\x4f\x6e\x67','\x45\x30\x6e\x61\x46\x30\x65\x75','\x57\x52\x57\x46\x46\x6d\x6b\x58\x57\x35\x6c\x64\x54\x4c\x61','\x57\x35\x39\x50\x57\x4f\x54\x54\x57\x52\x43\x35\x72\x74\x71','\x65\x68\x65\x48\x68\x63\x6e\x52','\x57\x37\x74\x63\x51\x43\x6b\x50\x79\x47','\x77\x38\x6b\x44\x74\x43\x6f\x4b\x57\x34\x6c\x63\x4f\x47','\x43\x43\x6b\x33\x57\x35\x56\x64\x50\x64\x69','\x57\x50\x31\x50\x68\x74\x68\x64\x48\x38\x6b\x46','\x71\x53\x6b\x4c\x57\x4f\x34\x4e\x57\x50\x4f\x6b\x57\x4f\x74\x63\x54\x61','\x6d\x68\x66\x36\x57\x50\x34','\x77\x77\x71\x30\x57\x34\x46\x63\x4e\x33\x4f\x6d\x45\x43\x6b\x48\x57\x52\x38\x38\x57\x52\x30\x4b','\x57\x35\x66\x30\x57\x51\x44\x38\x57\x51\x57\x6e\x73\x74\x34','\x57\x51\x47\x77\x57\x51\x78\x63\x52\x66\x75\x6d','\x57\x50\x70\x64\x51\x38\x6f\x30','\x57\x35\x46\x63\x4a\x71\x48\x54\x71\x47','\x73\x43\x6b\x42\x74\x71','\x57\x37\x38\x53\x45\x49\x4c\x36\x57\x4f\x4f','\x57\x36\x76\x70\x79\x47\x65\x69\x57\x36\x4b','\x57\x51\x4a\x64\x53\x6d\x6f\x68\x6c\x31\x75\x30\x57\x52\x46\x63\x56\x61','\x57\x52\x70\x63\x4c\x6d\x6b\x41\x68\x6d\x6b\x37\x45\x47','\x57\x36\x52\x63\x50\x77\x30\x6b','\x57\x51\x78\x63\x4d\x6d\x6b\x79\x68\x61','\x57\x35\x5a\x63\x51\x6d\x6f\x49\x6e\x57','\x57\x52\x52\x64\x52\x6d\x6f\x62\x6f\x65\x69\x6f\x57\x50\x52\x63\x54\x57','\x68\x6d\x6f\x6a\x57\x4f\x6d\x6a\x57\x52\x79\x55','\x6d\x4c\x62\x36','\x57\x35\x46\x63\x4a\x72\x58\x36','\x57\x35\x2f\x63\x53\x57\x34\x31\x57\x36\x44\x32\x41\x49\x61\x61\x6b\x43\x6b\x79\x76\x30\x6d','\x70\x43\x6f\x32\x57\x50\x39\x71\x6a\x68\x38','\x57\x52\x4e\x63\x4e\x6d\x6b\x66\x68\x61','\x57\x34\x35\x65\x78\x58\x65','\x72\x6d\x6b\x4c\x57\x50\x42\x63\x51\x6d\x6f\x62\x57\x37\x53\x44\x57\x34\x43','\x57\x52\x30\x74\x7a\x6d\x6b\x72\x57\x35\x37\x64\x51\x71','\x57\x4f\x72\x6c\x72\x5a\x66\x75\x57\x37\x6d\x72','\x63\x74\x7a\x35\x57\x50\x37\x64\x48\x59\x57','\x74\x64\x50\x53','\x57\x36\x79\x34\x57\x52\x44\x51\x57\x52\x46\x63\x4e\x66\x69\x63','\x67\x64\x72\x30\x57\x50\x56\x64\x48\x59\x6e\x41','\x41\x4e\x78\x64\x4f\x38\x6f\x52\x79\x47\x4a\x63\x53\x6d\x6f\x4a','\x7a\x32\x4f\x36\x77\x74\x47','\x57\x34\x58\x2f\x57\x4f\x31\x37\x57\x51\x79','\x44\x4b\x76\x41\x43\x76\x4f\x73','\x7a\x33\x52\x64\x4f\x78\x47\x49\x6f\x68\x31\x6f','\x69\x31\x76\x51\x57\x4f\x79','\x66\x38\x6f\x6d\x6d\x4b\x70\x63\x50\x53\x6b\x51\x79\x71','\x57\x35\x42\x63\x47\x72\x6e\x39\x71\x47','\x57\x34\x43\x4d\x57\x36\x68\x64\x53\x62\x4e\x64\x4e\x71\x34','\x57\x35\x31\x59\x57\x50\x4c\x48\x57\x51\x30\x35\x72\x74\x71','\x70\x66\x62\x37\x57\x52\x66\x6e\x57\x37\x30','\x57\x36\x43\x59\x57\x51\x6e\x38','\x57\x4f\x37\x64\x4f\x43\x6f\x53\x57\x52\x65\x4c\x42\x6d\x6b\x56\x57\x35\x6d','\x57\x37\x6a\x44\x46\x72\x65\x7a\x57\x34\x75\x64\x57\x36\x75','\x57\x35\x6c\x63\x56\x48\x33\x64\x48\x6d\x6f\x46\x69\x61','\x64\x53\x6b\x39\x42\x43\x6f\x6f\x57\x34\x74\x63\x49\x66\x79','\x57\x37\x78\x63\x53\x38\x6b\x31\x73\x43\x6b\x35\x45\x71','\x69\x77\x7a\x52\x57\x50\x69','\x57\x4f\x6c\x64\x4f\x4b\x58\x59','\x57\x4f\x2f\x64\x50\x6d\x6f\x41\x74\x53\x6b\x70\x57\x36\x71','\x57\x36\x70\x63\x47\x43\x6b\x61\x44\x43\x6b\x77\x57\x4f\x46\x64\x56\x71','\x57\x51\x37\x64\x50\x73\x31\x41\x57\x50\x66\x71\x57\x51\x70\x64\x4a\x5a\x68\x64\x4e\x31\x4a\x64\x47\x61','\x57\x50\x46\x63\x54\x59\x71','\x57\x35\x66\x2b\x57\x50\x31\x78\x57\x51\x4f\x63','\x71\x43\x6f\x50\x6b\x31\x2f\x63\x47\x38\x6b\x4f\x57\x37\x50\x50','\x57\x50\x56\x64\x55\x6d\x6f\x49\x57\x52\x61','\x57\x34\x58\x2f\x57\x50\x35\x54\x57\x52\x65\x64\x71\x4a\x6d','\x57\x4f\x38\x46\x46\x72\x66\x71\x57\x37\x43\x63\x75\x57','\x57\x51\x6a\x56\x57\x37\x53\x48\x57\x36\x42\x64\x49\x5a\x4b\x41\x61\x53\x6f\x4a\x57\x4f\x37\x64\x4e\x6d\x6f\x4e','\x57\x35\x42\x63\x47\x71\x44\x37','\x57\x34\x53\x34\x57\x52\x30\x32\x57\x35\x65','\x45\x43\x6f\x50\x63\x76\x4a\x63\x50\x57','\x57\x35\x64\x63\x51\x47\x52\x64\x54\x38\x6f\x7a\x6a\x43\x6f\x77','\x57\x4f\x39\x50\x57\x36\x50\x53\x57\x4f\x42\x64\x4f\x59\x4b\x69\x57\x51\x43\x6b\x57\x52\x53\x75\x6f\x57','\x43\x65\x34\x41\x73\x4a\x38','\x57\x50\x4e\x63\x48\x6d\x6b\x72\x6f\x43\x6b\x35','\x57\x4f\x31\x6f\x68\x43\x6b\x66\x42\x4a\x43','\x57\x36\x4e\x63\x53\x38\x6b\x32\x44\x6d\x6b\x31\x42\x57','\x41\x65\x76\x62\x7a\x75\x53\x37\x74\x59\x6d','\x57\x51\x42\x63\x49\x6d\x6b\x42\x62\x43\x6b\x2f\x45\x53\x6f\x5a\x57\x4f\x65','\x76\x53\x6b\x49\x57\x50\x46\x63\x50\x6d\x6f\x42\x57\x34\x6d\x44\x57\x34\x75','\x79\x77\x52\x64\x48\x6d\x6f\x58\x45\x64\x37\x63\x54\x53\x6f\x4e','\x57\x4f\x76\x45\x6c\x38\x6b\x66\x42\x5a\x61\x55\x42\x57','\x42\x43\x6b\x4e\x57\x35\x47\x65\x44\x5a\x2f\x64\x52\x74\x74\x63\x51\x53\x6f\x56\x75\x4e\x79\x73','\x6e\x6d\x6f\x36\x45\x6d\x6f\x79\x57\x36\x54\x31\x57\x50\x66\x6f','\x57\x52\x64\x63\x49\x38\x6b\x65\x74\x61','\x66\x38\x6f\x4b\x57\x52\x33\x63\x51\x6d\x6f\x4d\x57\x36\x6d\x48\x57\x35\x4f','\x57\x50\x54\x5a\x67\x61\x56\x64\x47\x6d\x6b\x69\x57\x37\x34\x64','\x45\x68\x42\x64\x4f\x4e\x34\x4a\x69\x33\x44\x65','\x57\x4f\x33\x64\x4d\x43\x6f\x31\x6f\x76\x4f','\x57\x35\x72\x75\x57\x36\x4f\x58\x6d\x47','\x6c\x68\x4c\x47\x57\x50\x6d\x47','\x57\x50\x50\x4f\x66\x76\x79','\x74\x6d\x6f\x48\x6f\x78\x74\x63\x4f\x6d\x6b\x66\x7a\x78\x47','\x57\x34\x74\x63\x50\x6d\x6f\x32\x69\x71','\x57\x35\x42\x63\x4e\x61\x39\x33\x73\x43\x6f\x4b','\x57\x52\x78\x63\x4b\x43\x6b\x63\x77\x53\x6b\x36\x57\x4f\x4e\x64\x52\x4a\x43','\x57\x37\x74\x63\x54\x53\x6b\x33\x46\x38\x6b\x4b','\x57\x36\x58\x42\x79\x6d\x6b\x53\x57\x37\x31\x53','\x6b\x77\x2f\x64\x4e\x53\x6f\x52\x68\x4a\x39\x31\x57\x34\x30','\x44\x32\x4e\x64\x4a\x53\x6f\x4e\x79\x48\x6c\x63\x4d\x38\x6f\x31','\x57\x34\x6e\x31\x57\x51\x70\x63\x4a\x4e\x42\x63\x56\x47\x64\x64\x48\x38\x6f\x74\x69\x48\x38\x54','\x7a\x68\x38\x4b\x77\x57\x65\x65\x42\x71','\x57\x36\x6e\x70\x45\x48\x57','\x57\x37\x71\x5a\x57\x51\x79','\x57\x34\x35\x61\x64\x74\x76\x50\x68\x6d\x6f\x37\x62\x71','\x45\x65\x66\x68\x46\x31\x30','\x57\x37\x46\x63\x4f\x33\x4b\x52\x57\x35\x53','\x57\x51\x46\x63\x49\x38\x6b\x6c\x77\x47','\x57\x52\x69\x75\x42\x57','\x57\x34\x6e\x6c\x57\x36\x79','\x72\x53\x6b\x52\x57\x52\x34\x79\x57\x52\x4f\x34\x57\x50\x71','\x57\x4f\x61\x4b\x57\x36\x4e\x64\x4c\x49\x37\x64\x52\x72\x61','\x57\x50\x5a\x64\x53\x53\x6f\x61\x45\x6d\x6b\x6a\x57\x36\x34','\x66\x4c\x7a\x6a\x57\x50\x69\x2f','\x6b\x38\x6f\x36\x57\x4f\x54\x71\x6e\x77\x37\x63\x53\x57\x6d','\x46\x53\x6f\x57\x57\x37\x71','\x68\x6d\x6b\x56\x78\x47\x37\x64\x4e\x43\x6f\x31\x57\x37\x39\x4f\x68\x43\x6b\x6f\x6f\x6d\x6b\x5a','\x67\x43\x6f\x34\x71\x6d\x6f\x45\x6a\x5a\x54\x6a\x46\x71','\x46\x43\x6b\x30\x57\x34\x5a\x64\x49\x63\x7a\x42','\x65\x43\x6f\x4f\x43\x53\x6f\x45\x6a\x4a\x57','\x61\x4d\x75\x69\x57\x52\x64\x64\x47\x6d\x6b\x4c\x57\x36\x78\x64\x51\x71','\x57\x34\x4c\x63\x75\x72\x76\x56\x57\x36\x38\x4a\x72\x71','\x57\x52\x74\x64\x53\x53\x6f\x4f\x6a\x43\x6f\x4a\x6c\x6d\x6f\x5a\x57\x51\x6a\x73\x57\x36\x4a\x63\x47\x77\x68\x63\x48\x61','\x76\x38\x6b\x50\x57\x52\x6d\x44\x57\x52\x4f\x33','\x57\x37\x65\x59\x57\x52\x62\x58\x57\x51\x6c\x63\x4d\x68\x4b\x66','\x57\x4f\x2f\x64\x54\x6d\x6f\x44\x71\x53\x6b\x75\x57\x34\x4c\x51\x57\x37\x43','\x57\x50\x42\x63\x50\x5a\x37\x64\x54\x73\x74\x63\x53\x71','\x7a\x75\x37\x64\x4f\x38\x6f\x54\x7a\x57','\x57\x51\x53\x72\x57\x51\x68\x63\x52\x4b\x69\x71','\x57\x4f\x64\x64\x52\x65\x47','\x57\x35\x48\x59\x76\x48\x76\x31\x57\x35\x4b\x35\x74\x71','\x70\x53\x6f\x36\x57\x50\x4c\x48\x6c\x4d\x42\x63\x55\x61','\x74\x6d\x6b\x4c\x57\x51\x74\x63\x56\x38\x6f\x68\x57\x34\x75\x6e','\x57\x35\x46\x64\x4f\x43\x6f\x6d\x79\x53\x6b\x33\x57\x34\x4c\x64','\x57\x34\x74\x63\x4d\x57\x35\x37\x75\x38\x6f\x43\x57\x52\x74\x63\x50\x61','\x72\x43\x6f\x4d\x63\x4e\x74\x63\x51\x53\x6b\x43','\x57\x50\x39\x39\x62\x57\x79','\x75\x67\x38\x39\x79\x47\x4b\x42\x43\x71','\x57\x37\x6a\x6c\x79\x6d\x6b\x75\x57\x36\x62\x47','\x57\x34\x37\x63\x4f\x53\x6f\x53\x6f\x31\x34\x50','\x57\x37\x57\x4b\x57\x4f\x72\x58\x57\x52\x52\x63\x4b\x68\x4b\x6a','\x72\x78\x69\x6d\x57\x52\x37\x64\x4a\x43\x6b\x2b','\x79\x4e\x34\x30','\x6d\x32\x72\x38\x57\x50\x38\x39\x57\x35\x38','\x57\x34\x68\x63\x47\x71\x39\x37\x72\x6d\x6f\x33','\x57\x4f\x4a\x64\x55\x38\x6f\x50\x57\x4f\x53\x49\x45\x57','\x57\x4f\x71\x53\x57\x37\x33\x64\x4e\x5a\x6c\x64\x55\x62\x78\x64\x52\x71','\x6c\x6d\x6f\x53\x57\x4f\x47','\x57\x4f\x2f\x64\x53\x43\x6f\x6c\x71\x57','\x57\x37\x53\x34\x57\x52\x75','\x57\x34\x5a\x63\x51\x43\x6f\x35\x6f\x31\x38\x79\x57\x34\x56\x64\x54\x71','\x57\x4f\x46\x63\x56\x73\x70\x64\x4e\x48\x6c\x63\x56\x64\x7a\x69','\x57\x36\x4e\x63\x53\x38\x6f\x56\x6e\x32\x53','\x57\x34\x31\x6d\x76\x57\x44\x4d','\x57\x50\x70\x64\x56\x30\x64\x63\x51\x6d\x6b\x66\x44\x43\x6b\x63\x70\x38\x6f\x46\x70\x61\x6d\x78\x61\x47','\x77\x4e\x65\x73\x57\x52\x6d','\x43\x77\x70\x64\x48\x6d\x6f\x4d','\x57\x51\x37\x64\x51\x63\x54\x74\x57\x50\x66\x71\x57\x36\x6c\x64\x56\x59\x33\x64\x48\x32\x33\x64\x4b\x33\x57','\x73\x32\x79\x64\x57\x52\x38','\x57\x35\x4b\x59\x57\x51\x43\x38\x57\x35\x56\x63\x56\x57','\x7a\x4e\x52\x64\x52\x77\x34\x5a','\x61\x67\x58\x55\x57\x51\x39\x31','\x57\x37\x31\x42\x79\x58\x79\x69\x57\x36\x47','\x57\x35\x74\x63\x53\x76\x61'];_0x42c6=function(){return _0x24e863;};return _0x42c6();}import{REUSE_ESTIMATOR,reuseEstimate}from'\x2e\x2e\x2f\x6f\x70\x73\x2f\x73\x61\x76\x69\x6e\x67\x73\x43\x6f\x72\x65\x2e\x6a\x73';function objectRecord(_0x2fe000){const _0x33a360=_0x2e5d;return _0x2fe000!==null&&typeof _0x2fe000===_0x33a360(0x159,'\x59\x6b\x6a\x4f')&&!Array[_0x33a360(0x150,'\x37\x31\x63\x75')](_0x2fe000)?_0x2fe000:undefined;}function _0x2e5d(_0x10e2f7,_0x57bbb1){_0x10e2f7=_0x10e2f7-(-0x1*0x23ad+-0x1*-0x2ab+-0x21a6*-0x1);const _0x357faa=_0x42c6();let _0x2b4235=_0x357faa[_0x10e2f7];if(_0x2e5d['\x51\x50\x45\x66\x77\x42']===undefined){var _0x178887=function(_0x2b4e90){const _0x341906='\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7a\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5a\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x2b\x2f\x3d';let _0x1117cb='',_0x4dc402='';for(let _0x2f3bc4=-0x9bc+-0x1*0x123b+0x1bf7*0x1,_0x1476f7,_0x5962a7,_0x4cd474=0x174e+-0x7be+-0x1*0xf90;_0x5962a7=_0x2b4e90['\x63\x68\x61\x72\x41\x74'](_0x4cd474++);~_0x5962a7&&(_0x1476f7=_0x2f3bc4%(-0x1*-0x419+0x20f3+-0x2508)?_0x1476f7*(-0x25bf+-0x764+0x2d63)+_0x5962a7:_0x5962a7,_0x2f3bc4++%(0x14cb+0x1*-0x1c+0x14ab*-0x1))?_0x1117cb+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](-0x8*0x328+-0x1d3b+0x377a&_0x1476f7>>(-(-0xbf6+-0x2553+0x1*0x314b)*_0x2f3bc4&0x1e31+-0x14a3+-0x988)):-0x14ce+0x1c72+-0x7a4){_0x5962a7=_0x341906['\x69\x6e\x64\x65\x78\x4f\x66'](_0x5962a7);}for(let _0x1fb8a2=-0x2*-0x1f+0x1*0x1bca+-0x1c08,_0x17259b=_0x1117cb['\x6c\x65\x6e\x67\x74\x68'];_0x1fb8a2<_0x17259b;_0x1fb8a2++){_0x4dc402+='\x25'+('\x30\x30'+_0x1117cb['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x1fb8a2)['\x74\x6f\x53\x74\x72\x69\x6e\x67'](-0x1df7+-0x5*-0x42d+0x926))['\x73\x6c\x69\x63\x65'](-(0x1e7a+0x6*-0x265+-0x101a));}return decodeURIComponent(_0x4dc402);};const _0x181e5d=function(_0x1a6ebb,_0x400249){let _0x225080=[],_0x246524=-0x5b6+-0x10*-0xd0+-0x74a,_0x2c28bf,_0x20d0e4='';_0x1a6ebb=_0x178887(_0x1a6ebb);let _0x11ff92;for(_0x11ff92=0x2443+-0x152d+-0xf16*0x1;_0x11ff92<0x26e5+0x230e+0x9*-0x81b;_0x11ff92++){_0x225080[_0x11ff92]=_0x11ff92;}for(_0x11ff92=-0x4*0x8bf+-0x2f9*0xc+0xe*0x50c;_0x11ff92<0x1eb5+0x2540+-0x42f5;_0x11ff92++){_0x246524=(_0x246524+_0x225080[_0x11ff92]+_0x400249['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x11ff92%_0x400249['\x6c\x65\x6e\x67\x74\x68']))%(-0x2064*0x1+0x19c8+-0x3ce*-0x2),_0x2c28bf=_0x225080[_0x11ff92],_0x225080[_0x11ff92]=_0x225080[_0x246524],_0x225080[_0x246524]=_0x2c28bf;}_0x11ff92=0xe00+-0x160c+0x80c,_0x246524=-0x1*0xb23+-0x1*-0x1184+-0x661;for(let _0x336e32=0x1*-0x23c5+0x1*-0xec3+-0x9a*-0x54;_0x336e32<_0x1a6ebb['\x6c\x65\x6e\x67\x74\x68'];_0x336e32++){_0x11ff92=(_0x11ff92+(-0x209d+0x3*-0xcab+0x469f))%(-0x5b5*0x3+-0x2*-0x134e+0x419*-0x5),_0x246524=(_0x246524+_0x225080[_0x11ff92])%(0x295*-0x4+-0x16a*-0x4+0x5ac),_0x2c28bf=_0x225080[_0x11ff92],_0x225080[_0x11ff92]=_0x225080[_0x246524],_0x225080[_0x246524]=_0x2c28bf,_0x20d0e4+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](_0x1a6ebb['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x336e32)^_0x225080[(_0x225080[_0x11ff92]+_0x225080[_0x246524])%(-0x1727*-0x1+-0x3*0x6d3+-0x1ae)]);}return _0x20d0e4;};_0x2e5d['\x73\x4e\x70\x6f\x63\x42']=_0x181e5d,_0x2e5d['\x77\x63\x51\x50\x45\x51']={},_0x2e5d['\x51\x50\x45\x66\x77\x42']=!![];}const _0x2a2274=_0x357faa[0xf8a+0x1416+-0x23a0],_0x3eb06f=_0x10e2f7+_0x2a2274,_0xcaaf9b=_0x2e5d['\x77\x63\x51\x50\x45\x51'][_0x3eb06f];return!_0xcaaf9b?(_0x2e5d['\x44\x76\x50\x4e\x79\x48']===undefined&&(_0x2e5d['\x44\x76\x50\x4e\x79\x48']=!![]),_0x2b4235=_0x2e5d['\x73\x4e\x70\x6f\x63\x42'](_0x2b4235,_0x57bbb1),_0x2e5d['\x77\x63\x51\x50\x45\x51'][_0x3eb06f]=_0x2b4235):_0x2b4235=_0xcaaf9b,_0x2b4235;}function nonEmptyString(_0x4105d8){const _0x2be948=_0x2e5d;return typeof _0x4105d8===_0x2be948(0x15b,'\x44\x4e\x2a\x72')&&_0x4105d8['\x6c\x65\x6e\x67\x74\x68']>0x1979+0x1*0x1471+-0x2dea?_0x4105d8:undefined;}function positiveNumber(_0x2f1bf7,_0x137efe=![]){const _0x65a155=_0x2e5d,_0x1d045f=typeof _0x2f1bf7===_0x65a155(0xb2,'\x79\x56\x68\x46')?_0x2f1bf7:_0x137efe?Number(_0x2f1bf7):Number[_0x65a155(0xb3,'\x46\x57\x29\x42')];return Number[_0x65a155(0x141,'\x79\x5e\x77\x67')](_0x1d045f)&&_0x1d045f>0x65*0x35+0x23a4+-0x388d?_0x1d045f:undefined;}function nestedAssetRecord(_0x2b04d4){const _0x3625d6=_0x2e5d,_0x2d8362=objectRecord(_0x2b04d4);return{..._0x2d8362?{'\x64\x69\x72\x65\x63\x74':_0x2d8362}:{},...objectRecord(_0x2d8362?.[_0x3625d6(0x13a,'\x26\x67\x79\x77')])?{'\x70\x61\x79\x6c\x6f\x61\x64':objectRecord(_0x2d8362?.[_0x3625d6(0xf2,'\x4d\x69\x61\x67')])}:{}};}export function assetDerivationTokenCost(_0x541eb6){const _0xfa5a61=_0x2e5d,_0xf2ac6=nestedAssetRecord(_0x541eb6);for(const _0xf6f3f5 of[_0xf2ac6[_0xfa5a61(0xe9,'\x57\x23\x64\x32')],_0xf2ac6[_0xfa5a61(0x113,'\x36\x53\x24\x63')]]){if(_0xfa5a61(0x14b,'\x4e\x37\x74\x43')===_0xfa5a61(0xc8,'\x50\x34\x44\x64'))_0x2af7c1[_0xfa5a61(0xc6,'\x26\x36\x77\x52')]+=0x3ce*0x1+0x2424+-0x27f1,_0x371c3a+=-0x93a+0xcb6+0x1*-0x37b;else{const _0x11288e=objectRecord(_0xf6f3f5?.[_0xfa5a61(0xbc,'\x46\x57\x29\x42')+_0xfa5a61(0xd8,'\x48\x4b\x28\x57')+'\x73']),_0x5daa53=positiveNumber(_0x11288e?.[_0xfa5a61(0x145,'\x78\x30\x47\x4c')+_0xfa5a61(0xcc,'\x57\x23\x64\x32')]);if(_0x5daa53!==undefined)return _0x5daa53;}}return undefined;}function assetBlastRadiusLines(_0x2d3288){const _0x4995e9=_0x2e5d,_0x1f00ab=nestedAssetRecord(_0x2d3288);for(const _0x525652 of[_0x1f00ab['\x64\x69\x72\x65\x63\x74'],_0x1f00ab[_0x4995e9(0x13b,'\x7a\x49\x4d\x24')]]){if(_0x4995e9(0x116,'\x44\x6f\x32\x4b')==='\x4c\x79\x67\x51\x67'){const _0x2ebce3=objectRecord(_0x525652?.[_0x4995e9(0x11c,'\x4e\x37\x74\x43')+_0x4995e9(0x120,'\x68\x5e\x74\x5d')]),_0x36dcae=positiveNumber(_0x2ebce3?.[_0x4995e9(0x126,'\x44\x4e\x2a\x72')]);if(_0x36dcae!==undefined)return _0x36dcae;}else{const _0x3bb7a7=typeof _0x5eaf93===_0x4995e9(0x118,'\x71\x39\x61\x53')?_0x10defd:_0xc0300f?_0x3d005a(_0x2357ba):_0x21c8cb[_0x4995e9(0xc9,'\x36\x53\x24\x63')];return _0xc32aaf[_0x4995e9(0x11d,'\x78\x72\x62\x59')](_0x3bb7a7)&&_0x3bb7a7>-0x181a*-0x1+0x1a6*-0x10+0x246?_0x3bb7a7:_0x21172e;}}return undefined;}export function reuseSavingsForAsset(_0x345339,_0x40929c,_0x18669b){const _0x522f5a=_0x2e5d,_0x402c9e=assetDerivationTokenCost(_0x345339),_0x535366=_0x402c9e===undefined?positiveNumber(_0x18669b):undefined,_0x594cef=_0x402c9e??_0x535366;if(_0x594cef!==undefined)return{'\x74\x6f\x6b\x65\x6e\x73\x5f\x73\x61\x76\x65\x64':Math[_0x522f5a(0xb4,'\x44\x6f\x32\x4b')](_0x40929c===_0x522f5a(0x13e,'\x57\x23\x64\x32')+'\x65'?_0x594cef*REUSE_ESTIMATOR['\x72\x65\x66\x65\x72\x65\x6e\x63'+_0x522f5a(0x14e,'\x78\x30\x47\x4c')+'\x5f\x66\x72\x61\x63\x74\x69\x6f'+'\x6e']:_0x594cef),'\x74\x6f\x6b\x65\x6e\x73\x5f\x73\x61\x76\x65\x64\x5f\x62\x61\x73\x69\x73':_0x402c9e!==undefined?_0x522f5a(0x123,'\x50\x34\x44\x64'):_0x522f5a(0xa7,'\x32\x58\x21\x39')+'\x65\x78'};const _0x38177b=reuseEstimate(assetBlastRadiusLines(_0x345339),_0x40929c);return{'\x74\x6f\x6b\x65\x6e\x73\x5f\x73\x61\x76\x65\x64':_0x38177b[_0x522f5a(0x12f,'\x4e\x37\x74\x43')+_0x522f5a(0xae,'\x59\x6b\x6a\x4f')],'\x74\x6f\x6b\x65\x6e\x73\x5f\x73\x61\x76\x65\x64\x5f\x62\x61\x73\x69\x73':_0x38177b[_0x522f5a(0x135,'\x6b\x71\x26\x5e')]};}function isAssetCallRecord(_0x3283fc){const _0x20caa8=_0x2e5d,_0xe65f04=objectRecord(_0x3283fc);return _0xe65f04!==undefined&&typeof _0xe65f04['\x74\x69\x6d\x65\x73\x74\x61\x6d'+'\x70']===_0x20caa8(0x12a,'\x57\x42\x6e\x6e')&&typeof _0xe65f04[_0x20caa8(0x157,'\x2a\x76\x46\x68')]==='\x73\x74\x72\x69\x6e\x67'&&_0xe65f04[_0x20caa8(0xcd,'\x6b\x71\x26\x5e')][_0x20caa8(0x12d,'\x70\x47\x69\x58')]>-0xcfd+0x1d66+-0x1*0x1069;}export class AssetCallLog{[_0x182c10(0xbe,'\x68\x5e\x74\x5d')];[_0x182c10(0x13f,'\x2a\x50\x46\x5a')];constructor(_0x87335,_0x2f5836=()=>new Date()){const _0x43d23a=_0x182c10;this[_0x43d23a(0xd6,'\x44\x4e\x2a\x72')]=_0x87335,this[_0x43d23a(0xa5,'\x6e\x4f\x26\x6c')]=_0x2f5836;}[_0x182c10(0x142,'\x24\x34\x43\x6f')](_0x5d87cf){const _0x157430=_0x182c10;if(!_0x5d87cf||typeof _0x5d87cf!==_0x157430(0xd9,'\x41\x77\x39\x28'))return;try{if(_0x157430(0x112,'\x44\x38\x74\x46')!=='\x59\x43\x54\x66\x72'){mkdirSync(dirname(this[_0x157430(0x132,'\x79\x56\x68\x46')]),{'\x72\x65\x63\x75\x72\x73\x69\x76\x65':!![]});const _0x30a5e0={'\x74\x69\x6d\x65\x73\x74\x61\x6d\x70':this[_0x157430(0x14d,'\x58\x5b\x65\x54')]()[_0x157430(0xd5,'\x26\x67\x79\x77')+_0x157430(0x138,'\x74\x33\x54\x75')](),..._0x5d87cf};appendFileSync(this[_0x157430(0xf8,'\x26\x36\x77\x52')],JSON[_0x157430(0x11b,'\x37\x31\x63\x75')+'\x79'](_0x30a5e0)+'\x0a',_0x157430(0x127,'\x40\x40\x44\x52'));}else _0x583c11={'\x61\x73\x73\x65\x74\x5f\x69\x64':_0x1ae8d6,'\x73\x6f\x75\x72\x63\x65\x5f\x6e\x6f\x64\x65\x5f\x69\x64':_0x398832(_0x224ca2['\x73\x6f\x75\x72\x63\x65\x5f\x6e'+'\x6f\x64\x65\x5f\x69\x64'])??null,'\x63\x68\x61\x69\x6e\x5f\x69\x64':_0x52a263(_0x5eae21[_0x157430(0xfc,'\x48\x4b\x28\x57')])??null,'\x72\x65\x75\x73\x65':0x0,'\x72\x65\x66\x65\x72\x65\x6e\x63\x65':0x0,'\x74\x6f\x6b\x65\x6e\x73\x5f\x73\x61\x76\x65\x64':0x0},_0x2ca3b3['\x73\x65\x74'](_0x1f0b38,_0x57f570);}catch{}}[_0x182c10(0xac,'\x4e\x37\x74\x43')](_0x179cfc={}){const _0x1ce8c3=_0x182c10;if(!existsSync(this[_0x1ce8c3(0x154,'\x40\x40\x44\x52')]))return[];let _0x4b44a3=[];try{for(const _0x190db0 of readFileSync(this[_0x1ce8c3(0xab,'\x59\x6b\x6a\x4f')],_0x1ce8c3(0xba,'\x70\x57\x30\x35'))[_0x1ce8c3(0x12c,'\x71\x39\x61\x53')]('\x0a')){if(_0x1ce8c3(0xa8,'\x2a\x76\x46\x68')!==_0x1ce8c3(0xb1,'\x26\x36\x77\x52')){if(!_0x190db0)continue;try{const _0x459c24=JSON[_0x1ce8c3(0xa9,'\x78\x30\x47\x4c')](_0x190db0);if(isAssetCallRecord(_0x459c24))_0x4b44a3[_0x1ce8c3(0xe1,'\x46\x57\x29\x42')](_0x459c24);}catch{}}else{const _0x4f4da9=new _0x454ae0(_0x2a3dc5[_0x1ce8c3(0xfa,'\x57\x42\x6e\x6e')])[_0x1ce8c3(0x14f,'\x57\x23\x64\x32')]();if(_0xad9a55[_0x1ce8c3(0x10b,'\x57\x6e\x59\x41')](_0x4f4da9))_0x1883a8=_0x277da1[_0x1ce8c3(0xc3,'\x44\x4e\x2a\x72')](_0x295689=>new _0x23a2ff(_0x295689[_0x1ce8c3(0xbf,'\x41\x77\x39\x28')+'\x70'])['\x67\x65\x74\x54\x69\x6d\x65']()>=_0x4f4da9);}}}catch{if(_0x1ce8c3(0x13d,'\x44\x4e\x2a\x72')===_0x1ce8c3(0x124,'\x36\x6b\x24\x6d'))return[];else _0x571953['\x74\x6f\x6b\x65\x6e\x73\x5f\x73'+_0x1ce8c3(0x10c,'\x43\x54\x49\x55')]+=_0x2e143b,_0x16fb37+=_0x1e2627;}if(_0x179cfc[_0x1ce8c3(0x111,'\x70\x57\x30\x35')]){if(_0x1ce8c3(0xf4,'\x39\x45\x4b\x6b')===_0x1ce8c3(0x115,'\x39\x45\x4b\x6b')){const _0x4da86a=_0x519ab7(_0x4bb15c);for(const _0x3bd371 of[_0x4da86a[_0x1ce8c3(0x15c,'\x57\x42\x6e\x6e')],_0x4da86a[_0x1ce8c3(0x13a,'\x26\x67\x79\x77')]]){const _0x31da05=_0x5200cf(_0x3bd371?.[_0x1ce8c3(0x148,'\x6e\x4f\x26\x6c')+_0x1ce8c3(0x128,'\x44\x38\x74\x46')+'\x73']),_0x5f57f0=_0x1f6eba(_0x31da05?.['\x74\x6f\x74\x61\x6c\x5f\x74\x6f'+_0x1ce8c3(0x129,'\x2a\x76\x46\x68')]);if(_0x5f57f0!==_0x21ca20)return _0x5f57f0;}return _0x527cf6;}else{const _0x589c3a=new Date(_0x179cfc[_0x1ce8c3(0xb0,'\x50\x34\x44\x64')])[_0x1ce8c3(0x131,'\x39\x45\x4b\x6b')]();if(Number[_0x1ce8c3(0xf3,'\x4e\x37\x74\x43')](_0x589c3a))_0x4b44a3=_0x4b44a3[_0x1ce8c3(0xe5,'\x70\x5e\x7a\x39')](_0x180f44=>new Date(_0x180f44[_0x1ce8c3(0x15e,'\x7a\x49\x4d\x24')+'\x70'])[_0x1ce8c3(0xce,'\x74\x33\x54\x75')]()>=_0x589c3a);}}if(_0x179cfc[_0x1ce8c3(0xc0,'\x59\x6b\x6a\x4f')])_0x4b44a3=_0x4b44a3[_0x1ce8c3(0xed,'\x74\x33\x54\x75')](_0x48c8f0=>_0x48c8f0[_0x1ce8c3(0xd4,'\x40\x40\x44\x52')]===_0x179cfc[_0x1ce8c3(0xc0,'\x59\x6b\x6a\x4f')]);if(_0x179cfc[_0x1ce8c3(0x143,'\x79\x5e\x77\x67')])_0x4b44a3=_0x4b44a3[_0x1ce8c3(0x153,'\x44\x38\x74\x46')](_0x54690b=>_0x54690b[_0x1ce8c3(0xd0,'\x4f\x31\x35\x31')]===_0x179cfc[_0x1ce8c3(0x106,'\x5b\x42\x30\x7a')]);if(_0x179cfc[_0x1ce8c3(0xc5,'\x79\x5e\x77\x67')]&&Number[_0x1ce8c3(0x158,'\x6e\x4f\x26\x6c')](_0x179cfc['\x6c\x61\x73\x74'])&&_0x179cfc[_0x1ce8c3(0x105,'\x58\x5b\x65\x54')]>0x3*0x7c3+-0x8cb*-0x4+-0x3a75)_0x4b44a3=_0x4b44a3['\x73\x6c\x69\x63\x65'](-_0x179cfc[_0x1ce8c3(0xea,'\x44\x6f\x32\x4b')]);return _0x4b44a3;}[_0x182c10(0x11a,'\x44\x6f\x32\x4b')+'\x65'](_0x59fd70={}){const _0x349a5c=_0x182c10,_0x92ba0e=this[_0x349a5c(0xe7,'\x57\x42\x6e\x6e')](_0x59fd70),_0x5b5ed7={},_0x454f79=new Set(),_0xd623ab=new Set();for(const _0x1c00be of _0x92ba0e){if(_0x349a5c(0x136,'\x46\x57\x29\x42')!==_0x349a5c(0xd3,'\x24\x34\x43\x6f')){const _0x513dee=this[_0x349a5c(0xb9,'\x41\x77\x39\x28')](_0x55637e),_0x5791e7={},_0x42c04b=new _0x7bed9c(),_0x3f51f4=new _0x362cc9();for(const _0x56849a of _0x513dee){_0x5791e7[_0x56849a[_0x349a5c(0x117,'\x78\x72\x62\x59')]]=(_0x5791e7[_0x56849a[_0x349a5c(0xd2,'\x49\x21\x51\x42')]]??0x1*0x9b7+0x24a0+-0x2e57*0x1)+(0x4f2*-0x5+0x221c+-0x961);if(_0x56849a[_0x349a5c(0xcf,'\x48\x4b\x28\x57')])_0x42c04b[_0x349a5c(0x15a,'\x39\x45\x4b\x6b')](_0x56849a[_0x349a5c(0x12e,'\x4b\x67\x76\x53')]);if(_0x56849a[_0x349a5c(0x103,'\x71\x39\x61\x53')])_0x3f51f4[_0x349a5c(0x133,'\x6e\x4f\x26\x6c')](_0x56849a[_0x349a5c(0x101,'\x36\x53\x24\x63')]);}return{'\x74\x6f\x74\x61\x6c\x5f\x65\x6e\x74\x72\x69\x65\x73':_0x513dee[_0x349a5c(0x14c,'\x41\x77\x39\x28')],'\x75\x6e\x69\x71\x75\x65\x5f\x61\x73\x73\x65\x74\x73':_0x42c04b[_0x349a5c(0xe3,'\x2a\x76\x46\x68')],'\x75\x6e\x69\x71\x75\x65\x5f\x72\x75\x6e\x73':_0x3f51f4[_0x349a5c(0x137,'\x68\x5e\x74\x5d')],'\x62\x79\x5f\x61\x63\x74\x69\x6f\x6e':_0x5791e7,'\x65\x6e\x74\x72\x69\x65\x73':_0x513dee};}else{_0x5b5ed7[_0x1c00be[_0x349a5c(0xef,'\x4d\x69\x61\x67')]]=(_0x5b5ed7[_0x1c00be[_0x349a5c(0xdd,'\x31\x41\x55\x56')]]??-0x1c14+-0x64*-0x33+0x9*0xe8)+(0x1fde+0xdd0+-0x2dad);if(_0x1c00be[_0x349a5c(0xcf,'\x48\x4b\x28\x57')])_0x454f79[_0x349a5c(0xe6,'\x26\x36\x77\x52')](_0x1c00be[_0x349a5c(0xb5,'\x70\x47\x69\x58')]);if(_0x1c00be[_0x349a5c(0x13c,'\x5b\x42\x30\x7a')])_0xd623ab['\x61\x64\x64'](_0x1c00be[_0x349a5c(0x156,'\x70\x47\x69\x58')]);}}return{'\x74\x6f\x74\x61\x6c\x5f\x65\x6e\x74\x72\x69\x65\x73':_0x92ba0e[_0x349a5c(0xf6,'\x6b\x71\x26\x5e')],'\x75\x6e\x69\x71\x75\x65\x5f\x61\x73\x73\x65\x74\x73':_0x454f79[_0x349a5c(0x110,'\x57\x42\x6e\x6e')],'\x75\x6e\x69\x71\x75\x65\x5f\x72\x75\x6e\x73':_0xd623ab[_0x349a5c(0xeb,'\x78\x30\x47\x4c')],'\x62\x79\x5f\x61\x63\x74\x69\x6f\x6e':_0x5b5ed7,'\x65\x6e\x74\x72\x69\x65\x73':_0x92ba0e};}[_0x182c10(0x119,'\x6b\x71\x26\x5e')+_0x182c10(0xf7,'\x50\x34\x44\x64')+_0x182c10(0x155,'\x39\x45\x4b\x6b')](_0x68b7c6={}){const _0x200dc1=_0x182c10,_0x3e8259=this['\x72\x65\x61\x64'](_0x68b7c6)[_0x200dc1(0xe0,'\x44\x6f\x32\x4b')](_0x4f1add=>_0x4f1add[_0x200dc1(0xaf,'\x70\x57\x30\x35')]===_0x200dc1(0x100,'\x79\x56\x68\x46')+_0x200dc1(0x15f,'\x57\x23\x64\x32')||_0x4f1add['\x61\x63\x74\x69\x6f\x6e']===_0x200dc1(0xe4,'\x36\x6b\x24\x6d')+_0x200dc1(0xb6,'\x48\x4b\x28\x57')),_0x57f5a4=new Map();let _0x127eb5=0x1ee5+-0x2593*0x1+0x6ae,_0x32aa5c=0x1*0x925+-0x189*-0xb+-0xe*0x1dc,_0x4a41b6=0x44f*0x1+0xa1e+-0xe6d;for(const _0x4776e4 of _0x3e8259){const _0x5692d0=nonEmptyString(_0x4776e4[_0x200dc1(0xb8,'\x6e\x4f\x26\x6c')])??_0x200dc1(0x144,'\x59\x6b\x6a\x4f')+'\x29';let _0x108113=_0x57f5a4['\x67\x65\x74'](_0x5692d0);!_0x108113&&(_0x108113={'\x61\x73\x73\x65\x74\x5f\x69\x64':_0x5692d0,'\x73\x6f\x75\x72\x63\x65\x5f\x6e\x6f\x64\x65\x5f\x69\x64':nonEmptyString(_0x4776e4[_0x200dc1(0xca,'\x57\x42\x6e\x6e')+_0x200dc1(0xfd,'\x26\x36\x77\x52')])??null,'\x63\x68\x61\x69\x6e\x5f\x69\x64':nonEmptyString(_0x4776e4[_0x200dc1(0x11f,'\x7a\x31\x70\x75')])??null,'\x72\x65\x75\x73\x65':0x0,'\x72\x65\x66\x65\x72\x65\x6e\x63\x65':0x0,'\x74\x6f\x6b\x65\x6e\x73\x5f\x73\x61\x76\x65\x64':0x0},_0x57f5a4[_0x200dc1(0xdc,'\x49\x21\x51\x42')](_0x5692d0,_0x108113));if(_0x4776e4[_0x200dc1(0x147,'\x26\x67\x79\x77')]==='\x61\x73\x73\x65\x74\x5f\x72\x65'+_0x200dc1(0x139,'\x47\x57\x33\x21')){if(_0x200dc1(0xc7,'\x46\x57\x29\x42')==='\x42\x68\x43\x4c\x6e'){_0x1b1e26[_0xea6d7b[_0x200dc1(0xc1,'\x4b\x67\x76\x53')]]=(_0x486a75[_0x510078[_0x200dc1(0xaf,'\x70\x57\x30\x35')]]??-0x2*-0x3c8+0x2*-0x18+-0x760)+(0x270d+-0x2156+0x1*-0x5b6);if(_0x381528[_0x200dc1(0x152,'\x57\x42\x6e\x6e')])_0x48fc58[_0x200dc1(0xf0,'\x72\x5d\x4d\x59')](_0x57c207[_0x200dc1(0x12b,'\x68\x5e\x74\x5d')]);if(_0x46a0a3[_0x200dc1(0x15d,'\x43\x54\x49\x55')])_0x440146[_0x200dc1(0xbb,'\x78\x30\x47\x4c')](_0x10847d[_0x200dc1(0x14a,'\x32\x58\x21\x39')]);}else _0x108113[_0x200dc1(0xdb,'\x57\x42\x6e\x6e')]+=-0x9c5*-0x1+0xf44+-0x1908,_0x32aa5c+=-0xd2c+0xaf0+0x23d;}else _0x108113['\x72\x65\x66\x65\x72\x65\x6e\x63'+'\x65']+=-0x20a2+0x14*-0x122+0x374b,_0x4a41b6+=0x16*0x133+0x1*0x85d+-0x22be;const _0x4f080d=positiveNumber(_0x4776e4['\x74\x6f\x6b\x65\x6e\x73\x5f\x73'+_0x200dc1(0x104,'\x44\x4e\x2a\x72')],!![]);_0x4f080d!==undefined&&(_0x108113[_0x200dc1(0x122,'\x40\x40\x44\x52')+_0x200dc1(0xa4,'\x5b\x42\x30\x7a')]+=_0x4f080d,_0x127eb5+=_0x4f080d),_0x108113[_0x200dc1(0xf1,'\x6e\x4f\x26\x6c')+_0x200dc1(0xbd,'\x39\x24\x58\x5e')]??=nonEmptyString(_0x4776e4[_0x200dc1(0xdf,'\x36\x6b\x24\x6d')+_0x200dc1(0x10a,'\x48\x4b\x28\x57')])??null,_0x108113[_0x200dc1(0xa6,'\x2a\x76\x46\x68')]??=nonEmptyString(_0x4776e4[_0x200dc1(0xc2,'\x31\x41\x55\x56')])??null;}const _0x357608=[..._0x57f5a4[_0x200dc1(0xde,'\x79\x56\x68\x46')]()][_0x200dc1(0xd1,'\x71\x39\x61\x53')]((_0x729839,_0x47f34b)=>_0x47f34b[_0x200dc1(0xf5,'\x48\x4b\x28\x57')]+_0x47f34b[_0x200dc1(0x10d,'\x48\x4b\x28\x57')+'\x65']-(_0x729839[_0x200dc1(0xf5,'\x48\x4b\x28\x57')]+_0x729839['\x72\x65\x66\x65\x72\x65\x6e\x63'+'\x65']));return{'\x74\x6f\x74\x61\x6c\x5f\x72\x65\x75\x73\x65':_0x32aa5c,'\x74\x6f\x74\x61\x6c\x5f\x72\x65\x66\x65\x72\x65\x6e\x63\x65':_0x4a41b6,'\x74\x6f\x74\x61\x6c\x5f\x74\x6f\x6b\x65\x6e\x73\x5f\x73\x61\x76\x65\x64':_0x127eb5,'\x62\x79\x5f\x61\x73\x73\x65\x74':_0x357608};}[_0x182c10(0x149,'\x5b\x42\x30\x7a')+'\x74\x49\x6e\x64\x65\x78'](_0x44a7ab={}){const _0x334b1e=_0x182c10,_0x3f1a7a=new Map();for(const _0x146332 of this[_0x334b1e(0xfe,'\x6e\x4f\x26\x6c')](_0x44a7ab)){if(_0x146332[_0x334b1e(0xb7,'\x68\x5e\x74\x5d')]!=='\x61\x73\x73\x65\x74\x5f\x70\x75'+_0x334b1e(0x125,'\x47\x57\x33\x21'))continue;const _0x28a6d8=nonEmptyString(_0x146332[_0x334b1e(0xec,'\x37\x31\x63\x75')]),_0x1ad968=positiveNumber(_0x146332[_0x334b1e(0xff,'\x43\x54\x49\x55')+_0x334b1e(0xe2,'\x44\x6f\x32\x4b')],!![]);if(_0x28a6d8&&_0x1ad968!==undefined)_0x3f1a7a[_0x334b1e(0x109,'\x32\x58\x21\x39')](_0x28a6d8,_0x1ad968);}return Object[_0x334b1e(0x134,'\x5b\x57\x34\x68')+_0x334b1e(0xda,'\x43\x54\x49\x55')](_0x3f1a7a);}}
@@ -1,4 +1,4 @@
1
- import type { HubCapability, HubBindings } from './capability.js';
1
+ import type { HubCapability, HubBindings, PublishReceipt } from './capability.js';
2
2
  import { type LeakCheckMode } from './sanitize.js';
3
3
  /** publish 回执非 accepted → 抛此错; SyncEngine 据 terminal 决定是否重试. */
4
4
  export declare class PublishRejectedError extends Error {
@@ -19,6 +19,13 @@ export interface HubBindingsOptions {
19
19
  mode?: LeakCheckMode;
20
20
  };
21
21
  }
22
+ /**
23
+ * Internal publish-handler result. `submittedAssetIds` identifies the exact sanitized
24
+ * content sent to the Hub, even when the Hub's accepted receipt omits asset ids.
25
+ */
26
+ export interface PublishDispatchResult extends PublishReceipt {
27
+ submittedAssetIds?: string[];
28
+ }
22
29
  /**
23
30
  * 把 HubCapability 接到 core 两 seam(M6-1):
24
31
  * - asProxyHandler: Dispatcher.handlers.proxy — 按 envelope.type 路由到 hub. 抛错→store.fail()重试;