@promptframe/creation 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.
@@ -9,7 +9,7 @@
9
9
  "source": {
10
10
  "source": "npm",
11
11
  "package": "@promptframe/creation",
12
- "version": "0.2.1",
12
+ "version": "0.2.2",
13
13
  "registry": "https://registry.npmjs.org/"
14
14
  },
15
15
  "policy": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "promptframe-creation",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "使用自己的推理,通过 PromptFrame 的共用工具、作品和任务创作视频。",
5
5
  "author": {
6
6
  "name": "PromptFrame"
package/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
  需要 Node.js 20+ 及支持插件的 Codex(最低0.160.0)。在 Studio 的“连接与授权”复制当前环境 API 地址,然后在本机终端执行:
8
8
 
9
9
  ```bash
10
- npx --yes @promptframe/creation@0.2.1 connect --endpoint <Studio提供的API地址>
10
+ npx --yes @promptframe/creation@0.2.2 connect --endpoint <Studio提供的API地址>
11
11
  ```
12
12
 
13
13
  入口检查环境、准备用户级版本、注册并核回 Codex 插件,复用有效凭据;首次 Token 在终端隐藏输入,不粘进聊天。完成后按提示正常重载插件或开新聊天,确认 `creation-setup`、`video-creation` 与 MCP 工具一起加载。安装本身不接管作品、不启动付费制作。`npx` 单独运行或目录连通不等于当前聊天已加载插件。
@@ -19,7 +19,7 @@ API 使用 Studio 实际可达 origin 和 `/api` 或 `/api/mcp`,没有内置
19
19
  | 版本或层次 | 适用范围 |
20
20
  | --- | --- |
21
21
  | 历史 npm0.1.1 / creation-v0.1.1 | 固定3da232e267117794fcbcbb1920cbdf9f3f294c14的基础setup/status/bridge;不是此版的聊天身份和插件安装功能 |
22
- | 0.2.1源码与包合同 | 宿主thread隔离、桥管理控制版本、自包含运行依赖、用户级安装/两类Skill/独立profile;是否已发行以registry和固定tag为准 |
22
+ | 0.2.2源码与包合同 | 宿主thread隔离、桥管理控制版本、自包含运行依赖、用户级安装/两类Skill/独立profile;是否已发行以registry和固定tag为准 |
23
23
  | 实际用户宿主 | 核已安装版本、Skill加载与MCP连接;源码提交或npm发行不代替宿主及完整创作验收 |
24
24
 
25
25
  公开目录 `.agents/plugins/marketplace.json` 固定 npm 包版本。用户级 connect 从当前完整包注册受管本地副本;两条路径都携带运行依赖,不要求在业务仓安装SDK。不要同时启用旧的手工MCP入口和新插件;旧入口识别与安全迁移见安装说明。
package/dist/cli.mjs CHANGED
@@ -7301,7 +7301,7 @@ var require_content_type = __commonJS({
7301
7301
  });
7302
7302
 
7303
7303
  // lib/version.mjs
7304
- var CLIENT_VERSION = "0.2.1";
7304
+ var CLIENT_VERSION = "0.2.2";
7305
7305
  var CLIENT_PROTOCOL = "creation-client/v1";
7306
7306
 
7307
7307
  // lib/cli.mjs
@@ -19897,6 +19897,54 @@ async function privateRead(file) {
19897
19897
  if (!s.isFile() || s.isSymbolicLink() || s.uid !== process.getuid?.() || s.mode & 63 || s.size > 512 * 1024) fail("state_invalid");
19898
19898
  return json(file);
19899
19899
  }
19900
+ async function packageJSON(file) {
19901
+ const s = await info(file);
19902
+ if (!s?.isFile() || s.isSymbolicLink() || s.size > 512 * 1024) fail("installed_files_invalid");
19903
+ return json(file);
19904
+ }
19905
+ function sameTransport(actual, expected) {
19906
+ return actual?.type === "stdio" && actual.command === expected.command && typeof actual.cwd === "string" && path2.resolve(actual.cwd) === path2.resolve(expected.cwd) && JSON.stringify(actual.args) === JSON.stringify(expected.args) && JSON.stringify(actual.env_vars ?? []) === JSON.stringify(expected.env_vars ?? []) && !Object.keys(actual.env ?? {}).length;
19907
+ }
19908
+ async function managedTransport(installed, versions, serverName, profile, configFile2) {
19909
+ if (!installed) return null;
19910
+ const root = installed.source?.path;
19911
+ if (installed.source?.source !== "local" || typeof root !== "string" || !/^\d+\.\d+\.\d+$/.test(installed.version ?? "") || root !== path2.join(versions, installed.version)) fail("existing_registration_requires_review");
19912
+ const directory = await info(root), definition = await info(path2.join(root, ".mcp.json"));
19913
+ if (!directory?.isDirectory() || directory.isSymbolicLink() || !definition?.isFile() || definition.isSymbolicLink()) fail("installed_files_invalid");
19914
+ const ready = await privateRead(path2.join(root, "installation.json"));
19915
+ if (!ready || ready.profile !== profile || ready.configFile !== configFile2 || ready.version !== installed.version) fail("existing_registration_requires_review");
19916
+ const bytes = await readFile2(path2.join(root, ".mcp.json")), entry = ready.files?.find((x) => x.path === ".mcp.json");
19917
+ if (!entry || entry.bytes !== bytes.length || entry.sha256 !== hash(bytes)) fail("installed_files_invalid");
19918
+ const mcp = JSON.parse(bytes).mcpServers?.[serverName];
19919
+ if (!mcp || typeof mcp.command !== "string" || !mcp.command || mcp.cwd !== root || JSON.stringify(mcp.args) !== JSON.stringify([path2.join(root, "bin/promptframe-creation.mjs"), "bridge", "--config", configFile2])) fail("existing_registration_requires_review");
19920
+ return mcp;
19921
+ }
19922
+ async function officialNpmInstallation(installed, servers, env, profile, configFile2) {
19923
+ if (profile !== "default" || configFile2 !== profileCredentialsPath("default", env)) return null;
19924
+ const candidates = installed.filter((p2) => p2.enabled === true && p2.name === "promptframe-creation" && p2.pluginId === "promptframe-creation@" + p2.marketplaceName && /^[a-zA-Z0-9][a-zA-Z0-9._-]{0,140}$/.test(p2.marketplaceName ?? "") && /^\d+\.\d+\.\d+$/.test(p2.version ?? "") && p2.source?.source === "npm" && p2.source.package === "@promptframe/creation" && p2.source.version === p2.version && ["https://registry.npmjs.org", "https://registry.npmjs.org/"].includes(p2.source.registry));
19925
+ if (candidates.length > 1) fail("existing_registration_requires_review");
19926
+ if (!candidates.length) return null;
19927
+ const p = candidates[0], root = path2.join(path2.resolve(env.CODEX_HOME ?? path2.join(homedir2(), ".codex")), "plugins/cache", p.marketplaceName, p.name, p.version);
19928
+ const directory = await info(root);
19929
+ if (!directory?.isDirectory() || directory.isSymbolicLink()) fail("installed_files_invalid");
19930
+ const pkg = await packageJSON(path2.join(root, "package.json")), manifest = await packageJSON(path2.join(root, ".codex-plugin/plugin.json"));
19931
+ if (pkg.name !== "@promptframe/creation" || pkg.version !== p.version || manifest.name !== p.name || manifest.version !== p.version) fail("installed_files_invalid");
19932
+ const definition = (await packageJSON(path2.join(root, ".mcp.json"))).mcpServers?.promptframe;
19933
+ if (!definition || definition.command !== "node" || definition.cwd !== "." || JSON.stringify(definition.args) !== JSON.stringify(["bin/promptframe-creation.mjs", "bridge"]) || JSON.stringify(definition.env_vars) !== JSON.stringify(["PROMPTFRAME_CREATION_CONFIG", "XDG_CONFIG_HOME"])) fail("legacy_mcp_entry_requires_review");
19934
+ if (servers.length !== 1 || servers[0].enabled !== true || !sameTransport(servers[0].transport, { ...definition, cwd: root }) || JSON.stringify(servers[0].transport.env_vars) !== JSON.stringify(definition.env_vars)) fail("legacy_mcp_entry_requires_review");
19935
+ return {
19936
+ version: p.version,
19937
+ profile,
19938
+ configFile: configFile2,
19939
+ pluginId: p.pluginId,
19940
+ versionRoot: root,
19941
+ currentFile: null,
19942
+ reused: true,
19943
+ installedFiles: 0,
19944
+ registered: true,
19945
+ reloadRequired: false
19946
+ };
19947
+ }
19900
19948
  async function atomicJSON(file, value2) {
19901
19949
  const temp = file + "." + randomBytes2(12).toString("hex") + ".tmp";
19902
19950
  try {
@@ -20003,13 +20051,18 @@ async function installForUser({
20003
20051
  if (previous && (previous.profile !== profile || previous.pluginId !== pluginId || previous.configFile !== configFile2)) fail("profile_binding_conflict");
20004
20052
  const state = JSON.parse(await runCodex(["plugin", "list", "--json"]));
20005
20053
  const installed = state.installed?.find((x) => x.pluginId === pluginId);
20006
- if (installed && (!installed.source?.path?.startsWith(versions + path2.sep) || installed.source.source !== "local")) fail("existing_registration_requires_review");
20007
20054
  const legacy = JSON.parse(await runCodex(["mcp", "list", "--json"]));
20008
20055
  const serverName = "promptframe" + (profile === "default" ? "" : "-" + profile);
20056
+ const servers = legacy.filter((x) => x.name === serverName);
20057
+ const official = await officialNpmInstallation(state.installed ?? [], servers, env, profile, configFile2);
20058
+ if (official) {
20059
+ if (installed || previous) fail("existing_registration_requires_review");
20060
+ return official;
20061
+ }
20062
+ const recorded = await managedTransport(installed, versions, serverName, profile, configFile2);
20009
20063
  if (legacy.some((x) => {
20010
20064
  if (x.name !== serverName) return false;
20011
- const t = x.transport, owned = installed?.source?.path;
20012
- return !(owned && t?.type === "stdio" && t.command === process.execPath && t.cwd === owned && JSON.stringify(t.args) === JSON.stringify([path2.join(owned, "bin/promptframe-creation.mjs"), "bridge", "--config", configFile2]));
20065
+ return !recorded || !sameTransport(x.transport, recorded);
20013
20066
  })) fail("legacy_mcp_entry_requires_review");
20014
20067
  const target = await info(versionRoot);
20015
20068
  if (target) {
@@ -20067,7 +20120,15 @@ async function installForUser({
20067
20120
  if (observed?.version !== payload.version || observed.enabled !== true) fail("registration_unconfirmed");
20068
20121
  await atomicJSON(currentFile, complete);
20069
20122
  }
20070
- return { ...complete, currentFile, reused: newFiles === 0, installedFiles: newFiles, registered: true, reloadRequired: !already };
20123
+ return {
20124
+ ...complete,
20125
+ currentFile,
20126
+ reused: newFiles === 0,
20127
+ installedFiles: newFiles,
20128
+ registered: true,
20129
+ reloadRequired: !already,
20130
+ recordedRuntimeRetained: Boolean(already && recorded && recorded.command !== process.execPath)
20131
+ };
20071
20132
  } catch (error2) {
20072
20133
  if (registrationStarted) {
20073
20134
  if (previousCatalog) {
@@ -20291,7 +20352,8 @@ try {
20291
20352
  version: installed.version,
20292
20353
  installationReused: installed.reused,
20293
20354
  profile: installed.profile,
20294
- next: installed.reloadRequired ? "Open a new Codex chat or reload plugins, then use the creation Skill." : "Use the creation Skill in a chat that has this plugin loaded.",
20355
+ recordedRuntimeRetained: installed.recordedRuntimeRetained ?? false,
20356
+ next: installed.recordedRuntimeRetained ? "This version retains its recorded Node path. Keep that Node available; a new version uses the installer's current Node." : installed.reloadRequired ? "Open a new Codex chat or reload plugins, then use the creation Skill." : "Use the creation Skill in a chat that has this plugin loaded.",
20295
20357
  hostThreadIdentity: "verified_by_the_platform_on_actual_host_tool_calls"
20296
20358
  });
20297
20359
  } finally {
@@ -31,7 +31,7 @@
31
31
 
32
32
  源码经 GitHub Actions 打包发行到 npm;插件目录记录包名/版本或源码位置。安装后,Codex 加载本地副本并按配置启动 Node 桥;桥通过 stdio 接收调用,读取独立安全配置,再通过 HTTPS MCP 连接所选平台。GitHub、npm 与目录索引负责获取版本,不进入正常工具调用链。Token 不进入源码、插件包或命令参数。
33
33
 
34
- 0.2.1公开目录固定npm来源;`connect`另以用户级受管版本注册本地插件。`scripts/build-runtime.mjs`显式bundle MCP SDK及必要依赖,拒绝除Node builtins之外的外部import并附第三方许可证。npm_source仍只pack/unpack,不执行npm install;因此`test/package-runtime.test.mjs`从无node_modules解包核可运行。宿主注册/实际Skill及MCP启动另核,普通npm install不代替。
34
+ 0.2.2公开目录固定npm来源;`connect`复用来源和缓存定义可核的已启用官方npm插件;尚未注册时才准备用户级受管版本。受管身份按installation记录和原MCP定义核实,允许安装器Node路径变化,不将未知同名手工入口当作自身安装。`scripts/build-runtime.mjs`显式bundle MCP SDK及必要依赖,拒绝除Node builtins之外的外部import并附第三方许可证。npm_source仍只pack/unpack,不执行npm install;因此`test/package-runtime.test.mjs`从无node_modules解包核可运行。宿主注册/实际Skill及MCP启动另核,普通npm install不代替。
35
35
 
36
36
  ## 相称验证
37
37
 
@@ -5,7 +5,7 @@
5
5
  从 Studio 的“连接与授权”复制当前环境的指引。在本机终端执行:
6
6
 
7
7
  ```bash
8
- npx --yes @promptframe/creation@0.2.1 connect --endpoint <Studio提供的API地址>
8
+ npx --yes @promptframe/creation@0.2.2 connect --endpoint <Studio提供的API地址>
9
9
  ```
10
10
 
11
11
  `/api` 会规范化到 `/api/mcp`;也可直接提供 `/api/mcp`。保留 Studio 实际可达的 HTTPS origin,包括私有网络域名,不把远程地址替换成本机 localhost。`0.1.1` 是历史基础包;它不支持此用户级插件引导。新版本是否已发行,以 registry 的实际版本和对应固定标签为准。
@@ -21,7 +21,7 @@ npx --yes @promptframe/creation@0.2.1 connect --endpoint <Studio提供的API地
21
21
  另一个环境或账号应由用户选择不同名称:
22
22
 
23
23
  ```bash
24
- npx --yes @promptframe/creation@0.2.1 connect --profile work-account --endpoint <另一环境API地址>
24
+ npx --yes @promptframe/creation@0.2.2 connect --profile work-account --endpoint <另一环境API地址>
25
25
  ```
26
26
 
27
27
  命名 profile 使用独立凭据和独立插件名;新桥配置固定具体凭据文件。已有文件绑定另一 endpoint 时拒绝覆盖,运行中的桥也不会热切环境。相同 endpoint 的不同账号同样用不同 profile;不要尝试从 Token 或作品名猜账号。`--config <安全文件>` 可指定已存在的私有配置,但不得把不同环境指向同一文件。
@@ -41,3 +41,9 @@ npx --yes @promptframe/creation@0.2.1 connect --profile work-account --endpoint
41
41
  安装不接管作品、不派发制作。让新聊天按 video-creation 读取当前项目、作品及 schema;已有作品正常申请本人确认,新建空作品沿用户意图。工具调用的宿主 thread 身份由 Codex 自动提供,模型不用填写身份、权限或控制版本。对原 task 的观察与新写入分开:不兼容版本的新写入应升级后再做,原任务不重派、不丢失。
42
42
 
43
43
  组件复用通过平台目录和 schema;确需开发组件时使用 README 指向的独立 authoring Skill/CLI。MCP 连接不要求安装组件四包。
44
+
45
+ ## 已有官方插件与 Node 路径变更
46
+
47
+ 已通过官方 npm 来源安装并启用的插件,`connect`核来源、缓存版本与实际MCP定义后复用现有入口和配置,不另注册第二个插件。未知手工MCP仍需明确核对;自定义配置或独立账号使用显式profile,不能借官方插件名切换其环境。
48
+
49
+ 受管入口按原安装记录核身份,不以当前Node可执行文件路径认领。相同版本继续使用已记录的Node路径;换Node后运行connect可复用原安装,需保留该旧Node以供新聊天启动。后继兼容版本采用安装该版本时的Node路径,旧版本和活动桥不被覆盖或终止。
package/lib/cli.mjs CHANGED
@@ -225,7 +225,8 @@ try {
225
225
  profile:value('--profile')??'default',configFile:configFile(),signal:signal.signal});
226
226
  log({...connection,pluginRegistered:installed.registered,version:installed.version,
227
227
  installationReused:installed.reused,profile:installed.profile,
228
- next:installed.reloadRequired?'Open a new Codex chat or reload plugins, then use the creation Skill.':'Use the creation Skill in a chat that has this plugin loaded.',
228
+ recordedRuntimeRetained:installed.recordedRuntimeRetained??false,
229
+ next:installed.recordedRuntimeRetained?'This version retains its recorded Node path. Keep that Node available; a new version uses the installer\'s current Node.':installed.reloadRequired?'Open a new Codex chat or reload plugins, then use the creation Skill.':'Use the creation Skill in a chat that has this plugin loaded.',
229
230
  hostThreadIdentity:'verified_by_the_platform_on_actual_host_tool_calls'});
230
231
  }finally{process.removeListener('SIGINT',abort);process.removeListener('SIGTERM',abort);}
231
232
  }
@@ -27,6 +27,58 @@ async function privateRead(file){
27
27
  if(!s.isFile()||s.isSymbolicLink()||s.uid!==process.getuid?.()||(s.mode&0o077)||s.size>512*1024)fail('state_invalid');
28
28
  return json(file);
29
29
  }
30
+ async function packageJSON(file){
31
+ const s=await info(file);
32
+ if(!s?.isFile()||s.isSymbolicLink()||s.size>512*1024)fail('installed_files_invalid');
33
+ return json(file);
34
+ }
35
+ function sameTransport(actual,expected){
36
+ return actual?.type==='stdio'&&actual.command===expected.command
37
+ &&typeof actual.cwd==='string'&&path.resolve(actual.cwd)===path.resolve(expected.cwd)
38
+ &&JSON.stringify(actual.args)===JSON.stringify(expected.args)
39
+ &&JSON.stringify(actual.env_vars??[])===JSON.stringify(expected.env_vars??[])
40
+ &&!Object.keys(actual.env??{}).length;
41
+ }
42
+ async function managedTransport(installed,versions,serverName,profile,configFile){
43
+ if(!installed)return null;
44
+ const root=installed.source?.path;
45
+ if(installed.source?.source!=='local'||typeof root!=='string'
46
+ ||!/^\d+\.\d+\.\d+$/.test(installed.version??'')||root!==path.join(versions,installed.version))fail('existing_registration_requires_review');
47
+ const directory=await info(root),definition=await info(path.join(root,'.mcp.json'));
48
+ if(!directory?.isDirectory()||directory.isSymbolicLink()||!definition?.isFile()||definition.isSymbolicLink())fail('installed_files_invalid');
49
+ const ready=await privateRead(path.join(root,'installation.json'));
50
+ if(!ready||ready.profile!==profile||ready.configFile!==configFile||ready.version!==installed.version)fail('existing_registration_requires_review');
51
+ const bytes=await readFile(path.join(root,'.mcp.json')),entry=ready.files?.find(x=>x.path==='.mcp.json');
52
+ if(!entry||entry.bytes!==bytes.length||entry.sha256!==hash(bytes))fail('installed_files_invalid');
53
+ const mcp=JSON.parse(bytes).mcpServers?.[serverName];
54
+ if(!mcp||typeof mcp.command!=='string'||!mcp.command||mcp.cwd!==root
55
+ ||JSON.stringify(mcp.args)!==JSON.stringify([path.join(root,'bin/promptframe-creation.mjs'),'bridge','--config',configFile]))fail('existing_registration_requires_review');
56
+ return mcp;
57
+ }
58
+ async function officialNpmInstallation(installed,servers,env,profile,configFile){
59
+ if(profile!=='default'||configFile!==profileCredentialsPath('default',env))return null;
60
+ const candidates=installed.filter(p=>p.enabled===true&&p.name==='promptframe-creation'
61
+ &&p.pluginId==='promptframe-creation@'+p.marketplaceName&&/^[a-zA-Z0-9][a-zA-Z0-9._-]{0,140}$/.test(p.marketplaceName??'')
62
+ &&/^\d+\.\d+\.\d+$/.test(p.version??'')&&p.source?.source==='npm'
63
+ &&p.source.package==='@promptframe/creation'&&p.source.version===p.version
64
+ &&['https://registry.npmjs.org','https://registry.npmjs.org/'].includes(p.source.registry));
65
+ if(candidates.length>1)fail('existing_registration_requires_review');
66
+ if(!candidates.length)return null;
67
+ const p=candidates[0],root=path.join(path.resolve(env.CODEX_HOME??path.join(homedir(),'.codex')),'plugins/cache',p.marketplaceName,p.name,p.version);
68
+ const directory=await info(root);if(!directory?.isDirectory()||directory.isSymbolicLink())fail('installed_files_invalid');
69
+ const pkg=await packageJSON(path.join(root,'package.json')),manifest=await packageJSON(path.join(root,'.codex-plugin/plugin.json'));
70
+ if(pkg.name!=='@promptframe/creation'||pkg.version!==p.version||manifest.name!==p.name||manifest.version!==p.version)fail('installed_files_invalid');
71
+ const definition=(await packageJSON(path.join(root,'.mcp.json'))).mcpServers?.promptframe;
72
+ if(!definition||definition.command!=='node'||definition.cwd!=='.'
73
+ ||JSON.stringify(definition.args)!==JSON.stringify(['bin/promptframe-creation.mjs','bridge'])
74
+ ||JSON.stringify(definition.env_vars)!==JSON.stringify(['PROMPTFRAME_CREATION_CONFIG','XDG_CONFIG_HOME']))fail('legacy_mcp_entry_requires_review');
75
+ if(servers.length!==1||servers[0].enabled!==true||!sameTransport(servers[0].transport,{...definition,cwd:root})
76
+ ||JSON.stringify(servers[0].transport.env_vars)!==JSON.stringify(definition.env_vars))fail('legacy_mcp_entry_requires_review');
77
+ // Keep the host's verified npm registration and running cache. Do not create a
78
+ // second effective plugin or delete an active cache to migrate it.
79
+ return{version:p.version,profile,configFile,pluginId:p.pluginId,versionRoot:root,currentFile:null,
80
+ reused:true,installedFiles:0,registered:true,reloadRequired:false};
81
+ }
30
82
  async function atomicJSON(file,value){
31
83
  const temp=file+'.'+randomBytes(12).toString('hex')+'.tmp';
32
84
  try{await writeFile(temp,JSON.stringify(value,null,2)+'\n',{flag:'wx',mode:0o600});await rename(temp,file);}
@@ -103,14 +155,15 @@ export async function installForUser({sourceRoot,profile='default',env=process.e
103
155
  if(previous&&(previous.profile!==profile||previous.pluginId!==pluginId||previous.configFile!==configFile))fail('profile_binding_conflict');
104
156
  const state=JSON.parse(await runCodex(['plugin','list','--json']));
105
157
  const installed=state.installed?.find(x=>x.pluginId===pluginId);
106
- if(installed&&(!installed.source?.path?.startsWith(versions+path.sep)||installed.source.source!=='local'))fail('existing_registration_requires_review');
107
158
  const legacy=JSON.parse(await runCodex(['mcp','list','--json']));
108
159
  const serverName='promptframe'+(profile==='default'?'':'-'+profile);
160
+ const servers=legacy.filter(x=>x.name===serverName);
161
+ const official=await officialNpmInstallation(state.installed??[],servers,env,profile,configFile);
162
+ if(official){if(installed||previous)fail('existing_registration_requires_review');return official;}
163
+ const recorded=await managedTransport(installed,versions,serverName,profile,configFile);
109
164
  if(legacy.some(x=>{
110
165
  if(x.name!==serverName)return false;
111
- const t=x.transport,owned=installed?.source?.path;
112
- return !(owned&&t?.type==='stdio'&&t.command===process.execPath&&t.cwd===owned
113
- &&JSON.stringify(t.args)===JSON.stringify([path.join(owned,'bin/promptframe-creation.mjs'),'bridge','--config',configFile]));
166
+ return !recorded||!sameTransport(x.transport,recorded);
114
167
  }))fail('legacy_mcp_entry_requires_review');
115
168
  const target=await info(versionRoot);
116
169
  if(target){
@@ -149,7 +202,8 @@ export async function installForUser({sourceRoot,profile='default',env=process.e
149
202
  if(observed?.version!==payload.version||observed.enabled!==true)fail('registration_unconfirmed');
150
203
  await atomicJSON(currentFile,complete);
151
204
  }
152
- return{...complete,currentFile,reused:newFiles===0,installedFiles:newFiles,registered:true,reloadRequired:!already};
205
+ return{...complete,currentFile,reused:newFiles===0,installedFiles:newFiles,registered:true,reloadRequired:!already,
206
+ recordedRuntimeRetained:Boolean(already&&recorded&&recorded.command!==process.execPath)};
153
207
  }catch(error){
154
208
  if(registrationStarted){
155
209
  // A lost command result may already have installed the complete candidate.
package/lib/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const CLIENT_VERSION = "0.2.1";
1
+ export const CLIENT_VERSION = "0.2.2";
2
2
  export const CLIENT_PROTOCOL = "creation-client/v1";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptframe/creation",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "private": false,
5
5
  "description": "PromptFrame video creation Skill, Codex plugin and MCP client bridge.",
6
6
  "repository": {