@globiguard/contracts 1.0.1

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.
Files changed (79) hide show
  1. package/LICENSE +128 -0
  2. package/README.md +50 -0
  3. package/dist/actions.d.ts +135 -0
  4. package/dist/actions.d.ts.map +1 -0
  5. package/dist/actions.js +35 -0
  6. package/dist/actions.js.map +1 -0
  7. package/dist/audit.d.ts +130 -0
  8. package/dist/audit.d.ts.map +1 -0
  9. package/dist/audit.js +2 -0
  10. package/dist/audit.js.map +1 -0
  11. package/dist/auth.d.ts +22 -0
  12. package/dist/auth.d.ts.map +1 -0
  13. package/dist/auth.js +2 -0
  14. package/dist/auth.js.map +1 -0
  15. package/dist/authority.d.ts +118 -0
  16. package/dist/authority.d.ts.map +1 -0
  17. package/dist/authority.js +49 -0
  18. package/dist/authority.js.map +1 -0
  19. package/dist/bootstrap.d.ts +16 -0
  20. package/dist/bootstrap.d.ts.map +1 -0
  21. package/dist/bootstrap.js +15 -0
  22. package/dist/bootstrap.js.map +1 -0
  23. package/dist/decision.d.ts +3 -0
  24. package/dist/decision.d.ts.map +1 -0
  25. package/dist/decision.js +7 -0
  26. package/dist/decision.js.map +1 -0
  27. package/dist/entitlements.d.ts +53 -0
  28. package/dist/entitlements.d.ts.map +1 -0
  29. package/dist/entitlements.js +4 -0
  30. package/dist/entitlements.js.map +1 -0
  31. package/dist/environment.d.ts +3 -0
  32. package/dist/environment.d.ts.map +1 -0
  33. package/dist/environment.js +6 -0
  34. package/dist/environment.js.map +1 -0
  35. package/dist/incident-replay.d.ts +51 -0
  36. package/dist/incident-replay.d.ts.map +1 -0
  37. package/dist/incident-replay.js +20 -0
  38. package/dist/incident-replay.js.map +1 -0
  39. package/dist/index.d.ts +19 -0
  40. package/dist/index.d.ts.map +1 -0
  41. package/dist/index.js +19 -0
  42. package/dist/index.js.map +1 -0
  43. package/dist/industry.d.ts +3 -0
  44. package/dist/industry.d.ts.map +1 -0
  45. package/dist/industry.js +10 -0
  46. package/dist/industry.js.map +1 -0
  47. package/dist/installs.d.ts +55 -0
  48. package/dist/installs.d.ts.map +1 -0
  49. package/dist/installs.js +2 -0
  50. package/dist/installs.js.map +1 -0
  51. package/dist/orgs.d.ts +57 -0
  52. package/dist/orgs.d.ts.map +1 -0
  53. package/dist/orgs.js +14 -0
  54. package/dist/orgs.js.map +1 -0
  55. package/dist/policies.d.ts +72 -0
  56. package/dist/policies.d.ts.map +1 -0
  57. package/dist/policies.js +13 -0
  58. package/dist/policies.js.map +1 -0
  59. package/dist/queue.d.ts +47 -0
  60. package/dist/queue.d.ts.map +1 -0
  61. package/dist/queue.js +9 -0
  62. package/dist/queue.js.map +1 -0
  63. package/dist/realtime.d.ts +33 -0
  64. package/dist/realtime.d.ts.map +1 -0
  65. package/dist/realtime.js +2 -0
  66. package/dist/realtime.js.map +1 -0
  67. package/dist/service-targets.d.ts +13 -0
  68. package/dist/service-targets.d.ts.map +1 -0
  69. package/dist/service-targets.js +6 -0
  70. package/dist/service-targets.js.map +1 -0
  71. package/dist/webhooks.d.ts +61 -0
  72. package/dist/webhooks.d.ts.map +1 -0
  73. package/dist/webhooks.js +19 -0
  74. package/dist/webhooks.js.map +1 -0
  75. package/dist/workflows.d.ts +101 -0
  76. package/dist/workflows.d.ts.map +1 -0
  77. package/dist/workflows.js +36 -0
  78. package/dist/workflows.js.map +1 -0
  79. package/package.json +32 -0
package/LICENSE ADDED
@@ -0,0 +1,128 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction, and
10
+ distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by the copyright
13
+ owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all other entities
16
+ that control, are controlled by, or are under common control with that entity.
17
+ For the purposes of this definition, "control" means (i) the power, direct or
18
+ indirect, to cause the direction or management of such entity, whether by
19
+ contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
20
+ outstanding shares, or (iii) beneficial ownership of such entity.
21
+
22
+ "You" (or "Your") shall mean an individual or Legal Entity exercising
23
+ permissions granted by this License.
24
+
25
+ "Source" form shall mean the preferred form for making modifications, including
26
+ but not limited to software source code, documentation source, and
27
+ configuration files.
28
+
29
+ "Object" form shall mean any form resulting from mechanical transformation or
30
+ translation of a Source form, including but not limited to compiled object
31
+ code, generated documentation, and conversions to other media types.
32
+
33
+ "Work" shall mean the work of authorship, whether in Source or Object form,
34
+ made available under the License, as indicated by a copyright notice that is
35
+ included in or attached to the work.
36
+
37
+ "Derivative Works" shall mean any work, whether in Source or Object form, that
38
+ is based on (or derived from) the Work and for which the editorial revisions,
39
+ annotations, elaborations, or other modifications represent, as a whole, an
40
+ original work of authorship. For the purposes of this License, Derivative Works
41
+ shall not include works that remain separable from, or merely link (or bind by
42
+ name) to the interfaces of, the Work and Derivative Works thereof.
43
+
44
+ "Contribution" shall mean any work of authorship, including the original
45
+ version of the Work and any modifications or additions to that Work or
46
+ Derivative Works thereof, that is intentionally submitted to Licensor for
47
+ inclusion in the Work by the copyright owner or by an individual or Legal
48
+ Entity authorized to submit on behalf of the copyright owner.
49
+
50
+ "Contributor" shall mean Licensor and any individual or Legal Entity on behalf
51
+ of whom a Contribution has been received by Licensor and subsequently
52
+ incorporated within the Work.
53
+
54
+ 2. Grant of Copyright License.
55
+
56
+ Subject to the terms and conditions of this License, each Contributor hereby
57
+ grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
58
+ irrevocable copyright license to reproduce, prepare Derivative Works of,
59
+ publicly display, publicly perform, sublicense, and distribute the Work and
60
+ such Derivative Works in Source or Object form.
61
+
62
+ 3. Grant of Patent License.
63
+
64
+ Subject to the terms and conditions of this License, each Contributor hereby
65
+ grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
66
+ irrevocable patent license to make, have made, use, offer to sell, sell,
67
+ import, and otherwise transfer the Work.
68
+
69
+ 4. Redistribution.
70
+
71
+ You may reproduce and distribute copies of the Work or Derivative Works thereof
72
+ in any medium, with or without modifications, and in Source or Object form,
73
+ provided that You meet the following conditions:
74
+
75
+ (a) You must give any other recipients of the Work or Derivative Works a copy
76
+ of this License; and
77
+
78
+ (b) You must cause any modified files to carry prominent notices stating that
79
+ You changed the files; and
80
+
81
+ (c) You must retain, in the Source form of any Derivative Works that You
82
+ distribute, all copyright, patent, trademark, and attribution notices from the
83
+ Source form of the Work, excluding those notices that do not pertain to any
84
+ part of the Derivative Works; and
85
+
86
+ (d) If the Work includes a "NOTICE" text file as part of its distribution, then
87
+ any Derivative Works that You distribute must include a readable copy of the
88
+ attribution notices contained within such NOTICE file, excluding those notices
89
+ that do not pertain to any part of the Derivative Works, in at least one of the
90
+ following places: within a NOTICE text file distributed as part of the
91
+ Derivative Works; within the Source form or documentation, if provided along
92
+ with the Derivative Works; or within a display generated by the Derivative
93
+ Works, if and wherever such third-party notices normally appear.
94
+
95
+ 5. Submission of Contributions.
96
+
97
+ Unless You explicitly state otherwise, any Contribution intentionally submitted
98
+ for inclusion in the Work by You to the Licensor shall be under the terms and
99
+ conditions of this License, without any additional terms or conditions.
100
+
101
+ 6. Trademarks.
102
+
103
+ This License does not grant permission to use the trade names, trademarks,
104
+ service marks, or product names of the Licensor, except as required for
105
+ reasonable and customary use in describing the origin of the Work.
106
+
107
+ 7. Disclaimer of Warranty.
108
+
109
+ Unless required by applicable law or agreed to in writing, Licensor provides
110
+ the Work on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
111
+ either express or implied, including, without limitation, any warranties or
112
+ conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
113
+ PARTICULAR PURPOSE.
114
+
115
+ 8. Limitation of Liability.
116
+
117
+ In no event and under no legal theory, whether in tort (including negligence),
118
+ contract, or otherwise, unless required by applicable law, shall any
119
+ Contributor be liable to You for damages, including any direct, indirect,
120
+ special, incidental, or consequential damages of any character arising as a
121
+ result of this License or out of the use or inability to use the Work.
122
+
123
+ 9. Accepting Warranty or Additional Liability.
124
+
125
+ While redistributing the Work or Derivative Works thereof, You may choose to
126
+ offer, and charge a fee for, acceptance of support, warranty, indemnity, or
127
+ other liability obligations and/or rights consistent with this License.
128
+
package/README.md ADDED
@@ -0,0 +1,50 @@
1
+ # @globiguard/contracts
2
+
3
+ This package is the shared contract foundation for the GlobiGuard open
4
+ distribution layer.
5
+
6
+ ## Current scope
7
+
8
+ This bootstrap slice includes the early contract surfaces that are safe to lock
9
+ before the full canonical public spec is generated:
10
+
11
+ - action authorization, approval state, evidence reference, destination system, and data-class contracts
12
+ - decision enums
13
+ - environment identity
14
+ - credential shapes
15
+ - service target shape, including optional action sidecar/gateway targets
16
+ - install registration and heartbeat shapes
17
+ - audit event and evidence export shapes
18
+ - queue entry, lookup, and approval decision shapes
19
+ - metadata-safe evidence package summaries with checksums, source refs, redaction
20
+ mode, and artifact delivery hints
21
+ - versioned incident replay timelines with explicit missing/redacted/unverified
22
+ segments
23
+ - trust webhook envelopes, signature header names, delivery IDs, timestamps, and
24
+ replay-window verification inputs
25
+ - authority-boundary markers that distinguish browser-readable display contracts
26
+ from server-secret authority contracts
27
+ - workflow management and run shapes
28
+ - realtime subscription auth, channel, and event-envelope shapes
29
+ - policy management shapes
30
+ - org and API-key management shapes
31
+
32
+ It does **not** claim to be the full public API spec for GlobiGuard.
33
+
34
+ The canonical machine-readable spec remains owned by the main `globiguard`
35
+ repository. Later slices should generate or validate richer public contracts
36
+ from that source of truth.
37
+
38
+ ## Authority boundaries
39
+
40
+ Browser-safe contracts use `GLOBIGUARD_BROWSER_READ_BOUNDARY`; they are metadata
41
+ surfaces for status, summaries, evidence links, and replay timelines. They never
42
+ include server secrets, approval/resume authority, bypass controls, or raw
43
+ customer payloads.
44
+
45
+ Server-authority contracts use `GLOBIGUARD_SERVER_AUTHORITY_BOUNDARY`; SDKs and
46
+ integrations must keep those behind server-only package entrypoints and runtime
47
+ guards. Trust webhook verification signs the canonical body plus delivery ID,
48
+ event type, and timestamp, then receivers enforce a replay window and duplicate
49
+ delivery detection.
50
+
@@ -0,0 +1,135 @@
1
+ import type { GlobiguardDecision } from "./decision.js";
2
+ import type { GlobiguardBrowserSafeContract } from "./authority.js";
3
+ export declare const GLOBIGUARD_ACTION_CONTRACT_VERSION: "2026-04-action-beta";
4
+ export declare const GLOBIGUARD_DATA_CLASSES: readonly ["PUBLIC", "INTERNAL", "CONFIDENTIAL", "RESTRICTED", "PII", "PHI", "PCI", "SECRET"];
5
+ export type GlobiguardDataClass = (typeof GLOBIGUARD_DATA_CLASSES)[number];
6
+ export declare const GLOBIGUARD_DESTINATION_SYSTEM_TYPES: readonly ["email", "crm", "slack", "webhook", "database", "ticketing", "storage", "custom"];
7
+ export type GlobiguardDestinationSystemType = (typeof GLOBIGUARD_DESTINATION_SYSTEM_TYPES)[number];
8
+ export declare const GLOBIGUARD_APPROVAL_STATES: readonly ["NOT_REQUIRED", "PENDING", "APPROVED", "REJECTED", "EXPIRED", "CANCELLED"];
9
+ export type GlobiguardApprovalState = (typeof GLOBIGUARD_APPROVAL_STATES)[number];
10
+ export declare const GLOBIGUARD_ACTION_GATEWAY_MODES: readonly ["control_plane", "sidecar", "gateway"];
11
+ export type GlobiguardActionGatewayMode = (typeof GLOBIGUARD_ACTION_GATEWAY_MODES)[number];
12
+ export interface GlobiguardDestinationSystem {
13
+ type: GlobiguardDestinationSystemType;
14
+ name: string;
15
+ resource?: string;
16
+ tenantId?: string;
17
+ region?: string;
18
+ metadata?: Record<string, unknown>;
19
+ }
20
+ export interface GlobiguardActionActor {
21
+ id?: string;
22
+ type?: "human" | "agent" | "service" | "workflow";
23
+ displayName?: string;
24
+ }
25
+ export interface GlobiguardActionPayloadSummary {
26
+ sha256?: string;
27
+ approxBytes?: number;
28
+ topLevelKeys?: string[];
29
+ topLevelValueKinds?: Record<string, string>;
30
+ fieldTypes?: string[];
31
+ recordCount?: number;
32
+ description?: string;
33
+ }
34
+ export interface GlobiguardActionContext {
35
+ actionType: string;
36
+ destination: GlobiguardDestinationSystem;
37
+ dataClasses: GlobiguardDataClass[];
38
+ payloadSummary?: GlobiguardActionPayloadSummary;
39
+ fieldsInvolved?: string[];
40
+ actor?: GlobiguardActionActor;
41
+ purpose?: string;
42
+ workflowRunId?: string;
43
+ workflowStepId?: string;
44
+ policyId?: string;
45
+ idempotencyKey?: string;
46
+ metadata?: Record<string, unknown>;
47
+ }
48
+ export interface GlobiguardEvidenceRef {
49
+ id: string;
50
+ uri: string;
51
+ label?: string;
52
+ kind?: "audit_event" | "approval" | "policy" | "workflow" | "external";
53
+ checksum?: string;
54
+ createdAt?: string;
55
+ metadata?: Record<string, unknown>;
56
+ }
57
+ export interface GlobiguardApproval {
58
+ id: string;
59
+ authorizationId?: string;
60
+ queueEntryId?: string | null;
61
+ state: GlobiguardApprovalState;
62
+ requestedBy?: string | null;
63
+ reviewedBy?: string | null;
64
+ reviewNotes?: string | null;
65
+ createdAt: string;
66
+ updatedAt?: string | null;
67
+ resolvedAt?: string | null;
68
+ expiresAt?: string | null;
69
+ }
70
+ export interface GlobiguardActionDecision {
71
+ authorizationId: string;
72
+ decision: GlobiguardDecision;
73
+ approvalState: GlobiguardApprovalState;
74
+ approval?: GlobiguardApproval | null;
75
+ queueEntryId?: string | null;
76
+ evidenceRefs: GlobiguardEvidenceRef[];
77
+ reason?: string;
78
+ obligations?: string[];
79
+ modifications?: Record<string, unknown>;
80
+ expiresAt?: string | null;
81
+ correlationId?: string | null;
82
+ }
83
+ export interface GlobiguardActionDecisionSummary extends GlobiguardBrowserSafeContract {
84
+ authorizationId: string;
85
+ decision: GlobiguardDecision;
86
+ approvalState: GlobiguardApprovalState;
87
+ queueEntryId?: string | null;
88
+ evidenceRefCount: number;
89
+ reason?: string;
90
+ expiresAt?: string | null;
91
+ correlationId?: string | null;
92
+ }
93
+ export interface GlobiguardActionAuthorizationRequest {
94
+ context: GlobiguardActionContext;
95
+ dryRun?: boolean;
96
+ }
97
+ export interface GlobiguardActionAuthorizationResponse extends GlobiguardActionDecision {
98
+ contractVersion: typeof GLOBIGUARD_ACTION_CONTRACT_VERSION | string;
99
+ }
100
+ export interface GlobiguardApprovalCreateRequest {
101
+ authorizationId: string;
102
+ requestedBy?: string;
103
+ reason?: string;
104
+ expiresAt?: string;
105
+ metadata?: Record<string, unknown>;
106
+ }
107
+ export interface GlobiguardApprovalStatusRequest {
108
+ approvalId: string;
109
+ }
110
+ export interface GlobiguardEvidenceListRequest {
111
+ authorizationId?: string;
112
+ approvalId?: string;
113
+ workflowRunId?: string;
114
+ }
115
+ export interface GlobiguardActionGatewayConfig {
116
+ mode: GlobiguardActionGatewayMode;
117
+ decisionSubscription?: {
118
+ realtimeRequired?: boolean;
119
+ channelPrefix?: string;
120
+ };
121
+ }
122
+ export interface GlobiguardResolvedActionGatewayConfig extends GlobiguardActionGatewayConfig {
123
+ baseUrl: string;
124
+ }
125
+ export interface GlobiguardActionsReadClient {
126
+ getAuthorization(authorizationId: string): Promise<GlobiguardActionAuthorizationResponse>;
127
+ getApproval(approvalId: string): Promise<GlobiguardApproval>;
128
+ listEvidence(request?: GlobiguardEvidenceListRequest): Promise<GlobiguardEvidenceRef[]>;
129
+ getEvidence(evidenceRefId: string): Promise<GlobiguardEvidenceRef>;
130
+ }
131
+ export interface GlobiguardActionsClient extends GlobiguardActionsReadClient {
132
+ authorize(request: GlobiguardActionAuthorizationRequest): Promise<GlobiguardActionAuthorizationResponse>;
133
+ createApproval(request: GlobiguardApprovalCreateRequest): Promise<GlobiguardApproval>;
134
+ }
135
+ //# sourceMappingURL=actions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../src/actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;A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C,GAC5C,OAAO,CAAC,qCAAqC,CAAC,CAAC;IAClD,cAAc,CACZ,OAAO,EAAE,+BAA+B,GACvC,OAAO,CAAC,kBAAkB,CAAC,CAAC;CAChC"}
@@ -0,0 +1,35 @@
1
+ export const GLOBIGUARD_ACTION_CONTRACT_VERSION = "2026-04-action-beta";
2
+ export const GLOBIGUARD_DATA_CLASSES = [
3
+ "PUBLIC",
4
+ "INTERNAL",
5
+ "CONFIDENTIAL",
6
+ "RESTRICTED",
7
+ "PII",
8
+ "PHI",
9
+ "PCI",
10
+ "SECRET"
11
+ ];
12
+ export const GLOBIGUARD_DESTINATION_SYSTEM_TYPES = [
13
+ "email",
14
+ "crm",
15
+ "slack",
16
+ "webhook",
17
+ "database",
18
+ "ticketing",
19
+ "storage",
20
+ "custom"
21
+ ];
22
+ export const GLOBIGUARD_APPROVAL_STATES = [
23
+ "NOT_REQUIRED",
24
+ "PENDING",
25
+ "APPROVED",
26
+ "REJECTED",
27
+ "EXPIRED",
28
+ "CANCELLED"
29
+ ];
30
+ export const GLOBIGUARD_ACTION_GATEWAY_MODES = [
31
+ "control_plane",
32
+ "sidecar",
33
+ "gateway"
34
+ ];
35
+ //# sourceMappingURL=actions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actions.js","sourceRoot":"","sources":["../src/actions.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,kCAAkC,GAAG,qBAA8B,CAAC;AAEjF,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,QAAQ;IACR,UAAU;IACV,cAAc;IACd,YAAY;IACZ,KAAK;IACL,KAAK;IACL,KAAK;IACL,QAAQ;CACA,CAAC;AAIX,MAAM,CAAC,MAAM,mCAAmC,GAAG;IACjD,OAAO;IACP,KAAK;IACL,OAAO;IACP,SAAS;IACT,UAAU;IACV,WAAW;IACX,SAAS;IACT,QAAQ;CACA,CAAC;AAKX,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,cAAc;IACd,SAAS;IACT,UAAU;IACV,UAAU;IACV,SAAS;IACT,WAAW;CACH,CAAC;AAKX,MAAM,CAAC,MAAM,+BAA+B,GAAG;IAC7C,eAAe;IACf,SAAS;IACT,SAAS;CACD,CAAC"}
@@ -0,0 +1,130 @@
1
+ import type { GlobiguardDecision } from "./decision.js";
2
+ import type { GlobiguardEvidencePackageSummary, GlobiguardEvidenceExportDescriptor } from "./authority.js";
3
+ import type { GlobiguardIncidentReplay, GlobiguardIncidentReplayLookupRequest } from "./incident-replay.js";
4
+ export interface GlobiguardAuditMaskedField {
5
+ id: string;
6
+ auditEventId: string;
7
+ fieldType: string;
8
+ tokenAssigned: string;
9
+ detectionMethod: string;
10
+ confidence: number;
11
+ ruleTriggered?: string | null;
12
+ }
13
+ export interface GlobiguardAuditEvent {
14
+ id: string;
15
+ orgId: string;
16
+ policyId?: string | null;
17
+ policyVersion?: number | null;
18
+ agentIdHash: string;
19
+ connectorInstanceId?: string | null;
20
+ actionType: string;
21
+ destinationSystem: string;
22
+ decision: GlobiguardDecision;
23
+ governanceScore: number;
24
+ maskedFieldCount: number;
25
+ maskedFieldTypes: string[];
26
+ blockedFieldCount: number;
27
+ workflowRunId?: string | null;
28
+ workflowStepId?: string | null;
29
+ sessionId?: string | null;
30
+ ipAddress?: string | null;
31
+ frameworkTags: string[];
32
+ controlRefs: string[];
33
+ modelVersion?: string | null;
34
+ connectorManifestVersion?: string | null;
35
+ evidenceRefs: string[];
36
+ timestamp: string;
37
+ maskedFields: GlobiguardAuditMaskedField[];
38
+ _scoreDisclaimer: string;
39
+ }
40
+ export interface GlobiguardAuditListRequest {
41
+ from?: string;
42
+ to?: string;
43
+ decision?: GlobiguardDecision;
44
+ workflowRunId?: string;
45
+ page?: number;
46
+ limit?: number;
47
+ }
48
+ export interface GlobiguardAuditListResponse {
49
+ items: GlobiguardAuditEvent[];
50
+ total: number;
51
+ page: number;
52
+ pages: number;
53
+ }
54
+ export interface GlobiguardAuditExportRequest {
55
+ from?: string;
56
+ to?: string;
57
+ frameworkId?: string;
58
+ workflowRunId?: string;
59
+ format?: "JSON";
60
+ }
61
+ export interface GlobiguardAuditEvidencePackageRequestedScope {
62
+ from: string | null;
63
+ to: string | null;
64
+ workflowRunId: string | null;
65
+ frameworkId: string | null;
66
+ snapshotAt: string;
67
+ }
68
+ export interface GlobiguardAuditEvidencePackageControlMapping {
69
+ controlRef: string;
70
+ auditEventCount: number;
71
+ evidenceRefs: string[];
72
+ provenanceRefs: string[];
73
+ }
74
+ export interface GlobiguardAuditEvidencePackageHumanReviewEntry {
75
+ id: string;
76
+ status: string;
77
+ reviewedBy: string;
78
+ resolvedAt: string | null;
79
+ createdAt: string | null;
80
+ workflowRunId: string | null;
81
+ workflowStepId: string | null;
82
+ }
83
+ export interface GlobiguardAuditEvidencePackageSummary {
84
+ auditEventCount: number;
85
+ queuedReviewCount: number;
86
+ decisionCounts: Partial<Record<GlobiguardDecision, number>>;
87
+ fieldTypes: string[];
88
+ frameworkTags: string[];
89
+ connectorInstanceIds: string[];
90
+ firstEventAt: string | null;
91
+ lastEventAt: string | null;
92
+ }
93
+ export interface GlobiguardAuditEvidencePackageArtifact {
94
+ artifactId: string;
95
+ frameworkId: string;
96
+ generatedAt: string;
97
+ scopeStatement: string;
98
+ requestedScope: GlobiguardAuditEvidencePackageRequestedScope;
99
+ workflowRunReferences: string[];
100
+ policyVersions: string[];
101
+ modelVersionReferences: string[];
102
+ connectorManifestVersions: string[];
103
+ evidenceReferences: string[];
104
+ provenanceReferences: string[];
105
+ controlMappings: GlobiguardAuditEvidencePackageControlMapping[];
106
+ humanReviewHistory: GlobiguardAuditEvidencePackageHumanReviewEntry[];
107
+ summary: GlobiguardAuditEvidencePackageSummary;
108
+ disclaimers: string[];
109
+ }
110
+ export interface GlobiguardAuditExportResponse {
111
+ status: "ready";
112
+ artifactExportId: string;
113
+ evidencePackageId: string;
114
+ format: "json";
115
+ checksum: string;
116
+ artifactJson: string;
117
+ artifact: GlobiguardAuditEvidencePackageArtifact;
118
+ summary?: GlobiguardEvidencePackageSummary;
119
+ descriptor?: GlobiguardEvidenceExportDescriptor;
120
+ }
121
+ export interface GlobiguardAuditReadClient {
122
+ list(request?: GlobiguardAuditListRequest): Promise<GlobiguardAuditListResponse>;
123
+ get(auditEventId: string): Promise<GlobiguardAuditEvent>;
124
+ getEvidencePackageSummary(evidencePackageId: string): Promise<GlobiguardEvidencePackageSummary>;
125
+ getIncidentReplay(request: GlobiguardIncidentReplayLookupRequest): Promise<GlobiguardIncidentReplay>;
126
+ }
127
+ export interface GlobiguardAuditClient extends GlobiguardAuditReadClient {
128
+ export(request?: GlobiguardAuditExportRequest): Promise<GlobiguardAuditExportResponse>;
129
+ }
130
+ //# sourceMappingURL=audit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../src/audit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,KAAK,EACV,gCAAgC,EAChC,kCAAkC,EACnC,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EACV,wBAAwB,EACxB,qCAAqC,EACtC,MAAM,sBAAsB,CAAC;AAE9B,MAAM,WAAW,0BAA0B;IACzC,EAAE,EAAE,MAAM,CAAC;IACX,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AAED,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,mBAAmB,CAAC,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AAC,CAAC;CACtC;AAED,MAAM,WAAW,qBAAsB,SAAQ,yBAAyB;IACtE,MAAM,CACJ,OAAO,CAAC,EAAE,4BAA4B,GACrC,OAAO,CAAC,6BAA6B,CAAC,CAAC;CAC3C"}
package/dist/audit.js ADDED
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=audit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"audit.js","sourceRoot":"","sources":["../src/audit.ts"],"names":[],"mappings":""}
package/dist/auth.d.ts ADDED
@@ -0,0 +1,22 @@
1
+ import type { GlobiguardEnvironment } from "./environment.js";
2
+ export type GlobiguardCredentialKind = "publishable" | "secret" | "local";
3
+ export interface GlobiguardCredentialBase {
4
+ projectId?: string;
5
+ token?: string;
6
+ }
7
+ export interface GlobiguardPublishableCredential extends GlobiguardCredentialBase {
8
+ kind: "publishable";
9
+ token: string;
10
+ projectId: string;
11
+ }
12
+ export interface GlobiguardSecretCredential extends GlobiguardCredentialBase {
13
+ kind: "secret";
14
+ token: string;
15
+ projectId: string;
16
+ environment: Exclude<GlobiguardEnvironment, "local">;
17
+ }
18
+ export interface GlobiguardLocalCredential extends GlobiguardCredentialBase {
19
+ kind: "local";
20
+ }
21
+ export type GlobiguardCredential = GlobiguardPublishableCredential | GlobiguardSecretCredential | GlobiguardLocalCredential;
22
+ //# sourceMappingURL=auth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAE9D,MAAM,MAAM,wBAAwB,GAAG,aAAa,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE1E,MAAM,WAAW,wBAAwB;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,+BAAgC,SAAQ,wBAAwB;IAC/E,IAAI,EAAE,aAAa,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,0BAA2B,SAAQ,wBAAwB;IAC1E,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,OAAO,CAAC,qBAAqB,EAAE,OAAO,CAAC,CAAC;CACtD;AAED,MAAM,WAAW,yBAA0B,SAAQ,wBAAwB;IACzE,IAAI,EAAE,OAAO,CAAC;CACf;AAED,MAAM,MAAM,oBAAoB,GAC5B,+BAA+B,GAC/B,0BAA0B,GAC1B,yBAAyB,CAAC"}
package/dist/auth.js ADDED
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=auth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.js","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":""}
@@ -0,0 +1,118 @@
1
+ import type { GlobiguardDecision } from "./decision.js";
2
+ export declare const GLOBIGUARD_AUTHORITY_CONTRACT_VERSION: "2026-05-authority-beta";
3
+ export declare const GLOBIGUARD_PUBLIC_API_FAMILIES: readonly ["actions.v1", "audit.v1", "queue.v1", "webhooks.v1"];
4
+ export type GlobiguardPublicApiFamily = (typeof GLOBIGUARD_PUBLIC_API_FAMILIES)[number];
5
+ export declare const GLOBIGUARD_AUTHORITY_LEVELS: readonly ["browser_read", "server_authority", "webhook_receiver", "internal_only"];
6
+ export type GlobiguardAuthorityLevel = (typeof GLOBIGUARD_AUTHORITY_LEVELS)[number];
7
+ export interface GlobiguardContractCompatibility {
8
+ contractVersion: typeof GLOBIGUARD_AUTHORITY_CONTRACT_VERSION | string;
9
+ apiFamily: GlobiguardPublicApiFamily;
10
+ minControlPlaneVersion?: string;
11
+ stability: "beta" | "stable" | "deprecated";
12
+ }
13
+ export declare const GLOBIGUARD_AUTHORITY_COMPATIBILITY: {
14
+ readonly contractVersion: "2026-05-authority-beta";
15
+ readonly apiFamilies: readonly ["actions.v1", "audit.v1", "queue.v1", "webhooks.v1"];
16
+ readonly stability: "beta";
17
+ };
18
+ export interface GlobiguardAuthorityBoundary {
19
+ authorityLevel: GlobiguardAuthorityLevel;
20
+ browserSafe: boolean;
21
+ serverSecretRequired: boolean;
22
+ rawPayloadAllowed: boolean;
23
+ }
24
+ export interface GlobiguardBrowserSafeContract {
25
+ boundary: {
26
+ authorityLevel: "browser_read";
27
+ browserSafe: true;
28
+ serverSecretRequired: false;
29
+ rawPayloadAllowed: false;
30
+ };
31
+ }
32
+ export interface GlobiguardServerAuthorityContract {
33
+ boundary: {
34
+ authorityLevel: "server_authority";
35
+ browserSafe: false;
36
+ serverSecretRequired: true;
37
+ rawPayloadAllowed: false;
38
+ };
39
+ }
40
+ export declare const GLOBIGUARD_BROWSER_READ_BOUNDARY: Readonly<{
41
+ authorityLevel: "browser_read";
42
+ browserSafe: true;
43
+ serverSecretRequired: false;
44
+ rawPayloadAllowed: false;
45
+ }>;
46
+ export declare const GLOBIGUARD_SERVER_AUTHORITY_BOUNDARY: Readonly<{
47
+ authorityLevel: "server_authority";
48
+ browserSafe: false;
49
+ serverSecretRequired: true;
50
+ rawPayloadAllowed: false;
51
+ }>;
52
+ export declare const GLOBIGUARD_SDK_ERROR_KINDS: readonly ["POLICY_BLOCKED", "QUEUED_FOR_REVIEW", "STEP_UP_REQUIRED", "PERMISSION_REQUIRED", "EVIDENCE_UNAVAILABLE", "REPLAY_INCOMPLETE", "RATE_LIMITED", "MISCONFIGURED_CLIENT_BOUNDARY", "CONTROL_PLANE_UNAVAILABLE", "WEBHOOK_VERIFICATION_FAILED"];
53
+ export type GlobiguardSdkErrorKind = (typeof GLOBIGUARD_SDK_ERROR_KINDS)[number];
54
+ export interface GlobiguardSdkErrorShape {
55
+ kind: GlobiguardSdkErrorKind;
56
+ message: string;
57
+ authorizationId?: string;
58
+ queueEntryId?: string | null;
59
+ evidencePackageId?: string;
60
+ retryAfterSeconds?: number;
61
+ safeDetails?: Record<string, string | number | boolean | null>;
62
+ }
63
+ export declare const GLOBIGUARD_EVIDENCE_SUMMARY_SCHEMA_VERSION: "2026-05-evidence-summary-beta";
64
+ export declare const GLOBIGUARD_REDACTION_MODES: readonly ["metadata_only", "masked_fields", "customer_managed_raw"];
65
+ export type GlobiguardRedactionMode = (typeof GLOBIGUARD_REDACTION_MODES)[number];
66
+ export interface GlobiguardEvidenceIntegrity {
67
+ checksumAlgorithm: "sha256";
68
+ checksum: string;
69
+ signedAt?: string;
70
+ signerKeyId?: string;
71
+ }
72
+ export interface GlobiguardEvidenceRedactionSummary {
73
+ mode: GlobiguardRedactionMode;
74
+ rawPayloadIncluded: false;
75
+ maskedFieldCount?: number;
76
+ fieldTypes?: string[];
77
+ }
78
+ export interface GlobiguardEvidenceSourceReference {
79
+ kind: "audit_event" | "approval" | "policy_version" | "workflow_run" | "queue_entry" | "control_mapping";
80
+ id: string;
81
+ uri?: string;
82
+ checksum?: string;
83
+ }
84
+ export interface GlobiguardEvidencePackageSummary extends GlobiguardBrowserSafeContract {
85
+ schemaVersion: typeof GLOBIGUARD_EVIDENCE_SUMMARY_SCHEMA_VERSION | string;
86
+ evidencePackageId: string;
87
+ status: "ready" | "pending" | "unavailable";
88
+ generatedAt?: string;
89
+ scope: {
90
+ from?: string | null;
91
+ to?: string | null;
92
+ workflowRunId?: string | null;
93
+ frameworkId?: string | null;
94
+ };
95
+ decisionCounts: Partial<Record<GlobiguardDecision, number>>;
96
+ integrity?: GlobiguardEvidenceIntegrity;
97
+ redaction: GlobiguardEvidenceRedactionSummary;
98
+ sourceRefs: GlobiguardEvidenceSourceReference[];
99
+ artifact?: {
100
+ delivery: "download_url" | "object_ref" | "inline_json";
101
+ uri?: string;
102
+ expiresAt?: string;
103
+ approxBytes?: number;
104
+ };
105
+ disclaimers: string[];
106
+ }
107
+ export interface GlobiguardEvidenceExportDescriptor {
108
+ evidencePackageId: string;
109
+ summary: GlobiguardEvidencePackageSummary;
110
+ artifact?: {
111
+ delivery: "download_url" | "object_ref" | "inline_json";
112
+ uri?: string;
113
+ checksum: string;
114
+ expiresAt?: string;
115
+ approxBytes?: number;
116
+ };
117
+ }
118
+ //# sourceMappingURL=authority.d.ts.map