@hiveai/cli 0.4.2 → 0.4.5
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/dist/index.js +24 -6
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -56,8 +56,8 @@ function registerBriefing(program2) {
|
|
|
56
56
|
'Print the full project briefing: last session recap + project context + relevant memories.\n Equivalent to calling get_briefing via MCP. Run before starting any task.\n\n Examples:\n haive briefing\n haive briefing --task "add Stripe payment" --files src/payments/PaymentService.ts\n haive briefing --symbols PaymentService,TenantFilter # look up where symbols live\n'
|
|
57
57
|
).option("--task <text>", "what you are about to do \u2014 filters memories by relevance").option("--files <csv>", "comma-separated file paths being worked on (surfaces anchored memories)").option("--symbols <csv>", "symbol names to look up in the code-map (e.g. PaymentService,TenantFilter) \u2014 requires haive index code").option("--max-memories <n>", "cap on memories surfaced", "10").option(
|
|
58
58
|
"--scope <scope>",
|
|
59
|
-
"personal | team |
|
|
60
|
-
"
|
|
59
|
+
"personal | team | shared | all (default: all \u2014 includes team + shared cross-repo memories)",
|
|
60
|
+
"all"
|
|
61
61
|
).option("--include-draft", "include draft memories (excluded by default)").option("--include-stale", "include stale memories (excluded by default \u2014 may be outdated)").option("-d, --dir <dir>", "project root").action(async (opts) => {
|
|
62
62
|
const root = findProjectRoot(opts.dir);
|
|
63
63
|
const paths = resolveHaivePaths(root);
|
|
@@ -75,7 +75,7 @@ function registerBriefing(program2) {
|
|
|
75
75
|
const filePaths = parseCsv(opts.files);
|
|
76
76
|
const tokens = opts.task ? tokenizeQuery(opts.task) : null;
|
|
77
77
|
const maxMemories = Math.max(1, Number(opts.maxMemories ?? 10));
|
|
78
|
-
const scopeFilter = opts.scope ?? "
|
|
78
|
+
const scopeFilter = opts.scope ?? "all";
|
|
79
79
|
const recaps = all.filter(({ memory: mem }) => mem.frontmatter.type === "session_recap").sort(
|
|
80
80
|
(a, b) => new Date(b.memory.frontmatter.created_at).getTime() - new Date(a.memory.frontmatter.created_at).getTime()
|
|
81
81
|
);
|
|
@@ -116,7 +116,7 @@ function registerBriefing(program2) {
|
|
|
116
116
|
if (fm.status === "rejected" || fm.status === "deprecated") return false;
|
|
117
117
|
if (!opts.includeDraft && fm.status === "draft") return false;
|
|
118
118
|
if (!opts.includeStale && fm.status === "stale") return false;
|
|
119
|
-
if (scopeFilter !== "all" && fm.scope !== scopeFilter) return false;
|
|
119
|
+
if (scopeFilter !== "all" && fm.scope !== scopeFilter && !(scopeFilter === "team" && fm.scope === "shared")) return false;
|
|
120
120
|
if (fm.type === "session_recap") return false;
|
|
121
121
|
return true;
|
|
122
122
|
});
|
|
@@ -470,6 +470,25 @@ jobs:
|
|
|
470
470
|
body: \`### haive \u2014 Stale memories detected\\n\\nSome memories anchored to code modified in this PR may be outdated:\\n\\n\\\`\\\`\\\`\\n\${report}\\n\\\`\\\`\\\`\\n\\nRun \\\`haive memory verify --update\\\` locally to refresh them before merging.\`
|
|
471
471
|
});
|
|
472
472
|
|
|
473
|
+
# \u2500\u2500 hAIve PR Memory Check \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
474
|
+
# Posts a comment on every PR surfacing memories relevant to the changed files.
|
|
475
|
+
# Reviewers and AI agents see gotchas, conventions, and action_required items
|
|
476
|
+
# before they start coding.
|
|
477
|
+
pr-memory-check:
|
|
478
|
+
if: github.event_name == 'pull_request'
|
|
479
|
+
runs-on: ubuntu-latest
|
|
480
|
+
permissions:
|
|
481
|
+
pull-requests: write
|
|
482
|
+
contents: read
|
|
483
|
+
steps:
|
|
484
|
+
- uses: actions/checkout@v4
|
|
485
|
+
|
|
486
|
+
- uses: Doucs91/hAIve/packages/github-action@main
|
|
487
|
+
with:
|
|
488
|
+
github-token: \${{ secrets.GITHUB_TOKEN }}
|
|
489
|
+
# post-if-empty: 'true' # uncomment to always post (even when no memories found)
|
|
490
|
+
# max-memories: '5' # limit memories per file in the comment
|
|
491
|
+
|
|
473
492
|
# On push to main: push shared memories to the hub (if hubPath is configured)
|
|
474
493
|
# Uncomment and configure hubPath in .ai/haive.config.json to enable.
|
|
475
494
|
# hub-push:
|
|
@@ -490,7 +509,6 @@ jobs:
|
|
|
490
509
|
# - name: push shared memories to hub
|
|
491
510
|
# run: haive hub push --commit
|
|
492
511
|
# # Requires hubPath in .ai/haive.config.json pointing to a cloned hub repo.
|
|
493
|
-
# # The hub repo must be available at that path in the CI workspace.
|
|
494
512
|
`;
|
|
495
513
|
function registerInit(program2) {
|
|
496
514
|
program2.command("init").description(
|
|
@@ -3328,7 +3346,7 @@ Next steps:
|
|
|
3328
3346
|
|
|
3329
3347
|
// src/index.ts
|
|
3330
3348
|
var program = new Command32();
|
|
3331
|
-
program.name("haive").description("hAIve \u2014 team-first persistent memory layer for AI coding agents").version("0.4.
|
|
3349
|
+
program.name("haive").description("hAIve \u2014 team-first persistent memory layer for AI coding agents").version("0.4.5");
|
|
3332
3350
|
registerInit(program);
|
|
3333
3351
|
registerMcp(program);
|
|
3334
3352
|
registerBriefing(program);
|