@cogit/cli 0.19.0 → 0.20.0

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cogit",
3
3
  "displayName": "cogit",
4
- "version": "0.19.0",
4
+ "version": "0.20.0",
5
5
  "description": "Git remembers what changed. cogit remembers why.",
6
6
  "author": {
7
7
  "name": "Eren Sertkaya"
package/README.md CHANGED
@@ -6,10 +6,7 @@ Git remembers what changed. cogit remembers why.
6
6
 
7
7
  <p align="center"><img src="docs/images/cogit-descartes.jpg" width="360" alt="René Descartes with git branches running through his hair"><br><i>Cogito, ergo commit.</i></p>
8
8
 
9
- <picture>
10
- <source media="(prefers-color-scheme: dark)" srcset="docs/images/map-dark.png">
11
- <img src="docs/images/map-light.png" alt="The map: sessions, branches and the decision behind a message">
12
- </picture>
9
+ <img src="docs/images/demo.gif" alt="cogit open shows the projects, then the map; pasting a message hash opens the decision behind it, and cogit why lists the thoughts behind a file">
13
10
 
14
11
  cogit records every message you send to an AI coding agent as a *thought commit*: what you
15
12
  asked, what came of it, and the message it answered. Your code commits point back to the
@@ -56,6 +53,9 @@ Then, in Claude Code:
56
53
  /plugin install cogit --marketplace erensrtky/cogit
57
54
  ```
58
55
 
56
+ To get plugin updates on their own, turn on auto-update once: `/plugin` → Marketplaces →
57
+ cogit → Enable auto-update. Claude Code leaves it off for marketplaces outside its own.
58
+
59
59
  ## Quick start
60
60
 
61
61
  ```bash
@@ -20242,6 +20242,12 @@ var Config = external_exports.object({
20242
20242
  * how to read the record (`log` / `show`). On by default; costs only tokens.
20243
20243
  */
20244
20244
  startupContext: external_exports.boolean().default(true),
20245
+ /**
20246
+ * Whether sessions started without a person (`claude -p`, an SDK) are recorded.
20247
+ * Off by default: other plugins start them in the background, one per prompt,
20248
+ * and they would fill the map and the inbox.
20249
+ */
20250
+ recordHeadless: external_exports.boolean().default(false),
20245
20251
  /** Port the local map server binds on `127.0.0.1`. */
20246
20252
  serverPort: external_exports.int().min(1).max(65535).default(4747),
20247
20253
  /** Default for new projects; `init` asks per repo. Story 9.3: the record travels. */
@@ -20773,6 +20779,12 @@ function parseHookInput(stdin) {
20773
20779
  const parsed = ClaudeHookInput.safeParse(raw);
20774
20780
  return parsed.success ? parsed.data : void 0;
20775
20781
  }
20782
+ function isHeadless(env) {
20783
+ return env.CLAUDE_CODE_ENTRYPOINT?.startsWith("sdk") ?? false;
20784
+ }
20785
+ function userNotice(text) {
20786
+ return { systemMessage: text };
20787
+ }
20776
20788
  function additionalContext(event, text) {
20777
20789
  return { hookSpecificOutput: { hookEventName: event, additionalContext: text } };
20778
20790
  }
@@ -20844,6 +20856,15 @@ var PLUGIN_ID = "cogit@cogit";
20844
20856
  var MARKETPLACE = "cogit";
20845
20857
  var MARKETPLACE_REPO = "erensrtky/cogit";
20846
20858
  var INSTALL_COMMAND = `claude plugin install cogit --marketplace ${MARKETPLACE_REPO}`;
20859
+ async function readPluginInstalled(env) {
20860
+ const base = env.CLAUDE_CONFIG_DIR ?? join5(homedir2(), ".claude");
20861
+ const read = await readJson(join5(base, "plugins", "installed_plugins.json"));
20862
+ if (!read.found || "error" in read) return void 0;
20863
+ const plugins = isObject2(read.value) ? read.value.plugins : void 0;
20864
+ if (!isObject2(plugins)) return void 0;
20865
+ const entries = plugins[PLUGIN_ID];
20866
+ return Array.isArray(entries) && entries.length > 0;
20867
+ }
20847
20868
  function liveDir() {
20848
20869
  return join5(tmpdir(), "cogit-live");
20849
20870
  }
@@ -21231,6 +21252,7 @@ var claude = {
21231
21252
  name: DEFAULT_AGENT,
21232
21253
  skill: "/cogit:record",
21233
21254
  skillRule: SKILL_RULE,
21255
+ installCommand: INSTALL_COMMAND,
21234
21256
  projectDirEnv: "CLAUDE_PROJECT_DIR",
21235
21257
  pluginRootEnv: "CLAUDE_PLUGIN_ROOT",
21236
21258
  sessionIdEnv: "CLAUDE_SESSION_ID",
@@ -21247,8 +21269,11 @@ var claude = {
21247
21269
  displayTurn,
21248
21270
  excerpt,
21249
21271
  parseHookInput,
21272
+ isHeadless,
21250
21273
  additionalContext,
21274
+ userNotice,
21251
21275
  readRetention,
21276
+ readPluginInstalled,
21252
21277
  readSkillAllowed,
21253
21278
  setRetention,
21254
21279
  allowSkill,