Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/shared/generated/contracts/ContractAcceptedPayload.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

/**
* `contract:accepted` — proposer's signed selection of one bidder.
*/
export type ContractAcceptedPayload = { contractId: string, proposerId: string, acceptedBidderId: string,
/**
* Hash of the accepted bid envelope — pins exactly which bid was
* taken (defense against bid-rewrite attacks where two bids share
* a contract_id).
*/
acceptedBidHash: string, };
16 changes: 16 additions & 0 deletions src/shared/generated/contracts/ContractBidPayload.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

/**
* `contract:bid` — an executor's offer to take on a proposed contract.
*/
export type ContractBidPayload = { contractId: string, bidderId: string, bidAmount: bigint,
/**
* Bidder's promised SLA (max latency in ms). Proposer uses this
* in the bid-selection policy (lower latency + lower bid wins,
* per the policy engine).
*/
maxLatencyMs: number,
/**
* Bidder's expiry — how long this bid is honored if accepted.
*/
bidExpiryUnixMs: bigint, };
21 changes: 21 additions & 0 deletions src/shared/generated/contracts/ContractDeliveredPayload.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

/**
* `contract:delivered` — executor's signed assertion that the work is
* done. Carries the alloy_hash of the actual artifact (which the
* proposer compares against the originally-proposed alloy_hash to
* detect bait-and-switch).
*/
export type ContractDeliveredPayload = { contractId: string, executorId: string,
/**
* Hash of the delivered artifact (may differ from the proposed
* alloy_hash if the executor produced a SPECIFIC output that
* satisfies the proposed CONTRACT).
*/
deliveredAlloyHash: string,
/**
* Optional location pointer (URL, IPFS CID, etc.) for fetching
* the artifact bytes. The hash is the canonical reference; this
* is convenience.
*/
artifactUrl?: string, };
12 changes: 12 additions & 0 deletions src/shared/generated/contracts/ContractDisputedPayload.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

/**
* `contract:disputed` — any signer can file. Replay reproduces every
* disputed contract for auditor review.
*/
export type ContractDisputedPayload = { contractId: string, disputerId: string, reason: string,
/**
* Optional reference to the specific prior event being disputed
* (e.g. the verified-hash if the disputer claims wrong verdict).
*/
disputedEventHash?: string, };
8 changes: 8 additions & 0 deletions src/shared/generated/contracts/ContractExecutingPayload.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

/**
* `contract:executing` — executor's signed "work started" beacon.
* Optional event (the chain stays valid without it) but used by the
* router daemon to mark a routing slot as in-use.
*/
export type ContractExecutingPayload = { contractId: string, executorId: string, startedAtUnixMs: bigint, };
13 changes: 13 additions & 0 deletions src/shared/generated/contracts/ContractPaidPayload.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

/**
* `contract:paid` — payer's signed settlement record. For the
* zero-cost household tier this is still emitted (audit completeness)
* with `amount: 0`.
*/
export type ContractPaidPayload = { contractId: string, payerId: string, payeeId: string, amount: bigint, currency: string,
/**
* Optional settlement reference (chain tx hash, internal ledger
* entry id, etc.). Not load-bearing for replay; just provenance.
*/
settlementRef?: string, };
32 changes: 32 additions & 0 deletions src/shared/generated/contracts/ContractProposedPayload.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

/**
* `contract:proposed` — initiator publishes a contract for bidding.
*
* `alloy_hash` references the substance of what's being contracted —
* matches the proof-contract layer in
* `docs/grid/FORGE-ALLOY-PROOF-CONTRACTS.md`. For pre-alloy use cases
* (e.g. a `ping` dispatch with no proof bundle) the hash references
* a synthetic "ping contract" alloy with no proof suite.
*/
export type ContractProposedPayload = { contractId: string, proposerId: string,
/**
* SHA-256 reference to the alloy bundle describing the work.
* Hex-encoded for human readability + ts-rs `string` mapping.
*/
alloyHash: string,
/**
* Currency/escrow terms. Zero-cost ("household") tier = empty
* `bid_currency` + zero `max_bid`.
*/
bidCurrency: string, maxBid: bigint,
/**
* Expiry (Unix ms). After this point the proposal is dead even
* if no `:accepted` was ever emitted.
*/
expiryUnixMs: bigint,
/**
* Required executor capability tag — matches the L1-4
* `presence:peer-manifest` capability index format.
*/
requiredCapability: string, };
20 changes: 20 additions & 0 deletions src/shared/generated/contracts/ContractVerifiedPayload.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

/**
* `contract:verified` — proposer (or auditor) signs the verification
* verdict. Carries the result of running the alloy proof suite
* against the delivered artifact.
*/
export type ContractVerifiedPayload = { contractId: string, verifierId: string,
/**
* `passed: true` ⇒ proof suite ran clean; `false` ⇒ at least one
* TDD assertion failed or a VDD metric was outside the tolerance
* band. Verifier signs either way — disputes happen via
* `contract:disputed`, not by withholding `:verified`.
*/
passed: boolean,
/**
* Concise reason string for the verdict — full details belong in
* a separate report referenced by alloy_hash.
*/
verdictReason: string, };
12 changes: 12 additions & 0 deletions src/shared/generated/contracts/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Auto-generated barrel export — do not edit manually
// Source: generator/generate-rust-bindings.ts
// Re-generate: npx tsx generator/generate-rust-bindings.ts

export type { ContractAcceptedPayload } from './ContractAcceptedPayload';
export type { ContractBidPayload } from './ContractBidPayload';
export type { ContractDeliveredPayload } from './ContractDeliveredPayload';
export type { ContractDisputedPayload } from './ContractDisputedPayload';
export type { ContractExecutingPayload } from './ContractExecutingPayload';
export type { ContractPaidPayload } from './ContractPaidPayload';
export type { ContractProposedPayload } from './ContractProposedPayload';
export type { ContractVerifiedPayload } from './ContractVerifiedPayload';
1 change: 1 addition & 0 deletions src/shared/generated/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ export type { VisionDescribeOptions } from './cognition';
export type { VisionDescribeRequest } from './cognition';
export type { VisionDescription } from './cognition';
export * from './comms';
export * from './contracts';
export * from './dataset';
export * from './events';
// forge: explicit exports (has duplicate types)
Expand Down
3 changes: 3 additions & 0 deletions src/workers/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/workers/continuum-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ tikv-jemallocator = "0.6" # jemalloc: returns memory to OS aggressively, reduce
libc = "0.2" # Process group management (setsid, kill -pgid)
toml = "0.8" # Avatar model manifest parsing
base64 = "0.22" # Base64 encoding for audio data
sha2 = "0.10" # SHA-256 for OAuth 2.0 PKCE code challenges (RFC 7636)
sha2 = "0.10" # SHA-256 for OAuth 2.0 PKCE code challenges (RFC 7636) + L1-6 contract canonical hash
ed25519-dalek = { version = "2", features = ["rand_core", "serde"] } # L1-6 contract event signatures (matches airc-protocol's pinned version)
async-trait.workspace = true
chrono.workspace = true

Expand Down
Loading
Loading