raptor-aios 0.7.0 → 0.7.1
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
CHANGED
|
@@ -3,6 +3,16 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
5
5
|
|
|
6
|
+
## [0.7.1] - 2026-06-08
|
|
7
|
+
|
|
8
|
+
### Fixed
|
|
9
|
+
|
|
10
|
+
- **`init --preset mobile` no longer silently disables the M1–M6 gates.** The registry only knew the canonical id `mobile-opinionated`, so passing the natural shorthand `mobile` persisted a raw `preset: mobile` that `getPreset` could not resolve — and `verify` ran **none** of the mobile preset gates without any error. Now a `mobile` → `mobile-opinionated` alias resolves both ways: `init` persists the **canonical** id in `raptor.yml`, `raptor.manifest.json` and `init-options.json`, and any existing project that already stored `preset: mobile` resolves correctly at verify time.
|
|
11
|
+
|
|
12
|
+
### Internal
|
|
13
|
+
|
|
14
|
+
- `registry.ts` gains an alias map and a `resolvePresetId()` helper (also exported); `getPreset` resolves aliases and tolerates `undefined`/empty input. `init` persists `resolvePresetId(flags.preset) ?? flags.preset` instead of the raw flag.
|
|
15
|
+
|
|
6
16
|
## [0.7.0] - 2026-06-08
|
|
7
17
|
|
|
8
18
|
### Added
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { mobileOpinionated } from "./mobile-opinionated.js";
|
|
2
|
-
export { getPreset, listPresets, knownPresetIds } from "./registry.js";
|
|
2
|
+
export { getPreset, resolvePresetId, listPresets, knownPresetIds, } from "./registry.js";
|
|
3
3
|
export { PRESET_SCHEMA_V1, PRESET_DIR_SUBDIR, PresetManifestError, parsePresetManifest, loadPresetFromDir, loadPresetsFromProject, materializePreset, } from "./loader.js";
|
|
4
4
|
export { stackPresets } from "./stacking.js";
|
|
5
5
|
export { renderPresetArticle, renderPresetArticles, renderPresetGatesForPlan, } from "./renderer.js";
|
|
@@ -2,8 +2,19 @@ import { mobileOpinionated } from "./mobile-opinionated.js";
|
|
|
2
2
|
const REGISTRY = {
|
|
3
3
|
[mobileOpinionated.id]: mobileOpinionated,
|
|
4
4
|
};
|
|
5
|
+
const ALIASES = {
|
|
6
|
+
mobile: mobileOpinionated.id,
|
|
7
|
+
};
|
|
8
|
+
export function resolvePresetId(id) {
|
|
9
|
+
if (!id)
|
|
10
|
+
return undefined;
|
|
11
|
+
if (REGISTRY[id])
|
|
12
|
+
return id;
|
|
13
|
+
return ALIASES[id];
|
|
14
|
+
}
|
|
5
15
|
export function getPreset(id) {
|
|
6
|
-
|
|
16
|
+
const canonical = resolvePresetId(id);
|
|
17
|
+
return canonical ? REGISTRY[canonical] : undefined;
|
|
7
18
|
}
|
|
8
19
|
export function listPresets() {
|
|
9
20
|
return Object.values(REGISTRY);
|
package/dist/_core/package.json
CHANGED
package/dist/commands/init.js
CHANGED
|
@@ -2,7 +2,7 @@ import { Flags } from "@oclif/core";
|
|
|
2
2
|
import { BaseCommand } from "../base-command.js";
|
|
3
3
|
import { chmodSync, existsSync, mkdirSync, writeFileSync, } from "node:fs";
|
|
4
4
|
import { basename, join } from "node:path";
|
|
5
|
-
import { appendAuditEvent, buildContextBlock, coreBlock, CORE_VERSION, createManifest, detectInstalledAgents, generateAgentsYaml, getAgentByKind, getPreset, hashString, knownPresetIds, materializeSlashCommands, renderBundled, renderPresetArticles, SELECTABLE_AGENT_KEYS, upsertContextFile, VERSION, } from "../_core/dist/index.js";
|
|
5
|
+
import { appendAuditEvent, buildContextBlock, coreBlock, CORE_VERSION, createManifest, detectInstalledAgents, generateAgentsYaml, getAgentByKind, getPreset, hashString, knownPresetIds, resolvePresetId, materializeSlashCommands, renderBundled, renderPresetArticles, SELECTABLE_AGENT_KEYS, upsertContextFile, VERSION, } from "../_core/dist/index.js";
|
|
6
6
|
import { currentActor } from "../shared/project.js";
|
|
7
7
|
import { installBundledExtensions, installShellScripts, installTemplates, } from "../shared/scaffold.js";
|
|
8
8
|
export default class Init extends BaseCommand {
|
|
@@ -85,12 +85,13 @@ export default class Init extends BaseCommand {
|
|
|
85
85
|
if (!preset) {
|
|
86
86
|
this.warn(`unknown preset "${flags.preset}" — known presets: ${knownPresetIds().join(", ")}. Constitution will have no preset articles.`);
|
|
87
87
|
}
|
|
88
|
+
const presetId = resolvePresetId(flags.preset) ?? flags.preset;
|
|
88
89
|
const presetArticles = preset ? renderPresetArticles(preset) : "";
|
|
89
90
|
const raptorYml = renderBundled("raptorYml", {
|
|
90
91
|
raptorVersion: VERSION,
|
|
91
92
|
projectName,
|
|
92
93
|
createdAt,
|
|
93
|
-
preset:
|
|
94
|
+
preset: presetId,
|
|
94
95
|
});
|
|
95
96
|
writeFileSync(join(raptorDir, "raptor.yml"), raptorYml);
|
|
96
97
|
const manifest = createManifest({
|
|
@@ -99,7 +100,7 @@ export default class Init extends BaseCommand {
|
|
|
99
100
|
integration: flags.ai,
|
|
100
101
|
script_type: flags.script,
|
|
101
102
|
branch_numbering: flags["branch-numbering"],
|
|
102
|
-
preset:
|
|
103
|
+
preset: presetId,
|
|
103
104
|
scripts_installed: [],
|
|
104
105
|
templates_installed: [],
|
|
105
106
|
extensions_registered: [],
|
|
@@ -109,14 +110,14 @@ export default class Init extends BaseCommand {
|
|
|
109
110
|
ai: flags.ai,
|
|
110
111
|
script_type: flags.script,
|
|
111
112
|
branch_numbering: flags["branch-numbering"],
|
|
112
|
-
preset:
|
|
113
|
+
preset: presetId,
|
|
113
114
|
no_git: flags["no-git"],
|
|
114
115
|
created_at: createdAt,
|
|
115
116
|
};
|
|
116
117
|
writeFileSync(join(raptorDir, "init-options.json"), JSON.stringify(initOptions, null, 2) + "\n");
|
|
117
118
|
const constitution = renderBundled("constitution", {
|
|
118
119
|
projectName,
|
|
119
|
-
preset:
|
|
120
|
+
preset: presetId,
|
|
120
121
|
coreBlock: coreBlock(),
|
|
121
122
|
presetArticles,
|
|
122
123
|
});
|
|
@@ -150,7 +151,7 @@ export default class Init extends BaseCommand {
|
|
|
150
151
|
writeFileSync(agentsYamlPath, agentsYamlContent);
|
|
151
152
|
const contextBlock = buildContextBlock({
|
|
152
153
|
projectName,
|
|
153
|
-
preset:
|
|
154
|
+
preset: presetId,
|
|
154
155
|
constitutionArticles: preset?.articles.map((a) => a.id),
|
|
155
156
|
});
|
|
156
157
|
for (const agent of targetAgents) {
|
|
@@ -169,7 +170,7 @@ export default class Init extends BaseCommand {
|
|
|
169
170
|
projectName,
|
|
170
171
|
adapter: agent,
|
|
171
172
|
constitutionArticles: preset?.articles.map((a) => a.id),
|
|
172
|
-
presetId:
|
|
173
|
+
presetId: presetId,
|
|
173
174
|
});
|
|
174
175
|
allMaterialized.push({
|
|
175
176
|
agentId: agent.id,
|
|
@@ -193,7 +194,7 @@ export default class Init extends BaseCommand {
|
|
|
193
194
|
],
|
|
194
195
|
meta: {
|
|
195
196
|
core_version: CORE_VERSION,
|
|
196
|
-
preset:
|
|
197
|
+
preset: presetId,
|
|
197
198
|
preset_version: preset?.version,
|
|
198
199
|
preset_articles: preset?.articles.map((a) => a.id),
|
|
199
200
|
project: projectName,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "raptor-aios",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"description": "Raptor — Spec-Driven Development (SDD) CLI for modern mobile apps. Constitutional gates, audit trail, real verification (a11y/perf/stores/OS matrix), and AI-agent slash commands.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
package/scripts/prepare-npm.mjs
CHANGED