image-skill 0.1.39 → 0.1.41
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/CHANGELOG.md +22 -0
- package/bin/image-skill.mjs +71 -8
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,28 @@ This changelog tracks the public `image-skill` CLI package and public skill
|
|
|
4
4
|
mirror. The npm package metadata remains the authority for tarball integrity and
|
|
5
5
|
provenance; this file is the human- and agent-readable release map.
|
|
6
6
|
|
|
7
|
+
## 0.1.41 - 2026-06-12
|
|
8
|
+
|
|
9
|
+
- Fix (activation): `create --guide` now selects executable models from the
|
|
10
|
+
compact default `/v1/models` response. The guide no longer reports
|
|
11
|
+
`no_executable_model` while the same response says executable models exist;
|
|
12
|
+
it preserves compact-row execution status, pricing, aspect-ratio fallback,
|
|
13
|
+
and input-image hints so the first no-spend dry-run handoff is usable again.
|
|
14
|
+
- Fix (payments): Stripe Checkout handoff URLs now keep redirecting to the
|
|
15
|
+
stored Stripe Checkout URL for non-expired fulfilled attempts instead of
|
|
16
|
+
surfacing the misleading plain-text `handoff database read failed` page after
|
|
17
|
+
webhook fulfillment.
|
|
18
|
+
|
|
19
|
+
## 0.1.40 - 2026-06-11
|
|
20
|
+
|
|
21
|
+
- Fix (growth): the `IMAGE_SKILL_DISCOVERY_SOURCE` attribution slug now
|
|
22
|
+
survives the guide handoff — guide-emitted fresh-process replay commands
|
|
23
|
+
(including the signup `next_command`) carry the env assignment in their
|
|
24
|
+
shell prefix, the same fresh-process-env treatment as
|
|
25
|
+
`IMAGE_SKILL_CONFIG_PATH`. Without this, a slug provided at
|
|
26
|
+
`create --guide` was lost before signup, so channel attribution read zero
|
|
27
|
+
by construction.
|
|
28
|
+
|
|
7
29
|
## 0.1.39 - 2026-06-10
|
|
8
30
|
|
|
9
31
|
- Feature (growth): **`signup --discovery-source SLUG`** (or the
|
package/bin/image-skill.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import { Readable } from "node:stream";
|
|
|
7
7
|
import { pipeline } from "node:stream/promises";
|
|
8
8
|
import os from "node:os";
|
|
9
9
|
|
|
10
|
-
const VERSION = "0.1.
|
|
10
|
+
const VERSION = "0.1.41";
|
|
11
11
|
const PACKAGE_NAME = "image-skill";
|
|
12
12
|
const DEFAULT_API_BASE_URL = "https://api.image-skill.com";
|
|
13
13
|
const DEFAULT_DOCS_BASE_URL = "https://image-skill.com";
|
|
@@ -1652,12 +1652,15 @@ async function createGuide(args) {
|
|
|
1652
1652
|
})
|
|
1653
1653
|
: null;
|
|
1654
1654
|
const selectedAspectRatio = createGuideSuggestedAspectRatio(selected);
|
|
1655
|
-
const pricing = selected
|
|
1655
|
+
const pricing = createGuideModelCreditPricing(selected);
|
|
1656
1656
|
const estimatedCredits = pricing?.credits_required ?? null;
|
|
1657
1657
|
const estimatedProviderUsdPerImage =
|
|
1658
1658
|
selected?.economics?.estimated_usd_per_image ??
|
|
1659
1659
|
pricing?.estimated_provider_cost_usd ??
|
|
1660
1660
|
pricing?.fallback_provider_cost_usd ??
|
|
1661
|
+
(typeof selected?.estimated_usd_per_image === "number"
|
|
1662
|
+
? selected.estimated_usd_per_image
|
|
1663
|
+
: null) ??
|
|
1661
1664
|
null;
|
|
1662
1665
|
const estimatedDebitUsdPerImage =
|
|
1663
1666
|
pricing?.estimated_revenue_usd ?? estimatedProviderUsdPerImage;
|
|
@@ -1856,7 +1859,7 @@ async function createGuide(args) {
|
|
|
1856
1859
|
: "create",
|
|
1857
1860
|
model_id: selected.id,
|
|
1858
1861
|
model_status: selected.status,
|
|
1859
|
-
model_execution_status: selected
|
|
1862
|
+
model_execution_status: guideModelExecutionStatus(selected),
|
|
1860
1863
|
modality: selected.modality ?? null,
|
|
1861
1864
|
suggested_aspect_ratio: selectedAspectRatio,
|
|
1862
1865
|
reason:
|
|
@@ -1924,12 +1927,12 @@ function selectCreateGuideModel(
|
|
|
1924
1927
|
) {
|
|
1925
1928
|
const isExecutableCreate = (model) =>
|
|
1926
1929
|
model?.status === "available" &&
|
|
1927
|
-
model
|
|
1930
|
+
guideModelExecutionStatus(model) === "executable" &&
|
|
1928
1931
|
Array.isArray(model?.supports) &&
|
|
1929
1932
|
model.supports.includes("create");
|
|
1930
1933
|
const isExecutableInputImageEdit = (model) =>
|
|
1931
1934
|
model?.status === "available" &&
|
|
1932
|
-
model
|
|
1935
|
+
guideModelExecutionStatus(model) === "executable" &&
|
|
1933
1936
|
Array.isArray(model?.supports) &&
|
|
1934
1937
|
(model.supports.includes("edit") || model.supports.includes("variation")) &&
|
|
1935
1938
|
createGuideSelectedModelRequiresInputImage(model);
|
|
@@ -2036,16 +2039,57 @@ function preferredCreateGuideModelIds(intentClass) {
|
|
|
2036
2039
|
}
|
|
2037
2040
|
|
|
2038
2041
|
function guideBudgetUsdForModel(model) {
|
|
2039
|
-
const pricing = model
|
|
2042
|
+
const pricing = createGuideModelCreditPricing(model);
|
|
2040
2043
|
return (
|
|
2041
2044
|
pricing?.estimated_revenue_usd ??
|
|
2042
2045
|
model?.economics?.estimated_usd_per_image ??
|
|
2043
2046
|
pricing?.estimated_provider_cost_usd ??
|
|
2044
2047
|
pricing?.fallback_provider_cost_usd ??
|
|
2048
|
+
(typeof model?.estimated_usd_per_image === "number"
|
|
2049
|
+
? model.estimated_usd_per_image
|
|
2050
|
+
: null) ??
|
|
2045
2051
|
null
|
|
2046
2052
|
);
|
|
2047
2053
|
}
|
|
2048
2054
|
|
|
2055
|
+
function guideModelExecutionStatus(model) {
|
|
2056
|
+
if (
|
|
2057
|
+
isRecord(model?.execution) &&
|
|
2058
|
+
typeof model.execution.model_execution_status === "string"
|
|
2059
|
+
) {
|
|
2060
|
+
return model.execution.model_execution_status;
|
|
2061
|
+
}
|
|
2062
|
+
return typeof model?.model_execution_status === "string"
|
|
2063
|
+
? model.model_execution_status
|
|
2064
|
+
: null;
|
|
2065
|
+
}
|
|
2066
|
+
|
|
2067
|
+
function createGuideModelCreditPricing(model) {
|
|
2068
|
+
if (isRecord(model?.economics?.credit_pricing)) {
|
|
2069
|
+
return model.economics.credit_pricing;
|
|
2070
|
+
}
|
|
2071
|
+
if (typeof model?.credits_required !== "number") {
|
|
2072
|
+
return null;
|
|
2073
|
+
}
|
|
2074
|
+
return {
|
|
2075
|
+
credits_required: model.credits_required,
|
|
2076
|
+
estimated_revenue_usd:
|
|
2077
|
+
typeof model.credits_required === "number"
|
|
2078
|
+
? model.credits_required * CREDIT_UNIT_USD
|
|
2079
|
+
: null,
|
|
2080
|
+
estimated_provider_cost_usd:
|
|
2081
|
+
typeof model?.estimated_usd_per_image === "number"
|
|
2082
|
+
? model.estimated_usd_per_image
|
|
2083
|
+
: null,
|
|
2084
|
+
fallback_provider_cost_usd: null,
|
|
2085
|
+
credit_unit_usd: CREDIT_UNIT_USD,
|
|
2086
|
+
pricing_confidence:
|
|
2087
|
+
typeof model?.pricing_confidence === "string"
|
|
2088
|
+
? model.pricing_confidence
|
|
2089
|
+
: null,
|
|
2090
|
+
};
|
|
2091
|
+
}
|
|
2092
|
+
|
|
2049
2093
|
function createGuideImplies3d(input) {
|
|
2050
2094
|
const searchable =
|
|
2051
2095
|
`${input?.intent ?? ""} ${input?.prompt ?? ""}`.toLowerCase();
|
|
@@ -2077,7 +2121,9 @@ function createGuideSuggestedAspectRatio(model) {
|
|
|
2077
2121
|
if (model?.modality !== "video") {
|
|
2078
2122
|
return null;
|
|
2079
2123
|
}
|
|
2080
|
-
const values = model?.media?.input?.aspect_ratios?.values
|
|
2124
|
+
const values = Array.isArray(model?.media?.input?.aspect_ratios?.values)
|
|
2125
|
+
? model.media.input.aspect_ratios.values
|
|
2126
|
+
: model?.aspect_ratios;
|
|
2081
2127
|
if (!Array.isArray(values)) {
|
|
2082
2128
|
return null;
|
|
2083
2129
|
}
|
|
@@ -2086,7 +2132,8 @@ function createGuideSuggestedAspectRatio(model) {
|
|
|
2086
2132
|
|
|
2087
2133
|
function createGuideSelectedModelRequiresInputImage(model) {
|
|
2088
2134
|
return (
|
|
2089
|
-
model?.media?.input?.images?.required === true
|
|
2135
|
+
(model?.media?.input?.images?.required === true ||
|
|
2136
|
+
model?.accepts_input_images === true) &&
|
|
2090
2137
|
Array.isArray(model?.supports) &&
|
|
2091
2138
|
(model.supports.includes("edit") || model.supports.includes("variation"))
|
|
2092
2139
|
);
|
|
@@ -3098,15 +3145,28 @@ function createGuideCommandPrefix(input = {}) {
|
|
|
3098
3145
|
input.configPath === undefined
|
|
3099
3146
|
? configuredImageSkillConfigPath()
|
|
3100
3147
|
: input.configPath;
|
|
3148
|
+
// Discovery-source attribution (#1814) must survive the guide handoff into
|
|
3149
|
+
// the fresh-process replay commands, or the slug dies before signup.
|
|
3150
|
+
const discoverySource = configuredDiscoverySource();
|
|
3101
3151
|
return renderShellEnvPrefixedCommand(
|
|
3102
3152
|
{
|
|
3103
3153
|
npm_config_update_notifier: "false",
|
|
3104
3154
|
...(configPath === null ? {} : { IMAGE_SKILL_CONFIG_PATH: configPath }),
|
|
3155
|
+
...(discoverySource === null
|
|
3156
|
+
? {}
|
|
3157
|
+
: { IMAGE_SKILL_DISCOVERY_SOURCE: discoverySource }),
|
|
3105
3158
|
},
|
|
3106
3159
|
"npx -y image-skill@latest",
|
|
3107
3160
|
);
|
|
3108
3161
|
}
|
|
3109
3162
|
|
|
3163
|
+
function configuredDiscoverySource() {
|
|
3164
|
+
const value = process.env.IMAGE_SKILL_DISCOVERY_SOURCE;
|
|
3165
|
+
return typeof value === "string" && value.trim().length > 0
|
|
3166
|
+
? value.trim()
|
|
3167
|
+
: null;
|
|
3168
|
+
}
|
|
3169
|
+
|
|
3110
3170
|
function configuredImageSkillConfigPath() {
|
|
3111
3171
|
const configPath = process.env.IMAGE_SKILL_CONFIG_PATH;
|
|
3112
3172
|
return typeof configPath === "string" && configPath.length > 0
|
|
@@ -4370,6 +4430,9 @@ function modelAvailabilityStatus(model) {
|
|
|
4370
4430
|
) {
|
|
4371
4431
|
return model.execution.model_execution_status;
|
|
4372
4432
|
}
|
|
4433
|
+
if (typeof model.model_execution_status === "string") {
|
|
4434
|
+
return model.model_execution_status;
|
|
4435
|
+
}
|
|
4373
4436
|
if (typeof model.availability_reason === "string") {
|
|
4374
4437
|
return model.availability_reason;
|
|
4375
4438
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "image-skill",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.41",
|
|
4
4
|
"description": "Zero-setup durable creative-media CLI for agents (image + video + audio + 3D): guide-first creation, model and cost inspection, owned URLs, JSON recovery, payments, reusable assets, and feedback.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|