@drafthq/draft 2.7.1 → 2.8.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/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +1 -1
- package/cli/src/hosts/claude-code.js +29 -8
- package/cli/src/hosts/codex.js +1 -1
- package/cli/src/hosts/opencode.js +1 -1
- package/package.json +1 -1
- package/scripts/fetch-memory-engine.sh +2 -2
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"name": "draft",
|
|
13
13
|
"source": "./",
|
|
14
14
|
"description": "Context-Driven Development: draft specs and plans before implementation. Structured workflows for features and fixes.",
|
|
15
|
-
"version": "2.
|
|
15
|
+
"version": "2.8.0",
|
|
16
16
|
"author": {
|
|
17
17
|
"name": "mayurpise"
|
|
18
18
|
},
|
package/README.md
CHANGED
|
@@ -159,7 +159,7 @@ curl -o .gemini.md https://raw.githubusercontent.com/drafthq/draft/main/integrat
|
|
|
159
159
|
|
|
160
160
|
## Built-in Code Intelligence
|
|
161
161
|
|
|
162
|
-
Draft is powered by a **local knowledge graph engine** ([codebase-memory-mcp](https://github.com/DeusData/codebase-memory-mcp)) that gives every command precise structural context — module boundaries, call graphs, dependencies, hotspots. It's 100% local (no API key, no SaaS),
|
|
162
|
+
Draft is powered by a **local knowledge graph engine** ([codebase-memory-mcp](https://github.com/DeusData/codebase-memory-mcp)) that gives every command precise structural context — module boundaries, call graphs, dependencies, hotspots. It's 100% local (no API key, no SaaS), fetched during `draft install` (best-effort; `--no-graph` to skip), with first-use fetch as a fallback.
|
|
163
163
|
|
|
164
164
|
```bash
|
|
165
165
|
/draft:graph # build / refresh the snapshot
|
|
@@ -2,13 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
// Claude Code loads plugins from its own registry (via a marketplace), NOT from
|
|
4
4
|
// an arbitrary project directory — so copying files into the cwd never registers
|
|
5
|
-
// the /draft:* commands. The correct install is the `claude plugin` CLI
|
|
6
|
-
//
|
|
7
|
-
//
|
|
8
|
-
//
|
|
9
|
-
//
|
|
5
|
+
// the /draft:* commands. The correct install is the `claude plugin` CLI.
|
|
6
|
+
//
|
|
7
|
+
// We run four idempotent steps so a re-run UPGRADES an existing install rather
|
|
8
|
+
// than no-op'ing on "already installed":
|
|
9
|
+
// 1. marketplace add <repo> — register the marketplace (no-op if present)
|
|
10
|
+
// 2. marketplace update <name> — re-fetch manifest from GitHub (the upgrade key)
|
|
11
|
+
// 3. plugin install <ref> — install (no-op if already installed)
|
|
12
|
+
// 4. plugin update <ref> — bump an existing install to the new version
|
|
13
|
+
// Steps 2 and 4 exit 0 when there's nothing to do, so they're safe on a fresh
|
|
14
|
+
// install too. Default scope is `user` (global). If the `claude` CLI isn't on
|
|
15
|
+
// PATH, we print the equivalent in-session slash commands.
|
|
10
16
|
const MARKETPLACE_REPO = 'drafthq/draft';
|
|
11
|
-
const
|
|
17
|
+
const MARKETPLACE_NAME = 'draft-plugins'; // the `name` field in .claude-plugin/marketplace.json
|
|
18
|
+
const PLUGIN_REF = `draft@${MARKETPLACE_NAME}`; // name@<marketplace name>
|
|
12
19
|
|
|
13
20
|
module.exports = {
|
|
14
21
|
id: 'claude-code',
|
|
@@ -28,19 +35,33 @@ module.exports = {
|
|
|
28
35
|
args: ['plugin', 'marketplace', 'add', MARKETPLACE_REPO],
|
|
29
36
|
label: `claude plugin marketplace add ${MARKETPLACE_REPO}`,
|
|
30
37
|
},
|
|
38
|
+
{
|
|
39
|
+
kind: 'exec',
|
|
40
|
+
cmd: 'claude',
|
|
41
|
+
args: ['plugin', 'marketplace', 'update', MARKETPLACE_NAME],
|
|
42
|
+
label: `claude plugin marketplace update ${MARKETPLACE_NAME}`,
|
|
43
|
+
},
|
|
31
44
|
{
|
|
32
45
|
kind: 'exec',
|
|
33
46
|
cmd: 'claude',
|
|
34
47
|
args: ['plugin', 'install', PLUGIN_REF, '--scope', scope],
|
|
35
48
|
label: `claude plugin install ${PLUGIN_REF} --scope ${scope}`,
|
|
36
49
|
},
|
|
50
|
+
{
|
|
51
|
+
kind: 'exec',
|
|
52
|
+
cmd: 'claude',
|
|
53
|
+
args: ['plugin', 'update', PLUGIN_REF, '--scope', scope],
|
|
54
|
+
label: `claude plugin update ${PLUGIN_REF} --scope ${scope}`,
|
|
55
|
+
},
|
|
37
56
|
],
|
|
38
|
-
graph:
|
|
39
|
-
done: 'Installed draft. Restart Claude Code (or start a new session), then run /draft:init.',
|
|
57
|
+
graph: true, // fetch the graph engine at install time (/draft:init also fetches on first use as a fallback)
|
|
58
|
+
done: 'Installed/updated draft. Restart Claude Code (or start a new session), then run /draft:init.',
|
|
40
59
|
fallbackTitle: 'Claude Code CLI not found. Run these in Claude Code instead:',
|
|
41
60
|
fallback: [
|
|
42
61
|
'/plugin marketplace add drafthq/draft',
|
|
62
|
+
'/plugin marketplace update draft-plugins',
|
|
43
63
|
'/plugin install draft',
|
|
64
|
+
'/plugin update draft',
|
|
44
65
|
],
|
|
45
66
|
};
|
|
46
67
|
},
|
package/cli/src/hosts/codex.js
CHANGED
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
# which scripts/tools/_lib.sh:find_memory_bin resolves.
|
|
9
9
|
#
|
|
10
10
|
# Pinned by default for reproducibility; override with CMM_VERSION (a tag, e.g.
|
|
11
|
-
# "v0.
|
|
11
|
+
# "v0.8.1", or "latest").
|
|
12
12
|
#
|
|
13
13
|
# Usage:
|
|
14
14
|
# scripts/fetch-memory-engine.sh [--dest DIR] [--force]
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
set -euo pipefail
|
|
22
22
|
|
|
23
23
|
REPO="DeusData/codebase-memory-mcp"
|
|
24
|
-
DEFAULT_VERSION="v0.
|
|
24
|
+
DEFAULT_VERSION="v0.8.1" # pinned; bump deliberately. NOTE: tag must carry the leading "v" AND have published assets (0.7.0 had none → 404).
|
|
25
25
|
VERSION="${CMM_VERSION:-$DEFAULT_VERSION}"
|
|
26
26
|
DEST="$HOME/.cache/draft/bin"
|
|
27
27
|
FORCE=0
|