@nodaro/shared 2.21.0 → 2.21.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nodaro/shared",
3
- "version": "2.21.0",
3
+ "version": "2.21.1",
4
4
  "description": "Shared types, model catalog, wire contracts, and structural vocabularies for the Nodaro platform and SDK.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -1,3 +1,4 @@
1
+ import { T2I_TO_I2I_VARIANT } from "../model-constants.js"
1
2
  import { describe, it, expect } from "vitest"
2
3
  import { safetyRetryPolicy } from "../safety-retry-policy.js"
3
4
  import { MODEL_CATALOG, getModel } from "../model-catalog.js"
@@ -45,3 +46,17 @@ describe("safetyRetryPolicy", () => {
45
46
  }
46
47
  })
47
48
  })
49
+
50
+ describe("i2i variants inherit their base model's safety policy", () => {
51
+ it("resolves the referenced-request id (gpt-image-2-i2i) to the same policy as gpt-image-2", () => {
52
+ expect(safetyRetryPolicy("gpt-image-2-i2i")).toEqual({ maxAttempts: 2, fallback: "nano-banana-pro" })
53
+ })
54
+
55
+ it("every T2I_TO_I2I_VARIANT pair declares the same safetyFilter on both sides", () => {
56
+ for (const [t2i, i2i] of Object.entries(T2I_TO_I2I_VARIANT)) {
57
+ const base = MODEL_CATALOG[t2i]?.safetyFilter ?? null
58
+ const twin = MODEL_CATALOG[i2i]?.safetyFilter ?? null
59
+ expect({ pair: `${t2i} -> ${i2i}`, twin }).toEqual({ pair: `${t2i} -> ${i2i}`, twin: base })
60
+ }
61
+ })
62
+ })
@@ -579,6 +579,7 @@ const IMAGE_MODELS: Record<string, ModelCatalogEntry> = {
579
579
  label: "GPT Image 2 (I2I)",
580
580
  series: "GPT Image",
581
581
  description: "Image-to-image with GPT Image 2.",
582
+ safetyFilter: { stochastic: true, fallback: "nano-banana-pro" },
582
583
  useCases: ["edit", "high-res"],
583
584
  features: ["reference-image"],
584
585
  aspectRatios: GPT_IMAGE_2_RATIOS,
@@ -21,6 +21,13 @@ export const EXECUTION_DATA_KEYS: ReadonlySet<string> = new Set([
21
21
  // lifecycle as errorMessage: a RESULT the user expects to survive reload,
22
22
  // never user-edited config.
23
23
  "errorHint",
24
+ // A job policy registered by the deployment held this node's result for a
25
+ // human reviewer (`jobs.status = "pending_review"`). Pure run state, like
26
+ // executionStatus: the node is still "running" and the flag disappears the
27
+ // moment the review resolves — so it is ALSO in TRANSIENT_RUNTIME_KEYS
28
+ // below. Without the transient half, a flip into review marks a passive tab
29
+ // dirty and a preset captures "awaiting review".
30
+ "jobAwaitingReview",
24
31
  "isStreaming",
25
32
  "generatedImageUrl",
26
33
  "generatedVideoUrl",
@@ -85,6 +92,7 @@ export const TRANSIENT_RUNTIME_KEYS: ReadonlySet<string> = new Set([
85
92
  "executionStatus",
86
93
  "currentJobId",
87
94
  "currentJobProgress",
95
+ "jobAwaitingReview",
88
96
  "isStreaming",
89
97
  "subWorkflowProgress",
90
98
  "__listTotal",