@vortex-os/base 0.7.1 → 0.7.2
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/LICENSE +21 -21
- package/README.md +1 -1
- package/bin/vortex.mjs +17 -17
- package/dist/{catch-up-GDDKPZHJ.js → catch-up-KIHTAUPX.js} +2 -2
- package/dist/{chunk-3L5DLEGP.js → chunk-7SNLVGBO.js} +1 -1
- package/dist/chunk-7SNLVGBO.js.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +15 -9
- package/dist/index.js.map +1 -1
- package/dist/{vectorize-PN4Y7XMO.js → vectorize-RBDBTSTW.js} +1 -1
- package/dist/vectorize-RBDBTSTW.js.map +1 -0
- package/package.json +1 -1
- package/templates/commands/agenda.md +15 -15
- package/templates/commands/resume.md +52 -52
- package/templates/config/vortex.json +13 -13
- package/templates/manifest.json +2 -2
- package/templates/routers/.cursorrules +14 -14
- package/templates/routers/AGENTS.md +27 -27
- package/templates/routers/CLAUDE.md +39 -39
- package/templates/routers/GEMINI.md +16 -16
- package/dist/chunk-3L5DLEGP.js.map +0 -1
- package/dist/vectorize-PN4Y7XMO.js.map +0 -1
- /package/dist/{catch-up-GDDKPZHJ.js.map → catch-up-KIHTAUPX.js.map} +0 -0
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 vortex-os-project
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 vortex-os-project
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -40,7 +40,7 @@ npx vortex init # scaffold the instance
|
|
|
40
40
|
|
|
41
41
|
- the per-agent files — `AGENTS.md` (the thin Codex-CLI entry, auto-loaded by Codex and other `AGENTS.md`-aware tools) plus thin routers `CLAUDE.md`, `GEMINI.md`, `.cursorrules`, all pointing at `AI-RULES.md` (the single source of truth for shared rules) — so any agent host finds VortEX's behavior contract (these are generic templates you personalize over time);
|
|
42
42
|
- the `data/` skeleton (`_memory/`, `worklog/`, `decision-log/`, `runbooks/`, `hubs/`, `inbox/`), your user-profile memory, and today's first worklog;
|
|
43
|
-
- `.claude/settings.json` with the session hooks wired as `npx --no-install
|
|
43
|
+
- `.claude/settings.json` with the session hooks wired as `npx --no-install vortex session-start` / `… session-end` (the `--no-install` flag makes the auto-firing hook fail closed rather than install on a cache miss; resolving the bare `vortex` bin — local `node_modules/.bin` first, then PATH — lets the `global-setup` hook fire from any folder, not only where a local install exists), plus the agent-mediated slash-commands in `.claude/commands/`;
|
|
44
44
|
- `.agent/vortex.json` (auto-record config) and a minimal `package.json` with `"type":"module"` if none exists.
|
|
45
45
|
|
|
46
46
|
`vortex import --from <folder>` brings an existing notes folder in — markdown is auto-classified (worklog / decision-log / …) and **attachments (PDFs, images, …) are copied byte-for-byte** into the same layout; credential files (`*.key`, `.env`, `secrets/` …) and oversized files are skipped and reported. As the framework improves, `vortex update` refreshes the installed templates **without ever overwriting a file you edited** (your edit is parked at `<file>.new`); `vortex doctor` checks instance health.
|
package/bin/vortex.mjs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// `vortex` — the CLI shipped by @vortex-os/base.
|
|
3
|
-
//
|
|
4
|
-
// `npm i @vortex-os/base` puts this on the instance's path (node_modules/.bin),
|
|
5
|
-
// so `npx vortex init` / `npx vortex session-start` / `npx vortex --list` work
|
|
6
|
-
// without any monorepo checkout. It is a thin wrapper over the canonical
|
|
7
|
-
// dispatch (`runVortexCli`), which is bundled into base from
|
|
8
|
-
// `@vortex-os/session-rituals` — exactly one source of truth for the CLI logic.
|
|
9
|
-
//
|
|
10
|
-
// The dispatch lazily probes the optional `@vortex-os/memory-extended` add-on:
|
|
11
|
-
// when it is installed alongside base, `/recall` lights up; on a lean base-only
|
|
12
|
-
// install the probe is caught and the CLI runs with every other command.
|
|
13
|
-
|
|
14
|
-
import { sessionRituals } from "../dist/index.js";
|
|
15
|
-
|
|
16
|
-
const code = await sessionRituals.runVortexCli(process.argv.slice(2));
|
|
17
|
-
process.exitCode = code;
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// `vortex` — the CLI shipped by @vortex-os/base.
|
|
3
|
+
//
|
|
4
|
+
// `npm i @vortex-os/base` puts this on the instance's path (node_modules/.bin),
|
|
5
|
+
// so `npx vortex init` / `npx vortex session-start` / `npx vortex --list` work
|
|
6
|
+
// without any monorepo checkout. It is a thin wrapper over the canonical
|
|
7
|
+
// dispatch (`runVortexCli`), which is bundled into base from
|
|
8
|
+
// `@vortex-os/session-rituals` — exactly one source of truth for the CLI logic.
|
|
9
|
+
//
|
|
10
|
+
// The dispatch lazily probes the optional `@vortex-os/memory-extended` add-on:
|
|
11
|
+
// when it is installed alongside base, `/recall` lights up; on a lean base-only
|
|
12
|
+
// install the probe is caught and the CLI runs with every other command.
|
|
13
|
+
|
|
14
|
+
import { sessionRituals } from "../dist/index.js";
|
|
15
|
+
|
|
16
|
+
const code = await sessionRituals.runVortexCli(process.argv.slice(2));
|
|
17
|
+
process.exitCode = code;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../plugins/session-rituals/src/catch-up.ts"],"sourcesContent":["import type { ModuleContext } from \"@vortex-os/core\";\r\n// Type-only — erased at compile time, so importing it does NOT pull the\r\n// `@vortex-os/memory-extended` add-on (or its native sqlite/level deps) into\r\n// the module graph of consumers that only need the types. The runtime engine\r\n// is loaded lazily inside the function body via `await import(...)`.\r\nimport type { sessionArchive } from \"@vortex-os/memory-extended\";\r\n\r\n/**\r\n * Start-of-session \"catch-up\": fold conversation transcripts into the local\r\n * search archive without the user ever having to wrap up a session.\r\n *\r\n * Two sources, one pass:\r\n * - **local (a)** — this machine's own transcripts that are not archived yet,\r\n * read from every detected agent host's transcript store (Claude Code,\r\n * Codex, Gemini) and scoped to the current project. Because all hosts are\r\n * swept on every start, a single Claude Code session-start also folds in the\r\n * Codex/Gemini sessions you ran in the same project, into one archive.\r\n * - **pulled (b)** — transcripts created on another machine that arrived as\r\n * normalized text via git sync. Their text is present but this machine's\r\n * DB (local, derived, gitignored) has never indexed them.\r\n *\r\n * Text only — vectorization is deferred to recall/rebuild so session start\r\n * stays fast. The whole step is gated by `autoRecord.archive` at the call site\r\n * and is best-effort: callers should treat a thrown archive backend (e.g. the\r\n * native sqlite module not built) as \"skip\", never as a fatal start error.\r\n */\r\nexport interface CatchUpResult {\r\n /** Local transcripts newly archived this run (source a). */\r\n readonly ingestedLocal: number;\r\n /** Normalized transcripts from another machine newly indexed (source b). */\r\n readonly indexedPulled: number;\r\n /** Per-session ingest errors (source a). */\r\n readonly errors: number;\r\n}\r\n\r\nexport interface CatchUpOptions {\r\n /** Restrict local ingest to one project's transcripts. Default: `ctx.repoRoot`. */\r\n readonly cwd?: string;\r\n /**\r\n * Transcript adapters for local ingest. Default: all CLI hosts — Claude Code,\r\n * Codex, and Gemini. Each adapter's `detect()` returns false when its host is\r\n * absent, so registering all three is ~free on a machine that only uses one.\r\n * (Claude Desktop is opt-in — it needs the `classic-level` dependency — so it\r\n * is not in the default set; a caller can add it.) Tests inject fakes (or a\r\n * sandbox `env.home`) so the scan never touches the real home directory.\r\n */\r\n readonly adapters?: sessionArchive.IngestParams[\"adapters\"];\r\n /** Adapter environment override (e.g. a sandbox HOME). Tests use this. */\r\n readonly env?: sessionArchive.IngestParams[\"env\"];\r\n}\r\n\r\nexport async function catchUpSessions(\r\n ctx: ModuleContext,\r\n opts?: CatchUpOptions,\r\n): Promise<CatchUpResult> {\r\n // Lazy-load the optional add-on. Base ships without `memory-extended`; this\r\n // import resolves only when the add-on is installed alongside it. The call\r\n // site already gates this step on `autoRecord.archive` and treats a thrown\r\n // backend as \"skip\", so a missing add-on surfaces as a normal load error\r\n // the caller can catch.\r\n const { sessionArchive } = await import(\"@vortex-os/memory-extended\");\r\n\r\n const dataDir = ctx.dataDir;\r\n const cwd = opts?.cwd ?? ctx.repoRoot;\r\n const adapters = opts?.adapters ?? [\r\n sessionArchive.claudeCodeAdapter,\r\n sessionArchive.codexAdapter,\r\n sessionArchive.geminiAdapter,\r\n ];\r\n\r\n // (a) Ingest this machine's not-yet-archived transcripts for the current\r\n // project. Writes the normalized copy into the archive (which git syncs) and\r\n // a local DB row. Text only — no vectorization here.\r\n const ingestResult = await sessionArchive.ingest({ adapters, dataDir, cwd, env: opts?.env });\r\n\r\n // (b) Index normalized transcripts that arrived from another machine via git\r\n // pull — their text is on disk but this machine's DB has no row yet.\r\n const store = new sessionArchive.SessionArchiveStore(dataDir);\r\n let indexedPulled = 0;\r\n try {\r\n indexedPulled = store.reindexFromNormalized().indexed;\r\n } finally {\r\n store.close();\r\n }\r\n\r\n return {\r\n ingestedLocal: ingestResult.sessionsIngested,\r\n indexedPulled,\r\n errors: ingestResult.errors.length,\r\n };\r\n}\r\n"],"mappings":";AAmDA,eAAsB,gBACpB,KACA,MAAqB;AAOrB,QAAM,EAAE,eAAc,IAAK,MAAM,OAAO,4BAA4B;AAEpE,QAAM,UAAU,IAAI;AACpB,QAAM,MAAM,MAAM,OAAO,IAAI;AAC7B,QAAM,WAAW,MAAM,YAAY;IACjC,eAAe;IACf,eAAe;IACf,eAAe;;AAMjB,QAAM,eAAe,MAAM,eAAe,OAAO,EAAE,UAAU,SAAS,KAAK,KAAK,MAAM,IAAG,CAAE;AAI3F,QAAM,QAAQ,IAAI,eAAe,oBAAoB,OAAO;AAC5D,MAAI,gBAAgB;AACpB,MAAI;AACF,oBAAgB,MAAM,sBAAqB,EAAG;EAChD;AACE,UAAM,MAAK;EACb;AAEA,SAAO;IACL,eAAe,aAAa;IAC5B;IACA,QAAQ,aAAa,OAAO;;AAEhC;","names":[]}
|
package/dist/index.d.ts
CHANGED
|
@@ -2684,8 +2684,8 @@ declare function collectCarryover(repoRoot: string, ignore?: (repoRelPosixPath:
|
|
|
2684
2684
|
* file read/write around them. Keeping them pure makes the merge unit-testable
|
|
2685
2685
|
* and the "writes only what's missing" guarantee verifiable.
|
|
2686
2686
|
*/
|
|
2687
|
-
declare const SESSION_START_COMMAND = "npx --no-install
|
|
2688
|
-
declare const SESSION_END_COMMAND = "npx --no-install
|
|
2687
|
+
declare const SESSION_START_COMMAND = "npx --no-install vortex session-start || exit 0";
|
|
2688
|
+
declare const SESSION_END_COMMAND = "npx --no-install vortex session-end || exit 0";
|
|
2689
2689
|
interface HookCommand {
|
|
2690
2690
|
readonly type: "command";
|
|
2691
2691
|
readonly command: string;
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
catchUpSessions
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7SNLVGBO.js";
|
|
4
4
|
import {
|
|
5
5
|
__export
|
|
6
6
|
} from "./chunk-PZ5AY32C.js";
|
|
@@ -4780,11 +4780,17 @@ import { basename as basename7, dirname as dirname5, extname as extname11, join
|
|
|
4780
4780
|
import { fileURLToPath } from "url";
|
|
4781
4781
|
|
|
4782
4782
|
// ../plugins/session-rituals/dist/ensure-hooks.js
|
|
4783
|
-
var SESSION_START_COMMAND = "npx --no-install
|
|
4784
|
-
var SESSION_END_COMMAND = "npx --no-install
|
|
4783
|
+
var SESSION_START_COMMAND = "npx --no-install vortex session-start || exit 0";
|
|
4784
|
+
var SESSION_END_COMMAND = "npx --no-install vortex session-end || exit 0";
|
|
4785
4785
|
var LEGACY_COMMANDS = {
|
|
4786
|
-
SessionStart:
|
|
4787
|
-
|
|
4786
|
+
SessionStart: [
|
|
4787
|
+
"npx --no-install -p @vortex-os/base vortex session-start || exit 0",
|
|
4788
|
+
"npx --no-install -p @vortex-os/base vortex session-start"
|
|
4789
|
+
],
|
|
4790
|
+
SessionEnd: [
|
|
4791
|
+
"npx --no-install -p @vortex-os/base vortex session-end || exit 0",
|
|
4792
|
+
"npx --no-install -p @vortex-os/base vortex session-end"
|
|
4793
|
+
]
|
|
4788
4794
|
};
|
|
4789
4795
|
function parseSettings(text) {
|
|
4790
4796
|
const trimmed = (text ?? "").trim();
|
|
@@ -4814,7 +4820,7 @@ function ensureVortexHooks(existing) {
|
|
|
4814
4820
|
for (const g of src) {
|
|
4815
4821
|
const hookList = [];
|
|
4816
4822
|
for (const h of g.hooks ?? []) {
|
|
4817
|
-
const migrated = h.command
|
|
4823
|
+
const migrated = legacy.includes(h.command);
|
|
4818
4824
|
const cmd = migrated ? command : h.command;
|
|
4819
4825
|
if (cmd === command) {
|
|
4820
4826
|
if (kept) {
|
|
@@ -8647,7 +8653,7 @@ async function runVectorizeSetup(repoRoot, out, err) {
|
|
|
8647
8653
|
return;
|
|
8648
8654
|
}
|
|
8649
8655
|
cleanTmp();
|
|
8650
|
-
const { vectorizeIndex } = await import("./vectorize-
|
|
8656
|
+
const { vectorizeIndex } = await import("./vectorize-RBDBTSTW.js");
|
|
8651
8657
|
const result = await vectorizeIndex(ctx, { dbPath: tmpDb, allowDownload: true });
|
|
8652
8658
|
const sqliteSpecifier = "better-sqlite3";
|
|
8653
8659
|
const mod = await import(sqliteSpecifier);
|
|
@@ -8719,7 +8725,7 @@ async function runSessionStart(repoRoot, out) {
|
|
|
8719
8725
|
let catchUp = null;
|
|
8720
8726
|
if (config.autoRecord.archive) {
|
|
8721
8727
|
try {
|
|
8722
|
-
const { catchUpSessions: catchUpSessions2 } = await import("./catch-up-
|
|
8728
|
+
const { catchUpSessions: catchUpSessions2 } = await import("./catch-up-KIHTAUPX.js");
|
|
8723
8729
|
catchUp = await catchUpSessions2(ctx);
|
|
8724
8730
|
} catch {
|
|
8725
8731
|
}
|
|
@@ -8738,7 +8744,7 @@ async function runSessionStart(repoRoot, out) {
|
|
|
8738
8744
|
});
|
|
8739
8745
|
if (action === "inline") {
|
|
8740
8746
|
try {
|
|
8741
|
-
const { vectorizeIndex } = await import("./vectorize-
|
|
8747
|
+
const { vectorizeIndex } = await import("./vectorize-RBDBTSTW.js");
|
|
8742
8748
|
vectorized = await vectorizeIndex(ctx);
|
|
8743
8749
|
} catch {
|
|
8744
8750
|
}
|