create-agentic-workspace 0.2.1 → 0.2.2
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/package.json +2 -2
- package/permission-floor.json +1 -1
- package/src/preview.mjs +19 -2
- package/src/run.mjs +6 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-agentic-workspace",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "The pre-session bootstrap wizard for an Agentic Foundry workspace: declares (never grants) the permission floor, absorbs foundry-bootstrap.sh's out-of-session identity wiring, and scaffolds a seven-file schema-valid workspace. Zero dependencies, no lifecycle scripts, no telemetry.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"marketplace_name": "agentic-foundry",
|
|
35
35
|
"marketplace_repo": "lukasrepublic/agentic-foundry",
|
|
36
36
|
"plugin_name": "foundry",
|
|
37
|
-
"plugin_version": "1.2.
|
|
37
|
+
"plugin_version": "1.2.2",
|
|
38
38
|
"pins_researched": "2026-08-02"
|
|
39
39
|
}
|
|
40
40
|
}
|
package/permission-floor.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema_version": 1,
|
|
3
3
|
"plugin_root_glob": "~/.claude/plugins/cache/*/foundry/*",
|
|
4
|
-
"generated_for_plugin_version": "1.2.
|
|
4
|
+
"generated_for_plugin_version": "1.2.2",
|
|
5
5
|
"entries": [
|
|
6
6
|
{
|
|
7
7
|
"rule": "Bash(~/.claude/plugins/cache/*/foundry/*/scripts/foundry-acceptance-contract-validate.py:*)",
|
package/src/preview.mjs
CHANGED
|
@@ -23,12 +23,29 @@ export function renderPreview({ plan, machineScopeWrites, map }) {
|
|
|
23
23
|
return lines.join('\n');
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
// `isGitRepo` is computed by the CALLER and passed in, so this module stays pure (it renders text;
|
|
27
|
+
// it does not probe the filesystem).
|
|
28
|
+
//
|
|
29
|
+
// WHY THE GIT STEP IS PRINTED AND NOT PERFORMED. A workspace that is not a git repository is a
|
|
30
|
+
// dead end: the factory's whole discipline is branch-per-atom → PR → merge floor, and the setup
|
|
31
|
+
// path tells the reader to apply branch protection a few steps later — which needs a repo AND a
|
|
32
|
+
// remote. This CLI ALREADY writes a `.gitignore`, which means nothing without one.
|
|
33
|
+
//
|
|
34
|
+
// It is still printed rather than run. This CLI's contract is that it writes exactly the files it
|
|
35
|
+
// previewed and nothing else; `git init` would be an un-previewed side effect, and the choice of
|
|
36
|
+
// remote is genuinely the reader's. `create-vite` prints its next steps the same way, for the same
|
|
37
|
+
// reason. Telling keeps the promise; doing would quietly break it.
|
|
38
|
+
export const TRUST_HANDOFF_TEXT = (dir, { isGitRepo = true } = {}) => `
|
|
27
39
|
The workspace has been written. The permission floor above is a declaration, not a grant: the
|
|
28
40
|
platform's trust dialog is the consent ceremony, and the \`allow\` rules take effect only after
|
|
29
41
|
you accept it — the dialog lists them.
|
|
30
42
|
|
|
31
|
-
cd ${dir}
|
|
43
|
+
cd ${dir}${isGitRepo ? '' : `
|
|
44
|
+
git init && git add -A && git commit -m 'workspace seed'
|
|
45
|
+
# ^ this directory is NOT a git repository yet. The factory works through
|
|
46
|
+
# branch-per-atom → PR → the merge floor, so it needs a repo and a remote.
|
|
47
|
+
# Create the remote too (e.g. \`gh repo create <you>/<project>-handbook --private --source=. --push\`)
|
|
48
|
+
# before you reach the branch-protection step.`}
|
|
32
49
|
claude
|
|
33
50
|
> (accept the trust dialog when prompted)
|
|
34
51
|
> /foundry:init
|
package/src/run.mjs
CHANGED
|
@@ -194,7 +194,12 @@ export async function runCli(argv, { cwd, isTTY, input, output, homeDir, pkgDir
|
|
|
194
194
|
for (const f of findings) print(` [${f.class}] ${JSON.stringify(f)}`);
|
|
195
195
|
}
|
|
196
196
|
|
|
197
|
-
|
|
197
|
+
// Probed here, not inside preview.mjs, which renders text and never touches the filesystem.
|
|
198
|
+
// `.git` is a DIRECTORY in a normal clone and a FILE in a worktree/submodule, so `existsSync`
|
|
199
|
+
// on the path is the check that covers both — a directory-only test would tell a worktree user
|
|
200
|
+
// to re-init a repository they already have.
|
|
201
|
+
const isGitRepo = fs.existsSync(path.join(targetRoot, '.git'));
|
|
202
|
+
print(TRUST_HANDOFF_TEXT(targetRoot, { isGitRepo }));
|
|
198
203
|
|
|
199
204
|
return { exitCode: exitCodeForPlan(plan), output: lines.join('\n') };
|
|
200
205
|
} catch (e) {
|