create-agdf 0.9.7 → 0.9.8

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agdf",
3
- "version": "0.9.7",
3
+ "version": "0.9.8",
4
4
  "description": "Operating system for governed AI-assisted delivery.",
5
5
  "author": {
6
6
  "name": "Arndt Gold",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "id": "agdf",
4
- "version": "0.9.7",
4
+ "version": "0.9.8",
5
5
  "displayName": "AI Governance & Delivery Framework",
6
6
  "developerName": "Arndt Gold",
7
7
  "description": "Operating system for governed AI-assisted delivery.",
@@ -36,7 +36,7 @@ import {
36
36
  verifyRepositoryDisabled,
37
37
  } from "../lifecycle/operations.js";
38
38
  import { printGeneralStatus, printLifecycleResult } from "../lifecycle/presentation.js";
39
- import { createLifecycleResult, lifecycleFailure } from "../lifecycle/result.js";
39
+ import { createLifecycleResult, globalInstallRestartAction, lifecycleFailure } from "../lifecycle/result.js";
40
40
  import { evaluateGeneralStatus } from "../lifecycle/status.js";
41
41
  import { agdfFragmentPath, generatedFilesForTarget, openCodeConfigFragmentPath } from "../scaffold/plan.js";
42
42
  import { printNextSteps } from "../scaffold/presentation.js";
@@ -121,12 +121,12 @@ function createHandlers({ io, env, exec }) {
121
121
  const installed = installCodexGlobalPlugin(installerAdapters);
122
122
  printLifecycleResult(installResult(installed, {
123
123
  restartRequired: true,
124
- nextAction: "Restart Codex, then run npx --yes @agdf/cli@latest codex-repo in a repository where AGDF should be active.",
124
+ nextAction: globalInstallRestartAction(options.target).text,
125
125
  }), { json: options.json, io });
126
126
  printVerboseHostOutput(installed, options, io);
127
127
  return 0;
128
128
  } catch (error) {
129
- printInstallFailure("codex", error, options, io);
129
+ printInstallFailure(options.target, error, options, io);
130
130
  return 1;
131
131
  }
132
132
  }],
@@ -135,12 +135,12 @@ function createHandlers({ io, env, exec }) {
135
135
  const installed = installClaudeGlobalPlugin(installerAdapters);
136
136
  printLifecycleResult(installResult(installed, {
137
137
  restartRequired: true,
138
- nextAction: "Restart Claude Code, then verify the plugin in a new session.",
138
+ nextAction: globalInstallRestartAction(options.target).text,
139
139
  }), { json: options.json, io });
140
140
  printVerboseHostOutput(installed, options, io);
141
141
  return 0;
142
142
  } catch (error) {
143
- printInstallFailure("claude", error, options, io);
143
+ printInstallFailure(options.target, error, options, io);
144
144
  return 1;
145
145
  }
146
146
  }],
@@ -156,7 +156,7 @@ function createHandlers({ io, env, exec }) {
156
156
  printLifecycleResult(createLifecycleResult({
157
157
  operation: result.transition.status === "updated" ? "update" : "install",
158
158
  result: verificationHealthy ? "success" : "partial",
159
- surface: "opencode",
159
+ surface: options.target,
160
160
  scope: "global",
161
161
  version: {
162
162
  expected: report.package.expected_version,
@@ -167,11 +167,11 @@ function createHandlers({ io, env, exec }) {
167
167
  },
168
168
  verification: { status: verificationHealthy ? "healthy" : "degraded", evidence: [report.global_config.path, report.global_native_surface.path] },
169
169
  restart: { required: true, reason: "host_reload" },
170
- next_action: { kind: "restart", text: "Restart OpenCode so it loads the updated global plugin config." },
170
+ next_action: globalInstallRestartAction(options.target),
171
171
  }), { json: options.json, io });
172
172
  return verificationHealthy ? 0 : 1;
173
173
  } catch (error) {
174
- printInstallFailure("opencode", error, options, io);
174
+ printInstallFailure(options.target, error, options, io);
175
175
  return 1;
176
176
  }
177
177
  }],
@@ -2,6 +2,11 @@ const OPERATIONS = new Set(["install", "update", "status", "disable", "uninstall
2
2
  const RESULTS = new Set(["success", "partial", "failed", "preview"]);
3
3
  const SCOPES = new Set(["global", "repository"]);
4
4
  const SURFACES = new Set(["codex", "claude", "copilot", "opencode", "generic"]);
5
+ const GLOBAL_INSTALL_RESTART_ACTIONS = Object.freeze({
6
+ codex: "Restart Codex.",
7
+ claude: "Restart Claude Code.",
8
+ opencode: "Restart OpenCode.",
9
+ });
5
10
 
6
11
  function text(value) {
7
12
  return typeof value === "string" ? value.trim() : "";
@@ -66,6 +71,12 @@ export function assertLifecycleResult(value) {
66
71
  return value;
67
72
  }
68
73
 
74
+ export function globalInstallRestartAction(surface) {
75
+ const action = GLOBAL_INSTALL_RESTART_ACTIONS[surface];
76
+ if (!action) throw new Error(`Unsupported global installation restart surface: ${surface || "missing"}.`);
77
+ return Object.freeze({ kind: "restart", text: action });
78
+ }
79
+
69
80
  export function lifecycleFailure({ operation, surface, scope, phase, message, evidence = [], nextAction }) {
70
81
  return createLifecycleResult({
71
82
  operation,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-agdf",
3
- "version": "0.9.7",
3
+ "version": "0.9.8",
4
4
  "description": "Bootstrap AGDF repository-local plugin files, Copilot/OpenCode instructions, skills, control files and machine-readable checks.",
5
5
  "type": "module",
6
6
  "files": [