janet-cli 0.3.7__tar.gz → 0.3.9__tar.gz
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.
- {janet_cli-0.3.7/janet_cli.egg-info → janet_cli-0.3.9}/PKG-INFO +5 -5
- {janet_cli-0.3.7 → janet_cli-0.3.9}/README.md +4 -4
- janet_cli-0.3.9/janet/__init__.py +8 -0
- {janet_cli-0.3.7 → janet_cli-0.3.9}/janet/markdown/generator.py +27 -2
- {janet_cli-0.3.7 → janet_cli-0.3.9}/janet/sync/sse_watcher.py +4 -1
- {janet_cli-0.3.7 → janet_cli-0.3.9}/janet/sync/sync_engine.py +8 -2
- {janet_cli-0.3.7 → janet_cli-0.3.9/janet_cli.egg-info}/PKG-INFO +5 -5
- janet_cli-0.3.9/janet_cli.egg-info/top_level.txt +1 -0
- {janet_cli-0.3.7 → janet_cli-0.3.9}/pyproject.toml +1 -1
- janet_cli-0.3.7/janet/__init__.py +0 -3
- janet_cli-0.3.7/janet_cli.egg-info/top_level.txt +0 -2
- {janet_cli-0.3.7 → janet_cli-0.3.9}/.env.example +0 -0
- {janet_cli-0.3.7 → janet_cli-0.3.9}/LICENSE +0 -0
- {janet_cli-0.3.7 → janet_cli-0.3.9}/MANIFEST.in +0 -0
- {janet_cli-0.3.7 → janet_cli-0.3.9}/janet/__main__.py +0 -0
- {janet_cli-0.3.7 → janet_cli-0.3.9}/janet/api/__init__.py +0 -0
- {janet_cli-0.3.7 → janet_cli-0.3.9}/janet/api/client.py +0 -0
- {janet_cli-0.3.7 → janet_cli-0.3.9}/janet/api/models.py +0 -0
- {janet_cli-0.3.7 → janet_cli-0.3.9}/janet/api/organizations.py +0 -0
- {janet_cli-0.3.7 → janet_cli-0.3.9}/janet/api/projects.py +0 -0
- {janet_cli-0.3.7 → janet_cli-0.3.9}/janet/api/tickets.py +0 -0
- {janet_cli-0.3.7 → janet_cli-0.3.9}/janet/auth/__init__.py +0 -0
- {janet_cli-0.3.7 → janet_cli-0.3.9}/janet/auth/callback_server.py +0 -0
- {janet_cli-0.3.7 → janet_cli-0.3.9}/janet/auth/oauth_flow.py +0 -0
- {janet_cli-0.3.7 → janet_cli-0.3.9}/janet/auth/token_manager.py +0 -0
- {janet_cli-0.3.7 → janet_cli-0.3.9}/janet/cli.py +0 -0
- {janet_cli-0.3.7 → janet_cli-0.3.9}/janet/config/__init__.py +0 -0
- {janet_cli-0.3.7 → janet_cli-0.3.9}/janet/config/manager.py +0 -0
- {janet_cli-0.3.7 → janet_cli-0.3.9}/janet/config/models.py +0 -0
- {janet_cli-0.3.7 → janet_cli-0.3.9}/janet/markdown/__init__.py +0 -0
- {janet_cli-0.3.7 → janet_cli-0.3.9}/janet/markdown/yjs_converter.py +0 -0
- {janet_cli-0.3.7 → janet_cli-0.3.9}/janet/sync/__init__.py +0 -0
- {janet_cli-0.3.7 → janet_cli-0.3.9}/janet/sync/file_manager.py +0 -0
- {janet_cli-0.3.7 → janet_cli-0.3.9}/janet/sync/readme_generator.py +0 -0
- {janet_cli-0.3.7 → janet_cli-0.3.9}/janet/utils/__init__.py +0 -0
- {janet_cli-0.3.7 → janet_cli-0.3.9}/janet/utils/console.py +0 -0
- {janet_cli-0.3.7 → janet_cli-0.3.9}/janet/utils/errors.py +0 -0
- {janet_cli-0.3.7 → janet_cli-0.3.9}/janet/utils/paths.py +0 -0
- {janet_cli-0.3.7 → janet_cli-0.3.9}/janet_cli.egg-info/SOURCES.txt +0 -0
- {janet_cli-0.3.7 → janet_cli-0.3.9}/janet_cli.egg-info/dependency_links.txt +0 -0
- {janet_cli-0.3.7 → janet_cli-0.3.9}/janet_cli.egg-info/entry_points.txt +0 -0
- {janet_cli-0.3.7 → janet_cli-0.3.9}/janet_cli.egg-info/requires.txt +0 -0
- {janet_cli-0.3.7 → janet_cli-0.3.9}/requirements.txt +0 -0
- {janet_cli-0.3.7 → janet_cli-0.3.9}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: janet-cli
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.9
|
|
4
4
|
Summary: CLI tool to sync Janet AI tickets to local markdown files
|
|
5
5
|
Author-email: Janet AI <support@janet-ai.com>
|
|
6
6
|
License: MIT
|
|
@@ -49,7 +49,7 @@ Dynamic: license-file
|
|
|
49
49
|
|
|
50
50
|
## What is Janet AI?
|
|
51
51
|
|
|
52
|
-
[Janet AI](https://
|
|
52
|
+
[Janet AI](https://janet.ai) is an AI-native project management platform for modern software teams. The Janet CLI allows developers to:
|
|
53
53
|
|
|
54
54
|
- **Sync tickets** to local markdown files with real-time updates as changes are made on the platform
|
|
55
55
|
- **Create tickets** directly from the command line or via AI agents
|
|
@@ -345,7 +345,7 @@ The CLI stores configuration at:
|
|
|
345
345
|
## Requirements
|
|
346
346
|
|
|
347
347
|
- Python 3.8 or higher
|
|
348
|
-
- Janet AI account ([sign up](https://
|
|
348
|
+
- Janet AI account ([sign up](https://janet.ai))
|
|
349
349
|
|
|
350
350
|
## License
|
|
351
351
|
|
|
@@ -353,5 +353,5 @@ MIT License - see [LICENSE](LICENSE) file for details.
|
|
|
353
353
|
|
|
354
354
|
## Links
|
|
355
355
|
|
|
356
|
-
- [Janet AI](https://
|
|
357
|
-
- [Documentation](https://docs.
|
|
356
|
+
- [Janet AI](https://janet.ai) - AI-native project management
|
|
357
|
+
- [Documentation](https://docs.janet.ai)
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
## What is Janet AI?
|
|
9
9
|
|
|
10
|
-
[Janet AI](https://
|
|
10
|
+
[Janet AI](https://janet.ai) is an AI-native project management platform for modern software teams. The Janet CLI allows developers to:
|
|
11
11
|
|
|
12
12
|
- **Sync tickets** to local markdown files with real-time updates as changes are made on the platform
|
|
13
13
|
- **Create tickets** directly from the command line or via AI agents
|
|
@@ -303,7 +303,7 @@ The CLI stores configuration at:
|
|
|
303
303
|
## Requirements
|
|
304
304
|
|
|
305
305
|
- Python 3.8 or higher
|
|
306
|
-
- Janet AI account ([sign up](https://
|
|
306
|
+
- Janet AI account ([sign up](https://janet.ai))
|
|
307
307
|
|
|
308
308
|
## License
|
|
309
309
|
|
|
@@ -311,5 +311,5 @@ MIT License - see [LICENSE](LICENSE) file for details.
|
|
|
311
311
|
|
|
312
312
|
## Links
|
|
313
313
|
|
|
314
|
-
- [Janet AI](https://
|
|
315
|
-
- [Documentation](https://docs.
|
|
314
|
+
- [Janet AI](https://janet.ai) - AI-native project management
|
|
315
|
+
- [Documentation](https://docs.janet.ai)
|
|
@@ -22,6 +22,8 @@ class MarkdownGenerator:
|
|
|
22
22
|
ticket: Dict,
|
|
23
23
|
organization_members: Optional[List[Dict]] = None,
|
|
24
24
|
attachments: Optional[Dict] = None,
|
|
25
|
+
org_id: Optional[str] = None,
|
|
26
|
+
project_id: Optional[str] = None,
|
|
25
27
|
) -> str:
|
|
26
28
|
"""
|
|
27
29
|
Generate complete markdown document from ticket data.
|
|
@@ -30,18 +32,26 @@ class MarkdownGenerator:
|
|
|
30
32
|
ticket: Ticket dictionary
|
|
31
33
|
organization_members: List of organization members (for name resolution)
|
|
32
34
|
attachments: Dictionary with direct_attachments and indirect_attachments
|
|
35
|
+
org_id: Organization ID for generating frontend link
|
|
36
|
+
project_id: Project ID for generating frontend link
|
|
33
37
|
|
|
34
38
|
Returns:
|
|
35
39
|
Complete markdown string
|
|
36
40
|
"""
|
|
37
41
|
sections = []
|
|
38
42
|
|
|
39
|
-
# 1.
|
|
43
|
+
# 1. Link to Janet frontend (at the very top)
|
|
44
|
+
ticket_id = ticket.get("id")
|
|
45
|
+
if org_id and project_id and ticket_id:
|
|
46
|
+
link = self._generate_frontend_link(org_id, project_id, ticket_id)
|
|
47
|
+
sections.append(f"**View in Janet:** {link}\n")
|
|
48
|
+
|
|
49
|
+
# 2. Title
|
|
40
50
|
ticket_key = ticket.get("ticket_key", "UNKNOWN")
|
|
41
51
|
title = ticket.get("title", "Untitled")
|
|
42
52
|
sections.append(f"# {ticket_key}: {title}\n")
|
|
43
53
|
|
|
44
|
-
#
|
|
54
|
+
# 3. Metadata
|
|
45
55
|
sections.append(self._generate_metadata(ticket, organization_members))
|
|
46
56
|
|
|
47
57
|
# 3. Description (pass attachments for inline image handling)
|
|
@@ -240,6 +250,21 @@ class MarkdownGenerator:
|
|
|
240
250
|
lines.append("") # Empty line after child tasks
|
|
241
251
|
return "\n".join(lines)
|
|
242
252
|
|
|
253
|
+
def _generate_frontend_link(self, org_id: str, project_id: str, ticket_id: str) -> str:
|
|
254
|
+
"""
|
|
255
|
+
Generate link to view ticket in Janet frontend.
|
|
256
|
+
|
|
257
|
+
Args:
|
|
258
|
+
org_id: Organization ID
|
|
259
|
+
project_id: Project ID
|
|
260
|
+
ticket_id: Ticket ID
|
|
261
|
+
|
|
262
|
+
Returns:
|
|
263
|
+
Markdown link to Janet frontend
|
|
264
|
+
"""
|
|
265
|
+
url = f"https://app.tryjanet.ai/dashboard/{org_id}/projects/{project_id}/{ticket_id}"
|
|
266
|
+
return url
|
|
267
|
+
|
|
243
268
|
def _generate_footer(self, ticket_key: str) -> str:
|
|
244
269
|
"""Generate footer section."""
|
|
245
270
|
export_date = self._format_date(datetime.utcnow().isoformat())
|
|
@@ -109,7 +109,10 @@ class SSEWatcher:
|
|
|
109
109
|
"direct_attachments": ticket_data.get("attachments", []),
|
|
110
110
|
"indirect_attachments": []
|
|
111
111
|
}
|
|
112
|
-
|
|
112
|
+
org_id = self.config.selected_organization.id
|
|
113
|
+
markdown = self.markdown_generator.generate(
|
|
114
|
+
ticket_data, self.org_members, attachments, org_id, project_id
|
|
115
|
+
)
|
|
113
116
|
self.file_manager.write_ticket(
|
|
114
117
|
org_name=self.org_name,
|
|
115
118
|
project_name=project_name,
|
|
@@ -168,8 +168,10 @@ class SyncEngine:
|
|
|
168
168
|
# Get pre-fetched attachments for this ticket
|
|
169
169
|
ticket_attachments = attachments_map.get(ticket_id)
|
|
170
170
|
|
|
171
|
+
org_id = self.config.selected_organization.id
|
|
171
172
|
self._sync_single_ticket_fast(
|
|
172
|
-
merged_ticket, org_name, project_name, org_members, ticket_attachments
|
|
173
|
+
merged_ticket, org_name, project_name, org_members, ticket_attachments,
|
|
174
|
+
org_id, project_id
|
|
173
175
|
)
|
|
174
176
|
synced_count += 1
|
|
175
177
|
except Exception as e:
|
|
@@ -188,6 +190,8 @@ class SyncEngine:
|
|
|
188
190
|
project_name: str,
|
|
189
191
|
org_members: Optional[List[Dict]] = None,
|
|
190
192
|
attachments: Optional[Dict] = None,
|
|
193
|
+
org_id: Optional[str] = None,
|
|
194
|
+
project_id: Optional[str] = None,
|
|
191
195
|
) -> None:
|
|
192
196
|
"""
|
|
193
197
|
Sync a single ticket (optimized - no individual API calls).
|
|
@@ -198,6 +202,8 @@ class SyncEngine:
|
|
|
198
202
|
project_name: Project name
|
|
199
203
|
org_members: Organization members for name resolution
|
|
200
204
|
attachments: Pre-fetched attachments dict (from batch fetch)
|
|
205
|
+
org_id: Organization ID for generating frontend link
|
|
206
|
+
project_id: Project ID for generating frontend link
|
|
201
207
|
"""
|
|
202
208
|
ticket_id = ticket.get("id")
|
|
203
209
|
|
|
@@ -224,7 +230,7 @@ class SyncEngine:
|
|
|
224
230
|
|
|
225
231
|
# Generate markdown
|
|
226
232
|
markdown = self.markdown_generator.generate(
|
|
227
|
-
ticket, org_members, attachments
|
|
233
|
+
ticket, org_members, attachments, org_id, project_id
|
|
228
234
|
)
|
|
229
235
|
|
|
230
236
|
# Write to file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: janet-cli
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.9
|
|
4
4
|
Summary: CLI tool to sync Janet AI tickets to local markdown files
|
|
5
5
|
Author-email: Janet AI <support@janet-ai.com>
|
|
6
6
|
License: MIT
|
|
@@ -49,7 +49,7 @@ Dynamic: license-file
|
|
|
49
49
|
|
|
50
50
|
## What is Janet AI?
|
|
51
51
|
|
|
52
|
-
[Janet AI](https://
|
|
52
|
+
[Janet AI](https://janet.ai) is an AI-native project management platform for modern software teams. The Janet CLI allows developers to:
|
|
53
53
|
|
|
54
54
|
- **Sync tickets** to local markdown files with real-time updates as changes are made on the platform
|
|
55
55
|
- **Create tickets** directly from the command line or via AI agents
|
|
@@ -345,7 +345,7 @@ The CLI stores configuration at:
|
|
|
345
345
|
## Requirements
|
|
346
346
|
|
|
347
347
|
- Python 3.8 or higher
|
|
348
|
-
- Janet AI account ([sign up](https://
|
|
348
|
+
- Janet AI account ([sign up](https://janet.ai))
|
|
349
349
|
|
|
350
350
|
## License
|
|
351
351
|
|
|
@@ -353,5 +353,5 @@ MIT License - see [LICENSE](LICENSE) file for details.
|
|
|
353
353
|
|
|
354
354
|
## Links
|
|
355
355
|
|
|
356
|
-
- [Janet AI](https://
|
|
357
|
-
- [Documentation](https://docs.
|
|
356
|
+
- [Janet AI](https://janet.ai) - AI-native project management
|
|
357
|
+
- [Documentation](https://docs.janet.ai)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
janet
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|