@codelia/shared-types 0.1.19 → 0.1.21

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 CHANGED
@@ -25,10 +25,19 @@ __export(index_exports, {
25
25
  SkillMetadataSchema: () => SkillMetadataSchema,
26
26
  SkillScopeSchema: () => SkillScopeSchema,
27
27
  SkillSearchReasonSchema: () => SkillSearchReasonSchema,
28
- SkillSearchResultSchema: () => SkillSearchResultSchema
28
+ SkillSearchResultSchema: () => SkillSearchResultSchema,
29
+ parseApprovalMode: () => parseApprovalMode
29
30
  });
30
31
  module.exports = __toCommonJS(index_exports);
31
32
 
33
+ // src/approval.ts
34
+ var parseApprovalMode = (value) => {
35
+ if (value === "minimal" || value === "trusted" || value === "full-access") {
36
+ return value;
37
+ }
38
+ return void 0;
39
+ };
40
+
32
41
  // src/skills/schema.ts
33
42
  var import_zod = require("zod");
34
43
  var SkillScopeSchema = import_zod.z.enum(["repo", "user"]);
@@ -68,5 +77,6 @@ var SkillSearchResultSchema = import_zod.z.object({
68
77
  SkillMetadataSchema,
69
78
  SkillScopeSchema,
70
79
  SkillSearchReasonSchema,
71
- SkillSearchResultSchema
80
+ SkillSearchResultSchema,
81
+ parseApprovalMode
72
82
  });
package/dist/index.d.cts CHANGED
@@ -1,5 +1,8 @@
1
1
  import { z } from 'zod';
2
2
 
3
+ type ApprovalMode = "minimal" | "trusted" | "full-access";
4
+ declare const parseApprovalMode: (value: unknown) => ApprovalMode | undefined;
5
+
3
6
  type TextEvent = {
4
7
  type: "text";
5
8
  content: string;
@@ -154,4 +157,4 @@ type SkillCatalog = z.infer<typeof SkillCatalogSchema>;
154
157
  type SkillSearchReason = z.infer<typeof SkillSearchReasonSchema>;
155
158
  type SkillSearchResult = z.infer<typeof SkillSearchResultSchema>;
156
159
 
157
- export { type AgentEvent, type CompactionCompleteEvent, type CompactionStartEvent, type FinalResponseEvent, type HiddenUserMessageEvent, type PermissionPreviewEvent, type PermissionReadyEvent, type ReasoningEvent, type SessionStateSummary, type SkillCatalog, SkillCatalogSchema, type SkillLoadError, SkillLoadErrorSchema, type SkillMetadata, SkillMetadataSchema, type SkillScope, SkillScopeSchema, type SkillSearchReason, SkillSearchReasonSchema, type SkillSearchResult, SkillSearchResultSchema, type StepCompleteEvent, type StepStartEvent, type TextEvent, type ToolCallEvent, type ToolResultEvent };
160
+ export { type AgentEvent, type ApprovalMode, type CompactionCompleteEvent, type CompactionStartEvent, type FinalResponseEvent, type HiddenUserMessageEvent, type PermissionPreviewEvent, type PermissionReadyEvent, type ReasoningEvent, type SessionStateSummary, type SkillCatalog, SkillCatalogSchema, type SkillLoadError, SkillLoadErrorSchema, type SkillMetadata, SkillMetadataSchema, type SkillScope, SkillScopeSchema, type SkillSearchReason, SkillSearchReasonSchema, type SkillSearchResult, SkillSearchResultSchema, type StepCompleteEvent, type StepStartEvent, type TextEvent, type ToolCallEvent, type ToolResultEvent, parseApprovalMode };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,8 @@
1
1
  import { z } from 'zod';
2
2
 
3
+ type ApprovalMode = "minimal" | "trusted" | "full-access";
4
+ declare const parseApprovalMode: (value: unknown) => ApprovalMode | undefined;
5
+
3
6
  type TextEvent = {
4
7
  type: "text";
5
8
  content: string;
@@ -154,4 +157,4 @@ type SkillCatalog = z.infer<typeof SkillCatalogSchema>;
154
157
  type SkillSearchReason = z.infer<typeof SkillSearchReasonSchema>;
155
158
  type SkillSearchResult = z.infer<typeof SkillSearchResultSchema>;
156
159
 
157
- export { type AgentEvent, type CompactionCompleteEvent, type CompactionStartEvent, type FinalResponseEvent, type HiddenUserMessageEvent, type PermissionPreviewEvent, type PermissionReadyEvent, type ReasoningEvent, type SessionStateSummary, type SkillCatalog, SkillCatalogSchema, type SkillLoadError, SkillLoadErrorSchema, type SkillMetadata, SkillMetadataSchema, type SkillScope, SkillScopeSchema, type SkillSearchReason, SkillSearchReasonSchema, type SkillSearchResult, SkillSearchResultSchema, type StepCompleteEvent, type StepStartEvent, type TextEvent, type ToolCallEvent, type ToolResultEvent };
160
+ export { type AgentEvent, type ApprovalMode, type CompactionCompleteEvent, type CompactionStartEvent, type FinalResponseEvent, type HiddenUserMessageEvent, type PermissionPreviewEvent, type PermissionReadyEvent, type ReasoningEvent, type SessionStateSummary, type SkillCatalog, SkillCatalogSchema, type SkillLoadError, SkillLoadErrorSchema, type SkillMetadata, SkillMetadataSchema, type SkillScope, SkillScopeSchema, type SkillSearchReason, SkillSearchReasonSchema, type SkillSearchResult, SkillSearchResultSchema, type StepCompleteEvent, type StepStartEvent, type TextEvent, type ToolCallEvent, type ToolResultEvent, parseApprovalMode };
package/dist/index.js CHANGED
@@ -1,3 +1,11 @@
1
+ // src/approval.ts
2
+ var parseApprovalMode = (value) => {
3
+ if (value === "minimal" || value === "trusted" || value === "full-access") {
4
+ return value;
5
+ }
6
+ return void 0;
7
+ };
8
+
1
9
  // src/skills/schema.ts
2
10
  import { z } from "zod";
3
11
  var SkillScopeSchema = z.enum(["repo", "user"]);
@@ -36,5 +44,6 @@ export {
36
44
  SkillMetadataSchema,
37
45
  SkillScopeSchema,
38
46
  SkillSearchReasonSchema,
39
- SkillSearchResultSchema
47
+ SkillSearchResultSchema,
48
+ parseApprovalMode
40
49
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codelia/shared-types",
3
- "version": "0.1.19",
3
+ "version": "0.1.21",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"