@promptframe/creation 0.3.12 → 0.3.13

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.
@@ -221,7 +221,7 @@ async function listAccounts({ root = localAccountsRoot(), now = Date.now() } = {
221
221
  }
222
222
 
223
223
  export function localAgentDigest(agent) {
224
- if (!agent || !['codex', 'claude-code'].includes(agent.kind) || typeof agent.sessionId !== 'string'
224
+ if (!agent || !['codex', 'claude-code', 'antigravity'].includes(agent.kind) || typeof agent.sessionId !== 'string'
225
225
  || !threadFormat.test(agent.sessionId)) throw failure('agent_required');
226
226
  return hash(JSON.stringify([agent.kind, agent.sessionId.toLowerCase()]));
227
227
  }
@@ -7,6 +7,7 @@ import {promisify} from 'node:util';
7
7
  import path from 'node:path';
8
8
  import {CreationClientError} from './credentials.mjs';
9
9
  import {compareBridgeVersions,assertBridgeCompatible,readPlatformBridgePolicy} from './bridge-negotiation.mjs';
10
+ import {SUPPORTED_HOSTS} from './host-identity.mjs';
10
11
  import {inspectRuntimePackage,RUNTIME_PACKAGE_ENTRIES,OPTIONAL_HOST_ENTRIES} from './runtime-package.mjs';
11
12
 
12
13
  const PACKAGE='@promptframe/creation',REGISTRY='https://registry.npmjs.org';
@@ -132,7 +133,7 @@ async function checkedVersionIndex(cacheRoot,metadata){
132
133
  }
133
134
 
134
135
  export async function prepareVerifiedRuntime(metadata,{cacheRoot,fetchImpl=fetch,signal,checkRuntime,hostKind='codex'}={}){
135
- if(!['codex','claude-code'].includes(hostKind))throw error('runtime_host_unsupported');
136
+ if(!SUPPORTED_HOSTS.includes(hostKind))throw error('runtime_host_unsupported');
136
137
  if(!path.isAbsolute(cacheRoot??''))throw error('runtime_cache_owner_invalid');
137
138
  metadata=checkedRuntimeMetadata({name:PACKAGE,version:metadata.version,dist:metadata},metadata.version);
138
139
  await privateDirectory(cacheRoot);
@@ -1,12 +1,13 @@
1
1
  import {spawn} from 'node:child_process';
2
2
  import path from 'node:path';
3
3
  import {CreationClientError} from './credentials.mjs';
4
+ import {SUPPORTED_HOSTS} from './host-identity.mjs';
4
5
 
5
6
  /** Relay a new session once, before this process has consumed host stdio.
6
7
  * After spawning, any failure belongs to that runtime; it never respawns or
7
8
  * falls back to another bridge which could replay an accepted business call. */
8
9
  export async function launchSelectedBridge(selection,{host,configFile,spawnImpl=spawn,env=process.env}={}){
9
- if(!path.isAbsolute(selection.root??'')||!path.isAbsolute(configFile??'')||!['codex','claude-code'].includes(host?.kind))
10
+ if(!path.isAbsolute(selection.root??'')||!path.isAbsolute(configFile??'')||!SUPPORTED_HOSTS.includes(host?.kind))
10
11
  throw new CreationClientError('creation.runtime_launch_invalid');
11
12
  let child;
12
13
  try{child=spawnImpl(process.execPath,[path.join(selection.root,'bin/promptframe-creation.mjs'),'bridge',
@@ -36,6 +36,8 @@ export async function inspectRuntimePackage(root,{entries}={}){
36
36
  if(pkg.name!=='@promptframe/creation'||!/^\d+\.\d+\.\d+$/.test(pkg.version)||plugin.version!==pkg.version)invalid('package_identity_invalid');
37
37
  const claude=files.find(f=>f.path==='.claude-plugin/plugin.json');
38
38
  if(claude&&JSON.parse(claude.body).version!==pkg.version)invalid('package_identity_invalid');
39
- return{files,version:pkg.version,hosts:claude?['codex','claude-code']:['codex'],
39
+ const antigravity=files.some(f=>f.path==='lib/antigravity-host-session.mjs');
40
+ const hosts=['codex',...(claude?['claude-code']:[]),...(antigravity?['antigravity']:[])];
41
+ return{files,version:pkg.version,hosts,
40
42
  payloadDigest:hash(JSON.stringify(files.map(({path,bytes,sha256})=>({path,bytes,sha256}))))};
41
43
  }
package/lib/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const CLIENT_VERSION = "0.3.12";
1
+ export const CLIENT_VERSION = "0.3.13";
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.3.12",
3
+ "version": "0.3.13",
4
4
  "private": false,
5
5
  "description": "PromptFrame video creation Skill, Codex plugin and MCP client bridge.",
6
6
  "repository": {
@@ -1,20 +1,24 @@
1
1
  ---
2
2
  name: creation-setup
3
- description: 安装、连接或升级 PromptFrame Creation,复用平台创作授权并检查 Codex 或 Claude Code 的 Skill 和 MCP 加载。已有连接的普通视频创作使用 video-creation。
3
+ description: 安装、连接或升级 PromptFrame Creation,复用平台创作授权并检查 Codex、Claude Code 或 Antigravity 的 Skill 和 MCP 加载。已有连接的普通视频创作使用 video-creation。
4
4
  ---
5
5
 
6
6
  # 连接 PromptFrame
7
7
 
8
8
  使用 Studio“连接与授权”提供的完整 API 地址及公开安装入口。保留用户当前环境的 origin 和 `/api`,不替换成 localhost,不从旧聊天猜另一账号或环境。
9
9
 
10
- 先确认使用 Codex 还是 Claude Code。Claude 接入使用 `connect --host claude-code`,两种宿主可共用同一 profile 凭据,插件登记分别核实。使用 Studio 对当前环境提供的固定版本;旧版入口不会因平台更新自动改变。Claude 桌面版远程连接 WSL 时,在同一 WSL 安装;没有终端命令时可通过 `--claude-bin <实际可执行文件>` 指定桌面版提供的入口,不固定桌面构建文件名。
10
+ 先确认使用 Codex、Claude Code 或 Antigravity。各宿主可共用同一 profile 凭据,插件登记分别核实。使用 Studio 对当前环境提供的固定版本。Claude 桌面版远程连接 WSL 时,在同一 WSL 安装;没有终端命令时可通过 `--claude-bin <实际可执行文件>` 指定桌面版提供的入口。
11
11
 
12
12
  <!-- creation-install-command -->
13
- 在用户本机终端运行 `npx --yes @promptframe/creation@0.3.12 connect --endpoint <Studio提供的API地址>`。需要隔离另一个环境或账号时显式加 `--profile <用户选择的名称>`;正在运行的桥不会切换。此命令管理用户级版本和 Codex 插件,不向当前项目安装依赖。优先使用 Studio 当前提供的固定推荐版本;每次重新进入此入口比较已安装版本,不后台追踪 latest,也不把旧聊天里的命令当最新版本。已安装更新版不默认降级。
13
+ 在用户本机终端运行 `npx --yes @promptframe/creation@0.3.13 connect --endpoint <Studio提供的API地址>`。需要隔离另一个环境或账号时显式加 `--profile <用户选择的名称>`;正在运行的桥不会切换。此命令管理用户级版本和 Codex 插件,不向当前项目安装依赖。优先使用 Studio 当前提供的固定推荐版本;每次重新进入此入口比较已安装版本,不后台追踪 latest,也不把旧聊天里的命令当最新版本。已安装更新版不默认降级。
14
14
  <!-- /creation-install-command -->
15
15
 
16
16
  <!-- creation-install-command -->
17
- Claude Code 使用 `npx --yes @promptframe/creation@0.3.12 connect --host claude-code --endpoint <Studio提供的API地址>`。桌面版远程连接 WSL 时,在该 WSL 执行;保留相同 profile 和有效凭据。
17
+ Claude Code 使用 `npx --yes @promptframe/creation@0.3.13 connect --host claude-code --endpoint <Studio提供的API地址>`。桌面版远程连接 WSL 时,在该 WSL 执行;保留相同 profile 和有效凭据。
18
+ <!-- /creation-install-command -->
19
+
20
+ <!-- creation-install-command -->
21
+ Antigravity 使用 `npx --yes @promptframe/creation@0.3.13 connect --host antigravity --endpoint <Studio提供的API地址>`。在同一主机核对插件已启用,再打开新对话。
18
22
  <!-- /creation-install-command -->
19
23
 
20
24
  命令会复用并验证有效凭据。首次授权或明确更换已失效凭据时,由用户在 Studio 登录并在终端的不回显输入框提供 Token;不要要求用户把 Token 粘进聊天,也不要把它写进命令参数、URL或日志。网络失败不等于授权失效,不自动轮换或覆盖凭据。