@mnstry/atelier 0.2.0-alpha.13 → 0.2.0-alpha.14
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/CHANGELOG.md +233 -0
- package/README.md +22 -5
- package/docs/blocks/capability-stewardship.md +1 -1
- package/docs/blocks/learning-harnesses.md +1 -1
- package/docs/capability-stewardship.md +2 -4
- package/docs/ingestion.md +3 -3
- package/docs/inquiry-harnesses.md +2 -3
- package/docs/install.md +3 -3
- package/docs/learning-harnesses.md +2 -3
- package/docs/local-services.md +42 -3
- package/docs/obsidian-contract.md +23 -0
- package/docs/obsidian-plugin.md +214 -3
- package/docs/obsidian.md +271 -11
- package/docs/personal-workspace.md +13 -4
- package/docs/release-engineering.md +2 -1
- package/docs/repo-boundary-guard.md +26 -3
- package/docs/semantic-operation.md +4 -3
- package/docs/upgrade.md +174 -2
- package/fixtures/templates/local-library.v1.json +2 -1
- package/package.json +2 -1
- package/plugins/obsidian/main.js +57 -8
- package/plugins/obsidian/manifest.json +1 -1
- package/src/boundary/content-rules.mjs +532 -67
- package/src/boundary/policy.mjs +135 -56
- package/src/cli/run.mjs +3 -2
- package/src/commands/obsidian.mjs +23 -7
- package/src/graph/graph.mjs +13 -5
- package/src/graph/knowledge-graph.mjs +19 -1
- package/src/ingestion/optional/graphify/graphify_supplier.py +5 -0
- package/src/ingestion/optional/graphify/native-closure-pins.json +275 -0
- package/src/ingestion/optional/graphify/native-pins.json +306 -0
- package/src/knowledge-health/rule-identity.mjs +14 -9
- package/src/personal-workspace/index.mjs +1 -1
- package/src/personal-workspace/selection.mjs +17 -1
- package/src/project/path-match.mjs +2 -1
- package/src/projection/obsidian/materialize/prepare-view.mjs +87 -5
- package/src/projection/obsidian/personal-workspace.mjs +87 -4
- package/src/projection/obsidian/proposals/adapter.mjs +46 -23
- package/src/projection/obsidian/proposals/observation.mjs +40 -2
- package/src/projection/obsidian/publication/publisher.mjs +72 -5
- package/src/projection/project.mjs +3 -2
- package/src/runtime/obsidian/engine.mjs +293 -55
- package/src/runtime/obsidian/lifecycle.mjs +17 -12
- package/src/runtime/obsidian/login-item.mjs +4 -1
- package/src/runtime/obsidian/observation.mjs +36 -4
- package/src/runtime/obsidian/opening.mjs +3 -2
- package/src/runtime/obsidian/personal-selection.mjs +125 -0
- package/src/runtime/obsidian/pipeline.mjs +44 -3
- package/src/runtime/obsidian/private-lock.mjs +39 -4
- package/src/runtime/obsidian/service-main.mjs +58 -12
- package/src/runtime/obsidian/service.mjs +66 -6
- package/src/runtime/obsidian/view-permission.mjs +334 -0
- package/src/ui/control-system.mjs +201 -0
- package/src/ui/html-primitives.mjs +3 -0
- package/src/upgrade/closure-diagnostics.mjs +135 -0
- package/src/upgrade/closure.mjs +649 -0
- package/src/upgrade/upgrade.mjs +19 -7
- package/templates/external-project-workspace/pack-lifecycle.json +2 -1
package/src/upgrade/upgrade.mjs
CHANGED
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
writeJson,
|
|
16
16
|
} from '../project/config.mjs'
|
|
17
17
|
import { packageRootFrom } from '../project/package-root.mjs'
|
|
18
|
+
import { canonicalDiffArgs, gitOutputResult, parseDiffSections } from '../boundary/content-rules.mjs'
|
|
18
19
|
import {
|
|
19
20
|
BOUNDARY_POLICY_SCHEMA,
|
|
20
21
|
checkBoundaryPolicy,
|
|
@@ -26,8 +27,10 @@ import { loadExtensionPacks } from '../extension-packs/loader.mjs'
|
|
|
26
27
|
import { inspectPackageProvenance, legacyPackageSource } from './provenance.mjs'
|
|
27
28
|
import { prepareUpgrade, applySavedUpgrade, upgradeOperationStatus, recoverUpgradeDryRun, explainSavedUpgrade } from './transaction.mjs'
|
|
28
29
|
import { renderUpgradeExplanation } from './explanation.mjs'
|
|
30
|
+
import { planConsumerClosure, runClosurePlanCommand } from './closure.mjs'
|
|
29
31
|
export { prepareUpgrade, applySavedUpgrade, upgradeOperationStatus, recoverUpgradeDryRun, explainSavedUpgrade }
|
|
30
32
|
export { prepareTemplateUpgrade } from './transaction.mjs'
|
|
33
|
+
export { planConsumerClosure }
|
|
31
34
|
|
|
32
35
|
export const ATELIER_LOCK_SCHEMA = 'mnstry.atelier-lock@v1'
|
|
33
36
|
export const ATELIER_MIGRATION_SCHEMA = 'mnstry.atelier-migration@v1'
|
|
@@ -411,13 +414,18 @@ function stagedSemanticFindings(project) {
|
|
|
411
414
|
const findings = []
|
|
412
415
|
for (const repo of project.repos ?? []) {
|
|
413
416
|
if (!isGitRepo(repo.path)) continue
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
const
|
|
417
|
-
|
|
418
|
-
.
|
|
419
|
-
|
|
420
|
-
|
|
417
|
+
// The boundary guard's pinned diff and parser; only a marker added in this
|
|
418
|
+
// change approves it, never a removed line or a file name.
|
|
419
|
+
const result = gitOutputResult(repo.path, [...canonicalDiffArgs(['--cached'], ['--text']), '--', '*.md', '*.kg.json'])
|
|
420
|
+
if (!result.ok) {
|
|
421
|
+
findings.push(`${repo.name}: staged semantic fields could not be read (${result.code})`)
|
|
422
|
+
continue
|
|
423
|
+
}
|
|
424
|
+
const sections = parseDiffSections(result.stdout, { detail: true })
|
|
425
|
+
const changedSemantic = sections.some((section) => section.incomplete
|
|
426
|
+
|| section.hunks.some((hunk) => [...hunk.added, ...hunk.removed].some((line) => SEMANTIC_FIELD_RE.test(line))))
|
|
427
|
+
const approved = sections.some((section) => section.hunks.some((hunk) => hunk.added.some((line) => REVIEW_MARKER_RE.test(line))))
|
|
428
|
+
if (changedSemantic && !approved) findings.push(`${repo.name}: staged semantic field change needs Atelier-Boundary-Review marker`)
|
|
421
429
|
}
|
|
422
430
|
return findings
|
|
423
431
|
}
|
|
@@ -683,6 +691,10 @@ export function runLockCommand(argv = process.argv.slice(2)) {
|
|
|
683
691
|
|
|
684
692
|
export function runUpgradeCommand(argv = process.argv.slice(2)) {
|
|
685
693
|
const args = parseArgs(argv)
|
|
694
|
+
// `closure` plans against an explicit npm root, which need not be an Atelier
|
|
695
|
+
// workspace. It runs before the project is resolved, writes nothing, and lets
|
|
696
|
+
// its typed refusal reach the command wrapper unchanged.
|
|
697
|
+
if (args._[0] === 'closure') return runClosurePlanCommand(args, argv)
|
|
686
698
|
const project = commandProject({ argv, writeLocalState: args._[0] !== 'explain' })
|
|
687
699
|
if (['plan', 'apply', 'status', 'recover', 'explain'].includes(args._[0])) {
|
|
688
700
|
try {
|