@guiho/mirror 3.0.0-alpha.9 → 3.1.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/library/config.js CHANGED
@@ -2,8 +2,10 @@
2
2
  * @copyright Copyright (c) 2026 GUIHO Technologies as represented by Cristóvão GUIHO. All Rights Reserved.
3
3
  */
4
4
  import { existsSync } from 'node:fs';
5
+ import { readFile, writeFile } from 'node:fs/promises';
5
6
  import { basename, isAbsolute, join, relative, resolve } from 'node:path';
6
- import { MirrorError } from './errors';
7
+ import { parse as parseToml } from 'smol-toml';
8
+ import { MirrorError } from './errors.js';
7
9
  const adapters = new Set(['package.json', 'jsr.json', 'git']);
8
10
  const projectNameSources = new Set(['package.json', 'jsr.json']);
9
11
  export const resolveMirrorPath = (cwd, path) => (isAbsolute(path) ? path : resolve(cwd, path));
@@ -27,7 +29,15 @@ export const discoverMirrorConfig = async (cwd, explicitPath) => {
27
29
  export const readConfigFile = async (path) => {
28
30
  if (!existsSync(path))
29
31
  throw new MirrorError(`Configuration file not found: ${path}`);
30
- const parsed = Bun.TOML.parse(await Bun.file(path).text());
32
+ const content = await readFile(path, 'utf8');
33
+ let parsed;
34
+ try {
35
+ parsed = parseToml(content);
36
+ }
37
+ catch (error) {
38
+ const message = error instanceof Error ? error.message : String(error);
39
+ throw new MirrorError(`Invalid TOML in configuration file: ${path}\n${message}`);
40
+ }
31
41
  if (!isRecord(parsed))
32
42
  throw new MirrorError(`Configuration file must contain a TOML object: ${path}`);
33
43
  return parsed;
@@ -57,6 +67,10 @@ export const normalizeMirrorConfig = (raw, cwd, configPath, options = {}) => {
57
67
  const gitCommit = optionalBoolean(raw.git?.commit, 'git.commit') === true;
58
68
  const gitPush = optionalBoolean(raw.git?.push, 'git.push') === true;
59
69
  const gitAllowDirty = optionalBoolean(raw.git?.allow_dirty, 'git.allow_dirty') === true;
70
+ const writeChangelog = optionalBoolean(raw.agents?.write_changelog, 'agents.write_changelog') !== false;
71
+ const changelogPath = optionalString(raw.agents?.changelog_path, 'agents.changelog_path') ?? 'CHANGELOG.md';
72
+ const autoAgentsMd = optionalBoolean(raw.agents?.auto_agents_md, 'agents.auto_agents_md') !== false;
73
+ const autoSkillInstall = optionalBoolean(raw.agents?.auto_skill_install, 'agents.auto_skill_install') !== false;
60
74
  return {
61
75
  schema: 1,
62
76
  cwd,
@@ -83,6 +97,12 @@ export const normalizeMirrorConfig = (raw, cwd, configPath, options = {}) => {
83
97
  push: options.push === true || gitPush,
84
98
  allowDirty: options.allowDirty === true || gitAllowDirty,
85
99
  },
100
+ agents: {
101
+ writeChangelog,
102
+ changelogPath,
103
+ autoAgentsMd,
104
+ autoSkillInstall,
105
+ },
86
106
  };
87
107
  };
88
108
  export const createInitConfig = (kind, cwd) => {
@@ -110,6 +130,12 @@ tag_template = "{name}@{version}"
110
130
  commit = false
111
131
  push = false
112
132
  allow_dirty = false
133
+
134
+ [agents]
135
+ write_changelog = true
136
+ changelog_path = "CHANGELOG.md"
137
+ auto_agents_md = true
138
+ auto_skill_install = true
113
139
  `;
114
140
  }
115
141
  if (kind === 'jsr.json') {
@@ -132,6 +158,12 @@ tag_template = "{name}@{version}"
132
158
  commit = false
133
159
  push = false
134
160
  allow_dirty = false
161
+
162
+ [agents]
163
+ write_changelog = true
164
+ changelog_path = "CHANGELOG.md"
165
+ auto_agents_md = true
166
+ auto_skill_install = true
135
167
  `;
136
168
  }
137
169
  return `schema = 1
@@ -150,13 +182,19 @@ tag_template = "v{version}"
150
182
  commit = false
151
183
  push = false
152
184
  allow_dirty = false
185
+
186
+ [agents]
187
+ write_changelog = true
188
+ changelog_path = "CHANGELOG.md"
189
+ auto_agents_md = true
190
+ auto_skill_install = true
153
191
  `;
154
192
  };
155
193
  export const writeInitConfig = async (kind, cwd, overwrite = false) => {
156
194
  const path = join(cwd, 'mirror.config.toml');
157
195
  if (existsSync(path) && !overwrite)
158
196
  throw new MirrorError(`Configuration already exists: ${path}`);
159
- await Bun.write(path, createInitConfig(kind, cwd));
197
+ await writeFile(path, createInitConfig(kind, cwd), 'utf8');
160
198
  return path;
161
199
  };
162
200
  export const configPathForDisplay = (config) => (config.configPath ? relativeFromCwd(config.cwd, config.configPath) : '(none)');
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @copyright Copyright (c) 2026 GUIHO Technologies as represented by Cristóvão GUIHO. All Rights Reserved.
3
3
  */
4
- import type { MirrorCliOptions, MirrorExecutionResult } from './types';
4
+ import type { MirrorCliOptions, MirrorExecutionResult } from './types.js';
5
5
  export declare const applyVersionPlan: (target: string, options?: MirrorCliOptions) => Promise<MirrorExecutionResult>;
6
6
  export declare const executeVersionPlan: (plan: MirrorExecutionResult["plan"], options?: MirrorCliOptions) => Promise<MirrorExecutionResult>;
7
7
  //# sourceMappingURL=executor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../source/executor.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAMtE,eAAO,MAAM,gBAAgB,GAAU,QAAQ,MAAM,EAAE,UAAS,gBAAqB,KAAG,OAAO,CAAC,qBAAqB,CAIpH,CAAA;AAED,eAAO,MAAM,kBAAkB,GAC7B,MAAM,qBAAqB,CAAC,MAAM,CAAC,EACnC,UAAS,gBAAqB,KAC7B,OAAO,CAAC,qBAAqB,CAmB/B,CAAA"}
1
+ {"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../source/executor.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AAMzE,eAAO,MAAM,gBAAgB,GAAU,QAAQ,MAAM,EAAE,UAAS,gBAAqB,KAAG,OAAO,CAAC,qBAAqB,CAIpH,CAAA;AAED,eAAO,MAAM,kBAAkB,GAC7B,MAAM,qBAAqB,CAAC,MAAM,CAAC,EACnC,UAAS,gBAAqB,KAC7B,OAAO,CAAC,qBAAqB,CAmB/B,CAAA"}
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * @copyright Copyright (c) 2026 GUIHO Technologies as represented by Cristóvão GUIHO. All Rights Reserved.
3
3
  */
4
- import { MirrorError } from './errors';
5
- import { createGitCommit, createGitTag, isGitDirty, isGitRepository, pushGitRefs, writeJsrVersion, writePackageVersion } from './adapters';
6
- import { loadMirrorConfig } from './config';
7
- import { buildVersionPlan } from './plan';
4
+ import { MirrorError } from './errors.js';
5
+ import { createGitCommit, createGitTag, isGitDirty, isGitRepository, pushGitRefs, writeJsrVersion, writePackageVersion } from './adapters.js';
6
+ import { loadMirrorConfig } from './config.js';
7
+ import { buildVersionPlan } from './plan.js';
8
8
  export const applyVersionPlan = async (target, options = {}) => {
9
9
  const plan = await buildVersionPlan(target, options);
10
10
  return executeVersionPlan(plan, options);
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @copyright Copyright (c) 2026 GUIHO Technologies as represented by Cristóvão GUIHO. All Rights Reserved.
3
3
  */
4
- import type { MirrorCliOptions } from './types';
4
+ import type { MirrorCliOptions } from './types.js';
5
5
  export declare const parseMirrorCliOptions: (rawArgs: string[]) => MirrorCliOptions;
6
6
  //# sourceMappingURL=flags.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"flags.d.ts","sourceRoot":"","sources":["../source/flags.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAqB,gBAAgB,EAAgB,MAAM,SAAS,CAAA;AAehF,eAAO,MAAM,qBAAqB,GAAI,SAAS,MAAM,EAAE,KAAG,gBAuDzD,CAAA"}
1
+ {"version":3,"file":"flags.d.ts","sourceRoot":"","sources":["../source/flags.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAqB,gBAAgB,EAAgB,MAAM,YAAY,CAAA;AAenF,eAAO,MAAM,qBAAqB,GAAI,SAAS,MAAM,EAAE,KAAG,gBAuDzD,CAAA"}
package/library/flags.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @copyright Copyright (c) 2026 GUIHO Technologies as represented by Cristóvão GUIHO. All Rights Reserved.
3
3
  */
4
- import { MirrorError } from './errors';
4
+ import { MirrorError } from './errors.js';
5
5
  const booleanFlags = new Set(['dry-run', 'commit', 'push', 'allow-dirty', 'yes', 'no-color', 'verbose', 'help', 'version']);
6
6
  const adapterNames = new Set(['package.json', 'jsr.json', 'git']);
7
7
  const shortFlagAliases = {
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env bun
1
+ #!/usr/bin/env node
2
2
  /**
3
3
  * @copyright Copyright (c) 2026 GUIHO Technologies as represented by Cristóvão GUIHO. All Rights Reserved.
4
4
  */
@@ -1,6 +1,6 @@
1
- #!/usr/bin/env bun
1
+ #!/usr/bin/env node
2
2
  /**
3
3
  * @copyright Copyright (c) 2026 GUIHO Technologies as represented by Cristóvão GUIHO. All Rights Reserved.
4
4
  */
5
- import { runMirrorCli } from './guiho-mirror';
5
+ import { runMirrorCli } from './guiho-mirror.js';
6
6
  await runMirrorCli();
@@ -1,14 +1,15 @@
1
1
  /**
2
2
  * @copyright Copyright (c) 2026 GUIHO Technologies as represented by Cristóvão GUIHO. All Rights Reserved.
3
3
  */
4
- export type { MirrorAdapterName, MirrorCliOptions, MirrorConfig, MirrorExecutionResult, MirrorFormat, MirrorRawConfig, MirrorVersionPlan, MirrorVersionPlanAction, MirrorVersionTarget, } from './types';
5
- export { MirrorError, invariant } from './errors';
6
- export { parseMirrorCliOptions } from './flags';
7
- export { createInitConfig, discoverMirrorConfig, loadMirrorConfig, normalizeMirrorConfig, writeInitConfig } from './config';
8
- export { assertValidSemver, isMirrorReleaseTarget, mirrorReleaseTargets, resolveNextVersion, sortSemverDescending } from './version';
9
- export { createGitCommit, createGitTag, ensureAdapterFiles, assertSupportedGitTagTemplate, isGitDirty, isGitRepository, readCurrentVersion, readGitVersion, readJsrName, readJsrVersion, readPackageName, readPackageVersion, renderGitTag, resolveProjectName, supportedGitTagTemplates, versionFromTag, writeJsrVersion, writePackageVersion, } from './adapters';
10
- export { buildVersionPlan, releaseLabel, resolveFileOutputPaths, validateMirrorConfig } from './plan';
11
- export { applyVersionPlan, executeVersionPlan } from './executor';
12
- export { mirrorBanner, reportConfig, reportConfigSchema, reportExecution, reportExecutionSummary, reportPlan, reportValue } from './reporter';
13
- export { createMirrorCommand, runMirrorCli } from './cli';
4
+ export type { MirrorAdapterName, MirrorCliOptions, MirrorConfig, MirrorExecutionResult, MirrorFormat, MirrorAgentAutomationResult, MirrorAgentSettings, MirrorAgentsInstructionsResult, MirrorRawConfig, MirrorSkillInstallResult, MirrorSkillInstallScope, MirrorVersionPlan, MirrorVersionPlanAction, MirrorVersionTarget, } from './types.js';
5
+ export { MirrorError, invariant } from './errors.js';
6
+ export { parseMirrorCliOptions } from './flags.js';
7
+ export { defaultMirrorAgentSettings, ensureMirrorAgentsInstructions, findAgentsFile, installMirrorSkill, isMirrorSkillInstalled, mirrorAgentsSection, mirrorAgentsSectionHeading, mirrorSkillName, resolveMirrorAgentSettings, resolveMirrorSkillPath, runMirrorAgentAutomation, } from './agents.js';
8
+ export { createInitConfig, discoverMirrorConfig, loadMirrorConfig, normalizeMirrorConfig, writeInitConfig } from './config.js';
9
+ export { assertValidSemver, isMirrorReleaseTarget, mirrorReleaseTargets, resolveNextVersion, sortSemverDescending } from './version.js';
10
+ export { createGitCommit, createGitTag, ensureAdapterFiles, ensureGitAvailable, assertSupportedGitTagTemplate, isGitDirty, isGitRepository, readCurrentVersion, readGitVersion, readJsrName, readJsrVersion, readPackageName, readPackageVersion, renderGitTag, resolveProjectName, supportedGitTagTemplates, versionFromTag, writeJsrVersion, writePackageVersion, } from './adapters.js';
11
+ export { buildVersionPlan, releaseLabel, resolveFileOutputPaths, validateMirrorConfig } from './plan.js';
12
+ export { applyVersionPlan, executeVersionPlan } from './executor.js';
13
+ export { mirrorBanner, reportAgentsInstructions, reportConfig, reportConfigSchema, reportExecution, reportExecutionSummary, reportPlan, reportSkillInstall, reportValue, } from './reporter.js';
14
+ export { createMirrorCommand, runMirrorCli } from './cli.js';
14
15
  //# sourceMappingURL=guiho-mirror.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"guiho-mirror.d.ts","sourceRoot":"","sources":["../source/guiho-mirror.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,YAAY,EACV,iBAAiB,EACjB,gBAAgB,EAChB,YAAY,EACZ,qBAAqB,EACrB,YAAY,EACZ,eAAe,EACf,iBAAiB,EACjB,uBAAuB,EACvB,mBAAmB,GACpB,MAAM,SAAS,CAAA;AAEhB,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AACjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAC/C,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAC3H,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAA;AACpI,OAAO,EACL,eAAe,EACf,YAAY,EACZ,kBAAkB,EAClB,6BAA6B,EAC7B,UAAU,EACV,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,WAAW,EACX,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,YAAY,EACZ,kBAAkB,EAClB,wBAAwB,EACxB,cAAc,EACd,eAAe,EACf,mBAAmB,GACpB,MAAM,YAAY,CAAA;AACnB,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAA;AACrG,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AACjE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,kBAAkB,EAAE,eAAe,EAAE,sBAAsB,EAAE,UAA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EAAE,gBAAgB,EAAE,YAAY,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAA;AACxG,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AACpE,OAAO,EACL,YAAY,EACZ,wBAAwB,EACxB,YAAY,EACZ,kBAAkB,EAClB,eAAe,EACf,sBAAsB,EACtB,UAAU,EACV,kBAAkB,EAClB,WAAW,GACZ,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA"}
@@ -1,12 +1,13 @@
1
1
  /**
2
2
  * @copyright Copyright (c) 2026 GUIHO Technologies as represented by Cristóvão GUIHO. All Rights Reserved.
3
3
  */
4
- export { MirrorError, invariant } from './errors';
5
- export { parseMirrorCliOptions } from './flags';
6
- export { createInitConfig, discoverMirrorConfig, loadMirrorConfig, normalizeMirrorConfig, writeInitConfig } from './config';
7
- export { assertValidSemver, isMirrorReleaseTarget, mirrorReleaseTargets, resolveNextVersion, sortSemverDescending } from './version';
8
- export { createGitCommit, createGitTag, ensureAdapterFiles, assertSupportedGitTagTemplate, isGitDirty, isGitRepository, readCurrentVersion, readGitVersion, readJsrName, readJsrVersion, readPackageName, readPackageVersion, renderGitTag, resolveProjectName, supportedGitTagTemplates, versionFromTag, writeJsrVersion, writePackageVersion, } from './adapters';
9
- export { buildVersionPlan, releaseLabel, resolveFileOutputPaths, validateMirrorConfig } from './plan';
10
- export { applyVersionPlan, executeVersionPlan } from './executor';
11
- export { mirrorBanner, reportConfig, reportConfigSchema, reportExecution, reportExecutionSummary, reportPlan, reportValue } from './reporter';
12
- export { createMirrorCommand, runMirrorCli } from './cli';
4
+ export { MirrorError, invariant } from './errors.js';
5
+ export { parseMirrorCliOptions } from './flags.js';
6
+ export { defaultMirrorAgentSettings, ensureMirrorAgentsInstructions, findAgentsFile, installMirrorSkill, isMirrorSkillInstalled, mirrorAgentsSection, mirrorAgentsSectionHeading, mirrorSkillName, resolveMirrorAgentSettings, resolveMirrorSkillPath, runMirrorAgentAutomation, } from './agents.js';
7
+ export { createInitConfig, discoverMirrorConfig, loadMirrorConfig, normalizeMirrorConfig, writeInitConfig } from './config.js';
8
+ export { assertValidSemver, isMirrorReleaseTarget, mirrorReleaseTargets, resolveNextVersion, sortSemverDescending } from './version.js';
9
+ export { createGitCommit, createGitTag, ensureAdapterFiles, ensureGitAvailable, assertSupportedGitTagTemplate, isGitDirty, isGitRepository, readCurrentVersion, readGitVersion, readJsrName, readJsrVersion, readPackageName, readPackageVersion, renderGitTag, resolveProjectName, supportedGitTagTemplates, versionFromTag, writeJsrVersion, writePackageVersion, } from './adapters.js';
10
+ export { buildVersionPlan, releaseLabel, resolveFileOutputPaths, validateMirrorConfig } from './plan.js';
11
+ export { applyVersionPlan, executeVersionPlan } from './executor.js';
12
+ export { mirrorBanner, reportAgentsInstructions, reportConfig, reportConfigSchema, reportExecution, reportExecutionSummary, reportPlan, reportSkillInstall, reportValue, } from './reporter.js';
13
+ export { createMirrorCommand, runMirrorCli } from './cli.js';
package/library/plan.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @copyright Copyright (c) 2026 GUIHO Technologies as represented by Cristóvão GUIHO. All Rights Reserved.
3
3
  */
4
- import type { MirrorCliOptions, MirrorConfig, MirrorVersionPlan } from './types';
4
+ import type { MirrorCliOptions, MirrorConfig, MirrorVersionPlan } from './types.js';
5
5
  export declare const validateMirrorConfig: (options?: MirrorCliOptions) => Promise<MirrorConfig>;
6
6
  export declare const buildVersionPlan: (target: string, options?: MirrorCliOptions) => Promise<MirrorVersionPlan>;
7
7
  export declare const resolveFileOutputPaths: (config: MirrorConfig) => string[];
@@ -1 +1 @@
1
- {"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../source/plan.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,iBAAiB,EAA2B,MAAM,SAAS,CAAA;AAMzG,eAAO,MAAM,oBAAoB,GAAU,UAAS,gBAAqB,KAAG,OAAO,CAAC,YAAY,CAW/F,CAAA;AAED,eAAO,MAAM,gBAAgB,GAAU,QAAQ,MAAM,EAAE,UAAS,gBAAqB,KAAG,OAAO,CAAC,iBAAiB,CA4DhH,CAAA;AAED,eAAO,MAAM,sBAAsB,GAAI,QAAQ,YAAY,aAO1D,CAAA;AAED,eAAO,MAAM,YAAY,GAAI,SAAS,MAAM,EAAE,cAAc,MAAM,WAAgE,CAAA;AAElI,eAAO,MAAM,kBAAkB,GAAI,MAAM,iBAAiB,EAAE,MAAM,MAAM,WAAoC,CAAA"}
1
+ {"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../source/plan.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,iBAAiB,EAA2B,MAAM,YAAY,CAAA;AAM5G,eAAO,MAAM,oBAAoB,GAAU,UAAS,gBAAqB,KAAG,OAAO,CAAC,YAAY,CAW/F,CAAA;AAED,eAAO,MAAM,gBAAgB,GAAU,QAAQ,MAAM,EAAE,UAAS,gBAAqB,KAAG,OAAO,CAAC,iBAAiB,CA4DhH,CAAA;AAED,eAAO,MAAM,sBAAsB,GAAI,QAAQ,YAAY,aAO1D,CAAA;AAED,eAAO,MAAM,YAAY,GAAI,SAAS,MAAM,EAAE,cAAc,MAAM,WAAgE,CAAA;AAElI,eAAO,MAAM,kBAAkB,GAAI,MAAM,iBAAiB,EAAE,MAAM,MAAM,WAAoC,CAAA"}
package/library/plan.js CHANGED
@@ -2,10 +2,10 @@
2
2
  * @copyright Copyright (c) 2026 GUIHO Technologies as represented by Cristóvão GUIHO. All Rights Reserved.
3
3
  */
4
4
  import { relative } from 'node:path';
5
- import { MirrorError } from './errors';
6
- import { loadMirrorConfig, relativeFromCwd, resolveMirrorPath } from './config';
7
- import { ensureAdapterFiles, readCurrentVersion, renderGitTag, resolveProjectName } from './adapters';
8
- import { resolveNextVersion } from './version';
5
+ import { MirrorError } from './errors.js';
6
+ import { loadMirrorConfig, relativeFromCwd, resolveMirrorPath } from './config.js';
7
+ import { ensureAdapterFiles, readCurrentVersion, renderGitTag, resolveProjectName } from './adapters.js';
8
+ import { resolveNextVersion } from './version.js';
9
9
  export const validateMirrorConfig = async (options = {}) => {
10
10
  const config = await loadMirrorConfig(options);
11
11
  await ensureAdapterFiles(config);
@@ -1,11 +1,13 @@
1
1
  /**
2
2
  * @copyright Copyright (c) 2026 GUIHO Technologies as represented by Cristóvão GUIHO. All Rights Reserved.
3
3
  */
4
- import type { MirrorConfig, MirrorExecutionResult, MirrorFormat, MirrorVersionPlan } from './types';
4
+ import type { MirrorAgentsInstructionsResult, MirrorConfig, MirrorExecutionResult, MirrorFormat, MirrorSkillInstallResult, MirrorVersionPlan } from './types.js';
5
5
  export declare const mirrorBanner: (configPath?: string) => string;
6
6
  export declare const reportValue: (value: unknown, format?: MirrorFormat) => string;
7
7
  export declare const reportConfig: (config: MirrorConfig, format?: MirrorFormat) => string;
8
8
  export declare const reportConfigSchema: (format?: MirrorFormat) => string;
9
+ export declare const reportSkillInstall: (result: MirrorSkillInstallResult, format?: MirrorFormat) => string;
10
+ export declare const reportAgentsInstructions: (result: MirrorAgentsInstructionsResult, format?: MirrorFormat) => string;
9
11
  export declare const reportPlan: (plan: MirrorVersionPlan, format?: MirrorFormat) => string;
10
12
  export declare const reportExecution: (result: MirrorExecutionResult, format?: MirrorFormat) => string;
11
13
  export declare const reportExecutionSummary: (result: MirrorExecutionResult, format?: MirrorFormat) => string;
@@ -1 +1 @@
1
- {"version":3,"file":"reporter.d.ts","sourceRoot":"","sources":["../source/reporter.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,qBAAqB,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAGnG,eAAO,MAAM,YAAY,GAAI,aAAa,MAAM,WAW/C,CAAA;AA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3F,CAAA;AAED,eAAO,MAAM,sBAAsB,GAAI,QAAQ,qBAAqB,EAAE,SAAQ,YAAqB,WAgBlG,CAAA"}
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @copyright Copyright (c) 2026 GUIHO Technologies as represented by Cristóvão GUIHO. All Rights Reserved.
3
3
  */
4
- import { configPathForDisplay, relativeFromCwd } from './config';
4
+ import { configPathForDisplay, relativeFromCwd } from './config.js';
5
5
  export const mirrorBanner = (configPath) => {
6
6
  const noColor = process.env['NO_COLOR'] === '1';
7
7
  const title = noColor ? '🪞 GUIHO Mirror' : '\x1b[1;36m🪞 GUIHO Mirror\x1b[0m';
@@ -30,6 +30,10 @@ export const reportConfig = (config, format = 'text') => {
30
30
  `commit: ${String(config.git.commit)}`,
31
31
  `push: ${String(config.git.push)}`,
32
32
  `allow_dirty: ${String(config.git.allowDirty)}`,
33
+ `write_changelog: ${String(config.agents.writeChangelog)}`,
34
+ `changelog_path: ${config.agents.changelogPath}`,
35
+ `auto_agents_md: ${String(config.agents.autoAgentsMd)}`,
36
+ `auto_skill_install: ${String(config.agents.autoSkillInstall)}`,
33
37
  '',
34
38
  ].join('\n');
35
39
  };
@@ -65,6 +69,34 @@ export const reportConfigSchema = (format = 'text') => {
65
69
  ' push = true | false Optional. Push release refs. Default: false.',
66
70
  ' allow_dirty = true | false Optional. Allow dirty Git worktree. Default: false.',
67
71
  '',
72
+ ' [agents]',
73
+ ' write_changelog = true | false Optional. Tell agents to write changelog entries. Default: true.',
74
+ ' changelog_path = "<path>" Optional. Changelog file path for agents. Default: "CHANGELOG.md".',
75
+ ' auto_agents_md = true | false Optional. Insert Mirror guidance into AGENTS.md when present. Default: true.',
76
+ ' auto_skill_install = true | false Optional. Install guiho-as-mirror when missing. Default: true.',
77
+ '',
78
+ ].join('\n');
79
+ };
80
+ export const reportSkillInstall = (result, format = 'text') => {
81
+ if (format === 'json')
82
+ return `${JSON.stringify(result, null, 2)}\n`;
83
+ return [
84
+ 'skill: guiho-as-mirror',
85
+ `scope: ${result.scope}`,
86
+ `path: ${result.path}`,
87
+ `installed: ${String(result.installed)}`,
88
+ `updated: ${String(result.updated)}`,
89
+ '',
90
+ ].join('\n');
91
+ };
92
+ export const reportAgentsInstructions = (result, format = 'text') => {
93
+ if (format === 'json')
94
+ return `${JSON.stringify(result, null, 2)}\n`;
95
+ return [
96
+ `agents_md: ${result.path}`,
97
+ `exists: ${String(result.exists)}`,
98
+ `changed: ${String(result.changed)}`,
99
+ '',
68
100
  ].join('\n');
69
101
  };
70
102
  export const reportPlan = (plan, format = 'text') => {
@@ -7,6 +7,7 @@ export type MirrorProjectNameSource = 'package.json' | 'jsr.json';
7
7
  export type MirrorFormat = 'text' | 'json';
8
8
  export type MirrorVersionTarget = ReleaseType | string;
9
9
  export type MirrorJsonObject = Record<string, unknown>;
10
+ export type MirrorSkillInstallScope = 'local' | 'global';
10
11
  export type MirrorRawConfig = Partial<{
11
12
  schema: number;
12
13
  project: Partial<{
@@ -31,6 +32,12 @@ export type MirrorRawConfig = Partial<{
31
32
  push: boolean;
32
33
  allow_dirty: boolean;
33
34
  }>;
35
+ agents: Partial<{
36
+ write_changelog: boolean;
37
+ changelog_path: string;
38
+ auto_agents_md: boolean;
39
+ auto_skill_install: boolean;
40
+ }>;
34
41
  }>;
35
42
  export type MirrorConfig = {
36
43
  schema: 1;
@@ -58,6 +65,13 @@ export type MirrorConfig = {
58
65
  push: boolean;
59
66
  allowDirty: boolean;
60
67
  };
68
+ agents: MirrorAgentSettings;
69
+ };
70
+ export type MirrorAgentSettings = {
71
+ writeChangelog: boolean;
72
+ changelogPath: string;
73
+ autoAgentsMd: boolean;
74
+ autoSkillInstall: boolean;
61
75
  };
62
76
  export type MirrorCliOptions = {
63
77
  cwd?: string;
@@ -80,6 +94,23 @@ export type MirrorConfigDiscovery = {
80
94
  path?: string;
81
95
  raw?: MirrorRawConfig;
82
96
  };
97
+ export type MirrorSkillInstallResult = {
98
+ scope: MirrorSkillInstallScope;
99
+ path: string;
100
+ installed: boolean;
101
+ updated: boolean;
102
+ };
103
+ export type MirrorAgentsInstructionsResult = {
104
+ path: string;
105
+ exists: boolean;
106
+ changed: boolean;
107
+ };
108
+ export type MirrorAgentAutomationResult = {
109
+ settings: MirrorAgentSettings;
110
+ agentsMd?: MirrorAgentsInstructionsResult;
111
+ localSkill?: MirrorSkillInstallResult;
112
+ globalSkill?: MirrorSkillInstallResult;
113
+ };
83
114
  export type MirrorProject = {
84
115
  name?: string;
85
116
  };
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../source/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAA;AAEzC,MAAM,MAAM,iBAAiB,GAAG,cAAc,GAAG,UAAU,GAAG,KAAK,CAAA;AACnE,MAAM,MAAM,uBAAuB,GAAG,cAAc,GAAG,UAAU,CAAA;AACjE,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,MAAM,CAAA;AAC1C,MAAM,MAAM,mBAAmB,GAAG,WAAW,GAAG,MAAM,CAAA;AACtD,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAEtD,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC;IACpC,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,OAAO,CAAC;QACf,IAAI,EAAE,MAAM,CAAA;QACZ,WAAW,EAAE,uBAAuB,CAAA;KACrC,CAAC,CAAA;IACF,OAAO,EAAE,OAAO,CAAC;QACf,MAAM,EAAE,QAAQ,CAAA;QAChB,MAAM,EAAE,iBAAiB,CAAA;QACzB,MAAM,EAAE,iBAAiB,EAAE,CAAA;QAC3B,aAAa,EAAE,MAAM,CAAA;KACtB,CAAC,CAAA;IACF,OAAO,EAAE,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IAClC,GAAG,EAAE,OAAO,CAAC;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7 @@
2
2
  * @copyright Copyright (c) 2026 GUIHO Technologies as represented by Cristóvão GUIHO. All Rights Reserved.
3
3
  */
4
4
  import { inc, rcompare, valid as validSemver } from 'semver';
5
- import { MirrorError } from './errors';
5
+ import { MirrorError } from './errors.js';
6
6
  export const mirrorReleaseTargets = [
7
7
  'major',
8
8
  'premajor',
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@guiho/mirror",
3
3
  "description": "Open source project versioning for Bun, npm, JSR, and Git.",
4
- "version": "3.0.0-alpha.9",
4
+ "version": "3.1.0",
5
5
  "type": "module",
6
6
  "main": "./library/guiho-mirror.js",
7
7
  "types": "./library/guiho-mirror.d.ts",
@@ -17,12 +17,12 @@
17
17
  "files": [
18
18
  "README.md",
19
19
  "library/",
20
+ "skills/",
20
21
  "docs/",
21
- "bin/",
22
22
  "jsr.json",
23
23
  "CHANGELOG.md",
24
24
  "LICENSE.md",
25
- "docs.md"
25
+ "DOCS.md"
26
26
  ],
27
27
  "keywords": [
28
28
  "bun",
@@ -44,7 +44,7 @@
44
44
  },
45
45
  "scripts": {
46
46
  "dev": "bun run --watch source/guiho-mirror-bin.ts",
47
- "build": "rm -rf library && tsc -p .",
47
+ "build": "rm -rf library && tsc -p tsconfig.build.json",
48
48
  "binary": "bun build source/guiho-mirror-bin.ts --compile --outfile bin/mirror",
49
49
  "bundle": "rm -rf bundle && bun build source/guiho-mirror-bin.ts --outdir bundle --target node --sourcemap=linked",
50
50
  "typecheck": "tsc -p . --noEmit",
@@ -69,10 +69,12 @@
69
69
  },
70
70
  "dependencies": {
71
71
  "citty": "^0.2.2",
72
- "semver": "^7.8.0"
72
+ "semver": "^7.8.1",
73
+ "smol-toml": "^1.6.1"
73
74
  },
74
75
  "devDependencies": {
75
- "@types/bun": "1.3.3",
76
+ "@guiho/mirror": "^3.0.0",
77
+ "@types/bun": "1.3.14",
76
78
  "@types/semver": "^7.7.1",
77
79
  "typescript": "5.8.2"
78
80
  }