martty 0.2.16 → 0.2.17

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.
@@ -18,8 +18,10 @@ skill for shared Cordis behavior and for any genuine Host or Web half.
18
18
  assets: asset contents do not determine which TUI Providers own the UI.
19
19
  2. Query only the smallest Client Providers that own the requested behavior,
20
20
  using the exact methods shown by the list.
21
- 3. For an existing `@pluginId`, call `cordis_inspect_self` once; skip it for a
22
- new Plugin.
21
+ 3. For an existing temporary `@pluginId`, call `cordis_inspect_self` once. To
22
+ continue a durable Creator artifact after restart, call `tui_plugin_list`
23
+ and `tui_plugin_read` instead, then use its exact `code.client` as the base
24
+ of a new temporary preview Plugin.
23
25
  4. Write plain JavaScript in `code.client`. Add `code.host` only when the task
24
26
  genuinely owns Host data or operations.
25
27
  5. Call `cordis_define` once, then `cordis_run` once with the returned exact
@@ -28,17 +30,32 @@ skill for shared Cordis behavior and for any genuine Host or Web half.
28
30
  6. If run reports `awaiting-approval` or `starting`, stop the Tool flow and let
29
31
  later state updates finish activation. Reply with one short status sentence;
30
32
  do not summarize the implementation while approval is pending.
31
- 7. After the later state update confirms activation, report success and stop.
32
- Do not re-query Providers merely to verify effects that activation already
33
- confirmed; query again only for a concrete runtime diagnostic.
34
-
35
- The normal new-plugin trajectory is therefore one list, one query per needed
36
- Provider, one define, and one run. Once inspect returns a sufficient live
33
+ 7. After the later state update confirms activation, persist a new or modified
34
+ UI Preset or Theme Plugin with `tui_plugin_save`, unless the user explicitly
35
+ requested a temporary preview. Use the returned exact `pluginId` and
36
+ `packageId`; use a stable `artifactId`, the matching `kind`, and
37
+ `replace: true` only when updating an artifact already read from disk.
38
+ 8. Report success only after `tui_plugin_save` returns `saved`, including its
39
+ exact path. Do not call a temporary dynamic Plugin durable. Other dynamic
40
+ TUI Plugins remain process-local unless a separate shipping path was
41
+ explicitly requested.
42
+
43
+ The normal preview trajectory is therefore one list, one query per needed
44
+ Provider, one define, and one run. A durable UI Preset or Theme Plugin adds one
45
+ save after successful activation. Once inspect returns a sufficient live
37
46
  contract, author immediately; do not re-prove it from generic Cordis concepts.
38
47
 
39
- `define` stores an immutable Package; `run` activates it. Stop/update/unload
40
- dispose the owning Client Plugin effects. Never depend on a value returned by
41
- `apply()` as the disposer; register effects through the inspected Cordis APIs.
48
+ `define` stores an immutable Package only in the current process; `run`
49
+ activates it. Neither operation persists it across restart. `tui_plugin_save`
50
+ copies the successful Client source into the TUI-owned authoring root; use
51
+ `tui_plugin_read` to continue development later and `tui_plugin_remove` to
52
+ delete it. Stop/update/unload dispose the owning Client Plugin effects. Never
53
+ depend on a value returned by `apply()` as the disposer; register effects
54
+ through the inspected Cordis APIs.
55
+
56
+ The authoring root is `$MARTTY_HOME/plugins`; `MARTTY_HOME` resolves from the
57
+ explicit environment variable, then `$DSH_HOME/.martty`, then `~/.martty`.
58
+ User selections live separately in `$MARTTY_HOME/settings.json`.
42
59
 
43
60
  ## Inspect is the authority
44
61
 
@@ -88,8 +105,11 @@ compose only in the Plugin code. The services do not imply one another:
88
105
  option and enters the same Plugin seat.
89
106
  - **UI Presets:** use `tuiPresets.register({ id, label }, mount)` when the user
90
107
  wants one saved `/ui` choice to mount several UI contributions together.
91
- The synchronous mount callback returns one disposer. A UI Preset composes
92
- Theme, slots, pet, or other UI Plugins; it is not another name for Theme.
108
+ The synchronous mount callback returns one disposer. A UI Preset owns
109
+ structural UI contributions such as slots, chrome, or a pet. It does not
110
+ register, select, clone, or generate a Theme: `/ui`, `/theme`, and dark/light
111
+ are independent state dimensions. A preset may document a recommended
112
+ Theme, but recommendation is not runtime ownership.
93
113
  - **Commands:** register a local slash command. Registration publishes slash
94
114
  completion and keeps invocation out of the ACP prompt. Its availability is
95
115
  the registration's lifetime; Commands does not know about themes, overlays,
Binary file
Binary file
Binary file
Binary file
Binary file