stillmade-sdk 0.1.4 → 0.1.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 (101) hide show
  1. package/.claude/settings.json +15 -0
  2. package/.cursor/hooks.json +11 -0
  3. package/.gitignore +2 -0
  4. package/.stillmade/sdk-baseline.json +65 -0
  5. package/AGENTS.md +29 -7
  6. package/AGENT_CONTROL.md +2 -1
  7. package/BROWSER_APPLICATIONS.md +128 -3
  8. package/GITHUB_APPLICATIONS.md +184 -1
  9. package/NATIVE_APPLICATION_ADAPTATION.md +565 -0
  10. package/PASTE_TO_LLM.md +29 -10
  11. package/PORTABLE.md +5 -4
  12. package/REMIX.md +16 -10
  13. package/SDK.md +511 -46
  14. package/UI_AESTHETIC.md +37 -6
  15. package/api-index.json +90 -0
  16. package/blocks/connected-app/versions/{1.2.0 → 1.5.0}/task-selection.js +5 -3
  17. package/blocks/connected-app/versions/{1.4.0 → 1.5.0}/view.js +4 -2
  18. package/blocks/native/sm.ai-decide/versions/1.0.0/package.js +149 -0
  19. package/blocks/native/sm.ai-write/versions/1.0.0/package.js +147 -0
  20. package/blocks/native/sm.connect-app/versions/1.0.0/package.js +55 -0
  21. package/blocks/native/sm.contact-fields/versions/1.0.0/package.js +197 -0
  22. package/blocks/native/sm.continue-if/versions/1.0.0/package.js +168 -0
  23. package/blocks/native/sm.generate-image/versions/2.1.0/package.js +101 -0
  24. package/blocks/native/sm.meta-creative/versions/1.0.0/package.js +206 -0
  25. package/blocks/native/sm.new-items/versions/1.0.0/package.js +191 -0
  26. package/blocks/native/sm.voiceover/versions/2.1.5/package.js +179 -0
  27. package/blocks/native/sm.voiceover/versions/2.1.6/package.js +179 -0
  28. package/blocks/native/sm.when/versions/1.0.0/package.js +129 -0
  29. package/blocks/native/sm.write-summary/versions/1.0.0/package.js +133 -0
  30. package/blocks/occasion-story/package.js +1 -1
  31. package/blocks/occasion-story/versions/1.0.2/package.js +1682 -0
  32. package/blocks/photo-reel-composer/versions/1.0.1/package.js +3026 -0
  33. package/blocks/release-visuals/package.js +1 -1
  34. package/blocks/release-visuals/versions/1.0.2/package.js +1500 -0
  35. package/blocks/short-form-finish/package.js +1 -1
  36. package/blocks/short-form-finish/versions/1.0.3/package.js +1026 -0
  37. package/package.json +1 -1
  38. package/packages/block-cli/cli.js +16 -1
  39. package/packages/block-cli/format.js +2 -0
  40. package/packages/block-cli/ready-gate.js +164 -0
  41. package/packages/block-platform/block-readiness.js +3 -2
  42. package/packages/block-platform/canvas.js +1 -1
  43. package/packages/block-platform/catalog.js +6 -4
  44. package/packages/block-platform/chat-requirements.js +8 -3
  45. package/packages/block-platform/collaboration.js +5 -5
  46. package/packages/block-platform/first-revenue-project-types.js +2 -2
  47. package/packages/block-platform/flow-inspection.js +2 -2
  48. package/packages/block-platform/native-application-validation-context.js +20 -0
  49. package/packages/block-platform/plain-descriptions.js +67 -0
  50. package/packages/block-platform/product-ad-variants-project-type.js +6 -3
  51. package/packages/block-platform/project-context.js +4 -4
  52. package/packages/block-platform/project-type-composer.js +21 -12
  53. package/packages/block-platform/project-type-draft.js +2 -2
  54. package/packages/block-platform/project-type-recommendations.js +1 -1
  55. package/packages/block-platform/project-types.js +9 -4
  56. package/packages/block-platform/revenue-review-project-types.js +6 -5
  57. package/packages/block-platform/segment-runner.js +35 -11
  58. package/packages/block-platform/step-groups.js +78 -0
  59. package/packages/block-platform/steps.js +12 -8
  60. package/packages/block-platform/type-workspace.js +4 -4
  61. package/packages/block-platform/workflow-loop.js +4 -0
  62. package/packages/block-platform/workspace-input-readset.js +18 -4
  63. package/packages/block-sdk/admission.js +5 -17
  64. package/packages/block-sdk/agent-inputs.js +2 -0
  65. package/packages/block-sdk/agent-inspection.js +4 -2
  66. package/packages/block-sdk/browser-application-artifacts.js +1 -1
  67. package/packages/block-sdk/browser-application-execution.d.ts +2 -2
  68. package/packages/block-sdk/browser-application-execution.js +30 -12
  69. package/packages/block-sdk/browser-application-guest.d.ts +2 -0
  70. package/packages/block-sdk/browser-application-guest.js +16 -9
  71. package/packages/block-sdk/browser-application.d.ts +12 -4
  72. package/packages/block-sdk/browser-application.js +27 -13
  73. package/packages/block-sdk/builder-contract.js +25 -17
  74. package/packages/block-sdk/capabilities.js +38 -19
  75. package/packages/block-sdk/connected-app.js +26 -6
  76. package/packages/block-sdk/connection-adapters.js +19 -2
  77. package/packages/block-sdk/contracts-core.js +8 -0
  78. package/packages/block-sdk/contracts.js +9 -5
  79. package/packages/block-sdk/document-drafts.js +7 -1
  80. package/packages/block-sdk/document-store-binding.js +2 -1
  81. package/packages/block-sdk/file-bundle.js +4 -1
  82. package/packages/block-sdk/first-party-packages.js +18 -2
  83. package/packages/block-sdk/generation-catalog.js +3 -2
  84. package/packages/block-sdk/index.d.ts +20 -1
  85. package/packages/block-sdk/index.js +1 -0
  86. package/packages/block-sdk/native-application-package.d.ts +22 -0
  87. package/packages/block-sdk/native-application-package.js +77 -0
  88. package/packages/block-sdk/native_adapter.py +76 -0
  89. package/packages/block-sdk/package.json +1 -0
  90. package/packages/block-sdk/pipeline-runtime-host.d.ts +2 -0
  91. package/packages/block-sdk/project-flow-contract.js +2 -0
  92. package/packages/block-sdk/remix-policy.js +3 -1
  93. package/packages/block-sdk/resolver-admission.js +17 -0
  94. package/packages/block-sdk/runtime.js +4 -1
  95. package/packages/block-sdk/schema-fields.js +34 -2
  96. package/packages/block-sdk/semantic-relationships.js +14 -0
  97. package/packages/block-sdk/shared-controls.js +3 -1
  98. package/packages/block-sdk/shared-view.js +6 -1
  99. package/packages/block-sdk/source-rights.js +6 -5
  100. package/packages/block-sdk/testing.js +3 -0
  101. package/packages/design-system/theme.css +12 -3
@@ -0,0 +1,565 @@
1
+ # Native applications within a universal Block system
2
+
3
+ ## Native adapter authoring contract — September 30 continuation
4
+
5
+ Create now prepares source-backed native adapter drafts through a bounded LLM
6
+ service after preferred browser routes. On supported installed desktops, Create
7
+ now connects managed setup, a real isolated CMake build and bounded evidence-driven
8
+ repair. Application installation and admission remain unavailable until the
9
+ independent runtime review path is implemented. See
10
+ `../../artifacts/repository-acceptance/github-native-authoring-2026-09-30/README.md`
11
+ for actual trials, rejected replies, costs and verification boundaries.
12
+
13
+ The user-authorized application importer uses exact GPT-5 mini through the
14
+ trusted provider adapter at $0.25/million input and $2/million output tokens.
15
+ Native turns allow up to 8192 completion tokens including reasoning; browser turns
16
+ remain 4096. Model response formatting is guidance, never admission. The backend
17
+ retains worst-case dispatch reservations and enforces account/global/source money
18
+ limits across the old and new model history. Desktop HTTP authoring additionally
19
+ fences canonical account/source lifetimes to nine turns without client reset IDs;
20
+ reserved/unknown dispatches block further calls. Confirmed, trusted, metered
21
+ truncation can request a bounded revision without losing incurred expense.
22
+
23
+ The base local builder verifies pinned complete source and submodules, root-sealed
24
+ host helpers, toolchain identity, offline systemd isolation, observed cgroup limits,
25
+ independently frozen artifact capture, and empty cgroup teardown. A real cJSON
26
+ build is retained in `native-cmake-cjson-r8/result.json` under the linked acceptance
27
+ folder. This proves compilation and capture only. Existing Qt/native application
28
+ requirements, adapter materialization, application behavior, native admission,
29
+ multiplayer and connected export still need actual integration and verification.
30
+
31
+ The implemented Python lifecycle API is `NativeAdapter` from `native_adapter`
32
+ (`packages/block-sdk/native_adapter.py`). Import this class; do not redefine it.
33
+ Register `{ 'checkpoint': handler, 'execute': handler }`, retain the adapter and
34
+ event-loop timer, and call `poll()` from the actual application event loop.
35
+ Handlers receive one payload dictionary and must return the boolean `True` only
36
+ after the real save/export completes. Copying an old project file or writing a
37
+ simulated output cannot establish persistence or export.
38
+
39
+ The launch request must load the adapter: either launch the declared adapter
40
+ entrypoint or pass its declared relative path through the application's inspected
41
+ startup hook. An unused file cannot implement lifecycle handlers. A launcher
42
+ entrypoint must actually start the original application; referencing its own name
43
+ alone does not establish that behavior. Implicit startup-file mechanisms require
44
+ application-owned launcher glue and independent execution verification.
45
+
46
+ `execute` receives exactly one payload dictionary. `operation` is a string ID,
47
+ and `stateRevision` is a string. `outputFiles` is an array of
48
+ `{port,path,mimeType}` entries. Each supplied path is a fresh relative
49
+ `.stillmade-exports/<executionId>/...` location below `/work`; use that request's
50
+ path rather than overwriting a saved document or reusing a template output.
51
+
52
+ `documentPaths` and build artifacts are arrays of literal relative path strings,
53
+ never globs or descriptor objects. Export operations are exactly
54
+ `{id, files: [{port, path, mimeType}]}`; typed ports belong at the top level.
55
+ `testInput` maps scalar/JSON port names directly to values, without invented
56
+ media references. State guidance is prose, not an unvalidated state document.
57
+ Each operation must capture its declared outputs without aliasing saved documents.
58
+ Build/dependency/launch declarations are requests for independently verified host
59
+ support, never authority to run installers or host commands.
60
+
61
+ Source citations must identify actually inspected, Git-verified bytes. The host
62
+ may inspect known unread files cited by a candidate within the same cumulative
63
+ source budget, then request a revised declaration. Invalid/unknown/out-of-scope
64
+ paths never gain access. Initial API discovery and symbol/line summaries are
65
+ generic heuristics and do not prove feature parity or callable ABI compatibility.
66
+
67
+ JSON formatting does not establish conformance. The host validates every reply
68
+ and retains incomplete source/feature/runtime evidence explicitly. Unknown model
69
+ dispatch stops retries. A fully received, independently metered truncated reply
70
+ retains its maximum reservation and records its expense before a bounded shorter
71
+ revision; copied or model-supplied expense claims cannot authorize that revision.
72
+
73
+ Native authoring requests a host-registered JSON Schema using a process-local
74
+ handle, not provider parameters supplied by source or a client. The response is
75
+ exactly one of `{plan:{...}}`, `{inspect:[...]}` or `{findPaths:{...}}`.
76
+ Formatting schemas have a bounded context allowance included before reservation.
77
+ Provider-side grammar bounds may be simpler than host bounds; all source, size,
78
+ type and lifecycle checks still apply independently. The live cheap-model trials
79
+ demonstrate that a well-shaped plan can contain fabricated application code.
80
+ Such drafts remain unbuilt, uninstalled and unverified.
81
+
82
+ Runtime direction and isolated development proof, updated 2026-09-30. A bounded
83
+ offline native **compute** profile, source preflight, experimental native GUI
84
+ supervisor and shared host draft lifecycle are implemented and locally tested.
85
+ Automatic native installation and full application import remain **unimplemented**.
86
+ Use with GITHUB_APPLICATIONS.md, DESKTOP_EXECUTION.md, WORKSPACE_SYNC.md and
87
+ BROWSER_APPLICATIONS.md. Existing releases and host adapters remain intact.
88
+
89
+ ## One contract, several execution environments
90
+
91
+ StillMade should own one project/workflow contract above interchangeable,
92
+ versioned execution profiles: isolated JS/recipes, browser applications, native
93
+ compute jobs, native interactive sessions, and trusted external capabilities.
94
+ The LLM writes repository-owned adapters; it does not implement security policy
95
+ or invent an executable grant. A profile is a host implementation, not a string
96
+ that makes arbitrary code supported.
97
+
98
+ Separate two decisions: **where the engine runs** (device or hosted worker) and
99
+ **how the interface is presented** (Block-owned web UI or native UI stream).
100
+ Natron can preserve its Qt interface in an isolated native session while
101
+ StillMade presents that session inside the Block. A generated web control panel
102
+ can offer common operations, but it is not full-interface parity. A renderer-only
103
+ job is useful and remains explicitly distinct from an application import.
104
+
105
+ The browser cannot directly load the native desktop executable and its OS,
106
+ Python, OpenFX and graphics dependencies. Qt supports WebAssembly, but a port
107
+ requires a compatible build and dependency closure; native plugins do not become
108
+ browser plugins automatically. Do not classify C++ itself as impossible in a
109
+ browser. See https://doc.qt.io/qt-6/wasm.html .
110
+
111
+ For a broad native family, evaluate an isolated Linux VM/worker first, with an
112
+ optional display server and authenticated display/input channel. Start with CPU
113
+ software rendering. A container alone is not the complete isolation policy for
114
+ hostile repositories. OS-specific binaries and GPU workloads need separate
115
+ profiles. Do not assume Firecracker provides a GPU or a remote desktop: those
116
+ are separate choices. No hosting purchase, worker deployment or paid compute is
117
+ authorized by this proposal.
118
+
119
+ ## Runtime adapter boundary
120
+
121
+ Use the existing execution envelope/receipt design; do not add a second Revolver.
122
+ Each profile must implement a common lifecycle equivalent to prepare, open,
123
+ applyInputs, execute, checkpoint, restore, cancel and dispose. These names are a
124
+ proposed common interface, not new callable SDK APIs.
125
+
126
+ The host supplies exact package/source/build/dependency/profile identities,
127
+ project and placement scope, an input/state revision, scoped artifact handles,
128
+ operation, timeout, resource ceilings, and budget authorization where relevant.
129
+ The guest returns progress, checkpoint candidates and output candidates. The
130
+ host independently validates/materializes output and issues the accepted
131
+ receipt; repository code cannot mint proof or expose credentials.
132
+
133
+ Typed ports and semantic compatibility remain in the current resolver. Media
134
+ moves between runtimes as durable content/version-bound host assets, not guest
135
+ paths, screenshots or temporary URLs. A video preview is separate from a
136
+ completed typed video output. Changed inputs/state, revocation and cancelled
137
+ runs invalidate late publication.
138
+
139
+ A native rendering success does not automatically qualify existing rendering
140
+ bridges for migration. Browser, native, ComfyUI and provider-backed execution can
141
+ share the outer lifecycle while retaining their current executors and trusted
142
+ billing/approval boundaries. Migrate behind adapters incrementally and preserve
143
+ saved releases, installed pins and output meanings.
144
+
145
+ ## Scope and reusable adaptation procedure
146
+
147
+ 1. Pin repository, submodules, dependencies and build image; inspect source and
148
+ licenses as untrusted data. Inventory the actual application and establish
149
+ an independent representative baseline.
150
+ 2. Check a browser build first, including existing web interfaces and feasible
151
+ WebAssembly ports. Detect dependencies and choose an **implemented** profile.
152
+ Root build clues now produce browser candidates or native requirements in
153
+ the existing inspection response. They never set `desktopOnly:true` or
154
+ authorize installation. No LLM call is needed for this bounded evidence
155
+ check; it is not a build test or complete static analysis.
156
+ 3. Write a Block-owned adapter against the app's genuine document/operation APIs.
157
+ Build in a disposable worker without credentials or unrestricted host mounts.
158
+ Map dependencies and output artifacts explicitly.
159
+ 4. Map editable state: native documents plus asset closure, schema version,
160
+ migrations, checkpoints and authority over the current revision. Arbitrary
161
+ XML/binary project files cannot be made collaborative by generic JSON merging.
162
+ 5. Prove one producer → application → consumer, save/reopen, two placements,
163
+ pending-edit/stale result rejection, cancellation, revocation and failure.
164
+ 6. Test hostile filesystem/network/process requests and CPU, memory, scratch
165
+ disk, time and concurrency limits. Verify bounds during execution, not only
166
+ after output is produced. Price/reserve aggregate paid execution in the host.
167
+ 7. Admit only the exact tested artifact/profile. Reports and fixtures are never
168
+ execution evidence. Return precise missing support when a gate fails.
169
+
170
+ ### Dependency closure and behavioral repair
171
+
172
+ A successfully linked application is not a complete application. Inspect runtime
173
+ plugin discovery, optional build features, dynamically loaded modules, data files,
174
+ color configurations and document asset references. Record which features were
175
+ actually compiled and exercise the features promised by the imported application.
176
+ Do not silently disable missing dependencies to obtain a smaller passing build.
177
+ A deliberately partial development build must remain an unadmitted probe.
178
+
179
+ Plugin lookup names can disagree with the executable's architecture. The pinned
180
+ Natron OpenFX host, for example, chooses a Linux lookup folder from pointer width.
181
+ An AArch64 plugin can require the legacy `Linux-x86-64` folder label. Derive this
182
+ from the pinned loader source and inspect the real binary architecture; a folder
183
+ name must never authorize cross-architecture execution or an emulation runtime.
184
+ Keep layout adjustments in the package adapter, not a per-application host branch.
185
+
186
+ Separate build, discovery, factory creation, operation, artifact capture and
187
+ semantic validation. Each can fail after the preceding stage succeeds. A void
188
+ render call or an adapter's `completed` response does not prove a file was written.
189
+ Missing or invalid artifacts fail the operation before publication or downstream
190
+ handoff. Preserve bounded diagnostics and the real application interface when
191
+ possible, so repair uses the observed failure rather than guessing from metadata.
192
+ Diagnostics and repository text remain untrusted model context and confer no
193
+ permission, runtime admission or output authority.
194
+
195
+ Use different resource profiles for building and interactive application use.
196
+ Do not expand an interactive session's lifetime, scratch or output allowance to
197
+ accommodate a compiler. Dependency provisioning is a trusted host operation;
198
+ repository recipes and generated requests cannot choose arbitrary root installers.
199
+ Managed setup also needs a live storage check and actionable recovery. A transient
200
+ storage failure is not evidence that a repository itself is incompatible.
201
+
202
+ For multiplayer, either map application operations to a shared host document
203
+ with tested conflict semantics, or implement a host-enforced exclusive editor
204
+ lease with viewers, expiry, takeover, checkpoints and recovery. The latter can
205
+ be an honest initial collaborative mode, but it is not simultaneous editing and
206
+ is not available just by declaring it. Current Natron shared controls/project IDs
207
+ do not establish shared native project content across devices.
208
+
209
+ ## Implemented development proof
210
+
211
+ `scripts/native-worker` implements `linux-native-offline/1` in a separate local
212
+ Linux VM with no host mounts. A root-owned supervisor starts each operation as
213
+ a fresh unprivileged systemd job. One job runs at a time. Fixed policy denies
214
+ network and host credentials and enforces 100% CPU, 512 MiB memory, no swap,
215
+ 64 tasks, 96 MiB total temporary filesystems, and a 60-second wall limit.
216
+ Repository code cannot provide process options or change those limits.
217
+
218
+ `native-application.js` and `native-application-execution.js` validate bounded
219
+ content-hashed packages, scalar typed ports and exact execution/state receipts.
220
+ The trusted host checks permission before dispatch and publication, retains
221
+ private completion records, serializes placement state, rejects replay and
222
+ rejects retained outputs after the current state changes. The existing
223
+ experimental planner/segment-runner boundary carries these operations; there
224
+ is no new Revolver or per-engine execution branch.
225
+
226
+ The unrelated BSD-licensed `blocks/repository/inih` compiles its pinned upstream
227
+ C parser inside this worker and passes genuine output to a connected consumer.
228
+ Real acceptance covers save/reopen, a second run using committed state, two
229
+ isolated placements and stale-output rejection. Hostile probes cover filesystem
230
+ and network denial, scratch exhaustion, memory exhaustion, timeout, cancellation
231
+ and descendant cleanup. See `artifacts/repository-acceptance/native-inih`.
232
+
233
+ This is **development-only**, not public admission. The VM's base system is
234
+ readable, and its trusted supervisor is outside the job sandbox; the physical
235
+ host's files are not mounted. Supervisor source hashes are checked, but the
236
+ entire runtime/dependency image is not yet an immutable release. Provisioning
237
+ uses distribution packages and must become a verified runtime artifact before
238
+ shipping. Crash-lock reconciliation, retained-result garbage collection,
239
+ distributed leases, GUI sessions and media materialization remain missing.
240
+ Ambiguous completion blocks retry. No paid capabilities or spending authority
241
+ are exposed. Generic SDK installation still rejects this experimental runtime.
242
+
243
+ This library proof does not claim inih cannot run in a browser. It deliberately
244
+ tests native portability without teaching the host a particular repository.
245
+
246
+ ## Next proof, kept small
247
+
248
+ Move Natron behind this package-owned compute boundary after adding a trusted
249
+ media materializer and a verified build for the worker architecture. Its
250
+ existing macOS rendering bridge is tested separately and has weaker resource
251
+ limits; it is not migrated by this work. Then add an optional native UI stream
252
+ and tested editing-lease/checkpoint path. GPU support follows measured need.
253
+ Existing provider and browser Blocks retain their executors during migration.
254
+
255
+ The most universal product is a browser-accessible StillMade host with optional
256
+ local and hosted workers behind this contract. Desktop/local execution can avoid
257
+ hosted compute expense; hosted execution can reach devices unable to run the
258
+ engine. Neither location guarantees arbitrary OS/GPU/plugin compatibility or
259
+ nontechnical usability of the original native interface.
260
+
261
+ ## Local setup and download experience
262
+
263
+ Prefer a proven browser route. If only a tested desktop profile is available,
264
+ show **Desktop only**, explain what it does and offer **Set up on this device**.
265
+ Show download size, required disk space and supported devices before setup.
266
+ The user should not install compilers, Qt, Python or plugins individually.
267
+
268
+ Use one app-managed StillMade data root (normally the OS application-data
269
+ folder), with `runtimes`, `blocks`, `projects` and `cache` underneath. Provide
270
+ Open folder, Repair and Remove downloaded files controls. Never delete saved
271
+ projects when clearing runtime downloads. Reuse exact compatible runtimes
272
+ between Blocks, and retain versions needed by saved projects.
273
+
274
+ Setup must verify host-approved hashes/signatures, dependency closure and
275
+ platform compatibility; extract safely; install atomically; probe isolation;
276
+ and enable only the exact admitted runtime. Use the existing dependency-store
277
+ machinery rather than letting an LLM invent download URLs or execute installers.
278
+ That machinery does not yet provide this complete activation flow. The proof
279
+ uses a separate developer VM, not the final managed StillMade folder layout.
280
+
281
+ Execute locally by default with no automatic cloud fallback or provider calls.
282
+ Cloud hosting is a future opt-in only when explicitly justified and authorized.
283
+ Local execution still uses the user's storage, CPU and memory. A phone/browser
284
+ without an eligible local worker should explain the desktop requirement, not
285
+ silently rent a server. Shared project state and Revolver port contracts remain
286
+ the same; live native-session ownership still requires the missing lease work.
287
+
288
+ ## New source-preflight helper
289
+
290
+ `packages/block-sdk/repository-runtime-preflight.js` exports
291
+ `repositoryRuntimePreflight(source)` and `NATIVE_APPLICATION_SUPPORT_GATES`.
292
+ The server passes blob-verified source from the same cumulative-budget inspector.
293
+ It reads at most six root build files / 128 KiB; nested dependency/example build
294
+ files do not independently classify the application. It returns source identity,
295
+ Git blob/SHA-256/line evidence, reasons and next actions, always
296
+ `installable:false`, `execution:'not-run'`, `inventoryComplete:false`.
297
+
298
+ A miss means further inspection, never browser compatibility. Conditional build
299
+ branches may match and need deeper analysis. A hit does not reject alternative
300
+ verified ports forever. Neither this helper nor its host gate checklist executes
301
+ or authorizes anything. No runtime is granted by repository/model declarations.
302
+
303
+ This additive guide/helper is staged for integration with the active SDK work.
304
+ It has not been added to published/downloaded SDK archives or deployed docs.
305
+
306
+
307
+ ## September 30 interactive development evidence
308
+
309
+ `scripts/native-session` now implements a separate experimental
310
+ `linux-native-interactive-offline/1` supervisor primitive. It is not a supported
311
+ installation runtime. See its README and the September 30 section of
312
+ `GITHUB_APPLICATION_AUTHORING_2026-09-28.md` for live evidence and remaining
313
+ product requirements. The original Natron UI now accepts real input in an
314
+ isolated session, and native document edits survive a fresh-session restore.
315
+
316
+ Reusable guidance for authors and runtime implementers:
317
+
318
+ - Specify the native document and asset closure, not just UI screenshots or
319
+ scalar settings. Verify a UI edit changes serialized application state, then
320
+ restore and edit it again to disprove copied/fixed output. A candidate
321
+ checkpoint is not an accepted typed output or multiplayer commit.
322
+ - Native account lookups need scoped OS metadata even when there are no user
323
+ credentials. Supply that metadata independently in the host profile; do not
324
+ expose userdb/system-bus authority or weaken isolation to obtain a name.
325
+ - Native interface preservation includes popup focus and mouse gestures. A
326
+ framebuffer alone is insufficient. Any trusted window manager must disable
327
+ command-launching/autostart paths accessible to untrusted application input.
328
+ - Keep application and trusted display/helper identities separate. Authoring
329
+ code cannot select systemd properties, mounts, credentials or resource limits.
330
+ - Reobserve transient process-group errors during cleanup. Unreadable
331
+ observations do not prove termination, and an unresolved fence cannot be
332
+ cleared or retried by the repository adapter.
333
+
334
+ This guide adds no callable permission or runtime grant. The existing outer
335
+ Block contracts and admission checks still apply. Native media export, managed
336
+ setup, actual app installation, multiplayer and Revolver acceptance remain
337
+ unverified for this interactive prototype.
338
+ ## Shared host lifecycle and native checkpoints — September 30
339
+
340
+ Native and browser sessions now reuse
341
+ `desktop/application-session-authority.js` for permission checks, bounded
342
+ operations, cancellation, late transport disposal and termination quarantine.
343
+ The experimental native draft controller uses the same host revision-store
344
+ interface as the browser controller, rather than a separate native workflow.
345
+ Its exact bindings include package, application, runtime and input identities,
346
+ with project/placement separation and application/runtime-bound restore bytes.
347
+ This is trusted host code, **not an adapter capability or runtime admission**.
348
+ Repository code must not import or supply its authority/transport callbacks.
349
+
350
+ Native checkpointing must capture all declared document files under one freeze,
351
+ retain that freeze through revision acceptance and resume only the exact named
352
+ checkpoint. Permission loss or conflicting state must stop the session. The
353
+ supervisor implements that protocol for one to eight files, with a 4 MiB total
354
+ decoded byte cap; the draft controller also caps encoded JSON at 4 MiB. Larger
355
+ projects need scoped host artifact storage, not an unbounded state payload.
356
+ Snapshot capture does not flush dirty UI state: adapters still need a bounded
357
+ native-save handshake, verified against the real application's saved result.
358
+
359
+ A live Natron test uses this shared lifecycle for actual UI edits, save/reopen,
360
+ revocation hooks and conflicting-save termination. See
361
+ `artifacts/repository-acceptance/natron-native-draft-2026-09-30`. It is a manual
362
+ development adapter and persistent local fixture store, not server permission,
363
+ multiplayer, installation, automatic authoring or Revolver/export acceptance.
364
+ No source/runtime gate was relaxed and no native output receipt was issued.
365
+
366
+ The live conflict test exposed frozen-unit shutdown failure. Explicitly thawing
367
+ the fenced application before stopping its units fixes that case; empty-cgroup
368
+ confirmation still controls fence release. Automatic reconciliation after a
369
+ supervisor crash remains missing and must verify owner/session identity and all
370
+ descendants before allowing another session. Existing root-private locks must
371
+ never be cleared just because an observation or operation timed out.
372
+ ## Native adapter save handshake — September 30
373
+
374
+ The experimental GUI supervisor now provides a private, read-only mounted
375
+ control directory at `/run/stillmade-adapter`. This is an application protocol,
376
+ not a privileged SDK service or normal import/runtime grant. The SDK archive
377
+ includes `packages/block-sdk/native_adapter.py` as unprivileged adapter source.
378
+ Ship the exact helper as `native_adapter.py` in the sealed application package.
379
+ Equivalent handlers can use this JSON/Unix-socket wire in another language;
380
+ Python and Qt are not requirements of the host channel.
381
+
382
+ Register application-owned handlers and call `NativeAdapter.poll()` from the
383
+ application's own event loop. GUI API calls must run on the correct GUI thread.
384
+ A Qt adapter can keep a `QTimer` and adapter instance alive for the session,
385
+ connect the timer to `poll`, and provide a `checkpoint` handler that saves the
386
+ live application document to the declared paths under `/work`. Return `True`
387
+ only after the actual save succeeds. Missing handlers, explicit failures and
388
+ acknowledgement timeouts stop the host operation; there is no fallback that
389
+ silently captures old files as a successful save.
390
+
391
+ `context.json` supplies schema version 1, protocol
392
+ `stillmade.native.adapter/1`, session ID and sealed application SHA-256. Each
393
+ host `request.json` contains schema version, those exact identities, a fresh
394
+ request UUID, action and bounded JSON payload. The current save payload is
395
+ `{"documentPaths":["native-document.ntp"]}`. Reply through `response.sock` with
396
+ the exact identities/nonce and phase `completed`, or phase `failed` plus a
397
+ bounded message. No outputs, asset IDs, permissions or execution receipts may
398
+ be supplied in that acknowledgement. The host removes the endpoint and request
399
+ after each exchange. The `execute` wire action is available to the experimental
400
+ host export primitive below; it still provides no native runtime admission or
401
+ ordinary installed-Block execution by itself.
402
+
403
+ Requests are at most 32 KiB; replies 8 KiB; acknowledgement time is five seconds
404
+ by default and at most ten; each session has at most 64 adapter requests. The
405
+ socket permits the observed application UID; its parent and control files are
406
+ host-owned and the application mount is read-only. The SDK marks a request
407
+ consumed before invoking its handler, so uncertain acknowledgements do not
408
+ repeat a save on a later event-loop tick. Host cancellation joins endpoint
409
+ cleanup. There is no network, filesystem, credential or spending proxy.
410
+
411
+ The shared native draft host requests a save, rechecks authority, freezes the
412
+ application and captures independently bounded files, then accepts state only
413
+ through its revision store. An acknowledgement is untrusted: it establishes
414
+ neither valid content nor output authority. Format/behavior review and artifact
415
+ materialization remain separate requirements.
416
+
417
+ ### Experimental native export boundary
418
+
419
+ An application-owned `execute` handler receives a declared operation, bounded
420
+ typed inputs, a saved-state revision/digest, an execution ID and output mappings
421
+ `{port,path,mimeType}`. Each path is relative to `/work` and starts with the
422
+ host-created `.stillmade-exports/<executionId>/` directory. Create needed
423
+ directories inside private scratch and use these fresh paths when invoking the
424
+ real application's export API. Do not return an existing asset ID or old export
425
+ path. Verify the actual operation succeeded before acknowledging; a void render
426
+ call alone is insufficient. The host separately captures the declared files.
427
+
428
+ The optional host composition binds an additional export-contract digest to
429
+ package, application, runtime and input approval. It persists a pending dispatch
430
+ before execution, rechecks the exact revision/dispatch, flushes the final native
431
+ documents, then captures documents and output files under one retained cgroup
432
+ freeze. A trusted format/storage materializer validates and stores the bytes;
433
+ only an atomic host commit can accept typed outputs and the new state together.
434
+ Receipt and artifact identities are host-owned. The application acknowledgement
435
+ cannot mint them. Draft-only compositions remain unable to export.
436
+
437
+ Current host preparation supports scalar/JSON and verified PNG image inputs,
438
+ and UTF-8, JSON and bounded PNG output candidates. Other media inputs and output
439
+ formats still need their own trusted materializers. PNG uses the existing application output
440
+ materializer, including full decode limits and stored-byte readback. This is
441
+ not a new native runtime grant or proof of complete application functionality.
442
+ The host constructor/journal/storage callbacks are private implementation APIs;
443
+ an LLM adapter must not import or implement them.
444
+
445
+ Connected image inputs require `asset.read`, an exact input digest and a trusted
446
+ project/asset-version storage reader. The authoritative store resolves the actual
447
+ project owner separately from the editor actor; a collaborator is not assumed to
448
+ own the project's assets. The host reuses full PNG decode and stored byte
449
+ validation, enforces a 4 MiB aggregate input limit and rechecks authority before
450
+ starting the application. It independently binds captured input hashes to
451
+ the approved references. The application receives read-only `/inputs/<port>.png`
452
+ files and operation values `{kind,path,mimeType,width,height,bytes,sha256}`;
453
+ asset IDs, version IDs and storage URLs are not passed into application code.
454
+ Inputs are distinct from `/restore` documents and writable `/work` output files.
455
+ The input reader is a private host callback, not an SDK network/filesystem grant.
456
+ Filesystem/decode checks pass with a fixture transport; the new `/inputs` native
457
+ mount and actual Natron connected input have not yet been live verified.
458
+
459
+ The focused native checks include filesystem/materializer lifecycle tests,
460
+ not native application acceptance. They exercise actual captured files, decoded
461
+ PNG storage, typed text consumption and rejection of missing/invalid artifacts,
462
+ stale revisions, revocation, cancellation, forged acknowledgements and storage
463
+ mismatches. Their transport is a fixture. Normal installation, server dispatch
464
+ and editor leases, crash reconciliation, artifact cleanup after uncertain
465
+ acceptance and actual native connected export remain unverified or unimplemented.
466
+ Pending dispatches must be reconciled by the trusted host; timeout never permits
467
+ an automatic fresh retry.
468
+
469
+ Actual Natron acceptance, using a manual application-owned Qt adapter, verifies
470
+ that the first file does not exist until StillMade's save request; an unsaved GUI
471
+ node edit leaves the old file unchanged; the host request writes the new node;
472
+ and reopen/edit/save writes another node. No native Save keyboard shortcut was
473
+ used. Source/evidence are in
474
+ `artifacts/repository-acceptance/natron-native-adapter-save-2026-09-30`. Normal
475
+ installation, automatic authoring, server leases and connected exports remain
476
+ unverified. This supersedes the earlier dirty-UI-save gap for this experimental
477
+ protocol; it does not establish full native application import.
478
+
479
+ ### Runtime data is a dependency
480
+
481
+ Inspect installation instructions for non-code resources as well as libraries:
482
+ color profiles/LUTs, fonts, templates, schemas and support files can determine
483
+ whether an application actually works. Record exact repositories/commits,
484
+ selected complete resource trees, notices and how the application locates them.
485
+ Never disable the intended feature or invent replacement data to conceal a
486
+ missing dependency. A selected data profile is not the full executable closure
487
+ or permission to launch/install anything.
488
+
489
+ The private host acquisition helper `github-data-dependency.mjs` verifies selected
490
+ ordinary data files against a complete pinned Git inventory and applies one
491
+ aggregate request, byte and deadline budget across batches. Executable modes,
492
+ links, unresolved submodules and sensitive paths are rejected by this profile.
493
+ Existing quarantine, bundle and Linux materialization checks remain in effect.
494
+ Other dependency types require their proper verification/admission path; an
495
+ adapter cannot treat arbitrary installers as data.
496
+
497
+ Actual Natron testing exposed a missing separately documented OpenColorIO
498
+ configuration. Adding its verified complete Natron data profile resolved the
499
+ failed PNG reader/writer render, and decoded output pixels matched the input.
500
+ The captured PNG also passed shared materialization/readback and an offline
501
+ Revolver/SDK consumer check. This is a prerequisite verified with a manual
502
+ adapter, not full compositing, normal native installation or automatic import.
503
+
504
+ ### Experimental headless CMake build family
505
+
506
+ Native builds and interactive application sessions are separate runtime families.
507
+ The private `linux-cmake-offline/1` preparation accepts an exact sealed Git source
508
+ bundle, pinned CMakeLists.txt, bounded definitions/targets and candidate output
509
+ paths. It independently rechecks every source entry against the complete bundle
510
+ inventory before invoking a fixed toolchain. It does not accept installers,
511
+ network grants, mounts, principals or caller-selected resource limits.
512
+
513
+ The host profile uses an unprivileged isolated unit without a display socket,
514
+ offline networking, read-only source, 512 MiB scratch, 1.5 GiB memory, zero swap,
515
+ 128 tasks, 150% CPU quota and a 1,200-second deadline. Observed kernel memory,
516
+ swap, CPU and task limits must match policy. Interactive session limits remain
517
+ unchanged. Candidate files are independently captured through descriptor-relative
518
+ reads while the actual cgroup is frozen, with per-file and aggregate byte limits.
519
+ The unit must be stopped and its cgroup empty before the durable build fence can
520
+ be released. Uncertain teardown retains the fence instead of starting a retry.
521
+
522
+ Build-authored result JSON is untrusted. Neither a successful build nor captured
523
+ binaries grant runtime admission, installation or proof of application behavior.
524
+ Toolchain/runtime closure, artifact platform/ABI checks and actual application
525
+ acceptance remain separate. This private preparation is not yet wired to the
526
+ production workflow journal, aggregate resource lease, managed setup or automatic
527
+ LLM adaptation/repair path. Offline policy tests pass; the native CMake supervisor
528
+ and artifact capture have not yet been live verified.
529
+
530
+
531
+ September 30 current implementation supersedes the earlier experimental build
532
+ status: the base managed builder compiled cJSON and passed its 19 upstream tests;
533
+ a separate reviewed Qt5 profile installed and verified its actual bindings and
534
+ immutable toolchain identity. Native import now selects that profile from exact
535
+ Git-verified build source and retains/resumes its candidate across setup. Natron's
536
+ first actual source acquisition exceeded an unchanged compressed archive cap;
537
+ profile consistency is unfinished. The manual Natron adapter validates as a draft
538
+ and passes explicit fake-application protocol tests, but real execution and
539
+ admission remain unverified. See the current authoring report and retained receipts.
540
+
541
+ ### Source completeness must survive fallback
542
+
543
+ A source archive is a preview unless an independently verified complete Git tree
544
+ backs it. Export rules can omit `.gitmodules`, Gitlinks and required ordinary
545
+ files. Never infer completeness from the absence of those entries in an archive
546
+ or compare an archive to an inventory derived from that same archive.
547
+
548
+ The reviewed Qt5 builder now has a bounded Git metadata fallback: a fixed Git
549
+ executable fetches an exact commit through a host-owned public GitHub broker,
550
+ without checking out or executing repository code. The host verifies raw commit
551
+ and reachable tree object hashes, discovers pinned submodules, and independently
552
+ checks acquired file bytes. A controlled connection probe must establish actual
553
+ loopback-only network access before dispatch; systemd property declarations alone
554
+ are insufficient. Hosts without this runtime retain an incomplete preview and
555
+ an actionable runtime requirement.
556
+
557
+ Source reservations include each Git dispatch's maximum HTTP body bytes and
558
+ requests. These conservative reservations are not measurements of bytes actually
559
+ transferred. Unknown/failed acquisitions retain their maximum. Complete source,
560
+ successful compilation and application/runtime admission remain distinct checks.
561
+
562
+ Adapters may propose bounded literal source edits tied to original file hashes.
563
+ The host reconstructs the edited bytes and retains original, patch and derived
564
+ identities. These edits are currently validated but are not yet wired into native
565
+ build execution; such candidates receive an explicit overlay-runtime requirement.