@bevel-software/platform-core-backend 0.25.0 → 0.26.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/agent-guide/access-control.md +234 -0
- package/agent-guide/conventions.md +27 -0
- package/agent-guide/directory-structure.md +145 -0
- package/agent-guide/finding-things.md +7 -0
- package/agent-guide/introduction.md +27 -0
- package/agent-guide/skills.md +47 -0
- package/agent-guide/tool-manuals.md +217 -0
- package/agent-guide/where-a-new-file-goes.md +36 -0
- package/dist/assets.d.ts +7 -0
- package/dist/assets.d.ts.map +1 -1
- package/dist/assets.js +9 -0
- package/dist/assets.js.map +1 -1
- package/dist/core/core-ports.d.ts +11 -0
- package/dist/core/core-ports.d.ts.map +1 -1
- package/dist/core/core-ports.js.map +1 -1
- package/dist/core/create-core-server.d.ts.map +1 -1
- package/dist/core/create-core-server.js +13 -2
- package/dist/core/create-core-server.js.map +1 -1
- package/dist/core/create-core-services.d.ts +9 -0
- package/dist/core/create-core-services.d.ts.map +1 -1
- package/dist/core/create-core-services.js +14 -4
- package/dist/core/create-core-services.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/modules/access/access-control.interface.d.ts +9 -0
- package/dist/modules/access/access-control.interface.d.ts.map +1 -1
- package/dist/modules/access/access-control.service.d.ts +1 -0
- package/dist/modules/access/access-control.service.d.ts.map +1 -1
- package/dist/modules/access/access-control.service.js +16 -0
- package/dist/modules/access/access-control.service.js.map +1 -1
- package/dist/modules/agent-guide/agent-guide.d.ts +139 -0
- package/dist/modules/agent-guide/agent-guide.d.ts.map +1 -0
- package/dist/modules/agent-guide/agent-guide.js +191 -0
- package/dist/modules/agent-guide/agent-guide.js.map +1 -0
- package/dist/modules/agent-guide/agent-guide.tools.d.ts +24 -0
- package/dist/modules/agent-guide/agent-guide.tools.d.ts.map +1 -0
- package/dist/modules/agent-guide/agent-guide.tools.js +100 -0
- package/dist/modules/agent-guide/agent-guide.tools.js.map +1 -0
- package/dist/modules/agent-guide/index.d.ts +4 -0
- package/dist/modules/agent-guide/index.d.ts.map +1 -0
- package/dist/modules/agent-guide/index.js +4 -0
- package/dist/modules/agent-guide/index.js.map +1 -0
- package/dist/modules/agent-instructions/agent-instructions.routes.d.ts +3 -2
- package/dist/modules/agent-instructions/agent-instructions.routes.d.ts.map +1 -1
- package/dist/modules/agent-instructions/agent-instructions.routes.js +3 -2
- package/dist/modules/agent-instructions/agent-instructions.routes.js.map +1 -1
- package/dist/modules/agent-instructions/compose.d.ts +9 -6
- package/dist/modules/agent-instructions/compose.d.ts.map +1 -1
- package/dist/modules/agent-instructions/compose.js +9 -6
- package/dist/modules/agent-instructions/compose.js.map +1 -1
- package/dist/modules/agent-instructions/index.d.ts +1 -1
- package/dist/modules/agent-instructions/index.d.ts.map +1 -1
- package/dist/modules/agent-instructions/index.js +1 -1
- package/dist/modules/agent-instructions/index.js.map +1 -1
- package/dist/modules/agent-instructions/shared-file-rules.d.ts +10 -50
- package/dist/modules/agent-instructions/shared-file-rules.d.ts.map +1 -1
- package/dist/modules/agent-instructions/shared-file-rules.js +32 -85
- package/dist/modules/agent-instructions/shared-file-rules.js.map +1 -1
- package/dist/modules/mcp/mcp.service.d.ts +29 -2
- package/dist/modules/mcp/mcp.service.d.ts.map +1 -1
- package/dist/modules/mcp/mcp.service.js +113 -16
- package/dist/modules/mcp/mcp.service.js.map +1 -1
- package/dist/modules/mcp/tool-schema-guard.d.ts +105 -0
- package/dist/modules/mcp/tool-schema-guard.d.ts.map +1 -0
- package/dist/modules/mcp/tool-schema-guard.js +171 -0
- package/dist/modules/mcp/tool-schema-guard.js.map +1 -0
- package/dist/modules/plugins/plugins.tools.d.ts +36 -2
- package/dist/modules/plugins/plugins.tools.d.ts.map +1 -1
- package/dist/modules/plugins/plugins.tools.js +71 -14
- package/dist/modules/plugins/plugins.tools.js.map +1 -1
- package/dist/modules/settings/deployment-settings.service.d.ts +0 -7
- package/dist/modules/settings/deployment-settings.service.d.ts.map +1 -1
- package/dist/modules/settings/deployment-settings.service.js +14 -53
- package/dist/modules/settings/deployment-settings.service.js.map +1 -1
- package/dist/modules/settings/setup.routes.d.ts.map +1 -1
- package/dist/modules/settings/setup.routes.js +3 -6
- package/dist/modules/settings/setup.routes.js.map +1 -1
- package/dist/modules/skills/skills.tools.d.ts.map +1 -1
- package/dist/modules/skills/skills.tools.js +58 -16
- package/dist/modules/skills/skills.tools.js.map +1 -1
- package/dist/modules/tool-manuals/tool-manuals.contract.d.ts +23 -4
- package/dist/modules/tool-manuals/tool-manuals.contract.d.ts.map +1 -1
- package/dist/modules/tool-manuals/tool-manuals.contract.js.map +1 -1
- package/dist/modules/tool-manuals/tool-manuals.service.d.ts +4 -0
- package/dist/modules/tool-manuals/tool-manuals.service.d.ts.map +1 -1
- package/dist/modules/tool-manuals/tool-manuals.service.js +14 -0
- package/dist/modules/tool-manuals/tool-manuals.service.js.map +1 -1
- package/dist/modules/tool-manuals/tool-manuals.tools.d.ts +7 -0
- package/dist/modules/tool-manuals/tool-manuals.tools.d.ts.map +1 -1
- package/dist/modules/tool-manuals/tool-manuals.tools.js +66 -36
- package/dist/modules/tool-manuals/tool-manuals.tools.js.map +1 -1
- package/dist/modules/tool-registry/description-length.d.ts +14 -14
- package/dist/modules/tool-registry/description-length.d.ts.map +1 -1
- package/dist/modules/tool-registry/description-length.js +24 -26
- package/dist/modules/tool-registry/description-length.js.map +1 -1
- package/dist/modules/tool-registry/guide-first.d.ts +23 -0
- package/dist/modules/tool-registry/guide-first.d.ts.map +1 -0
- package/dist/modules/tool-registry/guide-first.js +32 -0
- package/dist/modules/tool-registry/guide-first.js.map +1 -0
- package/dist/modules/tool-registry/tool-registry.d.ts +6 -0
- package/dist/modules/tool-registry/tool-registry.d.ts.map +1 -1
- package/dist/modules/tool-registry/tool-registry.js +9 -2
- package/dist/modules/tool-registry/tool-registry.js.map +1 -1
- package/dist/modules/workflow/agent-tools/change-request-read-shape.d.ts +449 -0
- package/dist/modules/workflow/agent-tools/change-request-read-shape.d.ts.map +1 -0
- package/dist/modules/workflow/agent-tools/change-request-read-shape.js +481 -0
- package/dist/modules/workflow/agent-tools/change-request-read-shape.js.map +1 -0
- package/dist/modules/workflow/agent-tools/change-request-read.tools.d.ts +73 -0
- package/dist/modules/workflow/agent-tools/change-request-read.tools.d.ts.map +1 -0
- package/dist/modules/workflow/agent-tools/change-request-read.tools.js +582 -0
- package/dist/modules/workflow/agent-tools/change-request-read.tools.js.map +1 -0
- package/dist/modules/workflow/agent-tools/change-request-summary.d.ts +12 -1
- package/dist/modules/workflow/agent-tools/change-request-summary.d.ts.map +1 -1
- package/dist/modules/workflow/agent-tools/change-request-summary.js +5 -1
- package/dist/modules/workflow/agent-tools/change-request-summary.js.map +1 -1
- package/dist/modules/workflow/agent-tools/workflow.tools.d.ts.map +1 -1
- package/dist/modules/workflow/agent-tools/workflow.tools.js +9 -0
- package/dist/modules/workflow/agent-tools/workflow.tools.js.map +1 -1
- package/dist/modules/workflow/git/git.service.d.ts +210 -13
- package/dist/modules/workflow/git/git.service.d.ts.map +1 -1
- package/dist/modules/workflow/git/git.service.js +456 -91
- package/dist/modules/workflow/git/git.service.js.map +1 -1
- package/dist/modules/workflow/git/merge-commit.d.ts +73 -0
- package/dist/modules/workflow/git/merge-commit.d.ts.map +1 -0
- package/dist/modules/workflow/git/merge-commit.js +89 -0
- package/dist/modules/workflow/git/merge-commit.js.map +1 -0
- package/dist/modules/workflow/git/pull-request.service.d.ts +94 -1
- package/dist/modules/workflow/git/pull-request.service.d.ts.map +1 -1
- package/dist/modules/workflow/git/pull-request.service.js +332 -37
- package/dist/modules/workflow/git/pull-request.service.js.map +1 -1
- package/dist/modules/workflow/review-workflow/review-workflow.service.d.ts +35 -0
- package/dist/modules/workflow/review-workflow/review-workflow.service.d.ts.map +1 -1
- package/dist/modules/workflow/review-workflow/review-workflow.service.js +178 -12
- package/dist/modules/workflow/review-workflow/review-workflow.service.js.map +1 -1
- package/dist/modules/workflow/workflow.routes.d.ts +6 -2
- package/dist/modules/workflow/workflow.routes.d.ts.map +1 -1
- package/dist/modules/workflow/workflow.routes.js +7 -2
- package/dist/modules/workflow/workflow.routes.js.map +1 -1
- package/dist/modules/workflow/workflow.service.d.ts +4 -0
- package/dist/modules/workflow/workflow.service.d.ts.map +1 -1
- package/dist/modules/workflow/workflow.service.js +3 -0
- package/dist/modules/workflow/workflow.service.js.map +1 -1
- package/dist/modules/workspace/startup/kb-startup-runner.d.ts +70 -0
- package/dist/modules/workspace/startup/kb-startup-runner.d.ts.map +1 -1
- package/dist/modules/workspace/startup/kb-startup-runner.js +213 -20
- package/dist/modules/workspace/startup/kb-startup-runner.js.map +1 -1
- package/dist/modules/workspace/startup/steps/seed-tree.d.ts.map +1 -1
- package/dist/modules/workspace/startup/steps/seed-tree.js +22 -27
- package/dist/modules/workspace/startup/steps/seed-tree.js.map +1 -1
- package/dist/modules/workspace/startup/steps/template-files.step.d.ts +58 -52
- package/dist/modules/workspace/startup/steps/template-files.step.d.ts.map +1 -1
- package/dist/modules/workspace/startup/steps/template-files.step.js +209 -223
- package/dist/modules/workspace/startup/steps/template-files.step.js.map +1 -1
- package/dist/modules/workspace/startup/steps/template-source.d.ts +5 -3
- package/dist/modules/workspace/startup/steps/template-source.d.ts.map +1 -1
- package/dist/modules/workspace/startup/steps/template-source.js +5 -3
- package/dist/modules/workspace/startup/steps/template-source.js.map +1 -1
- package/dist/modules/workspace/workspace.tools.d.ts +10 -1
- package/dist/modules/workspace/workspace.tools.d.ts.map +1 -1
- package/dist/modules/workspace/workspace.tools.js +211 -18
- package/dist/modules/workspace/workspace.tools.js.map +1 -1
- package/dist/shared/domain-errors.d.ts +11 -0
- package/dist/shared/domain-errors.d.ts.map +1 -1
- package/dist/shared/domain-errors.js +14 -0
- package/dist/shared/domain-errors.js.map +1 -1
- package/dist/shared/hidden-tools.d.ts +44 -0
- package/dist/shared/hidden-tools.d.ts.map +1 -0
- package/dist/shared/hidden-tools.js +13 -0
- package/dist/shared/hidden-tools.js.map +1 -0
- package/kb-template/.bevelignore +0 -5
- package/package.json +4 -3
- package/src/__tests__/kb-layout-config.test.ts +10 -100
- package/src/__tests__/packaged-assets-ship.test.ts +54 -0
- package/src/assets.ts +10 -0
- package/src/core/core-ports.ts +11 -0
- package/src/core/create-core-server.ts +13 -2
- package/src/core/create-core-services.ts +28 -4
- package/src/index.ts +2 -2
- package/src/modules/access/__tests__/access-control.atref-batch.test.ts +58 -0
- package/src/modules/access/__tests__/access-control.platform-restore.test.ts +8 -7
- package/src/modules/access/__tests__/access-personal-plugin.test.ts +1 -18
- package/src/modules/access/access-control.interface.ts +15 -0
- package/src/modules/access/access-control.service.ts +21 -0
- package/src/modules/agent-guide/__tests__/agent-guide.test.ts +328 -0
- package/src/modules/agent-guide/__tests__/agent-guide.tools.test.ts +189 -0
- package/src/modules/agent-guide/agent-guide.tools.ts +122 -0
- package/src/modules/agent-guide/agent-guide.ts +291 -0
- package/src/modules/agent-guide/index.ts +21 -0
- package/src/modules/agent-instructions/__tests__/shared-file-rules.test.ts +28 -121
- package/src/modules/agent-instructions/agent-instructions.routes.ts +3 -2
- package/src/modules/agent-instructions/compose.ts +9 -6
- package/src/modules/agent-instructions/index.ts +0 -3
- package/src/modules/agent-instructions/shared-file-rules.ts +31 -93
- package/src/modules/mcp/__tests__/fake-downstream-mcp-server.ts +14 -3
- package/src/modules/mcp/__tests__/mcp.e2e.test.ts +250 -0
- package/src/modules/mcp/__tests__/mcp.service.test.ts +31 -23
- package/src/modules/mcp/__tests__/tool-schema-guard.test.ts +266 -0
- package/src/modules/mcp/mcp.service.ts +137 -19
- package/src/modules/mcp/tool-schema-guard.ts +196 -0
- package/src/modules/plugins/__tests__/plugins.tools.test.ts +154 -4
- package/src/modules/plugins/plugins.tools.ts +75 -15
- package/src/modules/settings/__tests__/deployment-settings.service.test.ts +26 -55
- package/src/modules/settings/deployment-settings.service.ts +13 -54
- package/src/modules/settings/setup.routes.ts +3 -6
- package/src/modules/skills/__tests__/skills.tools.description.test.ts +91 -0
- package/src/modules/skills/skills.tools.ts +62 -16
- package/src/modules/tool-manuals/__tests__/tool-manuals.detail.route.test.ts +57 -0
- package/src/modules/tool-manuals/__tests__/tool-manuals.tools.test.ts +73 -4
- package/src/modules/tool-manuals/tool-manuals.contract.ts +24 -4
- package/src/modules/tool-manuals/tool-manuals.service.ts +17 -0
- package/src/modules/tool-manuals/tool-manuals.tools.ts +74 -36
- package/src/modules/tool-registry/__tests__/own-tool-schemas.test.ts +160 -0
- package/src/modules/tool-registry/__tests__/tool-description-length.test.ts +61 -59
- package/src/modules/tool-registry/description-length.ts +24 -26
- package/src/modules/tool-registry/guide-first.ts +34 -0
- package/src/modules/tool-registry/tool-registry.ts +9 -2
- package/src/modules/workflow/__tests__/apply-failure.test.ts +6 -1
- package/src/modules/workflow/agent-tools/__tests__/change-request-read-shape.test.ts +705 -0
- package/src/modules/workflow/agent-tools/__tests__/change-request-read.tools.test.ts +1518 -0
- package/src/modules/workflow/agent-tools/__tests__/workflow.tools.test.ts +23 -2
- package/src/modules/workflow/agent-tools/change-request-read-shape.ts +712 -0
- package/src/modules/workflow/agent-tools/change-request-read.tools.ts +724 -0
- package/src/modules/workflow/agent-tools/change-request-summary.ts +5 -1
- package/src/modules/workflow/agent-tools/workflow.tools.ts +8 -0
- package/src/modules/workflow/git/__tests__/git.service.appliedChange.test.ts +285 -0
- package/src/modules/workflow/git/__tests__/git.service.changedFilesForPr.test.ts +124 -0
- package/src/modules/workflow/git/__tests__/git.service.mergeChangeRequest.test.ts +334 -0
- package/src/modules/workflow/git/__tests__/pull-request.service.list-fetch.test.ts +72 -2
- package/src/modules/workflow/git/__tests__/pull-request.service.placeholder.test.ts +24 -2
- package/src/modules/workflow/git/__tests__/pull-request.service.test.ts +620 -1
- package/src/modules/workflow/git/git.service.ts +537 -94
- package/src/modules/workflow/git/merge-commit.ts +88 -0
- package/src/modules/workflow/git/pull-request.service.ts +380 -54
- package/src/modules/workflow/review-workflow/__tests__/approval-states.test.ts +7 -1
- package/src/modules/workflow/review-workflow/__tests__/merge-records-own-commit.test.ts +407 -0
- package/src/modules/workflow/review-workflow/review-workflow.service.ts +189 -11
- package/src/modules/workflow/workflow.routes.ts +7 -2
- package/src/modules/workflow/workflow.service.ts +7 -0
- package/src/modules/workspace/__tests__/escape-sequences.routes.test.ts +4 -3
- package/src/modules/workspace/__tests__/workspace.routes.move-platform-files.test.ts +21 -10
- package/src/modules/workspace/__tests__/workspace.tools.agents-file.test.ts +33 -55
- package/src/modules/workspace/__tests__/workspace.tools.test.ts +255 -22
- package/src/modules/workspace/startup/__tests__/kb-startup-runner.test.ts +231 -1
- package/src/modules/workspace/startup/kb-startup-runner.ts +216 -19
- package/src/modules/workspace/startup/steps/__tests__/steps.test.ts +191 -489
- package/src/modules/workspace/startup/steps/seed-tree.ts +21 -27
- package/src/modules/workspace/startup/steps/template-files.step.ts +217 -249
- package/src/modules/workspace/startup/steps/template-source.ts +5 -3
- package/src/modules/workspace/workspace.tools.ts +226 -16
- package/src/shared/domain-errors.ts +15 -0
- package/src/shared/hidden-tools.ts +45 -0
- package/kb-template/AGENTS.md +0 -730
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { type KbLayout } from '@bevel-software/platform-shared';
|
|
2
2
|
import { type IFsProbe } from '../../../../shared/fs.contract.js';
|
|
3
3
|
import type { KbContext } from '../../../../shared/kb-context.js';
|
|
4
|
+
import { isManagedGuide } from '../../../agent-guide/agent-guide.js';
|
|
4
5
|
import type { OnServerStart, ServerStartContext, StepResult } from '../on-server-start.js';
|
|
6
|
+
export { isManagedGuide };
|
|
5
7
|
/**
|
|
6
8
|
* The **required scaffolding** — the minimum an operational KB needs. Any of
|
|
7
9
|
* these missing from a protected branch are added at the startup phase; the
|
|
@@ -17,11 +19,11 @@ import type { OnServerStart, ServerStartContext, StepResult } from '../on-server
|
|
|
17
19
|
*
|
|
18
20
|
* `roles.yaml` is in neither, and is not part of the template at all: it is
|
|
19
21
|
* generated from `ADMIN_EMAIL` (see roles-yaml.step.ts), so a repo can't be
|
|
20
|
-
* seeded with a stale hard-coded Admin list.
|
|
22
|
+
* seeded with a stale hard-coded Admin list. The agent guide is in neither
|
|
23
|
+
* either, any more: it is served from code (see modules/agent-guide), and the
|
|
24
|
+
* copies earlier releases wrote are REMOVED here, not refreshed.
|
|
21
25
|
*/
|
|
22
|
-
export declare function requiredFiles(
|
|
23
|
-
/** Whether `text` is a copy of the platform's managed guide, of any vintage. */
|
|
24
|
-
export declare function isManagedGuide(text: string): boolean;
|
|
26
|
+
export declare function requiredFiles(_layout: Required<KbLayout>): readonly string[];
|
|
25
27
|
/**
|
|
26
28
|
* Repo-root files the startup phase GENERATES rather than copies — today just
|
|
27
29
|
* `roles.yaml`, rendered from `ADMIN_EMAIL` (see roles-yaml.step.ts and
|
|
@@ -42,13 +44,16 @@ export declare const GENERATED_FILES: readonly string[];
|
|
|
42
44
|
export declare function reservedRootDirs(extraRootDirs: readonly string[], layout: Required<KbLayout>): readonly string[];
|
|
43
45
|
/**
|
|
44
46
|
* The template top-up as an {@link OnServerStart} step: add any missing base
|
|
45
|
-
* scaffolding to every PROTECTED branch, and
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
47
|
+
* scaffolding to every PROTECTED branch, and take the agent guide copies
|
|
48
|
+
* earlier releases wrote OUT of them — the guide is served from code now, and
|
|
49
|
+
* a copy left on disk would be read as the organisation's own conventions
|
|
50
|
+
* file, stale and under a header that says the platform owns it. Drafts are
|
|
51
|
+
* deliberately out of scope — whatever the protected branches gain, drafts
|
|
52
|
+
* fork from; a scaffolding addition on a draft would surface as noise in its
|
|
53
|
+
* change request's diff. (Unlike the Groups→Plugins rename, a missing file
|
|
54
|
+
* diffs as one file, not the whole tree — so the uniform-application argument
|
|
55
|
+
* does not bite here. A stale guide copy on a draft is recognised by its
|
|
56
|
+
* header and never served, see `modules/agent-guide`.)
|
|
52
57
|
*
|
|
53
58
|
* Everything is DECLARED on the branch handle; reads go against the pre-step
|
|
54
59
|
* tree via `repoDir()`. Fail-open behavior from the lazy top-up (best-effort,
|
|
@@ -65,7 +70,6 @@ export declare class TemplateFilesStep implements OnServerStart {
|
|
|
65
70
|
*/
|
|
66
71
|
private readonly kb;
|
|
67
72
|
private readonly extraRootDirs;
|
|
68
|
-
private readonly agentsFileLink;
|
|
69
73
|
readonly name = "template-files";
|
|
70
74
|
/**
|
|
71
75
|
* @param extraRootDirs Additional root folders this distribution reserves,
|
|
@@ -74,45 +78,39 @@ export declare class TemplateFilesStep implements OnServerStart {
|
|
|
74
78
|
* claim a root without also shipping a template entry
|
|
75
79
|
* for it.
|
|
76
80
|
*/
|
|
77
|
-
/**
|
|
78
|
-
* @param agentsFileLink Whether to keep the platform's pointer sentence in a
|
|
79
|
-
* customer-owned root `AGENTS.md` — a GETTER, because
|
|
80
|
-
* the setting behind it may be saved by the very
|
|
81
|
-
* first-run save that then runs this phase.
|
|
82
|
-
*/
|
|
83
81
|
constructor(disk: IFsProbe,
|
|
84
82
|
/**
|
|
85
83
|
* Read per run, never captured: the save that completes first-run setup
|
|
86
84
|
* applies the admin's names after this step was built. A snapshot taken
|
|
87
85
|
* here scaffolded `Skills/` beside the `skills/` they had just chosen.
|
|
88
86
|
*/
|
|
89
|
-
kb: Pick<KbContext, 'layout'>, extraRootDirs?: readonly string[]
|
|
87
|
+
kb: Pick<KbContext, 'layout'>, extraRootDirs?: readonly string[]);
|
|
90
88
|
run(ctx: ServerStartContext): Promise<StepResult>;
|
|
91
89
|
private topUp;
|
|
92
90
|
/**
|
|
93
|
-
* The
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
* Removal is gated on the managed header and nothing else. An admin who
|
|
99
|
-
* renames the guide on a knowledge base the platform seeded would otherwise
|
|
100
|
-
* be left with stale platform content sitting under the very name they
|
|
101
|
-
* wanted for their own file; an admin who renames it on a repository whose
|
|
102
|
-
* `AGENTS.md` is their own must find that file byte-for-byte untouched. The
|
|
103
|
-
* header is the one fact that tells the two apart, so it is the one thing
|
|
104
|
-
* asked.
|
|
91
|
+
* The copies of the guide the platform wrote to the repository root while
|
|
92
|
+
* the guide was a file — under `AGENTS.md`, under `CLAUDE.md` from before
|
|
93
|
+
* the rename, and under every name a deployment ever gave the guide —
|
|
94
|
+
* removed when the platform can PROVE it wrote them, and otherwise left
|
|
95
|
+
* exactly alone.
|
|
105
96
|
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
*
|
|
97
|
+
* Found by SCANNING the root's markdown files rather than by the names the
|
|
98
|
+
* deployment knows today: a deployment that renamed the guide more than
|
|
99
|
+
* once left a copy under each earlier name, and the current setting
|
|
100
|
+
* remembers only the last. The header is what makes a scan safe, and the
|
|
101
|
+
* one fact that tells a copy of ours from a file of theirs: the
|
|
102
|
+
* organisation's own `AGENTS.md`, a `CLAUDE.md` its people edited, a note
|
|
103
|
+
* of theirs that happens to sit at the root, must all be found byte for
|
|
104
|
+
* byte untouched. A SYMLINK or a directory is left as it is: reading a link
|
|
105
|
+
* follows it, so a link pointing at a copy of the guide — or at any other
|
|
106
|
+
* file carrying the header — would read as ours and the removal would take
|
|
107
|
+
* the organisation's entry. Links are never followed anywhere else in the
|
|
108
|
+
* platform, and they are not followed here.
|
|
112
109
|
*
|
|
113
|
-
* Returns the
|
|
110
|
+
* Returns the names removed, in name order, for the note and for the
|
|
111
|
+
* ignore rules that hid them.
|
|
114
112
|
*/
|
|
115
|
-
private
|
|
113
|
+
private retireGuideCopies;
|
|
116
114
|
/**
|
|
117
115
|
* Which reserved roots are absent — and which are SQUATTED. `lstat`, not
|
|
118
116
|
* `exists`: `fs.access` answers "is there something here?", which is true of
|
|
@@ -167,23 +165,31 @@ export declare class TemplateFilesStep implements OnServerStart {
|
|
|
167
165
|
* branches this step never visits (drafts).
|
|
168
166
|
*/
|
|
169
167
|
export declare function withoutIgnoreLine(text: string, pattern: string): string;
|
|
168
|
+
/**
|
|
169
|
+
* `text` without the rules THE PLATFORM WROTE to hide the guide while it was a
|
|
170
|
+
* file. Under WHATEVER name: every rule sitting directly under one of the two
|
|
171
|
+
* comments the platform wrote above the guide's rule
|
|
172
|
+
* ({@link withoutPlatformConventionsRules}) — the name a deployment saved for
|
|
173
|
+
* the guide is not read any more, so the rule for it is known by its comment
|
|
174
|
+
* and by nothing else. Then the two names the template itself shipped a rule
|
|
175
|
+
* for, under each of `names`: the `AGENTS.md` line in the slot at the end of
|
|
176
|
+
* the template's own repo-hygiene block
|
|
177
|
+
* ({@link TEMPLATE_HYGIENE_BLOCK_ABOVE_AGENTS_RULE}) and the `CLAUDE.md` line
|
|
178
|
+
* under the two-line comment the template carried it with. Each goes with
|
|
179
|
+
* its comment.
|
|
180
|
+
*
|
|
181
|
+
* The guide is not on disk any more, which is what makes every one of these
|
|
182
|
+
* lines wrong: it hides a file the platform never writes, which is therefore
|
|
183
|
+
* the organisation's own. A `!AGENTS.md` negation is not the rule and stays,
|
|
184
|
+
* as everywhere else here, and so does a bare rule an operator wrote by hand.
|
|
185
|
+
*/
|
|
186
|
+
export declare function withoutPlatformGuideRules(text: string, names: readonly string[]): string;
|
|
170
187
|
/**
|
|
171
188
|
* `text` without the `AGENTS.md` line THE PLATFORM WROTE — under its own
|
|
172
189
|
* comment (either spelling), or in the slot at the end of the template's own
|
|
173
190
|
* repo-hygiene block ({@link TEMPLATE_HYGIENE_BLOCK_ABOVE_AGENTS_RULE}) — and
|
|
174
|
-
* without that comment.
|
|
175
|
-
*
|
|
176
|
-
* Called only when the guide has been renamed, which is what makes the line
|
|
177
|
-
* wrong: it hides a file the platform no longer owns. A `!AGENTS.md` negation
|
|
178
|
-
* is not the rule and stays, as everywhere else here.
|
|
191
|
+
* without that comment. A `!AGENTS.md` negation is not the rule and stays, as
|
|
192
|
+
* everywhere else here.
|
|
179
193
|
*/
|
|
180
194
|
export declare function withoutPlatformAgentsRule(text: string): string;
|
|
181
|
-
/**
|
|
182
|
-
* `text` with the platform's pointer sentence appended as its own paragraph.
|
|
183
|
-
*
|
|
184
|
-
* One blank line between the customer's last line and ours, whether or not
|
|
185
|
-
* their file ended in a newline: a sentence glued onto the end of their last
|
|
186
|
-
* paragraph would read as a continuation of something they wrote.
|
|
187
|
-
*/
|
|
188
|
-
export declare function withPointerSentence(text: string, agentsFile: string): string;
|
|
189
195
|
//# sourceMappingURL=template-files.step.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template-files.step.d.ts","sourceRoot":"","sources":["../../../../../src/modules/workspace/startup/steps/template-files.step.ts"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"template-files.step.d.ts","sourceRoot":"","sources":["../../../../../src/modules/workspace/startup/steps/template-files.step.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,QAAQ,EACd,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAA8B,KAAK,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAC9F,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAElE,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAErE,OAAO,KAAK,EAAY,aAAa,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAGrG,OAAO,EAAE,cAAc,EAAE,CAAC;AAY1B;;;;;;;;;;;;;;;;;;GAkBG;AAEH,wBAAgB,aAAa,CAAC,OAAO,EAAE,QAAQ,CAAC,QAAQ,CAAC,GAAG,SAAS,MAAM,EAAE,CAW5E;AAED;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,EAAE,SAAS,MAAM,EAAmB,CAAC;AA8CjE;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,aAAa,EAAE,SAAS,MAAM,EAAE,EAAE,MAAM,EAAE,QAAQ,CAAC,QAAQ,CAAC,GAAG,SAAS,MAAM,EAAE,CAchH;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,iBAAkB,YAAW,aAAa;IAWnD,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB;;;;OAIG;IACH,OAAO,CAAC,QAAQ,CAAC,EAAE;IACnB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAjBhC,QAAQ,CAAC,IAAI,oBAAoB;IAEjC;;;;;;OAMG;gBAEgB,IAAI,EAAE,QAAQ;IAC/B;;;;OAIG;IACc,EAAE,EAAE,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,EAC7B,aAAa,GAAE,SAAS,MAAM,EAAO;IAOlD,GAAG,CAAC,GAAG,EAAE,kBAAkB,GAAG,OAAO,CAAC,UAAU,CAAC;YAOzC,KAAK;IAqInB;;;;;;;;;;;;;;;;;;;;;;OAsBG;YACW,iBAAiB;IAyB/B;;;;;;;;;;OAUG;YACW,WAAW;IAiBzB;;;;;OAKG;IACH,OAAO,CAAC,kBAAkB;IAS1B;;;;;;;;;;;;;;;OAeG;YACW,oBAAoB;CAuCnC;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAcvE;AAwCD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAOxF;AAiED;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAwB9D"}
|