neutralino-python 0.1.0__py3-none-any.whl
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.
- neutralino/__init__.py +88 -0
- neutralino/_catalog.py +297 -0
- neutralino/_data/LICENSE.neutralino-js-client +21 -0
- neutralino/_data/LICENSE.neutralinojs +1066 -0
- neutralino/_data/docs/cli.md +315 -0
- neutralino/_data/docs/custom-components.md +107 -0
- neutralino/_data/docs/custom-frontends.md +80 -0
- neutralino/_data/docs/desktop-helpers.md +296 -0
- neutralino/_data/docs/guide.md +131 -0
- neutralino/_data/docs/llms-full.txt +3921 -0
- neutralino/_data/docs/llms.txt +43 -0
- neutralino/_data/docs/manifests/components.json +20128 -0
- neutralino/_data/docs/manifests/examples.json +52 -0
- neutralino/_data/docs/manifests/native.json +3024 -0
- neutralino/_data/docs/manifests/schema.json +43 -0
- neutralino/_data/docs/manual-checklist.md +189 -0
- neutralino/_data/docs/packaging.md +252 -0
- neutralino/_data/docs/performance.md +15 -0
- neutralino/_data/docs/platforms.md +15 -0
- neutralino/_data/docs/reference/components.md +1685 -0
- neutralino/_data/docs/reference/native.md +148 -0
- neutralino/_data/docs/security.md +60 -0
- neutralino/_data/docs/ui.md +249 -0
- neutralino/_data/docs/updates.md +366 -0
- neutralino/_data/examples/README.md +6 -0
- neutralino/_data/examples/crud/README.md +36 -0
- neutralino/_data/examples/crud/app.py +243 -0
- neutralino/_data/examples/dashboard/README.md +36 -0
- neutralino/_data/examples/dashboard/app.py +367 -0
- neutralino/_data/examples/editor/README.md +35 -0
- neutralino/_data/examples/editor/app.py +190 -0
- neutralino/_data/examples/file-manager/README.md +40 -0
- neutralino/_data/examples/file-manager/app.py +120 -0
- neutralino/_data/examples/file-manager/frontend/index.html +20 -0
- neutralino/_data/examples/file-manager/frontend/main.js +55 -0
- neutralino/_data/examples/file-manager/frontend/neutralino.js +1 -0
- neutralino/_data/examples/file-manager/frontend/python-bridge.d.ts +207 -0
- neutralino/_data/examples/file-manager/frontend/python-bridge.mjs +854 -0
- neutralino/_data/examples/file-manager/frontend/style.css +4 -0
- neutralino/_data/examples/hybrid/README.md +48 -0
- neutralino/_data/examples/hybrid/app.py +80 -0
- neutralino/_data/examples/hybrid/components/counter.mjs +37 -0
- neutralino/_data/examples/hybrid/components/widget.mjs +23 -0
- neutralino/_data/examples/hybrid/styles.css +21 -0
- neutralino/_data/examples/hybrid/widget/package.json +20 -0
- neutralino/_data/examples/hybrid/widget/src/Widget.jsx +25 -0
- neutralino/_data/examples/hybrid/widget/vite.config.mjs +19 -0
- neutralino/_data/examples/monitor/README.md +36 -0
- neutralino/_data/examples/monitor/app.py +375 -0
- neutralino/_data/examples/react/README.md +90 -0
- neutralino/_data/examples/react/app.py +68 -0
- neutralino/_data/examples/react/frontend/.gitignore +5 -0
- neutralino/_data/examples/react/frontend/index.html +17 -0
- neutralino/_data/examples/react/frontend/package-lock.json +1232 -0
- neutralino/_data/examples/react/frontend/package.json +25 -0
- neutralino/_data/examples/react/frontend/scripts/prepare-bridge.mjs +49 -0
- neutralino/_data/examples/react/frontend/src/App.tsx +157 -0
- neutralino/_data/examples/react/frontend/src/backend.ts +21 -0
- neutralino/_data/examples/react/frontend/src/calls.test.ts +206 -0
- neutralino/_data/examples/react/frontend/src/calls.ts +306 -0
- neutralino/_data/examples/react/frontend/src/globals.d.ts +14 -0
- neutralino/_data/examples/react/frontend/src/hooks.ts +45 -0
- neutralino/_data/examples/react/frontend/src/main.tsx +13 -0
- neutralino/_data/examples/react/frontend/src/styles.css +11 -0
- neutralino/_data/examples/react/frontend/tsconfig.json +18 -0
- neutralino/_data/examples/react/frontend/vite.config.ts +9 -0
- neutralino/_data/examples/settings/README.md +38 -0
- neutralino/_data/examples/settings/app.py +440 -0
- neutralino/_data/examples/updater/.gitignore +2 -0
- neutralino/_data/examples/updater/README.md +82 -0
- neutralino/_data/examples/updater/app.py +160 -0
- neutralino/_data/examples/updater/app.toml +21 -0
- neutralino/_data/examples/updater/demo.py +107 -0
- neutralino/_data/examples/updater/requirements.txt +2 -0
- neutralino/_data/examples/updater/sources/github-private.toml +21 -0
- neutralino/_data/examples/updater/sources/github-public.toml +21 -0
- neutralino/_data/examples/vanilla/README.md +35 -0
- neutralino/_data/examples/vanilla/app.py +46 -0
- neutralino/_data/examples/vanilla/frontend/index.html +17 -0
- neutralino/_data/examples/vanilla/frontend/main.js +29 -0
- neutralino/_data/examples/vanilla/frontend/neutralino.js +1 -0
- neutralino/_data/examples/vanilla/frontend/python-bridge.d.ts +207 -0
- neutralino/_data/examples/vanilla/frontend/python-bridge.mjs +854 -0
- neutralino/_data/examples/vanilla/frontend/style.css +4 -0
- neutralino/_data/explorer/app.py +1328 -0
- neutralino/_data/explorer/catalogue.json +48179 -0
- neutralino/_data/explorer/explorer_previews.py +247 -0
- neutralino/_data/explorer/sources/native/always_on_top.py +55 -0
- neutralino/_data/explorer/sources/native/binary.py +125 -0
- neutralino/_data/explorer/sources/native/borderless.py +99 -0
- neutralino/_data/explorer/sources/native/broadcast.py +90 -0
- neutralino/_data/explorer/sources/native/config.py +78 -0
- neutralino/_data/explorer/sources/native/controls.py +140 -0
- neutralino/_data/explorer/sources/native/directory.py +163 -0
- neutralino/_data/explorer/sources/native/displays.py +75 -0
- neutralino/_data/explorer/sources/native/env.py +98 -0
- neutralino/_data/explorer/sources/native/events.py +124 -0
- neutralino/_data/explorer/sources/native/exec_command.py +79 -0
- neutralino/_data/explorer/sources/native/folder.py +70 -0
- neutralino/_data/explorer/sources/native/icon_badge.py +101 -0
- neutralino/_data/explorer/sources/native/image.py +119 -0
- neutralino/_data/explorer/sources/native/lifecycle.py +99 -0
- neutralino/_data/explorer/sources/native/locale.py +70 -0
- neutralino/_data/explorer/sources/native/main_menu.py +103 -0
- neutralino/_data/explorer/sources/native/message_box.py +101 -0
- neutralino/_data/explorer/sources/native/mouse.py +70 -0
- neutralino/_data/explorer/sources/native/multi_window.py +134 -0
- neutralino/_data/explorer/sources/native/notification.py +74 -0
- neutralino/_data/explorer/sources/native/open_external.py +81 -0
- neutralino/_data/explorer/sources/native/open_file.py +102 -0
- neutralino/_data/explorer/sources/native/paths.py +77 -0
- neutralino/_data/explorer/sources/native/print_snapshot.py +84 -0
- neutralino/_data/explorer/sources/native/read_write.py +192 -0
- neutralino/_data/explorer/sources/native/resources.py +110 -0
- neutralino/_data/explorer/sources/native/save_file.py +101 -0
- neutralino/_data/explorer/sources/native/server_mount.py +106 -0
- neutralino/_data/explorer/sources/native/sound.py +84 -0
- neutralino/_data/explorer/sources/native/spawn_process.py +128 -0
- neutralino/_data/explorer/sources/native/states.py +122 -0
- neutralino/_data/explorer/sources/native/stats_permissions.py +147 -0
- neutralino/_data/explorer/sources/native/storage.py +108 -0
- neutralino/_data/explorer/sources/native/system_info.py +115 -0
- neutralino/_data/explorer/sources/native/text.py +133 -0
- neutralino/_data/explorer/sources/native/trash.py +98 -0
- neutralino/_data/explorer/sources/native/tray.py +109 -0
- neutralino/_data/explorer/sources/native/watcher.py +167 -0
- neutralino/_data/explorer/sources/patterns/content_blocks.py +119 -0
- neutralino/_data/explorer/sources/patterns/dynamic_dashboard.py +121 -0
- neutralino/_data/explorer/sources/patterns/dynamic_form.py +120 -0
- neutralino/_data/explorer/sources/patterns/dynamic_table.py +109 -0
- neutralino/_data/explorer/sources/patterns/error_reporting.mjs +24 -0
- neutralino/_data/explorer/sources/patterns/error_reporting.py +124 -0
- neutralino/_data/explorer/sources/patterns/errors_timeouts.py +108 -0
- neutralino/_data/explorer/sources/patterns/feature_flags.py +99 -0
- neutralino/_data/explorer/sources/patterns/file_drop.py +126 -0
- neutralino/_data/explorer/sources/patterns/http_from_python.py +152 -0
- neutralino/_data/explorer/sources/patterns/keyboard_shortcuts.py +153 -0
- neutralino/_data/explorer/sources/patterns/live_config_reload.py +160 -0
- neutralino/_data/explorer/sources/patterns/logging.py +184 -0
- neutralino/_data/explorer/sources/patterns/long_tasks.py +121 -0
- neutralino/_data/explorer/sources/patterns/multi_window_sync.py +68 -0
- neutralino/_data/explorer/sources/patterns/navigation_from_backend.py +109 -0
- neutralino/_data/explorer/sources/patterns/onboarding.py +123 -0
- neutralino/_data/explorer/sources/patterns/optimistic_updates.py +89 -0
- neutralino/_data/explorer/sources/patterns/persistence.py +114 -0
- neutralino/_data/explorer/sources/patterns/python_calls_page.mjs +10 -0
- neutralino/_data/explorer/sources/patterns/python_calls_page.py +64 -0
- neutralino/_data/explorer/sources/patterns/python_push.py +84 -0
- neutralino/_data/explorer/sources/patterns/recurring_events.py +114 -0
- neutralino/_data/explorer/sources/patterns/roles_permissions.py +104 -0
- neutralino/_data/explorer/sources/patterns/scheduled_jobs.py +194 -0
- neutralino/_data/explorer/sources/patterns/settings_page.py +165 -0
- neutralino/_data/explorer/sources/patterns/sqlite.py +181 -0
- neutralino/_data/explorer/sources/patterns/streaming.py +102 -0
- neutralino/_data/explorer/sources/patterns/texts_i18n.py +81 -0
- neutralino/_data/explorer/sources/patterns/theme_from_backend.py +86 -0
- neutralino/_data/explorer/sources/patterns/updater.py +232 -0
- neutralino/_data/explorer/sources/workspace/calendar/app.py +547 -0
- neutralino/_data/explorer/sources/workspace/customers/app.py +467 -0
- neutralino/_data/explorer/sources/workspace/dashboard/README.md +36 -0
- neutralino/_data/explorer/sources/workspace/dashboard/app.py +367 -0
- neutralino/_data/explorer/sources/workspace/documents/app.py +511 -0
- neutralino/_data/explorer/sources/workspace/inbox/app.py +439 -0
- neutralino/_data/explorer/sources/workspace/orders/app.py +491 -0
- neutralino/_data/explorer/sources/workspace/reports/app.py +386 -0
- neutralino/_data/explorer/sources/workspace/settings/README.md +38 -0
- neutralino/_data/explorer/sources/workspace/settings/app.py +440 -0
- neutralino/_data/explorer/sources/workspace/system/README.md +36 -0
- neutralino/_data/explorer/sources/workspace/system/app.py +375 -0
- neutralino/_data/explorer/sources/workspace/tasks/app.py +462 -0
- neutralino/_data/renderer/LICENSES/@babel__runtime@7.29.17/LICENSE +22 -0
- neutralino/_data/renderer/LICENSES/@codemirror__autocomplete@6.20.4/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/@codemirror__commands@6.11.2/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/@codemirror__lang-css@6.3.1/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/@codemirror__lang-html@6.4.12/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/@codemirror__lang-javascript@6.2.5/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/@codemirror__lang-json@6.0.2/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/@codemirror__lang-markdown@6.5.3/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/@codemirror__lang-python@6.2.1/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/@codemirror__lang-sql@6.10.0/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/@codemirror__lang-yaml@6.1.3/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/@codemirror__language@6.13.1/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/@codemirror__search@6.7.3/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/@codemirror__state@6.7.6/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/@codemirror__view@6.44.2/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/@dnd-kit__accessibility@3.1.1/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/@dnd-kit__core@6.3.1/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/@dnd-kit__sortable@10.0.0/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/@dnd-kit__utilities@3.2.2/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/@emoji-mart__data@1.2.1/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/@floating-ui__core@1.8.0/LICENSE +20 -0
- neutralino/_data/renderer/LICENSES/@floating-ui__dom@1.8.0/LICENSE +20 -0
- neutralino/_data/renderer/LICENSES/@floating-ui__react-dom@2.1.9/LICENSE +20 -0
- neutralino/_data/renderer/LICENSES/@floating-ui__react@0.27.20/LICENSE +20 -0
- neutralino/_data/renderer/LICENSES/@floating-ui__utils@0.2.12/LICENSE +20 -0
- neutralino/_data/renderer/LICENSES/@lezer__common@1.5.7/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/@lezer__css@1.3.9/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/@lezer__highlight@1.2.5/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/@lezer__html@1.3.13/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/@lezer__javascript@1.5.7/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/@lezer__json@1.0.3/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/@lezer__lr@1.4.13/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/@lezer__markdown@1.8.3/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/@lezer__python@1.1.21/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/@lezer__yaml@1.0.4/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/@mantine__carousel@9.8.3/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/@mantine__charts@9.8.3/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/@mantine__code-highlight@9.8.3/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/@mantine__core@9.8.3/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/@mantine__dates@9.8.3/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/@mantine__dropzone@9.8.3/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/@mantine__emoji@9.8.3/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/@mantine__hooks@9.8.3/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/@mantine__lightbox@9.8.3/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/@mantine__notifications@9.8.3/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/@mantine__nprogress@9.8.3/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/@mantine__schedule@9.8.3/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/@mantine__spotlight@9.8.3/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/@mantine__store@9.8.3/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/@mantine__tiptap@9.8.3/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/@marijn__find-cluster-break@1.0.4/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/@reduxjs__toolkit@2.16.0/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/@tabler__icons-react@3.55.0/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/@tanstack__react-virtual@3.14.32/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/@tanstack__virtual-core@3.19.17/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/@tiptap__core@3.35.1/LICENSE.md +21 -0
- neutralino/_data/renderer/LICENSES/@tiptap__extension-blockquote@3.35.1/LICENSE.md +21 -0
- neutralino/_data/renderer/LICENSES/@tiptap__extension-bold@3.35.1/LICENSE.md +21 -0
- neutralino/_data/renderer/LICENSES/@tiptap__extension-code-block@3.35.1/LICENSE.md +21 -0
- neutralino/_data/renderer/LICENSES/@tiptap__extension-code@3.35.1/LICENSE.md +21 -0
- neutralino/_data/renderer/LICENSES/@tiptap__extension-document@3.35.1/LICENSE.md +21 -0
- neutralino/_data/renderer/LICENSES/@tiptap__extension-hard-break@3.35.1/LICENSE.md +21 -0
- neutralino/_data/renderer/LICENSES/@tiptap__extension-heading@3.35.1/LICENSE.md +21 -0
- neutralino/_data/renderer/LICENSES/@tiptap__extension-horizontal-rule@3.35.1/LICENSE.md +21 -0
- neutralino/_data/renderer/LICENSES/@tiptap__extension-italic@3.35.1/LICENSE.md +21 -0
- neutralino/_data/renderer/LICENSES/@tiptap__extension-link@3.35.1/LICENSE.md +21 -0
- neutralino/_data/renderer/LICENSES/@tiptap__extension-list@3.35.1/LICENSE.md +21 -0
- neutralino/_data/renderer/LICENSES/@tiptap__extension-paragraph@3.35.1/LICENSE.md +21 -0
- neutralino/_data/renderer/LICENSES/@tiptap__extension-strike@3.35.1/LICENSE.md +21 -0
- neutralino/_data/renderer/LICENSES/@tiptap__extension-text@3.35.1/LICENSE.md +21 -0
- neutralino/_data/renderer/LICENSES/@tiptap__extension-underline@3.35.1/LICENSE.md +21 -0
- neutralino/_data/renderer/LICENSES/@tiptap__extensions@3.35.1/LICENSE.md +21 -0
- neutralino/_data/renderer/LICENSES/@tiptap__react@3.35.1/LICENSE.md +21 -0
- neutralino/_data/renderer/LICENSES/@tiptap__starter-kit@3.35.1/LICENSE.md +21 -0
- neutralino/_data/renderer/LICENSES/attr-accept@4.0.1/LICENSE +22 -0
- neutralino/_data/renderer/LICENSES/clsx@2.1.1/license +9 -0
- neutralino/_data/renderer/LICENSES/crelt@1.0.7/LICENSE +19 -0
- neutralino/_data/renderer/LICENSES/d3-array@3.2.5/LICENSE +13 -0
- neutralino/_data/renderer/LICENSES/d3-color@3.1.1/LICENSE +13 -0
- neutralino/_data/renderer/LICENSES/d3-format@3.1.3/LICENSE +13 -0
- neutralino/_data/renderer/LICENSES/d3-interpolate@3.0.2/LICENSE +13 -0
- neutralino/_data/renderer/LICENSES/d3-path@3.1.1/LICENSE +13 -0
- neutralino/_data/renderer/LICENSES/d3-scale@4.0.3/LICENSE +13 -0
- neutralino/_data/renderer/LICENSES/d3-shape@3.2.1/LICENSE +13 -0
- neutralino/_data/renderer/LICENSES/d3-time-format@4.1.1/LICENSE +13 -0
- neutralino/_data/renderer/LICENSES/d3-time@3.1.1/LICENSE +13 -0
- neutralino/_data/renderer/LICENSES/dayjs@1.11.23/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/decimal.js-light@2.5.1/LICENCE.md +23 -0
- neutralino/_data/renderer/LICENSES/diff@9.0.0/LICENSE +29 -0
- neutralino/_data/renderer/LICENSES/dompurify@3.5.1/LICENSE +202 -0
- neutralino/_data/renderer/LICENSES/dompurify@3.5.1/LICENSE-MPL +373 -0
- neutralino/_data/renderer/LICENSES/embla-carousel-react@8.6.0/MIT-embla-carousel.txt +21 -0
- neutralino/_data/renderer/LICENSES/embla-carousel-reactive-utils@8.6.0/MIT-embla-carousel.txt +21 -0
- neutralino/_data/renderer/LICENSES/embla-carousel@8.6.0/MIT-embla-carousel.txt +21 -0
- neutralino/_data/renderer/LICENSES/es-toolkit@1.53.2/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/es-toolkit@1.53.2/NOTICE +39 -0
- neutralino/_data/renderer/LICENSES/eventemitter3@5.0.4/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/fast-equals@5.4.7/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/file-selector@5.0.3/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/get-nonce@1.0.1/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/immer@11.2.14/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/linkifyjs@4.4.0/LICENSE +19 -0
- neutralino/_data/renderer/LICENSES/marked@18.4.0/LICENSE +44 -0
- neutralino/_data/renderer/LICENSES/neutralino.js@6.11.0/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/orderedmap@2.1.1/LICENSE +19 -0
- neutralino/_data/renderer/LICENSES/packages.json +1838 -0
- neutralino/_data/renderer/LICENSES/prosemirror-commands@1.7.2/LICENSE +19 -0
- neutralino/_data/renderer/LICENSES/prosemirror-dropcursor@1.8.4/LICENSE +19 -0
- neutralino/_data/renderer/LICENSES/prosemirror-gapcursor@1.4.1/LICENSE +19 -0
- neutralino/_data/renderer/LICENSES/prosemirror-history@1.5.2/LICENSE +19 -0
- neutralino/_data/renderer/LICENSES/prosemirror-keymap@1.2.3/LICENSE +19 -0
- neutralino/_data/renderer/LICENSES/prosemirror-model@1.25.13/LICENSE +19 -0
- neutralino/_data/renderer/LICENSES/prosemirror-schema-list@1.6.1/LICENSE +19 -0
- neutralino/_data/renderer/LICENSES/prosemirror-state@1.4.4/LICENSE +19 -0
- neutralino/_data/renderer/LICENSES/prosemirror-transform@1.12.7/LICENSE +19 -0
- neutralino/_data/renderer/LICENSES/prosemirror-view@1.44.0/LICENSE +19 -0
- neutralino/_data/renderer/LICENSES/react-dom@19.3.1/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/react-dropzone@20.1.4/LICENSE +22 -0
- neutralino/_data/renderer/LICENSES/react-is@19.3.1/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/react-number-format@5.4.5/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/react-redux@9.3.1/LICENSE.md +21 -0
- neutralino/_data/renderer/LICENSES/react-remove-scroll-bar@2.3.8/MIT-react-remove-scroll-bar.txt +21 -0
- neutralino/_data/renderer/LICENSES/react-remove-scroll@2.7.2/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/react-style-singleton@2.2.3/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/react-transition-group@4.4.5/LICENSE +30 -0
- neutralino/_data/renderer/LICENSES/react@19.3.1/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/recharts@3.11.3/LICENSE +22 -0
- neutralino/_data/renderer/LICENSES/redux-thunk@3.1.0/LICENSE.md +21 -0
- neutralino/_data/renderer/LICENSES/redux@5.0.1/LICENSE.md +21 -0
- neutralino/_data/renderer/LICENSES/reselect@5.2.0/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/rolldown@1.3.4/LICENSE +25 -0
- neutralino/_data/renderer/LICENSES/rope-sequence@1.3.4/LICENSE +19 -0
- neutralino/_data/renderer/LICENSES/rrule@2.8.1/LICENCE +65 -0
- neutralino/_data/renderer/LICENSES/scheduler@0.28.0/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/style-mod@4.1.5/LICENSE +19 -0
- neutralino/_data/renderer/LICENSES/tiny-invariant@1.3.3/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/tslib@2.9.1/LICENSE.txt +12 -0
- neutralino/_data/renderer/LICENSES/use-callback-ref@1.3.3/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/use-sidecar@1.1.3/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/use-sync-external-store@1.7.0/LICENSE +21 -0
- neutralino/_data/renderer/LICENSES/victory-vendor@38.1.1/LICENSE.txt +150 -0
- neutralino/_data/renderer/LICENSES/vite@8.4.1/LICENSE.md +2320 -0
- neutralino/_data/renderer/LICENSES/w3c-keyname@2.2.8/LICENSE +19 -0
- neutralino/_data/renderer/assets/IconGripVertical-BlJrWVuo.js +1 -0
- neutralino/_data/renderer/assets/carousel-D1j1SkWR.css +1 -0
- neutralino/_data/renderer/assets/carousel-DniHwTLK.js +1 -0
- neutralino/_data/renderer/assets/chunk-CCkLOSkX.css +1 -0
- neutralino/_data/renderer/assets/chunk-Du0h7lB-.js +9 -0
- neutralino/_data/renderer/assets/codehighlight-CCe_blv1.js +10 -0
- neutralino/_data/renderer/assets/codehighlight-THJMNDh8.css +1 -0
- neutralino/_data/renderer/assets/codemirror-CinrNxVJ.js +2 -0
- neutralino/_data/renderer/assets/css-CMUk25uq.js +1 -0
- neutralino/_data/renderer/assets/dist-70Le0T2N.js +1 -0
- neutralino/_data/renderer/assets/dist-BCHbQlae.js +11 -0
- neutralino/_data/renderer/assets/dist-BXts23GT.js +1 -0
- neutralino/_data/renderer/assets/dist-D2RX2UgP.js +23 -0
- neutralino/_data/renderer/assets/dist-DikJK2lp.js +1 -0
- neutralino/_data/renderer/assets/dist-acbbRM1z.js +1 -0
- neutralino/_data/renderer/assets/dnd-DaaaVala.js +5 -0
- neutralino/_data/renderer/assets/dropzone-CeqF5SZx.js +1 -0
- neutralino/_data/renderer/assets/dropzone-aPCBPjDN.css +1 -0
- neutralino/_data/renderer/assets/embla-carousel-react.esm-CbyYjwMN.js +1 -0
- neutralino/_data/renderer/assets/emoji-BfRPfoVw.js +1 -0
- neutralino/_data/renderer/assets/emoji-DV8OzU1E.css +1 -0
- neutralino/_data/renderer/assets/esm-C5ZYjSBQ.js +82 -0
- neutralino/_data/renderer/assets/highlight-CB6hGb5A.js +3 -0
- neutralino/_data/renderer/assets/highlight-Dlb5DJwL.css +1 -0
- neutralino/_data/renderer/assets/html-Dad3kwIa.js +1 -0
- neutralino/_data/renderer/assets/icon-chunk-X3Kr0nh-.js +1 -0
- neutralino/_data/renderer/assets/index-CU0HB-J7.js +69 -0
- neutralino/_data/renderer/assets/index-TWpF4Lef.css +1 -0
- neutralino/_data/renderer/assets/javascript-BQb8vpw3.js +1 -0
- neutralino/_data/renderer/assets/json-BCFmxlML.js +1 -0
- neutralino/_data/renderer/assets/lightbox-BHtgbsUV.js +1 -0
- neutralino/_data/renderer/assets/lightbox-BzKDpkAD.css +1 -0
- neutralino/_data/renderer/assets/markdown-DSuAylvy.js +5 -0
- neutralino/_data/renderer/assets/markdown-DjaNWMgH.js +77 -0
- neutralino/_data/renderer/assets/python-pdbIAveZ.js +9 -0
- neutralino/_data/renderer/assets/richtext-DIAsHMuK.css +1 -0
- neutralino/_data/renderer/assets/richtext-Z6fG9G2_.js +137 -0
- neutralino/_data/renderer/assets/spotlight-Ccstaz1-.css +1 -0
- neutralino/_data/renderer/assets/spotlight-knlyJw_A.js +1 -0
- neutralino/_data/renderer/assets/sql-DLoQFEde.js +2 -0
- neutralino/_data/renderer/assets/with-selector-BOM9_OlN.js +1 -0
- neutralino/_data/renderer/assets/yaml-BJNzokSe.js +1 -0
- neutralino/_data/renderer/index.html +22 -0
- neutralino/_data/renderer/manifest.json +202 -0
- neutralino/_data/renderer/neutralino.js +1 -0
- neutralino/_data/renderer/shared/mantine-core.mjs +5 -0
- neutralino/_data/renderer/shared/mantine-hooks.mjs +5 -0
- neutralino/_data/renderer/shared/react-dom-client.mjs +5 -0
- neutralino/_data/renderer/shared/react-dom.mjs +6 -0
- neutralino/_data/renderer/shared/react-jsx-runtime.mjs +5 -0
- neutralino/_data/renderer/shared/react.mjs +6 -0
- neutralino/_data/skills/README.md +6 -0
- neutralino/_data/skills/neutralino-app-patterns/SKILL.md +101 -0
- neutralino/_data/skills/neutralino-app-patterns/references/dashboards-and-background-work.md +55 -0
- neutralino/_data/skills/neutralino-app-patterns/references/storage-and-settings.md +57 -0
- neutralino/_data/skills/neutralino-app-patterns/references/tables-and-crud.md +81 -0
- neutralino/_data/skills/neutralino-frontend/SKILL.md +121 -0
- neutralino/_data/skills/neutralino-frontend/references/bridge.md +63 -0
- neutralino/_data/skills/neutralino-frontend/references/custom-components.md +84 -0
- neutralino/_data/skills/neutralino-frontend/references/frameworks.md +61 -0
- neutralino/_data/skills/neutralino-maintenance/SKILL.md +85 -0
- neutralino/_data/skills/neutralino-maintenance/references/platforms-and-gates.md +35 -0
- neutralino/_data/skills/neutralino-maintenance/references/records.md +38 -0
- neutralino/_data/skills/neutralino-maintenance/references/review-process.md +36 -0
- neutralino/_data/skills/neutralino-native/SKILL.md +107 -0
- neutralino/_data/skills/neutralino-native/references/api-conventions.md +72 -0
- neutralino/_data/skills/neutralino-native/references/desktop-helpers.md +53 -0
- neutralino/_data/skills/neutralino-native/references/permissions-windows.md +53 -0
- neutralino/_data/skills/neutralino-packaging/SKILL.md +99 -0
- neutralino/_data/skills/neutralino-packaging/references/build-layout.md +51 -0
- neutralino/_data/skills/neutralino-packaging/references/managed-install.md +59 -0
- neutralino/_data/skills/neutralino-packaging/references/templates-and-config.md +63 -0
- neutralino/_data/skills/neutralino-python/SKILL.md +109 -0
- neutralino/_data/skills/neutralino-python/references/architecture.md +53 -0
- neutralino/_data/skills/neutralino-python/references/cli.md +60 -0
- neutralino/_data/skills/neutralino-python/references/platforms-security.md +44 -0
- neutralino/_data/skills/neutralino-rpc/SKILL.md +114 -0
- neutralino/_data/skills/neutralino-rpc/references/errors-and-limits.md +44 -0
- neutralino/_data/skills/neutralino-rpc/references/expose-and-context.md +74 -0
- neutralino/_data/skills/neutralino-rpc/references/streams-and-cancellation.md +53 -0
- neutralino/_data/skills/neutralino-ui/SKILL.md +115 -0
- neutralino/_data/skills/neutralino-ui/references/components-and-tree.md +74 -0
- neutralino/_data/skills/neutralino-ui/references/state-forms-events.md +85 -0
- neutralino/_data/skills/neutralino-ui/references/themes-profiles-assets.md +105 -0
- neutralino/_data/skills/neutralino-updates/SKILL.md +94 -0
- neutralino/_data/skills/neutralino-updates/references/config-and-api.md +80 -0
- neutralino/_data/skills/neutralino-updates/references/releases-and-install.md +77 -0
- neutralino/_data/skills/neutralino-updates/references/security-rollback.md +48 -0
- neutralino/_data/ui/contracts.json +32927 -0
- neutralino/_data/ui/emoji.json +1 -0
- neutralino/_data/upstream-lock.json +97 -0
- neutralino/_managed.py +1099 -0
- neutralino/_paths.py +220 -0
- neutralino/_platform.py +150 -0
- neutralino/_scaffold.py +344 -0
- neutralino/api/_base.py +99 -0
- neutralino/api/_custom.py +1350 -0
- neutralino/api/_dec.py +21 -0
- neutralino/api/_enc.py +80 -0
- neutralino/api/app.py +119 -0
- neutralino/api/clipboard.py +101 -0
- neutralino/api/computer.py +261 -0
- neutralino/api/custom.py +36 -0
- neutralino/api/debug.py +41 -0
- neutralino/api/extensions.py +57 -0
- neutralino/api/filesystem.py +633 -0
- neutralino/api/net.py +22 -0
- neutralino/api/os.py +508 -0
- neutralino/api/resources.py +124 -0
- neutralino/api/server.py +66 -0
- neutralino/api/storage.py +98 -0
- neutralino/api/types.py +342 -0
- neutralino/api/updater.py +22 -0
- neutralino/api/window.py +397 -0
- neutralino/application.py +1260 -0
- neutralino/bundle.py +187 -0
- neutralino/cli.py +629 -0
- neutralino/client.py +496 -0
- neutralino/config.py +671 -0
- neutralino/devtools.py +1973 -0
- neutralino/errors.py +142 -0
- neutralino/events.py +579 -0
- neutralino/execution.py +293 -0
- neutralino/extension.py +134 -0
- neutralino/frontend/python-bridge.d.ts +207 -0
- neutralino/frontend/python-bridge.mjs +854 -0
- neutralino/protocol.py +456 -0
- neutralino/py.typed +0 -0
- neutralino/rpc.py +1625 -0
- neutralino/runtime.py +591 -0
- neutralino/supervisor.py +866 -0
- neutralino/sync_client.py +376 -0
- neutralino/templates/default/app.py +32 -0
- neutralino/templates/default/frontend/app.js +28 -0
- neutralino/templates/default/frontend/index.html +26 -0
- neutralino/templates/default/frontend/neutralino.js +1 -0
- neutralino/templates/default/frontend/styles.css +8 -0
- neutralino/templates/default/gitignore.txt +3 -0
- neutralino/templates/default/neutralino.config.json +25 -0
- neutralino/templates/hybrid/README.md +17 -0
- neutralino/templates/hybrid/app.py +49 -0
- neutralino/templates/hybrid/components/counter.mjs +37 -0
- neutralino/templates/hybrid/styles.css +21 -0
- neutralino/templates/python-ui/README.md +15 -0
- neutralino/templates/python-ui/app.py +44 -0
- neutralino/templates/python-ui/gitignore.txt +3 -0
- neutralino/templates/python-ui/requirements.txt +4 -0
- neutralino/templates/react/README.md +28 -0
- neutralino/templates/react/app.py +52 -0
- neutralino/templates/react/components/widget.mjs +23 -0
- neutralino/templates/react/widget/package.json +20 -0
- neutralino/templates/react/widget/src/Widget.jsx +25 -0
- neutralino/templates/react/widget/vite.config.mjs +19 -0
- neutralino/transport.py +661 -0
- neutralino/types.py +93 -0
- neutralino/ui/__init__.py +139 -0
- neutralino/ui/_app.py +1529 -0
- neutralino/ui/_assets.py +407 -0
- neutralino/ui/_bases.py +1210 -0
- neutralino/ui/_behaviours.py +1066 -0
- neutralino/ui/_charts.py +732 -0
- neutralino/ui/_component.py +882 -0
- neutralino/ui/_dates.py +168 -0
- neutralino/ui/_desktop.py +879 -0
- neutralino/ui/_events.py +192 -0
- neutralino/ui/_filters.py +427 -0
- neutralino/ui/_forms.py +282 -0
- neutralino/ui/_protocol.py +201 -0
- neutralino/ui/_schedule.py +543 -0
- neutralino/ui/_security.py +106 -0
- neutralino/ui/_session.py +969 -0
- neutralino/ui/_state.py +199 -0
- neutralino/ui/_tables.py +256 -0
- neutralino/ui/_theme.py +154 -0
- neutralino/ui/blocks/__init__.py +19 -0
- neutralino/ui/blocks/_data.py +2239 -0
- neutralino/ui/blocks/_interactive.py +622 -0
- neutralino/ui/blocks/_layout.py +2967 -0
- neutralino/ui/components/__init__.py +81 -0
- neutralino/ui/components/_dates.py +879 -0
- neutralino/ui/components/_editors.py +217 -0
- neutralino/ui/components/_extensions.py +790 -0
- neutralino/ui/components/_extras.py +303 -0
- neutralino/ui/components/_generated.py +30565 -0
- neutralino/ui/components/_types.py +17 -0
- neutralino/ui/schema.py +824 -0
- neutralino/ui/validators.py +362 -0
- neutralino/updates/__init__.py +96 -0
- neutralino/updates/_http.py +320 -0
- neutralino/updates/_layout.py +762 -0
- neutralino/updates/archive.py +216 -0
- neutralino/updates/config.py +256 -0
- neutralino/updates/errors.py +97 -0
- neutralino/updates/install.sh.in +201 -0
- neutralino/updates/launcher.py +18 -0
- neutralino/updates/manager.py +808 -0
- neutralino/updates/manifest.py +196 -0
- neutralino/updates/release.py +314 -0
- neutralino/updates/semver.py +84 -0
- neutralino/updates/sources.py +392 -0
- neutralino/windows.py +316 -0
- neutralino_python-0.1.0.dist-info/METADATA +121 -0
- neutralino_python-0.1.0.dist-info/RECORD +521 -0
- neutralino_python-0.1.0.dist-info/WHEEL +4 -0
- neutralino_python-0.1.0.dist-info/entry_points.txt +3 -0
- neutralino_python-0.1.0.dist-info/licenses/LICENSE +21 -0
- neutralino_python-0.1.0.dist-info/licenses/THIRD_PARTY_NOTICES.md +16 -0
- neutralino_python-0.1.0.dist-info/licenses/src/neutralino/_data/renderer/LICENSES/packages.json +1838 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Records
|
|
2
|
+
|
|
3
|
+
## `maintenance/issues.json`
|
|
4
|
+
|
|
5
|
+
`{"schema_version": 1, "note": ..., "issues": [...]}`; each issue has `id`, `title`, `severity`, `status`,
|
|
6
|
+
`source`, `mitigation_or_action`, `review_trigger`, `target_phase`, `last_verified`, `acceptance_reason`, `evidence`.
|
|
7
|
+
|
|
8
|
+
- Statuses: `pending`, `investigating`, `mitigated`, `accepted-risk`, `fixed`, `blocked`.
|
|
9
|
+
- `accepted-risk` entries must state the impact that remains, the conditions under which it is acceptable
|
|
10
|
+
(for example "trusted single-user local machine") and the review trigger (for example "next upstream
|
|
11
|
+
release"). They are not passes and do not appear as passed tests in any report.
|
|
12
|
+
- Close a record (`fixed`) only with evidence: a regression test, a reproduction on the pinned build, or a
|
|
13
|
+
verified upstream fix. Record the date in `last_verified`.
|
|
14
|
+
- Do not silently dismiss a significant defect or a missing mandatory function; do not add speculative items.
|
|
15
|
+
- `tests/unit/test_maintenance_register.py` validates the register's shape; run it after editing.
|
|
16
|
+
|
|
17
|
+
Examples of what is tracked: upstream local HTTP file exposure and token race (SEC-001, high, accepted risk with
|
|
18
|
+
mitigations: loopback, port 0, `tokenSecurity: "one-time"`, window mode, restricted profile, per-app staging);
|
|
19
|
+
shared page/Python allow list (ADR-006: not an independent sandbox); unsigned update manifests (integrity
|
|
20
|
+
only); Windows and macOS unverified; manual GUI checks pending.
|
|
21
|
+
|
|
22
|
+
## `maintenance/upstream.json`
|
|
23
|
+
|
|
24
|
+
`tracked`: project, `pin`, `source` (lock file), `issues` (register ids), `url`; and `last_review`.
|
|
25
|
+
Projects: Neutralinojs core and client (6.11.0, `src/neutralino/_data/upstream-lock.json`), Mantine and
|
|
26
|
+
frontend dependencies (`package-lock.json`), Python dependencies (`uv.lock`).
|
|
27
|
+
|
|
28
|
+
## `maintenance/compatibility.json`
|
|
29
|
+
|
|
30
|
+
Per platform: priority, current consolidation status, historical evidence. Allowed wording follows the evidence:
|
|
31
|
+
"verified" only with a run recorded; "smoke-verified", "verified under a private Xvfb only", "not verified" are
|
|
32
|
+
the honest shades. Keep it in step with `docs/platforms.md`.
|
|
33
|
+
|
|
34
|
+
## Rules for editing records
|
|
35
|
+
|
|
36
|
+
- JSON only (no YAML dependency). Keep keys and the schema version; add fields only with a decision.
|
|
37
|
+
- Historical ADRs and reports are evidence: append new notes, never rewrite or erase.
|
|
38
|
+
- One review file per date under `maintenance/reviews/`.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# The review, step by step
|
|
2
|
+
|
|
3
|
+
Give a fresh agent only the repository; the handoff text lives in `maintenance/REVIEW_PROMPT.md`:
|
|
4
|
+
review the complete installed toolkit, check actual upstream releases/issues/security fixes, confirm whether
|
|
5
|
+
tracked issues remain, reproduce in isolation, fix practical defects, remove obsolete workarounds only after
|
|
6
|
+
regression tests, update pins selectively, retain known-good versions when incompatible, regenerate assets, run
|
|
7
|
+
full regressions and a clean wheel test, update the records and commit locally. Do not expand scope, rewrite
|
|
8
|
+
working architecture, invent passing tests, publish or push without authorization.
|
|
9
|
+
|
|
10
|
+
## Order of work
|
|
11
|
+
|
|
12
|
+
1. **Baseline.** `git status` (preserve user work), `uv sync --locked`, note pre-existing failures. Read the
|
|
13
|
+
records listed in the skill entry.
|
|
14
|
+
2. **Upstream.** For each entry of `maintenance/upstream.json`: latest release of the pinned project, advisories,
|
|
15
|
+
the tracked issues. Primary sources only (release notes, tags, the upstream repository, a real runtime
|
|
16
|
+
response). `tools/fetch_upstream.py` recreates the git-ignored `.upstream/` from the lock with SHA-256 checks.
|
|
17
|
+
3. **Reproduce.** Isolated probes: private Xvfb, temporary home and data directories, marker files, ephemeral ports.
|
|
18
|
+
Re-measure ADR-016 whenever the runtime pin changes (path traversal, Host/Origin checks, token exposure).
|
|
19
|
+
4. **Decide per finding:** fix now (normal-workflow defect, critical), mitigate, accept the risk with conditions,
|
|
20
|
+
block (needs access you lack), or defer. Critical issues in a usable normal workflow must be fixed or the
|
|
21
|
+
result is "not ready".
|
|
22
|
+
5. **Change.** Failing test first. Smallest coherent change. Selective pin updates only with a green gate. If a
|
|
23
|
+
new upstream is incompatible keep the old pin and record why and the next review date.
|
|
24
|
+
6. **Regenerate** whatever the pins feed: API wrappers and inventory, UI contracts and renderer assets,
|
|
25
|
+
docs and skills (`tools/generate_docs.py`), the bridge copy (`tools/sync_bridge.py`).
|
|
26
|
+
7. **Gate.** `tools/check_all.sh` once, under `nice`, one gate at a time; then the clean-wheel/packaging checks
|
|
27
|
+
(`tests/unit/test_cli_wheel.py`) and real-runtime e2e tests. Record pass/fail/skip counts honestly.
|
|
28
|
+
8. **Record.** Update `maintenance/issues.json`, `upstream.json` (`last_review`), `compatibility.json`; write
|
|
29
|
+
`maintenance/reviews/<YYYY-MM-DD>.md` (environment, upstream status, changed pins, tests, risks, decisions,
|
|
30
|
+
artifacts, commit); commit locally with an imperative message. No push, tag or release without approval.
|
|
31
|
+
|
|
32
|
+
## What a review report must say
|
|
33
|
+
|
|
34
|
+
What ran (commands, counts), on which revision and environment, what was not checked (platforms, manual
|
|
35
|
+
cases), what changed, which risks remain accepted and their review trigger. A report never turns "not run" into
|
|
36
|
+
"verified".
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: neutralino-native
|
|
3
|
+
description: Call the Neutralino native API (filesystem, window, os, storage, clipboard, computer, net, events, updater) from Python with typed, snake_case wrappers, and set the allow list, permission profile and window/desktop rules they need. Use it when Python must touch files, windows, dialogs, clipboard, processes or system information.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# neutralino-native
|
|
7
|
+
|
|
8
|
+
Every upstream route with status `wrapped` in the API inventory is a method on a namespace of the
|
|
9
|
+
same name: `filesystem.readBinaryFile` becomes `await client.filesystem.read_binary_file(path, pos=..., size=...)`.
|
|
10
|
+
Namespaces: `app`, `clipboard`, `computer`, `custom`, `debug`, `events`, `extensions`,
|
|
11
|
+
`filesystem`, `net`, `os`, `resources`, `server`, `storage`, `updater`, `window`.
|
|
12
|
+
|
|
13
|
+
Where you get a client:
|
|
14
|
+
|
|
15
|
+
| Context | Object |
|
|
16
|
+
|---|---|
|
|
17
|
+
| `ui.AsyncApplication` / core `neutralino.AsyncApplication` | `app.native.<ns>` (UI) or `app.<ns>` (core), awaited |
|
|
18
|
+
| `ui.Application` / core `neutralino.Application` | the same attributes, blocking (never on the loop thread) |
|
|
19
|
+
| Inside an exposed function | `ctx.client.<ns>` (the calling window's connection) |
|
|
20
|
+
|
|
21
|
+
`app.native` exists only once the app runs (`start()`/`run()`); a `ui` page builder runs on the loop thread,
|
|
22
|
+
so blocking calls belong in a sync callback, a thread or an async builder.
|
|
23
|
+
| `neutralino.AsyncExtension` (after `start()`) | `ext.client.<ns>` |
|
|
24
|
+
|
|
25
|
+
## Minimal working example (storage, least privilege)
|
|
26
|
+
|
|
27
|
+
```python
|
|
28
|
+
import asyncio
|
|
29
|
+
|
|
30
|
+
from neutralino import NativeError, ui
|
|
31
|
+
|
|
32
|
+
ROUTES = ["storage.setData", "storage.getData"] # route names are the upstream camelCase names
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def build(app: ui.AsyncApplication) -> None:
|
|
36
|
+
with app.page("/"), ui.Stack(gap="xs"):
|
|
37
|
+
key = ui.TextInput(label="Key", value="greeting")
|
|
38
|
+
status = ui.Text("ready")
|
|
39
|
+
|
|
40
|
+
async def put(ev: ui.Event) -> None:
|
|
41
|
+
try:
|
|
42
|
+
await app.native.storage.set_data(str(key.value), "hello")
|
|
43
|
+
status.update(text="stored")
|
|
44
|
+
except NativeError as err: # err.code is the upstream code, e.g. NE_ST_INVSTKY
|
|
45
|
+
status.update(text=f"failed: {err.code}")
|
|
46
|
+
|
|
47
|
+
ui.Button("Store", on_click=put)
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
async def main() -> None:
|
|
51
|
+
app = ui.AsyncApplication(title="Storage", profile="custom", native_allow_list=ROUTES)
|
|
52
|
+
build(app)
|
|
53
|
+
await app.run()
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
if __name__ == "__main__":
|
|
57
|
+
asyncio.run(main())
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Source: `examples/native/storage.py` (one tested example per native area under `examples/native/`;
|
|
61
|
+
`neutralino examples list` shows which are packaged). Every such example defines `ROUTES`, the exact
|
|
62
|
+
allow list it needs.
|
|
63
|
+
|
|
64
|
+
## Rules
|
|
65
|
+
|
|
66
|
+
- **Allow list first.** One list for the page and Python (ADR-006). A route not on it fails with
|
|
67
|
+
`NativeError` code `NE_RT_NATPRME`. Use `profile="trusted"` for the typed helpers, otherwise
|
|
68
|
+
`profile="custom"` + `native_allow_list=[...]`. Never default to `"*"`.
|
|
69
|
+
- **Argument mapping.** Required arguments are positional; options the official client takes from an
|
|
70
|
+
object are keyword-only (`read_binary_file(path, pos=, size=)`); `UNSET` omits a field, `None`
|
|
71
|
+
sends JSON `null` (except `storage.set_data(key, None)`, which removes the key). Paths accept
|
|
72
|
+
`os.PathLike`; bytes arguments accept bytes-like; binary results are `bytes`.
|
|
73
|
+
- **Errors.** `NativeError` carries upstream `code` and `message`. Every call takes `timeout=` seconds;
|
|
74
|
+
a timeout raises `CallTimeoutError` with `outcome_unknown = True` and is never retried: the operation
|
|
75
|
+
may have happened.
|
|
76
|
+
- **Window calls** wait until the runtime's window exists (counted against `timeout`; ends with
|
|
77
|
+
`ConnectionLostError` if the session closes first). Outside window mode getters raise `UnsupportedError`.
|
|
78
|
+
Do not call raw `app.restart_process()` or `window.create()`: use `Application.restart()` and
|
|
79
|
+
`app.windows.create()`.
|
|
80
|
+
- **Exit.** `app.exit()` gets no reply; in window mode on Linux the pinned runtime crashes on it
|
|
81
|
+
(ADR-005), so use `Application.shutdown()` or `request_stop()`.
|
|
82
|
+
- **Processes.** Children from `os.spawn_process` / background `exec_command` outlive `shutdown()`;
|
|
83
|
+
stop them first (see neutralino-python references). `exec_command` runs through `/bin/sh -c`:
|
|
84
|
+
never build the string from untrusted input; `commandAllowList` is not a shell filter.
|
|
85
|
+
- **Files.** Created files are 0600/0700 (umask 077); use `filesystem.set_permissions` to widen.
|
|
86
|
+
Add `filesystemScopes` in config when touching files. Large files: `open_file` + `update_opened_file`.
|
|
87
|
+
- **Events.** `client.events.on("watchFile", handler)`, `once`, `stream`, `broadcast`, `dispatch`
|
|
88
|
+
(local subscribers only). Per-subscription bounded queue (512), one event at a time in order; a
|
|
89
|
+
subscription that falls behind stops with `QueueFullError`: events are never dropped silently.
|
|
90
|
+
|
|
91
|
+
## Pitfalls
|
|
92
|
+
|
|
93
|
+
- Using the camelCase upstream name as a Python method (`readFile`) or the snake_case name in the
|
|
94
|
+
allow list (`read_file`): methods are snake_case, routes are camelCase.
|
|
95
|
+
- Forgetting that the same list governs Python itself: `app.native.os.get_env(...)` fails under `"restricted"`.
|
|
96
|
+
- `window.set_badge` is accepted but does nothing on Linux; `window.set_main_menu` adds a GTK bar.
|
|
97
|
+
- `net.*` helpers are the official client's; this is not an HTTP stack for bulk downloads.
|
|
98
|
+
- Dialogs need a dialog helper on Linux (`zenity`, `kdialog`, `qarma` or `matedialog`); `neutralino doctor` checks.
|
|
99
|
+
|
|
100
|
+
## References
|
|
101
|
+
|
|
102
|
+
Paths written `examples/...` in this skill are in the framework's source repository only; the wheel ships the
|
|
103
|
+
apps that `neutralino examples list` shows (`neutralino examples export NAME DIR`).
|
|
104
|
+
|
|
105
|
+
- [references/api-conventions.md](references/api-conventions.md): namespaces, naming, argument and return rules, helpers reproduced from the client.
|
|
106
|
+
- [references/permissions-windows.md](references/permissions-windows.md): allow lists, profiles, windows, readiness, modes, process rules.
|
|
107
|
+
- [references/desktop-helpers.md](references/desktop-helpers.md): dialogs, clipboard, notifications, app paths, settings, geometry.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Native API conventions
|
|
2
|
+
|
|
3
|
+
Source of truth: `contracts/api-inventory.json` of this version (144 entries: 138 `wrapped`,
|
|
4
|
+
4 `sdk-equivalent`, 2 `js-only`). The installed offline reference `reference/native.md` and the
|
|
5
|
+
manifest `manifests/native.json` list every route, its Python method, arguments and return type.
|
|
6
|
+
|
|
7
|
+
## Naming
|
|
8
|
+
|
|
9
|
+
| Upstream route | Python |
|
|
10
|
+
|---|---|
|
|
11
|
+
| `filesystem.readBinaryFile` | `client.filesystem.read_binary_file(path, pos=..., size=...)` |
|
|
12
|
+
| `os.showOpenDialog` | `client.os.show_open_dialog(...)` |
|
|
13
|
+
| `window.setTitle` | `client.window.set_title(title)` |
|
|
14
|
+
| `storage.setData` | `client.storage.set_data(key, data)` |
|
|
15
|
+
|
|
16
|
+
Methods are snake_case; allow-list entries keep the upstream route name (`filesystem.readBinaryFile`).
|
|
17
|
+
Each method has an async form (`AsyncClient`, UI async app) and a blocking form (`Client`, blocking apps).
|
|
18
|
+
The blocking form raises `RuntimeError` on the event-loop thread instead of deadlocking.
|
|
19
|
+
|
|
20
|
+
## Arguments and results
|
|
21
|
+
|
|
22
|
+
- Required arguments are positional. Options the official client takes from an object are
|
|
23
|
+
keyword-only. Optional arguments the client takes positionally (`events.broadcast(event, data)`)
|
|
24
|
+
stay positional.
|
|
25
|
+
- `UNSET` (default) omits a field from the wire payload; `None` sends `null` (the runtime treats
|
|
26
|
+
null as absent, except `storage.set_data(key, None)` which removes the key).
|
|
27
|
+
- Paths accept `os.PathLike`, passed with `os.fspath`, never normalised. Bytes arguments accept
|
|
28
|
+
bytes-like objects; binary results are `bytes`.
|
|
29
|
+
- Returns are TypedDicts with the upstream key names (`neutralino.api.types`).
|
|
30
|
+
- Native messages are limited to 8 MiB.
|
|
31
|
+
|
|
32
|
+
## Errors
|
|
33
|
+
|
|
34
|
+
- `NativeError(code, message)`: upstream codes (`NE_FS_FILRDER`, `NE_RT_NATPRME`, ...). Each wrapper's
|
|
35
|
+
docstring lists its codes.
|
|
36
|
+
- `CallTimeoutError`: `outcome_unknown = True`; nothing is retried.
|
|
37
|
+
- `UnsupportedError`: window getters outside window mode.
|
|
38
|
+
- `ConnectionLostError`, `NotReadyError`, `ValidationError` (local argument checks before any call).
|
|
39
|
+
|
|
40
|
+
## Helpers reproduced from the official client
|
|
41
|
+
|
|
42
|
+
`window.set_size` merges `window.getSize` first; `window.create` builds the same command line as the JS
|
|
43
|
+
client; `extensions.dispatch` waits for the target to connect; `clipboard.read_image(format)` converts
|
|
44
|
+
pixels like the client; `net.get/post/...`; `updater.*` (the runtime's own updater, ADR-009; not
|
|
45
|
+
`neutralino.updates`).
|
|
46
|
+
|
|
47
|
+
## Events
|
|
48
|
+
|
|
49
|
+
```python
|
|
50
|
+
async def watch(client, handler) -> None: # `client`: an AsyncClient (or app.native in a UI app)
|
|
51
|
+
sub = client.events.on("watchFile", handler) # handler(Event); coroutine or plain function
|
|
52
|
+
client.events.once("windowFocus", handler)
|
|
53
|
+
await client.events.broadcast(
|
|
54
|
+
"myEvent", {"x": 1}
|
|
55
|
+
) # delivered to pages; extensions do not receive it
|
|
56
|
+
client.events.dispatch("local", {"x": 1}) # local Python subscribers only
|
|
57
|
+
async for ev in client.events.stream("openedFile"):
|
|
58
|
+
print(ev.name)
|
|
59
|
+
break
|
|
60
|
+
sub.unsubscribe()
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Plain handlers run on a daemon worker thread, coroutines on the loop; one event at a time per
|
|
64
|
+
subscription, in order; queue 512. `off()`/`unsubscribe()` work from any thread. When the runtime
|
|
65
|
+
connection ends on its own, `events.stream()` and pending `wait_for()` raise `ConnectionLostError`;
|
|
66
|
+
when you close the session, streams end and `wait_for()` raises `NotReadyError`.
|
|
67
|
+
`events.wait_for("*")` matches any event.
|
|
68
|
+
|
|
69
|
+
## Inventory by namespace
|
|
70
|
+
|
|
71
|
+
window 31, filesystem 30, os 17, computer 15, app 9, clipboard 8, net 8, resources 6, storage 5,
|
|
72
|
+
events 4, extensions 3, server 3, updater 2, custom 1, debug 1, init 1.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Desktop helpers (`neutralino.ui`)
|
|
2
|
+
|
|
3
|
+
Validated wrappers over native dialogs, notifications, clipboard and `os.open`, plus per-app
|
|
4
|
+
directories and atomic JSON settings. They call the native API (they add argument validation and
|
|
5
|
+
clearer permission errors, no new native features). Needed routes: `ui.desktop_routes(*helpers)`.
|
|
6
|
+
|
|
7
|
+
| Helper | Native route | Result |
|
|
8
|
+
|---|---|---|
|
|
9
|
+
| `open_file(title=None, *, filters=None, multiple=False, default_path=None)` | `os.showOpenDialog` | path, or `None` if cancelled; `multiple=True`: list |
|
|
10
|
+
| `save_file(title=None, *, filters=None, default_path=None, force_overwrite=False)` | `os.showSaveDialog` | path or `None` |
|
|
11
|
+
| `select_folder(title=None, *, default_path=None)` | `os.showFolderDialog` | path or `None` |
|
|
12
|
+
| `message_box(title, message, *, buttons="OK", icon="INFO")` | `os.showMessageBox` | `"OK"`, `"CANCEL"`, `"YES"`, `"NO"`, `"ABORT"`, `"RETRY"`, `"IGNORE"` |
|
|
13
|
+
| `confirm(title, message, *, icon="QUESTION")` | `os.showMessageBox` | `True` only for Yes |
|
|
14
|
+
| `notify_native(title, body, *, icon="INFO")` | `os.showNotification` | `None` |
|
|
15
|
+
| `clipboard_text()` / `set_clipboard_text(text)` | `clipboard.readText` / `writeText` | text or `""` / `None` |
|
|
16
|
+
| `open_url(url)` | `os.open` | `None` |
|
|
17
|
+
|
|
18
|
+
- `buttons`: `OK`, `OK_CANCEL`, `YES_NO`, `YES_NO_CANCEL`, `RETRY_CANCEL`, `ABORT_RETRY_IGNORE`.
|
|
19
|
+
`icon`: `INFO`, `WARNING`, `ERROR`, `QUESTION`.
|
|
20
|
+
- `filters`: `[("Images", ["png", "jpg"])]`; extensions are 1-32 letters or digits (`png`, not `.png`) or
|
|
21
|
+
`*`; at most 32 filters with 64 extensions each.
|
|
22
|
+
- Limits: titles 1024 characters, messages and bodies 64 KiB, clipboard text 16 MiB, no NUL.
|
|
23
|
+
- Dialog calls wait up to 24 hours; the 30-second request timeout does not apply.
|
|
24
|
+
- Blocking facade: helpers block and raise `RuntimeError` on the loop thread; use
|
|
25
|
+
`await app.desktop.<name>(...)` in async callbacks. Before `start()`: `StartupError`.
|
|
26
|
+
|
|
27
|
+
```python
|
|
28
|
+
from neutralino import ui
|
|
29
|
+
|
|
30
|
+
app = ui.Application(title="Pick", profile="trusted")
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def pick() -> None: # sync callback on a worker thread
|
|
34
|
+
path = app.open_file("Open image", filters=[("Images", ["png", "jpg"])])
|
|
35
|
+
if path is not None:
|
|
36
|
+
app.settings.update(last_file=path)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Directories and settings
|
|
40
|
+
|
|
41
|
+
`app.paths` (`ui.AppPaths(app_id)`): `data_dir`, `config_dir`, `cache_dir`, `log_dir`, `state_dir`
|
|
42
|
+
(created on first use, mode 0700 on POSIX); `location(kind)` returns the path without creating it.
|
|
43
|
+
Linux uses XDG (`~/.local/share/<id>`, `~/.config/<id>`, `~/.cache/<id>`, `~/.local/state/<id>`).
|
|
44
|
+
Relative `XDG_*` values are ignored. macOS/Windows layouts are unit-tested by simulation only.
|
|
45
|
+
|
|
46
|
+
`app.settings` is `ui.Settings(config_dir / "settings.json")`: `get`, `set`, `update`, `delete`,
|
|
47
|
+
`clear`, `as_dict`, `reload`, mapping operators, `subscribe(fn) -> unsubscribe`. Each write is atomic
|
|
48
|
+
(temp file, fsync, `os.replace`); only JSON values, files up to 1 MiB; an unreadable file is renamed
|
|
49
|
+
`settings.json.corrupt-<time>` and settings start empty; threads are safe, several processes are not
|
|
50
|
+
coordinated (last write wins).
|
|
51
|
+
|
|
52
|
+
Application id: `app_id=` wins, else the config's `applicationId`, else a slug of `title`
|
|
53
|
+
(two projects with the same title share directories: pass `app_id=`).
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Permissions, windows and modes
|
|
2
|
+
|
|
3
|
+
## One policy for page and Python (ADR-006, ADR-017)
|
|
4
|
+
|
|
5
|
+
The runtime has one `nativeAllowList`/`nativeBlockList`/`commandAllowList`/`filesystemScopes`
|
|
6
|
+
policy. It applies to the page and to the Python extension connection alike. It is not an
|
|
7
|
+
independent sandbox for Python.
|
|
8
|
+
|
|
9
|
+
- No config and no `native_allow_list=`: the SDK minimum only (`app.broadcast`, `app.exit`,
|
|
10
|
+
`extensions.dispatch`, `extensions.getStats`). Python's own calls need their routes too.
|
|
11
|
+
- `native_allow_list=[...]` adds routes to that minimum; `"*"` allows everything (upstream default).
|
|
12
|
+
- A config that sets its own lists is used as written; it must still allow `extensions.getStats` and
|
|
13
|
+
`app.broadcast` (start-up fails otherwise) and should allow `extensions.dispatch` (a warning is
|
|
14
|
+
logged if blocked).
|
|
15
|
+
- UI apps: `profile="restricted" | "trusted" | "custom"` (neutralino-ui). A fixed profile together with
|
|
16
|
+
`native_allow_list=` is refused.
|
|
17
|
+
- Least privilege in practice: list exactly the routes the code calls
|
|
18
|
+
(the packaged `file-manager` example (`app.py`) and `examples/monitor/app.py` do this), keep privileged work in
|
|
19
|
+
exposed Python functions that validate their inputs, add `filesystemScopes` for files, and give every
|
|
20
|
+
page a restrictive Content-Security-Policy.
|
|
21
|
+
- `filesystemScopes`: `{"<folder>": "read" | "write" | "read-write"}` (exactly these values; others are refused
|
|
22
|
+
by the SDK). Keys may use `${NL_PATH}`, `${NL_OSHOMEPATH}` ...; no globs, a scope covers the folder and
|
|
23
|
+
everything below. Outside every scope `filesystem.*` fails with `NE_FS_SCOPERR` for the page and Python. A
|
|
24
|
+
`ui` app passes it as `ui.Application(..., profile="custom", native_allow_list=[...],
|
|
25
|
+
config={"filesystemScopes": {str(root): "read-write"}})`.
|
|
26
|
+
|
|
27
|
+
## Windows
|
|
28
|
+
|
|
29
|
+
- `app.windows.create(...)` starts one extra owned runtime per window and works only while the
|
|
30
|
+
application runs; windows still being created at shutdown are stopped too.
|
|
31
|
+
- `window.*` calls wait for the window to exist (ADR-011/012). For an `Extension` the readiness gate
|
|
32
|
+
uses `app.getConfig`; if that is blocked the connect succeeds with a warning and window calls wait
|
|
33
|
+
for a window event (pass `window_ready=True` outside window mode).
|
|
34
|
+
- `remember_geometry=True` (UI) polls size/position/maximized once per second (changes in the last
|
|
35
|
+
second before the user closes can be lost), restores them at start through the window config, adds four
|
|
36
|
+
`window.*` routes to the allow list, and does not move a window back from a disconnected monitor.
|
|
37
|
+
- Frameless, always-on-top and multi-window features: see `examples/native/borderless.py`,
|
|
38
|
+
`always_on_top.py`, `multi_window.py`, `states.py` (window-manager features need a real window manager;
|
|
39
|
+
a bare Xvfb reports only show/hide).
|
|
40
|
+
|
|
41
|
+
## Modes
|
|
42
|
+
|
|
43
|
+
Window mode is the default and the only one the SDK picks. Browser and chrome modes serve the token to
|
|
44
|
+
whoever asks first; cloud mode binds every network interface (a warning is logged, the SDK never selects
|
|
45
|
+
it). The runtime's HTTP server does not normalise paths (ADR-016): any local process that finds the port
|
|
46
|
+
can read the user's files while the app runs. Treat other local users as trusted.
|
|
47
|
+
|
|
48
|
+
## Refused configuration
|
|
49
|
+
|
|
50
|
+
`tokenSecurity` other than `"one-time"`; runtime arguments `--path`, `--config-file`, `--res-mode`,
|
|
51
|
+
`--document-root`, `--enable-server`, `--enable-native-api`, `--enable-extensions`, `--export-auth-info`,
|
|
52
|
+
`--mode`; `dataLocation` other than `"app"`; `storageLocation: "app"`; `null` for `modes`, `cli`,
|
|
53
|
+
`logging`, `globalVariables`. All raise `ValidationError`.
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: neutralino-packaging
|
|
3
|
+
description: Scaffold templates, write app.toml, and build neutralino-python apps as a portable directory or a managed installer with an app-specific venv, hashed wheelhouse, offline install and clean uninstall. Use it when you must ship, install, or uninstall an app, add compiled dependencies, or diagnose a build or doctor failure.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# neutralino-packaging
|
|
7
|
+
|
|
8
|
+
Two build modes, both from `neutralino build`. Neither needs Node or the network at install or run time;
|
|
9
|
+
neither is a single executable or a signed installer. Tested end to end on Linux x86_64 only.
|
|
10
|
+
|
|
11
|
+
| | portable (default) | managed (`--mode managed`) |
|
|
12
|
+
|---|---|---|
|
|
13
|
+
| Output | `dist/<slug>/` | `dist/<slug>-managed/` with `install.sh` |
|
|
14
|
+
| Python at run time | target machine's Python 3.11+ (`$PYTHON`, else `python3`) | app-specific venv built at install from that machine's CPython X.Y |
|
|
15
|
+
| Third-party packages | pure-Python only, copied with `--vendor NAME` | any wheels (compiled too), pinned with hashes, for the target ABI/platform |
|
|
16
|
+
| Install step | none: copy and run `run.sh` | `install.sh`: versioned install, launcher, menu entry |
|
|
17
|
+
| Needs `app.toml` | no | yes (`id`, `name`, `version`, `entry`) |
|
|
18
|
+
|
|
19
|
+
Decision: pure Python or only stdlib plus a few pure packages, run from a folder -> portable.
|
|
20
|
+
NumPy, DuckDB or any compiled wheel, a menu entry, updates -> managed.
|
|
21
|
+
|
|
22
|
+
## Commands
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
neutralino init myapp --template python-ui --name "My App" --app-id org.example.myapp
|
|
26
|
+
neutralino doctor # before building: runtime, webview, renderer
|
|
27
|
+
neutralino build # portable -> dist/<slug>/
|
|
28
|
+
dist/myapp/run.sh # PYTHON=python3.12 to choose the interpreter
|
|
29
|
+
neutralino build --mode managed # pip download for this machine (network)
|
|
30
|
+
neutralino build --mode managed --python-version 3.12 --wheelhouse ./wheels # offline, your wheels
|
|
31
|
+
dist/myapp-managed/install.sh # on the target; --reinstall, --no-desktop
|
|
32
|
+
python3 ~/.local/share/org.example.myapp/uninstall.py --purge
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
`--app-id` must match `[A-Za-z0-9][A-Za-z0-9_.]{0,127}`, no `..`, not a Windows device name.
|
|
36
|
+
|
|
37
|
+
## `app.toml` (read by `build` and `neutralino.updates`; unknown keys are errors)
|
|
38
|
+
|
|
39
|
+
```toml
|
|
40
|
+
[app]
|
|
41
|
+
id = "org.example.inventory"
|
|
42
|
+
name = "Inventory"
|
|
43
|
+
version = "1.2.0" # SemVer 2.0.0
|
|
44
|
+
entry = "app.py"
|
|
45
|
+
|
|
46
|
+
[package] # managed mode
|
|
47
|
+
requirements = "requirements.txt"
|
|
48
|
+
python = ">=3.11"
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Check it with the shared loader:
|
|
52
|
+
|
|
53
|
+
```python
|
|
54
|
+
from neutralino.updates import load_config
|
|
55
|
+
|
|
56
|
+
config = load_config("app.toml") # raises ConfigError with a clear message on any problem
|
|
57
|
+
print(config.app.id, config.app.version)
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Managed requirements
|
|
61
|
+
|
|
62
|
+
`requirements.txt` lists every package, transitive ones included, as `name==version --hash=sha256:...`
|
|
63
|
+
(`uv pip compile --generate-hashes`, `pip-compile --generate-hashes`, or `uv export --format
|
|
64
|
+
requirements-txt` without markers). `-r`, `-e`, index options, URLs, paths, ranges and environment markers are
|
|
65
|
+
refused. Without `--wheelhouse` the build runs `pip download --only-binary=:all:` for the target (the only
|
|
66
|
+
network step); no sdist is ever built. Every wheel is checked: name and version, tags compatible with
|
|
67
|
+
the target, SHA-256 among the hashes. Failure is exit 3 (wrong ABI or platform, hash mismatch, no wheel).
|
|
68
|
+
|
|
69
|
+
## Rules
|
|
70
|
+
|
|
71
|
+
- Shipped: the entry and the project's other files (CSS/JS/assets, `app.toml`). Left out and recorded in
|
|
72
|
+
`manifest.json`: hidden files and folders (`.git`, `.env`, `.venv`), `venv`, `node_modules`, `__pycache__`,
|
|
73
|
+
`dist`/`build`, `*.pyc`, key files (`*.pem`, `*.key`, `id_rsa`, ...). Refused (exit 3): links leaving the project,
|
|
74
|
+
symlinked directories, FIFOs/devices, building the home directory or `/`.
|
|
75
|
+
- Portable imports are checked statically: anything outside the standard library, your modules,
|
|
76
|
+
`neutralino`/`websockets` or a `--vendor`ed package fails the build.
|
|
77
|
+
- The build is staged in a sibling folder and swapped in only when complete; an existing `--out` is
|
|
78
|
+
replaced only if it is recognisably a build (manifest + checksums).
|
|
79
|
+
- At run time the UI renderer is staged into `$XDG_CACHE_HOME/neutralino-python/ui-stage/` and every file
|
|
80
|
+
is re-verified; the build directory is never written. Modified renderer assets: exit 4.
|
|
81
|
+
- The managed installer: refuses another Python version, another machine, a wheel the glibc cannot run, a
|
|
82
|
+
file not in `checksums.txt` (exit 3); non-Linux (exit 4). It installs into `<data>/versions/<version>/`,
|
|
83
|
+
never touches app data/config/cache/state, writes `current.json`, `launcher.py` and `~/.local/bin/<app-id>`.
|
|
84
|
+
- Uninstall keeps data, config, cache and state unless `--purge`; it refuses while the app runs.
|
|
85
|
+
|
|
86
|
+
## Pitfalls
|
|
87
|
+
|
|
88
|
+
- No interpreter is bundled: the target CPython must equal the build's `--python-version` and have
|
|
89
|
+
`venv`/`ensurepip` (Debian/Ubuntu: `python3-venv`).
|
|
90
|
+
- Integrity is SHA-256, not authenticity: distribute over a channel you trust.
|
|
91
|
+
- Windows and macOS are not verified: managed installs refuse non-Linux systems and `--platform` accepts
|
|
92
|
+
Linux tags only; `run.bat` exists for portable builds but is untested.
|
|
93
|
+
- `--bundle` (resources.neu) needs Node at build time and is refused with `--mode managed`.
|
|
94
|
+
|
|
95
|
+
## References
|
|
96
|
+
|
|
97
|
+
- [references/templates-and-config.md](references/templates-and-config.md): what each `init` template writes, `app.toml`, build options.
|
|
98
|
+
- [references/build-layout.md](references/build-layout.md): the build layout, manifest, checksums, what is verified, doctor checks.
|
|
99
|
+
- [references/managed-install.md](references/managed-install.md): wheelhouse rules, installer steps, installed paths, uninstall, limits.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Build layout and verification
|
|
2
|
+
|
|
3
|
+
```
|
|
4
|
+
runtime/neutralino-<platform> pinned official binary (hash checked after copy)
|
|
5
|
+
app/ the project files (resources.neu with --bundle)
|
|
6
|
+
vendor/neutralino, websockets the SDK, pure Python; includes the prebuilt UI renderer
|
|
7
|
+
(vendor/neutralino/_data/renderer, every file checked against manifest.json digests)
|
|
8
|
+
vendor/<--vendor packages>
|
|
9
|
+
boot.py, run.sh, run.bat fixed bootstrap and launchers (read manifest.json)
|
|
10
|
+
licenses/ runtime, client, SDK, websockets and vendored licences
|
|
11
|
+
manifest.json sdk/runtime/client versions, platform, entry, mode, app, ui (renderer digest),
|
|
12
|
+
distributions and licences, excluded paths
|
|
13
|
+
checksums.txt SHA-256 of every other file
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Managed builds add `wheelhouse/` (the chosen wheels only), `requirements.lock.txt` (each requirement
|
|
17
|
+
with the hash of its chosen wheel), `install.sh`, `install.py`, `uninstall.py`, and `manifest.json`
|
|
18
|
+
`target` (python, abi, machine, platform tags) and `wheels` (file, name, version, sha256, import names).
|
|
19
|
+
|
|
20
|
+
## What the build refuses or leaves out
|
|
21
|
+
|
|
22
|
+
- Sources are walked without following links. Left out (listed under `excluded` in `manifest.json`):
|
|
23
|
+
hidden files and folders, folders holding `pyvenv.cfg`, `venv`, `node_modules`, `__pycache__`, `dist` and
|
|
24
|
+
`build` outside the frontend folder, `*.pyc`, key files (`*.pem`, `*.key`, `*.p12`, `*.pfx`, `*.jks`,
|
|
25
|
+
`*.keystore`, `id_rsa` ...), and the project's `app.toml` `[package] exclude = ["tests", ...]` globs
|
|
26
|
+
(portable, managed and release alike; must not match `app.toml`, the entry or the frontend folder).
|
|
27
|
+
- Refused (exit 3): a link leaving the project, a symlinked directory, a dangling link, FIFOs, sockets,
|
|
28
|
+
devices, `--app` outside the project, building the home directory or `/`.
|
|
29
|
+
- Imports are checked statically in portable mode (stdlib, the app's modules, `neutralino`, `websockets`,
|
|
30
|
+
`--vendor`ed packages). Compiled extensions cannot be vendored: use managed mode.
|
|
31
|
+
|
|
32
|
+
## Verify a build
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
neutralino doctor --json # python, platform, runtime hash, webview, display, ui-renderer, venv
|
|
36
|
+
dist/myapp/run.sh # portable: run it
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Check `checksums.txt` with `sha256sum -c checksums.txt` from inside the build directory. `doctor` checks:
|
|
40
|
+
`python` (3.11+), `platform`, `runtime` (pinned hash), `webview` (WebKitGTK on Linux), `display`,
|
|
41
|
+
`libayatana-appindicator3`, `dialog-helper`, `ui-renderer` (every file in the packaged renderer manifest
|
|
42
|
+
present and matching its SHA-256), `venv` (ensurepip, needed by managed installs), optional `node`/`npm`,
|
|
43
|
+
`cache`, and with `--config` a given `neutralino.config.json`. `--smoke` starts a hidden window bound to
|
|
44
|
+
127.0.0.1 and makes one call. Exit 4 when a check failed.
|
|
45
|
+
|
|
46
|
+
## Dependencies on the target
|
|
47
|
+
|
|
48
|
+
- Portable: Python 3.11+, the WebView libraries (Debian/Ubuntu `libwebkit2gtk-4.1-0`; Fedora
|
|
49
|
+
`webkit2gtk4.1`), a desktop session (X11 or XWayland).
|
|
50
|
+
- Managed: CPython of exactly the target version with `venv`/`ensurepip`, glibc new enough for the wheels'
|
|
51
|
+
manylinux tags, the same WebView libraries.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Managed install, paths and uninstall
|
|
2
|
+
|
|
3
|
+
## Wheels
|
|
4
|
+
|
|
5
|
+
- One wheel per requirement with the same name and version; tags compatible with the target (`cpXY-cpXY`,
|
|
6
|
+
`cp3Y-abi3` for Y <= X.Y, `py3-none`, platform in the target tags or `any`); SHA-256 among the
|
|
7
|
+
requirement's hashes. Otherwise exit 3 naming the wheel and the target. Unrelated wheels in a
|
|
8
|
+
`--wheelhouse` are ignored.
|
|
9
|
+
- Environment markers are not evaluated: export the lock for the target.
|
|
10
|
+
- The only network step is `pip download` (this Python's pip, `pythonX.Y`'s, `python3`'s, or one bootstrapped
|
|
11
|
+
with `ensurepip` into a throw-away venv). Offline: supply `--wheelhouse`.
|
|
12
|
+
|
|
13
|
+
## `install.sh [--reinstall] [--no-desktop]`
|
|
14
|
+
|
|
15
|
+
Runs `install.py` with `$PYTHON`, else `python3` (re-executes with `pythonX.Y` when needed). It checks the
|
|
16
|
+
interpreter, machine, glibc and `checksums.txt`, takes `<data>/install.lock`, copies the bundle to
|
|
17
|
+
`<data>/versions/.staging-*`, creates `venv/` and runs `pip install --no-index --find-links wheelhouse
|
|
18
|
+
--require-hashes --only-binary=:all: -r requirements.lock.txt` with `PIP_*`/`PYTHON*` cleared, renames the
|
|
19
|
+
staging folder to `<data>/versions/<version>/`, writes `<data>/current.json` atomically (schema 1: `current`,
|
|
20
|
+
`previous`, `pending`, `staged`, `trial`, `quarantined`; the old pointer is kept as `current.json.bak`),
|
|
21
|
+
copies the launcher to `<data>/launcher.py` and writes `~/.local/bin/<app-id>` (runs `python -I launcher.py
|
|
22
|
+
--app-dir <data> -- ARGS`) and the menu entry. Exit codes: 0 ok, 1 venv or pip failed, 2 usage, 3 wrong
|
|
23
|
+
package or interpreter, 4 environment (not Linux, no `ensurepip`).
|
|
24
|
+
|
|
25
|
+
## Installed paths (Linux)
|
|
26
|
+
|
|
27
|
+
| What | Path |
|
|
28
|
+
|---|---|
|
|
29
|
+
| install root `<data>` | `$XDG_DATA_HOME/<app-id>` (default `~/.local/share/<app-id>`) |
|
|
30
|
+
| versions | `<data>/versions/<semver>/` (`app/`, `runtime/`, `vendor/`, `venv/`, `boot.py`, `manifest.json`, `checksums.txt`, `licenses/`) |
|
|
31
|
+
| pointer | `<data>/current.json` |
|
|
32
|
+
| command | `~/.local/bin/<app-id>` |
|
|
33
|
+
| launcher | `<data>/launcher.py`, `launcher.log`, `.launch.lock` while running |
|
|
34
|
+
| menu entry | `$XDG_DATA_HOME/applications/<app-id>.desktop` |
|
|
35
|
+
| uninstaller | `<data>/uninstall.py` |
|
|
36
|
+
| app config / cache / state | `$XDG_CONFIG_HOME/<app-id>`, `$XDG_CACHE_HOME/<app-id>`, `$XDG_STATE_HOME/<app-id>` |
|
|
37
|
+
|
|
38
|
+
The app's own files never live inside `versions/`, so installing, upgrading or removing a version does not
|
|
39
|
+
touch them. Older versions are kept (pruned per `keep_versions` by `neutralino.updates`). Rolling back
|
|
40
|
+
application data is not automatic: an app that migrates data must declare compatibility and keep backups.
|
|
41
|
+
|
|
42
|
+
## Uninstall
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
python3 ~/.local/share/org.example.myapp/uninstall.py # keeps data, config, cache, state
|
|
46
|
+
python3 ~/.local/share/org.example.myapp/uninstall.py --purge # removes those too
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Refuses (exit 1) while the app runs. Removes the command and menu entry (only if they carry this installer's
|
|
50
|
+
marker) and exactly the managed names in `<data>`: `versions/`, `staging/`, `quarantine/`, `current.json`,
|
|
51
|
+
`current.json.bak`, `launcher.py`, `launcher.log`, `launcher.log.1`, `.launch.lock`, `install.json`,
|
|
52
|
+
`uninstall.py`, `install.lock`. Links are removed, never followed.
|
|
53
|
+
|
|
54
|
+
## Limits
|
|
55
|
+
|
|
56
|
+
Tested on Debian 13 (glibc 2.41), CPython 3.12 and 3.13: template builds started Node-free in a network
|
|
57
|
+
namespace, managed install of a real NumPy wheel offline, then the app launched on the pinned runtime under
|
|
58
|
+
Xvfb. Windows and macOS: untested. No interpreter bundled. No signature (integrity only). Updates of a managed
|
|
59
|
+
install need managed releases (`neutralino release --mode managed`).
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Templates and configuration
|
|
2
|
+
|
|
3
|
+
```text
|
|
4
|
+
neutralino init [PATH] [--name NAME] [--force] [--template {python-ui,hybrid,vanilla,react}] [--app-id ID] [--updates github --repo OWNER/NAME]
|
|
5
|
+
```
|
|
6
|
+
|
|
7
|
+
| Template | Writes | Node |
|
|
8
|
+
|---|---|---|
|
|
9
|
+
| none | original scaffold: `app.py` (`neutralino.Application`), `neutralino.config.json`, `frontend/` (`index.html`, `app.js`, `styles.css`, pinned `neutralino.js`, `python-bridge.mjs` + `.d.ts`); no `app.toml` | no |
|
|
10
|
+
| `python-ui` | `app.py` (`profile="restricted"`), `app.toml`, empty `requirements.txt`, `README.md`, `.gitignore` | no |
|
|
11
|
+
| `hybrid` | `python-ui` plus `components/counter.mjs` (plain JS custom component via `add_js_module`) and `styles.css` (`add_css_file`) | no |
|
|
12
|
+
| `react` | `python-ui` plus `widget/` (React/Mantine/Vite source, versions pinned from the repository lock) and the compiled `components/widget.mjs`, committed | only to change the widget (Node 20.19+ or 22.12+, as Vite 8 requires: `cd widget && npm install && npm run build`) |
|
|
13
|
+
| `vanilla` | the original scaffold byte for byte, plus `app.toml` | no |
|
|
14
|
+
|
|
15
|
+
- `--name`: 1-200 characters, no control characters; default is the folder name in title case; escaped for
|
|
16
|
+
each file type (TOML, JSON, Python, JS string, HTML text).
|
|
17
|
+
- `--app-id`, `--updates`, `--repo` need `--template` (exit 2); `--updates` and `--repo` need each other. An
|
|
18
|
+
invalid id, name or repository is exit 3. Without `--updates` no update section is written and no update
|
|
19
|
+
code runs.
|
|
20
|
+
- Safety: an existing file with different content is a conflict (unified diff, exit 3) unless `--force`;
|
|
21
|
+
identical files are `unchanged`; a symlink or junction among targets or parents, or a non-regular file, is
|
|
22
|
+
refused even with `--force`. Writes are atomic.
|
|
23
|
+
|
|
24
|
+
## `app.toml`
|
|
25
|
+
|
|
26
|
+
```toml
|
|
27
|
+
[app]
|
|
28
|
+
id = "org.example.inventory" # [A-Za-z0-9][A-Za-z0-9_.]{0,127}, same rule as ui.Application(app_id=)
|
|
29
|
+
name = "Inventory"
|
|
30
|
+
version = "1.2.0" # SemVer 2.0.0
|
|
31
|
+
entry = "app.py" # relative to the project
|
|
32
|
+
|
|
33
|
+
[updates] # optional; see the neutralino-updates skill
|
|
34
|
+
enabled = true
|
|
35
|
+
provider = "github"
|
|
36
|
+
repository = "owner/name"
|
|
37
|
+
|
|
38
|
+
[package] # managed mode; optional
|
|
39
|
+
requirements = "requirements.txt"
|
|
40
|
+
python = ">=3.11"
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Unknown sections or keys are errors. The structure is parsed by one shared loader used by `init`, the
|
|
44
|
+
managed packager and `neutralino.updates`; every failure is a `ConfigError` naming the problem.
|
|
45
|
+
|
|
46
|
+
## Build options
|
|
47
|
+
|
|
48
|
+
```text
|
|
49
|
+
neutralino build [--project DIR] [--app ENTRY] [--out DIR] [--frontend DIR] [--frontend-cmd CMD ...] [--bundle [--offline]] [--vendor NAME]... [--mode {portable,managed}] [--requirements FILE] [--wheelhouse DIR] [--python-version X.Y] [--platform TAG]...
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
- `--mode portable` (default): directory `DIR/dist/<slug>`; `--app` defaults to `app.py`; run with the
|
|
53
|
+
target's Python 3.11+, no Node, no network.
|
|
54
|
+
- `--mode managed`: the portable layout plus wheelhouse, installer, uninstaller (default output
|
|
55
|
+
`DIR/dist/<slug>-managed`); needs `app.toml`; `--app` defaults to its `[app].entry`.
|
|
56
|
+
- Managed-only options (exit 2 with `--mode portable`): `--requirements`, `--wheelhouse`, `--python-version`
|
|
57
|
+
(target CPython, 3.11 or newer; default: the running interpreter), `--platform` (repeatable; default: this
|
|
58
|
+
machine's manylinux tags; Linux tags only).
|
|
59
|
+
- `--frontend`, `--frontend-cmd`, `--bundle`, `--offline`, `--vendor`: see `neutralino build --help`.
|
|
60
|
+
`--vendor NAME` copies a pure-Python package from the build environment.
|
|
61
|
+
- Exit 3: entry outside the project, unsafe files, invalid `app.toml`, unpinned or unhashed requirement,
|
|
62
|
+
wrong-ABI/platform or hash-mismatched wheel. Exit 4: no pinned runtime, missing pip for a download, no
|
|
63
|
+
network for a download, modified UI renderer assets.
|