@thyn-ai/sqai 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +19 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -12
- package/dist/index.d.ts +14 -12
- package/dist/index.js +20 -10
- package/dist/index.js.map +1 -1
- package/dist/unsafe.cjs +6 -3
- package/dist/unsafe.cjs.map +1 -1
- package/dist/unsafe.d.cts +5 -3
- package/dist/unsafe.d.ts +5 -3
- package/dist/unsafe.js +4 -2
- package/dist/unsafe.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -235,12 +235,14 @@ declare class RuntimeProvisioner {
|
|
|
235
235
|
|
|
236
236
|
/** Contract-derived wire value: everything the computation plane can
|
|
237
237
|
* transport. The wire schema transports; the capability contract authorizes. */
|
|
238
|
-
type
|
|
239
|
-
[key: string]:
|
|
238
|
+
type SqaiValue = null | boolean | number | string | SqaiValue[] | {
|
|
239
|
+
[key: string]: SqaiValue;
|
|
240
240
|
} | {
|
|
241
241
|
type: "decimal" | "bigint";
|
|
242
242
|
value: string;
|
|
243
243
|
};
|
|
244
|
+
/** @deprecated Renamed to {@link SqaiValue}. Kept as a non-breaking alias. */
|
|
245
|
+
type AlgentaWireValue = SqaiValue;
|
|
244
246
|
interface SqaiSource {
|
|
245
247
|
name: string;
|
|
246
248
|
source_id: string | null;
|
|
@@ -291,8 +293,8 @@ type ComputationBinding = {
|
|
|
291
293
|
interface ComputationSpec {
|
|
292
294
|
module: string;
|
|
293
295
|
function: string;
|
|
294
|
-
args?:
|
|
295
|
-
kwargs?: Record<string,
|
|
296
|
+
args?: SqaiValue[];
|
|
297
|
+
kwargs?: Record<string, SqaiValue>;
|
|
296
298
|
bindings?: ComputationBinding[];
|
|
297
299
|
seed?: number | string;
|
|
298
300
|
}
|
|
@@ -325,7 +327,7 @@ interface BindingProvenance {
|
|
|
325
327
|
}
|
|
326
328
|
interface ComputeResult {
|
|
327
329
|
status: "ok";
|
|
328
|
-
value:
|
|
330
|
+
value: SqaiValue;
|
|
329
331
|
value_type: string;
|
|
330
332
|
module: string;
|
|
331
333
|
function: string;
|
|
@@ -485,11 +487,11 @@ declare function createSQAI(config?: SqaiConfig): SQAI;
|
|
|
485
487
|
|
|
486
488
|
/** SQAI failure contract.
|
|
487
489
|
*
|
|
488
|
-
* Algenta error codes pass through verbatim (`source: "
|
|
490
|
+
* Algenta error codes pass through verbatim (`source: "engine"`); SQAI adds
|
|
489
491
|
* its own codes in the same snake_case vocabulary (`source: "sqai"`). A code
|
|
490
492
|
* is never renamed and the same condition never gets two codes.
|
|
491
493
|
*/
|
|
492
|
-
type SqaiErrorSource = "
|
|
494
|
+
type SqaiErrorSource = "engine" | "sqai";
|
|
493
495
|
interface SqaiErrorOptions {
|
|
494
496
|
retryable?: boolean;
|
|
495
497
|
requestId?: string | null;
|
|
@@ -532,8 +534,8 @@ declare const SQAI_ERROR_CODES: readonly ["unsupported_operation", "seed_require
|
|
|
532
534
|
interface InvocationIdentity {
|
|
533
535
|
module: string;
|
|
534
536
|
function: string;
|
|
535
|
-
args:
|
|
536
|
-
kwargs: Record<string,
|
|
537
|
+
args: SqaiValue[];
|
|
538
|
+
kwargs: Record<string, SqaiValue>;
|
|
537
539
|
resolved_bindings: Array<{
|
|
538
540
|
parameter: string | number;
|
|
539
541
|
source_name: string;
|
|
@@ -586,17 +588,17 @@ declare class ResultStore {
|
|
|
586
588
|
|
|
587
589
|
interface ResolvedBindingValue {
|
|
588
590
|
parameter: string | number;
|
|
589
|
-
values:
|
|
591
|
+
values: SqaiValue;
|
|
590
592
|
provenance: BindingProvenance;
|
|
591
593
|
}
|
|
592
594
|
interface ValidatedComputation {
|
|
593
595
|
entry: CapabilityEntry;
|
|
594
596
|
/** Final positional argument vector, ordered by the signature params. */
|
|
595
|
-
argsVector:
|
|
597
|
+
argsVector: SqaiValue[];
|
|
596
598
|
seed: number | string | null;
|
|
597
599
|
bindings: ResolvedBindingValue[];
|
|
598
600
|
}
|
|
599
601
|
declare function lookupCapability(index: ContractIndex, module: string, functionName: string): CapabilityEntry;
|
|
600
602
|
declare function validateComputation(spec: ComputationSpec, index: ContractIndex, policy: SqaiPolicy | undefined, resolvedBindings: ResolvedBindingValue[]): ValidatedComputation;
|
|
601
603
|
|
|
602
|
-
export { type AlgentaWireValue, type AskOutcome, type BindingProvenance, type CapabilityContract, type CapabilityEntry, type CapabilityMatch, type ColumnExtract, type ComputationBinding, type ComputationSpec, type ComputeResult, ContractIndex, type DeterminismEnvelope, type InvocationIdentity, type QueryFilterCondition, type QueryFilterSpec, type QuerySpec, type ResolvedBindingValue, ResultStore, type ResultStoreConfig, RuntimeProvisioner, type RuntimeStatus, SQAI, SQAI_ERROR_CODES, type SqaiConfig, SqaiError, type SqaiErrorSource, type SqaiIntent, type SqaiOutcome, type SqaiPolicy, type SqaiResultRecord, type SqaiSource, type ValidatedComputation, computationHash, createSQAI, currentPlatformKey, invocationHash, isReadOnlyEligible, lookupCapability, runtimeCacheDir, validateComputation };
|
|
604
|
+
export { type AlgentaWireValue, type AskOutcome, type BindingProvenance, type CapabilityContract, type CapabilityEntry, type CapabilityMatch, type ColumnExtract, type ComputationBinding, type ComputationSpec, type ComputeResult, ContractIndex, type DeterminismEnvelope, type InvocationIdentity, type QueryFilterCondition, type QueryFilterSpec, type QuerySpec, type ResolvedBindingValue, ResultStore, type ResultStoreConfig, RuntimeProvisioner, type RuntimeStatus, SQAI, SQAI_ERROR_CODES, type SqaiConfig, SqaiError, type SqaiErrorSource, type SqaiIntent, type SqaiOutcome, type SqaiPolicy, type SqaiResultRecord, type SqaiSource, type SqaiValue, type ValidatedComputation, computationHash, createSQAI, currentPlatformKey, invocationHash, isReadOnlyEligible, lookupCapability, runtimeCacheDir, validateComputation };
|
package/dist/index.d.ts
CHANGED
|
@@ -235,12 +235,14 @@ declare class RuntimeProvisioner {
|
|
|
235
235
|
|
|
236
236
|
/** Contract-derived wire value: everything the computation plane can
|
|
237
237
|
* transport. The wire schema transports; the capability contract authorizes. */
|
|
238
|
-
type
|
|
239
|
-
[key: string]:
|
|
238
|
+
type SqaiValue = null | boolean | number | string | SqaiValue[] | {
|
|
239
|
+
[key: string]: SqaiValue;
|
|
240
240
|
} | {
|
|
241
241
|
type: "decimal" | "bigint";
|
|
242
242
|
value: string;
|
|
243
243
|
};
|
|
244
|
+
/** @deprecated Renamed to {@link SqaiValue}. Kept as a non-breaking alias. */
|
|
245
|
+
type AlgentaWireValue = SqaiValue;
|
|
244
246
|
interface SqaiSource {
|
|
245
247
|
name: string;
|
|
246
248
|
source_id: string | null;
|
|
@@ -291,8 +293,8 @@ type ComputationBinding = {
|
|
|
291
293
|
interface ComputationSpec {
|
|
292
294
|
module: string;
|
|
293
295
|
function: string;
|
|
294
|
-
args?:
|
|
295
|
-
kwargs?: Record<string,
|
|
296
|
+
args?: SqaiValue[];
|
|
297
|
+
kwargs?: Record<string, SqaiValue>;
|
|
296
298
|
bindings?: ComputationBinding[];
|
|
297
299
|
seed?: number | string;
|
|
298
300
|
}
|
|
@@ -325,7 +327,7 @@ interface BindingProvenance {
|
|
|
325
327
|
}
|
|
326
328
|
interface ComputeResult {
|
|
327
329
|
status: "ok";
|
|
328
|
-
value:
|
|
330
|
+
value: SqaiValue;
|
|
329
331
|
value_type: string;
|
|
330
332
|
module: string;
|
|
331
333
|
function: string;
|
|
@@ -485,11 +487,11 @@ declare function createSQAI(config?: SqaiConfig): SQAI;
|
|
|
485
487
|
|
|
486
488
|
/** SQAI failure contract.
|
|
487
489
|
*
|
|
488
|
-
* Algenta error codes pass through verbatim (`source: "
|
|
490
|
+
* Algenta error codes pass through verbatim (`source: "engine"`); SQAI adds
|
|
489
491
|
* its own codes in the same snake_case vocabulary (`source: "sqai"`). A code
|
|
490
492
|
* is never renamed and the same condition never gets two codes.
|
|
491
493
|
*/
|
|
492
|
-
type SqaiErrorSource = "
|
|
494
|
+
type SqaiErrorSource = "engine" | "sqai";
|
|
493
495
|
interface SqaiErrorOptions {
|
|
494
496
|
retryable?: boolean;
|
|
495
497
|
requestId?: string | null;
|
|
@@ -532,8 +534,8 @@ declare const SQAI_ERROR_CODES: readonly ["unsupported_operation", "seed_require
|
|
|
532
534
|
interface InvocationIdentity {
|
|
533
535
|
module: string;
|
|
534
536
|
function: string;
|
|
535
|
-
args:
|
|
536
|
-
kwargs: Record<string,
|
|
537
|
+
args: SqaiValue[];
|
|
538
|
+
kwargs: Record<string, SqaiValue>;
|
|
537
539
|
resolved_bindings: Array<{
|
|
538
540
|
parameter: string | number;
|
|
539
541
|
source_name: string;
|
|
@@ -586,17 +588,17 @@ declare class ResultStore {
|
|
|
586
588
|
|
|
587
589
|
interface ResolvedBindingValue {
|
|
588
590
|
parameter: string | number;
|
|
589
|
-
values:
|
|
591
|
+
values: SqaiValue;
|
|
590
592
|
provenance: BindingProvenance;
|
|
591
593
|
}
|
|
592
594
|
interface ValidatedComputation {
|
|
593
595
|
entry: CapabilityEntry;
|
|
594
596
|
/** Final positional argument vector, ordered by the signature params. */
|
|
595
|
-
argsVector:
|
|
597
|
+
argsVector: SqaiValue[];
|
|
596
598
|
seed: number | string | null;
|
|
597
599
|
bindings: ResolvedBindingValue[];
|
|
598
600
|
}
|
|
599
601
|
declare function lookupCapability(index: ContractIndex, module: string, functionName: string): CapabilityEntry;
|
|
600
602
|
declare function validateComputation(spec: ComputationSpec, index: ContractIndex, policy: SqaiPolicy | undefined, resolvedBindings: ResolvedBindingValue[]): ValidatedComputation;
|
|
601
603
|
|
|
602
|
-
export { type AlgentaWireValue, type AskOutcome, type BindingProvenance, type CapabilityContract, type CapabilityEntry, type CapabilityMatch, type ColumnExtract, type ComputationBinding, type ComputationSpec, type ComputeResult, ContractIndex, type DeterminismEnvelope, type InvocationIdentity, type QueryFilterCondition, type QueryFilterSpec, type QuerySpec, type ResolvedBindingValue, ResultStore, type ResultStoreConfig, RuntimeProvisioner, type RuntimeStatus, SQAI, SQAI_ERROR_CODES, type SqaiConfig, SqaiError, type SqaiErrorSource, type SqaiIntent, type SqaiOutcome, type SqaiPolicy, type SqaiResultRecord, type SqaiSource, type ValidatedComputation, computationHash, createSQAI, currentPlatformKey, invocationHash, isReadOnlyEligible, lookupCapability, runtimeCacheDir, validateComputation };
|
|
604
|
+
export { type AlgentaWireValue, type AskOutcome, type BindingProvenance, type CapabilityContract, type CapabilityEntry, type CapabilityMatch, type ColumnExtract, type ComputationBinding, type ComputationSpec, type ComputeResult, ContractIndex, type DeterminismEnvelope, type InvocationIdentity, type QueryFilterCondition, type QueryFilterSpec, type QuerySpec, type ResolvedBindingValue, ResultStore, type ResultStoreConfig, RuntimeProvisioner, type RuntimeStatus, SQAI, SQAI_ERROR_CODES, type SqaiConfig, SqaiError, type SqaiErrorSource, type SqaiIntent, type SqaiOutcome, type SqaiPolicy, type SqaiResultRecord, type SqaiSource, type SqaiValue, type ValidatedComputation, computationHash, createSQAI, currentPlatformKey, invocationHash, isReadOnlyEligible, lookupCapability, runtimeCacheDir, validateComputation };
|