@openclaw/pixverse-provider 2026.9.5 → 2026.9.6

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.
Files changed (2) hide show
  1. package/dist/onboard.js +9 -31
  2. package/package.json +4 -4
package/dist/onboard.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { DEFAULT_PIXVERSE_REGION, PIXVERSE_BASE_URL_BY_REGION, PIXVERSE_DEFAULT_VIDEO_MODEL_REF, PIXVERSE_PROVIDER_ID } from "./constants.js";
2
- import { applyAuthProfileConfig, buildApiKeyCredential, ensureApiKeyFromOptionEnvOrPrompt, normalizeApiKeyInput, normalizeOptionalSecretInput, upsertAuthProfileWithLockOrThrow, validateApiKeyInput } from "openclaw/plugin-sdk/provider-auth-api-key";
2
+ import { applyAuthProfileConfig, buildApiKeyCredential, captureProviderApiKey, normalizeOptionalSecretInput, persistProviderApiKey } from "openclaw/plugin-sdk/provider-auth-api-key";
3
3
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
4
4
  //#region extensions/pixverse/onboard.ts
5
5
  const PROFILE_ID = `${PIXVERSE_PROVIDER_ID}:default`;
@@ -71,36 +71,22 @@ async function promptForPixVerseRegion(ctx) {
71
71
  });
72
72
  }
73
73
  async function runPixVerseApiKeyAuth(ctx) {
74
- let capturedSecretInput;
75
- let capturedCredential = false;
76
- let capturedMode;
77
- await ensureApiKeyFromOptionEnvOrPrompt({
74
+ const { input, mode } = await captureProviderApiKey(ctx, {
78
75
  token: normalizeOptionalSecretInput(ctx.opts?.pixverseApiKey) ?? normalizeOptionalSecretInput(ctx.opts?.token),
79
76
  tokenProvider: normalizeOptionalSecretInput(ctx.opts?.pixverseApiKey) ? PIXVERSE_PROVIDER_ID : normalizeOptionalSecretInput(ctx.opts?.tokenProvider),
80
- secretInputMode: ctx.allowSecretRefPrompt === false ? ctx.secretInputMode ?? "plaintext" : ctx.secretInputMode,
81
- config: ctx.config,
82
77
  env: ctx.env,
83
- workspaceDir: ctx.workspaceDir,
84
78
  expectedProviders: [PIXVERSE_PROVIDER_ID],
85
79
  provider: PIXVERSE_PROVIDER_ID,
86
80
  envLabel: "PIXVERSE_API_KEY",
87
81
  promptMessage: "Enter PixVerse API key",
88
- normalize: normalizeApiKeyInput,
89
- validate: validateApiKeyInput,
90
- prompter: ctx.prompter,
91
- setCredential: async (apiKey, mode) => {
92
- capturedSecretInput = apiKey;
93
- capturedCredential = true;
94
- capturedMode = mode;
95
- }
82
+ missingInputMessage: "Missing PixVerse API key."
96
83
  });
97
- if (!capturedCredential) throw new Error("Missing PixVerse API key.");
98
84
  const region = await promptForPixVerseRegion(ctx);
99
85
  return {
100
86
  profiles: [{
101
87
  profileId: PROFILE_ID,
102
- credential: buildApiKeyCredential(PIXVERSE_PROVIDER_ID, capturedSecretInput ?? "", void 0, capturedMode ? {
103
- secretInputMode: capturedMode,
88
+ credential: buildApiKeyCredential(PIXVERSE_PROVIDER_ID, input, void 0, mode ? {
89
+ secretInputMode: mode,
104
90
  config: ctx.config
105
91
  } : void 0)
106
92
  }],
@@ -116,18 +102,10 @@ async function runPixVerseApiKeyAuthNonInteractive(ctx) {
116
102
  envVar: "PIXVERSE_API_KEY"
117
103
  });
118
104
  if (!resolved) return null;
119
- if (resolved.source !== "profile") {
120
- const credential = ctx.toApiKeyCredential({
121
- provider: PIXVERSE_PROVIDER_ID,
122
- resolved
123
- });
124
- if (!credential) return null;
125
- await upsertAuthProfileWithLockOrThrow({
126
- profileId: PROFILE_ID,
127
- credential,
128
- agentDir: ctx.agentDir
129
- });
130
- }
105
+ if (!await persistProviderApiKey(ctx, PROFILE_ID, {
106
+ provider: "pixverse",
107
+ resolved
108
+ })) return null;
131
109
  const next = applyAuthProfileConfig(ctx.config, {
132
110
  profileId: PROFILE_ID,
133
111
  provider: PIXVERSE_PROVIDER_ID,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/pixverse-provider",
3
- "version": "2026.9.5",
3
+ "version": "2026.9.6",
4
4
  "description": "OpenClaw PixVerse video generation provider plugin.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -8,7 +8,7 @@
8
8
  },
9
9
  "type": "module",
10
10
  "peerDependencies": {
11
- "openclaw": ">=2026.9.5"
11
+ "openclaw": ">=2026.9.6"
12
12
  },
13
13
  "peerDependenciesMeta": {
14
14
  "openclaw": {
@@ -26,10 +26,10 @@
26
26
  "minHostVersion": ">=2026.5.26"
27
27
  },
28
28
  "compat": {
29
- "pluginApi": ">=2026.9.5"
29
+ "pluginApi": ">=2026.9.6"
30
30
  },
31
31
  "build": {
32
- "openclawVersion": "2026.9.5",
32
+ "openclawVersion": "2026.9.6",
33
33
  "bundledDist": false
34
34
  },
35
35
  "release": {