@codelia/shared-types 0.1.84 → 0.1.86

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
@@ -32,7 +32,9 @@ __export(index_exports, {
32
32
  isImageModelView: () => isImageModelView,
33
33
  isModelFastMode: () => isModelFastMode,
34
34
  isModelReasoningLevel: () => isModelReasoningLevel,
35
- parseApprovalMode: () => parseApprovalMode
35
+ parseApprovalMode: () => parseApprovalMode,
36
+ parseSandboxMode: () => parseSandboxMode,
37
+ sandboxModes: () => sandboxModes
36
38
  });
37
39
  module.exports = __toCommonJS(index_exports);
38
40
 
@@ -43,6 +45,12 @@ var parseApprovalMode = (value) => {
43
45
  }
44
46
  return void 0;
45
47
  };
48
+ var sandboxModes = [
49
+ "readonly",
50
+ "workspace-write",
51
+ "full-access"
52
+ ];
53
+ var parseSandboxMode = (value) => sandboxModes.find((mode) => mode === value);
46
54
 
47
55
  // src/attachment.ts
48
56
  var ATTACHMENT_ID_PATTERN = /^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$/;
@@ -112,5 +120,7 @@ var SkillSearchResultSchema = import_zod.z.object({
112
120
  isImageModelView,
113
121
  isModelFastMode,
114
122
  isModelReasoningLevel,
115
- parseApprovalMode
123
+ parseApprovalMode,
124
+ parseSandboxMode,
125
+ sandboxModes
116
126
  });
package/dist/index.d.cts CHANGED
@@ -2,6 +2,9 @@ import { z } from 'zod';
2
2
 
3
3
  type ApprovalMode = "minimal" | "trusted" | "full-access";
4
4
  declare const parseApprovalMode: (value: unknown) => ApprovalMode | undefined;
5
+ declare const sandboxModes: readonly ["readonly", "workspace-write", "full-access"];
6
+ type SandboxMode = (typeof sandboxModes)[number];
7
+ declare const parseSandboxMode: (value: unknown) => SandboxMode | undefined;
5
8
 
6
9
  declare const ATTACHMENT_ID_PATTERN: RegExp;
7
10
  /** Immutable runtime-owned attachment metadata. No source path is retained. */
@@ -424,4 +427,37 @@ type AgentMessage = {
424
427
  content: string;
425
428
  };
426
429
 
427
- export { ATTACHMENT_ID_PATTERN, type AgentEvent, type AgentMessage, type ApprovalMode, type AttachedImageMetadata, type AttachmentRef, type AttachmentRefPart, type BuiltinProviderName, type CompactionCompleteEvent, type CompactionStartEvent, type ContentPart, type ContextUsage, type ContextUsageBreakdownEntry, type ContextUsageCategory, type DocumentPart, type FinalResponseEvent, type GeneratedImageMetadata, type HiddenUserMessageEvent, IMAGE_REFERENCE_MAX_COUNT, type ImageArtifactMetadata, type ImageArtifactRef, type ImageMediaType, type ImageModelView, type ImagePart, type ImageRefPart, type LlmCallTiming, type LlmRetryEvent, type LlmStatusEvent, MODEL_REASONING_LEVELS, type ModelFastMode, type ModelReasoningLevel, type OtherPart, type PermissionPreviewEvent, type PermissionReadyEvent, type ProviderName, type ReasoningDeltaEvent, type ReasoningEvent, type RunErrorInfo, type SessionStateSummary, type SkillCatalog, SkillCatalogSchema, type SkillLoadError, SkillLoadErrorSchema, type SkillMetadata, SkillMetadataSchema, type SkillScope, SkillScopeSchema, type SkillSearchReason, SkillSearchReasonSchema, type SkillSearchResult, SkillSearchResultSchema, type SteerAppliedEvent, type StepCompleteEvent, type StepStartEvent, type SubagentLineage, type TaskProgress, type TaskTerminationReason, type TaskUsage, type TextDeltaEvent, type TextEvent, type TextPart, type ToolCallEvent, type ToolResultEvent, isImageModelView, isModelFastMode, isModelReasoningLevel, parseApprovalMode };
430
+ type GoalStatus = "active" | "paused" | "blocked" | "usage_limited" | "budget_limited" | "complete";
431
+ type GoalStopReason = "user" | "turn_limit" | "run_error" | "checkpoint_failed" | "interrupted" | "blocker";
432
+ type GoalRecord = {
433
+ session_id: string;
434
+ goal_id: string;
435
+ revision: number;
436
+ objective: string;
437
+ status: GoalStatus;
438
+ stop_reason?: GoalStopReason;
439
+ stop_detail?: string;
440
+ token_budget: number | null;
441
+ tokens_used: number;
442
+ usage_known: boolean;
443
+ activation_id: string;
444
+ automatic_runs: number;
445
+ created_at: string;
446
+ updated_at: string;
447
+ };
448
+ type GoalSnapshot = {
449
+ session_id: string | null;
450
+ goal: GoalRecord | null;
451
+ can_continue: boolean;
452
+ accepted_run_id?: string;
453
+ active_run_id?: string;
454
+ };
455
+ type GoalOffer = {
456
+ session_id: string;
457
+ goal_id: string;
458
+ revision: number;
459
+ continuation_id: string;
460
+ after_run_id?: string;
461
+ };
462
+
463
+ export { ATTACHMENT_ID_PATTERN, type AgentEvent, type AgentMessage, type ApprovalMode, type AttachedImageMetadata, type AttachmentRef, type AttachmentRefPart, type BuiltinProviderName, type CompactionCompleteEvent, type CompactionStartEvent, type ContentPart, type ContextUsage, type ContextUsageBreakdownEntry, type ContextUsageCategory, type DocumentPart, type FinalResponseEvent, type GeneratedImageMetadata, type GoalOffer, type GoalRecord, type GoalSnapshot, type GoalStatus, type GoalStopReason, type HiddenUserMessageEvent, IMAGE_REFERENCE_MAX_COUNT, type ImageArtifactMetadata, type ImageArtifactRef, type ImageMediaType, type ImageModelView, type ImagePart, type ImageRefPart, type LlmCallTiming, type LlmRetryEvent, type LlmStatusEvent, MODEL_REASONING_LEVELS, type ModelFastMode, type ModelReasoningLevel, type OtherPart, type PermissionPreviewEvent, type PermissionReadyEvent, type ProviderName, type ReasoningDeltaEvent, type ReasoningEvent, type RunErrorInfo, type SandboxMode, type SessionStateSummary, type SkillCatalog, SkillCatalogSchema, type SkillLoadError, SkillLoadErrorSchema, type SkillMetadata, SkillMetadataSchema, type SkillScope, SkillScopeSchema, type SkillSearchReason, SkillSearchReasonSchema, type SkillSearchResult, SkillSearchResultSchema, type SteerAppliedEvent, type StepCompleteEvent, type StepStartEvent, type SubagentLineage, type TaskProgress, type TaskTerminationReason, type TaskUsage, type TextDeltaEvent, type TextEvent, type TextPart, type ToolCallEvent, type ToolResultEvent, isImageModelView, isModelFastMode, isModelReasoningLevel, parseApprovalMode, parseSandboxMode, sandboxModes };
package/dist/index.d.ts CHANGED
@@ -2,6 +2,9 @@ import { z } from 'zod';
2
2
 
3
3
  type ApprovalMode = "minimal" | "trusted" | "full-access";
4
4
  declare const parseApprovalMode: (value: unknown) => ApprovalMode | undefined;
5
+ declare const sandboxModes: readonly ["readonly", "workspace-write", "full-access"];
6
+ type SandboxMode = (typeof sandboxModes)[number];
7
+ declare const parseSandboxMode: (value: unknown) => SandboxMode | undefined;
5
8
 
6
9
  declare const ATTACHMENT_ID_PATTERN: RegExp;
7
10
  /** Immutable runtime-owned attachment metadata. No source path is retained. */
@@ -424,4 +427,37 @@ type AgentMessage = {
424
427
  content: string;
425
428
  };
426
429
 
427
- export { ATTACHMENT_ID_PATTERN, type AgentEvent, type AgentMessage, type ApprovalMode, type AttachedImageMetadata, type AttachmentRef, type AttachmentRefPart, type BuiltinProviderName, type CompactionCompleteEvent, type CompactionStartEvent, type ContentPart, type ContextUsage, type ContextUsageBreakdownEntry, type ContextUsageCategory, type DocumentPart, type FinalResponseEvent, type GeneratedImageMetadata, type HiddenUserMessageEvent, IMAGE_REFERENCE_MAX_COUNT, type ImageArtifactMetadata, type ImageArtifactRef, type ImageMediaType, type ImageModelView, type ImagePart, type ImageRefPart, type LlmCallTiming, type LlmRetryEvent, type LlmStatusEvent, MODEL_REASONING_LEVELS, type ModelFastMode, type ModelReasoningLevel, type OtherPart, type PermissionPreviewEvent, type PermissionReadyEvent, type ProviderName, type ReasoningDeltaEvent, type ReasoningEvent, type RunErrorInfo, type SessionStateSummary, type SkillCatalog, SkillCatalogSchema, type SkillLoadError, SkillLoadErrorSchema, type SkillMetadata, SkillMetadataSchema, type SkillScope, SkillScopeSchema, type SkillSearchReason, SkillSearchReasonSchema, type SkillSearchResult, SkillSearchResultSchema, type SteerAppliedEvent, type StepCompleteEvent, type StepStartEvent, type SubagentLineage, type TaskProgress, type TaskTerminationReason, type TaskUsage, type TextDeltaEvent, type TextEvent, type TextPart, type ToolCallEvent, type ToolResultEvent, isImageModelView, isModelFastMode, isModelReasoningLevel, parseApprovalMode };
430
+ type GoalStatus = "active" | "paused" | "blocked" | "usage_limited" | "budget_limited" | "complete";
431
+ type GoalStopReason = "user" | "turn_limit" | "run_error" | "checkpoint_failed" | "interrupted" | "blocker";
432
+ type GoalRecord = {
433
+ session_id: string;
434
+ goal_id: string;
435
+ revision: number;
436
+ objective: string;
437
+ status: GoalStatus;
438
+ stop_reason?: GoalStopReason;
439
+ stop_detail?: string;
440
+ token_budget: number | null;
441
+ tokens_used: number;
442
+ usage_known: boolean;
443
+ activation_id: string;
444
+ automatic_runs: number;
445
+ created_at: string;
446
+ updated_at: string;
447
+ };
448
+ type GoalSnapshot = {
449
+ session_id: string | null;
450
+ goal: GoalRecord | null;
451
+ can_continue: boolean;
452
+ accepted_run_id?: string;
453
+ active_run_id?: string;
454
+ };
455
+ type GoalOffer = {
456
+ session_id: string;
457
+ goal_id: string;
458
+ revision: number;
459
+ continuation_id: string;
460
+ after_run_id?: string;
461
+ };
462
+
463
+ export { ATTACHMENT_ID_PATTERN, type AgentEvent, type AgentMessage, type ApprovalMode, type AttachedImageMetadata, type AttachmentRef, type AttachmentRefPart, type BuiltinProviderName, type CompactionCompleteEvent, type CompactionStartEvent, type ContentPart, type ContextUsage, type ContextUsageBreakdownEntry, type ContextUsageCategory, type DocumentPart, type FinalResponseEvent, type GeneratedImageMetadata, type GoalOffer, type GoalRecord, type GoalSnapshot, type GoalStatus, type GoalStopReason, type HiddenUserMessageEvent, IMAGE_REFERENCE_MAX_COUNT, type ImageArtifactMetadata, type ImageArtifactRef, type ImageMediaType, type ImageModelView, type ImagePart, type ImageRefPart, type LlmCallTiming, type LlmRetryEvent, type LlmStatusEvent, MODEL_REASONING_LEVELS, type ModelFastMode, type ModelReasoningLevel, type OtherPart, type PermissionPreviewEvent, type PermissionReadyEvent, type ProviderName, type ReasoningDeltaEvent, type ReasoningEvent, type RunErrorInfo, type SandboxMode, type SessionStateSummary, type SkillCatalog, SkillCatalogSchema, type SkillLoadError, SkillLoadErrorSchema, type SkillMetadata, SkillMetadataSchema, type SkillScope, SkillScopeSchema, type SkillSearchReason, SkillSearchReasonSchema, type SkillSearchResult, SkillSearchResultSchema, type SteerAppliedEvent, type StepCompleteEvent, type StepStartEvent, type SubagentLineage, type TaskProgress, type TaskTerminationReason, type TaskUsage, type TextDeltaEvent, type TextEvent, type TextPart, type ToolCallEvent, type ToolResultEvent, isImageModelView, isModelFastMode, isModelReasoningLevel, parseApprovalMode, parseSandboxMode, sandboxModes };
package/dist/index.js CHANGED
@@ -5,6 +5,12 @@ var parseApprovalMode = (value) => {
5
5
  }
6
6
  return void 0;
7
7
  };
8
+ var sandboxModes = [
9
+ "readonly",
10
+ "workspace-write",
11
+ "full-access"
12
+ ];
13
+ var parseSandboxMode = (value) => sandboxModes.find((mode) => mode === value);
8
14
 
9
15
  // src/attachment.ts
10
16
  var ATTACHMENT_ID_PATTERN = /^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$/;
@@ -73,5 +79,7 @@ export {
73
79
  isImageModelView,
74
80
  isModelFastMode,
75
81
  isModelReasoningLevel,
76
- parseApprovalMode
82
+ parseApprovalMode,
83
+ parseSandboxMode,
84
+ sandboxModes
77
85
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codelia/shared-types",
3
- "version": "0.1.84",
3
+ "version": "0.1.86",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "files": [