The finance developer workbenchSearch the reference Development · 0.1.4 · unpublished

Public API / @insiderfinance/totalfinance

@insiderfinance/totalfinance/workflows

import from '@insiderfinance/totalfinance/workflows'

Every public export in this entry point, including type-only declarations. Search by name or concept.

Jump to an export (88)

ArtifactStore · ArtifactStorePutInput · ArtifactStoreReader · AuthorizationStore · DEFAULT_CAPABILITIES · EXECUTION_JOURNAL_STORE_CEILING · ExecutionJournalStore · GrantConsumption · HANDLE_KINDS · JOB_STATES · JobRecord · JobState · JobStore · KNOWN_CAPABILITIES · MAX_ROWS · OPERATION_BUDGETS · OPERATION_ID · OperationAnnotations · OperationAuthorization · OperationContext · OperationCostClass · OperationDescription · OperationError · OperationIdempotency · OperationOutput · OperationPack · OperationRegistry · OperationResult · OperationResultSchemaInput · OperationSideEffect · OperationSignal · RESOURCE_HANDLE_SCHEMA · ResourceHandle · ResourceHandleKind · RunOperationInput · RunOperationOptions · TotalFinanceOperation · WORKFLOWS_VERSION · analysisOperations · applyJobPatch · artifactPack · backtestPack · calendarPack · capRows · createMemoryArtifactStore · createMemoryAuthorizationStore · createMemoryExecutionJournalStore · createMemoryJobStore · createOperationRegistry · cryptoPack · defaultOperations · defaultPacks · defineOperation · describeOperation · extendObjectSchema · fixedIncomePack · handleUriOf · journeyOperations · journeyPacks · jsonSafe · missingCapabilities · operationAnnotations · operationResultSchema · optionsPack · parseHandleUri · performancePack · portfolioPack · requireArtifactListFilter · requireArtifactPut · requireAuthorizationPut · requireCapabilities · requireJobRecord · requireJournalAppend · requireJournalId · requireOperation · requireResourceHandle · researchPack · riskPack · runOperation · scenarioPack · spilledResultSchema · strategyPack · structurePack · technicalAnalysisPack · toOperationError · tradePack · valuationPack · volatilityPack

interface

ArtifactStore

A writable store: `put` is idempotent by content (the same value yields the same handle).

/** A writable store: `put` is idempotent by content (the same value yields the same handle). */
export interface ArtifactStore extends ArtifactStoreReader {
    put(input: ArtifactStorePutInput): ResourceHandle;
}
Fields, parameters & returned members (22)
Name / typeMeaning & unitOptional / default
get
(uri: string) => { handle: ResourceHandle; value: Record<string, unknown>; } | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
get().return.handle
ResourceHandle

unitless by name
Required / declared member
No @default declared; consult the signature and description.
get().return.value
Record<string, unknown>

unitless by name
Required / declared member
No @default declared; consult the signature and description.
get(uri)
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
list
(filter?: { kind?: ResourceHandleKind; }) => ResourceHandle[]

unitless by name
Required / declared member
No @default declared; consult the signature and description.
list(filter)
{ kind?: ResourceHandleKind; } | undefined

unitless by name
Optional
No @default declared; consult the signature and description.
list(filter).kind
ResourceHandleKind

unitless by name
Optional
No @default declared; consult the signature and description.
put
(input: ArtifactStorePutInput) => ResourceHandle

unitless by name
Required / declared member
No @default declared; consult the signature and description.
put().return.contentHash
string | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
put().return.createdTimestampMs
number
When the store minted the handle — the caller's clock in epoch ms, never the library's.
epoch milliseconds (UTC instant)
Required / declared member
No @default declared; consult the signature and description.
put().return.expiresTimestampMs
number | null
When the stored value stops being served, epoch ms; null = never.
epoch milliseconds (UTC instant)
Required / declared member
No @default declared; consult the signature and description.
put().return.kind
ResourceHandleKind

unitless by name
Required / declared member
No @default declared; consult the signature and description.
put().return.provenance
Provenance
Caller-supplied provenance, preserved verbatim.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
put().return.schema
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
put().return.uri
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
put().return.version
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
put(input)
ArtifactStorePutInput

unitless by name
Required / declared member
No @default declared; consult the signature and description.
put(input).createdTimestampMs
number
Epoch ms — the caller's clock, never read by the library.
epoch milliseconds (UTC instant)
Required / declared member
No @default declared; consult the signature and description.
put(input).expiresTimestampMs
number
Epoch ms; must be after `createdTimestampMs`.
epoch milliseconds (UTC instant)
Optional
No @default declared; consult the signature and description.
put(input).kind
'market' | 'portfolio' | 'report' | 'scenario' | 'authorization' | 'journal'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
put(input).provenance
Provenance

unitless by name
Optional
No @default declared; consult the signature and description.
put(input).value
Record<string, unknown>
The stored data — an envelope or an operation's structured result; JSON-safe by construction.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
Stability, warnings & conventions
preview (pre-1.0)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

interface

ArtifactStorePutInput

Public declaration. Read the signature and parameter/member contracts below; no additional behavior is inferred.

// ── artifact stores ───────────────────────────────────────────────────────────────────────────
export interface ArtifactStorePutInput {
    /** The stored data — an envelope or an operation's structured result; JSON-safe by construction. */
    value: Record<string, unknown>;
    kind: Exclude<ResourceHandleKind, 'job'>;
    /** Epoch ms — the caller's clock, never read by the library. */
    createdTimestampMs: EpochMs;
    /** Epoch ms; must be after `createdTimestampMs`. */
    expiresTimestampMs?: EpochMs;
    provenance?: Provenance;
}
Fields, parameters & returned members (12)
Name / typeMeaning & unitOptional / default
createdTimestampMs
number
Epoch ms — the caller's clock, never read by the library.
epoch milliseconds (UTC instant)
Required / declared member
No @default declared; consult the signature and description.
expiresTimestampMs
number
Epoch ms; must be after `createdTimestampMs`.
epoch milliseconds (UTC instant)
Optional
No @default declared; consult the signature and description.
kind
'market' | 'portfolio' | 'report' | 'scenario' | 'authorization' | 'journal'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
provenance
Provenance

unitless by name
Optional
No @default declared; consult the signature and description.
provenance.asOf
number

an instant: epoch milliseconds or a YYYY-MM-DD / zoned ISO string (the resolveAsOf convention)
Optional
No @default declared; consult the signature and description.
provenance.dataset
string

unitless by name
Optional
No @default declared; consult the signature and description.
provenance.provider
string

unitless by name
Optional
No @default declared; consult the signature and description.
provenance.receivedAt
number

unitless by name
Optional
No @default declared; consult the signature and description.
provenance.requestId
string

unitless by name
Optional
No @default declared; consult the signature and description.
provenance.sourceVersion
string

unitless by name
Optional
No @default declared; consult the signature and description.
provenance.warnings
import('@insiderfinance/totalfinance/core').QuantWarning[]

unitless by name
Optional
No @default declared; consult the signature and description.
value
Record<string, unknown>
The stored data — an envelope or an operation's structured result; JSON-safe by construction.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
Stability, warnings & conventions
preview (pre-1.0)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

interface

ArtifactStoreReader

Read access to the handles an input may reference (Decision 5); `null` when no store was supplied.

/** Read access to the handles an input may reference (Decision 5); `null` when no store was supplied. */
export interface ArtifactStoreReader {
    get(uri: string): {
        handle: ResourceHandle;
        value: Record<string, unknown>;
    } | null;
    list(filter?: {
        kind?: ResourceHandleKind;
    }): ResourceHandle[];
}
Fields, parameters & returned members (7)
Name / typeMeaning & unitOptional / default
get
(uri: string) => { handle: ResourceHandle; value: Record<string, unknown>; } | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
get().return.handle
ResourceHandle

unitless by name
Required / declared member
No @default declared; consult the signature and description.
get().return.value
Record<string, unknown>

unitless by name
Required / declared member
No @default declared; consult the signature and description.
get(uri)
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
list
(filter?: { kind?: ResourceHandleKind; }) => ResourceHandle[]

unitless by name
Required / declared member
No @default declared; consult the signature and description.
list(filter)
{ kind?: ResourceHandleKind; } | undefined

unitless by name
Optional
No @default declared; consult the signature and description.
list(filter).kind
ResourceHandleKind

unitless by name
Optional
No @default declared; consult the signature and description.
Stability, warnings & conventions
preview (pre-1.0)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

interface

AuthorizationStore

Public declaration. Read the signature and parameter/member contracts below; no additional behavior is inferred.

export interface AuthorizationStore {
    /** Store a grant under its content hash; idempotent (the first put stands). Returns its handle. */
    put(input: {
        grant: AuthorizationGrant;
        createdTimestampMs: EpochMs;
    }): ResourceHandle;
    /** The grant by content hash (or handle uri) with its consumption (null while unconsumed), or null. */
    get(hashOrUri: string): {
        handle: ResourceHandle;
        grant: AuthorizationGrant;
        consumed: GrantConsumption | null;
    } | null;
    /**
     * Atomically claim the grant with its validated write-ahead batch before journal commit.
     * Idempotent only for the same store, receipt, key and batch; all other claims refuse.
     */
    consume(input: GrantConsumption & {
        hashOrUri: string;
    }): GrantConsumption;
    list(): ResourceHandle[];
}
Fields, parameters & returned members (39)
Name / typeMeaning & unitOptional / default
consume
(input: GrantConsumption & { hashOrUri: string; }) => GrantConsumption
Atomically claim the grant with its validated write-ahead batch before journal commit. Idempotent only for the same store, receipt, key and batch; all other claims refuse.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
consume().return.consumedTimestampMs
number

epoch milliseconds (UTC instant)
Required / declared member
No @default declared; consult the signature and description.
consume().return.idempotencyKey
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
consume().return.journalEvents
readonly ExecutionJournalEvent[]
Write-ahead event batch: recovery replays these exact facts, never the fill engine.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
consume().return.journalId
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
consume().return.journalStoreId
string
Opaque identity of the authoritative store, retained across file-store restarts.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
consume().return.receiptId
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
consume(input)
GrantConsumption & { hashOrUri: string; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
consume(input).consumedTimestampMs
number

epoch milliseconds (UTC instant)
Required / declared member
No @default declared; consult the signature and description.
consume(input).hashOrUri
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
consume(input).idempotencyKey
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
consume(input).journalEvents
readonly ExecutionJournalEvent[]
Write-ahead event batch: recovery replays these exact facts, never the fill engine.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
consume(input).journalId
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
consume(input).journalStoreId
string
Opaque identity of the authoritative store, retained across file-store restarts.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
consume(input).receiptId
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
get
(hashOrUri: string) => { handle: ResourceHandle; grant: AuthorizationGrant; consumed: GrantConsumption | null; } | null
The grant by content hash (or handle uri) with its consumption (null while unconsumed), or null.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
get().return.consumed
GrantConsumption | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
get().return.consumed.consumedTimestampMs
number

epoch milliseconds (UTC instant)
Required / declared member
No @default declared; consult the signature and description.
get().return.consumed.idempotencyKey
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
get().return.consumed.journalEvents
readonly ExecutionJournalEvent[]
Write-ahead event batch: recovery replays these exact facts, never the fill engine.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
get().return.consumed.journalId
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
get().return.consumed.journalStoreId
string
Opaque identity of the authoritative store, retained across file-store restarts.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
get().return.consumed.receiptId
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
get().return.grant
AuthorizationGrant

unitless by name
Required / declared member
No @default declared; consult the signature and description.
get().return.handle
ResourceHandle

unitless by name
Required / declared member
No @default declared; consult the signature and description.
get(hashOrUri)
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
list
() => ResourceHandle[]

unitless by name
Required / declared member
No @default declared; consult the signature and description.
put
(input: { grant: AuthorizationGrant; createdTimestampMs: EpochMs; }) => ResourceHandle
Store a grant under its content hash; idempotent (the first put stands). Returns its handle.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
put().return.contentHash
string | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
put().return.createdTimestampMs
number
When the store minted the handle — the caller's clock in epoch ms, never the library's.
epoch milliseconds (UTC instant)
Required / declared member
No @default declared; consult the signature and description.
put().return.expiresTimestampMs
number | null
When the stored value stops being served, epoch ms; null = never.
epoch milliseconds (UTC instant)
Required / declared member
No @default declared; consult the signature and description.
put().return.kind
import('@insiderfinance/totalfinance/workflows').ResourceHandleKind

unitless by name
Required / declared member
No @default declared; consult the signature and description.
put().return.provenance
import('@insiderfinance/totalfinance/core').Provenance
Caller-supplied provenance, preserved verbatim.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
put().return.schema
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
put().return.uri
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
put().return.version
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
put(input)
{ createdTimestampMs: EpochMs; grant: AuthorizationGrant; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
put(input).createdTimestampMs
number

epoch milliseconds (UTC instant)
Required / declared member
No @default declared; consult the signature and description.
put(input).grant
AuthorizationGrant

unitless by name
Required / declared member
No @default declared; consult the signature and description.
Stability, warnings & conventions
preview (pre-1.0)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

value

DEFAULT_CAPABILITIES

What a caller holds when it names nothing: read, analyze, propose.

export declare const DEFAULT_CAPABILITIES: readonly string[];
Stability, warnings & conventions
preview (pre-1.0)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

value

EXECUTION_JOURNAL_STORE_CEILING

A journal read folds at most this many events; the store refuses to grow a journal beyond it.

export declare const EXECUTION_JOURNAL_STORE_CEILING: 100000;
Stability, warnings & conventions
preview (pre-1.0)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

interface

ExecutionJournalStore

Public declaration. Read the signature and parameter/member contracts below; no additional behavior is inferred.

export interface ExecutionJournalStore {
    /** Stable opaque storage identity. Fresh stores differ; reopening a file store retains it. */
    readonly storeId: string;
    /**
     * Serialize restoration, idempotency checks, identity allocation and commit for one journal.
     * `execute` is synchronous and receives a detached snapshot. Its events are a newly appended
     * batch (possibly empty), committed before result is returned. Exceptions commit nothing.
     * Do not nest transactions/append on the same journal; read does not acquire another lock.
     */
    transact<T>(input: {
        journalId: string;
        execute: (prior: readonly ExecutionJournalEvent[]) => {
            events: readonly ExecutionJournalEvent[];
            result: T;
        };
    }): T;
    /** Append atomically; identical eventId/body retries are skipped, conflicting bodies refused. */
    append(input: {
        events: readonly ExecutionJournalEvent[];
    }): {
        journalId: string;
        appended: number;
        skipped: number;
        total: number;
    };
    /** Every event of a journal in append order (empty for an unknown journal). */
    read(journalId: string): ExecutionJournalEvent[];
    /** Every journal id, sorted. */
    list(): string[];
}
Fields, parameters & returned members (15)
Name / typeMeaning & unitOptional / default
append
(input: { events: readonly ExecutionJournalEvent[]; }) => { journalId: string; appended: number; skipped: number; total: number; }
Append atomically; identical eventId/body retries are skipped, conflicting bodies refused.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
append().return.appended
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
append().return.journalId
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
append().return.skipped
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
append().return.total
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
append(input)
{ events: readonly ExecutionJournalEvent[]; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
append(input).events
readonly ExecutionJournalEvent[]

unitless by name
Required / declared member
No @default declared; consult the signature and description.
list
() => string[]
Every journal id, sorted.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
read
(journalId: string) => ExecutionJournalEvent[]
Every event of a journal in append order (empty for an unknown journal).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
read(journalId)
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
storeId
string
Stable opaque storage identity. Fresh stores differ; reopening a file store retains it.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
transact
<T>(input: { journalId: string; execute: (prior: readonly ExecutionJournalEvent[]) => { events: readonly ExecutionJournalEvent[]; result: T; }; }) => T
Serialize restoration, idempotency checks, identity allocation and commit for one journal. `execute` is synchronous and receives a detached snapshot. Its events are a newly appended batch (possibly empty), committed before result is returned. Exceptions commit nothing. Do not nest transactions/append on the same journal; read does not acquire another lock.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
transact(input)
{ execute: (prior: readonly ExecutionJournalEvent[]) => { events: readonly ExecutionJournalEvent[]; result: T; }; journalId: string; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
transact(input).execute
(prior: readonly ExecutionJournalEvent[]) => { events: readonly ExecutionJournalEvent[]; result: T; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
transact(input).journalId
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
Stability, warnings & conventions
preview (pre-1.0)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

interface

GrantConsumption

The one submission a grant licensed, durably prepared before its journal commit.

/** The one submission a grant licensed, durably prepared before its journal commit. */
export interface GrantConsumption {
    /** Opaque identity of the authoritative store, retained across file-store restarts. */
    journalStoreId: string;
    journalId: string;
    receiptId: string;
    idempotencyKey: string;
    consumedTimestampMs: EpochMs;
    /** Write-ahead event batch: recovery replays these exact facts, never the fill engine. */
    journalEvents: readonly ExecutionJournalEvent[];
}
Fields, parameters & returned members (6)
Name / typeMeaning & unitOptional / default
consumedTimestampMs
number

epoch milliseconds (UTC instant)
Required / declared member
No @default declared; consult the signature and description.
idempotencyKey
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
journalEvents
readonly ExecutionJournalEvent[]
Write-ahead event batch: recovery replays these exact facts, never the fill engine.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
journalId
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
journalStoreId
string
Opaque identity of the authoritative store, retained across file-store restarts.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
receiptId
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
Stability, warnings & conventions
preview (pre-1.0)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

value

HANDLE_KINDS

The handle kinds, their uri namespaces, and the envelope kind a stored value of that kind carries.

export declare const HANDLE_KINDS: Readonly<{ readonly report: Readonly<{ namespace: 'reports'; envelopeKind: null; }>; readonly job: Readonly<{ namespace: 'jobs'; envelopeKind: null; }>; readonly portfolio: Readonly<{ namespace: 'portfolios'; envelopeKind: 'totalfinance.portfolio-ledger'; }>; readonly scenario: Readonly<{ namespace: 'scenarios'; envelopeKind: 'totalfinance.scenario-set'; }>; readonly market: Readonly<{ namespace: 'markets'; envelopeKind: 'totalfinance.market-snapshot'; }>; readonly authorization: Readonly<{ namespace: 'authorizations'; envelopeKind: 'totalfinance.authorization-grant'; }>; readonly journal: Readonly<{ namespace: 'journals'; envelopeKind: null; }>; }>;
Fields, parameters & returned members (21)
Name / typeMeaning & unitOptional / default
authorization
Readonly<{ namespace: 'authorizations'; envelopeKind: 'totalfinance.authorization-grant'; }>

unitless by name
Required / declared member
No @default declared; consult the signature and description.
authorization.envelopeKind
'totalfinance.authorization-grant'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
authorization.namespace
'authorizations'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
job
Readonly<{ namespace: 'jobs'; envelopeKind: null; }>

unitless by name
Required / declared member
No @default declared; consult the signature and description.
job.envelopeKind
null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
job.namespace
'jobs'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
journal
Readonly<{ namespace: 'journals'; envelopeKind: null; }>

unitless by name
Required / declared member
No @default declared; consult the signature and description.
journal.envelopeKind
null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
journal.namespace
'journals'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
market
Readonly<{ namespace: 'markets'; envelopeKind: 'totalfinance.market-snapshot'; }>

unitless by name
Required / declared member
No @default declared; consult the signature and description.
market.envelopeKind
'totalfinance.market-snapshot'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
market.namespace
'markets'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
portfolio
Readonly<{ namespace: 'portfolios'; envelopeKind: 'totalfinance.portfolio-ledger'; }>

unitless by name
Required / declared member
No @default declared; consult the signature and description.
portfolio.envelopeKind
'totalfinance.portfolio-ledger'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
portfolio.namespace
'portfolios'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report
Readonly<{ namespace: 'reports'; envelopeKind: null; }>

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.envelopeKind
null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.namespace
'reports'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
scenario
Readonly<{ namespace: 'scenarios'; envelopeKind: 'totalfinance.scenario-set'; }>

unitless by name
Required / declared member
No @default declared; consult the signature and description.
scenario.envelopeKind
'totalfinance.scenario-set'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
scenario.namespace
'scenarios'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
Stability, warnings & conventions
preview (pre-1.0)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

value

JOB_STATES

Public declaration. Read the signature and parameter/member contracts below; no additional behavior is inferred.

export declare const JOB_STATES: readonly JobState[];
Stability, warnings & conventions
preview (pre-1.0)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

interface

JobRecord

Public declaration. Read the signature and parameter/member contracts below; no additional behavior is inferred.

export interface JobRecord {
    id: string;
    operation: {
        id: string;
        version: string;
    };
    state: JobState;
    progress: {
        stage: string;
        fraction: number | null;
    } | null;
    inputsHash: string;
    seed: number | null;
    submittedAt: string;
    startedAt: string | null;
    finishedAt: string | null;
    result: ResourceHandle | null;
    error: OperationError | null;
    usage: {
        elapsedMs: number | null;
    };
}
Fields, parameters & returned members (39)
Name / typeMeaning & unitOptional / default
error
OperationError | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
error.code
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
error.context
Record<string, unknown>

unitless by name
Required / declared member
No @default declared; consult the signature and description.
error.issues
import('@insiderfinance/totalfinance/core/schema').SchemaIssue[]

unitless by name
Optional
No @default declared; consult the signature and description.
error.message
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
error.operation
{ id: string; version: string; } | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
error.operation.id
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
error.operation.version
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
finishedAt
string | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
id
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
inputsHash
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
operation
{ id: string; version: string; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
operation.id
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
operation.version
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
progress
{ fraction: number | null; stage: string; } | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
progress.fraction
number | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
progress.stage
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
result
ResourceHandle | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
result.contentHash
string | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
result.createdTimestampMs
number
When the store minted the handle — the caller's clock in epoch ms, never the library's.
epoch milliseconds (UTC instant)
Required / declared member
No @default declared; consult the signature and description.
result.expiresTimestampMs
number | null
When the stored value stops being served, epoch ms; null = never.
epoch milliseconds (UTC instant)
Required / declared member
No @default declared; consult the signature and description.
result.kind
ResourceHandleKind

unitless by name
Required / declared member
No @default declared; consult the signature and description.
result.provenance
Provenance
Caller-supplied provenance, preserved verbatim.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
result.provenance.asOf
number

an instant: epoch milliseconds or a YYYY-MM-DD / zoned ISO string (the resolveAsOf convention)
Optional
No @default declared; consult the signature and description.
result.provenance.dataset
string

unitless by name
Optional
No @default declared; consult the signature and description.
result.provenance.provider
string

unitless by name
Optional
No @default declared; consult the signature and description.
result.provenance.receivedAt
number

unitless by name
Optional
No @default declared; consult the signature and description.
result.provenance.requestId
string

unitless by name
Optional
No @default declared; consult the signature and description.
result.provenance.sourceVersion
string

unitless by name
Optional
No @default declared; consult the signature and description.
result.provenance.warnings
import('@insiderfinance/totalfinance/core').QuantWarning[]

unitless by name
Optional
No @default declared; consult the signature and description.
result.schema
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
result.uri
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
result.version
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
seed
number | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
startedAt
string | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
state
JobState

unitless by name
Required / declared member
No @default declared; consult the signature and description.
submittedAt
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
usage
{ elapsedMs: number | null; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
usage.elapsedMs
number | null

milliseconds
Required / declared member
No @default declared; consult the signature and description.
Stability, warnings & conventions
preview (pre-1.0)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

type

JobState

Public declaration. Read the signature and parameter/member contracts below; no additional behavior is inferred.

// ── job stores ────────────────────────────────────────────────────────────────────────────────
export type JobState = 'accepted' | 'queued' | 'running' | 'completed' | 'failed' | 'cancelled';
Stability, warnings & conventions
preview (pre-1.0)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

interface

JobStore

Public declaration. Read the signature and parameter/member contracts below; no additional behavior is inferred.

export interface JobStore {
    create(record: JobRecord): JobRecord;
    update(id: string, patch: Partial<Omit<JobRecord, 'id'>>): JobRecord;
    get(id: string): JobRecord | null;
    list(): JobRecord[];
}
Fields, parameters & returned members (167)

This large namespace is split into complete field pages. No fields are omitted.

Stability, warnings & conventions
preview (pre-1.0)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

value

KNOWN_CAPABILITIES

The capabilities this stage names; a runtime may grant others (the registry does not enumerate them).

export declare const KNOWN_CAPABILITIES: readonly string[];
Stability, warnings & conventions
preview (pre-1.0)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

value

MAX_ROWS

Public declaration. Read the signature and parameter/member contracts below; no additional behavior is inferred.

export declare const MAX_ROWS: 5000;
Stability, warnings & conventions
preview (pre-1.0)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

value

OPERATION_BUDGETS

Public declaration. Read the signature and parameter/member contracts below; no additional behavior is inferred.

export declare const OPERATION_BUDGETS: Readonly<{ maxInputBytes: Readonly<{ transportDefault: 65536; maximum: 16777216; }>; inlineResultBytes: Readonly<{ default: 262144; maximum: 16777216; }>; }>;
Fields, parameters & returned members (6)
Name / typeMeaning & unitOptional / default
inlineResultBytes
Readonly<{ default: 262144; maximum: 16777216; }>
Canonical bytes of a structured result above which, when a WRITABLE artifact store is supplied, the result is stored and the response carries its handle with a bounded preview — never a silent truncation (Decision 5).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
inlineResultBytes.default
262144

unitless by name
Required / declared member
No @default declared; consult the signature and description.
inlineResultBytes.maximum
16777216

unitless by name
Required / declared member
No @default declared; consult the signature and description.
maxInputBytes
Readonly<{ transportDefault: 65536; maximum: 16777216; }>
Serialized input bytes a call may carry (UTF-8, measured on the raw request). A WIRE budget: a transport always passes one (the MCP server's default is 64 KiB); an in-process run that omits it is bounded by the operation's own row caps instead.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
maxInputBytes.maximum
16777216

unitless by name
Required / declared member
No @default declared; consult the signature and description.
maxInputBytes.transportDefault
65536

unitless by name
Required / declared member
No @default declared; consult the signature and description.
Stability, warnings & conventions
preview (pre-1.0)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

value

OPERATION_ID

Public declaration. Read the signature and parameter/member contracts below; no additional behavior is inferred.

export declare const OPERATION_ID: RegExp;
Stability, warnings & conventions
preview (pre-1.0)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

interface

OperationAnnotations

What a transport advertises about an operation's behaviour — DERIVED from its effect metadata, never authored.

/** What a transport advertises about an operation's behaviour — DERIVED from its effect metadata, never authored. */
export interface OperationAnnotations {
    readOnlyHint: boolean;
    destructiveHint: boolean;
    idempotentHint: boolean;
    openWorldHint: boolean;
}
Fields, parameters & returned members (4)
Name / typeMeaning & unitOptional / default
destructiveHint
boolean

unitless by name
Required / declared member
No @default declared; consult the signature and description.
idempotentHint
boolean

unitless by name
Required / declared member
No @default declared; consult the signature and description.
openWorldHint
boolean

unitless by name
Required / declared member
No @default declared; consult the signature and description.
readOnlyHint
boolean

unitless by name
Required / declared member
No @default declared; consult the signature and description.
Stability, warnings & conventions
preview (pre-1.0)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

type

OperationAuthorization

Public declaration. Read the signature and parameter/member contracts below; no additional behavior is inferred.

export type OperationAuthorization = 'none' | 'policy' | 'human';
Stability, warnings & conventions
preview (pre-1.0)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

interface

OperationContext

Public declaration. Read the signature and parameter/member contracts below; no additional behavior is inferred.

export interface OperationContext {
    /** The resolved seed for a stochastic call (the seed policy injects the default when absent); `null` for a deterministic call. */
    seed: number | null;
    budgets: {
        maxInputBytes: number | null;
        deadlineMs: number | null;
    };
    /** Cooperative cancellation for job-class operations; `null` for an inline run. */
    signal: OperationSignal | null;
    artifacts: ArtifactStoreReader | null;
    /** What the caller holds (Stage 7B.2 Decision 9); the runtime refused the call already when a required one is missing. */
    capabilities: readonly string[];
    /** The trade lifecycle's stores (Decision 10), explicit parameters of the runtime — never session state. */
    stores: {
        authorization: AuthorizationStore | null;
        journal: ExecutionJournalStore | null;
    };
}
Fields, parameters & returned members (73)
Name / typeMeaning & unitOptional / default
artifacts
ArtifactStoreReader | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
artifacts.get
(uri: string) => { handle: ResourceHandle; value: Record<string, unknown>; } | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
artifacts.get().return.handle
ResourceHandle

unitless by name
Required / declared member
No @default declared; consult the signature and description.
artifacts.get().return.value
Record<string, unknown>

unitless by name
Required / declared member
No @default declared; consult the signature and description.
artifacts.get(uri)
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
artifacts.list
(filter?: { kind?: ResourceHandleKind; }) => ResourceHandle[]

unitless by name
Required / declared member
No @default declared; consult the signature and description.
artifacts.list(filter)
{ kind?: ResourceHandleKind; } | undefined

unitless by name
Optional
No @default declared; consult the signature and description.
artifacts.list(filter).kind
ResourceHandleKind

unitless by name
Optional
No @default declared; consult the signature and description.
budgets
{ maxInputBytes: number | null; deadlineMs: number | null; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
budgets.deadlineMs
number | null

milliseconds
Required / declared member
No @default declared; consult the signature and description.
budgets.maxInputBytes
number | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
capabilities
readonly string[]
What the caller holds (Stage 7B.2 Decision 9); the runtime refused the call already when a required one is missing.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
seed
number | null
The resolved seed for a stochastic call (the seed policy injects the default when absent); `null` for a deterministic call.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
signal
OperationSignal | null
Cooperative cancellation for job-class operations; `null` for an inline run.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
signal.aborted
boolean

unitless by name
Required / declared member
No @default declared; consult the signature and description.
signal.reason
unknown

unitless by name
Optional
No @default declared; consult the signature and description.
stores
{ authorization: AuthorizationStore | null; journal: ExecutionJournalStore | null; }
The trade lifecycle's stores (Decision 10), explicit parameters of the runtime — never session state.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
stores.authorization
AuthorizationStore | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
stores.authorization.consume
(input: import('@insiderfinance/totalfinance/workflows').GrantConsumption & { hashOrUri: string; }) => import('@insiderfinance/totalfinance/workflows').GrantConsumption
Atomically claim the grant with its validated write-ahead batch before journal commit. Idempotent only for the same store, receipt, key and batch; all other claims refuse.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
stores.authorization.consume().return.consumedTimestampMs
number

epoch milliseconds (UTC instant)
Required / declared member
No @default declared; consult the signature and description.
stores.authorization.consume().return.idempotencyKey
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
stores.authorization.consume().return.journalEvents
readonly import('@insiderfinance/totalfinance/portfolio').ExecutionJournalEvent[]
Write-ahead event batch: recovery replays these exact facts, never the fill engine.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
stores.authorization.consume().return.journalId
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
stores.authorization.consume().return.journalStoreId
string
Opaque identity of the authoritative store, retained across file-store restarts.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
stores.authorization.consume().return.receiptId
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
stores.authorization.consume(input)
import('@insiderfinance/totalfinance/workflows').GrantConsumption & { hashOrUri: string; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
stores.authorization.consume(input).consumedTimestampMs
number

epoch milliseconds (UTC instant)
Required / declared member
No @default declared; consult the signature and description.
stores.authorization.consume(input).hashOrUri
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
stores.authorization.consume(input).idempotencyKey
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
stores.authorization.consume(input).journalEvents
readonly import('@insiderfinance/totalfinance/portfolio').ExecutionJournalEvent[]
Write-ahead event batch: recovery replays these exact facts, never the fill engine.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
stores.authorization.consume(input).journalId
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
stores.authorization.consume(input).journalStoreId
string
Opaque identity of the authoritative store, retained across file-store restarts.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
stores.authorization.consume(input).receiptId
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
stores.authorization.get
(hashOrUri: string) => { handle: ResourceHandle; grant: import('@insiderfinance/totalfinance/portfolio').AuthorizationGrant; consumed: import('@insiderfinance/totalfinance/workflows').GrantConsumption | null; } | null
The grant by content hash (or handle uri) with its consumption (null while unconsumed), or null.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
stores.authorization.get().return.consumed
import('@insiderfinance/totalfinance/workflows').GrantConsumption | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
stores.authorization.get().return.consumed.consumedTimestampMs
number

epoch milliseconds (UTC instant)
Required / declared member
No @default declared; consult the signature and description.
stores.authorization.get().return.consumed.idempotencyKey
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
stores.authorization.get().return.consumed.journalEvents
readonly import('@insiderfinance/totalfinance/portfolio').ExecutionJournalEvent[]
Write-ahead event batch: recovery replays these exact facts, never the fill engine.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
stores.authorization.get().return.consumed.journalId
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
stores.authorization.get().return.consumed.journalStoreId
string
Opaque identity of the authoritative store, retained across file-store restarts.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
stores.authorization.get().return.consumed.receiptId
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
stores.authorization.get().return.grant
import('@insiderfinance/totalfinance/portfolio').AuthorizationGrant

unitless by name
Required / declared member
No @default declared; consult the signature and description.
stores.authorization.get().return.handle
ResourceHandle

unitless by name
Required / declared member
No @default declared; consult the signature and description.
stores.authorization.get(hashOrUri)
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
stores.authorization.list
() => ResourceHandle[]

unitless by name
Required / declared member
No @default declared; consult the signature and description.
stores.authorization.put
(input: { grant: import('@insiderfinance/totalfinance/portfolio').AuthorizationGrant; createdTimestampMs: EpochMs; }) => ResourceHandle
Store a grant under its content hash; idempotent (the first put stands). Returns its handle.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
stores.authorization.put().return.contentHash
string | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
stores.authorization.put().return.createdTimestampMs
number
When the store minted the handle — the caller's clock in epoch ms, never the library's.
epoch milliseconds (UTC instant)
Required / declared member
No @default declared; consult the signature and description.
stores.authorization.put().return.expiresTimestampMs
number | null
When the stored value stops being served, epoch ms; null = never.
epoch milliseconds (UTC instant)
Required / declared member
No @default declared; consult the signature and description.
stores.authorization.put().return.kind
ResourceHandleKind

unitless by name
Required / declared member
No @default declared; consult the signature and description.
stores.authorization.put().return.provenance
Provenance
Caller-supplied provenance, preserved verbatim.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
stores.authorization.put().return.schema
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
stores.authorization.put().return.uri
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
stores.authorization.put().return.version
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
stores.authorization.put(input)
{ createdTimestampMs: EpochMs; grant: import('@insiderfinance/totalfinance/portfolio').AuthorizationGrant; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
stores.authorization.put(input).createdTimestampMs
number

epoch milliseconds (UTC instant)
Required / declared member
No @default declared; consult the signature and description.
stores.authorization.put(input).grant
import('@insiderfinance/totalfinance/portfolio').AuthorizationGrant

unitless by name
Required / declared member
No @default declared; consult the signature and description.
stores.journal
ExecutionJournalStore | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
stores.journal.append
(input: { events: readonly import('@insiderfinance/totalfinance/portfolio').ExecutionJournalEvent[]; }) => { journalId: string; appended: number; skipped: number; total: number; }
Append atomically; identical eventId/body retries are skipped, conflicting bodies refused.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
stores.journal.append().return.appended
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
stores.journal.append().return.journalId
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
stores.journal.append().return.skipped
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
stores.journal.append().return.total
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
stores.journal.append(input)
{ events: readonly import('@insiderfinance/totalfinance/portfolio').ExecutionJournalEvent[]; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
stores.journal.append(input).events
readonly import('@insiderfinance/totalfinance/portfolio').ExecutionJournalEvent[]

unitless by name
Required / declared member
No @default declared; consult the signature and description.
stores.journal.list
() => string[]
Every journal id, sorted.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
stores.journal.read
(journalId: string) => import('@insiderfinance/totalfinance/portfolio').ExecutionJournalEvent[]
Every event of a journal in append order (empty for an unknown journal).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
stores.journal.read(journalId)
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
stores.journal.storeId
string
Stable opaque storage identity. Fresh stores differ; reopening a file store retains it.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
stores.journal.transact
<T>(input: { journalId: string; execute: (prior: readonly import('@insiderfinance/totalfinance/portfolio').ExecutionJournalEvent[]) => { events: readonly import('@insiderfinance/totalfinance/portfolio').ExecutionJournalEvent[]; result: T; }; }) => T
Serialize restoration, idempotency checks, identity allocation and commit for one journal. `execute` is synchronous and receives a detached snapshot. Its events are a newly appended batch (possibly empty), committed before result is returned. Exceptions commit nothing. Do not nest transactions/append on the same journal; read does not acquire another lock.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
stores.journal.transact(input)
{ execute: (prior: readonly import('@insiderfinance/totalfinance/portfolio').ExecutionJournalEvent[]) => { events: readonly import('@insiderfinance/totalfinance/portfolio').ExecutionJournalEvent[]; result: T; }; journalId: string; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
stores.journal.transact(input).execute
(prior: readonly import('@insiderfinance/totalfinance/portfolio').ExecutionJournalEvent[]) => { events: readonly import('@insiderfinance/totalfinance/portfolio').ExecutionJournalEvent[]; result: T; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
stores.journal.transact(input).journalId
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
Stability, warnings & conventions
preview (pre-1.0)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

type

OperationCostClass

Public declaration. Read the signature and parameter/member contracts below; no additional behavior is inferred.

export type OperationCostClass = 'small' | 'medium' | 'large' | 'job';
Stability, warnings & conventions
preview (pre-1.0)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

interface

OperationDescription

The transport-neutral description every adapter renders.

/** The transport-neutral description every adapter renders. */
export interface OperationDescription {
    id: string;
    version: string;
    title: string;
    description: string;
    inputSchema: JSONSchema;
    outputSchema: JSONSchema | null;
    sideEffect: OperationSideEffect;
    authorization: OperationAuthorization;
    idempotency: OperationIdempotency;
    deterministic: boolean;
    stochastic: boolean | 'per-call';
    costClass: OperationCostClass;
    requiredCapabilities: string[];
    supportsCancellation: boolean;
    handleFields: string[];
    annotations: OperationAnnotations;
}
Fields, parameters & returned members (202)

This large namespace is split into complete field pages. No fields are omitted.

Stability, warnings & conventions
preview (pre-1.0)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

interface

OperationError

The one error shape every transport maps: the QuantError code, or a runtime code.

/** The one error shape every transport maps: the QuantError code, or a runtime code. */
export interface OperationError {
    code: string;
    message: string;
    context: Record<string, unknown>;
    issues?: SchemaIssue[];
    operation: {
        id: string;
        version: string;
    } | null;
}
Fields, parameters & returned members (7)
Name / typeMeaning & unitOptional / default
code
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
context
Record<string, unknown>

unitless by name
Required / declared member
No @default declared; consult the signature and description.
issues
SchemaIssue[]

unitless by name
Optional
No @default declared; consult the signature and description.
message
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
operation
{ id: string; version: string; } | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
operation.id
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
operation.version
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
Stability, warnings & conventions
preview (pre-1.0)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

type

OperationIdempotency

Public declaration. Read the signature and parameter/member contracts below; no additional behavior is inferred.

export type OperationIdempotency = 'not-applicable' | 'optional' | 'required';
Stability, warnings & conventions
preview (pre-1.0)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

interface

OperationOutput

What an operation returns — the runtime completes it into an {@link OperationResult}.

/** What an operation returns — the runtime completes it into an {@link OperationResult}. */
export interface OperationOutput<Output = Record<string, unknown>> {
    /** Human-readable one-line summary. */
    summary: string;
    /** Machine-readable structured output (validated against `outputSchema` in the parity fixtures). */
    structured: Output;
    artifacts?: ResourceHandle[];
    status?: 'complete' | 'partial';
    incomplete?: string[];
}
Fields, parameters & returned members (5)
Name / typeMeaning & unitOptional / default
artifacts
ResourceHandle[]

unitless by name
Optional
No @default declared; consult the signature and description.
incomplete
string[]

unitless by name
Optional
No @default declared; consult the signature and description.
status
'complete' | 'partial'

unitless by name
Optional
No @default declared; consult the signature and description.
structured
Output
Machine-readable structured output (validated against `outputSchema` in the parity fixtures).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
summary
string
Human-readable one-line summary.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
Stability, warnings & conventions
preview (pre-1.0)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.