@capabilityhostprotocol/types 0.2.0 → 0.4.7

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
@@ -1,5 +1,5 @@
1
1
  /**
2
- * CHP v0.1 protocol types.
2
+ * CHP v0.2 protocol types.
3
3
  *
4
4
  * These interfaces mirror the JSON Schemas in the repository root `schemas/`
5
5
  * directory. They are intentionally transport-neutral and do not depend on the
@@ -19,6 +19,7 @@ type InvariantEnforcement = "declarative" | "host" | "runtime";
19
19
  type InvariantFailureBehavior = "deny" | "warn" | "degrade";
20
20
  declare const CHP_V0_1_OUTCOMES: readonly ["success", "failure", "denied", "skipped"];
21
21
  declare const CHP_V0_1_CORE_EVIDENCE_TYPES: readonly ["execution_started", "execution_completed", "execution_failed", "execution_denied", "execution_skipped"];
22
+ declare const CHP_AGENTIC_EVIDENCE_TYPES: readonly ["tool_use", "tool_use_requested", "session_completed", "session_spawn"];
22
23
  interface AssuranceMetadata {
23
24
  level: AssuranceLevel;
24
25
  evidence_policy?: string;
@@ -117,6 +118,41 @@ interface ExecutionEvidence {
117
118
  denial?: DenialReason | null;
118
119
  assurance: AssuranceMetadata;
119
120
  }
121
+ interface ToolUseEvidence extends ExecutionEvidence {
122
+ event_type: "tool_use";
123
+ payload: {
124
+ tool_name: string;
125
+ cwd?: string;
126
+ tool_input?: JsonObject;
127
+ tool_output_preview?: string;
128
+ exit_code?: number | null;
129
+ };
130
+ }
131
+ interface PreToolEvidence extends ExecutionEvidence {
132
+ event_type: "tool_use_requested";
133
+ payload: {
134
+ tool_name: string;
135
+ cwd?: string;
136
+ tool_input?: JsonObject;
137
+ blocked: boolean;
138
+ block_reason?: string | null;
139
+ };
140
+ }
141
+ interface SessionEvidence extends ExecutionEvidence {
142
+ event_type: "session_completed";
143
+ payload: {
144
+ tool_count: number;
145
+ transcript_path?: string;
146
+ };
147
+ }
148
+ interface SessionSpawnEvidence extends ExecutionEvidence {
149
+ event_type: "session_spawn";
150
+ payload: {
151
+ parent_session_id: string;
152
+ child_session_id: string;
153
+ tool_name: string;
154
+ };
155
+ }
120
156
  interface ReplayQuery {
121
157
  correlation_id: string;
122
158
  limit?: number | null;
@@ -144,7 +180,7 @@ declare function isChpV01Outcome(value: string): value is ChpV01ExecutionOutcome
144
180
  * @packageDocumentation
145
181
  */
146
182
 
147
- declare const CHP_VERSION = "0.1";
148
- declare const VERSION = "0.1.0";
183
+ declare const CHP_VERSION = "0.2";
184
+ declare const VERSION = "0.2.2";
149
185
 
150
- export { type AssuranceLevel, type AssuranceMetadata, 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 ReplayQuery, type ReplayResult, VERSION, capabilityUri, isChpV01Outcome };
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 };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * CHP v0.1 protocol types.
2
+ * CHP v0.2 protocol types.
3
3
  *
4
4
  * These interfaces mirror the JSON Schemas in the repository root `schemas/`
5
5
  * directory. They are intentionally transport-neutral and do not depend on the
@@ -19,6 +19,7 @@ type InvariantEnforcement = "declarative" | "host" | "runtime";
19
19
  type InvariantFailureBehavior = "deny" | "warn" | "degrade";
20
20
  declare const CHP_V0_1_OUTCOMES: readonly ["success", "failure", "denied", "skipped"];
21
21
  declare const CHP_V0_1_CORE_EVIDENCE_TYPES: readonly ["execution_started", "execution_completed", "execution_failed", "execution_denied", "execution_skipped"];
22
+ declare const CHP_AGENTIC_EVIDENCE_TYPES: readonly ["tool_use", "tool_use_requested", "session_completed", "session_spawn"];
22
23
  interface AssuranceMetadata {
23
24
  level: AssuranceLevel;
24
25
  evidence_policy?: string;
@@ -117,6 +118,41 @@ interface ExecutionEvidence {
117
118
  denial?: DenialReason | null;
118
119
  assurance: AssuranceMetadata;
119
120
  }
121
+ interface ToolUseEvidence extends ExecutionEvidence {
122
+ event_type: "tool_use";
123
+ payload: {
124
+ tool_name: string;
125
+ cwd?: string;
126
+ tool_input?: JsonObject;
127
+ tool_output_preview?: string;
128
+ exit_code?: number | null;
129
+ };
130
+ }
131
+ interface PreToolEvidence extends ExecutionEvidence {
132
+ event_type: "tool_use_requested";
133
+ payload: {
134
+ tool_name: string;
135
+ cwd?: string;
136
+ tool_input?: JsonObject;
137
+ blocked: boolean;
138
+ block_reason?: string | null;
139
+ };
140
+ }
141
+ interface SessionEvidence extends ExecutionEvidence {
142
+ event_type: "session_completed";
143
+ payload: {
144
+ tool_count: number;
145
+ transcript_path?: string;
146
+ };
147
+ }
148
+ interface SessionSpawnEvidence extends ExecutionEvidence {
149
+ event_type: "session_spawn";
150
+ payload: {
151
+ parent_session_id: string;
152
+ child_session_id: string;
153
+ tool_name: string;
154
+ };
155
+ }
120
156
  interface ReplayQuery {
121
157
  correlation_id: string;
122
158
  limit?: number | null;
@@ -144,7 +180,7 @@ declare function isChpV01Outcome(value: string): value is ChpV01ExecutionOutcome
144
180
  * @packageDocumentation
145
181
  */
146
182
 
147
- declare const CHP_VERSION = "0.1";
148
- declare const VERSION = "0.1.0";
183
+ declare const CHP_VERSION = "0.2";
184
+ declare const VERSION = "0.2.2";
149
185
 
150
- export { type AssuranceLevel, type AssuranceMetadata, 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 ReplayQuery, type ReplayResult, VERSION, capabilityUri, isChpV01Outcome };
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 };
package/dist/index.js CHANGED
@@ -19,6 +19,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
19
19
  // src/index.ts
20
20
  var index_exports = {};
21
21
  __export(index_exports, {
22
+ CHP_AGENTIC_EVIDENCE_TYPES: () => CHP_AGENTIC_EVIDENCE_TYPES,
22
23
  CHP_V0_1_CORE_EVIDENCE_TYPES: () => CHP_V0_1_CORE_EVIDENCE_TYPES,
23
24
  CHP_V0_1_OUTCOMES: () => CHP_V0_1_OUTCOMES,
24
25
  CHP_V0_1_VERSION: () => CHP_V0_1_VERSION,
@@ -44,6 +45,12 @@ var CHP_V0_1_CORE_EVIDENCE_TYPES = [
44
45
  "execution_denied",
45
46
  "execution_skipped"
46
47
  ];
48
+ var CHP_AGENTIC_EVIDENCE_TYPES = [
49
+ "tool_use",
50
+ "tool_use_requested",
51
+ "session_completed",
52
+ "session_spawn"
53
+ ];
47
54
  function capabilityUri(descriptor) {
48
55
  return `${descriptor.id}:${descriptor.version}`;
49
56
  }
@@ -52,10 +59,11 @@ function isChpV01Outcome(value) {
52
59
  }
53
60
 
54
61
  // src/index.ts
55
- var CHP_VERSION = "0.1";
56
- var VERSION = "0.1.0";
62
+ var CHP_VERSION = "0.2";
63
+ var VERSION = "0.2.2";
57
64
  // Annotate the CommonJS export names for ESM import in node:
58
65
  0 && (module.exports = {
66
+ CHP_AGENTIC_EVIDENCE_TYPES,
59
67
  CHP_V0_1_CORE_EVIDENCE_TYPES,
60
68
  CHP_V0_1_OUTCOMES,
61
69
  CHP_V0_1_VERSION,
package/dist/index.mjs CHANGED
@@ -13,6 +13,12 @@ var CHP_V0_1_CORE_EVIDENCE_TYPES = [
13
13
  "execution_denied",
14
14
  "execution_skipped"
15
15
  ];
16
+ var CHP_AGENTIC_EVIDENCE_TYPES = [
17
+ "tool_use",
18
+ "tool_use_requested",
19
+ "session_completed",
20
+ "session_spawn"
21
+ ];
16
22
  function capabilityUri(descriptor) {
17
23
  return `${descriptor.id}:${descriptor.version}`;
18
24
  }
@@ -21,9 +27,10 @@ function isChpV01Outcome(value) {
21
27
  }
22
28
 
23
29
  // src/index.ts
24
- var CHP_VERSION = "0.1";
25
- var VERSION = "0.1.0";
30
+ var CHP_VERSION = "0.2";
31
+ var VERSION = "0.2.2";
26
32
  export {
33
+ CHP_AGENTIC_EVIDENCE_TYPES,
27
34
  CHP_V0_1_CORE_EVIDENCE_TYPES,
28
35
  CHP_V0_1_OUTCOMES,
29
36
  CHP_V0_1_VERSION,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capabilityhostprotocol/types",
3
- "version": "0.2.0",
3
+ "version": "0.4.7",
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/index.ts CHANGED
@@ -12,5 +12,5 @@
12
12
 
13
13
  export * from "./v0_1.js";
14
14
 
15
- export const CHP_VERSION = "0.1";
16
- export const VERSION = "0.1.0";
15
+ export const CHP_VERSION = "0.2";
16
+ export const VERSION = "0.2.2";
package/src/v0_1.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * CHP v0.1 protocol types.
2
+ * CHP v0.2 protocol types.
3
3
  *
4
4
  * These interfaces mirror the JSON Schemas in the repository root `schemas/`
5
5
  * directory. They are intentionally transport-neutral and do not depend on the
@@ -36,6 +36,13 @@ export const CHP_V0_1_CORE_EVIDENCE_TYPES = [
36
36
  "execution_skipped",
37
37
  ] as const;
38
38
 
39
+ export const CHP_AGENTIC_EVIDENCE_TYPES = [
40
+ "tool_use",
41
+ "tool_use_requested",
42
+ "session_completed",
43
+ "session_spawn",
44
+ ] as const;
45
+
39
46
  export interface AssuranceMetadata {
40
47
  level: AssuranceLevel;
41
48
  evidence_policy?: string;
@@ -143,6 +150,45 @@ export interface ExecutionEvidence {
143
150
  assurance: AssuranceMetadata;
144
151
  }
145
152
 
153
+ export interface ToolUseEvidence extends ExecutionEvidence {
154
+ event_type: "tool_use";
155
+ payload: {
156
+ tool_name: string;
157
+ cwd?: string;
158
+ tool_input?: JsonObject;
159
+ tool_output_preview?: string;
160
+ exit_code?: number | null;
161
+ };
162
+ }
163
+
164
+ export interface PreToolEvidence extends ExecutionEvidence {
165
+ event_type: "tool_use_requested";
166
+ payload: {
167
+ tool_name: string;
168
+ cwd?: string;
169
+ tool_input?: JsonObject;
170
+ blocked: boolean;
171
+ block_reason?: string | null;
172
+ };
173
+ }
174
+
175
+ export interface SessionEvidence extends ExecutionEvidence {
176
+ event_type: "session_completed";
177
+ payload: {
178
+ tool_count: number;
179
+ transcript_path?: string;
180
+ };
181
+ }
182
+
183
+ export interface SessionSpawnEvidence extends ExecutionEvidence {
184
+ event_type: "session_spawn";
185
+ payload: {
186
+ parent_session_id: string;
187
+ child_session_id: string;
188
+ tool_name: string;
189
+ };
190
+ }
191
+
146
192
  export interface ReplayQuery {
147
193
  correlation_id: string;
148
194
  limit?: number | null;