@humanagencyp/hap-core 0.4.5 → 0.4.6
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.d.mts +19 -1
- package/dist/index.d.ts +19 -1
- package/package.json +1 -1
- package/src/types.ts +23 -0
package/dist/index.d.mts
CHANGED
|
@@ -118,6 +118,17 @@ type BoundType =
|
|
|
118
118
|
kind: 'enum';
|
|
119
119
|
values: readonly string[];
|
|
120
120
|
};
|
|
121
|
+
/**
|
|
122
|
+
* The measurement dimension of a numeric bound's value.
|
|
123
|
+
*
|
|
124
|
+
* Orthogonal to `BoundType` (which describes how the bound is *enforced*).
|
|
125
|
+
* `unit` describes what the *value* means — 4 minutes vs 4 hours vs 4 EUR.
|
|
126
|
+
*
|
|
127
|
+
* UI uses this to render the unit next to the input. Future gatekeeper
|
|
128
|
+
* versions can use it to enforce unit alignment between profile bounds
|
|
129
|
+
* and tool payloads.
|
|
130
|
+
*/
|
|
131
|
+
type FieldUnit = 'count' | 'minutes' | 'hours' | 'days' | `currency:${string}` | 'percent';
|
|
121
132
|
/**
|
|
122
133
|
* Bounds field definition within a v0.4 profile.
|
|
123
134
|
*
|
|
@@ -138,6 +149,13 @@ interface ProfileBoundsField {
|
|
|
138
149
|
* treat a missing boundType as an error when running in v0.4 mode.
|
|
139
150
|
*/
|
|
140
151
|
boundType?: BoundType;
|
|
152
|
+
/**
|
|
153
|
+
* The measurement dimension of the bound's value. UI renders the unit
|
|
154
|
+
* inline next to the input (e.g. `4 min`, `100 EUR`). Independent from
|
|
155
|
+
* `boundType` — the same unit can appear under different enforcement
|
|
156
|
+
* kinds, and the same boundType can carry different units.
|
|
157
|
+
*/
|
|
158
|
+
unit?: FieldUnit;
|
|
141
159
|
/** @deprecated v0.4: use boundType instead. */
|
|
142
160
|
constraint?: FieldConstraint;
|
|
143
161
|
/** @deprecated v0.4: use boundType: { kind: 'enum', values: [...] }. */
|
|
@@ -580,4 +598,4 @@ declare function listProfiles(): string[];
|
|
|
580
598
|
declare function getAllProfiles(): AgentProfile[];
|
|
581
599
|
declare function clearProfiles(): void;
|
|
582
600
|
|
|
583
|
-
export { type AgentBoundsParams, type AgentContextParams, type AgentFrameParams, type AgentProfile, type Attestation, type AttestationHeader, type AttestationPayload, type BoundType, type CumulativeFieldDef, type CumulativeWindow, type DeclaredFieldDef, type ExecutionContextFieldDef, type ExecutionLogEntry, type ExecutionLogQuery, type ExecutionMappingTransform, type ExecutionMappingValue, type ExecutionPath, type FieldConstraint, type GateQuestion, type GatekeeperError, type GatekeeperRequest, type GatekeeperResult, type ProfileBoundsField, type ProfileContextField, type ProfileFrameField, type ProfileToolGating, type ProfileToolGatingEntry, type ResolvedDomain, attestationId, canonicalBounds, canonicalContext, canonicalFrame, checkAttestationExpiry, clearProfiles, computeBoundsHash, computeContextHash, computeFrameHash, decodeAttestationBlob, encodeAttestationBlob, frameHash, getAllProfiles, getProfile, isV4Attestation, listProfiles, registerProfile, validateBoundsParams, validateContextParams, validateFrameParams, verify, verifyAttestation, verifyAttestationSignature, verifyAttestationV4, verifyBoundsHash, verifyContextHash, verifyFrameHash };
|
|
601
|
+
export { type AgentBoundsParams, type AgentContextParams, type AgentFrameParams, type AgentProfile, type Attestation, type AttestationHeader, type AttestationPayload, type BoundType, type CumulativeFieldDef, type CumulativeWindow, type DeclaredFieldDef, type ExecutionContextFieldDef, type ExecutionLogEntry, type ExecutionLogQuery, type ExecutionMappingTransform, type ExecutionMappingValue, type ExecutionPath, type FieldConstraint, type FieldUnit, type GateQuestion, type GatekeeperError, type GatekeeperRequest, type GatekeeperResult, type ProfileBoundsField, type ProfileContextField, type ProfileFrameField, type ProfileToolGating, type ProfileToolGatingEntry, type ResolvedDomain, attestationId, canonicalBounds, canonicalContext, canonicalFrame, checkAttestationExpiry, clearProfiles, computeBoundsHash, computeContextHash, computeFrameHash, decodeAttestationBlob, encodeAttestationBlob, frameHash, getAllProfiles, getProfile, isV4Attestation, listProfiles, registerProfile, validateBoundsParams, validateContextParams, validateFrameParams, verify, verifyAttestation, verifyAttestationSignature, verifyAttestationV4, verifyBoundsHash, verifyContextHash, verifyFrameHash };
|
package/dist/index.d.ts
CHANGED
|
@@ -118,6 +118,17 @@ type BoundType =
|
|
|
118
118
|
kind: 'enum';
|
|
119
119
|
values: readonly string[];
|
|
120
120
|
};
|
|
121
|
+
/**
|
|
122
|
+
* The measurement dimension of a numeric bound's value.
|
|
123
|
+
*
|
|
124
|
+
* Orthogonal to `BoundType` (which describes how the bound is *enforced*).
|
|
125
|
+
* `unit` describes what the *value* means — 4 minutes vs 4 hours vs 4 EUR.
|
|
126
|
+
*
|
|
127
|
+
* UI uses this to render the unit next to the input. Future gatekeeper
|
|
128
|
+
* versions can use it to enforce unit alignment between profile bounds
|
|
129
|
+
* and tool payloads.
|
|
130
|
+
*/
|
|
131
|
+
type FieldUnit = 'count' | 'minutes' | 'hours' | 'days' | `currency:${string}` | 'percent';
|
|
121
132
|
/**
|
|
122
133
|
* Bounds field definition within a v0.4 profile.
|
|
123
134
|
*
|
|
@@ -138,6 +149,13 @@ interface ProfileBoundsField {
|
|
|
138
149
|
* treat a missing boundType as an error when running in v0.4 mode.
|
|
139
150
|
*/
|
|
140
151
|
boundType?: BoundType;
|
|
152
|
+
/**
|
|
153
|
+
* The measurement dimension of the bound's value. UI renders the unit
|
|
154
|
+
* inline next to the input (e.g. `4 min`, `100 EUR`). Independent from
|
|
155
|
+
* `boundType` — the same unit can appear under different enforcement
|
|
156
|
+
* kinds, and the same boundType can carry different units.
|
|
157
|
+
*/
|
|
158
|
+
unit?: FieldUnit;
|
|
141
159
|
/** @deprecated v0.4: use boundType instead. */
|
|
142
160
|
constraint?: FieldConstraint;
|
|
143
161
|
/** @deprecated v0.4: use boundType: { kind: 'enum', values: [...] }. */
|
|
@@ -580,4 +598,4 @@ declare function listProfiles(): string[];
|
|
|
580
598
|
declare function getAllProfiles(): AgentProfile[];
|
|
581
599
|
declare function clearProfiles(): void;
|
|
582
600
|
|
|
583
|
-
export { type AgentBoundsParams, type AgentContextParams, type AgentFrameParams, type AgentProfile, type Attestation, type AttestationHeader, type AttestationPayload, type BoundType, type CumulativeFieldDef, type CumulativeWindow, type DeclaredFieldDef, type ExecutionContextFieldDef, type ExecutionLogEntry, type ExecutionLogQuery, type ExecutionMappingTransform, type ExecutionMappingValue, type ExecutionPath, type FieldConstraint, type GateQuestion, type GatekeeperError, type GatekeeperRequest, type GatekeeperResult, type ProfileBoundsField, type ProfileContextField, type ProfileFrameField, type ProfileToolGating, type ProfileToolGatingEntry, type ResolvedDomain, attestationId, canonicalBounds, canonicalContext, canonicalFrame, checkAttestationExpiry, clearProfiles, computeBoundsHash, computeContextHash, computeFrameHash, decodeAttestationBlob, encodeAttestationBlob, frameHash, getAllProfiles, getProfile, isV4Attestation, listProfiles, registerProfile, validateBoundsParams, validateContextParams, validateFrameParams, verify, verifyAttestation, verifyAttestationSignature, verifyAttestationV4, verifyBoundsHash, verifyContextHash, verifyFrameHash };
|
|
601
|
+
export { type AgentBoundsParams, type AgentContextParams, type AgentFrameParams, type AgentProfile, type Attestation, type AttestationHeader, type AttestationPayload, type BoundType, type CumulativeFieldDef, type CumulativeWindow, type DeclaredFieldDef, type ExecutionContextFieldDef, type ExecutionLogEntry, type ExecutionLogQuery, type ExecutionMappingTransform, type ExecutionMappingValue, type ExecutionPath, type FieldConstraint, type FieldUnit, type GateQuestion, type GatekeeperError, type GatekeeperRequest, type GatekeeperResult, type ProfileBoundsField, type ProfileContextField, type ProfileFrameField, type ProfileToolGating, type ProfileToolGatingEntry, type ResolvedDomain, attestationId, canonicalBounds, canonicalContext, canonicalFrame, checkAttestationExpiry, clearProfiles, computeBoundsHash, computeContextHash, computeFrameHash, decodeAttestationBlob, encodeAttestationBlob, frameHash, getAllProfiles, getProfile, isV4Attestation, listProfiles, registerProfile, validateBoundsParams, validateContextParams, validateFrameParams, verify, verifyAttestation, verifyAttestationSignature, verifyAttestationV4, verifyBoundsHash, verifyContextHash, verifyFrameHash };
|
package/package.json
CHANGED
package/src/types.ts
CHANGED
|
@@ -117,6 +117,22 @@ export type BoundType =
|
|
|
117
117
|
*/
|
|
118
118
|
| { kind: 'enum'; values: readonly string[] };
|
|
119
119
|
|
|
120
|
+
/**
|
|
121
|
+
* The measurement dimension of a numeric bound's value.
|
|
122
|
+
*
|
|
123
|
+
* Orthogonal to `BoundType` (which describes how the bound is *enforced*).
|
|
124
|
+
* `unit` describes what the *value* means — 4 minutes vs 4 hours vs 4 EUR.
|
|
125
|
+
*
|
|
126
|
+
* UI uses this to render the unit next to the input. Future gatekeeper
|
|
127
|
+
* versions can use it to enforce unit alignment between profile bounds
|
|
128
|
+
* and tool payloads.
|
|
129
|
+
*/
|
|
130
|
+
export type FieldUnit =
|
|
131
|
+
| 'count' // dimensionless integer (no unit suffix in UI)
|
|
132
|
+
| 'minutes' | 'hours' | 'days'
|
|
133
|
+
| `currency:${string}` // ISO 4217 code, e.g. 'currency:EUR'
|
|
134
|
+
| 'percent';
|
|
135
|
+
|
|
120
136
|
/**
|
|
121
137
|
* Bounds field definition within a v0.4 profile.
|
|
122
138
|
*
|
|
@@ -137,6 +153,13 @@ export interface ProfileBoundsField {
|
|
|
137
153
|
* treat a missing boundType as an error when running in v0.4 mode.
|
|
138
154
|
*/
|
|
139
155
|
boundType?: BoundType;
|
|
156
|
+
/**
|
|
157
|
+
* The measurement dimension of the bound's value. UI renders the unit
|
|
158
|
+
* inline next to the input (e.g. `4 min`, `100 EUR`). Independent from
|
|
159
|
+
* `boundType` — the same unit can appear under different enforcement
|
|
160
|
+
* kinds, and the same boundType can carry different units.
|
|
161
|
+
*/
|
|
162
|
+
unit?: FieldUnit;
|
|
140
163
|
/** @deprecated v0.4: use boundType instead. */
|
|
141
164
|
constraint?: FieldConstraint;
|
|
142
165
|
/** @deprecated v0.4: use boundType: { kind: 'enum', values: [...] }. */
|