@dynamicalsystems/idl 0.7.1 → 0.9.0
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 +236 -1
- package/dist/index.d.cts +248 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +248 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +212 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/schema/dsg-core-identity-binding-v1.json +43 -0
- package/schema/dsg-core-refusal-v1.json +95 -0
- package/schema/dsg-core-refusal-v2.json +103 -0
- package/schema/dsg-kernel-standing-order-activation-v1.json +345 -0
- package/schema/dsg-run-decision-v1.json +71 -0
- package/schema/dsg-run-event-v1.json +101 -0
- package/schema/dsg-run-request-v1.json +107 -0
- package/schema/dsg-run-run-summary-v1.json +127 -0
- package/src/core/identity-binding.v1.ts +26 -0
- package/src/core/refusal.v1.ts +45 -0
- package/src/core/refusal.v2.ts +47 -0
- package/src/index.ts +63 -1
- package/src/kernel/standing-order-activation.v1.ts +72 -0
- package/src/primitives.ts +8 -0
- package/src/run/decision.v1.ts +27 -0
- package/src/run/request.v1.ts +50 -0
- package/src/run/run-summary.v1.ts +42 -0
package/dist/index.d.mts
CHANGED
|
@@ -19,6 +19,13 @@ declare const Reference: TObject<{
|
|
|
19
19
|
orn: import("@sinclair/typebox").TString;
|
|
20
20
|
sha256: import("@sinclair/typebox").TString;
|
|
21
21
|
}>;
|
|
22
|
+
/** A person named on a run. Missing on the wire is null; readers print
|
|
23
|
+
* "Not recorded". Never inferred. */
|
|
24
|
+
declare const PersonReference: TObject<{
|
|
25
|
+
principal: import("@sinclair/typebox").TString;
|
|
26
|
+
displayName: import("@sinclair/typebox").TString;
|
|
27
|
+
source: import("@sinclair/typebox").TString;
|
|
28
|
+
}>;
|
|
22
29
|
/** One wire profile: the literal, and every top-level shape that crosses
|
|
23
30
|
* the seam it names. Shape names are stable identifiers ("request",
|
|
24
31
|
* "lease", "refusal"); vectors address a shape as "<literal>#<shape>". */
|
|
@@ -623,6 +630,106 @@ declare const SignedBootstrapIntentSchemaValue: import("@sinclair/typebox").TObj
|
|
|
623
630
|
declare const SignedBootstrapIntentSchema: typeof SignedBootstrapIntentSchemaValue;
|
|
624
631
|
type SignedBootstrapIntent = Static<typeof SignedBootstrapIntentSchema>;
|
|
625
632
|
//#endregion
|
|
633
|
+
//#region src/kernel/standing-order-activation.v1.d.ts
|
|
634
|
+
declare const STANDING_ORDER_ACTIVATION_PROFILE: "dsg.kernel.standing-order-activation/1";
|
|
635
|
+
declare const STANDING_ORDER_ACTIVATION_EVENT_KIND: "standing_order_activated";
|
|
636
|
+
declare const StandingOrderModeSchemaValue: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"synthetic-test-only">, import("@sinclair/typebox").TLiteral<"human-authority">]>;
|
|
637
|
+
declare const StandingOrderModeSchema: typeof StandingOrderModeSchemaValue;
|
|
638
|
+
type StandingOrderMode = Static<typeof StandingOrderModeSchema>;
|
|
639
|
+
/** The immutable descriptor retained with the activation event. */
|
|
640
|
+
declare const StandingOrderActivationSchemaValue: import("@sinclair/typebox").TObject<{
|
|
641
|
+
profile: import("@sinclair/typebox").TLiteral<"dsg.kernel.standing-order-activation/1">;
|
|
642
|
+
/** Stable identity carried in the descriptor. The event's `activation`
|
|
643
|
+
* reference points to this descriptor, avoiding a digest cycle. */
|
|
644
|
+
activationId: import("@sinclair/typebox").TString;
|
|
645
|
+
/** Compare-and-set precondition. Null is valid only for the first head. */
|
|
646
|
+
expectedPreviousActivation: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
647
|
+
orn: import("@sinclair/typebox").TString;
|
|
648
|
+
sha256: import("@sinclair/typebox").TString;
|
|
649
|
+
}>, import("@sinclair/typebox").TNull]>;
|
|
650
|
+
law: import("@sinclair/typebox").TObject<{
|
|
651
|
+
orn: import("@sinclair/typebox").TString;
|
|
652
|
+
sha256: import("@sinclair/typebox").TString;
|
|
653
|
+
}>;
|
|
654
|
+
enrollment: import("@sinclair/typebox").TObject<{
|
|
655
|
+
orn: import("@sinclair/typebox").TString;
|
|
656
|
+
sha256: import("@sinclair/typebox").TString;
|
|
657
|
+
}>;
|
|
658
|
+
intent: import("@sinclair/typebox").TObject<{
|
|
659
|
+
orn: import("@sinclair/typebox").TString;
|
|
660
|
+
sha256: import("@sinclair/typebox").TString;
|
|
661
|
+
}>;
|
|
662
|
+
roots: import("@sinclair/typebox").TObject<{
|
|
663
|
+
orn: import("@sinclair/typebox").TString;
|
|
664
|
+
sha256: import("@sinclair/typebox").TString;
|
|
665
|
+
}>;
|
|
666
|
+
/** Activation-time observation. It never substitutes for a current read. */
|
|
667
|
+
revocation: import("@sinclair/typebox").TObject<{
|
|
668
|
+
orn: import("@sinclair/typebox").TString;
|
|
669
|
+
sha256: import("@sinclair/typebox").TString;
|
|
670
|
+
}>;
|
|
671
|
+
actor: import("@sinclair/typebox").TString;
|
|
672
|
+
mode: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"synthetic-test-only">, import("@sinclair/typebox").TLiteral<"human-authority">]>;
|
|
673
|
+
activatedAt: import("@sinclair/typebox").TString;
|
|
674
|
+
}>;
|
|
675
|
+
declare const StandingOrderActivationSchema: typeof StandingOrderActivationSchemaValue;
|
|
676
|
+
type StandingOrderActivation = Static<typeof StandingOrderActivationSchema>;
|
|
677
|
+
/** Append-only record event carrying the descriptor selected by the stream head. */
|
|
678
|
+
declare const StandingOrderActivationEventSchemaValue: import("@sinclair/typebox").TObject<{
|
|
679
|
+
profile: import("@sinclair/typebox").TLiteral<"dsg.kernel.standing-order-activation/1">;
|
|
680
|
+
kind: import("@sinclair/typebox").TLiteral<"standing_order_activated">;
|
|
681
|
+
stream: import("@sinclair/typebox").TString;
|
|
682
|
+
/** Reference to the canonical descriptor artifact. */
|
|
683
|
+
activation: import("@sinclair/typebox").TObject<{
|
|
684
|
+
orn: import("@sinclair/typebox").TString;
|
|
685
|
+
sha256: import("@sinclair/typebox").TString;
|
|
686
|
+
}>;
|
|
687
|
+
}>;
|
|
688
|
+
declare const StandingOrderActivationEventSchema: typeof StandingOrderActivationEventSchemaValue;
|
|
689
|
+
type StandingOrderActivationEvent = Static<typeof StandingOrderActivationEventSchema>;
|
|
690
|
+
/** Detached signature over the canonical activation descriptor bytes. */
|
|
691
|
+
declare const SignedStandingOrderActivationSchemaValue: import("@sinclair/typebox").TObject<{
|
|
692
|
+
body: import("@sinclair/typebox").TObject<{
|
|
693
|
+
profile: import("@sinclair/typebox").TLiteral<"dsg.kernel.standing-order-activation/1">;
|
|
694
|
+
/** Stable identity carried in the descriptor. The event's `activation`
|
|
695
|
+
* reference points to this descriptor, avoiding a digest cycle. */
|
|
696
|
+
activationId: import("@sinclair/typebox").TString;
|
|
697
|
+
/** Compare-and-set precondition. Null is valid only for the first head. */
|
|
698
|
+
expectedPreviousActivation: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
699
|
+
orn: import("@sinclair/typebox").TString;
|
|
700
|
+
sha256: import("@sinclair/typebox").TString;
|
|
701
|
+
}>, import("@sinclair/typebox").TNull]>;
|
|
702
|
+
law: import("@sinclair/typebox").TObject<{
|
|
703
|
+
orn: import("@sinclair/typebox").TString;
|
|
704
|
+
sha256: import("@sinclair/typebox").TString;
|
|
705
|
+
}>;
|
|
706
|
+
enrollment: import("@sinclair/typebox").TObject<{
|
|
707
|
+
orn: import("@sinclair/typebox").TString;
|
|
708
|
+
sha256: import("@sinclair/typebox").TString;
|
|
709
|
+
}>;
|
|
710
|
+
intent: import("@sinclair/typebox").TObject<{
|
|
711
|
+
orn: import("@sinclair/typebox").TString;
|
|
712
|
+
sha256: import("@sinclair/typebox").TString;
|
|
713
|
+
}>;
|
|
714
|
+
roots: import("@sinclair/typebox").TObject<{
|
|
715
|
+
orn: import("@sinclair/typebox").TString;
|
|
716
|
+
sha256: import("@sinclair/typebox").TString;
|
|
717
|
+
}>;
|
|
718
|
+
/** Activation-time observation. It never substitutes for a current read. */
|
|
719
|
+
revocation: import("@sinclair/typebox").TObject<{
|
|
720
|
+
orn: import("@sinclair/typebox").TString;
|
|
721
|
+
sha256: import("@sinclair/typebox").TString;
|
|
722
|
+
}>;
|
|
723
|
+
actor: import("@sinclair/typebox").TString;
|
|
724
|
+
mode: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"synthetic-test-only">, import("@sinclair/typebox").TLiteral<"human-authority">]>;
|
|
725
|
+
activatedAt: import("@sinclair/typebox").TString;
|
|
726
|
+
}>;
|
|
727
|
+
signer: import("@sinclair/typebox").TString;
|
|
728
|
+
signature: import("@sinclair/typebox").TString;
|
|
729
|
+
}>;
|
|
730
|
+
declare const SignedStandingOrderActivationSchema: typeof SignedStandingOrderActivationSchemaValue;
|
|
731
|
+
type SignedStandingOrderActivation = Static<typeof SignedStandingOrderActivationSchema>;
|
|
732
|
+
//#endregion
|
|
626
733
|
//#region src/kernel/ordinary-authority.v1.d.ts
|
|
627
734
|
declare const ORDINARY_AUTHORITY_PROFILE: "dsg.kernel.ordinary-authority/1";
|
|
628
735
|
declare const OrdinaryAuthoritySchemaValue: import("@sinclair/typebox").TObject<{
|
|
@@ -709,6 +816,146 @@ declare const EventStreamSealSchemaValue: import("@sinclair/typebox").TObject<{
|
|
|
709
816
|
declare const EventStreamSealSchema: typeof EventStreamSealSchemaValue;
|
|
710
817
|
type EventStreamSeal = Static<typeof EventStreamSealSchema>;
|
|
711
818
|
//#endregion
|
|
819
|
+
//#region src/run/request.v1.d.ts
|
|
820
|
+
declare const REQUEST_PROFILE: "dsg.run.request/1";
|
|
821
|
+
declare const ExperimentRefSchemaValue: import("@sinclair/typebox").TObject<{
|
|
822
|
+
digest: import("@sinclair/typebox").TString;
|
|
823
|
+
title: import("@sinclair/typebox").TString;
|
|
824
|
+
workloadClass: import("@sinclair/typebox").TString;
|
|
825
|
+
}>;
|
|
826
|
+
declare const ExperimentRefSchema: typeof ExperimentRefSchemaValue;
|
|
827
|
+
type ExperimentRef = Static<typeof ExperimentRefSchema>;
|
|
828
|
+
declare const RequestCeilingsSchemaValue: import("@sinclair/typebox").TObject<{
|
|
829
|
+
maxRunSeconds: import("@sinclair/typebox").TInteger;
|
|
830
|
+
maxGpuSeconds: import("@sinclair/typebox").TInteger;
|
|
831
|
+
maxParallelism: import("@sinclair/typebox").TInteger;
|
|
832
|
+
costBoundMicroUsd: import("@sinclair/typebox").TInteger;
|
|
833
|
+
}>;
|
|
834
|
+
declare const RequestCeilingsSchema: typeof RequestCeilingsSchemaValue;
|
|
835
|
+
type RequestCeilings = Static<typeof RequestCeilingsSchema>;
|
|
836
|
+
declare const RunRequestSchemaValue: import("@sinclair/typebox").TObject<{
|
|
837
|
+
profile: import("@sinclair/typebox").TLiteral<"dsg.run.request/1">;
|
|
838
|
+
experiment: import("@sinclair/typebox").TObject<{
|
|
839
|
+
digest: import("@sinclair/typebox").TString;
|
|
840
|
+
title: import("@sinclair/typebox").TString;
|
|
841
|
+
workloadClass: import("@sinclair/typebox").TString;
|
|
842
|
+
}>;
|
|
843
|
+
workload: import("@sinclair/typebox").TObject<{
|
|
844
|
+
orn: import("@sinclair/typebox").TString;
|
|
845
|
+
sha256: import("@sinclair/typebox").TString;
|
|
846
|
+
}>;
|
|
847
|
+
inputs: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
848
|
+
orn: import("@sinclair/typebox").TString;
|
|
849
|
+
sha256: import("@sinclair/typebox").TString;
|
|
850
|
+
}>>;
|
|
851
|
+
ceilings: import("@sinclair/typebox").TObject<{
|
|
852
|
+
maxRunSeconds: import("@sinclair/typebox").TInteger;
|
|
853
|
+
maxGpuSeconds: import("@sinclair/typebox").TInteger;
|
|
854
|
+
maxParallelism: import("@sinclair/typebox").TInteger;
|
|
855
|
+
costBoundMicroUsd: import("@sinclair/typebox").TInteger;
|
|
856
|
+
}>;
|
|
857
|
+
purpose: import("@sinclair/typebox").TString;
|
|
858
|
+
window: import("@sinclair/typebox").TString;
|
|
859
|
+
}>;
|
|
860
|
+
declare const RunRequestSchema: typeof RunRequestSchemaValue;
|
|
861
|
+
type RunRequest = Static<typeof RunRequestSchema>;
|
|
862
|
+
//#endregion
|
|
863
|
+
//#region src/run/decision.v1.d.ts
|
|
864
|
+
declare const DECISION_PROFILE: "dsg.run.decision/1";
|
|
865
|
+
declare const RunDecisionSchemaValue: import("@sinclair/typebox").TObject<{
|
|
866
|
+
profile: import("@sinclair/typebox").TLiteral<"dsg.run.decision/1">;
|
|
867
|
+
runId: import("@sinclair/typebox").TString;
|
|
868
|
+
requestDigest: import("@sinclair/typebox").TString;
|
|
869
|
+
decision: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"approved">, import("@sinclair/typebox").TLiteral<"refused">]>;
|
|
870
|
+
cause: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
871
|
+
decidedAt: import("@sinclair/typebox").TString;
|
|
872
|
+
decider: import("@sinclair/typebox").TString;
|
|
873
|
+
signature: import("@sinclair/typebox").TString;
|
|
874
|
+
}>;
|
|
875
|
+
declare const RunDecisionSchema: typeof RunDecisionSchemaValue;
|
|
876
|
+
type RunDecision = Static<typeof RunDecisionSchema>;
|
|
877
|
+
//#endregion
|
|
878
|
+
//#region src/run/run-summary.v1.d.ts
|
|
879
|
+
declare const RUN_SUMMARY_PROFILE: "dsg.run.run-summary/1";
|
|
880
|
+
declare const RunSummaryDecisionSchemaValue: import("@sinclair/typebox").TObject<{
|
|
881
|
+
outcome: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"approved">, import("@sinclair/typebox").TLiteral<"refused">]>;
|
|
882
|
+
decider: import("@sinclair/typebox").TObject<{
|
|
883
|
+
principal: import("@sinclair/typebox").TString;
|
|
884
|
+
displayName: import("@sinclair/typebox").TString;
|
|
885
|
+
source: import("@sinclair/typebox").TString;
|
|
886
|
+
}>;
|
|
887
|
+
decidedAt: import("@sinclair/typebox").TString;
|
|
888
|
+
cause: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
889
|
+
byStandingOrder: import("@sinclair/typebox").TBoolean;
|
|
890
|
+
}>;
|
|
891
|
+
declare const RunSummaryDecisionSchema: typeof RunSummaryDecisionSchemaValue;
|
|
892
|
+
type RunSummaryDecision = Static<typeof RunSummaryDecisionSchema>;
|
|
893
|
+
declare const RunSummarySchemaValue: import("@sinclair/typebox").TObject<{
|
|
894
|
+
profile: import("@sinclair/typebox").TLiteral<"dsg.run.run-summary/1">;
|
|
895
|
+
runId: import("@sinclair/typebox").TString;
|
|
896
|
+
experimentDigest: import("@sinclair/typebox").TString;
|
|
897
|
+
requester: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
898
|
+
principal: import("@sinclair/typebox").TString;
|
|
899
|
+
displayName: import("@sinclair/typebox").TString;
|
|
900
|
+
source: import("@sinclair/typebox").TString;
|
|
901
|
+
}>, import("@sinclair/typebox").TNull]>;
|
|
902
|
+
decision: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
903
|
+
outcome: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"approved">, import("@sinclair/typebox").TLiteral<"refused">]>;
|
|
904
|
+
decider: import("@sinclair/typebox").TObject<{
|
|
905
|
+
principal: import("@sinclair/typebox").TString;
|
|
906
|
+
displayName: import("@sinclair/typebox").TString;
|
|
907
|
+
source: import("@sinclair/typebox").TString;
|
|
908
|
+
}>;
|
|
909
|
+
decidedAt: import("@sinclair/typebox").TString;
|
|
910
|
+
cause: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
911
|
+
byStandingOrder: import("@sinclair/typebox").TBoolean;
|
|
912
|
+
}>, import("@sinclair/typebox").TNull]>;
|
|
913
|
+
waitingOn: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
914
|
+
}>;
|
|
915
|
+
declare const RunSummarySchema: typeof RunSummarySchemaValue;
|
|
916
|
+
type RunSummary = Static<typeof RunSummarySchema>;
|
|
917
|
+
//#endregion
|
|
918
|
+
//#region src/core/refusal.v1.d.ts
|
|
919
|
+
declare const REFUSAL_PROFILE: "dsg.core.refusal/1";
|
|
920
|
+
declare const RefusalCodeSchemaValue: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"assertion_invalid">, import("@sinclair/typebox").TLiteral<"audience_mismatch">, import("@sinclair/typebox").TLiteral<"expired">, import("@sinclair/typebox").TLiteral<"issuer_unknown">, import("@sinclair/typebox").TLiteral<"transport_unverified">, import("@sinclair/typebox").TLiteral<"relay_untrusted">, import("@sinclair/typebox").TLiteral<"identity_unbound">, import("@sinclair/typebox").TLiteral<"binding_expired">, import("@sinclair/typebox").TLiteral<"principal_suspended">, import("@sinclair/typebox").TLiteral<"not_dsg_account">, import("@sinclair/typebox").TLiteral<"session_expired">, import("@sinclair/typebox").TLiteral<"unknown_workload_class">, import("@sinclair/typebox").TLiteral<"image_not_pinned">, import("@sinclair/typebox").TLiteral<"not_a_requester">, import("@sinclair/typebox").TLiteral<"document_invalid">, import("@sinclair/typebox").TLiteral<"self_decision">, import("@sinclair/typebox").TLiteral<"no_ceiling">]>;
|
|
921
|
+
declare const RefusalCodeSchema: typeof RefusalCodeSchemaValue;
|
|
922
|
+
type RefusalCode = Static<typeof RefusalCodeSchema>;
|
|
923
|
+
declare const RefusalSchemaValue: import("@sinclair/typebox").TObject<{
|
|
924
|
+
profile: import("@sinclair/typebox").TLiteral<"dsg.core.refusal/1">;
|
|
925
|
+
code: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"assertion_invalid">, import("@sinclair/typebox").TLiteral<"audience_mismatch">, import("@sinclair/typebox").TLiteral<"expired">, import("@sinclair/typebox").TLiteral<"issuer_unknown">, import("@sinclair/typebox").TLiteral<"transport_unverified">, import("@sinclair/typebox").TLiteral<"relay_untrusted">, import("@sinclair/typebox").TLiteral<"identity_unbound">, import("@sinclair/typebox").TLiteral<"binding_expired">, import("@sinclair/typebox").TLiteral<"principal_suspended">, import("@sinclair/typebox").TLiteral<"not_dsg_account">, import("@sinclair/typebox").TLiteral<"session_expired">, import("@sinclair/typebox").TLiteral<"unknown_workload_class">, import("@sinclair/typebox").TLiteral<"image_not_pinned">, import("@sinclair/typebox").TLiteral<"not_a_requester">, import("@sinclair/typebox").TLiteral<"document_invalid">, import("@sinclair/typebox").TLiteral<"self_decision">, import("@sinclair/typebox").TLiteral<"no_ceiling">]>;
|
|
926
|
+
sentence: import("@sinclair/typebox").TString;
|
|
927
|
+
}>;
|
|
928
|
+
declare const RefusalSchema: typeof RefusalSchemaValue;
|
|
929
|
+
type Refusal = Static<typeof RefusalSchema>;
|
|
930
|
+
//#endregion
|
|
931
|
+
//#region src/core/refusal.v2.d.ts
|
|
932
|
+
declare const REFUSAL_V2_PROFILE: "dsg.core.refusal/2";
|
|
933
|
+
declare const RefusalCodeV2SchemaValue: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"assertion_invalid">, import("@sinclair/typebox").TLiteral<"audience_mismatch">, import("@sinclair/typebox").TLiteral<"expired">, import("@sinclair/typebox").TLiteral<"issuer_unknown">, import("@sinclair/typebox").TLiteral<"transport_unverified">, import("@sinclair/typebox").TLiteral<"relay_untrusted">, import("@sinclair/typebox").TLiteral<"identity_unbound">, import("@sinclair/typebox").TLiteral<"binding_expired">, import("@sinclair/typebox").TLiteral<"principal_suspended">, import("@sinclair/typebox").TLiteral<"not_dsg_account">, import("@sinclair/typebox").TLiteral<"session_expired">, import("@sinclair/typebox").TLiteral<"unknown_workload_class">, import("@sinclair/typebox").TLiteral<"image_not_pinned">, import("@sinclair/typebox").TLiteral<"not_a_requester">, import("@sinclair/typebox").TLiteral<"document_invalid">, import("@sinclair/typebox").TLiteral<"self_decision">, import("@sinclair/typebox").TLiteral<"no_ceiling">, import("@sinclair/typebox").TLiteral<"validation_unavailable">, import("@sinclair/typebox").TLiteral<"confirmation_expired">]>;
|
|
934
|
+
declare const RefusalCodeV2Schema: typeof RefusalCodeV2SchemaValue;
|
|
935
|
+
type RefusalCodeV2 = Static<typeof RefusalCodeV2Schema>;
|
|
936
|
+
declare const RefusalV2SchemaValue: import("@sinclair/typebox").TObject<{
|
|
937
|
+
profile: import("@sinclair/typebox").TLiteral<"dsg.core.refusal/2">;
|
|
938
|
+
code: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"assertion_invalid">, import("@sinclair/typebox").TLiteral<"audience_mismatch">, import("@sinclair/typebox").TLiteral<"expired">, import("@sinclair/typebox").TLiteral<"issuer_unknown">, import("@sinclair/typebox").TLiteral<"transport_unverified">, import("@sinclair/typebox").TLiteral<"relay_untrusted">, import("@sinclair/typebox").TLiteral<"identity_unbound">, import("@sinclair/typebox").TLiteral<"binding_expired">, import("@sinclair/typebox").TLiteral<"principal_suspended">, import("@sinclair/typebox").TLiteral<"not_dsg_account">, import("@sinclair/typebox").TLiteral<"session_expired">, import("@sinclair/typebox").TLiteral<"unknown_workload_class">, import("@sinclair/typebox").TLiteral<"image_not_pinned">, import("@sinclair/typebox").TLiteral<"not_a_requester">, import("@sinclair/typebox").TLiteral<"document_invalid">, import("@sinclair/typebox").TLiteral<"self_decision">, import("@sinclair/typebox").TLiteral<"no_ceiling">, import("@sinclair/typebox").TLiteral<"validation_unavailable">, import("@sinclair/typebox").TLiteral<"confirmation_expired">]>;
|
|
939
|
+
sentence: import("@sinclair/typebox").TString;
|
|
940
|
+
}>;
|
|
941
|
+
declare const RefusalV2Schema: typeof RefusalV2SchemaValue;
|
|
942
|
+
type RefusalV2 = Static<typeof RefusalV2Schema>;
|
|
943
|
+
//#endregion
|
|
944
|
+
//#region src/core/identity-binding.v1.d.ts
|
|
945
|
+
declare const IDENTITY_BINDING_PROFILE: "dsg.core.identity-binding/1";
|
|
946
|
+
declare const GOOGLE_SIGN_IN_ISSUER: "https://accounts.google.com";
|
|
947
|
+
declare const IdentityBindingSchemaValue: import("@sinclair/typebox").TObject<{
|
|
948
|
+
profile: import("@sinclair/typebox").TLiteral<"dsg.core.identity-binding/1">;
|
|
949
|
+
principal: import("@sinclair/typebox").TString;
|
|
950
|
+
issuer: import("@sinclair/typebox").TLiteral<"https://accounts.google.com">;
|
|
951
|
+
subject: import("@sinclair/typebox").TString;
|
|
952
|
+
decider: import("@sinclair/typebox").TString;
|
|
953
|
+
boundAt: import("@sinclair/typebox").TString;
|
|
954
|
+
signature: import("@sinclair/typebox").TString;
|
|
955
|
+
}>;
|
|
956
|
+
declare const IdentityBindingSchema: typeof IdentityBindingSchemaValue;
|
|
957
|
+
type IdentityBinding = Static<typeof IdentityBindingSchema>;
|
|
958
|
+
//#endregion
|
|
712
959
|
//#region src/index.d.ts
|
|
713
960
|
/** Every profile this version of the package defines, keyed by literal.
|
|
714
961
|
* Profile modules are added here as they are extracted; the rules test
|
|
@@ -716,5 +963,5 @@ type EventStreamSeal = Static<typeof EventStreamSealSchema>;
|
|
|
716
963
|
* registered does not exist. */
|
|
717
964
|
declare const PROFILES: Readonly<Record<string, ProfileEntry>>;
|
|
718
965
|
//#endregion
|
|
719
|
-
export { ADOPTION_FACT_PROFILE, type Accepted, AcceptedSchema, type AdoptionFact, AdoptionFactSchema, BOOTSTRAP_PROFILE, type BootstrapAction, BootstrapActionSchema, type BootstrapIntent, BootstrapIntentSchema, DISPATCH_CONSUME_PROFILE, DISPATCH_MAX_SKEW_SECONDS, type DispatchConsumeRequest, DispatchConsumeRequestSchema, type DispatchLease, DispatchLeaseSchema, type DispatchRefusal, type DispatchRefusalCode, DispatchRefusalCodeSchema, DispatchRefusalSchema, EVENT_LINE_PREFIX, EVENT_PROFILE, EXECUTOR_PROTOCOL_VERSION, type Event, EventSchema, type EventStreamSeal, EventStreamSealSchema, type ExecutionDocument, ExecutionDocumentSchema, type ExecutionLaw, ExecutionLawSchema, type ExecutionResources, ExecutionResourcesSchema, type ExecutorProtocolVersion, Hex64, LIFECYCLE_KINDS, NonEmptyString, OPERATION_PROFILE, ORDINARY_AUTHORITY_PROFILE, type OperationBefore, OperationBeforeSchema, type OperationCleanup, OperationCleanupSchema, type OperationCost, OperationCostSchema, type OperationEvidence, OperationEvidenceSchema, type OperationExecution, OperationExecutionSchema, type OperationRequest, OperationRequestSchema, type OperationStatus, OperationStatusSchema, type OrdinaryAuthority, OrdinaryAuthoritySchema, Orn, PRICE_PROFILE_REFERENCE, PROFILES, PROVIDER_PROTOCOL_VERSION, type ProfileEntry, type ProviderProtocolVersion, RESOURCE_DESCRIPTOR_KIND, RESOURCE_DESCRIPTOR_PROFILE, REVOCATIONS_PROFILE, type Readback, ReadbackSchema, Reference, type ResourceDescriptor, ResourceDescriptorSchema, type RevocationPointer, RevocationPointerSchema, RevocationSchema, type RevocationSnapshot, SCOPE_REFERENCE, SIGNED_LAW_DOMAIN, SIGNED_LAW_PROFILE, SafeInt, type SignedBootstrapIntent, SignedBootstrapIntentSchema, type SignedLawBundle, SignedLawBundleSchema, UtcSecond, closed };
|
|
966
|
+
export { ADOPTION_FACT_PROFILE, type Accepted, AcceptedSchema, type AdoptionFact, AdoptionFactSchema, BOOTSTRAP_PROFILE, type BootstrapAction, BootstrapActionSchema, type BootstrapIntent, BootstrapIntentSchema, DECISION_PROFILE, DISPATCH_CONSUME_PROFILE, DISPATCH_MAX_SKEW_SECONDS, type DispatchConsumeRequest, DispatchConsumeRequestSchema, type DispatchLease, DispatchLeaseSchema, type DispatchRefusal, type DispatchRefusalCode, DispatchRefusalCodeSchema, DispatchRefusalSchema, EVENT_LINE_PREFIX, EVENT_PROFILE, EXECUTOR_PROTOCOL_VERSION, type Event, EventSchema, type EventStreamSeal, EventStreamSealSchema, type ExecutionDocument, ExecutionDocumentSchema, type ExecutionLaw, ExecutionLawSchema, type ExecutionResources, ExecutionResourcesSchema, type ExecutorProtocolVersion, type ExperimentRef, ExperimentRefSchema, GOOGLE_SIGN_IN_ISSUER, Hex64, IDENTITY_BINDING_PROFILE, type IdentityBinding, IdentityBindingSchema, LIFECYCLE_KINDS, NonEmptyString, OPERATION_PROFILE, ORDINARY_AUTHORITY_PROFILE, type OperationBefore, OperationBeforeSchema, type OperationCleanup, OperationCleanupSchema, type OperationCost, OperationCostSchema, type OperationEvidence, OperationEvidenceSchema, type OperationExecution, OperationExecutionSchema, type OperationRequest, OperationRequestSchema, type OperationStatus, OperationStatusSchema, type OrdinaryAuthority, OrdinaryAuthoritySchema, Orn, PRICE_PROFILE_REFERENCE, PROFILES, PROVIDER_PROTOCOL_VERSION, PersonReference, type ProfileEntry, type ProviderProtocolVersion, REFUSAL_PROFILE, REFUSAL_V2_PROFILE, REQUEST_PROFILE, RESOURCE_DESCRIPTOR_KIND, RESOURCE_DESCRIPTOR_PROFILE, REVOCATIONS_PROFILE, RUN_SUMMARY_PROFILE, type Readback, ReadbackSchema, Reference, type Refusal, type RefusalCode, RefusalCodeSchema, type RefusalCodeV2, RefusalCodeV2Schema, RefusalSchema, type RefusalV2, RefusalV2Schema, type RequestCeilings, RequestCeilingsSchema, type ResourceDescriptor, ResourceDescriptorSchema, type RevocationPointer, RevocationPointerSchema, RevocationSchema, type RevocationSnapshot, type RunDecision, RunDecisionSchema, type RunRequest, RunRequestSchema, type RunSummary, type RunSummaryDecision, RunSummaryDecisionSchema, RunSummarySchema, SCOPE_REFERENCE, SIGNED_LAW_DOMAIN, SIGNED_LAW_PROFILE, STANDING_ORDER_ACTIVATION_EVENT_KIND, STANDING_ORDER_ACTIVATION_PROFILE, SafeInt, type SignedBootstrapIntent, SignedBootstrapIntentSchema, type SignedLawBundle, SignedLawBundleSchema, type SignedStandingOrderActivation, SignedStandingOrderActivationSchema, type StandingOrderActivation, type StandingOrderActivationEvent, StandingOrderActivationEventSchema, StandingOrderActivationSchema, type StandingOrderMode, StandingOrderModeSchema, UtcSecond, closed };
|
|
720
967
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/primitives.ts","../src/kernel/dispatch-consume.v1.ts","../src/run/operation.v1.ts","../src/infra/signed-law.v1.ts","../src/infra/resource-descriptor.v1.ts","../src/infra/adoption-fact.v1.ts","../src/registry/revocations.v1.ts","../src/kernel/bootstrap.v1.ts","../src/kernel/ordinary-authority.v1.ts","../src/run/contract-versions.ts","../src/run/event.v1.ts","../src/index.ts"],"mappings":";;;cAOa,SAAU,UAAU,aAAW,YAAc,MAAI,QAAQ;;cAIzD,mCAAK;;cAGL,uCAAS;cAIT,4CAAc;cAEd,qCAAO;;;;;;cAOP,iCAAG;;cAGH,WAAS
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/primitives.ts","../src/kernel/dispatch-consume.v1.ts","../src/run/operation.v1.ts","../src/infra/signed-law.v1.ts","../src/infra/resource-descriptor.v1.ts","../src/infra/adoption-fact.v1.ts","../src/registry/revocations.v1.ts","../src/kernel/bootstrap.v1.ts","../src/kernel/standing-order-activation.v1.ts","../src/kernel/ordinary-authority.v1.ts","../src/run/contract-versions.ts","../src/run/event.v1.ts","../src/run/request.v1.ts","../src/run/decision.v1.ts","../src/run/run-summary.v1.ts","../src/core/refusal.v1.ts","../src/core/refusal.v2.ts","../src/core/identity-binding.v1.ts","../src/index.ts"],"mappings":";;;cAOa,SAAU,UAAU,aAAW,YAAc,MAAI,QAAQ;;cAIzD,mCAAK;;cAGL,uCAAS;cAIT,4CAAc;cAEd,qCAAO;;;;;;cAOP,iCAAG;;cAGH,WAAS;;;;;;cAOT,iBAAe;;;;;;;;KAShB;WACD;WACA,QAAQ,SAAS,eAAe;;;WAGhC;;;;WAIA;;;;cC3BE;;cAGA;cAEP,+DAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;cAwB1B,qCAAqC;KAEtC,yBAAyB,cAAc;cAE7C,sDAAwB;;;;;;;;;;;;;;;;;;;;;;;;cA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
|
24
24
|
sha256: Type.String({ pattern: SHA256_PATTERN })
|
|
25
25
|
});
|
|
26
|
+
/** A person named on a run. Missing on the wire is null; readers print
|
|
27
|
+
* "Not recorded". Never inferred. */
|
|
28
|
+
const PersonReference = closed({
|
|
29
|
+
principal: Orn,
|
|
30
|
+
displayName: NonEmptyString,
|
|
31
|
+
source: NonEmptyString
|
|
32
|
+
});
|
|
26
33
|
//#endregion
|
|
27
34
|
//#region src/kernel/dispatch-consume.v1.ts
|
|
28
35
|
const DISPATCH_CONSUME_PROFILE = "dsg.kernel.dispatch-consume/1";
|
|
@@ -578,6 +585,49 @@ const bootstrapV1 = {
|
|
|
578
585
|
}
|
|
579
586
|
};
|
|
580
587
|
//#endregion
|
|
588
|
+
//#region src/kernel/standing-order-activation.v1.ts
|
|
589
|
+
const STANDING_ORDER_ACTIVATION_PROFILE = "dsg.kernel.standing-order-activation/1";
|
|
590
|
+
const STANDING_ORDER_ACTIVATION_EVENT_KIND = "standing_order_activated";
|
|
591
|
+
const StandingOrderModeSchema = Type.Union([Type.Literal("synthetic-test-only"), Type.Literal("human-authority")]);
|
|
592
|
+
const StandingOrderActivationSchema = closed({
|
|
593
|
+
profile: Type.Literal(STANDING_ORDER_ACTIVATION_PROFILE),
|
|
594
|
+
/** Stable identity carried in the descriptor. The event's `activation`
|
|
595
|
+
* reference points to this descriptor, avoiding a digest cycle. */
|
|
596
|
+
activationId: Orn,
|
|
597
|
+
/** Compare-and-set precondition. Null is valid only for the first head. */
|
|
598
|
+
expectedPreviousActivation: Type.Union([Reference, Type.Null()]),
|
|
599
|
+
law: Reference,
|
|
600
|
+
enrollment: Reference,
|
|
601
|
+
intent: Reference,
|
|
602
|
+
roots: Reference,
|
|
603
|
+
/** Activation-time observation. It never substitutes for a current read. */
|
|
604
|
+
revocation: Reference,
|
|
605
|
+
actor: Orn,
|
|
606
|
+
mode: StandingOrderModeSchema,
|
|
607
|
+
activatedAt: UtcSecond
|
|
608
|
+
});
|
|
609
|
+
const StandingOrderActivationEventSchema = closed({
|
|
610
|
+
profile: Type.Literal(STANDING_ORDER_ACTIVATION_PROFILE),
|
|
611
|
+
kind: Type.Literal(STANDING_ORDER_ACTIVATION_EVENT_KIND),
|
|
612
|
+
stream: Orn,
|
|
613
|
+
/** Reference to the canonical descriptor artifact. */
|
|
614
|
+
activation: Reference
|
|
615
|
+
});
|
|
616
|
+
const SignedStandingOrderActivationSchema = closed({
|
|
617
|
+
body: StandingOrderActivationSchema,
|
|
618
|
+
signer: Orn,
|
|
619
|
+
signature: Type.String({ pattern: "^[0-9a-f]{128}$" })
|
|
620
|
+
});
|
|
621
|
+
const standingOrderActivationV1 = {
|
|
622
|
+
literal: STANDING_ORDER_ACTIVATION_PROFILE,
|
|
623
|
+
rootShape: "event",
|
|
624
|
+
shapes: {
|
|
625
|
+
activation: StandingOrderActivationSchema,
|
|
626
|
+
signed: SignedStandingOrderActivationSchema,
|
|
627
|
+
event: StandingOrderActivationEventSchema
|
|
628
|
+
}
|
|
629
|
+
};
|
|
630
|
+
//#endregion
|
|
581
631
|
//#region src/kernel/ordinary-authority.v1.ts
|
|
582
632
|
const ORDINARY_AUTHORITY_PROFILE = "dsg.kernel.ordinary-authority/1";
|
|
583
633
|
const names = Type.Array(NonEmptyString, {
|
|
@@ -687,6 +737,159 @@ const eventV1 = {
|
|
|
687
737
|
}
|
|
688
738
|
};
|
|
689
739
|
//#endregion
|
|
740
|
+
//#region src/run/request.v1.ts
|
|
741
|
+
const REQUEST_PROFILE = "dsg.run.request/1";
|
|
742
|
+
const ExperimentRefSchema = closed({
|
|
743
|
+
digest: Hex64,
|
|
744
|
+
title: NonEmptyString,
|
|
745
|
+
workloadClass: NonEmptyString
|
|
746
|
+
});
|
|
747
|
+
const RequestCeilingsSchema = closed({
|
|
748
|
+
maxRunSeconds: SafeInt,
|
|
749
|
+
maxGpuSeconds: SafeInt,
|
|
750
|
+
maxParallelism: SafeInt,
|
|
751
|
+
costBoundMicroUsd: SafeInt
|
|
752
|
+
});
|
|
753
|
+
const RunRequestSchema = closed({
|
|
754
|
+
profile: Type.Literal(REQUEST_PROFILE),
|
|
755
|
+
experiment: ExperimentRefSchema,
|
|
756
|
+
workload: Reference,
|
|
757
|
+
inputs: Type.Array(Reference, { minItems: 1 }),
|
|
758
|
+
ceilings: RequestCeilingsSchema,
|
|
759
|
+
purpose: NonEmptyString,
|
|
760
|
+
window: NonEmptyString
|
|
761
|
+
});
|
|
762
|
+
const requestV1 = {
|
|
763
|
+
literal: REQUEST_PROFILE,
|
|
764
|
+
rootShape: "request",
|
|
765
|
+
shapes: { request: RunRequestSchema }
|
|
766
|
+
};
|
|
767
|
+
//#endregion
|
|
768
|
+
//#region src/run/decision.v1.ts
|
|
769
|
+
const DECISION_PROFILE = "dsg.run.decision/1";
|
|
770
|
+
const RunDecisionSchema = closed({
|
|
771
|
+
profile: Type.Literal(DECISION_PROFILE),
|
|
772
|
+
runId: NonEmptyString,
|
|
773
|
+
requestDigest: Hex64,
|
|
774
|
+
decision: Type.Union([Type.Literal("approved"), Type.Literal("refused")]),
|
|
775
|
+
cause: Type.Union([NonEmptyString, Type.Null()]),
|
|
776
|
+
decidedAt: UtcSecond,
|
|
777
|
+
decider: Orn,
|
|
778
|
+
signature: NonEmptyString
|
|
779
|
+
});
|
|
780
|
+
const decisionV1 = {
|
|
781
|
+
literal: DECISION_PROFILE,
|
|
782
|
+
rootShape: "decision",
|
|
783
|
+
shapes: { decision: RunDecisionSchema }
|
|
784
|
+
};
|
|
785
|
+
//#endregion
|
|
786
|
+
//#region src/run/run-summary.v1.ts
|
|
787
|
+
const RUN_SUMMARY_PROFILE = "dsg.run.run-summary/1";
|
|
788
|
+
const RunSummaryDecisionSchema = closed({
|
|
789
|
+
outcome: Type.Union([Type.Literal("approved"), Type.Literal("refused")]),
|
|
790
|
+
decider: PersonReference,
|
|
791
|
+
decidedAt: UtcSecond,
|
|
792
|
+
cause: Type.Union([NonEmptyString, Type.Null()]),
|
|
793
|
+
byStandingOrder: Type.Boolean()
|
|
794
|
+
});
|
|
795
|
+
const RunSummarySchema = closed({
|
|
796
|
+
profile: Type.Literal(RUN_SUMMARY_PROFILE),
|
|
797
|
+
runId: NonEmptyString,
|
|
798
|
+
experimentDigest: Hex64,
|
|
799
|
+
requester: Type.Union([PersonReference, Type.Null()]),
|
|
800
|
+
decision: Type.Union([RunSummaryDecisionSchema, Type.Null()]),
|
|
801
|
+
waitingOn: Type.Union([NonEmptyString, Type.Null()])
|
|
802
|
+
});
|
|
803
|
+
const runSummaryV1 = {
|
|
804
|
+
literal: RUN_SUMMARY_PROFILE,
|
|
805
|
+
rootShape: "summary",
|
|
806
|
+
shapes: { summary: RunSummarySchema }
|
|
807
|
+
};
|
|
808
|
+
//#endregion
|
|
809
|
+
//#region src/core/refusal.v1.ts
|
|
810
|
+
const REFUSAL_PROFILE = "dsg.core.refusal/1";
|
|
811
|
+
const RefusalCodeSchema = Type.Union([
|
|
812
|
+
Type.Literal("assertion_invalid"),
|
|
813
|
+
Type.Literal("audience_mismatch"),
|
|
814
|
+
Type.Literal("expired"),
|
|
815
|
+
Type.Literal("issuer_unknown"),
|
|
816
|
+
Type.Literal("transport_unverified"),
|
|
817
|
+
Type.Literal("relay_untrusted"),
|
|
818
|
+
Type.Literal("identity_unbound"),
|
|
819
|
+
Type.Literal("binding_expired"),
|
|
820
|
+
Type.Literal("principal_suspended"),
|
|
821
|
+
Type.Literal("not_dsg_account"),
|
|
822
|
+
Type.Literal("session_expired"),
|
|
823
|
+
Type.Literal("unknown_workload_class"),
|
|
824
|
+
Type.Literal("image_not_pinned"),
|
|
825
|
+
Type.Literal("not_a_requester"),
|
|
826
|
+
Type.Literal("document_invalid"),
|
|
827
|
+
Type.Literal("self_decision"),
|
|
828
|
+
Type.Literal("no_ceiling")
|
|
829
|
+
]);
|
|
830
|
+
const RefusalSchema = closed({
|
|
831
|
+
profile: Type.Literal(REFUSAL_PROFILE),
|
|
832
|
+
code: RefusalCodeSchema,
|
|
833
|
+
sentence: NonEmptyString
|
|
834
|
+
});
|
|
835
|
+
const refusalV1 = {
|
|
836
|
+
literal: REFUSAL_PROFILE,
|
|
837
|
+
rootShape: "refusal",
|
|
838
|
+
shapes: { refusal: RefusalSchema }
|
|
839
|
+
};
|
|
840
|
+
//#endregion
|
|
841
|
+
//#region src/core/refusal.v2.ts
|
|
842
|
+
const REFUSAL_V2_PROFILE = "dsg.core.refusal/2";
|
|
843
|
+
const RefusalCodeV2Schema = Type.Union([
|
|
844
|
+
Type.Literal("assertion_invalid"),
|
|
845
|
+
Type.Literal("audience_mismatch"),
|
|
846
|
+
Type.Literal("expired"),
|
|
847
|
+
Type.Literal("issuer_unknown"),
|
|
848
|
+
Type.Literal("transport_unverified"),
|
|
849
|
+
Type.Literal("relay_untrusted"),
|
|
850
|
+
Type.Literal("identity_unbound"),
|
|
851
|
+
Type.Literal("binding_expired"),
|
|
852
|
+
Type.Literal("principal_suspended"),
|
|
853
|
+
Type.Literal("not_dsg_account"),
|
|
854
|
+
Type.Literal("session_expired"),
|
|
855
|
+
Type.Literal("unknown_workload_class"),
|
|
856
|
+
Type.Literal("image_not_pinned"),
|
|
857
|
+
Type.Literal("not_a_requester"),
|
|
858
|
+
Type.Literal("document_invalid"),
|
|
859
|
+
Type.Literal("self_decision"),
|
|
860
|
+
Type.Literal("no_ceiling"),
|
|
861
|
+
Type.Literal("validation_unavailable"),
|
|
862
|
+
Type.Literal("confirmation_expired")
|
|
863
|
+
]);
|
|
864
|
+
const RefusalV2Schema = closed({
|
|
865
|
+
profile: Type.Literal(REFUSAL_V2_PROFILE),
|
|
866
|
+
code: RefusalCodeV2Schema,
|
|
867
|
+
sentence: NonEmptyString
|
|
868
|
+
});
|
|
869
|
+
const refusalV2 = {
|
|
870
|
+
literal: REFUSAL_V2_PROFILE,
|
|
871
|
+
rootShape: "refusal",
|
|
872
|
+
shapes: { refusal: RefusalV2Schema }
|
|
873
|
+
};
|
|
874
|
+
//#endregion
|
|
875
|
+
//#region src/core/identity-binding.v1.ts
|
|
876
|
+
const IDENTITY_BINDING_PROFILE = "dsg.core.identity-binding/1";
|
|
877
|
+
const GOOGLE_SIGN_IN_ISSUER = "https://accounts.google.com";
|
|
878
|
+
const IdentityBindingSchema = closed({
|
|
879
|
+
profile: Type.Literal(IDENTITY_BINDING_PROFILE),
|
|
880
|
+
principal: Orn,
|
|
881
|
+
issuer: Type.Literal(GOOGLE_SIGN_IN_ISSUER),
|
|
882
|
+
subject: NonEmptyString,
|
|
883
|
+
decider: Orn,
|
|
884
|
+
boundAt: UtcSecond,
|
|
885
|
+
signature: NonEmptyString
|
|
886
|
+
});
|
|
887
|
+
const identityBindingV1 = {
|
|
888
|
+
literal: IDENTITY_BINDING_PROFILE,
|
|
889
|
+
rootShape: "binding",
|
|
890
|
+
shapes: { binding: IdentityBindingSchema }
|
|
891
|
+
};
|
|
892
|
+
//#endregion
|
|
690
893
|
//#region src/index.ts
|
|
691
894
|
/** Every profile this version of the package defines, keyed by literal.
|
|
692
895
|
* Profile modules are added here as they are extracted; the rules test
|
|
@@ -696,14 +899,21 @@ const PROFILES = {
|
|
|
696
899
|
[dispatchConsumeV1.literal]: dispatchConsumeV1,
|
|
697
900
|
[operationV1.literal]: operationV1,
|
|
698
901
|
[eventV1.literal]: eventV1,
|
|
902
|
+
[requestV1.literal]: requestV1,
|
|
903
|
+
[decisionV1.literal]: decisionV1,
|
|
904
|
+
[runSummaryV1.literal]: runSummaryV1,
|
|
905
|
+
[refusalV1.literal]: refusalV1,
|
|
906
|
+
[refusalV2.literal]: refusalV2,
|
|
907
|
+
[identityBindingV1.literal]: identityBindingV1,
|
|
699
908
|
[signedLawV1.literal]: signedLawV1,
|
|
700
909
|
[resourceDescriptorV1.literal]: resourceDescriptorV1,
|
|
701
910
|
[adoptionFactV1.literal]: adoptionFactV1,
|
|
702
911
|
[revocationsV1.literal]: revocationsV1,
|
|
703
912
|
[bootstrapV1.literal]: bootstrapV1,
|
|
704
|
-
[ordinaryAuthorityV1.literal]: ordinaryAuthorityV1
|
|
913
|
+
[ordinaryAuthorityV1.literal]: ordinaryAuthorityV1,
|
|
914
|
+
[standingOrderActivationV1.literal]: standingOrderActivationV1
|
|
705
915
|
};
|
|
706
916
|
//#endregion
|
|
707
|
-
export { ADOPTION_FACT_PROFILE, AcceptedSchema, AdoptionFactSchema, BOOTSTRAP_PROFILE, BootstrapActionSchema, BootstrapIntentSchema, DISPATCH_CONSUME_PROFILE, DISPATCH_MAX_SKEW_SECONDS, DispatchConsumeRequestSchema, DispatchLeaseSchema, DispatchRefusalCodeSchema, DispatchRefusalSchema, EVENT_LINE_PREFIX, EVENT_PROFILE, EXECUTOR_PROTOCOL_VERSION, EventSchema, EventStreamSealSchema, ExecutionDocumentSchema, ExecutionLawSchema, ExecutionResourcesSchema, Hex64, LIFECYCLE_KINDS, NonEmptyString, OPERATION_PROFILE, ORDINARY_AUTHORITY_PROFILE, OperationBeforeSchema, OperationCleanupSchema, OperationCostSchema, OperationEvidenceSchema, OperationExecutionSchema, OperationRequestSchema, OperationStatusSchema, OrdinaryAuthoritySchema, Orn, PRICE_PROFILE_REFERENCE, PROFILES, PROVIDER_PROTOCOL_VERSION, RESOURCE_DESCRIPTOR_KIND, RESOURCE_DESCRIPTOR_PROFILE, REVOCATIONS_PROFILE, ReadbackSchema, Reference, ResourceDescriptorSchema, RevocationPointerSchema, RevocationSchema, SCOPE_REFERENCE, SIGNED_LAW_DOMAIN, SIGNED_LAW_PROFILE, SafeInt, SignedBootstrapIntentSchema, SignedLawBundleSchema, UtcSecond, closed };
|
|
917
|
+
export { ADOPTION_FACT_PROFILE, AcceptedSchema, AdoptionFactSchema, BOOTSTRAP_PROFILE, BootstrapActionSchema, BootstrapIntentSchema, DECISION_PROFILE, DISPATCH_CONSUME_PROFILE, DISPATCH_MAX_SKEW_SECONDS, DispatchConsumeRequestSchema, DispatchLeaseSchema, DispatchRefusalCodeSchema, DispatchRefusalSchema, EVENT_LINE_PREFIX, EVENT_PROFILE, EXECUTOR_PROTOCOL_VERSION, EventSchema, EventStreamSealSchema, ExecutionDocumentSchema, ExecutionLawSchema, ExecutionResourcesSchema, ExperimentRefSchema, GOOGLE_SIGN_IN_ISSUER, Hex64, IDENTITY_BINDING_PROFILE, IdentityBindingSchema, LIFECYCLE_KINDS, NonEmptyString, OPERATION_PROFILE, ORDINARY_AUTHORITY_PROFILE, OperationBeforeSchema, OperationCleanupSchema, OperationCostSchema, OperationEvidenceSchema, OperationExecutionSchema, OperationRequestSchema, OperationStatusSchema, OrdinaryAuthoritySchema, Orn, PRICE_PROFILE_REFERENCE, PROFILES, PROVIDER_PROTOCOL_VERSION, PersonReference, REFUSAL_PROFILE, REFUSAL_V2_PROFILE, REQUEST_PROFILE, RESOURCE_DESCRIPTOR_KIND, RESOURCE_DESCRIPTOR_PROFILE, REVOCATIONS_PROFILE, RUN_SUMMARY_PROFILE, ReadbackSchema, Reference, RefusalCodeSchema, RefusalCodeV2Schema, RefusalSchema, RefusalV2Schema, RequestCeilingsSchema, ResourceDescriptorSchema, RevocationPointerSchema, RevocationSchema, RunDecisionSchema, RunRequestSchema, RunSummaryDecisionSchema, RunSummarySchema, SCOPE_REFERENCE, SIGNED_LAW_DOMAIN, SIGNED_LAW_PROFILE, STANDING_ORDER_ACTIVATION_EVENT_KIND, STANDING_ORDER_ACTIVATION_PROFILE, SafeInt, SignedBootstrapIntentSchema, SignedLawBundleSchema, SignedStandingOrderActivationSchema, StandingOrderActivationEventSchema, StandingOrderActivationSchema, StandingOrderModeSchema, UtcSecond, closed };
|
|
708
918
|
|
|
709
919
|
//# sourceMappingURL=index.mjs.map
|