@phren/cli 0.2.15 → 0.3.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.
- package/README.md +2 -2
- package/dist/agent-instructions.d.ts +12 -0
- package/dist/agent-instructions.js +52 -0
- package/dist/bridge/agent-hook-stores.d.ts +32 -0
- package/dist/bridge/agent-hook-stores.js +67 -0
- package/dist/bridge/agent-hooks.d.ts +195 -2
- package/dist/bridge/agent-hooks.js +1049 -38
- package/dist/bridge/canary.d.ts +27 -0
- package/dist/bridge/canary.js +189 -0
- package/dist/bridge/changes.d.ts +57 -0
- package/dist/bridge/changes.js +403 -0
- package/dist/bridge/client.d.ts +3 -0
- package/dist/bridge/client.js +36 -0
- package/dist/bridge/code-note.d.ts +23 -0
- package/dist/bridge/code-note.js +51 -0
- package/dist/bridge/code-routes.d.ts +151 -0
- package/dist/bridge/code-routes.js +442 -0
- package/dist/bridge/codex-threads.d.ts +27 -0
- package/dist/bridge/codex-threads.js +442 -0
- package/dist/bridge/command.d.ts +7 -0
- package/dist/bridge/command.js +50 -5
- package/dist/bridge/computer-names.d.ts +4 -0
- package/dist/bridge/computer-names.js +16 -0
- package/dist/bridge/computers.d.ts +9 -0
- package/dist/bridge/computers.js +111 -0
- package/dist/bridge/context.d.ts +14 -0
- package/dist/bridge/context.js +149 -0
- package/dist/bridge/dispatch-command.d.ts +3 -0
- package/dist/bridge/dispatch-command.js +93 -0
- package/dist/bridge/dispatch-hosts.d.ts +23 -0
- package/dist/bridge/dispatch-hosts.js +25 -0
- package/dist/bridge/dispatch-returns.d.ts +125 -0
- package/dist/bridge/dispatch-returns.js +283 -0
- package/dist/bridge/dispatch-tree.d.ts +54 -0
- package/dist/bridge/dispatch-tree.js +198 -0
- package/dist/bridge/dispatch.d.ts +210 -0
- package/dist/bridge/dispatch.js +286 -0
- package/dist/bridge/enroll.d.ts +31 -0
- package/dist/bridge/enroll.js +236 -0
- package/dist/bridge/fanout-messages.d.ts +74 -0
- package/dist/bridge/fanout-messages.js +230 -0
- package/dist/bridge/fanouts.d.ts +160 -0
- package/dist/bridge/fanouts.js +702 -0
- package/dist/bridge/file-range.d.ts +16 -0
- package/dist/bridge/file-range.js +90 -0
- package/dist/bridge/files.d.ts +20 -0
- package/dist/bridge/files.js +54 -0
- package/dist/bridge/git-publish.d.ts +23 -0
- package/dist/bridge/git-publish.js +145 -0
- package/dist/bridge/git-worktrees.d.ts +21 -0
- package/dist/bridge/git-worktrees.js +150 -0
- package/dist/bridge/git.d.ts +54 -0
- package/dist/bridge/git.js +552 -0
- package/dist/bridge/grants.d.ts +31 -0
- package/dist/bridge/grants.js +181 -0
- package/dist/bridge/hand-off.d.ts +79 -0
- package/dist/bridge/hand-off.js +151 -0
- package/dist/bridge/health.d.ts +128 -0
- package/dist/bridge/health.js +260 -0
- package/dist/bridge/herdr.d.ts +79 -6
- package/dist/bridge/herdr.js +292 -27
- package/dist/bridge/hook-main.js +2 -0
- package/dist/bridge/install.d.ts +28 -1
- package/dist/bridge/install.js +225 -38
- package/dist/bridge/launch-worktree.d.ts +21 -0
- package/dist/bridge/launch-worktree.js +70 -0
- package/dist/bridge/limits.d.ts +20 -0
- package/dist/bridge/limits.js +65 -0
- package/dist/bridge/locate.d.ts +16 -0
- package/dist/bridge/locate.js +75 -0
- package/dist/bridge/metrics.d.ts +29 -0
- package/dist/bridge/metrics.js +71 -0
- package/dist/bridge/model-switch.d.ts +35 -0
- package/dist/bridge/model-switch.js +250 -0
- package/dist/bridge/models.d.ts +46 -0
- package/dist/bridge/models.js +257 -0
- package/dist/bridge/opencode-approvals.d.ts +6 -0
- package/dist/bridge/opencode-approvals.js +60 -0
- package/dist/bridge/pane-text.d.ts +15 -0
- package/dist/bridge/pane-text.js +23 -0
- package/dist/bridge/peers.d.ts +27 -0
- package/dist/bridge/peers.js +130 -0
- package/dist/bridge/projects.d.ts +12 -1
- package/dist/bridge/projects.js +268 -20
- package/dist/bridge/protocol.d.ts +35 -2
- package/dist/bridge/protocol.js +61 -7
- package/dist/bridge/push.d.ts +83 -0
- package/dist/bridge/push.js +199 -0
- package/dist/bridge/questions.d.ts +38 -0
- package/dist/bridge/questions.js +205 -0
- package/dist/bridge/schedule-format.d.ts +103 -0
- package/dist/bridge/schedule-format.js +266 -0
- package/dist/bridge/schedule-launch.d.ts +11 -0
- package/dist/bridge/schedule-launch.js +169 -0
- package/dist/bridge/schedule-watch.d.ts +54 -0
- package/dist/bridge/schedule-watch.js +255 -0
- package/dist/bridge/schedules.d.ts +48 -0
- package/dist/bridge/schedules.js +205 -0
- package/dist/bridge/server-launch.d.ts +14 -0
- package/dist/bridge/server-launch.js +218 -0
- package/dist/bridge/server-overview.d.ts +45 -0
- package/dist/bridge/server-overview.js +102 -0
- package/dist/bridge/server-pane-routes.d.ts +36 -0
- package/dist/bridge/server-pane-routes.js +479 -0
- package/dist/bridge/server-routes.d.ts +108 -0
- package/dist/bridge/server-routes.js +556 -0
- package/dist/bridge/server-stream.d.ts +46 -0
- package/dist/bridge/server-stream.js +253 -0
- package/dist/bridge/server.d.ts +3 -15
- package/dist/bridge/server.js +162 -264
- package/dist/bridge/session-servers.d.ts +24 -0
- package/dist/bridge/session-servers.js +136 -0
- package/dist/bridge/side-questions.d.ts +74 -0
- package/dist/bridge/side-questions.js +252 -0
- package/dist/bridge/simulators.d.ts +28 -0
- package/dist/bridge/simulators.js +198 -0
- package/dist/bridge/speech-transcribe.d.ts +24 -0
- package/dist/bridge/speech-transcribe.js +124 -0
- package/dist/bridge/speech.d.ts +35 -0
- package/dist/bridge/speech.js +98 -0
- package/dist/bridge/steps.d.ts +13 -0
- package/dist/bridge/steps.js +222 -0
- package/dist/bridge/tab-activity.d.ts +18 -0
- package/dist/bridge/tab-activity.js +99 -0
- package/dist/bridge/terminal-choice.d.ts +64 -0
- package/dist/bridge/terminal-choice.js +281 -0
- package/dist/bridge/transcript-claude.d.ts +22 -0
- package/dist/bridge/transcript-claude.js +353 -0
- package/dist/bridge/transcript-codex.d.ts +30 -0
- package/dist/bridge/transcript-codex.js +282 -0
- package/dist/bridge/transcript-copilot.d.ts +4 -0
- package/dist/bridge/transcript-copilot.js +14 -0
- package/dist/bridge/transcript-opencode.d.ts +5 -0
- package/dist/bridge/transcript-opencode.js +26 -0
- package/dist/bridge/transcript-preview.d.ts +96 -0
- package/dist/bridge/transcript-preview.js +491 -0
- package/dist/bridge/transcripts.d.ts +81 -4
- package/dist/bridge/transcripts.js +332 -67
- package/dist/bridge/transport.d.ts +3 -0
- package/dist/bridge/transport.js +96 -15
- package/dist/bridge/uploads.d.ts +15 -0
- package/dist/bridge/uploads.js +44 -2
- package/dist/bridge/usage.d.ts +124 -0
- package/dist/bridge/usage.js +859 -0
- package/dist/bridge-hook.mjs +46545 -21051
- package/dist/cli/actions.js +14 -1
- package/dist/cli/config-policy.js +25 -0
- package/dist/cli/config-proactivity.d.ts +3 -1
- package/dist/cli/config-proactivity.js +35 -3
- package/dist/cli/config.js +4 -1
- package/dist/cli/extract.d.ts +0 -8
- package/dist/cli/extract.js +4 -7
- package/dist/cli/govern.js +5 -2
- package/dist/cli/hooks-globs.js +1 -1
- package/dist/cli/hooks.d.ts +1 -1
- package/dist/cli/hooks.js +9 -7
- package/dist/cli/namespaces-projects.js +12 -6
- package/dist/cli/namespaces-store.js +37 -6
- package/dist/cli/namespaces-tasks.js +1 -1
- package/dist/cli/schedules.d.ts +1 -0
- package/dist/cli/schedules.js +164 -0
- package/dist/cli/session-background.js +1 -1
- package/dist/cli/session-git.d.ts +8 -5
- package/dist/cli/session-git.js +45 -120
- package/dist/cli/session-start.js +3 -1
- package/dist/cli/session-stop.js +19 -8
- package/dist/cli/team.js +13 -10
- package/dist/cli-handlers.d.ts +1 -1
- package/dist/cli-handlers.js +8 -4
- package/dist/cli-help.d.ts +5 -4
- package/dist/cli-help.js +15 -15
- package/dist/cli-registry.d.ts +4 -1
- package/dist/cli-registry.js +119 -6
- package/dist/content/archive.js +2 -2
- package/dist/content/citation.d.ts +11 -0
- package/dist/content/citation.js +18 -0
- package/dist/content/learning.js +2 -0
- package/dist/content/summarize.d.ts +14 -15
- package/dist/content/summarize.js +60 -5
- package/dist/content/validate.d.ts +17 -4
- package/dist/content/validate.js +200 -122
- package/dist/core/project-registry.d.ts +26 -0
- package/dist/core/project-registry.js +573 -0
- package/dist/core/project.js +2 -3
- package/dist/data/access.d.ts +16 -1
- package/dist/data/access.js +31 -3
- package/dist/data/tasks.d.ts +18 -3
- package/dist/data/tasks.js +8 -7
- package/dist/entrypoint.js +44 -10
- package/dist/fanout/adapters/claude.d.ts +2 -0
- package/dist/fanout/adapters/claude.js +7 -0
- package/dist/fanout/adapters/codex.d.ts +2 -0
- package/dist/fanout/adapters/codex.js +9 -0
- package/dist/fanout/adapters/opencode.d.ts +4 -0
- package/dist/fanout/adapters/opencode.js +9 -0
- package/dist/fanout/adapters/types.d.ts +21 -0
- package/dist/fanout/adapters/types.js +3 -0
- package/dist/fanout/command.d.ts +2 -0
- package/dist/fanout/command.js +78 -0
- package/dist/fanout/launcher.d.ts +27 -0
- package/dist/fanout/launcher.js +156 -0
- package/dist/fanout/opencode-serve.d.ts +24 -0
- package/dist/fanout/opencode-serve.js +191 -0
- package/dist/fanout/picker.d.ts +91 -0
- package/dist/fanout/picker.js +51 -0
- package/dist/fanout/usage.d.ts +5 -0
- package/dist/fanout/usage.js +51 -0
- package/dist/fanout/watchdog.d.ts +10 -0
- package/dist/fanout/watchdog.js +27 -0
- package/dist/filenames.d.ts +9 -0
- package/dist/filenames.js +11 -0
- package/dist/finding/context.js +4 -22
- package/dist/generated/memory-ui-graph.browser.js +525 -419
- package/dist/governance/policy-constants.d.ts +11 -0
- package/dist/governance/policy-constants.js +9 -0
- package/dist/governance/policy.d.ts +5 -8
- package/dist/governance/policy.js +11 -8
- package/dist/graph-core/camera.d.ts +24 -0
- package/dist/graph-core/camera.js +18 -0
- package/dist/graph-core/index.d.ts +2 -0
- package/dist/graph-core/index.js +2 -0
- package/dist/graph-core/labels.d.ts +77 -0
- package/dist/graph-core/labels.js +124 -0
- package/dist/graph-core/model.d.ts +13 -0
- package/dist/graph-core/model.js +33 -0
- package/dist/graph-core/types.d.ts +2 -0
- package/dist/home-paths.d.ts +7 -0
- package/dist/home-paths.js +21 -0
- package/dist/hooks.d.ts +3 -15
- package/dist/hooks.js +14 -1
- package/dist/index.js +24 -2
- package/dist/init/guard-globals.d.ts +1 -1
- package/dist/init/guard-globals.js +4 -4
- package/dist/init/init-configure.js +3 -3
- package/dist/init/init-uninstall.js +15 -5
- package/dist/init/init-walkthrough.js +1 -1
- package/dist/init/init.js +26 -6
- package/dist/init/management-preset.d.ts +1 -1
- package/dist/init/management-preset.js +2 -2
- package/dist/init/preferences.js +1 -1
- package/dist/init/self-wiring.js +1 -1
- package/dist/init/setup.d.ts +3 -26
- package/dist/init/setup.js +68 -593
- package/dist/init/shared.js +2 -0
- package/dist/init/store-gitignore.d.ts +1 -6
- package/dist/init/store-gitignore.js +2 -8
- package/dist/init/teardown.d.ts +1 -1
- package/dist/init/teardown.js +2 -2
- package/dist/link/context-imports.d.ts +15 -0
- package/dist/link/context-imports.js +101 -0
- package/dist/link/context.js +1 -1
- package/dist/link/doctor.d.ts +22 -1
- package/dist/link/doctor.js +128 -58
- package/dist/link/link.js +29 -61
- package/dist/link/refresh.js +2 -2
- package/dist/link/skills.js +26 -5
- package/dist/machine-identity.d.ts +3 -0
- package/dist/machine-identity.js +6 -0
- package/dist/mcp/profile.d.ts +2 -19
- package/dist/mcp/profile.js +64 -22
- package/dist/memory-ui-graph.runtime.js +525 -419
- package/dist/modules/code-package.d.ts +16 -0
- package/dist/modules/code-package.js +160 -0
- package/dist/modules/command.d.ts +2 -0
- package/dist/modules/command.js +67 -0
- package/dist/modules/config.d.ts +4 -0
- package/dist/modules/config.js +70 -0
- package/dist/modules/manifest.d.ts +41 -0
- package/dist/modules/manifest.js +1 -0
- package/dist/modules/provision.d.ts +3 -0
- package/dist/modules/provision.js +84 -0
- package/dist/modules/registry.d.ts +16 -0
- package/dist/modules/registry.js +250 -0
- package/dist/modules/runtime.d.ts +15 -0
- package/dist/modules/runtime.js +59 -0
- package/dist/package-metadata.js +10 -2
- package/dist/phren-dotenv.js +4 -2
- package/dist/phren-paths.d.ts +3 -2
- package/dist/phren-paths.js +4 -5
- package/dist/profile-store.js +43 -8
- package/dist/project-config.d.ts +19 -1
- package/dist/project-config.js +29 -3
- package/dist/project-topics.d.ts +1 -0
- package/dist/project-topics.js +13 -10
- package/dist/provider-adapters.js +1 -4
- package/dist/query-correlation.js +6 -6
- package/dist/session/artifacts.js +5 -5
- package/dist/session/checkpoints.js +5 -0
- package/dist/session/utils.d.ts +2 -2
- package/dist/session/utils.js +6 -6
- package/dist/shared/content.d.ts +1 -1
- package/dist/shared/content.js +1 -1
- package/dist/shared/data-utils.js +1 -1
- package/dist/shared/fragment-graph.d.ts +1 -1
- package/dist/shared/fragment-graph.js +5 -5
- package/dist/shared/index.js +48 -7
- package/dist/shared/retrieval.d.ts +18 -3
- package/dist/shared/retrieval.js +101 -12
- package/dist/shared/search-fallback.js +4 -6
- package/dist/shared/sqljs.d.ts +2 -0
- package/dist/shared/sqljs.js +4 -2
- package/dist/shared.d.ts +0 -1
- package/dist/shared.js +0 -1
- package/dist/shell/input.d.ts +1 -5
- package/dist/shell/input.js +16 -10
- package/dist/shell/palette.d.ts +2 -2
- package/dist/shell/palette.js +3 -7
- package/dist/shell/render.d.ts +3 -1
- package/dist/shell/render.js +4 -4
- package/dist/shell/shell.js +4 -1
- package/dist/shell/types.d.ts +1 -0
- package/dist/shell/types.js +4 -0
- package/dist/shell/view.d.ts +0 -4
- package/dist/shell/view.js +19 -27
- package/dist/skill/registry.js +25 -17
- package/dist/skill/state.d.ts +3 -0
- package/dist/skill/state.js +13 -7
- package/dist/status.js +38 -17
- package/dist/store-registry.d.ts +44 -18
- package/dist/store-registry.js +169 -60
- package/dist/store-weight.d.ts +1 -6
- package/dist/store-weight.js +4 -2
- package/dist/sync/auth-doctor.d.ts +8 -0
- package/dist/sync/auth-doctor.js +27 -0
- package/dist/sync/auth.d.ts +27 -0
- package/dist/sync/auth.js +114 -0
- package/dist/sync/conflict-resolve.d.ts +9 -0
- package/dist/sync/conflict-resolve.js +146 -0
- package/dist/sync/git-state.d.ts +4 -0
- package/dist/sync/git-state.js +49 -0
- package/dist/sync/outcome.d.ts +34 -0
- package/dist/sync/outcome.js +57 -0
- package/dist/sync/pull.d.ts +15 -7
- package/dist/sync/pull.js +84 -35
- package/dist/sync/store-merge.d.ts +29 -0
- package/dist/sync/store-merge.js +137 -0
- package/dist/sync/task-merge.d.ts +22 -0
- package/dist/sync/task-merge.js +158 -0
- package/dist/task/github.js +1 -1
- package/dist/task/lifecycle.d.ts +5 -0
- package/dist/task/lifecycle.js +67 -23
- package/dist/terminal-text.d.ts +5 -0
- package/dist/terminal-text.js +11 -0
- package/dist/test-global-setup.js +7 -0
- package/dist/tool-registry.d.ts +1 -1
- package/dist/tool-registry.js +3 -1
- package/dist/tools/code.d.ts +3 -0
- package/dist/tools/code.js +186 -0
- package/dist/tools/config.js +8 -0
- package/dist/tools/data.js +14 -7
- package/dist/tools/dispatch.d.ts +2 -0
- package/dist/tools/dispatch.js +66 -0
- package/dist/tools/finding.d.ts +11 -0
- package/dist/tools/finding.js +180 -123
- package/dist/tools/ops.js +5 -2
- package/dist/tools/search.js +21 -8
- package/dist/tools/session.js +21 -22
- package/dist/tools/tasks.js +8 -2
- package/dist/tools/types.d.ts +2 -2
- package/dist/tools/types.js +2 -2
- package/dist/ui/assets.js +1 -1
- package/dist/ui/data.js +14 -15
- package/dist/ui/deep-void.d.ts +1 -1
- package/dist/ui/deep-void.js +0 -1
- package/dist/ui/graph-chrome.d.ts +1 -1
- package/dist/ui/graph-chrome.js +51 -0
- package/dist/ui/page.js +5 -5
- package/dist/ui/scripts.js +67 -30
- package/dist/ui/server.js +52 -7
- package/dist/update.js +22 -11
- package/dist/utils-fts.js +1 -0
- package/dist/utils-helpers.d.ts +7 -0
- package/dist/utils-helpers.js +17 -0
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +1 -1
- package/package.json +49 -7
- package/plugins/opencode/phren-transcript.js +340 -0
- package/starter/README.md +4 -4
- package/starter/global/{CLAUDE.md → AGENTS.md} +2 -2
- package/starter/global/skills/conductor/SKILL.md +106 -0
- package/starter/global/skills/fanout/SKILL.md +20 -0
- package/starter/global/skills/phren-discover/SKILL.md +6 -6
- package/starter/global/skills/phren-init/SKILL.md +4 -4
- package/starter/global/skills/phren-sync/SKILL.md +3 -3
- package/starter/templates/frontend/reference/README.md +1 -1
- package/starter/templates/library/reference/README.md +1 -1
- package/starter/templates/monorepo/reference/README.md +1 -1
- package/starter/templates/python-project/reference/README.md +1 -1
- /package/starter/templates/frontend/{CLAUDE.md → AGENTS.md} +0 -0
- /package/starter/templates/library/{CLAUDE.md → AGENTS.md} +0 -0
- /package/starter/templates/monorepo/{CLAUDE.md → AGENTS.md} +0 -0
- /package/starter/templates/python-project/{CLAUDE.md → AGENTS.md} +0 -0
package/dist/skill/registry.js
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
|
+
import { skillEnabled } from "../modules/provision.js";
|
|
1
2
|
import * as fs from "fs";
|
|
2
3
|
import * as path from "path";
|
|
3
4
|
import { getProjectDirs } from "../shared.js";
|
|
4
5
|
import { parseSkillFrontmatter } from "../link/skills.js";
|
|
5
|
-
import {
|
|
6
|
+
import { readSkillEnabledState } from "./state.js";
|
|
6
7
|
import { safeProjectPath } from "../utils.js";
|
|
7
8
|
function normalizeCommand(raw, fallbackName) {
|
|
8
9
|
const value = typeof raw === "string" && raw.trim() ? raw.trim() : `/${fallbackName}`;
|
|
9
10
|
return value.startsWith("/") ? value : `/${value}`;
|
|
10
11
|
}
|
|
11
|
-
function normalizeAliases(raw) {
|
|
12
|
+
function normalizeAliases(raw, command) {
|
|
12
13
|
if (!Array.isArray(raw))
|
|
13
14
|
return [];
|
|
14
|
-
const seen = new Set();
|
|
15
|
+
const seen = new Set([command.toLowerCase()]);
|
|
15
16
|
const aliases = [];
|
|
16
17
|
for (const value of raw) {
|
|
17
18
|
if (typeof value !== "string" || !value.trim())
|
|
@@ -25,7 +26,7 @@ function normalizeAliases(raw) {
|
|
|
25
26
|
}
|
|
26
27
|
return aliases;
|
|
27
28
|
}
|
|
28
|
-
function collectSkills(
|
|
29
|
+
function collectSkills(isEnabled, root, sourceLabel, scopeType, sourceKind, seen) {
|
|
29
30
|
if (!fs.existsSync(root))
|
|
30
31
|
return [];
|
|
31
32
|
const results = [];
|
|
@@ -61,6 +62,7 @@ function collectSkills(phrenPath, root, sourceLabel, scopeType, sourceKind, seen
|
|
|
61
62
|
seen.add(filePath);
|
|
62
63
|
const name = isFolder ? entry.name : entry.name.replace(/\.md$/, "");
|
|
63
64
|
const { frontmatter } = parseSkillFrontmatter(fs.readFileSync(filePath, "utf8"));
|
|
65
|
+
const command = normalizeCommand(frontmatter?.command, name);
|
|
64
66
|
results.push({
|
|
65
67
|
name,
|
|
66
68
|
source: sourceLabel,
|
|
@@ -70,21 +72,21 @@ function collectSkills(phrenPath, root, sourceLabel, scopeType, sourceKind, seen
|
|
|
70
72
|
path: filePath,
|
|
71
73
|
root: isFolder ? path.dirname(filePath) : filePath,
|
|
72
74
|
description: frontmatter?.description,
|
|
73
|
-
enabled:
|
|
74
|
-
command
|
|
75
|
-
aliases: normalizeAliases(frontmatter?.aliases),
|
|
75
|
+
enabled: isEnabled(sourceLabel, name),
|
|
76
|
+
command,
|
|
77
|
+
aliases: normalizeAliases(frontmatter?.aliases, command),
|
|
76
78
|
});
|
|
77
79
|
}
|
|
78
80
|
return results;
|
|
79
81
|
}
|
|
80
|
-
function getGlobalSkills(phrenPath) {
|
|
82
|
+
function getGlobalSkills(phrenPath, isEnabled) {
|
|
81
83
|
const seen = new Set();
|
|
82
|
-
return collectSkills(
|
|
84
|
+
return collectSkills(isEnabled, path.join(phrenPath, "global", "skills"), "global", "global", "canonical", seen);
|
|
83
85
|
}
|
|
84
|
-
function getProjectLocalSkills(phrenPath, project) {
|
|
86
|
+
function getProjectLocalSkills(phrenPath, project, isEnabled) {
|
|
85
87
|
const seen = new Set();
|
|
86
88
|
const projectDir = path.join(phrenPath, project);
|
|
87
|
-
return collectSkills(
|
|
89
|
+
return collectSkills(isEnabled, path.join(projectDir, "skills"), project, "project", "canonical", seen);
|
|
88
90
|
}
|
|
89
91
|
function skillPriority(skill) {
|
|
90
92
|
// "user" scope (priority 500) reserved for skills the user marks as untouchable —
|
|
@@ -214,24 +216,30 @@ function toResolvedSkill(skill) {
|
|
|
214
216
|
};
|
|
215
217
|
}
|
|
216
218
|
export function getAllSkills(phrenPath, profile) {
|
|
217
|
-
const
|
|
219
|
+
const skillState = readSkillEnabledState(phrenPath);
|
|
220
|
+
const isEnabled = (scope, name) => skillState(scope, name) && skillEnabled(phrenPath, name, profile || undefined);
|
|
221
|
+
const all = getGlobalSkills(phrenPath, isEnabled);
|
|
218
222
|
for (const dir of getProjectDirs(phrenPath, profile)) {
|
|
219
223
|
const source = path.basename(dir);
|
|
220
224
|
if (source === "global")
|
|
221
225
|
continue;
|
|
222
|
-
all.push(...getProjectLocalSkills(phrenPath, source));
|
|
226
|
+
all.push(...getProjectLocalSkills(phrenPath, source, isEnabled));
|
|
223
227
|
}
|
|
224
228
|
return all;
|
|
225
229
|
}
|
|
226
230
|
function getLocalSkills(phrenPath, scope) {
|
|
231
|
+
const skillState = readSkillEnabledState(phrenPath);
|
|
232
|
+
const isEnabled = (scope, name) => skillState(scope, name) && skillEnabled(phrenPath, name);
|
|
227
233
|
if (scope.toLowerCase() === "global")
|
|
228
|
-
return getGlobalSkills(phrenPath);
|
|
229
|
-
return getProjectLocalSkills(phrenPath, scope);
|
|
234
|
+
return getGlobalSkills(phrenPath, isEnabled);
|
|
235
|
+
return getProjectLocalSkills(phrenPath, scope, isEnabled);
|
|
230
236
|
}
|
|
231
237
|
export function buildSkillManifest(phrenPath, profile, scope, mirrorDir) {
|
|
238
|
+
const skillState = readSkillEnabledState(phrenPath);
|
|
239
|
+
const isEnabled = (scope, name) => skillState(scope, name) && skillEnabled(phrenPath, name, profile || undefined);
|
|
232
240
|
const manifest = scope.toLowerCase() === "global"
|
|
233
|
-
? buildResolvedSkills(getGlobalSkills(phrenPath), mirrorDir)
|
|
234
|
-
: buildResolvedSkills([...getGlobalSkills(phrenPath), ...getProjectLocalSkills(phrenPath, scope)], mirrorDir);
|
|
241
|
+
? buildResolvedSkills(getGlobalSkills(phrenPath, isEnabled), mirrorDir)
|
|
242
|
+
: buildResolvedSkills([...getGlobalSkills(phrenPath, isEnabled), ...getProjectLocalSkills(phrenPath, scope, isEnabled)], mirrorDir);
|
|
235
243
|
manifest.scope = scope;
|
|
236
244
|
manifest.project = scope.toLowerCase() === "global" ? undefined : scope;
|
|
237
245
|
manifest.generatedAt = new Date().toISOString();
|
package/dist/skill/state.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export type SkillScope = string;
|
|
2
|
+
export type SkillEnabledResolver = (scope: SkillScope, name: string) => boolean;
|
|
2
3
|
export declare const SKILL_PREFERENCES_PATH = ".config/skill-preferences.json";
|
|
3
4
|
interface SkillPreferences {
|
|
4
5
|
schemaVersion: 1;
|
|
@@ -8,6 +9,8 @@ interface SkillPreferences {
|
|
|
8
9
|
export declare function skillStateKey(scope: SkillScope, name: string): string;
|
|
9
10
|
/** Strict on writes: never replace malformed or future settings with defaults. */
|
|
10
11
|
export declare function readSkillPreferences(phrenPath: string): SkillPreferences;
|
|
12
|
+
/** Read one snapshot per discovery pass; the next pass observes fresh settings. */
|
|
13
|
+
export declare function readSkillEnabledState(phrenPath: string): SkillEnabledResolver;
|
|
11
14
|
export declare function isSkillEnabled(phrenPath: string, scope: SkillScope, name: string): boolean;
|
|
12
15
|
export declare function setSkillEnabled(phrenPath: string, scope: SkillScope, name: string, enabled: boolean): void;
|
|
13
16
|
export {};
|
package/dist/skill/state.js
CHANGED
|
@@ -23,20 +23,26 @@ export function readSkillPreferences(phrenPath) {
|
|
|
23
23
|
}
|
|
24
24
|
return prefs;
|
|
25
25
|
}
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
/** Read one snapshot per discovery pass; the next pass observes fresh settings. */
|
|
27
|
+
export function readSkillEnabledState(phrenPath) {
|
|
28
|
+
let shared;
|
|
28
29
|
try {
|
|
29
|
-
|
|
30
|
-
if (Object.hasOwn(shared, key))
|
|
31
|
-
return shared[key];
|
|
30
|
+
shared = readSkillPreferences(phrenPath).enabledSkills;
|
|
32
31
|
}
|
|
33
32
|
catch (error) {
|
|
34
33
|
// A broken settings file must not accidentally re-enable disabled skills.
|
|
35
34
|
debugLog(`skill preferences: ${String(error)}`);
|
|
36
|
-
return false;
|
|
35
|
+
return () => false;
|
|
37
36
|
}
|
|
38
37
|
// Older machine-local choices remain effective until a synced choice exists.
|
|
39
|
-
|
|
38
|
+
const disabled = readInstallPreferences(phrenPath).disabledSkills;
|
|
39
|
+
return (scope, name) => {
|
|
40
|
+
const key = skillStateKey(scope, name);
|
|
41
|
+
return Object.hasOwn(shared, key) ? shared[key] : disabled?.[key] !== true;
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
export function isSkillEnabled(phrenPath, scope, name) {
|
|
45
|
+
return readSkillEnabledState(phrenPath)(scope, name);
|
|
40
46
|
}
|
|
41
47
|
export function setSkillEnabled(phrenPath, scope, name, enabled) {
|
|
42
48
|
const file = path.join(phrenPath, SKILL_PREFERENCES_PATH);
|
package/dist/status.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { moduleEnabled } from "./modules/runtime.js";
|
|
1
2
|
import * as fs from "fs";
|
|
2
3
|
import * as path from "path";
|
|
3
4
|
import { fileURLToPath } from "url";
|
|
@@ -7,7 +8,7 @@ import { mergeConfig, getWorkflowPolicy } from "./shared/governance.js";
|
|
|
7
8
|
import { getMcpEnabledPreference, getHooksEnabledPreference } from "./init/init.js";
|
|
8
9
|
import { getManagementPreset, resolveManagementCapabilities } from "./init/management-preset.js";
|
|
9
10
|
import { getTelemetrySummary } from "./telemetry.js";
|
|
10
|
-
import { runGit
|
|
11
|
+
import { runGit, errorMessage } from "./utils.js";
|
|
11
12
|
import { logger } from "./logger.js";
|
|
12
13
|
import { readRuntimeHealth, resolveTaskFilePath, FINDINGS_FILENAME } from "./data/access.js";
|
|
13
14
|
import { assessSyncOutage } from "./shared/governance.js";
|
|
@@ -15,6 +16,8 @@ import { resolveRuntimeProfile } from "./runtime-profile.js";
|
|
|
15
16
|
import { renderPhrenArt } from "./phren-art.js";
|
|
16
17
|
import { RESET, BOLD, DIM, GREEN, YELLOW, RED, CYAN } from "./shell/render.js";
|
|
17
18
|
import { storeWeight } from "./store-weight.js";
|
|
19
|
+
import { activeStoreAuthFailure, storeAuthDetail } from "./sync/auth.js";
|
|
20
|
+
import { describeAutoSave } from "./sync/outcome.js";
|
|
18
21
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
19
22
|
function readPackageVersion() {
|
|
20
23
|
try {
|
|
@@ -41,9 +44,6 @@ function countQueueItems(phrenPath, project) {
|
|
|
41
44
|
const queueFile = path.join(phrenPath, project, "review.md");
|
|
42
45
|
return countBullets(queueFile);
|
|
43
46
|
}
|
|
44
|
-
function runGit(cwd, args) {
|
|
45
|
-
return runGitShared(cwd, args, EXEC_TIMEOUT_QUICK_MS, debugLog);
|
|
46
|
-
}
|
|
47
47
|
function hasCommandHook(value) {
|
|
48
48
|
if (!Array.isArray(value))
|
|
49
49
|
return false;
|
|
@@ -81,14 +81,15 @@ export async function runStatus() {
|
|
|
81
81
|
? `${resolved.taskMode} ${DIM}(project override)${RESET}`
|
|
82
82
|
: resolved.taskMode;
|
|
83
83
|
console.log(` ${DIM}sensitivity${RESET} ${projectSensitivity}`);
|
|
84
|
-
|
|
84
|
+
if (moduleEnabled(phrenPath, "tasks", profile))
|
|
85
|
+
console.log(` ${DIM}task mode${RESET} ${projectTaskMode}`);
|
|
85
86
|
if (resolved.proactivity.base || resolved.proactivity.findings || resolved.proactivity.tasks) {
|
|
86
87
|
const parts = [];
|
|
87
88
|
if (resolved.proactivity.base)
|
|
88
89
|
parts.push(`base:${resolved.proactivity.base}`);
|
|
89
90
|
if (resolved.proactivity.findings)
|
|
90
91
|
parts.push(`findings:${resolved.proactivity.findings}`);
|
|
91
|
-
if (resolved.proactivity.tasks)
|
|
92
|
+
if (moduleEnabled(phrenPath, "tasks", profile) && resolved.proactivity.tasks)
|
|
92
93
|
parts.push(`tasks:${resolved.proactivity.tasks}`);
|
|
93
94
|
console.log(` ${DIM}proactivity${RESET} ${parts.join(" ")} ${DIM}(project override)${RESET}`);
|
|
94
95
|
}
|
|
@@ -104,7 +105,7 @@ export async function runStatus() {
|
|
|
104
105
|
try {
|
|
105
106
|
const w = storeWeight(phrenPath, profile);
|
|
106
107
|
const k = (n) => (n >= 1000 ? `${(n / 1000).toFixed(n >= 10000 ? 0 : 1)}k` : String(n));
|
|
107
|
-
console.log(` ${DIM}weight${RESET} ${k(w.findings)} words of findings · ${k(w.reference)} archived · ${k(w.tasks)} in tasks · ${k(w.skills)} in skills ·
|
|
108
|
+
console.log(` ${DIM}weight${RESET} ${k(w.findings)} words of findings · ${k(w.reference)} archived${moduleEnabled(phrenPath, "tasks", profile) ? ` · ${k(w.tasks)} in tasks` : ""} · ${k(w.skills)} in skills · AGENTS.md ${w.globalClaude} words`);
|
|
108
109
|
}
|
|
109
110
|
catch (err) {
|
|
110
111
|
logger.debug("status", `weight: ${errorMessage(err)}`);
|
|
@@ -325,10 +326,12 @@ export async function runStatus() {
|
|
|
325
326
|
for (const store of stores) {
|
|
326
327
|
const exists = store.available !== false;
|
|
327
328
|
const existsLabel = exists ? `${GREEN}yes${RESET}` : `${RED}no${RESET}`;
|
|
328
|
-
|
|
329
|
+
const auth = exists ? activeStoreAuthFailure(store.path) : undefined;
|
|
330
|
+
const syncDetail = auth ? ` ${YELLOW}${storeAuthDetail(auth)}${RESET}` : store.remote ? ` remote=${DIM}${store.remote}${RESET}` : "";
|
|
331
|
+
console.log(` ${store.name} ${DIM}(${store.role}, ${store.sync})${RESET} path=${existsLabel}${syncDetail}`);
|
|
329
332
|
}
|
|
330
|
-
// A store
|
|
331
|
-
// project it claims cannot be written until
|
|
333
|
+
// A store attached here whose folder is gone is not cosmetic: any
|
|
334
|
+
// project it claims cannot be written until the folder is back.
|
|
332
335
|
const { describeUnavailableStore } = await import("./store-registry.js");
|
|
333
336
|
for (const store of stores.filter((s) => s.available === false)) {
|
|
334
337
|
console.log(` ${YELLOW}! ${describeUnavailableStore(store)}${RESET}`);
|
|
@@ -350,15 +353,15 @@ export async function runStatus() {
|
|
|
350
353
|
for (const dir of projectDirs) {
|
|
351
354
|
const projName = path.basename(dir);
|
|
352
355
|
totalFindings += countBullets(path.join(phrenPath, projName, FINDINGS_FILENAME));
|
|
353
|
-
const taskPath = resolveTaskFilePath(phrenPath, projName);
|
|
356
|
+
const taskPath = moduleEnabled(phrenPath, "tasks", profile) ? resolveTaskFilePath(phrenPath, projName) : null;
|
|
354
357
|
if (taskPath)
|
|
355
358
|
totalTask += countBullets(taskPath);
|
|
356
359
|
totalQueue += countQueueItems(phrenPath, projName);
|
|
357
360
|
}
|
|
358
|
-
console.log(`\n ${DIM}phren holds${RESET} ${projectDirs.length} projects, ${totalFindings} findings, ${totalTask} tasks, ${totalQueue} queued`);
|
|
361
|
+
console.log(`\n ${DIM}phren holds${RESET} ${projectDirs.length} projects, ${totalFindings} findings${moduleEnabled(phrenPath, "tasks", profile) ? `, ${totalTask} tasks` : ""}, ${totalQueue} queued`);
|
|
359
362
|
const gitTarget = manifest?.installMode === "project-local" && manifest.workspaceRoot ? manifest.workspaceRoot : phrenPath;
|
|
360
|
-
const isGitRepo = runGit(gitTarget, ["rev-parse", "--is-inside-work-tree"]) === "true";
|
|
361
|
-
const hasOriginRemote = isGitRepo && Boolean(runGit(gitTarget, ["remote", "get-url", "origin"]));
|
|
363
|
+
const isGitRepo = runGit(gitTarget, ["rev-parse", "--is-inside-work-tree"], EXEC_TIMEOUT_QUICK_MS, debugLog) === "true";
|
|
364
|
+
const hasOriginRemote = isGitRepo && Boolean(runGit(gitTarget, ["remote", "get-url", "origin"], EXEC_TIMEOUT_QUICK_MS, debugLog));
|
|
362
365
|
const runtime = readRuntimeHealth(phrenPath);
|
|
363
366
|
if (manifest?.installMode === "project-local") {
|
|
364
367
|
console.log(`\n ${DIM}sync${RESET} workspace-managed`);
|
|
@@ -371,13 +374,16 @@ export async function runStatus() {
|
|
|
371
374
|
}
|
|
372
375
|
else {
|
|
373
376
|
console.log(`\n ${DIM}sync${RESET} auto-save ${runtime.lastAutoSave?.status || "n/a"}`);
|
|
377
|
+
if (runtime.lastAutoSave?.status === "sync-failed" || runtime.lastAutoSave?.status === "error") {
|
|
378
|
+
console.log(` ${RED}${describeAutoSave(runtime.lastAutoSave, runtime.lastSync)}${RESET}`);
|
|
379
|
+
}
|
|
374
380
|
console.log(` last pull ${runtime.lastSync?.lastPullStatus || "n/a"}${runtime.lastSync?.lastPullAt ? ` @ ${runtime.lastSync.lastPullAt}` : ""}`);
|
|
375
381
|
console.log(` last push ${runtime.lastSync?.lastPushStatus || "n/a"}${runtime.lastSync?.lastPushAt ? ` @ ${runtime.lastSync.lastPushAt}` : ""}`);
|
|
376
382
|
console.log(` unsynced commits ${runtime.lastSync?.unsyncedCommits ?? 0}`);
|
|
377
383
|
if (runtime.lastSync?.lastSuccessfulPushAt) {
|
|
378
384
|
console.log(` last successful push ${runtime.lastSync.lastSuccessfulPushAt}`);
|
|
379
385
|
}
|
|
380
|
-
if (runtime.lastSync?.lastPushDetail) {
|
|
386
|
+
if (runtime.lastSync?.lastPushDetail && !activeStoreAuthFailure(phrenPath)) {
|
|
381
387
|
console.log(` push detail ${runtime.lastSync.lastPushDetail}`);
|
|
382
388
|
}
|
|
383
389
|
const outage = assessSyncOutage(runtime.lastSync);
|
|
@@ -387,14 +393,14 @@ export async function runStatus() {
|
|
|
387
393
|
}
|
|
388
394
|
// Recent changes (git log)
|
|
389
395
|
if (isGitRepo) {
|
|
390
|
-
const log = runGit(gitTarget, ["log", "--oneline", "-5", "--no-decorate"]);
|
|
396
|
+
const log = runGit(gitTarget, ["log", "--oneline", "-5", "--no-decorate"], EXEC_TIMEOUT_QUICK_MS, debugLog);
|
|
391
397
|
if (log) {
|
|
392
398
|
console.log(`\n ${DIM}recent${RESET}`);
|
|
393
399
|
for (const line of log.split("\n")) {
|
|
394
400
|
console.log(` ${DIM}${line}${RESET}`);
|
|
395
401
|
}
|
|
396
402
|
}
|
|
397
|
-
const dirty = runGit(gitTarget, ["status", "--porcelain"]);
|
|
403
|
+
const dirty = runGit(gitTarget, ["status", "--porcelain"], EXEC_TIMEOUT_QUICK_MS, debugLog);
|
|
398
404
|
if (dirty) {
|
|
399
405
|
const count = dirty.split("\n").filter(Boolean).length;
|
|
400
406
|
console.log(` ${YELLOW}${count} uncommitted change(s)${RESET}`);
|
|
@@ -403,6 +409,21 @@ export async function runStatus() {
|
|
|
403
409
|
else {
|
|
404
410
|
console.log(`\n ${DIM}${gitTarget} is not a git repo${RESET}`);
|
|
405
411
|
}
|
|
412
|
+
// Health: the same data Phren Hook serves at /v1/health/details.
|
|
413
|
+
if (moduleEnabled(phrenPath, "hook", profile)) {
|
|
414
|
+
try {
|
|
415
|
+
const { hookRequest } = await import("./bridge/client.js");
|
|
416
|
+
const { healthDetails, formatHealth } = await import("./bridge/health.js");
|
|
417
|
+
const hook = await hookRequest("/v1/health", undefined, undefined, 2_000).catch(() => undefined);
|
|
418
|
+
const health = await healthDetails({ store: phrenPath, hookVersion: typeof hook?.version === "string" ? hook.version : undefined });
|
|
419
|
+
console.log(`\n ${BOLD}Health${RESET} ${DIM}(${health.computer.name})${RESET}`);
|
|
420
|
+
for (const line of formatHealth(health, { dim: DIM, reset: RESET, red: RED, yellow: YELLOW, green: GREEN }))
|
|
421
|
+
console.log(line);
|
|
422
|
+
}
|
|
423
|
+
catch (err) {
|
|
424
|
+
logger.debug("status", `health: ${errorMessage(err)}`);
|
|
425
|
+
}
|
|
426
|
+
}
|
|
406
427
|
// Telemetry
|
|
407
428
|
const telemetry = getTelemetrySummary(phrenPath);
|
|
408
429
|
const firstLine = telemetry.split("\n")[0];
|
package/dist/store-registry.d.ts
CHANGED
|
@@ -32,15 +32,29 @@ export interface TeamBootstrap {
|
|
|
32
32
|
description?: string;
|
|
33
33
|
default_role?: StoreRole;
|
|
34
34
|
}
|
|
35
|
+
/**
|
|
36
|
+
* The synced registry at the store root. It holds the primary store's entry
|
|
37
|
+
* only, so every machine on this personal store agrees on its id. Team and
|
|
38
|
+
* readonly stores used to live here too, which pushed one machine's `team
|
|
39
|
+
* join` onto every other machine and left doctor failing forever there.
|
|
40
|
+
*/
|
|
35
41
|
export declare const STORES_FILENAME = "stores.yaml";
|
|
42
|
+
/**
|
|
43
|
+
* The stores attached on this machine, under `.runtime/` (never synced).
|
|
44
|
+
* Using the personal store must never connect a machine to a team store.
|
|
45
|
+
*/
|
|
46
|
+
export declare const ATTACHED_STORES_FILENAME = "attached-stores.yaml";
|
|
36
47
|
export declare function storesFilePath(phrenPath: string): string;
|
|
48
|
+
export declare function attachedStoresFilePath(phrenPath: string): string;
|
|
37
49
|
export declare function generateStoreId(): string;
|
|
38
50
|
/**
|
|
39
|
-
* What a registry read actually found
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
51
|
+
* What a registry read actually found: the primary store from the synced
|
|
52
|
+
* stores.yaml plus the stores attached on this machine. `registry` is what
|
|
53
|
+
* could be honored; `problems` says what couldn't; `lossy` means one of the
|
|
54
|
+
* two files EXISTS but the result does not fully represent it (unreadable,
|
|
55
|
+
* unparsable, entries skipped, or validation failed). Mutators must refuse to
|
|
56
|
+
* write while a read is lossy — writing back would silently destroy the
|
|
57
|
+
* entries we skipped.
|
|
44
58
|
*/
|
|
45
59
|
export interface RegistryReadResult {
|
|
46
60
|
registry: StoreRegistry | null;
|
|
@@ -49,28 +63,40 @@ export interface RegistryReadResult {
|
|
|
49
63
|
}
|
|
50
64
|
export declare function readStoreRegistryDetailed(phrenPath: string): RegistryReadResult;
|
|
51
65
|
export declare function readStoreRegistry(phrenPath: string): StoreRegistry | null;
|
|
66
|
+
/**
|
|
67
|
+
* Writes this machine's view of the stores: the primary entry to the synced
|
|
68
|
+
* stores.yaml (only when it changed) and every other store to the machine's
|
|
69
|
+
* own attached-stores.yaml.
|
|
70
|
+
*/
|
|
52
71
|
export declare function writeStoreRegistry(phrenPath: string, registry: StoreRegistry): void;
|
|
53
72
|
/** True when a store's directory exists on this machine. */
|
|
54
73
|
export declare function storePathExists(storePath: string): boolean;
|
|
55
74
|
/**
|
|
56
|
-
* Resolve the full list of stores. This is the **key
|
|
57
|
-
* -
|
|
58
|
-
* -
|
|
59
|
-
*
|
|
75
|
+
* Resolve the full list of stores on this machine. This is the **key
|
|
76
|
+
* backward-compat function**:
|
|
77
|
+
* - The primary comes from the synced stores.yaml, or is implicit when the
|
|
78
|
+
* file is missing
|
|
79
|
+
* - Then every store attached on this machine (.runtime/attached-stores.yaml)
|
|
80
|
+
* - Then PHREN_FEDERATION_PATHS entries as readonly stores
|
|
60
81
|
*
|
|
61
82
|
* Every returned entry carries `available`, recording whether its path exists
|
|
62
|
-
* here.
|
|
63
|
-
* must be able to see that a store claims a project before
|
|
64
|
-
*
|
|
65
|
-
* claims this project" and its writes would land in the primary store.
|
|
83
|
+
* here. Attached stores whose folder is gone are deliberately **still
|
|
84
|
+
* returned**: callers must be able to see that a store claims a project before
|
|
85
|
+
* deciding what to do, otherwise its writes would land in the primary store.
|
|
66
86
|
*/
|
|
67
87
|
export declare function resolveAllStores(phrenPath: string): StoreEntry[];
|
|
68
|
-
/**
|
|
88
|
+
/**
|
|
89
|
+
* Non-primary entries in the synced stores.yaml that this machine does not use:
|
|
90
|
+
* joined on another machine with an older phren. Attached ones were moved into
|
|
91
|
+
* attached-stores.yaml; the rest mean nothing here.
|
|
92
|
+
*/
|
|
93
|
+
export declare function ignoredSyncedStores(phrenPath: string): StoreEntry[];
|
|
94
|
+
/** Stores attached on this machine whose directory is missing. */
|
|
69
95
|
export declare function getUnavailableStores(phrenPath: string): StoreEntry[];
|
|
70
96
|
/**
|
|
71
|
-
* One actionable sentence about a store
|
|
72
|
-
* Shared by write routing, `phren status`, and `phren doctor` so all
|
|
73
|
-
* the same store, the same expected path, and the same remedy.
|
|
97
|
+
* One actionable sentence about a store attached on this machine whose folder
|
|
98
|
+
* is gone. Shared by write routing, `phren status`, and `phren doctor` so all
|
|
99
|
+
* three name the same store, the same expected path, and the same remedy.
|
|
74
100
|
*/
|
|
75
101
|
export declare function describeUnavailableStore(store: StoreEntry): string;
|
|
76
102
|
/** The primary store (role=primary). Falls back to implicit entry. */
|
|
@@ -84,7 +110,7 @@ export declare function findStoreByName(phrenPath: string, name: string): StoreE
|
|
|
84
110
|
/** Get project directories for a store, filtered by the store's subscription list (if set). */
|
|
85
111
|
export declare function getStoreProjectDirs(store: StoreEntry): string[];
|
|
86
112
|
export declare function readTeamBootstrap(storePath: string): TeamBootstrap | null;
|
|
87
|
-
/**
|
|
113
|
+
/** Attach a store on this machine. Creates stores.yaml for the primary if needed. Uses file locking. */
|
|
88
114
|
export declare function addStoreToRegistry(phrenPath: string, entry: StoreEntry): void;
|
|
89
115
|
/** Remove a store entry by name. Refuses to remove primary. Uses file locking. */
|
|
90
116
|
export declare function removeStoreFromRegistry(phrenPath: string, name: string): StoreEntry;
|