@vsc-neuropilot/api-types 1.0.0-pre.3 → 1.0.0-pre.4

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/CHANGELOG.md CHANGED
@@ -19,6 +19,28 @@ For prereleases:
19
19
  - Pre-release versions (x.x.x-pre.x) are unstable releases for the designated API version. These contain work-in-progress types and annotations. Pre-release versions are not meant to be used except for trying out new API interfaces and giving feedback, and may change without prior programmatic notice. Pre-release versions are meant to be used with new builds from the `dev` branch of the base extension repo.
20
20
  - Release candidates (x.x.x-rc.x) are stable previews for the designated API version. These contain types that are more or less finalized for the designated release. Breaking changes should not be expected, both in type signature and functionality, but will always be highlighted in the changelog if necessary. This is also meant for feedback, but only for more subtle feedback before releasing that version such that it simply just contains bug fixes and very minor changes.
21
21
 
22
+ ## 1.0.0-pre.4
23
+
24
+ ### Changed
25
+
26
+ - `RCEAction.contextSetupHook` is now pluralized to `contextSetupHooks`, matching that it's an array.
27
+ - `RCEAction.storage` can no longer be set to undefined.
28
+
29
+ ## 1.0.0-pre.3
30
+
31
+ ### Added
32
+
33
+ - An enum containing strings to certain settings, provided for backwards compatibility reasons.
34
+ - Note that setting names themselves are not under API SemVer compliance.
35
+ - For this reason, it is recommended to use the new enum when needing to access NeuroPilot's settings.
36
+ - Example:
37
+
38
+ ```ts
39
+ import * as vscode from 'vscode';
40
+ import { NeuroPilotSetting } from '@vsc-neuropilot/api-types'
41
+
42
+ vscode.workspace.getConfiguration(`neuropilot.${NeuroPilotSetting.GameName}`)
43
+
22
44
  ## 1.0.0-pre.2
23
45
 
24
46
  ### Added
package/dist/index.d.mts CHANGED
@@ -16,55 +16,6 @@ declare const enum DiffRangeType {
16
16
  Modified = 1,
17
17
  Removed = 2
18
18
  }
19
- /**
20
- * The setting IDs of NeuroPilot's settings.
21
- *
22
- * @example
23
- * ```ts
24
- * const nameOfAPI = vscode.workspace.getConfiguration('neuropilot').get<string>(NeuroPilotSetting.NameOfAPI);
25
- * ```
26
- */
27
- declare const enum NeuroPilotSetting {
28
- /** The number of lines before the cursor position to include as context when editing a file or sending a completion request. */
29
- BeforeContext = "beforeContext",
30
- /** The number of lines after the cursor position to include as context when editing a file or sending a completion request. */
31
- AfterContext = "afterContext",
32
- /** Whether the real cursor follows Neuro's cursor. */
33
- CursorFollowsNeuro = "cursorFollowsNeuro",
34
- /**
35
- * Whether to send contents of a file to Neuro when the user switches to it.
36
- * If false, Neuro will still know what file was switched to, but won't get the contents.
37
- * Neuro will never get the contents or the name of files that aren't Neuro-safe.
38
- */
39
- SendContentsOnFileChange = "sendContentsOnFileChange",
40
- /**
41
- * The style to use for specifying the cursor position in context messages.
42
- * Possible values are:
43
- * - `"off"`: Cursor position should not be mentioned to Neuro.
44
- * - `"inline"`: Cursor position should be denoted by `<<<|>>>`
45
- * - `"lineAndColumn"`: Cursor position should be reported in <line>:<column> format (one-based).
46
- * - `"both"`: Combination of `"inline"` and `"lineAndColumn"`.
47
- */
48
- CursorPositionContextStyle = "cursorPositionContextStyle",
49
- /**
50
- * The format to use for line numbers in context messages.
51
- * This format should be prepended to every line.
52
- * `{n}` is used for the line number. Examples:
53
- * - `""`
54
- * - `"{n} "`
55
- * - `"{n}|"`
56
- * - `"{n}: "`
57
- */
58
- LineNumberContextFormat = "lineNumberContextFormat",
59
- /** The URL to connect to the Neuro API. */
60
- WebsocketUrl = "connection.websocketUrl",
61
- /** The game name NeuroPilot reports to the API. */
62
- GameName = "connection.gameName",
63
- /** The name to indicate who is controlling this VS Code instance alongside the API server. This replaces the default name `Vedal`. */
64
- UserName = "connection.userName",
65
- /** The name of the entity currently acting as the API server. You can add custom characters using `settings.json` if you ignore the lint error from VS Code. */
66
- NameOfAPI = "connection.nameOfAPI"
67
- }
68
19
  //#endregion
69
20
  //#region src/actions/classes.d.ts
70
21
  //#region RCE context
@@ -165,7 +116,7 @@ declare class RCEContext<T extends JSONSchema7Object | undefined = any, K = any>
165
116
  * each stage.
166
117
  * This data does not persist across different executions.
167
118
  */
168
- storage?: RCEStorage;
119
+ storage: RCEStorage;
169
120
  /**
170
121
  * Updates the status of the action on the action execution history panel
171
122
  * @param status The new status to update to
@@ -360,7 +311,7 @@ interface RCEAction<T extends JSONSchema7Object | undefined = any, E = any> exte
360
311
  *
361
312
  * These functions will be parallelised, so the same key should not be accessed from multiple functions.
362
313
  */
363
- contextSetupHook?: ((context: RCEContext<T, E>) => Thenable<void>)[];
314
+ contextSetupHooks?: ((context: RCEContext<T, E>) => Thenable<void>)[];
364
315
  }
365
316
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
366
317
  type PromptGenerator<T extends JSONSchema7Object | undefined, E = any> = string | ((context: RCEContext<T, E>) => string);
@@ -909,6 +860,55 @@ interface NeuroPilotAPI {
909
860
  */
910
861
  utils: Utils;
911
862
  }
863
+ /**
864
+ * The setting IDs of NeuroPilot's settings.
865
+ *
866
+ * @example
867
+ * ```ts
868
+ * const nameOfAPI = vscode.workspace.getConfiguration('neuropilot').get<string>(NeuroPilotSetting.NameOfAPI);
869
+ * ```
870
+ */
871
+ declare const enum NeuroPilotSetting {
872
+ /** The number of lines before the cursor position to include as context when editing a file or sending a completion request. */
873
+ BeforeContext = "beforeContext",
874
+ /** The number of lines after the cursor position to include as context when editing a file or sending a completion request. */
875
+ AfterContext = "afterContext",
876
+ /** Whether the real cursor follows Neuro's cursor. */
877
+ CursorFollowsNeuro = "cursorFollowsNeuro",
878
+ /**
879
+ * Whether to send contents of a file to Neuro when the user switches to it.
880
+ * If false, Neuro will still know what file was switched to, but won't get the contents.
881
+ * Neuro will never get the contents or the name of files that aren't Neuro-safe.
882
+ */
883
+ SendContentsOnFileChange = "sendContentsOnFileChange",
884
+ /**
885
+ * The style to use for specifying the cursor position in context messages.
886
+ * Possible values are:
887
+ * - `"off"`: Cursor position should not be mentioned to Neuro.
888
+ * - `"inline"`: Cursor position should be denoted by `<<<|>>>`
889
+ * - `"lineAndColumn"`: Cursor position should be reported in <line>:<column> format (one-based).
890
+ * - `"both"`: Combination of `"inline"` and `"lineAndColumn"`.
891
+ */
892
+ CursorPositionContextStyle = "cursorPositionContextStyle",
893
+ /**
894
+ * The format to use for line numbers in context messages.
895
+ * This format should be prepended to every line.
896
+ * `{n}` is used for the line number. Examples:
897
+ * - `""`
898
+ * - `"{n} "`
899
+ * - `"{n}|"`
900
+ * - `"{n}: "`
901
+ */
902
+ LineNumberContextFormat = "lineNumberContextFormat",
903
+ /** The URL to connect to the Neuro API. */
904
+ WebsocketUrl = "connection.websocketUrl",
905
+ /** The game name NeuroPilot reports to the API. */
906
+ GameName = "connection.gameName",
907
+ /** The name to indicate who is controlling this VS Code instance alongside the API server. This replaces the default name `Vedal`. */
908
+ UserName = "connection.userName",
909
+ /** The name of the entity currently acting as the API server. You can add custom characters using `settings.json` if you ignore the lint error from VS Code. */
910
+ NameOfAPI = "connection.nameOfAPI"
911
+ }
912
912
  type ItselfOrArray<T> = T | T[];
913
913
  //#endregion
914
914
  export { ActionForceParams, ActionForcePriorityEnum, ActionHandlerResult, ActionStatus, ActionValidationResult, ActionsEventData, BaseCompanionError, CompanionAPI, CompanionMeta, CompanionRegistryError, Contributions, Diff, DiffLine, DiffPlus, DiffPlusLine, DiffRange, DiffRangeType, InjectionBaseData, NeuroPilotAPI, NeuroPilotSetting, PermissionError, PermissionLevel, PromptGenerator, RCEAction, RCECancelEvent, RCECancelEventInitializer, RCEContext, RCEHandlerReturns, RCELifecycleMetadata, RCERequestState, RCEStorage, ReasonGenerator, SimplifiedStatusUpdateHandler };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":["JSONSchema7Object","Disposable","Progress","Event","ActionValidationResult","RCEAction","ActionData","RCEStorage","Record","ActionStatus","RCELifecycleMetadata","events","preview","dispose","validatorResults","sync","async","setupHooks","SimplifiedStatusUpdateHandler","status","message","RCERequestState","Promise","NodeJS","Timeout","prompt","notificationVisible","attachNotification","increment","progress","resolve","resolved","interval","timeout","RCEContext","T","K","name","createdAt","data","action","forced","lifecycle","request","storage","updateStatus","done","success","clearPreHandlerResources","ReasonGenerator","context","RCECancelEventInitializer","reason","logReason","RCECancelEvent","event","disposable","fire","constructor","init","JSONSchema7Object","ActionForcePriorityEnum","Action","NeuroClient","Range","PermissionLevel","DiffRangeType","RCECancelEvent","RCEContext","ActionStatus","CompanionAPI","ActionForceParams","COPILOT","AUTOPILOT","Record","state","query","ephemeral_context","actionNames","priority","overridePermissions","RCEAction","T","E","ActionValidationResult","Promise","RCEHandler","PromptGenerator","Thenable","displayName","validators","sync","context","async","cancelEvents","preview","dispose","handler","promptGenerator","defaultPermission","category","autoRegister","hidden","registerCondition","contextSetupHook","RCEHandlerReturns","ActionHandlerResult","success","message","retry","historyNote","ActionHandlerSuccess","InjectionBaseData","Omit","ActionsEventData","action","status","executionId","DiffLine","text","oldIndex","newIndex","DiffPlusLine","moved","Diff","lines","lineCountDeleted","lineCountInserted","DiffPlus","lineCountMoved","DiffRange","range","type","removedText","Disposable","Event","Position","ExtensionContext","Extension","Uri","TextEditorDecorationType","ActionForceParams","ActionsEventData","InjectionBaseData","RCEAction","Contributions","RCECancelEvent","CompanionAPI","CompanionMeta","FileActionUtils","EditActionUtils","Partial","constructor","data","actionUtils","files","edits","CancelEvent","addActions","actions","register","removeActions","registerAction","action","unregisterAction","reregisterAllActions","conservative","tryForceActions","params","strict","injectIntoAction","name","injection","force","onActionStatusChanged","sendContext","message","silent","addChangelog","version","changelog","getCursor","setCursor","location","onDidMoveCursor","extensionId","author","docs","contributes","markPreviewFiles","uris","promptString","absolutelyAllFiles","noChildren","setPreviewCursor","prompt","setPreviewHighlight","startPosition","endPosition"],"sources":["../src/actions/enums.ts","../src/actions/classes.d.ts","../src/actions/types.d.ts","../src/companions/enum.ts","../src/companions/register.d.ts","../src/companions/errors.ts","../src/index.ts"],"mappings":";;;;;;;mBACkB,eAAA;EACd,GAAA;EACA,OAAA;EACA,SAAA;AAAA;AAHJ;AAAA,mBAOkB,aAAA;EACd,KAAA;EACA,QAAA;EACA,O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N,gBAAA,EAAkB,qBAAA;EL9BM;AAO5B;;EK2BI,aAAA,EAAe,kBAAA;EL3B2D;;;EK+B1E,cAAA,EAAgB,mBAAA;;;;EAIhB,KAAA,EAAO,SAAA;ELjCX;;;EKqCI,SAAA,EAAW,aAAA;;;;EAIX,SAAA,EAAW,cAAA;AAAA;AAAA,UAGE,aAAA;;;;;EAKb,SAAA,SAAkB,YAAA;;;;EAIlB,KAAA,EAAO,KAAA;AAAA;AAAA,KAGN,aAAA,MAAmB,CAAA,GAAI,CAAA"}
1
+ {"version":3,"file":"index.d.mts","names":["JSONSchema7Object","Disposable","Progress","Event","ActionValidationResult","RCEAction","ActionData","RCEStorage","Record","ActionStatus","RCELifecycleMetadata","events","preview","dispose","validatorResults","sync","async","setupHooks","SimplifiedStatusUpdateHandler","status","message","RCERequestState","Promise","NodeJS","Timeout","prompt","notificationVisible","attachNotification","increment","progress","resolve","resolved","interval","timeout","RCEContext","T","K","name","createdAt","data","action","forced","lifecycle","request","storage","updateStatus","done","success","clearPreHandlerResources","ReasonGenerator","context","RCECancelEventInitializer","reason","logReason","RCECancelEvent","event","disposable","fire","constructor","init","JSONSchema7Object","ActionForcePriorityEnum","Action","NeuroClient","Range","PermissionLevel","DiffRangeType","RCECancelEvent","RCEContext","ActionStatus","CompanionAPI","ActionForceParams","COPILOT","AUTOPILOT","Record","state","query","ephemeral_context","actionNames","priority","overridePermissions","RCEAction","T","E","ActionValidationResult","Promise","RCEHandler","PromptGenerator","Thenable","displayName","validators","sync","context","async","cancelEvents","preview","dispose","handler","promptGenerator","defaultPermission","category","autoRegister","hidden","registerCondition","contextSetupHooks","RCEHandlerReturns","ActionHandlerResult","success","message","retry","historyNote","ActionHandlerSuccess","InjectionBaseData","Omit","ActionsEventData","action","status","executionId","DiffLine","text","oldIndex","newIndex","DiffPlusLine","moved","Diff","lines","lineCountDeleted","lineCountInserted","DiffPlus","lineCountMoved","DiffRange","range","type","removedText","Disposable","Event","Position","ExtensionContext","Extension","Uri","TextEditorDecorationType","ActionForceParams","ActionsEventData","InjectionBaseData","RCEAction","Contributions","RCECancelEvent","CompanionAPI","CompanionMeta","FileActionUtils","EditActionUtils","Partial","constructor","data","actionUtils","files","edits","CancelEvent","addActions","actions","register","removeActions","registerAction","action","unregisterAction","reregisterAllActions","conservative","tryForceActions","params","strict","injectIntoAction","name","injection","force","onActionStatusChanged","sendContext","message","silent","addChangelog","version","changelog","getCursor","setCursor","location","onDidMoveCursor","extensionId","author","docs","contributes","markPreviewFiles","uris","promptString","absolutelyAllFiles","noChildren","setPreviewCursor","prompt","setPreviewHighlight","startPosition","endPosition"],"sources":["../src/actions/enums.ts","../src/actions/classes.d.ts","../src/actions/types.d.ts","../src/companions/enum.ts","../src/companions/register.d.ts","../src/companions/errors.ts","../src/index.ts"],"mappings":";;;;;;;mBACkB,eAAA;EACd,GAAA;EACA,OAAA;EACA,SAAA;AAAA;AAHJ;AAAA,mBAOkB,aAAA;EACd,KAAA;EACA,QAAA;EACA,OAAA;AAAA;;;;KCHQO,UAAAA,GAAaC,MAAAA;AAAAA,KAEbC,YAAAA;AAAAA,UAEKC,oBAAAA;EACbC,MAAAA,GAASV,UAAAA;EACTW,OAAAA;IAAYC,OAAAA;EAAAA;EACZC,gBAAAA;IACIC,IAAAA,GAAOX,sBAAAA;IACPY,KAAAA,GAAQZ,sBAAAA;EAAAA;EAEZa,UAAAA;AAAAA;AAAAA,KAGQC,6BAAAA,IAAiCC,MAAAA,EAAQV,YAAAA,EAAcW,OAAAA;AAAAA,UAElDC,eAAAA;;;AAhBjB;EAoBII,MAAAA;;;;EAIAC,mBAAAA;EAtBoB;;;;AAExB;;EA2BIC,kBAAAA,GAAqBE,QAAAA,EAAU3B,QAAAA;IAAWkB,OAAAA;IAAkBQ,SAAAA;EAAAA,OAA0BN,OAAAA;EA1B7ErB;;;;EA+BT6B,OAAAA;EA/BAnB;;;EAmCAoB,QAAAA;EAjCAjB;;;EAqCAkB,QAAAA,GAAWT,MAAAA,CAAOC,OA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mBAAA,CAAoB,aAAA,EAAe,MAAA,CAAO,QAAA,EAAU,OAAA,UAAiB,OAAA,UAAiB,WAAA,GAAc,MAAA,GAAS,SAAA;;;;;;;;;;EAU7G,qBAAA,CAAsB,MAAA,EAAQ,MAAA,CAAO,UAAA,EAAY,UAAA,EAAY,SAAA;AAAA;AAAA,UAGvD,aAAA;;;;;EAKN,cAAA,CAAe,QAAA;;;;;EAKf,aAAA,CAAc,IAAA;;;;;;;EAOd,eAAA,CAAgB,IAAA;AAAA;AAAA,UAGV,cAAA;ELbkB;AAO5B;;;EKWI,eAAA,IAAmB,MAAA,CAAO,GAAA;;;;;EAK1B,gBAAA;AAAA;AAAA,UAGM,KAAA;ELjBV;;;EKqBI,gBAAA,EAAkB,qBAAA;;;;EAIlB,aAAA,EAAe,kBAAA;;;;EAIf,cAAA,EAAgB,mBAAA;ELvBmC;;;EK2BnD,KAAA,EAAO,SAAA;;;;EAIP,SAAA,EAAW,aAAA;;;;EAIX,SAAA,EAAW,cAAA;AAAA;AAAA,UAGE,aAAA;;;ALnCjB;;EKwCI,SAAA,SAAkB,YAAA;;;;EAIlB,KAAA,EAAO,KAAA;AAAA;;;;;;;;;mBAWO,iBAAA;;EAEd,aAAA;;EAEA,YAAA;;EAEA,kBAAA;;;;;;EAMA,wBAAA;;;;;;;;;EASA,0BAAA;;AJ/MJ;;;;;;;;EIyNI,uBAAA;;EAEA,YAAA;;EAEA,QAAA;;EAEA,QAAA;;EAEA,SAAA;AAAA;AAAA,KA2CC,aAAA,MAAmB,CAAA,GAAI,CAAA"}
package/dist/index.mjs CHANGED
@@ -14,56 +14,6 @@ let DiffRangeType = /* @__PURE__ */ function(DiffRangeType) {
14
14
  DiffRangeType[DiffRangeType["Removed"] = 2] = "Removed";
15
15
  return DiffRangeType;
16
16
  }({});
17
- /**
18
- * The setting IDs of NeuroPilot's settings.
19
- *
20
- * @example
21
- * ```ts
22
- * const nameOfAPI = vscode.workspace.getConfiguration('neuropilot').get<string>(NeuroPilotSetting.NameOfAPI);
23
- * ```
24
- */
25
- let NeuroPilotSetting = /* @__PURE__ */ function(NeuroPilotSetting) {
26
- /** The number of lines before the cursor position to include as context when editing a file or sending a completion request. */
27
- NeuroPilotSetting["BeforeContext"] = "beforeContext";
28
- /** The number of lines after the cursor position to include as context when editing a file or sending a completion request. */
29
- NeuroPilotSetting["AfterContext"] = "afterContext";
30
- /** Whether the real cursor follows Neuro's cursor. */
31
- NeuroPilotSetting["CursorFollowsNeuro"] = "cursorFollowsNeuro";
32
- /**
33
- * Whether to send contents of a file to Neuro when the user switches to it.
34
- * If false, Neuro will still know what file was switched to, but won't get the contents.
35
- * Neuro will never get the contents or the name of files that aren't Neuro-safe.
36
- */
37
- NeuroPilotSetting["SendContentsOnFileChange"] = "sendContentsOnFileChange";
38
- /**
39
- * The style to use for specifying the cursor position in context messages.
40
- * Possible values are:
41
- * - `"off"`: Cursor position should not be mentioned to Neuro.
42
- * - `"inline"`: Cursor position should be denoted by `<<<|>>>`
43
- * - `"lineAndColumn"`: Cursor position should be reported in <line>:<column> format (one-based).
44
- * - `"both"`: Combination of `"inline"` and `"lineAndColumn"`.
45
- */
46
- NeuroPilotSetting["CursorPositionContextStyle"] = "cursorPositionContextStyle";
47
- /**
48
- * The format to use for line numbers in context messages.
49
- * This format should be prepended to every line.
50
- * `{n}` is used for the line number. Examples:
51
- * - `""`
52
- * - `"{n} "`
53
- * - `"{n}|"`
54
- * - `"{n}: "`
55
- */
56
- NeuroPilotSetting["LineNumberContextFormat"] = "lineNumberContextFormat";
57
- /** The URL to connect to the Neuro API. */
58
- NeuroPilotSetting["WebsocketUrl"] = "connection.websocketUrl";
59
- /** The game name NeuroPilot reports to the API. */
60
- NeuroPilotSetting["GameName"] = "connection.gameName";
61
- /** The name to indicate who is controlling this VS Code instance alongside the API server. This replaces the default name `Vedal`. */
62
- NeuroPilotSetting["UserName"] = "connection.userName";
63
- /** The name of the entity currently acting as the API server. You can add custom characters using `settings.json` if you ignore the lint error from VS Code. */
64
- NeuroPilotSetting["NameOfAPI"] = "connection.nameOfAPI";
65
- return NeuroPilotSetting;
66
- }({});
67
17
  //#endregion
68
18
  //#region src/companions/errors.ts
69
19
  /**
@@ -165,6 +115,58 @@ let Contributions = /* @__PURE__ */ function(Contributions) {
165
115
  return Contributions;
166
116
  }({});
167
117
  //#endregion
118
+ //#region src/index.ts
119
+ /**
120
+ * The setting IDs of NeuroPilot's settings.
121
+ *
122
+ * @example
123
+ * ```ts
124
+ * const nameOfAPI = vscode.workspace.getConfiguration('neuropilot').get<string>(NeuroPilotSetting.NameOfAPI);
125
+ * ```
126
+ */
127
+ let NeuroPilotSetting = /* @__PURE__ */ function(NeuroPilotSetting) {
128
+ /** The number of lines before the cursor position to include as context when editing a file or sending a completion request. */
129
+ NeuroPilotSetting["BeforeContext"] = "beforeContext";
130
+ /** The number of lines after the cursor position to include as context when editing a file or sending a completion request. */
131
+ NeuroPilotSetting["AfterContext"] = "afterContext";
132
+ /** Whether the real cursor follows Neuro's cursor. */
133
+ NeuroPilotSetting["CursorFollowsNeuro"] = "cursorFollowsNeuro";
134
+ /**
135
+ * Whether to send contents of a file to Neuro when the user switches to it.
136
+ * If false, Neuro will still know what file was switched to, but won't get the contents.
137
+ * Neuro will never get the contents or the name of files that aren't Neuro-safe.
138
+ */
139
+ NeuroPilotSetting["SendContentsOnFileChange"] = "sendContentsOnFileChange";
140
+ /**
141
+ * The style to use for specifying the cursor position in context messages.
142
+ * Possible values are:
143
+ * - `"off"`: Cursor position should not be mentioned to Neuro.
144
+ * - `"inline"`: Cursor position should be denoted by `<<<|>>>`
145
+ * - `"lineAndColumn"`: Cursor position should be reported in <line>:<column> format (one-based).
146
+ * - `"both"`: Combination of `"inline"` and `"lineAndColumn"`.
147
+ */
148
+ NeuroPilotSetting["CursorPositionContextStyle"] = "cursorPositionContextStyle";
149
+ /**
150
+ * The format to use for line numbers in context messages.
151
+ * This format should be prepended to every line.
152
+ * `{n}` is used for the line number. Examples:
153
+ * - `""`
154
+ * - `"{n} "`
155
+ * - `"{n}|"`
156
+ * - `"{n}: "`
157
+ */
158
+ NeuroPilotSetting["LineNumberContextFormat"] = "lineNumberContextFormat";
159
+ /** The URL to connect to the Neuro API. */
160
+ NeuroPilotSetting["WebsocketUrl"] = "connection.websocketUrl";
161
+ /** The game name NeuroPilot reports to the API. */
162
+ NeuroPilotSetting["GameName"] = "connection.gameName";
163
+ /** The name to indicate who is controlling this VS Code instance alongside the API server. This replaces the default name `Vedal`. */
164
+ NeuroPilotSetting["UserName"] = "connection.userName";
165
+ /** The name of the entity currently acting as the API server. You can add custom characters using `settings.json` if you ignore the lint error from VS Code. */
166
+ NeuroPilotSetting["NameOfAPI"] = "connection.nameOfAPI";
167
+ return NeuroPilotSetting;
168
+ }({});
169
+ //#endregion
168
170
  export { ActionForcePriorityEnum, BaseCompanionError, CompanionRegistryError, Contributions, DiffRangeType, NeuroPilotSetting, PermissionError, PermissionLevel };
169
171
 
170
172
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../src/actions/enums.ts","../src/companions/errors.ts","../src/companions/enum.ts"],"sourcesContent":["/** Permission level enums */\nexport const enum PermissionLevel {\n OFF = 0,\n COPILOT = 1,\n AUTOPILOT = 2,\n}\n\n/** Type of diff range */\nexport const enum DiffRangeType {\n Added,\n Modified,\n Removed,\n}\n\n/**\n * The setting IDs of NeuroPilot's settings.\n * \n * @example\n * ```ts\n * const nameOfAPI = vscode.workspace.getConfiguration('neuropilot').get<string>(NeuroPilotSetting.NameOfAPI);\n * ```\n */\nexport const enum NeuroPilotSetting {\n /** The number of lines before the cursor position to include as context when editing a file or sending a completion request. */\n BeforeContext = 'beforeContext',\n /** The number of lines after the cursor position to include as context when editing a file or sending a completion request. */\n AfterContext = 'afterContext',\n /** Whether the real cursor follows Neuro's cursor. */\n CursorFollowsNeuro = 'cursorFollowsNeuro',\n /**\n * Whether to send contents of a file to Neuro when the user switches to it.\n * If false, Neuro will still know what file was switched to, but won't get the contents.\n * Neuro will never get the contents or the name of files that aren't Neuro-safe.\n */\n SendContentsOnFileChange = 'sendContentsOnFileChange',\n /**\n * The style to use for specifying the cursor position in context messages.\n * Possible values are:\n * - `\"off\"`: Cursor position should not be mentioned to Neuro.\n * - `\"inline\"`: Cursor position should be denoted by `<<<|>>>`\n * - `\"lineAndColumn\"`: Cursor position should be reported in <line>:<column> format (one-based).\n * - `\"both\"`: Combination of `\"inline\"` and `\"lineAndColumn\"`.\n */\n CursorPositionContextStyle = 'cursorPositionContextStyle',\n /**\n * The format to use for line numbers in context messages.\n * This format should be prepended to every line.\n * `{n}` is used for the line number. Examples:\n * - `\"\"`\n * - `\"{n} \"`\n * - `\"{n}|\"`\n * - `\"{n}: \"`\n */\n LineNumberContextFormat = 'lineNumberContextFormat',\n /** The URL to connect to the Neuro API. */\n WebsocketUrl = 'connection.websocketUrl',\n /** The game name NeuroPilot reports to the API. */\n GameName = 'connection.gameName',\n /** The name to indicate who is controlling this VS Code instance alongside the API server. This replaces the default name `Vedal`. */\n UserName = 'connection.userName',\n /** The name of the entity currently acting as the API server. You can add custom characters using `settings.json` if you ignore the lint error from VS Code. */\n NameOfAPI = 'connection.nameOfAPI',\n\n // Commented access.* out for now because companions should use isPathNeuroSafe instead.\n // If we find a use case that is not covered by isPathNeuroSafe then we can add them back.\n\n // /** Whether to allow Neuro to access files and folders beginning with a dot. */\n // DotFiles = 'access.dotFiles',\n // /** Whether to allow Neuro to access files and folders outside the current workspace. */\n // ExternalFiles = 'access.externalFiles',\n // /**\n // * Whether to allow Neuro to use environment variables in paths.\n // * Resolving environent variables isn't implemented in NeuroPilot, so you won't have to implement it in your companion either.\n // * However, you should still check for it.\n // */\n // EnvironmentVariables = 'access.environmentVariables',\n // /**\n // * A case-sensitive list of glob patterns for files Neuro is allowed to open, i.e. she should be unable to open files that don't match this pattern.\n // * Should be applied before {@link ExcludePattern}.\n // * \n // * Patterns without a slash should match any file or folder with that name.\n // */\n // IncludePattern = 'access.includePattern',\n // /**\n // * A case-sensitive glob pattern for files Neuro is not allowed to open.\n // * Should be applied after {@link IncludePattern}.\n // * \n // * Patterns without a slash should match any file or folder with that name.\n // */\n // ExcludePattern = 'access.excludePattern',\n // /** Allow NeuroPilot to read ignore patterns from an ignore file (e.g. .gitignore). */\n // InheritFromIgnoreFiles = 'access.inheritFromIgnoreFiles',\n // /**\n // * A list of ignore-style files to inherit Neuro-safe glob paths from.\n // * Should support the full range of git's ignore pattern globs and ignore comments (lines starting with #).\n // * The further down a file is on the list, the more priority it should get.\n // * \n // * This setting should not override any of the other access settings.\n // * \n // * Example: `[ \".gitignore\", \".npmignore\", \".prettierignore\" ]`\n // */\n // IgnoreFiles = 'access.ignoreFiles',\n}\n","import { Contributions } from './enum';\n\n/**\n * The base class for all errors caused by companions.\n * Usually this class is extended by other classes that are thrown by NeuroPilot,\n * but there may also be cases where this class is used directly.\n * \n * If you're wanting to ensure that errors are coming from NeuroPilot, simply check if the error is an instance of this class.\n */\nexport class BaseCompanionError extends Error {\n /**\n * An explanation of the cause that led to the error.\n */\n readonly causedBy: string;\n /**\n * The companion that caused the error.\n */\n readonly companion?: string;\n /**\n * The feature that caused the error.\n */\n readonly feature: string;\n constructor(feature: string, error?: string, cause = 'Unknown cause.', companion?: string) {\n super(error);\n this.feature = feature;\n this.causedBy = cause;\n this.companion = companion;\n };\n};\n\n/**\n * This class being thrown means that there was an error with the companion registry.\n */\nexport class CompanionRegistryError extends BaseCompanionError {\n constructor(error?: string, cause = 'Unknown cause.') {\n super('Companion registry', error, cause);\n };\n}\n\nexport class PermissionError extends BaseCompanionError {\n /**\n * The list of contribution points that allow performing this action.\n */\n readonly contributions: string[];\n constructor(feature: string, contributions: Contributions[], error?: string) {\n super(feature, error, `${feature} without declaring any of these contributions: \"${contributions.join('\", \"')}\"`);\n this.contributions = contributions;\n }\n}\n","/**\n * Const enum for companion contributions \n */\nexport const enum Contributions {\n /**\n * Allows you to add and remove your own actions from the actions registry.\n * Also allows you to register and unregister them on-demand.\n */\n ACTIONS_MANAGE = 'actions:manage',\n /**\n * Allows you to register and unregister other companions' actions.\n * Does NOT allow you to add or remove them from the registry.\n */\n ACTIONS_MANAGE_OTHERS = 'actions:manage_others',\n /**\n * Allows injecting into other companions' actions.\n * This allows you to change all properties on that action (except for `name` and `source`).\n */\n ACTIONS_INJECT = 'actions:inject',\n /**\n * Allows subscribing to when an action status is changed.\n */\n ACTIONS_PROCESS = 'actions:process',\n /**\n * Allows forcing actions from Neuro.\n * You do not need either {@link Contributions.ACTIONS_MANAGE actions:manage} or {@link Contributions.ACTIONS_MANAGE_OTHERS actions:manage_others} to force actions.\n */\n ACTIONS_FORCE = 'actions:force',\n /**\n * Allows adding changelogs to the `read_changelog` command, so Neuro can query it on-demand.\n */\n CHANGELOG = 'changelog',\n /**\n * Allows sending context to Neuro at any time.\n */\n CONTEXT = 'context',\n /**\n * Allows you to get the virtual cursor position & subscribe to when it gets changed.\n */\n CURSOR_GET = 'cursor:get',\n /**\n * Allows you to set the position of the virtual cursor.\n * This does NOT implicitly grant {@link Contributions.CURSOR_GET cursor:get} and will not let you view the cursor position.\n */\n CURSOR_SET = 'cursor:set',\n /**\n * Currently unused.\n */\n IMAGES = 'images',\n};\n"],"mappings":";;;AACA,IAAkB,kBAAX,yBAAA,iBAAA;AACH,iBAAA,gBAAA,SAAA,KAAA;AACA,iBAAA,gBAAA,aAAA,KAAA;AACA,iBAAA,gBAAA,eAAA,KAAA;;KACH;;AAGD,IAAkB,gBAAX,yBAAA,eAAA;AACH,eAAA,cAAA,WAAA,KAAA;AACA,eAAA,cAAA,cAAA,KAAA;AACA,eAAA,cAAA,aAAA,KAAA;;KACH;;;;;;;;;AAUD,IAAkB,oBAAX,yBAAA,mBAAA;;AAEH,mBAAA,mBAAA;;AAEA,mBAAA,kBAAA;;AAEA,mBAAA,wBAAA;;;;;;AAMA,mBAAA,8BAAA;;;;;;;;;AASA,mBAAA,gCAAA;;;;;;;;;;AAUA,mBAAA,6BAAA;;AAEA,mBAAA,kBAAA;;AAEA,mBAAA,cAAA;;AAEA,mBAAA,cAAA;;AAEA,mBAAA,eAAA;;KAyCH;;;;;;;;;;AC7FD,IAAa,qBAAb,cAAwC,MAAM;;;;CAI1C;;;;CAIA;;;;CAIA;CACA,YAAY,SAAiB,OAAgB,QAAQ,kBAAkB,WAAoB;AACvF,QAAM,MAAM;AACZ,OAAK,UAAU;AACf,OAAK,WAAW;AAChB,OAAK,YAAY;;;;;;AAOzB,IAAa,yBAAb,cAA4C,mBAAmB;CAC3D,YAAY,OAAgB,QAAQ,kBAAkB;AAClD,QAAM,sBAAsB,OAAO,MAAM;;;AAIjD,IAAa,kBAAb,cAAqC,mBAAmB;;;;CAIpD;CACA,YAAY,SAAiB,eAAgC,OAAgB;AACzE,QAAM,SAAS,OAAO,GAAG,QAAQ,kDAAkD,cAAc,KAAK,SAAO,CAAC,GAAG;AACjH,OAAK,gBAAgB;;;;;;;;AC3C7B,IAAkB,gBAAX,yBAAA,eAAA;;;;;AAKH,eAAA,oBAAA;;;;;AAKA,eAAA,2BAAA;;;;;AAKA,eAAA,oBAAA;;;;AAIA,eAAA,qBAAA;;;;;AAKA,eAAA,mBAAA;;;;AAIA,eAAA,eAAA;;;;AAIA,eAAA,aAAA;;;;AAIA,eAAA,gBAAA;;;;;AAKA,eAAA,gBAAA;;;;AAIA,eAAA,YAAA;;KACH"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../src/actions/enums.ts","../src/companions/errors.ts","../src/companions/enum.ts","../src/index.ts"],"sourcesContent":["/** Permission level enums */\nexport const enum PermissionLevel {\n OFF = 0,\n COPILOT = 1,\n AUTOPILOT = 2,\n}\n\n/** Type of diff range */\nexport const enum DiffRangeType {\n Added,\n Modified,\n Removed,\n}\n","import { Contributions } from './enum';\n\n/**\n * The base class for all errors caused by companions.\n * Usually this class is extended by other classes that are thrown by NeuroPilot,\n * but there may also be cases where this class is used directly.\n * \n * If you're wanting to ensure that errors are coming from NeuroPilot, simply check if the error is an instance of this class.\n */\nexport class BaseCompanionError extends Error {\n /**\n * An explanation of the cause that led to the error.\n */\n readonly causedBy: string;\n /**\n * The companion that caused the error.\n */\n readonly companion?: string;\n /**\n * The feature that caused the error.\n */\n readonly feature: string;\n constructor(feature: string, error?: string, cause = 'Unknown cause.', companion?: string) {\n super(error);\n this.feature = feature;\n this.causedBy = cause;\n this.companion = companion;\n };\n};\n\n/**\n * This class being thrown means that there was an error with the companion registry.\n */\nexport class CompanionRegistryError extends BaseCompanionError {\n constructor(error?: string, cause = 'Unknown cause.') {\n super('Companion registry', error, cause);\n };\n}\n\nexport class PermissionError extends BaseCompanionError {\n /**\n * The list of contribution points that allow performing this action.\n */\n readonly contributions: string[];\n constructor(feature: string, contributions: Contributions[], error?: string) {\n super(feature, error, `${feature} without declaring any of these contributions: \"${contributions.join('\", \"')}\"`);\n this.contributions = contributions;\n }\n}\n","/**\n * Const enum for companion contributions \n */\nexport const enum Contributions {\n /**\n * Allows you to add and remove your own actions from the actions registry.\n * Also allows you to register and unregister them on-demand.\n */\n ACTIONS_MANAGE = 'actions:manage',\n /**\n * Allows you to register and unregister other companions' actions.\n * Does NOT allow you to add or remove them from the registry.\n */\n ACTIONS_MANAGE_OTHERS = 'actions:manage_others',\n /**\n * Allows injecting into other companions' actions.\n * This allows you to change all properties on that action (except for `name` and `source`).\n */\n ACTIONS_INJECT = 'actions:inject',\n /**\n * Allows subscribing to when an action status is changed.\n */\n ACTIONS_PROCESS = 'actions:process',\n /**\n * Allows forcing actions from Neuro.\n * You do not need either {@link Contributions.ACTIONS_MANAGE actions:manage} or {@link Contributions.ACTIONS_MANAGE_OTHERS actions:manage_others} to force actions.\n */\n ACTIONS_FORCE = 'actions:force',\n /**\n * Allows adding changelogs to the `read_changelog` command, so Neuro can query it on-demand.\n */\n CHANGELOG = 'changelog',\n /**\n * Allows sending context to Neuro at any time.\n */\n CONTEXT = 'context',\n /**\n * Allows you to get the virtual cursor position & subscribe to when it gets changed.\n */\n CURSOR_GET = 'cursor:get',\n /**\n * Allows you to set the position of the virtual cursor.\n * This does NOT implicitly grant {@link Contributions.CURSOR_GET cursor:get} and will not let you view the cursor position.\n */\n CURSOR_SET = 'cursor:set',\n /**\n * Currently unused.\n */\n IMAGES = 'images',\n};\n","import type { ActionHandlerResult, ActionValidationResult, Diff, DiffPlus, DiffRange, RCEAction, DiffPlusLine } from './actions/types';\nimport type { CompanionAPI } from './companions/register';\nimport type * as vscode from 'vscode';\n\ninterface ActionValidationUtils {\n /**\n * Function to return an object that indicates handler success.\n * @param message The message that will be sent to Neuro\n * @param historyNote If supplied, an action status update with its status set to success will be fired with the note. Otherwise, assumes that you've already done that yourself.\n * @returns {ActionHandlerResult} An object with a successful validation result\n */\n success(message?: string, historyNote?: string): ActionValidationResult;\n /**\n * Function to return an object that indicates handler failure.\n * @param message The message that will be sent to Neuro\n * @param historyNote If supplied, an action status update with its status set to success will be fired with the note. Otherwise, assumes that you've already done that yourself.\n * @returns {ActionHandlerResult} An object with a failed validation result\n */\n failure(message: string, historyNote?: string): ActionValidationResult;\n /**\n * Function to return an object that indicates handler failure.\n * @param message The message that will be sent to Neuro\n * @param historyNote If supplied, an action status update with its status set to success will be fired with the note. Otherwise, assumes that you've already done that yourself.\n * @returns {ActionHandlerResult} An object with a failed validation result\n */\n retry(message: string, historyNote?: string): ActionValidationResult;\n}\n\ninterface ActionHandlerUtils {\n /**\n * Create a successful action result.\n * This should be used if all parameters have been parsed correctly.\n * @param message An optional message to send to Neuro.\n * @param historyNote A note for the history panel.\n * @returns A successful action result.\n */\n success(message?: string, historyNote?: string): ActionHandlerResult;\n /**\n * Create an action result with the specified message.\n * This should be used if the action failed, but should not be retried, e.g.\n * if the source of the error is out of Neuro's control or to prevent a retry\n * loop in case the action is not applicable in the current state.\n * @param message The message to send to Neuro. This should explain, if possible, why the action failed. If omitted, will just send \"Action failed.\".\n * @param historyNote A note for the history panel.\n * @returns A successful action result with the specified message.\n */\n failure(message: string, historyNote?: string): ActionHandlerResult;\n /**\n * Create an action result that tells Neuro to retry the forced action.\n * @param message The message to send to Neuro. This should contain the information required to fix the mistake.\n * @param historyNote A note for the history panel.\n * @returns A failed action result with the specified message.\n */\n retry(message: string, historyNote?: string): ActionHandlerResult;\n}\n\ninterface ActionsListingUtils {\n /**\n * Get an action or an array of actions.\n * @todo split into overloads for sanity\n * @param action A string or array of strings of action names.\n * @returns An action (if a string was provided), undefined (if a string was provided and nothing was found), or an array of actions (if nothing or an array was provided)\n */\n getActions(action?: string | string[]): ItselfOrArray<RCEAction & {\n source?: string;\n }> | undefined;\n}\n\ninterface DiffUtils {\n /**\n * Calculate the diff between two sets of lines using the Patience diff algorithm.\n *\n * The algorithm is not limited to line-based diffs, you can also use it to calculate word- or\n * character-based diffs by splitting your text into arrays of words or characters instead of lines (at\n * the cost of performance).\n * However, documentation and property names still refer to everything as lines.\n * @param oldLines The lines before the change.\n * @param newLines The lines after the change.\n * @see {@link https://github.com/jonTrent/PatienceDiff}\n */\n calculateDiff(oldLines: string[], newLines: string[]): Diff;\n /**\n * Calculate the diff between two sets of lines, taking moved lines into account.\n *\n * Note that moved lines are duplicated in the resulting diff:\n * A line will appear once with `oldIndex` set to the position it was moved from and `newIndex` set to the\n * position it was moved to, and a counterpart of that line will also appear with the same text and\n * `newIndex` set to -1. This is part of the original implementation of the algorithm, which we did not modify.\n * See also: {@link DiffPlusLine.newIndex}\n * @param oldLines The lines before the change.\n * @param newLines The lines after the change.\n * @see {@link DiffUtils.calculateDiff calculateDiff}\n */\n calculateDiffPlus(oldLines: string[], newLines: string[]): DiffPlus;\n /**\n * Calculates the difference between the original and modified text. The ranges are based on the new text.\n * @param startPosition The position to offset the resulting ranges by.\n * @param oldText The text before the change.\n * @param newText The text after the change.\n * @param tokenRegExp The regular expression used for tokenization. The global flag must be set, and every\n * character in the text must be matched.\n * Defaults to `/\\w+|\\r?\\n|\\s+|./g` (word diff).\n * Examples:\n * - Line diff: `/.*(?:\\r?\\n|$)/g`\n * - Word diff: `/\\w+|\\r?\\n|\\s+|./g`\n * - Character diff: `/.|\\r?\\n/g`\n */\n calculateDiffRanges(startPosition: vscode.Position, oldText: string, newText: string, tokenRegExp?: RegExp): DiffRange[];\n /**\n * Apply diff highlighting to a text editor based on the provided diff ranges.\n * If you use {@link DiffUtils.calculateDiffRanges calculateDiffRanges} to calculate the\n * diff ranges, the current text in the editor should be provided as the `newText` parameter.\n * @param editor The text editor to highlight.\n * @param diffRanges The diff ranges to highlight.\n * If you use {@link DiffUtils.calculateDiffRanges calculateDiffRanges} to calculate these,\n * the current text in the editor should be provided as the `newText` parameter.\n */\n applyDiffHighlighting(editor: vscode.TextEditor, diffRanges: DiffRange[]): void;\n}\n\ninterface FilePathUtils {\n /**\n * Simplifies the file path\n * @param fileName The path of the file\n */\n simpleFileName(fileName: string): string;\n /**\n * Normalizes the path so it looks consistent when sending to Neuro.\n * @param path The path to be normalized\n */\n normalizePath(path: string): string;\n /**\n * Checks if a file is Neuro-safe, according to the rules the user has set in NeuroPilot's settings.\n *\n * It is recommended that you use this to check file paths if your actions are accessing a file for any reason.\n * @param path The path to the file. This utility expects an *absolute* path.\n */\n isPathNeuroSafe(path: string): boolean;\n}\n\ninterface WorkspaceUtils {\n /**\n * Gets the full workspace uri that is normally targeted for operations.\n * In multi-root workspaces this is the first open workspace.\n */\n getWorkspaceUri(): vscode.Uri | undefined;\n /**\n * Gets the full workspace path that is normally targeted for operations.\n * (Same as calling {@link WorkspaceUtils.getWorkspaceUri getWorkspaceUri}.fsPath)\n */\n getWorkspacePath(): string | undefined;\n}\n\ninterface Utils {\n /**\n * Utilities for generating action validation messages\n */\n actionValidation: ActionValidationUtils;\n /**\n * Utililties for generating action handler messages\n */\n actionHandler: ActionHandlerUtils;\n /**\n * Utilities for the action listing\n */\n actionsListing: ActionsListingUtils;\n /**\n * Utilities for generating and applying diffs\n */\n diffs: DiffUtils;\n /**\n * Utilities for working with file paths\n */\n filePaths: FilePathUtils;\n /**\n * Utilities for getting the current workspace\n */\n workspace: WorkspaceUtils;\n}\n\nexport interface NeuroPilotAPI {\n /**\n * Register your companion extension by creating a new object from this class.\n * See {@link CompanionAPI} for the API surface it exposes.\n */\n Companion: typeof CompanionAPI;\n /**\n * Public, useful utilities you might want to use in your extension.\n */\n utils: Utils;\n}\n\n/**\n * The setting IDs of NeuroPilot's settings.\n * \n * @example\n * ```ts\n * const nameOfAPI = vscode.workspace.getConfiguration('neuropilot').get<string>(NeuroPilotSetting.NameOfAPI);\n * ```\n */\nexport const enum NeuroPilotSetting {\n /** The number of lines before the cursor position to include as context when editing a file or sending a completion request. */\n BeforeContext = 'beforeContext',\n /** The number of lines after the cursor position to include as context when editing a file or sending a completion request. */\n AfterContext = 'afterContext',\n /** Whether the real cursor follows Neuro's cursor. */\n CursorFollowsNeuro = 'cursorFollowsNeuro',\n /**\n * Whether to send contents of a file to Neuro when the user switches to it.\n * If false, Neuro will still know what file was switched to, but won't get the contents.\n * Neuro will never get the contents or the name of files that aren't Neuro-safe.\n */\n SendContentsOnFileChange = 'sendContentsOnFileChange',\n /**\n * The style to use for specifying the cursor position in context messages.\n * Possible values are:\n * - `\"off\"`: Cursor position should not be mentioned to Neuro.\n * - `\"inline\"`: Cursor position should be denoted by `<<<|>>>`\n * - `\"lineAndColumn\"`: Cursor position should be reported in <line>:<column> format (one-based).\n * - `\"both\"`: Combination of `\"inline\"` and `\"lineAndColumn\"`.\n */\n CursorPositionContextStyle = 'cursorPositionContextStyle',\n /**\n * The format to use for line numbers in context messages.\n * This format should be prepended to every line.\n * `{n}` is used for the line number. Examples:\n * - `\"\"`\n * - `\"{n} \"`\n * - `\"{n}|\"`\n * - `\"{n}: \"`\n */\n LineNumberContextFormat = 'lineNumberContextFormat',\n /** The URL to connect to the Neuro API. */\n WebsocketUrl = 'connection.websocketUrl',\n /** The game name NeuroPilot reports to the API. */\n GameName = 'connection.gameName',\n /** The name to indicate who is controlling this VS Code instance alongside the API server. This replaces the default name `Vedal`. */\n UserName = 'connection.userName',\n /** The name of the entity currently acting as the API server. You can add custom characters using `settings.json` if you ignore the lint error from VS Code. */\n NameOfAPI = 'connection.nameOfAPI',\n\n // Commented access.* out for now because companions should use isPathNeuroSafe instead.\n // If we find a use case that is not covered by isPathNeuroSafe then we can add them back.\n\n // /** Whether to allow Neuro to access files and folders beginning with a dot. */\n // DotFiles = 'access.dotFiles',\n // /** Whether to allow Neuro to access files and folders outside the current workspace. */\n // ExternalFiles = 'access.externalFiles',\n // /**\n // * Whether to allow Neuro to use environment variables in paths.\n // * Resolving environent variables isn't implemented in NeuroPilot, so you won't have to implement it in your companion either.\n // * However, you should still check for it.\n // */\n // EnvironmentVariables = 'access.environmentVariables',\n // /**\n // * A case-sensitive list of glob patterns for files Neuro is allowed to open, i.e. she should be unable to open files that don't match this pattern.\n // * Should be applied before {@link ExcludePattern}.\n // * \n // * Patterns without a slash should match any file or folder with that name.\n // */\n // IncludePattern = 'access.includePattern',\n // /**\n // * A case-sensitive glob pattern for files Neuro is not allowed to open.\n // * Should be applied after {@link IncludePattern}.\n // * \n // * Patterns without a slash should match any file or folder with that name.\n // */\n // ExcludePattern = 'access.excludePattern',\n // /** Allow NeuroPilot to read ignore patterns from an ignore file (e.g. .gitignore). */\n // InheritFromIgnoreFiles = 'access.inheritFromIgnoreFiles',\n // /**\n // * A list of ignore-style files to inherit Neuro-safe glob paths from.\n // * Should support the full range of git's ignore pattern globs and ignore comments (lines starting with #).\n // * The further down a file is on the list, the more priority it should get.\n // * \n // * This setting should not override any of the other access settings.\n // * \n // * Example: `[ \".gitignore\", \".npmignore\", \".prettierignore\" ]`\n // */\n // IgnoreFiles = 'access.ignoreFiles',\n}\n\ntype ItselfOrArray<T> = T | T[];\n\nexport * from './actions';\nexport * from './companions';\nexport { ActionForcePriorityEnum } from 'neuro-game-sdk';\n"],"mappings":";;;AACA,IAAkB,kBAAX,yBAAA,iBAAA;AACH,iBAAA,gBAAA,SAAA,KAAA;AACA,iBAAA,gBAAA,aAAA,KAAA;AACA,iBAAA,g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