@tryglen/cli 0.34.0 → 0.36.1
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/README.md +39 -27
- package/dist/_utils/agent-adapter.d.ts +0 -13
- package/dist/_utils/agent-adapter.js +1 -19
- package/dist/_utils/agent-adapter.js.map +1 -1
- package/dist/_utils/agents-table.js +1 -9
- package/dist/_utils/agents-table.js.map +1 -1
- package/dist/_utils/cli-error.js +0 -3
- package/dist/_utils/cli-error.js.map +1 -1
- package/dist/_utils/codex-app-server.js +0 -2
- package/dist/_utils/codex-app-server.js.map +1 -1
- package/dist/_utils/codex-hooks-merge.js +0 -11
- package/dist/_utils/codex-hooks-merge.js.map +1 -1
- package/dist/_utils/codex-hooks-setup.js +0 -18
- package/dist/_utils/codex-hooks-setup.js.map +1 -1
- package/dist/_utils/codex-paths.js +0 -3
- package/dist/_utils/codex-paths.js.map +1 -1
- package/dist/_utils/codex-repair-trace.js +0 -3
- package/dist/_utils/codex-repair-trace.js.map +1 -1
- package/dist/_utils/codex-trust-toml.js +1 -9
- package/dist/_utils/codex-trust-toml.js.map +1 -1
- package/dist/_utils/collect-import-files.js +0 -7
- package/dist/_utils/collect-import-files.js.map +1 -1
- package/dist/_utils/config.js +0 -4
- package/dist/_utils/config.js.map +1 -1
- package/dist/_utils/confirm.js +2 -10
- package/dist/_utils/confirm.js.map +1 -1
- package/dist/_utils/credentials.js +0 -3
- package/dist/_utils/credentials.js.map +1 -1
- package/dist/_utils/detect-transcript-format.d.ts +1 -1
- package/dist/_utils/detect-transcript-format.js +0 -7
- package/dist/_utils/detect-transcript-format.js.map +1 -1
- package/dist/_utils/ensure-global-cli.d.ts +0 -12
- package/dist/_utils/ensure-global-cli.js +1 -28
- package/dist/_utils/ensure-global-cli.js.map +1 -1
- package/dist/_utils/ephemeral-session.js +3 -24
- package/dist/_utils/ephemeral-session.js.map +1 -1
- package/dist/_utils/extract-claude-segments.js +1 -5
- package/dist/_utils/extract-claude-segments.js.map +1 -1
- package/dist/_utils/extract-codex-segments.js +0 -9
- package/dist/_utils/extract-codex-segments.js.map +1 -1
- package/dist/_utils/extract-pi-segments.js +1 -5
- package/dist/_utils/extract-pi-segments.js.map +1 -1
- package/dist/_utils/find-bin.js +0 -8
- package/dist/_utils/find-bin.js.map +1 -1
- package/dist/_utils/format-search-result.js +3 -19
- package/dist/_utils/format-search-result.js.map +1 -1
- package/dist/_utils/format-turn-nudges.js +2 -20
- package/dist/_utils/format-turn-nudges.js.map +1 -1
- package/dist/_utils/git-context.d.ts +0 -2
- package/dist/_utils/git-context.js +1 -33
- package/dist/_utils/git-context.js.map +1 -1
- package/dist/_utils/git-hook-setup.js +0 -1
- package/dist/_utils/git-hook-setup.js.map +1 -1
- package/dist/_utils/glen-headers.js +1 -4
- package/dist/_utils/glen-headers.js.map +1 -1
- package/dist/_utils/http.js +1 -8
- package/dist/_utils/http.js.map +1 -1
- package/dist/_utils/idempotency-key.js +1 -4
- package/dist/_utils/idempotency-key.js.map +1 -1
- package/dist/_utils/indicator-app.js +4 -26
- package/dist/_utils/indicator-app.js.map +1 -1
- package/dist/_utils/indicator-health.js +0 -6
- package/dist/_utils/indicator-health.js.map +1 -1
- package/dist/_utils/ingest-diagnosis.js +0 -5
- package/dist/_utils/ingest-diagnosis.js.map +1 -1
- package/dist/_utils/ingest-heartbeat.js +1 -6
- package/dist/_utils/ingest-heartbeat.js.map +1 -1
- package/dist/_utils/install-receipt.d.ts +9 -1
- package/dist/_utils/install-receipt.js +18 -3
- package/dist/_utils/install-receipt.js.map +1 -1
- package/dist/_utils/jcode-bundle.d.ts +3 -0
- package/dist/_utils/jcode-bundle.js +16 -0
- package/dist/_utils/jcode-bundle.js.map +1 -0
- package/dist/_utils/jcode-event.d.ts +3 -0
- package/dist/_utils/jcode-event.js +66 -0
- package/dist/_utils/jcode-event.js.map +1 -0
- package/dist/_utils/jcode-hook-lines.d.ts +5 -0
- package/dist/_utils/jcode-hook-lines.js +7 -0
- package/dist/_utils/jcode-hook-lines.js.map +1 -0
- package/dist/_utils/jcode-hooks-toml.d.ts +8 -0
- package/dist/_utils/jcode-hooks-toml.js +148 -0
- package/dist/_utils/jcode-hooks-toml.js.map +1 -0
- package/dist/_utils/jcode-paths.d.ts +7 -0
- package/dist/_utils/jcode-paths.js +10 -0
- package/dist/_utils/jcode-paths.js.map +1 -0
- package/dist/_utils/jcode-setup.d.ts +27 -0
- package/dist/_utils/jcode-setup.js +151 -0
- package/dist/_utils/jcode-setup.js.map +1 -0
- package/dist/_utils/jcode-skills-sync.d.ts +8 -0
- package/dist/_utils/jcode-skills-sync.js +74 -0
- package/dist/_utils/jcode-skills-sync.js.map +1 -0
- package/dist/_utils/login-check.js +1 -4
- package/dist/_utils/login-check.js.map +1 -1
- package/dist/_utils/managed-block.d.ts +4 -0
- package/dist/_utils/managed-block.js +38 -0
- package/dist/_utils/managed-block.js.map +1 -0
- package/dist/_utils/normalize-boolean-flags.js +2 -7
- package/dist/_utils/normalize-boolean-flags.js.map +1 -1
- package/dist/_utils/open-browser.js +1 -3
- package/dist/_utils/open-browser.js.map +1 -1
- package/dist/_utils/parse-claude-transcript.js +4 -24
- package/dist/_utils/parse-claude-transcript.js.map +1 -1
- package/dist/_utils/parse-codex-transcript.js +1 -22
- package/dist/_utils/parse-codex-transcript.js.map +1 -1
- package/dist/_utils/parse-cursor-db.js +2 -21
- package/dist/_utils/parse-cursor-db.js.map +1 -1
- package/dist/_utils/parse-harbor-atif.js +2 -1
- package/dist/_utils/parse-harbor-atif.js.map +1 -1
- package/dist/_utils/parse-jcode-session.d.ts +14 -0
- package/dist/_utils/parse-jcode-session.js +113 -0
- package/dist/_utils/parse-jcode-session.js.map +1 -0
- package/dist/_utils/parse-pi-transcript.js +1 -35
- package/dist/_utils/parse-pi-transcript.js.map +1 -1
- package/dist/_utils/parse-transcript.js +1 -9
- package/dist/_utils/parse-transcript.js.map +1 -1
- package/dist/_utils/plugin-status.d.ts +1 -1
- package/dist/_utils/plugin-status.js +25 -16
- package/dist/_utils/plugin-status.js.map +1 -1
- package/dist/_utils/post-route.js +0 -7
- package/dist/_utils/post-route.js.map +1 -1
- package/dist/_utils/pr-review-link.js +0 -2
- package/dist/_utils/pr-review-link.js.map +1 -1
- package/dist/_utils/proactive-ticket-log.js +1 -11
- package/dist/_utils/proactive-ticket-log.js.map +1 -1
- package/dist/_utils/record-commit-anchor.js +1 -8
- package/dist/_utils/record-commit-anchor.js.map +1 -1
- package/dist/_utils/refresh-control-state.js +1 -7
- package/dist/_utils/refresh-control-state.js.map +1 -1
- package/dist/_utils/render-callback-page.js +0 -7
- package/dist/_utils/render-callback-page.js.map +1 -1
- package/dist/_utils/resolve-import-workspace.d.ts +0 -7
- package/dist/_utils/resolve-import-workspace.js +1 -13
- package/dist/_utils/resolve-import-workspace.js.map +1 -1
- package/dist/_utils/run-bin.js +0 -2
- package/dist/_utils/run-bin.js.map +1 -1
- package/dist/_utils/session-map.js +0 -5
- package/dist/_utils/session-map.js.map +1 -1
- package/dist/_utils/shell-profile.js +1 -28
- package/dist/_utils/shell-profile.js.map +1 -1
- package/dist/_utils/state-line-memo.d.ts +0 -6
- package/dist/_utils/state-line-memo.js +3 -18
- package/dist/_utils/state-line-memo.js.map +1 -1
- package/dist/_utils/state-line.js +0 -4
- package/dist/_utils/state-line.js.map +1 -1
- package/dist/_utils/state.js +0 -5
- package/dist/_utils/state.js.map +1 -1
- package/dist/_utils/sync-mode-from-server.d.ts +0 -18
- package/dist/_utils/sync-mode-from-server.js +2 -21
- package/dist/_utils/sync-mode-from-server.js.map +1 -1
- package/dist/_utils/transcript-turns.d.ts +1 -1
- package/dist/_utils/transcript-turns.js +1 -51
- package/dist/_utils/transcript-turns.js.map +1 -1
- package/dist/_utils/turn-cache.js +1 -8
- package/dist/_utils/turn-cache.js.map +1 -1
- package/dist/_utils/update.d.ts +0 -10
- package/dist/_utils/update.js +8 -30
- package/dist/_utils/update.js.map +1 -1
- package/dist/_utils/version.js +3 -6
- package/dist/_utils/version.js.map +1 -1
- package/dist/_utils/which.d.ts +0 -5
- package/dist/_utils/which.js +0 -5
- package/dist/_utils/which.js.map +1 -1
- package/dist/_utils/write-commit-trailer.js +1 -5
- package/dist/_utils/write-commit-trailer.js.map +1 -1
- package/dist/bin.js +15 -31
- package/dist/bin.js.map +1 -1
- package/dist/commands/_utils/materialize-skill.js +4 -34
- package/dist/commands/_utils/materialize-skill.js.map +1 -1
- package/dist/commands/_utils/pack-skill-dir.js +6 -27
- package/dist/commands/_utils/pack-skill-dir.js.map +1 -1
- package/dist/commands/artifact.js +2 -5
- package/dist/commands/artifact.js.map +1 -1
- package/dist/commands/code-search.js +0 -6
- package/dist/commands/code-search.js.map +1 -1
- package/dist/commands/doctor.d.ts +0 -17
- package/dist/commands/doctor.js +29 -75
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/feedback.js +2 -10
- package/dist/commands/feedback.js.map +1 -1
- package/dist/commands/git-hooks.js +0 -3
- package/dist/commands/git-hooks.js.map +1 -1
- package/dist/commands/import.js +5 -27
- package/dist/commands/import.js.map +1 -1
- package/dist/commands/incognito.d.ts +0 -5
- package/dist/commands/incognito.js +0 -5
- package/dist/commands/incognito.js.map +1 -1
- package/dist/commands/indicator.d.ts +0 -1
- package/dist/commands/indicator.js +0 -1
- package/dist/commands/indicator.js.map +1 -1
- package/dist/commands/ingest.js +58 -122
- package/dist/commands/ingest.js.map +1 -1
- package/dist/commands/install.d.ts +1 -0
- package/dist/commands/install.js +52 -93
- package/dist/commands/install.js.map +1 -1
- package/dist/commands/invite.d.ts +0 -6
- package/dist/commands/invite.js +0 -16
- package/dist/commands/invite.js.map +1 -1
- package/dist/commands/login.js +0 -15
- package/dist/commands/login.js.map +1 -1
- package/dist/commands/onboard.js +0 -6
- package/dist/commands/onboard.js.map +1 -1
- package/dist/commands/org.js +0 -2
- package/dist/commands/org.js.map +1 -1
- package/dist/commands/pr-link.js +2 -15
- package/dist/commands/pr-link.js.map +1 -1
- package/dist/commands/search.js +0 -5
- package/dist/commands/search.js.map +1 -1
- package/dist/commands/session-start.d.ts +0 -21
- package/dist/commands/session-start.js +19 -68
- package/dist/commands/session-start.js.map +1 -1
- package/dist/commands/set-mode.d.ts +0 -6
- package/dist/commands/set-mode.js +2 -12
- package/dist/commands/set-mode.js.map +1 -1
- package/dist/commands/skill.js +5 -35
- package/dist/commands/skill.js.map +1 -1
- package/dist/commands/statusline.d.ts +0 -13
- package/dist/commands/statusline.js +0 -15
- package/dist/commands/statusline.js.map +1 -1
- package/dist/commands/suggestions.d.ts +0 -6
- package/dist/commands/suggestions.js +0 -7
- package/dist/commands/suggestions.js.map +1 -1
- package/dist/commands/takeover/_utils/agent-paths.js +2 -3
- package/dist/commands/takeover/_utils/agent-paths.js.map +1 -1
- package/dist/commands/takeover/_utils/cursor-store.js +1 -3
- package/dist/commands/takeover/_utils/cursor-store.js.map +1 -1
- package/dist/commands/takeover/_utils/write-codex-desktop-session.js +1 -4
- package/dist/commands/takeover/_utils/write-codex-desktop-session.js.map +1 -1
- package/dist/commands/takeover/_utils/write-codex-session.js +1 -2
- package/dist/commands/takeover/_utils/write-codex-session.js.map +1 -1
- package/dist/commands/uninstall.d.ts +0 -1
- package/dist/commands/uninstall.js +7 -7
- package/dist/commands/uninstall.js.map +1 -1
- package/dist/commands/update.d.ts +0 -10
- package/dist/commands/update.js +21 -30
- package/dist/commands/update.js.map +1 -1
- package/dist/jcode/plugin.json +8 -0
- package/dist/jcode/preferred-tools.md +3 -0
- package/dist/jcode/prompt-overlay.md +15 -0
- package/dist/jcode/skills/code-search/SKILL.md +19 -0
- package/dist/jcode/skills/controls/SKILL.md +45 -0
- package/dist/jcode/skills/create-artifact/SKILL.md +11 -0
- package/dist/jcode/skills/create-skill/SKILL.md +41 -0
- package/dist/jcode/skills/feedback/SKILL.md +59 -0
- package/dist/jcode/skills/forget/SKILL.md +41 -0
- package/dist/jcode/skills/import-transcripts/SKILL.md +27 -0
- package/dist/jcode/skills/invite/SKILL.md +28 -0
- package/dist/jcode/skills/search/SKILL.md +35 -0
- package/dist/jcode/skills/session-takeover/SKILL.md +67 -0
- package/dist/jcode/skills/setup/SKILL.md +62 -0
- package/dist/jcode/skills/use-artifact/SKILL.md +11 -0
- package/dist/jcode/skills/use-skill/SKILL.md +10 -0
- package/package.json +5 -3
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: create-skill
|
|
3
|
+
description: Turn what you just did (or a markdown prompt the user provides) into a reusable skill — either a local SKILL.md on this machine or a shared Glen skill saved to the org's library. Use when the user says "make this a skill", "save this as a skill", "save this as a Glen skill", or wants to capture a repeatable workflow.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
You are authoring a reusable **skill** — a focused markdown prompt another agent will follow later, with no memory of this session.
|
|
7
|
+
|
|
8
|
+
1. **Pick the destination FIRST — local file or Glen skill.** A skill is either a **local `SKILL.md`** on this machine (a jcode skill, visible only to you) or a **Glen skill** saved to your Glen library (recorded; private to you by default, sharable with teammates or the whole org).
|
|
9
|
+
- **Check incognito before anything else:** run `glen status` via Bash. If it reports `incognito: ON`, a Glen skill is off the table — nothing is recorded off the record — so go straight to a **local skill** and tell the user that's why (e.g. "you're off the record, so I'll save this as a local skill").
|
|
10
|
+
- **Otherwise, ask the user which they want** before authoring anything: a local `SKILL.md` (a jcode skill on this machine) or a Glen skill (saved to your Glen library). Don't start writing until they answer.
|
|
11
|
+
2. **Gather the real workflow.** Read this conversation for the steps that actually worked. For anything done in an earlier session, run `glen search "<topic>"` via Bash to pull the relevant memory. Ask one or two clarifying questions only if the goal or trigger is genuinely ambiguous.
|
|
12
|
+
3. **Name + describe it.** A short imperative name and a one-sentence description that says *exactly when to trigger it* (this drives discovery).
|
|
13
|
+
4. **Write a tight SKILL.md body.** Best practices:
|
|
14
|
+
- Lead with *when to use it* and the end goal.
|
|
15
|
+
- Give concrete, ordered steps — exact commands, file paths, gotchas — not vague advice.
|
|
16
|
+
- Keep it self-contained: assume zero prior context. Cut anything that isn't actionable.
|
|
17
|
+
- **Reference other skills** when a step is itself a saved skill: write a markdown link `[Display text](glen:<slug>)` (find the slug with `glen skill search`). Glen tracks the link automatically and the reader will get a runnable `glen skill use <slug>` command exactly there — keep each referenced skill focused and say *when* to reach for it. Reserve this for genuinely **shared** skills — ones that also get used on their own, independent of this one.
|
|
18
|
+
- **If the skill needs supporting material, bundle it in one skill directory, not separate subskills.** Put long reference material in `references/*.md` and executable helpers in `scripts/` alongside `SKILL.md`, and point to them from the body as `${GLEN_SKILL_DIR}/references/<name>.md` / `${GLEN_SKILL_DIR}/scripts/<name>` — `glen skill use` materializes the whole directory to disk and substitutes `${GLEN_SKILL_DIR}` with its real absolute path before printing, so the reader can run the script or open the reference exactly as written. This keeps one topic as one skill instead of splintering it into a root + subskills just to hold its own files.
|
|
19
|
+
5. **Finish based on the destination chosen in step 1:**
|
|
20
|
+
|
|
21
|
+
**Local skill** (and always the incognito path) — nothing leaves the machine:
|
|
22
|
+
- Save it to `.jcode/skills/<name>/SKILL.md` in this project — or `~/.jcode/skills/<name>/SKILL.md` for a personal skill that follows you across every project.
|
|
23
|
+
- Start the file with YAML frontmatter (`name`, and the `description` from step 3), then the body.
|
|
24
|
+
- No `glen skill create`, no recording. Confirm the saved path to the user.
|
|
25
|
+
|
|
26
|
+
**Glen skill** (only when not incognito):
|
|
27
|
+
- **Declare its dependencies.** List the external tools/runtimes/MCPs the skill needs (node, an MCP, a CLI, …). For each: run `glen dependency search "<tool>"` via Bash — if a confident match exists, note its `[id]`; otherwise web-search the canonical source/install page and note `{ name, description, sourceUrl, kind }` (kind = mcp|cli|runtime|library|service). Write them to a JSON array file, e.g. `/tmp/glen-deps.json`, mixing `{ "dependencyId": "<id>" }` (reuse) and new objects.
|
|
28
|
+
- **Save it** via Bash. Text-only skill (no `references/`/`scripts/`): write the body to a file (e.g. `/tmp/glen-skill.md`), then run (add `--deps /tmp/glen-deps.json` if there are any):
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
glen skill create --name "<name>" --description "<one-line>" --file /tmp/glen-skill.md --deps /tmp/glen-deps.json
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Skill with bundled files: build the package in a temp directory first — `SKILL.md` at its root, plus whichever of `scripts/`, `references/`, `assets/` it needs (only those three subdirs are uploaded; caps are 100 files, 1MB per text file, 2MB per binary file, 3MB total) — then run:
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
glen skill create --name "<name>" --description "<one-line>" --dir /tmp/glen-skill-pkg --deps /tmp/glen-deps.json
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
`--file` and `--dir` are mutually exclusive. On a name collision either form errors — pick a different name and retry, or pass `--update` to overwrite a skill you previously authored.
|
|
41
|
+
- The skill is **private to the user by default**. Ask the user whether to share it: with the whole org (add `--org` to `glen skill create`, or later `glen skill share <slug> --org`) or with specific teammates (`glen skill share <slug> --with <email>[,<email>…]`). Confirm the saved slug and its visibility back to the user.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: feedback
|
|
3
|
+
description: Send a bug report or product feedback about glen itself to the Glen team. Use when the user says things like "tell the glen team", "file a bug about glen", "glen search is useless — report it", "give feedback on glen", or when YOU hit a concrete, reproducible glen malfunction worth reporting.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
This files a ticket about **glen itself** — the CLI, the memory, the search, the
|
|
7
|
+
dashboard. It is NOT for bugs in the user's own project. If the user says "file a
|
|
8
|
+
bug" about the code you are working on, that belongs in their issue tracker, not
|
|
9
|
+
here.
|
|
10
|
+
|
|
11
|
+
Tickets land in the same Slack channels the dashboard's feedback widget posts to,
|
|
12
|
+
and carry the user's identity, the repo/branch, and a link to this conversation's
|
|
13
|
+
transcript automatically. Never paste secrets, tokens, or file contents into a
|
|
14
|
+
ticket — the transcript link already gives the team the context.
|
|
15
|
+
|
|
16
|
+
## Filing on the user's behalf
|
|
17
|
+
|
|
18
|
+
When the user asks you to report something, run one of these via Bash:
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
glen bug "<title>" --description "<what is wrong>" [--steps "<repro>"] [--severity low|medium|high|critical] --agent <agent>
|
|
22
|
+
glen feedback "<title>" --wants "<the concrete change>" --why "<why it matters>" [--context "<extra>"] --agent <agent>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Severity defaults to `medium`. Write the description in the user's own words
|
|
26
|
+
where you have them. Infer `--why` when the motivation is obvious rather than
|
|
27
|
+
interrogating the user for it.
|
|
28
|
+
|
|
29
|
+
## Filing on your own behalf
|
|
30
|
+
|
|
31
|
+
When the observation is yours, not the user's, add `--from agent`. It renders
|
|
32
|
+
differently for the team — "Claude Code noticed X" reads very differently from
|
|
33
|
+
"Ada wants X", and both are useful.
|
|
34
|
+
|
|
35
|
+
If you are filing **without being asked** — you hit the problem yourself and
|
|
36
|
+
decided it was worth reporting — also pass `--proactive`. At most one proactive
|
|
37
|
+
ticket is sent per session; further ones are skipped, so you never need to track
|
|
38
|
+
whether you already filed. On an off-the-record (incognito) session the server
|
|
39
|
+
refuses self-initiated tickets outright and the command tells you so — nothing
|
|
40
|
+
the user didn't ask for leaves that session. Mention it and let them decide.
|
|
41
|
+
|
|
42
|
+
Only file proactively for something concrete and attributable:
|
|
43
|
+
|
|
44
|
+
- a glen CLI command failed or returned a malformed result
|
|
45
|
+
- `glen search` returned results that clearly contradict the code you just read
|
|
46
|
+
- a glen hook misfired, or injected context that was plainly wrong
|
|
47
|
+
|
|
48
|
+
Do NOT file proactively for: a search that merely found nothing, a preference of
|
|
49
|
+
yours about the output format, a hunch, or anything you cannot state as a
|
|
50
|
+
specific observed behaviour. When in doubt, mention it to the user instead and
|
|
51
|
+
let them decide.
|
|
52
|
+
|
|
53
|
+
## After running
|
|
54
|
+
|
|
55
|
+
On success it prints `✓ Bug report sent` / `✓ Feedback sent` — tell the user it
|
|
56
|
+
went in. On failure it prints a `✗` line naming the cause and the fix (e.g. "no
|
|
57
|
+
active organization" → `glen org switch`). Relay that to the user and stop.
|
|
58
|
+
**Never retry a failed filing in a loop**, and never re-file the same ticket with
|
|
59
|
+
different wording.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: forget
|
|
3
|
+
description: Correct glen's memory — forget evidence that is wrong, outdated, or no longer relevant, so the team stops being told it. Use when the user says things like "that's wrong, forget it", "glen has the wrong X", "that memory is out of date", or "stop remembering that" — or when YOU verify that recalled evidence is contradicted by current code or state.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
A stale memory gets caught two ways: the user points at it, or you verify it yourself.
|
|
7
|
+
|
|
8
|
+
**User-initiated** — the user says a remembered fact is wrong or outdated:
|
|
9
|
+
|
|
10
|
+
1. Identify the relevant source references. Glen search results end each source with
|
|
11
|
+
an exact `observation:<id>` or `message:<id>` reference. If the result is not
|
|
12
|
+
already in context, run `glen search "<topic>"` via Bash.
|
|
13
|
+
2. Confirm which evidence is wrong. Do not automatically forget every source in a
|
|
14
|
+
synthesized answer. When several sources repeat the same stale claim, select all
|
|
15
|
+
of those references.
|
|
16
|
+
3. Pass the returned references unchanged, in one command:
|
|
17
|
+
`glen forget observation:<id> message:<id>`.
|
|
18
|
+
|
|
19
|
+
**Agent-detected** — recalled evidence is contradicted by current code or state:
|
|
20
|
+
|
|
21
|
+
1. Verify the contradiction directly. Never forget on suspicion, a partial view, or
|
|
22
|
+
merely because two memories disagree; surface uncertain conflicts to the user.
|
|
23
|
+
2. Run `glen forget <reference...>` with only the contradicted source references.
|
|
24
|
+
3. Tell the user exactly what was forgotten and why.
|
|
25
|
+
|
|
26
|
+
Then state the correct fact in the conversation so Glen can record the correction.
|
|
27
|
+
|
|
28
|
+
Notes:
|
|
29
|
+
|
|
30
|
+
- Observation and message references can be mixed in one atomic command.
|
|
31
|
+
- Forgetting an observation hides that distilled memory from recall.
|
|
32
|
+
- Forgetting a message removes it from future recall and hides derived observations
|
|
33
|
+
that have no other active supporting message. The raw message remains visible in
|
|
34
|
+
transcript history for audit.
|
|
35
|
+
- Forget is idempotent; already-hidden references are reported as unchanged.
|
|
36
|
+
- Undo with `glen restore <reference...>`. Automatic restore never revives an
|
|
37
|
+
observation that a user directly forgot.
|
|
38
|
+
- Legacy `[m:<id>]` and bare observation ids remain accepted.
|
|
39
|
+
- If a legacy suffix is ambiguous, retry with the full `observation:<id>` listed.
|
|
40
|
+
- If the CLI reports no active organization, tell the user to run
|
|
41
|
+
`glen org switch`.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: import-transcripts
|
|
3
|
+
description: Import the user's old local coding-agent transcripts (Claude Code, Codex, Cursor, or Pi sessions from before glen was installed) into glen's shared team memory. Use when the user asks to import, backfill, or migrate past sessions/conversations/chat history into glen.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Run `glen import <path…>` via Bash. It parses local transcripts, replays them
|
|
7
|
+
into glen turn by turn, and is safe to re-run — already-imported turns are
|
|
8
|
+
skipped automatically.
|
|
9
|
+
|
|
10
|
+
Where old transcripts live:
|
|
11
|
+
|
|
12
|
+
- Claude Code sessions: `~/.claude/projects` (one `<session-uuid>.jsonl` per
|
|
13
|
+
session, grouped by project directory)
|
|
14
|
+
- Codex sessions: `~/.codex/sessions`
|
|
15
|
+
- Pi sessions: `~/.pi/agent/sessions` (one `<timestamp>_<uuid>.jsonl` per session,
|
|
16
|
+
grouped by project directory)
|
|
17
|
+
- Cursor chats: `~/.config/Cursor/User/globalStorage/state.vscdb` on Linux,
|
|
18
|
+
`~/Library/Application Support/Cursor/User/globalStorage/state.vscdb` on
|
|
19
|
+
macOS (needs Node 22.5+; close Cursor first for the freshest data)
|
|
20
|
+
|
|
21
|
+
A path can be a single file or a directory (scanned recursively; formats are
|
|
22
|
+
auto-detected per file). Preview with `glen import --dry-run <path…>` — it
|
|
23
|
+
lists every conversation and turn count without writing anything. For large
|
|
24
|
+
directories, offer the dry run first so the user can confirm the scope.
|
|
25
|
+
|
|
26
|
+
If it prints "no active organization", tell the user to run `glen org switch`.
|
|
27
|
+
If it prints "not connected", tell the user to run `glen login`.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: invite
|
|
3
|
+
description: Invite a teammate to the user's glen organization by email, so the team's shared memory grows. Use when the user says things like "invite Alice", "add my teammate to glen", "get my team on glen", or asks how to bring coworkers in.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
glen is shared team memory — it gets more useful with every teammate whose context
|
|
7
|
+
lands in the pool. When the user wants to bring someone in:
|
|
8
|
+
|
|
9
|
+
1. Get the teammate's email address. Ask if it isn't given.
|
|
10
|
+
2. Run `glen invite <email>` via Bash. Invite several at once by passing more
|
|
11
|
+
emails: `glen invite alice@co.com bob@co.com`. To make someone an admin, add
|
|
12
|
+
`--role admin` (default is a regular member).
|
|
13
|
+
3. Report the result. Each address prints one of:
|
|
14
|
+
- `✓ Invitation sent to <email>` — an email invite is on its way; they accept
|
|
15
|
+
at the link and join the org.
|
|
16
|
+
- `· <email> is already a member` — nothing to do.
|
|
17
|
+
- `✗ Could not invite <email>` — relay the reason.
|
|
18
|
+
|
|
19
|
+
Or share a link instead of emailing: run `glen invite` with NO email to print a
|
|
20
|
+
shareable join link for the org. Anyone who signs in with a verified email on the
|
|
21
|
+
org's work-email domain joins automatically — good for dropping in a team channel.
|
|
22
|
+
(Requires "Let teammates join with their work email" to be enabled in
|
|
23
|
+
Settings → General.)
|
|
24
|
+
|
|
25
|
+
Notes:
|
|
26
|
+
- Invites are sent by email and expire after 48 hours; the teammate clicks the
|
|
27
|
+
link, signs in, and lands directly in the shared memory.
|
|
28
|
+
- If it prints "no active organization", tell the user to run `glen org switch`.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: search
|
|
3
|
+
description: Search the team's shared glen memory for a SPECIFIC fact, decision, or past discussion that is not already in the auto-injected context. Do not use for things already recalled this turn.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
For current or source-owned facts, use the available source-of-truth tool first (for example, Slack, GitHub, Notion, or logs), especially when the user names it. Use Glen only for durable history or to supplement that source; if the live source is unavailable, say so, and if it conflicts with Glen, prefer it for current state.
|
|
7
|
+
|
|
8
|
+
Run `glen search "<query>"` via Bash — **start with ONE comprehensive query, not a
|
|
9
|
+
fan-out of variants**.
|
|
10
|
+
|
|
11
|
+
Each search takes ~10 seconds of real user-facing wait, and the server ranks results
|
|
12
|
+
with an LLM that reads your query as free-text intent — so one detailed, self-contained
|
|
13
|
+
query beats several keyword variants. Pack everything you know into a single query:
|
|
14
|
+
who/what/where, the repo or system involved, and what kind of answer you need (a
|
|
15
|
+
decision, an owner, a rationale, setup steps).
|
|
16
|
+
|
|
17
|
+
- ✅ `glen search "Shams's recent work on the usage-page redesign in the dashboard repo — what was decided, current status, and who owns it"`
|
|
18
|
+
- ❌ `glen search "Shams"` … `glen search "usage page redesign"` … `glen search "dashboard"`
|
|
19
|
+
|
|
20
|
+
If a hook or reminder suggests multiple search questions, merge the related ones into
|
|
21
|
+
one query and run that single search.
|
|
22
|
+
|
|
23
|
+
Follow-up searches are fine for going DEEPER — when the first result surfaces
|
|
24
|
+
something new worth chasing (a project you didn't know to name, a decision that
|
|
25
|
+
points at another decision), and the answer would genuinely change what you do next.
|
|
26
|
+
But every extra search is another ~10s the user sits waiting, so don't overdo it:
|
|
27
|
+
ask yourself whether the follow-up will provide real value the first result didn't,
|
|
28
|
+
and skip it if you already have enough to act. Never re-run a mere rephrase of a
|
|
29
|
+
query that returned little — same memory, same cost, nothing new.
|
|
30
|
+
|
|
31
|
+
The output is a synthesized answer followed by a "Sources:" list (conversation ·
|
|
32
|
+
date · author · id) — treat the answer as recalled memory (it may be outdated or
|
|
33
|
+
conflicting), and cite the sources when relevant. If it prints no results, say so
|
|
34
|
+
rather than re-searching variants.
|
|
35
|
+
If it prints "No active organization", tell the user to run `glen org switch`.
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: session-takeover
|
|
3
|
+
description: Use when the user provides a Glen takeover code or generated command to open its shared transcript in a fresh native agent session.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Session Takeover
|
|
7
|
+
|
|
8
|
+
Use this skill only to open a shared Glen transcript in a fresh native session.
|
|
9
|
+
Do not use it to resume the current session or import local transcript archives.
|
|
10
|
+
|
|
11
|
+
Use this two-stage contract:
|
|
12
|
+
|
|
13
|
+
1. **Select and classify before constructing a command.** Make no tool call.
|
|
14
|
+
Candidate selection has exactly two allowed message shapes:
|
|
15
|
+
|
|
16
|
+
- Plain-message form: the candidate is the entire user message, with nothing
|
|
17
|
+
before or after it.
|
|
18
|
+
- Fenced-block form: the message contains exactly one fenced code block, has
|
|
19
|
+
no non-whitespace content outside that block, and the candidate is the
|
|
20
|
+
block's sole content.
|
|
21
|
+
|
|
22
|
+
Every other message shape is INVALID. Do not search for or extract a
|
|
23
|
+
`glen takeover` substring from prose. Classify the whole unnormalized
|
|
24
|
+
selected candidate:
|
|
25
|
+
|
|
26
|
+
- VALID raw code: the entire candidate matches `^[A-Za-z0-9_-]{43}$`.
|
|
27
|
+
- VALID generated command: the entire candidate matches
|
|
28
|
+
`^glen takeover ([A-Za-z0-9_-]{43})$`; capture group 1 is the code.
|
|
29
|
+
- INVALID: every other candidate. Examples include prefix or suffix prose, a
|
|
30
|
+
command embedded in a paragraph, prose surrounding a fenced block, multiple
|
|
31
|
+
fenced blocks, `glen takeover --help`, `glen takeover <valid-code>.`,
|
|
32
|
+
`glen takeover <valid-code> extra`,
|
|
33
|
+
`glen takeover <valid-code>; printf TAKEOVER_INJECTION_PROBE`,
|
|
34
|
+
`glen takeover <valid-code>$(printf TAKEOVER_INJECTION_PROBE)`, and
|
|
35
|
+
``glen takeover <valid-code>`printf TAKEOVER_INJECTION_PROBE` ``.
|
|
36
|
+
|
|
37
|
+
2. **Produce exactly one allowed output.**
|
|
38
|
+
|
|
39
|
+
- VALID: make exactly one Bash call from the captured code:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
glen takeover '<validated-code>'
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
- INVALID: make zero tool calls, reply exactly "Please paste the complete
|
|
46
|
+
generated `glen takeover ...` command by itself in a code block.", and
|
|
47
|
+
stop.
|
|
48
|
+
|
|
49
|
+
Construct the VALID Bash call from the captured code as one opaque quoted
|
|
50
|
+
argument, never from the user's pasted command string. Never guess, sanitize,
|
|
51
|
+
decode, alter, summarize, truncate, or invent a code.
|
|
52
|
+
|
|
53
|
+
Treat the CLI output as authoritative:
|
|
54
|
+
|
|
55
|
+
- If disconnected, tell the user to run `glen login`.
|
|
56
|
+
- If no organization is active, tell the user to run `glen org switch`.
|
|
57
|
+
- If the handoff is expired, unavailable, or belongs to another recipient, ask
|
|
58
|
+
the sender for a new command.
|
|
59
|
+
- If compatibility or context-fit validation fails, report the exact failure and
|
|
60
|
+
stop. Never bypass the guard or shorten the transcript.
|
|
61
|
+
- If installation succeeds but launch fails, surface the exact native resume
|
|
62
|
+
command printed by the CLI.
|
|
63
|
+
|
|
64
|
+
On success, explain that Glen opened a fresh native session containing the
|
|
65
|
+
verified inherited history and left the source transcript unchanged. Do not
|
|
66
|
+
pretend the current session became the takeover destination or continue the
|
|
67
|
+
inherited work here.
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: setup
|
|
3
|
+
description: Set up, fix, or update glen on this machine. Use when the user asks to "set up glen", "fix glen", "update glen", says glen is not working / not connected / not recording, or the status line shows glen is not connected or has no org selected.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Run `glen doctor` first and branch on its `status:` lines. Fix ONLY what is
|
|
7
|
+
broken, in this order, then re-run `glen doctor` to verify and confirm to the
|
|
8
|
+
user what changed.
|
|
9
|
+
|
|
10
|
+
- `glen: command not found` → install the CLI: `npm install -g @tryglen/cli`,
|
|
11
|
+
then run `glen install` (it sets up the plugin + hooks for this agent).
|
|
12
|
+
- `status: cli=<x> latest=<y> channel=<...>` where y is newer than x → run
|
|
13
|
+
`glen update` (updates the CLI and any installed glen plugins in one go).
|
|
14
|
+
- `status: login=missing ...` → run `glen login` — a browser window opens with
|
|
15
|
+
a short device code prefilled; the user approves it to connect their account.
|
|
16
|
+
If no browser can open (SSH/headless), relay the printed URL and code so the
|
|
17
|
+
user can approve from any device.
|
|
18
|
+
- `status: login=ok org=missing` → run `glen org list`, show the user the
|
|
19
|
+
options, and run `glen org switch <slug>` for their choice. Never pick an
|
|
20
|
+
org for them.
|
|
21
|
+
- `status: jcode=detected plugin=not-installed` → run `glen install --agent jcode`.
|
|
22
|
+
It writes glen's hook lines into `~/.jcode/config.toml`, a managed block into
|
|
23
|
+
`~/.jcode/prompt-overlay.md` and `~/.jcode/preferred-tools.md`, and the glen
|
|
24
|
+
skills into `~/.jcode/skills/`. Tell the user to start a NEW jcode session
|
|
25
|
+
afterwards — jcode reads its prompt files at session start.
|
|
26
|
+
- `status: claude=detected plugin=not-installed` (or codex/pi) → run
|
|
27
|
+
`glen install --agent <claude|codex|pi>` for that agent.
|
|
28
|
+
- `status: codex=detected plugin=... hooks=not-registered` → run
|
|
29
|
+
`glen install --agent codex`.
|
|
30
|
+
- `status: codex-self-heal=failed: ...` → run `glen install --agent codex`,
|
|
31
|
+
then re-check.
|
|
32
|
+
- `status: claude=not-found` (or `status: codex=not-found` /
|
|
33
|
+
`status: pi=not-found` / `status: jcode=not-found`) when the user says it IS
|
|
34
|
+
installed → ask them to run `which claude` (or `which codex` / `which pi` /
|
|
35
|
+
`which jcode`) in their terminal, then run `glen install --claude-path
|
|
36
|
+
<that path>` (or `--codex-path` / `--pi-path` / `--jcode-path`).
|
|
37
|
+
|
|
38
|
+
`glen doctor` also prints one `status: ingest agent=<agent>
|
|
39
|
+
state=<ok|failing|never|fresh-install|idle> lastSuccess=<iso|never>` line per
|
|
40
|
+
detected agent — this tracks whether hooks are actually firing, separate from
|
|
41
|
+
whether the plugin is installed:
|
|
42
|
+
- `ok` / `failing` — reflects the last recorded hook run. For `failing`,
|
|
43
|
+
doctor prints a remedy right after the line (check `glen status`, then
|
|
44
|
+
`glen login` if disconnected).
|
|
45
|
+
- `fresh-install` — installed under an hour ago with no ingest yet; not a
|
|
46
|
+
fault, just still warming up.
|
|
47
|
+
- `idle` — hooks fire here; nothing recorded yet — logged out, glen off, or
|
|
48
|
+
no completed turn.
|
|
49
|
+
- `never` — hooks have never fired on THIS machine. Doctor prints a remedy
|
|
50
|
+
right after the line: untrusted hooks (trust them in-agent and start a new
|
|
51
|
+
session), a PATH gap, a failed hook-trust query, or a machine-topology
|
|
52
|
+
mismatch.
|
|
53
|
+
- A topology mismatch usually means the agent process runs on a different
|
|
54
|
+
machine than the one you're looking at: Codex `--remote` / Desktop-SSH and
|
|
55
|
+
Claude Code over SSH/devcontainer both run the agent — and its hooks — on
|
|
56
|
+
the REMOTE host, not locally. Install glen there and run `glen doctor` on
|
|
57
|
+
that machine, as the user the agent connects as. Cloud sessions (Codex
|
|
58
|
+
Cloud tasks, claude.ai/code) can't run user-level hooks at all — only
|
|
59
|
+
repo-committed hooks apply there.
|
|
60
|
+
|
|
61
|
+
Finish with `glen status` and tell the user, in one sentence, what state they
|
|
62
|
+
are in now.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: use-artifact
|
|
3
|
+
description: Fetch and display an artifact from the user's Glen library (their own artifacts plus ones shared with them). Use when the user asks to open, view, render, or download a saved Glen artifact.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
1. **Find it.** If you don't know the slug, run `glen artifact search "<intent>"` via Bash and confirm the right one with the user. Search covers the user's own artifacts plus ones shared with them (directly or org-wide) — a teammate's unshared artifact won't appear.
|
|
7
|
+
2. **Fetch it.** Run `glen artifact get <slug>` via Bash. The output is the document (Markdown or HTML+CSS).
|
|
8
|
+
3. **Show it.**
|
|
9
|
+
- **Markdown:** present it inline.
|
|
10
|
+
- **HTML:** write it to a local `.html` file, then open it in the system browser (`open <file>`); if that is not available, share the dashboard link below. It is a self-contained page with no JavaScript.
|
|
11
|
+
4. **Always** share the dashboard link so the user has the canonical rendered copy: `https://app.tryglen.com/artifacts/<slug>`.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: use-skill
|
|
3
|
+
description: Find and run a reusable skill from the Glen skill library (your skills plus ones shared with you) when you don't know its exact slug. Use when the user asks to "use a Glen skill", "find a skill for X", or wants a teammate's saved workflow.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
1. **Search.** Run `glen skill search "<intent>"` via Bash (add `--by "<author>"`, or `--by me` for your own skills). It prints ranked candidates, each with its **[slug]**, author, and description.
|
|
7
|
+
2. **Confirm.** If several plausibly match, show the top 2–3 (name + description + author) and ask the user which one. If it prints "no matching skills", say so — don't invent a skill.
|
|
8
|
+
3. **Check requirements.** If the output has a `## Requirements` section, make sure each listed tool is available — follow its source link to install/enable it (or tell the user) — before you start.
|
|
9
|
+
4. **Run it.** Run `glen skill use <slug>` via Bash. The output is markdown **instructions to execute now** — follow them as if they were a skill. If the skill bundles files, they're materialized locally first and the output references them by **absolute path** (e.g. a script under `~/.glen/skills/<slug>/scripts/`) — run scripts exactly as written, don't rewrite the paths.
|
|
10
|
+
5. **Follow referenced skills on demand.** The instructions may contain runnable `glen skill use <slug>` commands for related skills. Run one via Bash only when its step applies — they're pulled on demand, not all upfront. Skills mentioned via `glen:` links are prefetched — their files are already materialized on disk by the time you pull them, and every `glen skill use` verifies freshness with the server so files on disk are always current.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tryglen/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.36.1",
|
|
4
4
|
"description": "Glen CLI — memory for coding agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
"dist"
|
|
11
11
|
],
|
|
12
12
|
"scripts": {
|
|
13
|
-
"build": "tsc && chmod +x dist/bin.js",
|
|
13
|
+
"build": "tsc && chmod +x dist/bin.js && pnpm build:jcode",
|
|
14
|
+
"build:jcode": "rm -rf dist/jcode && mkdir -p dist/jcode && cp -R ../jcode-plugin/skills ../jcode-plugin/plugin.json ../jcode-plugin/prompt-overlay.md ../jcode-plugin/preferred-tools.md dist/jcode/",
|
|
14
15
|
"build:indicator": "./macos/build.sh",
|
|
15
16
|
"check": "biome check src/ && tsc --noEmit",
|
|
16
17
|
"test": "vitest run",
|
|
@@ -18,7 +19,8 @@
|
|
|
18
19
|
},
|
|
19
20
|
"dependencies": {
|
|
20
21
|
"cac": "^6.7.14",
|
|
21
|
-
"prompts": "^2.4.2"
|
|
22
|
+
"prompts": "^2.4.2",
|
|
23
|
+
"smol-toml": "^1.8.0"
|
|
22
24
|
},
|
|
23
25
|
"devDependencies": {
|
|
24
26
|
"@biomejs/biome": "^1.9.0",
|