@capabilityhostprotocol/types 0.4.7 → 0.5.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.d.mts CHANGED
@@ -33,6 +33,45 @@ interface InvariantDescriptor {
33
33
  failure_behavior?: InvariantFailureBehavior;
34
34
  parameters?: JsonObject;
35
35
  }
36
+ interface CostHint {
37
+ token_estimate?: number | null;
38
+ latency_ms_p50?: number | null;
39
+ idempotent?: boolean;
40
+ }
41
+ type BlastRadius = "local" | "session" | "user" | "system";
42
+ interface SafetyHint {
43
+ reversible?: boolean;
44
+ destructive?: boolean;
45
+ requires_human_review?: boolean;
46
+ blast_radius?: BlastRadius;
47
+ }
48
+ type StateMachineStatus = "queued" | "running" | "blocked" | "done" | "failed" | "cancelled";
49
+ interface StateMachineDefinition {
50
+ states: string[];
51
+ transitions: Record<string, string[]>;
52
+ initial_state: string;
53
+ terminal_states: string[];
54
+ }
55
+ interface StateMachineRecord {
56
+ machine_id: string;
57
+ name: string;
58
+ definition: StateMachineDefinition;
59
+ current_state: string;
60
+ status: StateMachineStatus;
61
+ context: JsonObject;
62
+ created_at: string;
63
+ updated_at: string;
64
+ history: JsonObject[];
65
+ }
66
+ interface StateMachineTransitionResult {
67
+ machine_id: string;
68
+ from_state: string;
69
+ to_state: string;
70
+ event: string;
71
+ allowed: boolean;
72
+ reason?: string | null;
73
+ updated_at: string;
74
+ }
36
75
  interface CapabilityDescriptor {
37
76
  id: string;
38
77
  version: string;
@@ -48,6 +87,9 @@ interface CapabilityDescriptor {
48
87
  risk?: CapabilityRisk;
49
88
  assurance?: AssuranceMetadata;
50
89
  metadata?: JsonObject;
90
+ depends_on?: string[] | null;
91
+ cost_hint?: CostHint | null;
92
+ safety_hint?: SafetyHint | null;
51
93
  }
52
94
  interface HostDescriptor {
53
95
  id: string;
@@ -183,4 +225,4 @@ declare function isChpV01Outcome(value: string): value is ChpV01ExecutionOutcome
183
225
  declare const CHP_VERSION = "0.2";
184
226
  declare const VERSION = "0.2.2";
185
227
 
186
- export { type AssuranceLevel, type AssuranceMetadata, CHP_AGENTIC_EVIDENCE_TYPES, CHP_V0_1_CORE_EVIDENCE_TYPES, CHP_V0_1_OUTCOMES, CHP_V0_1_VERSION, CHP_VERSION, type CapabilityDescriptor, type CapabilityRisk, type ChpV01ExecutionOutcome, type ChpV01InvocationMode, type CorrelationContext, type DenialReason, type ExecutionEvidence, type HostDescriptor, type InvariantDescriptor, type InvariantEnforcement, type InvariantFailureBehavior, type InvocationEnvelope, type InvocationResult, type JsonObject, type JsonPrimitive, type JsonValue, type PreToolEvidence, type ReplayQuery, type ReplayResult, type SessionEvidence, type SessionSpawnEvidence, type ToolUseEvidence, VERSION, capabilityUri, isChpV01Outcome };
228
+ export { type AssuranceLevel, type AssuranceMetadata, type BlastRadius, CHP_AGENTIC_EVIDENCE_TYPES, CHP_V0_1_CORE_EVIDENCE_TYPES, CHP_V0_1_OUTCOMES, CHP_V0_1_VERSION, CHP_VERSION, type CapabilityDescriptor, type CapabilityRisk, type ChpV01ExecutionOutcome, type ChpV01InvocationMode, type CorrelationContext, type CostHint, type DenialReason, type ExecutionEvidence, type HostDescriptor, type InvariantDescriptor, type InvariantEnforcement, type InvariantFailureBehavior, type InvocationEnvelope, type InvocationResult, type JsonObject, type JsonPrimitive, type JsonValue, type PreToolEvidence, type ReplayQuery, type ReplayResult, type SafetyHint, type SessionEvidence, type SessionSpawnEvidence, type StateMachineDefinition, type StateMachineRecord, type StateMachineStatus, type StateMachineTransitionResult, type ToolUseEvidence, VERSION, capabilityUri, isChpV01Outcome };
package/dist/index.d.ts CHANGED
@@ -33,6 +33,45 @@ interface InvariantDescriptor {
33
33
  failure_behavior?: InvariantFailureBehavior;
34
34
  parameters?: JsonObject;
35
35
  }
36
+ interface CostHint {
37
+ token_estimate?: number | null;
38
+ latency_ms_p50?: number | null;
39
+ idempotent?: boolean;
40
+ }
41
+ type BlastRadius = "local" | "session" | "user" | "system";
42
+ interface SafetyHint {
43
+ reversible?: boolean;
44
+ destructive?: boolean;
45
+ requires_human_review?: boolean;
46
+ blast_radius?: BlastRadius;
47
+ }
48
+ type StateMachineStatus = "queued" | "running" | "blocked" | "done" | "failed" | "cancelled";
49
+ interface StateMachineDefinition {
50
+ states: string[];
51
+ transitions: Record<string, string[]>;
52
+ initial_state: string;
53
+ terminal_states: string[];
54
+ }
55
+ interface StateMachineRecord {
56
+ machine_id: string;
57
+ name: string;
58
+ definition: StateMachineDefinition;
59
+ current_state: string;
60
+ status: StateMachineStatus;
61
+ context: JsonObject;
62
+ created_at: string;
63
+ updated_at: string;
64
+ history: JsonObject[];
65
+ }
66
+ interface StateMachineTransitionResult {
67
+ machine_id: string;
68
+ from_state: string;
69
+ to_state: string;
70
+ event: string;
71
+ allowed: boolean;
72
+ reason?: string | null;
73
+ updated_at: string;
74
+ }
36
75
  interface CapabilityDescriptor {
37
76
  id: string;
38
77
  version: string;
@@ -48,6 +87,9 @@ interface CapabilityDescriptor {
48
87
  risk?: CapabilityRisk;
49
88
  assurance?: AssuranceMetadata;
50
89
  metadata?: JsonObject;
90
+ depends_on?: string[] | null;
91
+ cost_hint?: CostHint | null;
92
+ safety_hint?: SafetyHint | null;
51
93
  }
52
94
  interface HostDescriptor {
53
95
  id: string;
@@ -183,4 +225,4 @@ declare function isChpV01Outcome(value: string): value is ChpV01ExecutionOutcome
183
225
  declare const CHP_VERSION = "0.2";
184
226
  declare const VERSION = "0.2.2";
185
227
 
186
- export { type AssuranceLevel, type AssuranceMetadata, CHP_AGENTIC_EVIDENCE_TYPES, CHP_V0_1_CORE_EVIDENCE_TYPES, CHP_V0_1_OUTCOMES, CHP_V0_1_VERSION, CHP_VERSION, type CapabilityDescriptor, type CapabilityRisk, type ChpV01ExecutionOutcome, type ChpV01InvocationMode, type CorrelationContext, type DenialReason, type ExecutionEvidence, type HostDescriptor, type InvariantDescriptor, type InvariantEnforcement, type InvariantFailureBehavior, type InvocationEnvelope, type InvocationResult, type JsonObject, type JsonPrimitive, type JsonValue, type PreToolEvidence, type ReplayQuery, type ReplayResult, type SessionEvidence, type SessionSpawnEvidence, type ToolUseEvidence, VERSION, capabilityUri, isChpV01Outcome };
228
+ export { type AssuranceLevel, type AssuranceMetadata, type BlastRadius, CHP_AGENTIC_EVIDENCE_TYPES, CHP_V0_1_CORE_EVIDENCE_TYPES, CHP_V0_1_OUTCOMES, CHP_V0_1_VERSION, CHP_VERSION, type CapabilityDescriptor, type CapabilityRisk, type ChpV01ExecutionOutcome, type ChpV01InvocationMode, type CorrelationContext, type CostHint, type DenialReason, type ExecutionEvidence, type HostDescriptor, type InvariantDescriptor, type InvariantEnforcement, type InvariantFailureBehavior, type InvocationEnvelope, type InvocationResult, type JsonObject, type JsonPrimitive, type JsonValue, type PreToolEvidence, type ReplayQuery, type ReplayResult, type SafetyHint, type SessionEvidence, type SessionSpawnEvidence, type StateMachineDefinition, type StateMachineRecord, type StateMachineStatus, type StateMachineTransitionResult, type ToolUseEvidence, VERSION, capabilityUri, isChpV01Outcome };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capabilityhostprotocol/types",
3
- "version": "0.4.7",
3
+ "version": "0.5.0",
4
4
  "description": "TypeScript types for the Capability Host Protocol (CHP).",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
package/src/v0_1.ts CHANGED
@@ -58,6 +58,52 @@ export interface InvariantDescriptor {
58
58
  parameters?: JsonObject;
59
59
  }
60
60
 
61
+ export interface CostHint {
62
+ token_estimate?: number | null;
63
+ latency_ms_p50?: number | null;
64
+ idempotent?: boolean;
65
+ }
66
+
67
+ export type BlastRadius = "local" | "session" | "user" | "system";
68
+
69
+ export interface SafetyHint {
70
+ reversible?: boolean;
71
+ destructive?: boolean;
72
+ requires_human_review?: boolean;
73
+ blast_radius?: BlastRadius;
74
+ }
75
+
76
+ export type StateMachineStatus = "queued" | "running" | "blocked" | "done" | "failed" | "cancelled";
77
+
78
+ export interface StateMachineDefinition {
79
+ states: string[];
80
+ transitions: Record<string, string[]>;
81
+ initial_state: string;
82
+ terminal_states: string[];
83
+ }
84
+
85
+ export interface StateMachineRecord {
86
+ machine_id: string;
87
+ name: string;
88
+ definition: StateMachineDefinition;
89
+ current_state: string;
90
+ status: StateMachineStatus;
91
+ context: JsonObject;
92
+ created_at: string;
93
+ updated_at: string;
94
+ history: JsonObject[];
95
+ }
96
+
97
+ export interface StateMachineTransitionResult {
98
+ machine_id: string;
99
+ from_state: string;
100
+ to_state: string;
101
+ event: string;
102
+ allowed: boolean;
103
+ reason?: string | null;
104
+ updated_at: string;
105
+ }
106
+
61
107
  export interface CapabilityDescriptor {
62
108
  id: string;
63
109
  version: string;
@@ -73,6 +119,9 @@ export interface CapabilityDescriptor {
73
119
  risk?: CapabilityRisk;
74
120
  assurance?: AssuranceMetadata;
75
121
  metadata?: JsonObject;
122
+ depends_on?: string[] | null;
123
+ cost_hint?: CostHint | null;
124
+ safety_hint?: SafetyHint | null;
76
125
  }
77
126
 
78
127
  export interface HostDescriptor {