@inspecto-dev/types 0.3.0 → 0.3.2

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
@@ -22,12 +22,51 @@ var index_exports = {};
22
22
  __export(index_exports, {
23
23
  DEFAULT_INTENTS: () => DEFAULT_INTENTS,
24
24
  DEFAULT_PROVIDER_MODE: () => DEFAULT_PROVIDER_MODE,
25
+ DUAL_MODE_PROVIDER_CAPABILITIES: () => DUAL_MODE_PROVIDER_CAPABILITIES,
26
+ HOST_IDE_IDS: () => HOST_IDE_IDS,
27
+ HOST_IDE_LABELS: () => HOST_IDE_LABELS,
25
28
  INSPECTO_API_PATHS: () => INSPECTO_API_PATHS,
26
- VALID_MODES: () => VALID_MODES
29
+ VALID_MODES: () => VALID_MODES,
30
+ getDualModeProviderCapability: () => getDualModeProviderCapability,
31
+ getHostIdeLabel: () => getHostIdeLabel,
32
+ isSupportedHostIde: () => isSupportedHostIde
27
33
  });
28
34
  module.exports = __toCommonJS(index_exports);
29
35
 
30
36
  // src/providers.ts
37
+ var HOST_IDE_IDS = ["vscode", "cursor", "trae", "trae-cn"];
38
+ var HOST_IDE_LABELS = {
39
+ vscode: "VS Code",
40
+ cursor: "Cursor",
41
+ trae: "Trae",
42
+ "trae-cn": "Trae CN"
43
+ };
44
+ var DUAL_MODE_PROVIDER_CAPABILITIES = {
45
+ codex: {
46
+ label: "Codex",
47
+ extensionId: "openai.chatgpt",
48
+ cliBin: "codex"
49
+ },
50
+ "claude-code": {
51
+ label: "Claude Code",
52
+ extensionId: "anthropic.claude-code",
53
+ cliBin: "claude"
54
+ },
55
+ gemini: {
56
+ label: "Gemini",
57
+ extensionId: "google.geminicodeassist",
58
+ cliBin: "gemini"
59
+ }
60
+ };
61
+ function isSupportedHostIde(value) {
62
+ return Boolean(value && HOST_IDE_IDS.includes(value));
63
+ }
64
+ function getHostIdeLabel(ide) {
65
+ return HOST_IDE_LABELS[ide];
66
+ }
67
+ function getDualModeProviderCapability(provider) {
68
+ return DUAL_MODE_PROVIDER_CAPABILITIES[provider];
69
+ }
31
70
  var VALID_MODES = {
32
71
  copilot: ["extension"],
33
72
  "claude-code": ["extension", "cli"],
@@ -108,6 +147,12 @@ Keep behavior unchanged unless a change is clearly justified.`
108
147
  0 && (module.exports = {
109
148
  DEFAULT_INTENTS,
110
149
  DEFAULT_PROVIDER_MODE,
150
+ DUAL_MODE_PROVIDER_CAPABILITIES,
151
+ HOST_IDE_IDS,
152
+ HOST_IDE_LABELS,
111
153
  INSPECTO_API_PATHS,
112
- VALID_MODES
154
+ VALID_MODES,
155
+ getDualModeProviderCapability,
156
+ getHostIdeLabel,
157
+ isSupportedHostIde
113
158
  });
package/dist/index.d.cts CHANGED
@@ -31,6 +31,42 @@ interface InspectoSettings {
31
31
  'prompt.autoSend'?: boolean;
32
32
  'prompt.annotationResponseMode'?: 'unified' | 'per-annotation';
33
33
  }
34
+ declare const HOST_IDE_IDS: readonly ["vscode", "cursor", "trae", "trae-cn"];
35
+ type SupportedHostIde = (typeof HOST_IDE_IDS)[number];
36
+ declare const HOST_IDE_LABELS: Record<SupportedHostIde, string>;
37
+ declare const DUAL_MODE_PROVIDER_CAPABILITIES: {
38
+ readonly codex: {
39
+ readonly label: "Codex";
40
+ readonly extensionId: "openai.chatgpt";
41
+ readonly cliBin: "codex";
42
+ };
43
+ readonly 'claude-code': {
44
+ readonly label: "Claude Code";
45
+ readonly extensionId: "anthropic.claude-code";
46
+ readonly cliBin: "claude";
47
+ };
48
+ readonly gemini: {
49
+ readonly label: "Gemini";
50
+ readonly extensionId: "google.geminicodeassist";
51
+ readonly cliBin: "gemini";
52
+ };
53
+ };
54
+ type DualModeProvider = keyof typeof DUAL_MODE_PROVIDER_CAPABILITIES;
55
+ declare function isSupportedHostIde(value: string | undefined): value is SupportedHostIde;
56
+ declare function getHostIdeLabel(ide: SupportedHostIde): string;
57
+ declare function getDualModeProviderCapability(provider: string): {
58
+ readonly label: "Codex";
59
+ readonly extensionId: "openai.chatgpt";
60
+ readonly cliBin: "codex";
61
+ } | {
62
+ readonly label: "Claude Code";
63
+ readonly extensionId: "anthropic.claude-code";
64
+ readonly cliBin: "claude";
65
+ } | {
66
+ readonly label: "Gemini";
67
+ readonly extensionId: "google.geminicodeassist";
68
+ readonly cliBin: "gemini";
69
+ };
34
70
  declare const VALID_MODES: Record<Provider, ProviderMode[]>;
35
71
  declare const DEFAULT_PROVIDER_MODE: Record<Provider, ProviderMode>;
36
72
  interface ToolOverrides {
@@ -305,4 +341,4 @@ declare const DEFAULT_INTENTS: {
305
341
  prompt: string;
306
342
  }[];
307
343
 
308
- export { type AiErrorCode, type AiIntent, type AiIntentConfig, type AiPayload, type AiStrategyContext, type AiStrategyResult, type Annotation, type AnnotationIntent, type AnnotationSession, type AnnotationTarget, type AnnotationTransport, type AnnotationTransportTarget, type ChannelDef, DEFAULT_INTENTS, DEFAULT_PROVIDER_MODE, type FeedbackRecord, type FeedbackRecordDraft, type FeedbackRecordSession, type HotKey, type HotKeyString, type HotKeys, INSPECTO_API_PATHS, type IdeInfo, type IdeType, type InspectoConfig, type InspectoPromptsConfig, type InspectoSettings, type InspectorOptions, type IntentConfig, type IntentConfigBase, type IntentLabels, type LogLevel, type OpenFileRequest, type PathType, type Provider, type ProviderInfo, type ProviderMode, type RuntimeContextConfig, type RuntimeContextEnvelope, type RuntimeContextSummary, type RuntimeEvidenceKind, type RuntimeEvidenceLevel, type RuntimeEvidenceRecord, type ScreenshotContext, type ScreenshotContextConfig, type SendAnnotationsToAiRequest, type SendAnnotationsToAiResponse, type SendToAiRequest, type SendToAiResponse, type ServerState, type SnippetRequest, type SnippetResponse, type SourceAttrValue, type SourceLocation, type ToolOverrides, type UnpluginOptions, VALID_MODES };
344
+ export { type AiErrorCode, type AiIntent, type AiIntentConfig, type AiPayload, type AiStrategyContext, type AiStrategyResult, type Annotation, type AnnotationIntent, type AnnotationSession, type AnnotationTarget, type AnnotationTransport, type AnnotationTransportTarget, type ChannelDef, DEFAULT_INTENTS, DEFAULT_PROVIDER_MODE, DUAL_MODE_PROVIDER_CAPABILITIES, type DualModeProvider, type FeedbackRecord, type FeedbackRecordDraft, type FeedbackRecordSession, HOST_IDE_IDS, HOST_IDE_LABELS, type HotKey, type HotKeyString, type HotKeys, INSPECTO_API_PATHS, type IdeInfo, type IdeType, type InspectoConfig, type InspectoPromptsConfig, type InspectoSettings, type InspectorOptions, type IntentConfig, type IntentConfigBase, type IntentLabels, type LogLevel, type OpenFileRequest, type PathType, type Provider, type ProviderInfo, type ProviderMode, type RuntimeContextConfig, type RuntimeContextEnvelope, type RuntimeContextSummary, type RuntimeEvidenceKind, type RuntimeEvidenceLevel, type RuntimeEvidenceRecord, type ScreenshotContext, type ScreenshotContextConfig, type SendAnnotationsToAiRequest, type SendAnnotationsToAiResponse, type SendToAiRequest, type SendToAiResponse, type ServerState, type SnippetRequest, type SnippetResponse, type SourceAttrValue, type SourceLocation, type SupportedHostIde, type ToolOverrides, type UnpluginOptions, VALID_MODES, getDualModeProviderCapability, getHostIdeLabel, isSupportedHostIde };
package/dist/index.d.ts CHANGED
@@ -31,6 +31,42 @@ interface InspectoSettings {
31
31
  'prompt.autoSend'?: boolean;
32
32
  'prompt.annotationResponseMode'?: 'unified' | 'per-annotation';
33
33
  }
34
+ declare const HOST_IDE_IDS: readonly ["vscode", "cursor", "trae", "trae-cn"];
35
+ type SupportedHostIde = (typeof HOST_IDE_IDS)[number];
36
+ declare const HOST_IDE_LABELS: Record<SupportedHostIde, string>;
37
+ declare const DUAL_MODE_PROVIDER_CAPABILITIES: {
38
+ readonly codex: {
39
+ readonly label: "Codex";
40
+ readonly extensionId: "openai.chatgpt";
41
+ readonly cliBin: "codex";
42
+ };
43
+ readonly 'claude-code': {
44
+ readonly label: "Claude Code";
45
+ readonly extensionId: "anthropic.claude-code";
46
+ readonly cliBin: "claude";
47
+ };
48
+ readonly gemini: {
49
+ readonly label: "Gemini";
50
+ readonly extensionId: "google.geminicodeassist";
51
+ readonly cliBin: "gemini";
52
+ };
53
+ };
54
+ type DualModeProvider = keyof typeof DUAL_MODE_PROVIDER_CAPABILITIES;
55
+ declare function isSupportedHostIde(value: string | undefined): value is SupportedHostIde;
56
+ declare function getHostIdeLabel(ide: SupportedHostIde): string;
57
+ declare function getDualModeProviderCapability(provider: string): {
58
+ readonly label: "Codex";
59
+ readonly extensionId: "openai.chatgpt";
60
+ readonly cliBin: "codex";
61
+ } | {
62
+ readonly label: "Claude Code";
63
+ readonly extensionId: "anthropic.claude-code";
64
+ readonly cliBin: "claude";
65
+ } | {
66
+ readonly label: "Gemini";
67
+ readonly extensionId: "google.geminicodeassist";
68
+ readonly cliBin: "gemini";
69
+ };
34
70
  declare const VALID_MODES: Record<Provider, ProviderMode[]>;
35
71
  declare const DEFAULT_PROVIDER_MODE: Record<Provider, ProviderMode>;
36
72
  interface ToolOverrides {
@@ -305,4 +341,4 @@ declare const DEFAULT_INTENTS: {
305
341
  prompt: string;
306
342
  }[];
307
343
 
308
- export { type AiErrorCode, type AiIntent, type AiIntentConfig, type AiPayload, type AiStrategyContext, type AiStrategyResult, type Annotation, type AnnotationIntent, type AnnotationSession, type AnnotationTarget, type AnnotationTransport, type AnnotationTransportTarget, type ChannelDef, DEFAULT_INTENTS, DEFAULT_PROVIDER_MODE, type FeedbackRecord, type FeedbackRecordDraft, type FeedbackRecordSession, type HotKey, type HotKeyString, type HotKeys, INSPECTO_API_PATHS, type IdeInfo, type IdeType, type InspectoConfig, type InspectoPromptsConfig, type InspectoSettings, type InspectorOptions, type IntentConfig, type IntentConfigBase, type IntentLabels, type LogLevel, type OpenFileRequest, type PathType, type Provider, type ProviderInfo, type ProviderMode, type RuntimeContextConfig, type RuntimeContextEnvelope, type RuntimeContextSummary, type RuntimeEvidenceKind, type RuntimeEvidenceLevel, type RuntimeEvidenceRecord, type ScreenshotContext, type ScreenshotContextConfig, type SendAnnotationsToAiRequest, type SendAnnotationsToAiResponse, type SendToAiRequest, type SendToAiResponse, type ServerState, type SnippetRequest, type SnippetResponse, type SourceAttrValue, type SourceLocation, type ToolOverrides, type UnpluginOptions, VALID_MODES };
344
+ export { type AiErrorCode, type AiIntent, type AiIntentConfig, type AiPayload, type AiStrategyContext, type AiStrategyResult, type Annotation, type AnnotationIntent, type AnnotationSession, type AnnotationTarget, type AnnotationTransport, type AnnotationTransportTarget, type ChannelDef, DEFAULT_INTENTS, DEFAULT_PROVIDER_MODE, DUAL_MODE_PROVIDER_CAPABILITIES, type DualModeProvider, type FeedbackRecord, type FeedbackRecordDraft, type FeedbackRecordSession, HOST_IDE_IDS, HOST_IDE_LABELS, type HotKey, type HotKeyString, type HotKeys, INSPECTO_API_PATHS, type IdeInfo, type IdeType, type InspectoConfig, type InspectoPromptsConfig, type InspectoSettings, type InspectorOptions, type IntentConfig, type IntentConfigBase, type IntentLabels, type LogLevel, type OpenFileRequest, type PathType, type Provider, type ProviderInfo, type ProviderMode, type RuntimeContextConfig, type RuntimeContextEnvelope, type RuntimeContextSummary, type RuntimeEvidenceKind, type RuntimeEvidenceLevel, type RuntimeEvidenceRecord, type ScreenshotContext, type ScreenshotContextConfig, type SendAnnotationsToAiRequest, type SendAnnotationsToAiResponse, type SendToAiRequest, type SendToAiResponse, type ServerState, type SnippetRequest, type SnippetResponse, type SourceAttrValue, type SourceLocation, type SupportedHostIde, type ToolOverrides, type UnpluginOptions, VALID_MODES, getDualModeProviderCapability, getHostIdeLabel, isSupportedHostIde };
package/dist/index.js CHANGED
@@ -1,4 +1,37 @@
1
1
  // src/providers.ts
2
+ var HOST_IDE_IDS = ["vscode", "cursor", "trae", "trae-cn"];
3
+ var HOST_IDE_LABELS = {
4
+ vscode: "VS Code",
5
+ cursor: "Cursor",
6
+ trae: "Trae",
7
+ "trae-cn": "Trae CN"
8
+ };
9
+ var DUAL_MODE_PROVIDER_CAPABILITIES = {
10
+ codex: {
11
+ label: "Codex",
12
+ extensionId: "openai.chatgpt",
13
+ cliBin: "codex"
14
+ },
15
+ "claude-code": {
16
+ label: "Claude Code",
17
+ extensionId: "anthropic.claude-code",
18
+ cliBin: "claude"
19
+ },
20
+ gemini: {
21
+ label: "Gemini",
22
+ extensionId: "google.geminicodeassist",
23
+ cliBin: "gemini"
24
+ }
25
+ };
26
+ function isSupportedHostIde(value) {
27
+ return Boolean(value && HOST_IDE_IDS.includes(value));
28
+ }
29
+ function getHostIdeLabel(ide) {
30
+ return HOST_IDE_LABELS[ide];
31
+ }
32
+ function getDualModeProviderCapability(provider) {
33
+ return DUAL_MODE_PROVIDER_CAPABILITIES[provider];
34
+ }
2
35
  var VALID_MODES = {
3
36
  copilot: ["extension"],
4
37
  "claude-code": ["extension", "cli"],
@@ -78,6 +111,12 @@ Keep behavior unchanged unless a change is clearly justified.`
78
111
  export {
79
112
  DEFAULT_INTENTS,
80
113
  DEFAULT_PROVIDER_MODE,
114
+ DUAL_MODE_PROVIDER_CAPABILITIES,
115
+ HOST_IDE_IDS,
116
+ HOST_IDE_LABELS,
81
117
  INSPECTO_API_PATHS,
82
- VALID_MODES
118
+ VALID_MODES,
119
+ getDualModeProviderCapability,
120
+ getHostIdeLabel,
121
+ isSupportedHostIde
83
122
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inspecto-dev/types",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "Shared TypeScript definitions for the Inspecto monorepo",
5
5
  "license": "MIT",
6
6
  "type": "module",