indent 0.1.9__py3-none-any.whl → 0.1.11__py3-none-any.whl

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.

Potentially problematic release.


This version of indent might be problematic. Click here for more details.

exponent/__init__.py CHANGED
@@ -1,7 +1,14 @@
1
1
  # file generated by setuptools-scm
2
2
  # don't change, don't track in version control
3
3
 
4
- __all__ = ["__version__", "__version_tuple__", "version", "version_tuple"]
4
+ __all__ = [
5
+ "__version__",
6
+ "__version_tuple__",
7
+ "version",
8
+ "version_tuple",
9
+ "__commit_id__",
10
+ "commit_id",
11
+ ]
5
12
 
6
13
  TYPE_CHECKING = False
7
14
  if TYPE_CHECKING:
@@ -9,13 +16,19 @@ if TYPE_CHECKING:
9
16
  from typing import Union
10
17
 
11
18
  VERSION_TUPLE = Tuple[Union[int, str], ...]
19
+ COMMIT_ID = Union[str, None]
12
20
  else:
13
21
  VERSION_TUPLE = object
22
+ COMMIT_ID = object
14
23
 
15
24
  version: str
16
25
  __version__: str
17
26
  __version_tuple__: VERSION_TUPLE
18
27
  version_tuple: VERSION_TUPLE
28
+ commit_id: COMMIT_ID
29
+ __commit_id__: COMMIT_ID
19
30
 
20
- __version__ = version = '0.1.9'
21
- __version_tuple__ = version_tuple = (0, 1, 9)
31
+ __version__ = version = '0.1.11'
32
+ __version_tuple__ = version_tuple = (0, 1, 11)
33
+
34
+ __commit_id__ = commit_id = None
@@ -13,11 +13,6 @@ from exponent.commands.settings import use_settings
13
13
  from exponent.commands.types import exponent_cli_group
14
14
  from exponent.core.config import Settings
15
15
  from exponent.core.graphql.client import GraphQLClient
16
- from exponent.core.graphql.cloud_config_queries import (
17
- CREATE_CLOUD_CONFIG_MUTATION,
18
- GET_CLOUD_CONFIGS_QUERY,
19
- UPDATE_CLOUD_CONFIG_MUTATION,
20
- )
21
16
  from exponent.core.graphql.get_chats_query import GET_CHATS_QUERY
22
17
  from exponent.core.graphql.github_config_queries import (
23
18
  CHECK_GITHUB_CONFIG_VALIDITY_QUERY,
@@ -185,7 +180,7 @@ async def repos_for_github_config_task(
185
180
  help="Clear use default colors",
186
181
  )
187
182
  @use_settings
188
- def config(
183
+ def config( # noqa: PLR0913
189
184
  settings: Settings,
190
185
  set_git_warning_disabled: bool,
191
186
  set_git_warning_enabled: bool,
@@ -394,34 +389,6 @@ async def get_authenticated_user_task(
394
389
  click.echo(it)
395
390
 
396
391
 
397
- @config_cli.command(hidden=True)
398
- @use_settings
399
- def get_cloud_configs(
400
- settings: Settings,
401
- ) -> None:
402
- if not settings.api_key:
403
- redirect_to_login(settings)
404
- return
405
-
406
- run_until_complete(
407
- get_cloud_configs_task(
408
- api_key=settings.api_key,
409
- base_api_url=settings.get_base_api_url(),
410
- base_ws_url=settings.get_base_ws_url(),
411
- )
412
- )
413
-
414
-
415
- async def get_cloud_configs_task(
416
- api_key: str,
417
- base_api_url: str,
418
- base_ws_url: str,
419
- ) -> None:
420
- graphql_client = GraphQLClient(api_key, base_api_url, base_ws_url)
421
- result = await graphql_client.execute(GET_CLOUD_CONFIGS_QUERY)
422
- click.echo(result)
423
-
424
-
425
392
  async def create_github_config_task(
426
393
  api_key: str,
427
394
  base_api_url: str,
@@ -436,133 +403,6 @@ async def create_github_config_task(
436
403
  click.echo(result)
437
404
 
438
405
 
439
- @config_cli.command(hidden=True)
440
- @click.option("--github-pat", required=True, help="Github personal access token")
441
- @use_settings
442
- def create_github_config(
443
- settings: Settings,
444
- github_pat: str,
445
- ) -> None:
446
- if not settings.api_key:
447
- redirect_to_login(settings)
448
- return
449
-
450
- run_until_complete(
451
- create_github_config_task(
452
- api_key=settings.api_key,
453
- base_api_url=settings.get_base_api_url(),
454
- base_ws_url=settings.get_base_ws_url(),
455
- github_pat=github_pat,
456
- )
457
- )
458
-
459
-
460
- @config_cli.command(hidden=True)
461
- @click.option("--github-org-name", required=True, help="GitHub organization name")
462
- @click.option("--github-repo-name", required=True, help="GitHub repository name")
463
- @click.option(
464
- "--setup_commands",
465
- required=False,
466
- help="List of commands to set up and build your repo",
467
- multiple=True,
468
- )
469
- @use_settings
470
- def create_cloud_config(
471
- settings: Settings,
472
- github_org_name: str,
473
- github_repo_name: str,
474
- setup_commands: list[str] | None = None,
475
- ) -> None:
476
- if not settings.api_key:
477
- redirect_to_login(settings)
478
- return
479
-
480
- run_until_complete(
481
- create_cloud_config_task(
482
- api_key=settings.api_key,
483
- base_api_url=settings.get_base_api_url(),
484
- base_ws_url=settings.get_base_ws_url(),
485
- github_org_name=github_org_name,
486
- github_repo_name=github_repo_name,
487
- setup_commands=setup_commands,
488
- )
489
- )
490
-
491
-
492
- async def create_cloud_config_task(
493
- api_key: str,
494
- base_api_url: str,
495
- base_ws_url: str,
496
- github_org_name: str,
497
- github_repo_name: str,
498
- setup_commands: list[str] | None,
499
- ) -> None:
500
- graphql_client = GraphQLClient(api_key, base_api_url, base_ws_url)
501
- variables = {
502
- "githubOrgName": github_org_name,
503
- "githubRepoName": github_repo_name,
504
- "setupCommands": setup_commands,
505
- }
506
- result = await graphql_client.execute(CREATE_CLOUD_CONFIG_MUTATION, variables)
507
- click.echo(result)
508
-
509
-
510
- @config_cli.command(hidden=True)
511
- @click.option("--cloud-config-uuid", required=True, help="Cloud config UUID")
512
- @click.option("--github-org-name", required=True, help="GitHub organization name")
513
- @click.option("--github-repo-name", required=True, help="GitHub repository name")
514
- @click.option(
515
- "--setup_commands",
516
- required=False,
517
- help="List of commands to set up and build your repo",
518
- multiple=True,
519
- )
520
- @use_settings
521
- def update_cloud_config(
522
- settings: Settings,
523
- cloud_config_uuid: str,
524
- github_org_name: str,
525
- github_repo_name: str,
526
- setup_commands: list[str] | None = None,
527
- ) -> None:
528
- if not settings.api_key:
529
- redirect_to_login(settings)
530
- return
531
-
532
- run_until_complete(
533
- update_cloud_config_task(
534
- api_key=settings.api_key,
535
- base_api_url=settings.get_base_api_url(),
536
- base_ws_url=settings.get_base_ws_url(),
537
- cloud_config_uuid=cloud_config_uuid,
538
- github_org_name=github_org_name,
539
- github_repo_name=github_repo_name,
540
- setup_commands=setup_commands,
541
- )
542
- )
543
-
544
-
545
- async def update_cloud_config_task(
546
- api_key: str,
547
- base_api_url: str,
548
- base_ws_url: str,
549
- cloud_config_uuid: str,
550
- github_org_name: str,
551
- github_repo_name: str,
552
- setup_commands: list[str] | None,
553
- ) -> None:
554
- graphql_client = GraphQLClient(api_key, base_api_url, base_ws_url)
555
- variables = {
556
- "cloudConfigUuid": cloud_config_uuid,
557
- "githubOrgName": github_org_name,
558
- "githubRepoName": github_repo_name,
559
- "setupCommands": setup_commands,
560
- }
561
-
562
- result = await graphql_client.execute(UPDATE_CLOUD_CONFIG_MUTATION, variables)
563
- click.echo(result)
564
-
565
-
566
406
  @config_cli.command(hidden=True)
567
407
  @use_settings
568
408
  def refresh_key(settings: Settings) -> None:
@@ -98,9 +98,9 @@ class Spinner:
98
98
  while True:
99
99
  t = time.time() - base_time
100
100
  i = round(t * self.animation_speed) % len(self.animation_chars)
101
- print(
101
+ click.echo(
102
102
  f"\r{style_start}{self.animation_chars[i]} {self.text}{style_end}",
103
- end="",
103
+ nl=False,
104
104
  )
105
105
  await asyncio.sleep(0.1)
106
106
 
@@ -112,7 +112,7 @@ class Spinner:
112
112
 
113
113
  self.task.cancel()
114
114
  self.task = None
115
- print("\r\x1b[0m\x1b[2K", end="")
115
+ click.echo("\r\x1b[0m\x1b[2K", nl=False)
116
116
  sys.stdout.flush()
117
117
 
118
118
 
@@ -56,7 +56,7 @@ def trigger(settings: Settings, workflow_type: str) -> None:
56
56
  click.secho(f"Error: {result.error_message}", fg="red")
57
57
  sys.exit(10)
58
58
  else:
59
- print("Disconnected upon user request, shutting down...")
59
+ click.echo("Disconnected upon user request, shutting down...")
60
60
  break
61
61
  else:
62
62
  raise click.ClickException("Workflow run exited unexpectedly")
exponent/core/config.py CHANGED
@@ -24,8 +24,6 @@ logger = logging.getLogger(__name__)
24
24
 
25
25
 
26
26
  def is_editable_install() -> bool:
27
- return True
28
-
29
27
  if os.getenv("ENVIRONMENT") == "test" or os.getenv("EXPONENT_TEST_AUTO_UPGRADE"):
30
28
  # We should explicitly set these variables
31
29
  # in test when needed
@@ -14,452 +14,3 @@ AUTHENTICATED_USER_SUBSCRIPTION = """
14
14
  }
15
15
  }
16
16
  """
17
-
18
- INDENT_EVENTS_SUBSCRIPTION = """
19
- subscription ChatEvents(
20
- $prompt: Prompt
21
- $chatUuid: String!
22
- $parentUuid: String
23
- $model: ModelName!
24
- $strategyNameOverride: StrategyName
25
- $depthLimit: Int!
26
- $requireConfirmation: Boolean
27
- $readOnly: Boolean
28
- $enableThinking: Boolean
29
- ) {
30
- indentChat(
31
- chatInput: {
32
- prompt: $prompt
33
- }
34
- parentUuid: $parentUuid
35
- chatConfig: {
36
- chatUuid: $chatUuid
37
- model: $model
38
- requireConfirmation: $requireConfirmation
39
- readOnly: $readOnly
40
- strategyNameOverride: $strategyNameOverride
41
- depthLimit: $depthLimit
42
- enableThinking: $enableThinking
43
- }
44
- ) {
45
- __typename
46
- ...on Error {
47
- message
48
- }
49
- ...on UnauthenticatedError {
50
- message
51
- }
52
- ...on UserEvent {
53
- uuid
54
- parentUuid
55
- chatId
56
- isSidechain
57
- version
58
- createdAt
59
- sidechainRootUuid
60
- synthetic
61
- messageData: message {
62
- __typename
63
- ... on TextMessage {
64
- text
65
- }
66
- ... on ToolResultMessage {
67
- messageId
68
- toolUseId
69
- text
70
- resultData {
71
- ... on BashToolResult {
72
- shellOutput
73
- exitCode
74
- }
75
- ... on ReadToolResult {
76
- content
77
- }
78
- }
79
- }
80
- ... on ToolCallMessage {
81
- messageId
82
- toolUseId
83
- toolName
84
- toolInput {
85
- ... on BashToolInput {
86
- command
87
- }
88
- ... on ReadToolInput {
89
- filePath
90
- }
91
- }
92
- }
93
- ... on PartialToolResultMessage {
94
- messageId
95
- toolUseId
96
- text
97
- resultData {
98
- ... on PartialToolResult {
99
- __typename
100
- }
101
- }
102
- }
103
- }
104
- }
105
- ...on AssistantEvent {
106
- uuid
107
- parentUuid
108
- chatId
109
- isSidechain
110
- version
111
- createdAt
112
- sidechainRootUuid
113
- synthetic
114
- messageData: message {
115
- __typename
116
- ... on TextMessage {
117
- text
118
- }
119
- ... on ToolCallMessage {
120
- messageId
121
- toolUseId
122
- toolName
123
- toolInput {
124
- ... on BashToolInput {
125
- command
126
- }
127
- ... on ReadToolInput {
128
- filePath
129
- }
130
- }
131
- }
132
- }
133
- }
134
- ...on SystemEvent {
135
- uuid
136
- parentUuid
137
- chatId
138
- isSidechain
139
- version
140
- createdAt
141
- sidechainRootUuid
142
- messageData: message {
143
- __typename
144
- ... on ToolCallMessage {
145
- messageId
146
- toolUseId
147
- toolName
148
- toolInput {
149
- ... on BashToolInput {
150
- command
151
- }
152
- ... on ReadToolInput {
153
- filePath
154
- }
155
- }
156
- }
157
- ... on ToolResultMessage {
158
- messageId
159
- toolUseId
160
- text
161
- resultData {
162
- ... on BashToolResult {
163
- shellOutput
164
- exitCode
165
- }
166
- ... on ReadToolResult {
167
- content
168
- }
169
- }
170
- }
171
- ... on ToolExecutionStatusMessage {
172
- executionStatus: status
173
- }
174
- ... on ToolPermissionStatusMessage {
175
- permissionStatus: status
176
- }
177
- }
178
- }
179
- }
180
- }
181
- """
182
-
183
-
184
- CONFIRM_AND_CONTINUE_SUBSCRIPTION = """
185
- subscription ChatEvents(
186
- $requestUuid: String!
187
- $chatUuid: String!
188
- $model: ModelName!
189
- $strategyNameOverride: StrategyName
190
- $depthLimit: Int!
191
- $requireConfirmation: Boolean
192
- $readOnly: Boolean
193
- $enableThinking: Boolean
194
- ) {
195
- confirmAndContinue(
196
- requestEventUuid: $requestUuid
197
- chatConfig: {
198
- chatUuid: $chatUuid
199
- model: $model
200
- requireConfirmation: $requireConfirmation
201
- readOnly: $readOnly
202
- strategyNameOverride: $strategyNameOverride
203
- depthLimit: $depthLimit
204
- enableThinking: $enableThinking
205
- }
206
- ) {
207
- __typename
208
- ...on Error {
209
- message
210
- }
211
- ...on UnauthenticatedError {
212
- message
213
- }
214
- ...on UserEvent {
215
- uuid
216
- parentUuid
217
- chatId
218
- isSidechain
219
- version
220
- createdAt
221
- sidechainRootUuid
222
- synthetic
223
- messageData: message {
224
- __typename
225
- ... on TextMessage {
226
- text
227
- }
228
- ... on ToolResultMessage {
229
- messageId
230
- toolUseId
231
- text
232
- resultData {
233
- ... on BashToolResult {
234
- shellOutput
235
- exitCode
236
- }
237
- ... on ReadToolResult {
238
- content
239
- }
240
- }
241
- }
242
- ... on PartialToolResultMessage {
243
- messageId
244
- toolUseId
245
- text
246
- resultData {
247
- ... on PartialToolResult {
248
- __typename
249
- }
250
- }
251
- }
252
- }
253
- }
254
- ...on AssistantEvent {
255
- uuid
256
- parentUuid
257
- chatId
258
- isSidechain
259
- version
260
- createdAt
261
- sidechainRootUuid
262
- synthetic
263
- messageData: message {
264
- __typename
265
- ... on TextMessage {
266
- text
267
- }
268
- ... on ToolCallMessage {
269
- messageId
270
- toolUseId
271
- toolName
272
- toolInput {
273
- ... on BashToolInput {
274
- command
275
- }
276
- ... on ReadToolInput {
277
- filePath
278
- }
279
- }
280
- }
281
- }
282
- }
283
- ...on SystemEvent {
284
- uuid
285
- parentUuid
286
- chatId
287
- isSidechain
288
- version
289
- createdAt
290
- sidechainRootUuid
291
- messageData: message {
292
- __typename
293
- ... on ToolCallMessage {
294
- messageId
295
- toolUseId
296
- toolName
297
- toolInput {
298
- ... on BashToolInput {
299
- command
300
- }
301
- ... on ReadToolInput {
302
- filePath
303
- }
304
- }
305
- }
306
- ... on ToolResultMessage {
307
- messageId
308
- toolUseId
309
- text
310
- resultData {
311
- ... on BashToolResult {
312
- shellOutput
313
- exitCode
314
- }
315
- ... on ReadToolResult {
316
- content
317
- }
318
- }
319
- }
320
- ... on ToolExecutionStatusMessage {
321
- executionStatus: status
322
- }
323
- ... on ToolPermissionStatusMessage {
324
- permissionStatus: status
325
- }
326
- }
327
- }
328
- }
329
- }
330
- """
331
-
332
-
333
- INDENT_CHAT_EVENT_STREAM_SUBSCRIPTION = """
334
- subscription IndentChatEventStream(
335
- $chatUuid: String!
336
- $lastKnownFullEventUuid: String
337
- ) {
338
- indentChatEventStream(
339
- chatUuid: $chatUuid
340
- lastKnownFullEventUuid: $lastKnownFullEventUuid
341
- ) {
342
- __typename
343
- ...on Error {
344
- message
345
- }
346
- ...on UnauthenticatedError {
347
- message
348
- }
349
- ...on UserEvent {
350
- uuid
351
- parentUuid
352
- chatId
353
- isSidechain
354
- version
355
- createdAt
356
- sidechainRootUuid
357
- synthetic
358
- messageData: message {
359
- __typename
360
- ... on TextMessage {
361
- text
362
- }
363
- ... on ToolResultMessage {
364
- messageId
365
- toolUseId
366
- text
367
- resultData {
368
- ... on BashToolResult {
369
- shellOutput
370
- exitCode
371
- }
372
- ... on ReadToolResult {
373
- content
374
- }
375
- }
376
- }
377
- ... on PartialToolResultMessage {
378
- messageId
379
- toolUseId
380
- text
381
- resultData {
382
- ... on PartialToolResult {
383
- __typename
384
- }
385
- }
386
- }
387
- }
388
- }
389
- ...on AssistantEvent {
390
- uuid
391
- parentUuid
392
- chatId
393
- isSidechain
394
- version
395
- createdAt
396
- sidechainRootUuid
397
- synthetic
398
- messageData: message {
399
- __typename
400
- ... on TextMessage {
401
- text
402
- }
403
- ... on ToolCallMessage {
404
- messageId
405
- toolUseId
406
- toolName
407
- toolInput {
408
- ... on BashToolInput {
409
- command
410
- }
411
- ... on ReadToolInput {
412
- filePath
413
- }
414
- }
415
- }
416
- }
417
- }
418
- ...on SystemEvent {
419
- uuid
420
- parentUuid
421
- chatId
422
- isSidechain
423
- version
424
- createdAt
425
- sidechainRootUuid
426
- messageData: message {
427
- __typename
428
- ... on ToolCallMessage {
429
- messageId
430
- toolUseId
431
- toolName
432
- toolInput {
433
- ... on BashToolInput {
434
- command
435
- }
436
- ... on ReadToolInput {
437
- filePath
438
- }
439
- }
440
- }
441
- ... on ToolResultMessage {
442
- messageId
443
- toolUseId
444
- text
445
- resultData {
446
- ... on BashToolResult {
447
- shellOutput
448
- exitCode
449
- }
450
- ... on ReadToolResult {
451
- content
452
- }
453
- }
454
- }
455
- ... on ToolExecutionStatusMessage {
456
- executionStatus: status
457
- }
458
- ... on ToolPermissionStatusMessage {
459
- permissionStatus: status
460
- }
461
- }
462
- }
463
- }
464
- }
465
- """