@fungi.computer/prints 0.3.0 → 0.5.0
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/README.md +44 -20
- package/dist/assets/index-7_6t_G_r.js +91 -0
- package/dist/assets/index-DEn6uVuz.css +2 -0
- package/dist/index.html +2 -2
- package/package.json +10 -9
- package/dist/assets/index-DmgM95V3.js +0 -91
- package/dist/assets/index-ghHnoWMF.css +0 -2
package/README.md
CHANGED
|
@@ -24,9 +24,9 @@ Container.
|
|
|
24
24
|
- **Download** an image from Image info. The download drops the prompt and
|
|
25
25
|
lineage and keeps the AI marker and the print's id; the file on the Computer
|
|
26
26
|
stays as it is.
|
|
27
|
-
- Retry a failed attempt from its tile or from **Activity
|
|
28
|
-
|
|
29
|
-
unfinished image after a reload.
|
|
27
|
+
- Retry a failed attempt from its tile or from **Activity**, the key in the
|
|
28
|
+
window's status bar. A retry resumes the same attempt instead of generating
|
|
29
|
+
again, and **Resume** picks up an unfinished image after a reload.
|
|
30
30
|
|
|
31
31
|
<img alt="Prints on a phone in the light theme: a two-column gallery above the prompt bar" src="docs/media/gallery-phone.png" width="300">
|
|
32
32
|
|
|
@@ -77,20 +77,43 @@ Agents call Prints through Oyster's MCP endpoint, or at
|
|
|
77
77
|
`POST $OYSTER_URL/apps/prints/methods/<name>` with a key; see
|
|
78
78
|
[Git, keys and MCP](https://github.com/fungi-computer/oyster#git-keys-and-mcp).
|
|
79
79
|
|
|
80
|
-
| Method
|
|
81
|
-
|
|
|
82
|
-
| `listModels`
|
|
83
|
-
| `generateImage`
|
|
84
|
-
| `generateVideo`
|
|
85
|
-
| `
|
|
86
|
-
| `
|
|
87
|
-
| `
|
|
80
|
+
| Method | What it does |
|
|
81
|
+
| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
82
|
+
| `listModels` | Lists the image and video models, with their sizes, settings and how many references each takes. |
|
|
83
|
+
| `generateImage` | Generates one image from a prompt and saves it to the gallery folder. Optional `characters` names saved characters to keep consistent. |
|
|
84
|
+
| `generateVideo` | Generates one video. While it works, the method returns `{kind: "pending", retryAfterMs}`; call again with the same inputs after that delay. |
|
|
85
|
+
| `listCharacters` | Lists the saved characters: name, description and reference image paths. Use the names as `characters` or `@name`. |
|
|
86
|
+
| `listStyles` | Lists the saved and built-in styles: name and text. Use a name as `style`. |
|
|
87
|
+
| `listOutputs` | Lists the prints this App made, newest first. |
|
|
88
|
+
| `getOutput` | Reads one print by file path: its prompt, model, characters, style and the reference images it used. |
|
|
89
|
+
| `openOutput` | Reads up to 128 KiB of one print per call. |
|
|
88
90
|
|
|
89
91
|
Each generation carries a request id (`media_request_` and 21 lowercase letters
|
|
90
92
|
or digits). Retrying with the same id and inputs recovers the same generation
|
|
91
|
-
instead of paying for another. References are paths
|
|
92
|
-
`[{ path: "/canon/style.png" }]
|
|
93
|
-
|
|
93
|
+
instead of paying for another. References are file paths, such as
|
|
94
|
+
`[{ path: "/canon/style.png" }]`. In a host with Agent Computer attachments,
|
|
95
|
+
`{ computerId: "computer-b", path: "/canon/style.png" }` reads from any attached
|
|
96
|
+
Computer using that Computer's own read authorization. Omit `computerId` for the
|
|
97
|
+
selected Computer; the output still saves there. Revoked or denied reads stop
|
|
98
|
+
generation before provider dispatch. Callers never pass image bytes or URLs.
|
|
99
|
+
Reference reads are not confined to the App's library folder: the Computer grant
|
|
100
|
+
is the boundary.
|
|
101
|
+
|
|
102
|
+
`listModels` includes a labelled `priceEstimate` for its stated default settings
|
|
103
|
+
(including the example prompt and no references). `basis: "team-price"` includes
|
|
104
|
+
the host's current Team markup; `"provider-cost"` is an unmarked provider
|
|
105
|
+
estimate. The image result's `costMilliunits` and human-readable `receipt` use
|
|
106
|
+
Media's admitted charge, not the catalogue hint. The receipt states that charge
|
|
107
|
+
plainly; only `priceEstimate` is an estimate. Changing dimensions, steps, prompt
|
|
108
|
+
or references can change the charge.
|
|
109
|
+
|
|
110
|
+
Set optional `settings.steps` only for models whose `input.steps` is not
|
|
111
|
+
`"fixed"`; obey `input.maxSteps` where present. Omission uses the model default.
|
|
112
|
+
Refusals retain Media's bounded provider diagnostic. The typed
|
|
113
|
+
`provider.reason === "credits_exhausted"` means Cloudflare AI Gateway couldn't
|
|
114
|
+
fund the request, not a Team credit refusal. Check the account's credits and
|
|
115
|
+
billing in the Cloudflare dashboard under AI Gateway or choose a Workers AI
|
|
116
|
+
model; do not retry a `retryable: false` result.
|
|
94
117
|
|
|
95
118
|
## Build and check
|
|
96
119
|
|
|
@@ -106,12 +129,13 @@ pnpm typecheck
|
|
|
106
129
|
pnpm test
|
|
107
130
|
```
|
|
108
131
|
|
|
109
|
-
[src/MediaPane.tsx](src/MediaPane.tsx) puts the composer, gallery and
|
|
110
|
-
together. [src/media-generation.ts](src/media-generation.ts)
|
|
111
|
-
retries, [src/media-gallery.ts](src/media-gallery.ts) the
|
|
112
|
-
and [backend/prints-index.ts](backend/prints-index.ts)
|
|
113
|
-
print. The agent tools are in
|
|
114
|
-
[package.json](package.json)
|
|
132
|
+
[src/MediaPane.tsx](src/MediaPane.tsx) puts the composer, gallery and the
|
|
133
|
+
Activity status key together. [src/media-generation.ts](src/media-generation.ts)
|
|
134
|
+
owns attempts and retries, [src/media-gallery.ts](src/media-gallery.ts) the
|
|
135
|
+
gallery and uploads, and [backend/prints-index.ts](backend/prints-index.ts)
|
|
136
|
+
records each finished print. The agent tools are in
|
|
137
|
+
[backend/methods.ts](backend/methods.ts), and [package.json](package.json)
|
|
138
|
+
declares the permissions the App asks for.
|
|
115
139
|
|
|
116
140
|
## License
|
|
117
141
|
|