@tanagram/lore 0.1.23 → 0.1.25

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanagram/lore",
3
- "version": "0.1.23",
3
+ "version": "0.1.25",
4
4
  "description": "Lore CLI",
5
5
  "type": "module",
6
6
  "bin": {
@@ -0,0 +1,86 @@
1
+ ---
2
+ name: share-codex
3
+ description: Share (export) the current Codex session to Lore and get back a shareable URL. Use when the user is running inside Codex and says "share this thread", "send this to Lore", "export this conversation", "post this to Lore", or asks for a link to the current Codex session. Safe to invoke explicitly on request — do not run proactively.
4
+ allowed-tools: Bash
5
+ ---
6
+
7
+ # Share Codex session to Lore
8
+
9
+ Exports the Codex session you are currently running in to Lore (the team's shared thread library) and prints the URL.
10
+
11
+ Codex stores each session as a JSONL rollout file on disk under
12
+ `~/.codex/sessions/YYYY/MM/DD/rollout-<timestamp>-<uuid>.jsonl`. This skill
13
+ locates the file by the current Codex session ID, then hands it to the lore
14
+ CLI which uploads it as a Codex thread.
15
+
16
+ ## When to Use
17
+
18
+ Run when the user asks to:
19
+
20
+ - "share this thread / conversation / session"
21
+ - "send this to Lore"
22
+ - "export this to Lore"
23
+ - "get a Lore link for this"
24
+ - "post this to Lore"
25
+
26
+ Do NOT run this proactively. Only on explicit request.
27
+
28
+ ## Command
29
+
30
+ ```bash
31
+ SESSION_FILE=$(find "$HOME/.codex/sessions" -name "*${CODEX_SESSION_ID}.jsonl" 2>/dev/null | head -1)
32
+ if [ -z "$SESSION_FILE" ]; then
33
+ echo "Could not locate Codex session file for session id ${CODEX_SESSION_ID}" >&2
34
+ exit 1
35
+ fi
36
+ lore share-codex --session-file "$SESSION_FILE" --visibility workspace
37
+ ```
38
+
39
+ `${CODEX_SESSION_ID}` is set by Codex inside the running session. If it is
40
+ empty, ask the user which session they want to share and substitute the ID.
41
+
42
+ If the user explicitly asks to share publicly (anyone with the link) or to
43
+ keep the thread private to themselves, change the `--visibility` flag to
44
+ `public` or `private` respectively. Default to `workspace` whenever the user
45
+ just says "share".
46
+
47
+ ## Output
48
+
49
+ The command prints a single JSON object on stdout:
50
+
51
+ ```json
52
+ {
53
+ "thread_id": "th_...",
54
+ "url": "https://lore.tanagram.ai/session/th_...",
55
+ "session_id": "...",
56
+ "project": "",
57
+ "reused": false,
58
+ "visibility": "workspace",
59
+ "clipboard_copied": true
60
+ }
61
+ ```
62
+
63
+ - `url` — the shareable Lore link for the session thread. **Always show this to the user as the primary result.**
64
+ - `clipboard_copied` — `true` when the URL was copied to the system clipboard. Mention this when `true` so the user knows they can paste it directly.
65
+ - `project` — intentionally empty for Codex sessions. Codex does not record a project directory in the rollout file.
66
+
67
+ ## After Running
68
+
69
+ Echo the session URL back to the user as a clickable link. If
70
+ `clipboard_copied` is `true`, add a short note that the URL is on their
71
+ clipboard. Do not list other threads, summarize the conversation, or take any
72
+ additional action unless the user asks. A minimal response looks like:
73
+
74
+ > Shared: https://lore.tanagram.ai/session/th_abc123 (copied to clipboard).
75
+
76
+ ## Failure Modes
77
+
78
+ - **Not logged in**: the command returns `lore is logged out`. Tell the user to run `lore login` and try again.
79
+ - **Session file not found**: the rollout file may not exist yet for very fresh Codex sessions. Ask the user to send another message in Codex (which forces the rollout to flush) and retry.
80
+ - **Lore is offline**: the command surfaces network errors. Relay the message verbatim.
81
+
82
+ ## What This Does NOT Do
83
+
84
+ - It does not start any background daemon. This skill is a one-shot upload.
85
+ - It does not change the thread title, comments, or other metadata. The user can adjust those in the Lore UI after sharing.
86
+ - No plan export is wired up for Codex. Codex planning is event-stream/UI-first with no clean finalized-plan boundary; plan steps are surfaced by Lore from the session transcript itself.