@buildaureon/sdk 0.1.1 → 0.1.7
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 +655 -640
- package/dist/index.d.ts +713 -89
- package/dist/index.js +1754 -190
- package/dist/index.js.map +1 -1
- package/docs/architecture.md +206 -206
- package/docs/auth.md +174 -174
- package/docs/client-api.md +782 -605
- package/docs/data-contracts.md +710 -635
- package/docs/error-model.md +217 -217
- package/docs/integration-guide.md +397 -257
- package/docs/receipt-validation.md +63 -0
- package/docs/security.md +120 -120
- package/docs/transport.md +142 -142
- package/examples/ai-to-objective-to-portfolio/main.ts +127 -0
- package/examples/audit-trail/main.ts +53 -0
- package/examples/drift-detect-restore/main.ts +96 -0
- package/examples/full-aureon-loop/main.ts +83 -0
- package/examples/green-vs-plan/main.ts +139 -0
- package/examples/market-event/main.ts +67 -65
- package/examples/portfolio-watch/main.ts +84 -0
- package/examples/quickstart/main.ts +72 -72
- package/examples/receipt-verification/main.ts +87 -0
- package/examples/registry-register/main.ts +44 -0
- package/package.json +8 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,61 +1,99 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Timeline event contracts for append-only operator narratives.
|
|
3
|
+
*/
|
|
4
|
+
type TimelineEventType = "objective_created" | "objective_updated" | "objective_paused" | "objective_resumed" | "health_changed" | "violation_detected" | "evaluation_started" | "execution_started" | "execution_completed" | "market_event_applied" | "objective_restored" | "capital_provisioned" | "capital_cleared" | "capital_synced" | "registry_registered" | "settlement_recorded";
|
|
5
|
+
interface TimelineEvent {
|
|
6
|
+
id: string;
|
|
7
|
+
objectiveId: string | null;
|
|
8
|
+
type: TimelineEventType;
|
|
9
|
+
message: string;
|
|
10
|
+
payload: Record<string, unknown>;
|
|
11
|
+
createdAt: string;
|
|
6
12
|
}
|
|
7
|
-
declare const
|
|
8
|
-
declare function
|
|
13
|
+
declare const TIMELINE_EVENT_TYPES: readonly TimelineEventType[];
|
|
14
|
+
declare function isTimelineEventType(value: string): value is TimelineEventType;
|
|
9
15
|
|
|
10
16
|
/**
|
|
11
|
-
* @fileoverview
|
|
17
|
+
* @fileoverview Phase 2 ObjectiveRegistry types.
|
|
12
18
|
*/
|
|
19
|
+
type RegistryStatus = {
|
|
20
|
+
enabled: boolean;
|
|
21
|
+
chainId: number;
|
|
22
|
+
contractAddress: string | null;
|
|
23
|
+
explorerBase: string;
|
|
24
|
+
network: string;
|
|
25
|
+
};
|
|
26
|
+
type RegistryRef = {
|
|
27
|
+
objectiveKey: string;
|
|
28
|
+
contractAddress: string;
|
|
29
|
+
};
|
|
30
|
+
type ObjectiveRegistryRecord = {
|
|
31
|
+
objectiveId: string;
|
|
32
|
+
objectiveKey: string;
|
|
33
|
+
configHash: string;
|
|
34
|
+
owner: string;
|
|
35
|
+
status: "active" | "paused" | "cancelled";
|
|
36
|
+
chainId: number;
|
|
37
|
+
contractAddress: string;
|
|
38
|
+
transactionHash: string;
|
|
39
|
+
blockNumber: number | null;
|
|
40
|
+
registeredAt: string;
|
|
41
|
+
updatedAt: string;
|
|
42
|
+
explorerUrl: string;
|
|
43
|
+
verifiedOnChain: boolean;
|
|
44
|
+
};
|
|
45
|
+
type PrepareRegistryResult = {
|
|
46
|
+
chainId: number;
|
|
47
|
+
contractAddress: string;
|
|
48
|
+
explorerBase: string;
|
|
49
|
+
objectiveId: string;
|
|
50
|
+
objectiveKey: string;
|
|
51
|
+
configHash: string;
|
|
52
|
+
to: string;
|
|
53
|
+
data: string;
|
|
54
|
+
value: "0";
|
|
55
|
+
functionName: "registerObjective";
|
|
56
|
+
};
|
|
57
|
+
type ObjectiveRegistryLookup = {
|
|
58
|
+
registered: false;
|
|
59
|
+
objectiveId: string;
|
|
60
|
+
} | {
|
|
61
|
+
registered: true;
|
|
62
|
+
record: ObjectiveRegistryRecord;
|
|
63
|
+
};
|
|
13
64
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
timeoutMs?: number;
|
|
39
|
-
/**
|
|
40
|
-
* Static Bearer session token. Prefer `getAccessToken` for apps that refresh
|
|
41
|
-
* or clear sessions at runtime.
|
|
42
|
-
*/
|
|
43
|
-
authToken?: string | null;
|
|
44
|
-
/**
|
|
45
|
-
* Called before each request to resolve the current Bearer token.
|
|
46
|
-
* Return null/undefined to send the request without Authorization.
|
|
47
|
-
*/
|
|
48
|
-
getAccessToken?: () => string | null | undefined | Promise<string | null | undefined>;
|
|
49
|
-
/** Optional structured logger for request lifecycle diagnostics. */
|
|
50
|
-
logger?: AureonLogger;
|
|
51
|
-
/**
|
|
52
|
-
* Extra attempts after the first failure for retryable errors
|
|
53
|
-
* (network, timeout, 429, 5xx). Defaults to 0.
|
|
54
|
-
*/
|
|
55
|
-
maxRetries?: number;
|
|
56
|
-
/** Delay in ms between retries. Defaults to 250. */
|
|
57
|
-
retryDelayMs?: number;
|
|
65
|
+
/**
|
|
66
|
+
* @fileoverview On-chain settlement record for vault rebalances (Day 8).
|
|
67
|
+
*/
|
|
68
|
+
|
|
69
|
+
type SettlementStatus = "confirmed" | "orphan";
|
|
70
|
+
interface SettlementRecord {
|
|
71
|
+
id: string;
|
|
72
|
+
executionId: string | null;
|
|
73
|
+
objectiveId: string | null;
|
|
74
|
+
walletAddress: string;
|
|
75
|
+
/** Chain-verified vault settlements are always `"vault"`. */
|
|
76
|
+
settlement: "vault";
|
|
77
|
+
transactionHash: string;
|
|
78
|
+
blockNumber: number;
|
|
79
|
+
logIndex: number;
|
|
80
|
+
vaultAddress: string;
|
|
81
|
+
tokenSell: string;
|
|
82
|
+
tokenBuy: string;
|
|
83
|
+
amountIn: string;
|
|
84
|
+
amountOut: string;
|
|
85
|
+
explorerUrl: string;
|
|
86
|
+
verifiedAt: string;
|
|
87
|
+
status: SettlementStatus;
|
|
88
|
+
registryRef?: RegistryRef;
|
|
58
89
|
}
|
|
90
|
+
interface ExecutionSettlementLookup {
|
|
91
|
+
executionId: string;
|
|
92
|
+
verifiedOnChain: boolean;
|
|
93
|
+
settlement: SettlementRecord | null;
|
|
94
|
+
}
|
|
95
|
+
/** Human-readable settlement summary for agents and logs. */
|
|
96
|
+
declare function formatSettlementSummary(record: SettlementRecord): string;
|
|
59
97
|
|
|
60
98
|
/**
|
|
61
99
|
* @fileoverview Execution receipt + restore-plan types.
|
|
@@ -64,6 +102,7 @@ interface AureonClientOptions {
|
|
|
64
102
|
* as a staged capital-book update (`settlement: "staged"`) when the vault
|
|
65
103
|
* path is unavailable. Wrap/unwrap ETH↔WETH is client-side via RestorePlan.
|
|
66
104
|
*/
|
|
105
|
+
|
|
67
106
|
interface ExecutionReceipt {
|
|
68
107
|
id: string;
|
|
69
108
|
objectiveId: string;
|
|
@@ -78,7 +117,14 @@ interface ExecutionReceipt {
|
|
|
78
117
|
* `"vault"`: keeper rebalance confirmed (or pending_vault_* then confirmed).
|
|
79
118
|
* `"staged"`: capital-book restore only (honest non-finality label).
|
|
80
119
|
*/
|
|
81
|
-
settlement
|
|
120
|
+
settlement: "staged" | "vault";
|
|
121
|
+
/** Block explorer link when vault tx is a real `0x…` hash; null for staged. */
|
|
122
|
+
explorerUrl?: string | null;
|
|
123
|
+
registryRef?: RegistryRef;
|
|
124
|
+
/** True when a settlement record exists for this execution (vault only). */
|
|
125
|
+
verifiedOnChain?: boolean;
|
|
126
|
+
/** Populated when verifiedOnChain is true. */
|
|
127
|
+
settlementRecord?: SettlementRecord;
|
|
82
128
|
}
|
|
83
129
|
/** Client-side restore action: wrap/unwrap ETH↔WETH or keeper vault swap. */
|
|
84
130
|
type RestorePlanKind = "wrap_eth" | "unwrap_weth" | "vault_swap";
|
|
@@ -92,38 +138,12 @@ interface RestorePlan {
|
|
|
92
138
|
}
|
|
93
139
|
/** True when the receipt claims vault (on-chain) settlement. */
|
|
94
140
|
declare function isVaultSettlement(receipt: ExecutionReceipt): boolean;
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
objectiveId: string;
|
|
102
|
-
state: HealthState;
|
|
103
|
-
score: number;
|
|
104
|
-
currentMetric: number;
|
|
105
|
-
targetMetric: number;
|
|
106
|
-
deviation: number;
|
|
107
|
-
message: string;
|
|
108
|
-
evaluatedAt: string;
|
|
109
|
-
}
|
|
110
|
-
declare function isHealthState(value: string): value is HealthState;
|
|
111
|
-
declare function pickWorstHealth(records: ObjectiveHealth[]): ObjectiveHealth | null;
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* @fileoverview Timeline event contracts for append-only operator narratives.
|
|
115
|
-
*/
|
|
116
|
-
type TimelineEventType = "objective_created" | "objective_updated" | "objective_paused" | "objective_resumed" | "health_changed" | "violation_detected" | "evaluation_started" | "execution_started" | "execution_completed" | "market_event_applied" | "objective_restored" | "capital_provisioned" | "capital_cleared" | "capital_synced";
|
|
117
|
-
interface TimelineEvent {
|
|
118
|
-
id: string;
|
|
119
|
-
objectiveId: string | null;
|
|
120
|
-
type: TimelineEventType;
|
|
121
|
-
message: string;
|
|
122
|
-
payload: Record<string, unknown>;
|
|
123
|
-
createdAt: string;
|
|
124
|
-
}
|
|
125
|
-
declare const TIMELINE_EVENT_TYPES: readonly TimelineEventType[];
|
|
126
|
-
declare function isTimelineEventType(value: string): value is TimelineEventType;
|
|
141
|
+
/** True when the receipt has independent on-chain settlement proof. */
|
|
142
|
+
declare function isChainVerifiedReceipt(receipt: ExecutionReceipt): boolean;
|
|
143
|
+
/** Human-readable one-line receipt summary for agents and logs. */
|
|
144
|
+
declare function formatReceiptSummary(receipt: ExecutionReceipt): string;
|
|
145
|
+
/** Timeline events linked to a receipt via payload.executionId. */
|
|
146
|
+
declare function findTimelineEventsForReceipt(events: TimelineEvent[], receipt: ExecutionReceipt): TimelineEvent[];
|
|
127
147
|
|
|
128
148
|
/**
|
|
129
149
|
* @fileoverview Controlled market event types for operator demos and rehearsals.
|
|
@@ -188,6 +208,23 @@ interface DashboardOverview {
|
|
|
188
208
|
recentEvents: TimelineEvent[];
|
|
189
209
|
}
|
|
190
210
|
|
|
211
|
+
/**
|
|
212
|
+
* @fileoverview Health Engine result types.
|
|
213
|
+
*/
|
|
214
|
+
type HealthState = "healthy" | "warning" | "violation" | "paused";
|
|
215
|
+
interface ObjectiveHealth {
|
|
216
|
+
objectiveId: string;
|
|
217
|
+
state: HealthState;
|
|
218
|
+
score: number;
|
|
219
|
+
currentMetric: number;
|
|
220
|
+
targetMetric: number;
|
|
221
|
+
deviation: number;
|
|
222
|
+
message: string;
|
|
223
|
+
evaluatedAt: string;
|
|
224
|
+
}
|
|
225
|
+
declare function isHealthState(value: string): value is HealthState;
|
|
226
|
+
declare function pickWorstHealth(records: ObjectiveHealth[]): ObjectiveHealth | null;
|
|
227
|
+
|
|
191
228
|
/**
|
|
192
229
|
* @fileoverview Objective domain types for Financial Compass Objectives.
|
|
193
230
|
*/
|
|
@@ -233,6 +270,8 @@ interface Objective {
|
|
|
233
270
|
updatedAt: string;
|
|
234
271
|
lastEvaluatedAt: string | null;
|
|
235
272
|
lastExecutionId: string | null;
|
|
273
|
+
verifiedOnChain?: boolean;
|
|
274
|
+
configHash?: string;
|
|
236
275
|
}
|
|
237
276
|
/**
|
|
238
277
|
* Input for creating a new objective.
|
|
@@ -280,6 +319,377 @@ declare const OBJECTIVE_PRIORITIES: readonly ObjectivePriority[];
|
|
|
280
319
|
declare function isObjectiveKind(value: string): value is ObjectiveKind;
|
|
281
320
|
declare function isObjectivePriority(value: string): value is ObjectivePriority;
|
|
282
321
|
|
|
322
|
+
/**
|
|
323
|
+
* @fileoverview Objective vs actual allocation comparison and plan paradox detection.
|
|
324
|
+
*/
|
|
325
|
+
|
|
326
|
+
interface AllocationComparisonRow {
|
|
327
|
+
objectiveId: string;
|
|
328
|
+
name: string;
|
|
329
|
+
kind: ObjectiveKind;
|
|
330
|
+
targetSymbol?: string;
|
|
331
|
+
targetWeight: number;
|
|
332
|
+
currentMetric: number;
|
|
333
|
+
deviation: number;
|
|
334
|
+
state: HealthState;
|
|
335
|
+
}
|
|
336
|
+
interface PlanParadoxResult {
|
|
337
|
+
detected: boolean;
|
|
338
|
+
bookUp: boolean;
|
|
339
|
+
offPlanCount: number;
|
|
340
|
+
message: string;
|
|
341
|
+
}
|
|
342
|
+
/**
|
|
343
|
+
* Joins active objectives with health records into target vs current rows.
|
|
344
|
+
*/
|
|
345
|
+
declare function buildAllocationComparison(objectives: Objective[], health: ObjectiveHealth[]): AllocationComparisonRow[];
|
|
346
|
+
/**
|
|
347
|
+
* Detects when book performance looks fine but objectives are off-plan.
|
|
348
|
+
*/
|
|
349
|
+
declare function detectPlanParadox(overview: DashboardOverview, health: ObjectiveHealth[]): PlanParadoxResult;
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* @fileoverview Drift → detection → restore teaching flow helpers.
|
|
353
|
+
*/
|
|
354
|
+
|
|
355
|
+
type DriftRestorePhase = "aligned" | "drift_detected" | "restored";
|
|
356
|
+
interface DriftRestoreFlow {
|
|
357
|
+
objectiveId: string;
|
|
358
|
+
rule: {
|
|
359
|
+
summary: string;
|
|
360
|
+
targetWeight: number;
|
|
361
|
+
tolerance: number;
|
|
362
|
+
};
|
|
363
|
+
phases: {
|
|
364
|
+
aligned: {
|
|
365
|
+
health: ObjectiveHealth;
|
|
366
|
+
allocationRow?: AllocationComparisonRow;
|
|
367
|
+
};
|
|
368
|
+
drift: {
|
|
369
|
+
health: ObjectiveHealth;
|
|
370
|
+
allocationRow?: AllocationComparisonRow;
|
|
371
|
+
restorePlan?: RestorePlan;
|
|
372
|
+
};
|
|
373
|
+
restored?: {
|
|
374
|
+
health: ObjectiveHealth;
|
|
375
|
+
receipt?: ExecutionReceipt;
|
|
376
|
+
settlement?: string;
|
|
377
|
+
};
|
|
378
|
+
};
|
|
379
|
+
currentPhase: DriftRestorePhase;
|
|
380
|
+
message: string;
|
|
381
|
+
}
|
|
382
|
+
/**
|
|
383
|
+
* Infers drift-restore phase from a single health snapshot.
|
|
384
|
+
*/
|
|
385
|
+
declare function inferDriftPhase(health: ObjectiveHealth): DriftRestorePhase;
|
|
386
|
+
/**
|
|
387
|
+
* Builds the drift → detection → restore teaching shape.
|
|
388
|
+
*/
|
|
389
|
+
declare function buildDriftRestoreFlow(input: {
|
|
390
|
+
objective: Objective;
|
|
391
|
+
alignedHealth: ObjectiveHealth;
|
|
392
|
+
driftHealth: ObjectiveHealth;
|
|
393
|
+
driftPlan?: RestorePlan;
|
|
394
|
+
restoredHealth?: ObjectiveHealth;
|
|
395
|
+
receipt?: ExecutionReceipt;
|
|
396
|
+
alignedRow?: AllocationComparisonRow;
|
|
397
|
+
driftRow?: AllocationComparisonRow;
|
|
398
|
+
}): DriftRestoreFlow;
|
|
399
|
+
/**
|
|
400
|
+
* Read-only flow from current objective state + optional latest receipt.
|
|
401
|
+
*/
|
|
402
|
+
declare function buildDriftRestoreFlowFromSnapshot(input: {
|
|
403
|
+
objective: Objective;
|
|
404
|
+
health: ObjectiveHealth;
|
|
405
|
+
allocationRow?: AllocationComparisonRow;
|
|
406
|
+
restorePlan?: RestorePlan;
|
|
407
|
+
latestReceipt?: ExecutionReceipt;
|
|
408
|
+
}): DriftRestoreFlow;
|
|
409
|
+
|
|
410
|
+
/**
|
|
411
|
+
* @fileoverview Phase 2 execution receipt validator — schema + honesty rules.
|
|
412
|
+
*/
|
|
413
|
+
|
|
414
|
+
type ReceiptValidationCode = "INVALID_INPUT" | "MISSING_FIELD" | "INVALID_SETTLEMENT" | "INVALID_STATUS" | "MISSING_CONFIRMED_AT" | "STAGED_WITH_EXPLORER" | "STAGED_VERIFIED_ON_CHAIN" | "STAGED_WITH_SETTLEMENT_RECORD" | "INVALID_VAULT_HASH" | "VAULT_MISSING_EXPLORER" | "VERIFIED_WITHOUT_RECORD" | "VERIFIED_RECORD_MISMATCH" | "INVALID_REGISTRY_REF" | "INVALID_SETTLEMENT_RECORD";
|
|
415
|
+
type ReceiptValidationIssue = {
|
|
416
|
+
code: ReceiptValidationCode;
|
|
417
|
+
message: string;
|
|
418
|
+
path?: string;
|
|
419
|
+
};
|
|
420
|
+
type ReceiptValidationResult = {
|
|
421
|
+
valid: boolean;
|
|
422
|
+
issues: ReceiptValidationIssue[];
|
|
423
|
+
};
|
|
424
|
+
/** Validates a settlement record nested on a receipt. */
|
|
425
|
+
declare function validateSettlementRecord(input: unknown, options?: {
|
|
426
|
+
executionId?: string;
|
|
427
|
+
}): ReceiptValidationResult;
|
|
428
|
+
/**
|
|
429
|
+
* Validates an execution receipt against the Phase 2 contract + honesty rules.
|
|
430
|
+
* Never throws — inspect `valid` and `issues`.
|
|
431
|
+
*/
|
|
432
|
+
declare function validateExecutionReceipt(input: unknown): ReceiptValidationResult;
|
|
433
|
+
/** Type guard: true when input passes validateExecutionReceipt. */
|
|
434
|
+
declare function isValidExecutionReceipt(input: unknown): input is ExecutionReceipt;
|
|
435
|
+
/** Throws AureonValidationError when the receipt fails validation. */
|
|
436
|
+
declare function assertValidExecutionReceipt(receipt: unknown): asserts receipt is ExecutionReceipt;
|
|
437
|
+
|
|
438
|
+
/**
|
|
439
|
+
* @fileoverview Receipt → verification teaching flow helpers.
|
|
440
|
+
*/
|
|
441
|
+
|
|
442
|
+
type ReceiptVerificationPhase = "claimed" | "validated" | "validation_failed" | "chain_verified";
|
|
443
|
+
type ReceiptProofTier = "claim_only" | "schema_valid" | "chain_verified";
|
|
444
|
+
interface ReceiptVerificationFlow {
|
|
445
|
+
executionId: string;
|
|
446
|
+
receipt: ExecutionReceipt;
|
|
447
|
+
phases: {
|
|
448
|
+
claimed: {
|
|
449
|
+
summary: string;
|
|
450
|
+
status: string;
|
|
451
|
+
settlement: string;
|
|
452
|
+
result: string;
|
|
453
|
+
};
|
|
454
|
+
validation: ReceiptValidationResult;
|
|
455
|
+
settlement?: ExecutionSettlementLookup;
|
|
456
|
+
timelineEvents?: TimelineEvent[];
|
|
457
|
+
};
|
|
458
|
+
proofTier: ReceiptProofTier;
|
|
459
|
+
currentPhase: ReceiptVerificationPhase;
|
|
460
|
+
message: string;
|
|
461
|
+
}
|
|
462
|
+
/**
|
|
463
|
+
* Infers proof tier from receipt, validation, and optional settlement lookup.
|
|
464
|
+
*/
|
|
465
|
+
declare function inferProofTier(receipt: ExecutionReceipt, validation: ReceiptValidationResult, settlement?: ExecutionSettlementLookup): ReceiptProofTier;
|
|
466
|
+
/**
|
|
467
|
+
* Builds the receipt → verification teaching shape.
|
|
468
|
+
*/
|
|
469
|
+
declare function buildReceiptVerificationFlow(input: {
|
|
470
|
+
receipt: ExecutionReceipt;
|
|
471
|
+
validation?: ReceiptValidationResult;
|
|
472
|
+
settlement?: ExecutionSettlementLookup;
|
|
473
|
+
timelineEvents?: TimelineEvent[];
|
|
474
|
+
}): ReceiptVerificationFlow;
|
|
475
|
+
|
|
476
|
+
/**
|
|
477
|
+
* @fileoverview Portfolio watch while away — agent-in-host teaching flow (Update 6).
|
|
478
|
+
*/
|
|
479
|
+
|
|
480
|
+
type AgentHost = "cursor" | "claude" | "mcp";
|
|
481
|
+
type PortfolioWatchPhase = "watch_registered" | "while_away" | "return_briefing";
|
|
482
|
+
/** Default consumer brief for Update 6 demos. */
|
|
483
|
+
declare const DEFAULT_PORTFOLIO_WATCH_BRIEF = "Watch my portfolio while I'm away \u2014 keep about 20% in stable assets.";
|
|
484
|
+
interface PortfolioWatchFlow {
|
|
485
|
+
objectiveId: string;
|
|
486
|
+
userBrief: string;
|
|
487
|
+
host: AgentHost;
|
|
488
|
+
phases: {
|
|
489
|
+
register: {
|
|
490
|
+
objectiveName: string;
|
|
491
|
+
automationMode: string;
|
|
492
|
+
policySummary: string;
|
|
493
|
+
health: ObjectiveHealth;
|
|
494
|
+
allocationRow?: AllocationComparisonRow;
|
|
495
|
+
};
|
|
496
|
+
whileAway?: {
|
|
497
|
+
marketEventName: string;
|
|
498
|
+
symbol: string;
|
|
499
|
+
priceChangeRatio: number;
|
|
500
|
+
healthBefore: ObjectiveHealth;
|
|
501
|
+
healthAfter: ObjectiveHealth;
|
|
502
|
+
autoRestored: boolean;
|
|
503
|
+
receipt?: ExecutionReceipt;
|
|
504
|
+
};
|
|
505
|
+
briefing: {
|
|
506
|
+
health: ObjectiveHealth;
|
|
507
|
+
timelineEventCount: number;
|
|
508
|
+
timelineEvents: TimelineEvent[];
|
|
509
|
+
summaryLines: string[];
|
|
510
|
+
};
|
|
511
|
+
};
|
|
512
|
+
currentPhase: PortfolioWatchPhase;
|
|
513
|
+
message: string;
|
|
514
|
+
}
|
|
515
|
+
/**
|
|
516
|
+
* Infers portfolio-watch phase from register + optional while-away data.
|
|
517
|
+
*/
|
|
518
|
+
declare function inferPortfolioWatchPhase(input: {
|
|
519
|
+
registerHealth: ObjectiveHealth;
|
|
520
|
+
whileAway?: PortfolioWatchFlow["phases"]["whileAway"];
|
|
521
|
+
}): PortfolioWatchPhase;
|
|
522
|
+
/**
|
|
523
|
+
* Builds human-readable briefing lines for agent hosts (Cursor / Claude).
|
|
524
|
+
*/
|
|
525
|
+
declare function buildPortfolioWatchBriefingLines(input: {
|
|
526
|
+
userBrief: string;
|
|
527
|
+
host: AgentHost;
|
|
528
|
+
objective: Objective;
|
|
529
|
+
registerHealth: ObjectiveHealth;
|
|
530
|
+
briefingHealth: ObjectiveHealth;
|
|
531
|
+
whileAway?: PortfolioWatchFlow["phases"]["whileAway"];
|
|
532
|
+
timelineEvents: TimelineEvent[];
|
|
533
|
+
}): string[];
|
|
534
|
+
/**
|
|
535
|
+
* Builds the portfolio watch teaching shape for agent-in-host demos.
|
|
536
|
+
*/
|
|
537
|
+
declare function buildPortfolioWatchFlow(input: {
|
|
538
|
+
userBrief: string;
|
|
539
|
+
host: AgentHost;
|
|
540
|
+
objective: Objective;
|
|
541
|
+
registerHealth: ObjectiveHealth;
|
|
542
|
+
registerRow?: AllocationComparisonRow;
|
|
543
|
+
whileAway?: {
|
|
544
|
+
marketEvent: MarketEvent;
|
|
545
|
+
healthBefore: ObjectiveHealth;
|
|
546
|
+
healthAfter: ObjectiveHealth;
|
|
547
|
+
autoRestored: boolean;
|
|
548
|
+
receipt?: ExecutionReceipt;
|
|
549
|
+
};
|
|
550
|
+
briefingHealth: ObjectiveHealth;
|
|
551
|
+
timelineEvents: TimelineEvent[];
|
|
552
|
+
}): PortfolioWatchFlow;
|
|
553
|
+
/**
|
|
554
|
+
* Read-only portfolio watch snapshot from current objective state.
|
|
555
|
+
*/
|
|
556
|
+
declare function buildPortfolioWatchFlowFromSnapshot(input: {
|
|
557
|
+
userBrief: string;
|
|
558
|
+
host: AgentHost;
|
|
559
|
+
objective: Objective;
|
|
560
|
+
health: ObjectiveHealth;
|
|
561
|
+
allocationRow?: AllocationComparisonRow;
|
|
562
|
+
latestReceipt?: ExecutionReceipt;
|
|
563
|
+
timelineEvents: TimelineEvent[];
|
|
564
|
+
}): PortfolioWatchFlow;
|
|
565
|
+
|
|
566
|
+
/**
|
|
567
|
+
* @fileoverview Full AUREON loop teaching flow helpers.
|
|
568
|
+
*/
|
|
569
|
+
|
|
570
|
+
type FullAureonLoopPhase = "intent" | "plan_check" | "restored" | "verified";
|
|
571
|
+
/** Default brief for full-loop demos. */
|
|
572
|
+
declare const DEFAULT_FULL_LOOP_BRIEF = "Keep about 20% in stable assets \u2014 grow the book without abandoning the plan.";
|
|
573
|
+
interface FullAureonLoopFlow {
|
|
574
|
+
objectiveId: string;
|
|
575
|
+
userBrief: string;
|
|
576
|
+
phases: {
|
|
577
|
+
intent: {
|
|
578
|
+
objectiveName: string;
|
|
579
|
+
policySummary: string;
|
|
580
|
+
automationMode: string;
|
|
581
|
+
health: ObjectiveHealth;
|
|
582
|
+
};
|
|
583
|
+
planCheck: {
|
|
584
|
+
baselineAligned: boolean;
|
|
585
|
+
afterShock: {
|
|
586
|
+
health: ObjectiveHealth;
|
|
587
|
+
allocationRow?: AllocationComparisonRow;
|
|
588
|
+
paradox: PlanParadoxResult;
|
|
589
|
+
};
|
|
590
|
+
};
|
|
591
|
+
driftRestore: {
|
|
592
|
+
healthBefore: ObjectiveHealth;
|
|
593
|
+
healthAfter: ObjectiveHealth;
|
|
594
|
+
receipt: ExecutionReceipt;
|
|
595
|
+
settlement: string;
|
|
596
|
+
};
|
|
597
|
+
verification: ReceiptVerificationFlow;
|
|
598
|
+
};
|
|
599
|
+
currentPhase: FullAureonLoopPhase;
|
|
600
|
+
message: string;
|
|
601
|
+
}
|
|
602
|
+
/**
|
|
603
|
+
* Infers loop phase from which stages are present.
|
|
604
|
+
*/
|
|
605
|
+
declare function inferFullAureonLoopPhase(input: {
|
|
606
|
+
hasRestore: boolean;
|
|
607
|
+
verificationValid: boolean;
|
|
608
|
+
}): FullAureonLoopPhase;
|
|
609
|
+
/**
|
|
610
|
+
* Builds the full AUREON loop teaching shape.
|
|
611
|
+
*/
|
|
612
|
+
declare function buildFullAureonLoopFlow(input: {
|
|
613
|
+
userBrief: string;
|
|
614
|
+
objective: Objective;
|
|
615
|
+
baselineHealth: ObjectiveHealth;
|
|
616
|
+
afterShockHealth: ObjectiveHealth;
|
|
617
|
+
afterShockRow?: AllocationComparisonRow;
|
|
618
|
+
paradox: PlanParadoxResult;
|
|
619
|
+
restoredHealth: ObjectiveHealth;
|
|
620
|
+
receipt: ExecutionReceipt;
|
|
621
|
+
verification?: ReceiptVerificationFlow;
|
|
622
|
+
}): FullAureonLoopFlow;
|
|
623
|
+
/**
|
|
624
|
+
* Read-only full-loop snapshot from current objective state + latest receipt.
|
|
625
|
+
*/
|
|
626
|
+
declare function buildFullAureonLoopFlowFromSnapshot(input: {
|
|
627
|
+
userBrief: string;
|
|
628
|
+
objective: Objective;
|
|
629
|
+
health: ObjectiveHealth;
|
|
630
|
+
allocationRow?: AllocationComparisonRow;
|
|
631
|
+
paradox: PlanParadoxResult;
|
|
632
|
+
latestReceipt?: ExecutionReceipt;
|
|
633
|
+
verification?: ReceiptVerificationFlow;
|
|
634
|
+
}): FullAureonLoopFlow | null;
|
|
635
|
+
|
|
636
|
+
/**
|
|
637
|
+
* @fileoverview Financial audit trail — objective → registry → receipt → settlement.
|
|
638
|
+
*
|
|
639
|
+
* Joins what already exists. Never invents missing proof. Gaps stay labeled.
|
|
640
|
+
*/
|
|
641
|
+
|
|
642
|
+
type AuditTrailGapCode = "not_registered" | "no_executions" | "no_settlements" | "staged_only" | "vault_unverified" | "invalid_receipt" | "no_timeline" | "lookup_failed";
|
|
643
|
+
interface AuditTrailGap {
|
|
644
|
+
code: AuditTrailGapCode;
|
|
645
|
+
message: string;
|
|
646
|
+
}
|
|
647
|
+
interface AuditTrailReceiptRow {
|
|
648
|
+
id: string;
|
|
649
|
+
action: string;
|
|
650
|
+
settlement: "vault" | "staged";
|
|
651
|
+
status: string;
|
|
652
|
+
valid: boolean;
|
|
653
|
+
verifiedOnChain: boolean;
|
|
654
|
+
explorerUrl: string | null;
|
|
655
|
+
summary: string;
|
|
656
|
+
validation: ReceiptValidationResult;
|
|
657
|
+
}
|
|
658
|
+
interface FinancialAuditTrail {
|
|
659
|
+
objectiveId: string;
|
|
660
|
+
objectiveName: string;
|
|
661
|
+
policySummary: string;
|
|
662
|
+
healthState: string | null;
|
|
663
|
+
generatedAt: string;
|
|
664
|
+
registry: {
|
|
665
|
+
present: boolean;
|
|
666
|
+
record?: ObjectiveRegistryRecord;
|
|
667
|
+
};
|
|
668
|
+
receipts: AuditTrailReceiptRow[];
|
|
669
|
+
settlements: SettlementRecord[];
|
|
670
|
+
timeline: Array<{
|
|
671
|
+
id: string;
|
|
672
|
+
type: string;
|
|
673
|
+
message: string;
|
|
674
|
+
createdAt: string;
|
|
675
|
+
executionId: string | null;
|
|
676
|
+
}>;
|
|
677
|
+
gaps: AuditTrailGap[];
|
|
678
|
+
message: string;
|
|
679
|
+
}
|
|
680
|
+
declare function buildFinancialAuditTrail(input: {
|
|
681
|
+
objective: Objective;
|
|
682
|
+
health?: ObjectiveHealth;
|
|
683
|
+
registry?: ObjectiveRegistryLookup;
|
|
684
|
+
receipts: ExecutionReceipt[];
|
|
685
|
+
settlements: SettlementRecord[];
|
|
686
|
+
timeline: TimelineEvent[];
|
|
687
|
+
generatedAt?: string;
|
|
688
|
+
registryLookupFailed?: boolean;
|
|
689
|
+
settlementsLookupFailed?: boolean;
|
|
690
|
+
}): FinancialAuditTrail;
|
|
691
|
+
declare function formatAuditTrailLines(trail: FinancialAuditTrail): string[];
|
|
692
|
+
|
|
283
693
|
/**
|
|
284
694
|
* @fileoverview Portfolio snapshot types used by health evaluation and utility screens.
|
|
285
695
|
*/
|
|
@@ -312,6 +722,106 @@ interface PortfolioPositionInput {
|
|
|
312
722
|
markPriceUsd: number;
|
|
313
723
|
}
|
|
314
724
|
|
|
725
|
+
/**
|
|
726
|
+
* @fileoverview Financial intent → objective → portfolio flow helpers.
|
|
727
|
+
*/
|
|
728
|
+
|
|
729
|
+
interface FinancialIntent {
|
|
730
|
+
/** User or agent wording — what they want money to do. */
|
|
731
|
+
brief: string;
|
|
732
|
+
kind: ObjectiveKind;
|
|
733
|
+
targetWeight: number;
|
|
734
|
+
tolerance: number;
|
|
735
|
+
targetSymbol?: string;
|
|
736
|
+
name?: string;
|
|
737
|
+
priority?: ObjectivePriority;
|
|
738
|
+
}
|
|
739
|
+
interface ObjectivePortfolioFlow {
|
|
740
|
+
intent: {
|
|
741
|
+
brief: string;
|
|
742
|
+
policySummary: string;
|
|
743
|
+
};
|
|
744
|
+
objective: Objective;
|
|
745
|
+
health: ObjectiveHealth | null;
|
|
746
|
+
portfolio: {
|
|
747
|
+
totalNotionalUsd: number;
|
|
748
|
+
stableWeight: number;
|
|
749
|
+
positions: PortfolioPosition[];
|
|
750
|
+
};
|
|
751
|
+
message: string;
|
|
752
|
+
}
|
|
753
|
+
/**
|
|
754
|
+
* Maps agent-extracted intent into a create-objective payload.
|
|
755
|
+
*/
|
|
756
|
+
declare function resolveObjectiveFromIntent(intent: FinancialIntent): CreateObjectiveInput;
|
|
757
|
+
/**
|
|
758
|
+
* Builds the AI → objective → portfolio teaching shape after create + read.
|
|
759
|
+
*/
|
|
760
|
+
declare function buildObjectivePortfolioFlow(intent: FinancialIntent, objective: Objective, health: ObjectiveHealth | null, portfolio: PortfolioSnapshot): ObjectivePortfolioFlow;
|
|
761
|
+
/**
|
|
762
|
+
* Lightweight rule-based parser for demo scripts.
|
|
763
|
+
*/
|
|
764
|
+
declare function parseFinancialIntent(brief: string): FinancialIntent;
|
|
765
|
+
|
|
766
|
+
interface AureonLogger {
|
|
767
|
+
debug(message: string, context?: Record<string, unknown>): void;
|
|
768
|
+
info(message: string, context?: Record<string, unknown>): void;
|
|
769
|
+
warn(message: string, context?: Record<string, unknown>): void;
|
|
770
|
+
error(message: string, context?: Record<string, unknown>): void;
|
|
771
|
+
}
|
|
772
|
+
declare const silentLogger: AureonLogger;
|
|
773
|
+
declare function createConsoleLogger(prefix?: string): AureonLogger;
|
|
774
|
+
|
|
775
|
+
/**
|
|
776
|
+
* @fileoverview Client configuration types for AureonClient.
|
|
777
|
+
*/
|
|
778
|
+
|
|
779
|
+
interface AureonClientOptions {
|
|
780
|
+
/**
|
|
781
|
+
* Base URL of the AUREON API.
|
|
782
|
+
* Defaults to `https://api.aureonlabs.network`.
|
|
783
|
+
*/
|
|
784
|
+
baseUrl?: string;
|
|
785
|
+
/**
|
|
786
|
+
* Product API key sent as `X-Aureon-Api-Key` on every request.
|
|
787
|
+
* Operator-issued keys (from the Developers console) also identify the
|
|
788
|
+
* bound wallet for control-plane calls — no Bearer required.
|
|
789
|
+
* Env bootstrap keys unlock product access only; they do not set identity.
|
|
790
|
+
* The operator utility uses wallet Bearer only.
|
|
791
|
+
*/
|
|
792
|
+
apiKey?: string | null;
|
|
793
|
+
/**
|
|
794
|
+
* Called before each request to resolve the product API key.
|
|
795
|
+
* Prefer this for automations that load keys from env or a secret store.
|
|
796
|
+
*/
|
|
797
|
+
getApiKey?: () => string | null | undefined | Promise<string | null | undefined>;
|
|
798
|
+
/** Optional fetch implementation for non-browser runtimes. */
|
|
799
|
+
fetch?: typeof fetch;
|
|
800
|
+
/** Optional default headers merged into every request. */
|
|
801
|
+
headers?: Record<string, string>;
|
|
802
|
+
/** Request timeout in milliseconds. Defaults to 30000. */
|
|
803
|
+
timeoutMs?: number;
|
|
804
|
+
/**
|
|
805
|
+
* Static Bearer session token. Prefer `getAccessToken` for apps that refresh
|
|
806
|
+
* or clear sessions at runtime.
|
|
807
|
+
*/
|
|
808
|
+
authToken?: string | null;
|
|
809
|
+
/**
|
|
810
|
+
* Called before each request to resolve the current Bearer token.
|
|
811
|
+
* Return null/undefined to send the request without Authorization.
|
|
812
|
+
*/
|
|
813
|
+
getAccessToken?: () => string | null | undefined | Promise<string | null | undefined>;
|
|
814
|
+
/** Optional structured logger for request lifecycle diagnostics. */
|
|
815
|
+
logger?: AureonLogger;
|
|
816
|
+
/**
|
|
817
|
+
* Extra attempts after the first failure for retryable errors
|
|
818
|
+
* (network, timeout, 429, 5xx). Defaults to 0.
|
|
819
|
+
*/
|
|
820
|
+
maxRetries?: number;
|
|
821
|
+
/** Delay in ms between retries. Defaults to 250. */
|
|
822
|
+
retryDelayMs?: number;
|
|
823
|
+
}
|
|
824
|
+
|
|
315
825
|
/**
|
|
316
826
|
* @fileoverview Vault overview + prepare-tx contracts for AureonVault.
|
|
317
827
|
*
|
|
@@ -567,9 +1077,88 @@ declare class AureonClient {
|
|
|
567
1077
|
refreshWatchdog(): Promise<WatchdogRefreshResult>;
|
|
568
1078
|
/** Returns dashboard overview aggregates. Auth required. */
|
|
569
1079
|
getOverview(): Promise<DashboardOverview>;
|
|
1080
|
+
/**
|
|
1081
|
+
* Objective vs actual portfolio — joins objectives, health, and overview
|
|
1082
|
+
* into comparison rows plus a green-book/off-plan paradox flag.
|
|
1083
|
+
* Auth required.
|
|
1084
|
+
*/
|
|
1085
|
+
getAllocationVsTarget(): Promise<{
|
|
1086
|
+
rows: AllocationComparisonRow[];
|
|
1087
|
+
paradox: PlanParadoxResult;
|
|
1088
|
+
overview: DashboardOverview;
|
|
1089
|
+
}>;
|
|
1090
|
+
/**
|
|
1091
|
+
* Registers agent/user intent as an Automatic objective and returns the
|
|
1092
|
+
* AI → objective → portfolio flow snapshot.
|
|
1093
|
+
* Auth required.
|
|
1094
|
+
*/
|
|
1095
|
+
applyFinancialIntent(intent: FinancialIntent): Promise<ObjectivePortfolioFlow>;
|
|
1096
|
+
/**
|
|
1097
|
+
* Read-only AI → objective → portfolio flow for existing objectives.
|
|
1098
|
+
* Auth required.
|
|
1099
|
+
*/
|
|
1100
|
+
getObjectivePortfolioFlow(objectiveId?: string): Promise<ObjectivePortfolioFlow[]>;
|
|
1101
|
+
/**
|
|
1102
|
+
* Controlled drift → detection → restore demo
|
|
1103
|
+
* Seeds book, creates stable objective, applies NVDA rally with auto-restore
|
|
1104
|
+
* disabled, then runs manual restore and returns the three-beat flow.
|
|
1105
|
+
* Auth required.
|
|
1106
|
+
*/
|
|
1107
|
+
runDriftRestoreDemo(): Promise<DriftRestoreFlow>;
|
|
1108
|
+
/**
|
|
1109
|
+
* Read-only drift → detection → restore flow for active objectives.
|
|
1110
|
+
* Auth required.
|
|
1111
|
+
*/
|
|
1112
|
+
getDriftRestoreFlow(objectiveId?: string): Promise<DriftRestoreFlow[]>;
|
|
1113
|
+
private buildReceiptVerificationFlowForReceipt;
|
|
1114
|
+
/**
|
|
1115
|
+
* Controlled receipt → verification demo.
|
|
1116
|
+
* Runs drift-restore, then validates receipt and looks up settlement.
|
|
1117
|
+
* Auth required.
|
|
1118
|
+
*/
|
|
1119
|
+
runReceiptVerificationDemo(): Promise<ReceiptVerificationFlow>;
|
|
1120
|
+
/**
|
|
1121
|
+
* Read-only receipt → verification flow for execution receipts.
|
|
1122
|
+
* Auth required.
|
|
1123
|
+
*/
|
|
1124
|
+
getReceiptVerificationFlow(executionId?: string): Promise<ReceiptVerificationFlow[]>;
|
|
1125
|
+
/**
|
|
1126
|
+
* Controlled portfolio watch demo.
|
|
1127
|
+
* User brief → Automatic objective → market move while away → auto restore → return briefing.
|
|
1128
|
+
* Auth required.
|
|
1129
|
+
*/
|
|
1130
|
+
runPortfolioWatchDemo(input?: {
|
|
1131
|
+
brief?: string;
|
|
1132
|
+
host?: AgentHost;
|
|
1133
|
+
}): Promise<PortfolioWatchFlow>;
|
|
1134
|
+
/**
|
|
1135
|
+
* Read-only portfolio watch briefing for Automatic objectives.
|
|
1136
|
+
* Auth required.
|
|
1137
|
+
*/
|
|
1138
|
+
getPortfolioWatchFlow(input?: {
|
|
1139
|
+
objectiveId?: string;
|
|
1140
|
+
brief?: string;
|
|
1141
|
+
host?: AgentHost;
|
|
1142
|
+
}): Promise<PortfolioWatchFlow[]>;
|
|
1143
|
+
/**
|
|
1144
|
+
* Controlled full AUREON loop demo (Content Arc).
|
|
1145
|
+
* Intent → plan check (green vs plan with autoRestore false) → restore → receipt verification.
|
|
1146
|
+
* Auth required.
|
|
1147
|
+
*/
|
|
1148
|
+
runFullAureonLoopDemo(input?: {
|
|
1149
|
+
brief?: string;
|
|
1150
|
+
}): Promise<FullAureonLoopFlow>;
|
|
1151
|
+
/**
|
|
1152
|
+
* Read-only full AUREON loop for active objectives with a latest receipt.
|
|
1153
|
+
* Auth required.
|
|
1154
|
+
*/
|
|
1155
|
+
getFullAureonLoopFlow(input?: {
|
|
1156
|
+
objectiveId?: string;
|
|
1157
|
+
brief?: string;
|
|
1158
|
+
}): Promise<FullAureonLoopFlow[]>;
|
|
570
1159
|
/**
|
|
571
1160
|
* Applies a controlled market event to portfolio marks.
|
|
572
|
-
* When autoRestore is true, the API
|
|
1161
|
+
* When autoRestore is true, the API may run restore. Omit or false = drift only, no restore. Automatic still 409s if the vault cannot execute.
|
|
573
1162
|
* Auth required.
|
|
574
1163
|
*/
|
|
575
1164
|
applyMarketEvent(input: ApplyMarketEventInput): Promise<{
|
|
@@ -593,12 +1182,40 @@ declare class AureonClient {
|
|
|
593
1182
|
*/
|
|
594
1183
|
runExecution(objectiveId: string): Promise<ExecutionReceipt>;
|
|
595
1184
|
/**
|
|
596
|
-
* Runs
|
|
1185
|
+
* Runs restorative execution for an objective outside policy.
|
|
1186
|
+
* Receipt.settlement may be vault or staged. Only verifiedOnChain is proof.
|
|
597
1187
|
* Auth required.
|
|
598
1188
|
*/
|
|
599
1189
|
restoreObjective(objectiveId: string): Promise<ExecutionReceipt>;
|
|
600
1190
|
/** Lists recent execution receipts. Auth required. */
|
|
601
1191
|
listExecutions(objectiveId?: string): Promise<ExecutionReceipt[]>;
|
|
1192
|
+
/** Returns chain-verified settlement record for an execution when present. Auth required. */
|
|
1193
|
+
getExecutionSettlement(executionId: string): Promise<ExecutionSettlementLookup>;
|
|
1194
|
+
/** Lists chain-verified settlement records for the authenticated wallet. Auth required. */
|
|
1195
|
+
listSettlements(objectiveId?: string): Promise<SettlementRecord[]>;
|
|
1196
|
+
/**
|
|
1197
|
+
* Manual backfill: verify a vault tx on-chain and attach settlement proof.
|
|
1198
|
+
* Auth required.
|
|
1199
|
+
*/
|
|
1200
|
+
confirmExecutionSettlement(executionId: string, transactionHash: string): Promise<{
|
|
1201
|
+
settlement: SettlementRecord;
|
|
1202
|
+
}>;
|
|
1203
|
+
/** Returns Phase 2 ObjectiveRegistry deployment status. Auth required. */
|
|
1204
|
+
getRegistryStatus(): Promise<RegistryStatus>;
|
|
1205
|
+
/** Returns on-chain registry record for an objective when registered. Auth required. */
|
|
1206
|
+
getObjectiveRegistry(objectiveId: string): Promise<ObjectiveRegistryLookup>;
|
|
1207
|
+
/**
|
|
1208
|
+
* Prepares wallet-signed calldata to register an objective on ObjectiveRegistry.
|
|
1209
|
+
* Auth required.
|
|
1210
|
+
*/
|
|
1211
|
+
prepareObjectiveRegistry(objectiveId: string): Promise<PrepareRegistryResult>;
|
|
1212
|
+
/**
|
|
1213
|
+
* Confirms an on-chain registration after the wallet broadcast tx.
|
|
1214
|
+
* Auth required.
|
|
1215
|
+
*/
|
|
1216
|
+
confirmObjectiveRegistry(objectiveId: string, transactionHash: string): Promise<{
|
|
1217
|
+
record: ObjectiveRegistryRecord;
|
|
1218
|
+
}>;
|
|
602
1219
|
/** Returns the vault overview for the authenticated wallet. Auth required. */
|
|
603
1220
|
getVault(): Promise<VaultOverview>;
|
|
604
1221
|
/** Returns compact vault funding status before restore. Auth required. */
|
|
@@ -632,6 +1249,11 @@ declare class AureonClient {
|
|
|
632
1249
|
revokeApiKey(keyId: string): Promise<DeveloperApiKey>;
|
|
633
1250
|
/** Toggles the status (active/paused) of an SDK API key owned by this wallet. */
|
|
634
1251
|
toggleApiKey(keyId: string): Promise<DeveloperApiKey>;
|
|
1252
|
+
/**
|
|
1253
|
+
* Joins objective → registry → receipts → settlements → timeline.
|
|
1254
|
+
* Missing proof is labeled as a gap. Nothing is invented. Auth required.
|
|
1255
|
+
*/
|
|
1256
|
+
getAuditTrail(objectiveId: string): Promise<FinancialAuditTrail>;
|
|
635
1257
|
}
|
|
636
1258
|
|
|
637
1259
|
/**
|
|
@@ -756,7 +1378,7 @@ declare const DEFAULT_API_BASE_URL = "https://api.aureonlabs.network";
|
|
|
756
1378
|
/** Local monorepo preview only; not for public docs. */
|
|
757
1379
|
declare const LOCAL_API_BASE_URL = "http://127.0.0.1:8787";
|
|
758
1380
|
declare const DEFAULT_TIMEOUT_MS = 30000;
|
|
759
|
-
declare const SDK_VERSION = "0.1.
|
|
1381
|
+
declare const SDK_VERSION = "0.1.7";
|
|
760
1382
|
declare const SDK_NAME = "@buildaureon/sdk";
|
|
761
1383
|
declare const PRODUCT_NAME = "AUREON";
|
|
762
1384
|
declare const PRODUCT_TAGLINE = "Financial Compass for Robinhood Chain";
|
|
@@ -790,6 +1412,8 @@ declare const ENDPOINTS: {
|
|
|
790
1412
|
readonly authDevLogin: "/auth/dev-login";
|
|
791
1413
|
readonly authMe: "/auth/me";
|
|
792
1414
|
readonly developerApiKeys: "/developer/api-keys";
|
|
1415
|
+
readonly registryStatus: "/registry/status";
|
|
1416
|
+
readonly settlements: "/settlements";
|
|
793
1417
|
};
|
|
794
1418
|
|
|
795
1419
|
/**
|
|
@@ -798,4 +1422,4 @@ declare const ENDPOINTS: {
|
|
|
798
1422
|
type FetchLike = typeof fetch;
|
|
799
1423
|
declare function resolveFetch(custom?: FetchLike): FetchLike;
|
|
800
1424
|
|
|
801
|
-
export { API_KEY_HEADER, type ApplyMarketEventInput, AureonClient, type AureonClientOptions, AureonConflictError, AureonError, type AureonErrorCode, AureonNetworkError, AureonNotFoundError, AureonTimeoutError, AureonValidationError, type AuthMeResponse, type AuthNonceResponse, type AuthSessionResponse, type CreateObjectiveInput, type CreatedDeveloperApiKey, DEFAULT_API_BASE_URL, DEFAULT_TIMEOUT_MS, type DashboardOverview, type DeveloperApiKey, ENDPOINTS, type ExecutionReceipt, type HealthState, LOCAL_API_BASE_URL, type MarkQuote, type MarkQuoteSource, type MarketEvent, type MarketPreset, OBJECTIVE_KINDS, OBJECTIVE_PRIORITIES, type Objective, type ObjectiveAutomationMode, type ObjectiveHealth, type ObjectiveKind, type ObjectivePolicy, type ObjectivePriority, type ObjectiveStatus, PRODUCT_NAME, PRODUCT_TAGLINE, type PortfolioPosition, type PortfolioPositionInput, type PortfolioSnapshot, type RestorePlan, type RestorePlanKind, type RestoreSuggestion, type RestoreSuggestionAction, SDK_NAME, SDK_VERSION, type SessionTokenProvider, type SyncPortfolioResult, TIMELINE_EVENT_TYPES, type TimelineEvent, type TimelineEventType, type UpdateObjectiveInput, type VaultBalance, type VaultDepositSymbol, type VaultOverview, type VaultPrepareResult, type VaultPreparedStep, type VaultStatus, type VaultToken, type VaultWithdrawSymbol, type WatchdogAlertResult, type WatchdogRefreshResult, assertBaseUrl, buildPolicySummary, createAureonClient, createConsoleLogger, createLocalAureonClient, createSessionTokenProvider, errorFromHttpStatus, formatIsoTime, formatSignedPercent, formatUsd, formatWeight, healthTone, isAureonError, isHealthState, isObjectiveKind, isObjectivePriority, isTimelineEventType, isVaultSettlement, joinUrl, normalizeCreateObjectiveInput, normalizeUpdateObjectiveInput, pickWorstHealth, requestJson, resolveFetch, silentLogger, withQuery };
|
|
1425
|
+
export { API_KEY_HEADER, type AgentHost, type AllocationComparisonRow, type ApplyMarketEventInput, type AuditTrailGap, type AuditTrailGapCode, type AuditTrailReceiptRow, AureonClient, type AureonClientOptions, AureonConflictError, AureonError, type AureonErrorCode, AureonNetworkError, AureonNotFoundError, AureonTimeoutError, AureonValidationError, type AuthMeResponse, type AuthNonceResponse, type AuthSessionResponse, type CreateObjectiveInput, type CreatedDeveloperApiKey, DEFAULT_API_BASE_URL, DEFAULT_FULL_LOOP_BRIEF, DEFAULT_PORTFOLIO_WATCH_BRIEF, DEFAULT_TIMEOUT_MS, type DashboardOverview, type DeveloperApiKey, type DriftRestoreFlow, type DriftRestorePhase, ENDPOINTS, type ExecutionReceipt, type ExecutionSettlementLookup, type FinancialAuditTrail, type FinancialIntent, type FullAureonLoopFlow, type FullAureonLoopPhase, type HealthState, LOCAL_API_BASE_URL, type MarkQuote, type MarkQuoteSource, type MarketEvent, type MarketPreset, OBJECTIVE_KINDS, OBJECTIVE_PRIORITIES, type Objective, type ObjectiveAutomationMode, type ObjectiveHealth, type ObjectiveKind, type ObjectivePolicy, type ObjectivePortfolioFlow, type ObjectivePriority, type ObjectiveRegistryLookup, type ObjectiveRegistryRecord, type ObjectiveStatus, PRODUCT_NAME, PRODUCT_TAGLINE, type PlanParadoxResult, type PortfolioPosition, type PortfolioPositionInput, type PortfolioSnapshot, type PortfolioWatchFlow, type PortfolioWatchPhase, type PrepareRegistryResult, type ReceiptProofTier, type ReceiptValidationCode, type ReceiptValidationIssue, type ReceiptValidationResult, type ReceiptVerificationFlow, type ReceiptVerificationPhase, type RegistryRef, type RegistryStatus, type RestorePlan, type RestorePlanKind, type RestoreSuggestion, type RestoreSuggestionAction, SDK_NAME, SDK_VERSION, type SessionTokenProvider, type SettlementRecord, type SettlementStatus, type SyncPortfolioResult, TIMELINE_EVENT_TYPES, type TimelineEvent, type TimelineEventType, type UpdateObjectiveInput, type VaultBalance, type VaultDepositSymbol, type VaultOverview, type VaultPrepareResult, type VaultPreparedStep, type VaultStatus, type VaultToken, type VaultWithdrawSymbol, type WatchdogAlertResult, type WatchdogRefreshResult, assertBaseUrl, assertValidExecutionReceipt, buildAllocationComparison, buildDriftRestoreFlow, buildDriftRestoreFlowFromSnapshot, buildFinancialAuditTrail, buildFullAureonLoopFlow, buildFullAureonLoopFlowFromSnapshot, buildObjectivePortfolioFlow, buildPolicySummary, buildPortfolioWatchBriefingLines, buildPortfolioWatchFlow, buildPortfolioWatchFlowFromSnapshot, buildReceiptVerificationFlow, createAureonClient, createConsoleLogger, createLocalAureonClient, createSessionTokenProvider, detectPlanParadox, errorFromHttpStatus, findTimelineEventsForReceipt, formatAuditTrailLines, formatIsoTime, formatReceiptSummary, formatSettlementSummary, formatSignedPercent, formatUsd, formatWeight, healthTone, inferDriftPhase, inferFullAureonLoopPhase, inferPortfolioWatchPhase, inferProofTier, isAureonError, isChainVerifiedReceipt, isHealthState, isObjectiveKind, isObjectivePriority, isTimelineEventType, isValidExecutionReceipt, isVaultSettlement, joinUrl, normalizeCreateObjectiveInput, normalizeUpdateObjectiveInput, parseFinancialIntent, pickWorstHealth, requestJson, resolveFetch, resolveObjectiveFromIntent, silentLogger, validateExecutionReceipt, validateSettlementRecord, withQuery };
|