@bendyline/gilde 0.3.6 → 0.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/authoring/chat-models/lfm3-1.7b-q4.json +3 -3
- package/authoring/chat-models/minicpm-v4.7-35b-a3b-q4.json +10 -4
- package/authoring/chat-models/muse-glimmer-30b-q4.json +39 -3
- package/authoring/chat-models/nemotron3.5-bolt-74b-iq2.json +19 -3
- package/authoring/chat-models/nemotron3.5-bolt-e4b-q4.json +29 -3
- package/authoring/chat-models/qwen3.8-27b-q2.json +21 -5
- package/authoring/chat-models/qwen3.8-27b-q3.json +21 -5
- package/authoring/chat-models/qwen3.8-27b-q4.json +27 -5
- package/authoring/chat-models/qwen3.8-27b-q6.json +26 -6
- package/authoring/chat-models/qwen3.8-27b-q8.json +27 -6
- package/authoring/chat-models/qwen3.8-flash-next-q2.json +6 -3
- package/authoring/page-demo-bootstrap.js +96 -23
- package/data/chat-models/index.json +1 -1
- package/data/chat-models/lf/lfm3-1.7b-q4/manifest.json +3 -3
- package/data/chat-models/lf/lfm3-1.7b-q4/versions/1.0.1/manifest.json +15 -0
- package/data/chat-models/mi/minicpm-v4.7-35b-a3b-q4/manifest.json +3 -3
- package/data/chat-models/mi/minicpm-v4.7-35b-a3b-q4/versions/1.0.1/manifest.json +94 -0
- package/data/chat-models/mu/muse-glimmer-30b-q4/manifest.json +35 -2
- package/data/chat-models/mu/muse-glimmer-30b-q4/versions/1.0.3/manifest.json +31 -0
- package/data/chat-models/mu/muse-glimmer-30b-q4/versions/1.0.4/manifest.json +33 -0
- package/data/chat-models/ne/nemotron3.5-bolt-74b-iq2/manifest.json +10 -4
- package/data/chat-models/ne/nemotron3.5-bolt-74b-iq2/versions/1.0.1/manifest.json +31 -0
- package/data/chat-models/ne/nemotron3.5-bolt-e4b-q4/manifest.json +21 -4
- package/data/chat-models/ne/nemotron3.5-bolt-e4b-q4/versions/1.0.2/manifest.json +26 -0
- package/data/chat-models/qw/qwen3.8-27b-q2/manifest.json +20 -3
- package/data/chat-models/qw/qwen3.8-27b-q2/versions/1.0.1/manifest.json +31 -0
- package/data/chat-models/qw/qwen3.8-27b-q3/manifest.json +23 -6
- package/data/chat-models/qw/qwen3.8-27b-q3/versions/1.0.2/manifest.json +31 -0
- package/data/chat-models/qw/qwen3.8-27b-q4/manifest.json +26 -3
- package/data/chat-models/qw/qwen3.8-27b-q4/versions/1.0.6/manifest.json +128 -0
- package/data/chat-models/qw/qwen3.8-27b-q4/versions/1.0.7/manifest.json +128 -0
- package/data/chat-models/qw/qwen3.8-27b-q6/manifest.json +25 -9
- package/data/chat-models/qw/qwen3.8-27b-q6/versions/1.0.4/manifest.json +138 -0
- package/data/chat-models/qw/qwen3.8-27b-q8/manifest.json +20 -3
- package/data/chat-models/qw/qwen3.8-27b-q8/versions/1.0.3/manifest.json +148 -0
- package/data/chat-models/qw/qwen3.8-flash-next-q2/manifest.json +5 -2
- package/data/chat-models/qw/qwen3.8-flash-next-q2/versions/1.0.4/manifest.json +47 -0
- package/data/chat-models/raw-index.json +1 -1
- package/data/craftbook-templates/index.json +1 -1
- package/data/craftbook-templates/raw-index.json +1 -1
- package/data/craftbook-templates/su/summarize-long/versions/1.0.6/craftbook.json +251 -0
- package/data/craftbook-templates/su/summarize-long/versions/1.0.6/test.json +76 -0
- package/data/project-types/bo/books-and-close/versions/1.1.0/about.md +16 -0
- package/data/project-types/bo/books-and-close/versions/1.1.0/close.json +8 -0
- package/data/project-types/bo/books-and-close/versions/1.1.0/ledger.json +5 -0
- package/data/project-types/bo/books-and-close/versions/1.1.0/manifest.json +496 -0
- package/data/project-types/bo/books-and-close/versions/1.1.0/mission.md +5 -0
- package/data/project-types/bo/books-and-close/versions/1.1.0/pages/books/application.js +417 -0
- package/data/project-types/bo/books-and-close/versions/1.1.0/pages/books/demo-chat.js +515 -0
- package/data/project-types/bo/books-and-close/versions/1.1.0/pages/books/index.html +880 -0
- package/data/project-types/ca/campaign-room/versions/1.1.0/about.md +13 -0
- package/data/project-types/ca/campaign-room/versions/1.1.0/assets.json +11 -0
- package/data/project-types/ca/campaign-room/versions/1.1.0/campaign.json +13 -0
- package/data/project-types/ca/campaign-room/versions/1.1.0/manifest.json +610 -0
- package/data/project-types/ca/campaign-room/versions/1.1.0/mission.md +6 -0
- package/data/project-types/ca/campaign-room/versions/1.1.0/pages/campaign/application.js +439 -0
- package/data/project-types/ca/campaign-room/versions/1.1.0/pages/campaign/demo-chat.js +290 -0
- package/data/project-types/ca/campaign-room/versions/1.1.0/pages/campaign/index.html +624 -0
- package/data/project-types/ca/campaign-room/versions/1.1.0/results.json +4 -0
- package/data/project-types/ca/caregiving-binder/versions/1.2.0/about.md +7 -0
- package/data/project-types/ca/caregiving-binder/versions/1.2.0/care.json +4 -0
- package/data/project-types/ca/caregiving-binder/versions/1.2.0/manifest.json +232 -0
- package/data/project-types/ca/caregiving-binder/versions/1.2.0/meds.json +8 -0
- package/data/project-types/ca/caregiving-binder/versions/1.2.0/mission.md +7 -0
- package/data/project-types/ca/caregiving-binder/versions/1.2.0/pages/dashboard/application.js +186 -0
- package/data/project-types/ca/caregiving-binder/versions/1.2.0/pages/dashboard/demo-chat.js +224 -0
- package/data/project-types/ca/caregiving-binder/versions/1.2.0/pages/dashboard/index.html +365 -0
- package/data/project-types/ca/cash-flow-planner/versions/1.1.0/about.md +15 -0
- package/data/project-types/ca/cash-flow-planner/versions/1.1.0/cashflow.json +11 -0
- package/data/project-types/ca/cash-flow-planner/versions/1.1.0/manifest.json +443 -0
- package/data/project-types/ca/cash-flow-planner/versions/1.1.0/mission.md +6 -0
- package/data/project-types/ca/cash-flow-planner/versions/1.1.0/pages/forecast/application.js +441 -0
- package/data/project-types/ca/cash-flow-planner/versions/1.1.0/pages/forecast/demo-chat.js +517 -0
- package/data/project-types/ca/cash-flow-planner/versions/1.1.0/pages/forecast/index.html +848 -0
- package/data/project-types/cl/client-delivery/versions/1.1.0/about.md +13 -0
- package/data/project-types/cl/client-delivery/versions/1.1.0/manifest.json +376 -0
- package/data/project-types/cl/client-delivery/versions/1.1.0/milestones.json +10 -0
- package/data/project-types/cl/client-delivery/versions/1.1.0/mission.md +5 -0
- package/data/project-types/cl/client-delivery/versions/1.1.0/pages/delivery/application.js +272 -0
- package/data/project-types/cl/client-delivery/versions/1.1.0/pages/delivery/demo-chat.js +185 -0
- package/data/project-types/cl/client-delivery/versions/1.1.0/pages/delivery/index.html +593 -0
- package/data/project-types/cl/client-delivery/versions/1.1.0/projects.json +10 -0
- package/data/project-types/co/compliance-register/versions/1.1.0/about.md +12 -0
- package/data/project-types/co/compliance-register/versions/1.1.0/evidence.json +4 -0
- package/data/project-types/co/compliance-register/versions/1.1.0/manifest.json +361 -0
- package/data/project-types/co/compliance-register/versions/1.1.0/mission.md +5 -0
- package/data/project-types/co/compliance-register/versions/1.1.0/obligations.json +9 -0
- package/data/project-types/co/compliance-register/versions/1.1.0/pages/register/application.js +292 -0
- package/data/project-types/co/compliance-register/versions/1.1.0/pages/register/demo-chat.js +156 -0
- package/data/project-types/co/compliance-register/versions/1.1.0/pages/register/index.html +406 -0
- package/data/project-types/co/content-studio/versions/1.1.0/about.md +12 -0
- package/data/project-types/co/content-studio/versions/1.1.0/calendar.json +10 -0
- package/data/project-types/co/content-studio/versions/1.1.0/manifest.json +541 -0
- package/data/project-types/co/content-studio/versions/1.1.0/mission.md +6 -0
- package/data/project-types/co/content-studio/versions/1.1.0/pages/studio/application.js +413 -0
- package/data/project-types/co/content-studio/versions/1.1.0/pages/studio/demo-chat.js +247 -0
- package/data/project-types/co/content-studio/versions/1.1.0/pages/studio/index.html +486 -0
- package/data/project-types/co/content-studio/versions/1.1.0/pieces.json +12 -0
- package/data/project-types/cu/customer-voice/versions/1.1.0/about.md +15 -0
- package/data/project-types/cu/customer-voice/versions/1.1.0/actions.json +9 -0
- package/data/project-types/cu/customer-voice/versions/1.1.0/feedback.json +4 -0
- package/data/project-types/cu/customer-voice/versions/1.1.0/manifest.json +512 -0
- package/data/project-types/cu/customer-voice/versions/1.1.0/mission.md +6 -0
- package/data/project-types/cu/customer-voice/versions/1.1.0/pages/voice/application.js +303 -0
- package/data/project-types/cu/customer-voice/versions/1.1.0/pages/voice/demo-chat.js +276 -0
- package/data/project-types/cu/customer-voice/versions/1.1.0/pages/voice/index.html +832 -0
- package/data/project-types/cu/customer-voice/versions/1.1.0/themes.json +8 -0
- package/data/project-types/da/data-analysis/versions/1.1.0/about.md +20 -0
- package/data/project-types/da/data-analysis/versions/1.1.0/manifest.json +70 -0
- package/data/project-types/da/data-analysis/versions/1.1.0/mission.md +4 -0
- package/data/project-types/da/data-analysis/versions/1.1.0/pages/analytics.js +63 -0
- package/data/project-types/da/data-analysis/versions/1.1.0/pages/application.js +118 -0
- package/data/project-types/da/data-analysis/versions/1.1.0/pages/dashboard.css +94 -0
- package/data/project-types/da/data-analysis/versions/1.1.0/pages/dashboard.js +177 -0
- package/data/project-types/da/data-analysis/versions/1.1.0/pages/datasets.js +44 -0
- package/data/project-types/da/data-analysis/versions/1.1.0/pages/demo-chat.js +181 -0
- package/data/project-types/da/data-analysis/versions/1.1.0/pages/demo.js +27 -0
- package/data/project-types/da/data-analysis/versions/1.1.0/pages/index.html +142 -0
- package/data/project-types/da/data-analysis/versions/1.1.0/pages/insights.js +136 -0
- package/data/project-types/de/design-scheme/versions/1.1.0/about.md +6 -0
- package/data/project-types/de/design-scheme/versions/1.1.0/manifest.json +95 -0
- package/data/project-types/de/design-scheme/versions/1.1.0/mission.md +3 -0
- package/data/project-types/de/design-scheme/versions/1.1.0/pages/gallery/application.js +124 -0
- package/data/project-types/de/design-scheme/versions/1.1.0/pages/gallery/demo-chat.js +236 -0
- package/data/project-types/de/design-scheme/versions/1.1.0/pages/gallery/index.html +238 -0
- package/data/project-types/de/design-scheme/versions/1.1.0/schemes/index.json +9 -0
- package/data/project-types/de/design-scheme/versions/1.1.0/schemes/warm-dusk.json +4 -0
- package/data/project-types/ev/event-desk/versions/1.1.0/about.md +14 -0
- package/data/project-types/ev/event-desk/versions/1.1.0/budget.json +5 -0
- package/data/project-types/ev/event-desk/versions/1.1.0/event.json +12 -0
- package/data/project-types/ev/event-desk/versions/1.1.0/guests.json +9 -0
- package/data/project-types/ev/event-desk/versions/1.1.0/manifest.json +785 -0
- package/data/project-types/ev/event-desk/versions/1.1.0/mission.md +7 -0
- package/data/project-types/ev/event-desk/versions/1.1.0/pages/desk/application.js +1114 -0
- package/data/project-types/ev/event-desk/versions/1.1.0/pages/desk/demo-chat.js +229 -0
- package/data/project-types/ev/event-desk/versions/1.1.0/pages/desk/index.html +864 -0
- package/data/project-types/ev/event-desk/versions/1.1.0/vendors.json +10 -0
- package/data/project-types/ev/event-desk/versions/1.1.0/venues.json +11 -0
- package/data/project-types/ev/event-planner/versions/1.1.0/about.md +7 -0
- package/data/project-types/ev/event-planner/versions/1.1.0/budget.json +5 -0
- package/data/project-types/ev/event-planner/versions/1.1.0/guests.json +10 -0
- package/data/project-types/ev/event-planner/versions/1.1.0/manifest.json +260 -0
- package/data/project-types/ev/event-planner/versions/1.1.0/mission.md +6 -0
- package/data/project-types/ev/event-planner/versions/1.1.0/pages/dashboard/application.js +234 -0
- package/data/project-types/ev/event-planner/versions/1.1.0/pages/dashboard/demo-chat.js +231 -0
- package/data/project-types/ev/event-planner/versions/1.1.0/pages/dashboard/index.html +322 -0
- package/data/project-types/fi/fitness-coach/versions/1.2.0/about.md +8 -0
- package/data/project-types/fi/fitness-coach/versions/1.2.0/craftbooks/training-recap.json +34 -0
- package/data/project-types/fi/fitness-coach/versions/1.2.0/manifest.json +249 -0
- package/data/project-types/fi/fitness-coach/versions/1.2.0/mission.md +7 -0
- package/data/project-types/fi/fitness-coach/versions/1.2.0/pages/dashboard/application.js +148 -0
- package/data/project-types/fi/fitness-coach/versions/1.2.0/pages/dashboard/demo-chat.js +253 -0
- package/data/project-types/fi/fitness-coach/versions/1.2.0/pages/dashboard/index.html +419 -0
- package/data/project-types/fi/fitness-coach/versions/1.2.0/training.json +6 -0
- package/data/project-types/fl/flashcards/versions/1.3.0/about.md +8 -0
- package/data/project-types/fl/flashcards/versions/1.3.0/deck.json +7 -0
- package/data/project-types/fl/flashcards/versions/1.3.0/manifest.json +243 -0
- package/data/project-types/fl/flashcards/versions/1.3.0/mission.md +6 -0
- package/data/project-types/fl/flashcards/versions/1.3.0/pages/review/application.js +147 -0
- package/data/project-types/fl/flashcards/versions/1.3.0/pages/review/demo-chat.js +331 -0
- package/data/project-types/fl/flashcards/versions/1.3.0/pages/review/index.html +635 -0
- package/data/project-types/fr/freelance-office/versions/1.1.0/about.md +6 -0
- package/data/project-types/fr/freelance-office/versions/1.1.0/invoices.json +9 -0
- package/data/project-types/fr/freelance-office/versions/1.1.0/manifest.json +215 -0
- package/data/project-types/fr/freelance-office/versions/1.1.0/mission.md +6 -0
- package/data/project-types/fr/freelance-office/versions/1.1.0/pages/dashboard/application.js +194 -0
- package/data/project-types/fr/freelance-office/versions/1.1.0/pages/dashboard/demo-chat.js +244 -0
- package/data/project-types/fr/freelance-office/versions/1.1.0/pages/dashboard/index.html +275 -0
- package/data/project-types/fu/fundraiser-hq/versions/1.1.0/about.md +7 -0
- package/data/project-types/fu/fundraiser-hq/versions/1.1.0/donations.json +7 -0
- package/data/project-types/fu/fundraiser-hq/versions/1.1.0/manifest.json +175 -0
- package/data/project-types/fu/fundraiser-hq/versions/1.1.0/mission.md +6 -0
- package/data/project-types/fu/fundraiser-hq/versions/1.1.0/pages/dashboard/application.js +158 -0
- package/data/project-types/fu/fundraiser-hq/versions/1.1.0/pages/dashboard/demo-chat.js +171 -0
- package/data/project-types/fu/fundraiser-hq/versions/1.1.0/pages/dashboard/index.html +247 -0
- package/data/project-types/gr/grants-and-proposals/versions/1.1.0/about.md +14 -0
- package/data/project-types/gr/grants-and-proposals/versions/1.1.0/manifest.json +549 -0
- package/data/project-types/gr/grants-and-proposals/versions/1.1.0/mission.md +6 -0
- package/data/project-types/gr/grants-and-proposals/versions/1.1.0/opportunities.json +12 -0
- package/data/project-types/gr/grants-and-proposals/versions/1.1.0/pages/grants/application.js +370 -0
- package/data/project-types/gr/grants-and-proposals/versions/1.1.0/pages/grants/demo-chat.js +197 -0
- package/data/project-types/gr/grants-and-proposals/versions/1.1.0/pages/grants/index.html +501 -0
- package/data/project-types/gr/grants-and-proposals/versions/1.1.0/requirements.json +8 -0
- package/data/project-types/hi/hiring-desk/versions/1.1.0/about.md +20 -0
- package/data/project-types/hi/hiring-desk/versions/1.1.0/candidates.json +12 -0
- package/data/project-types/hi/hiring-desk/versions/1.1.0/feedback.json +4 -0
- package/data/project-types/hi/hiring-desk/versions/1.1.0/manifest.json +428 -0
- package/data/project-types/hi/hiring-desk/versions/1.1.0/mission.md +5 -0
- package/data/project-types/hi/hiring-desk/versions/1.1.0/pages/desk/application.js +345 -0
- package/data/project-types/hi/hiring-desk/versions/1.1.0/pages/desk/demo-chat.js +231 -0
- package/data/project-types/hi/hiring-desk/versions/1.1.0/pages/desk/index.html +523 -0
- package/data/project-types/hi/hiring-desk/versions/1.1.0/roles.json +10 -0
- package/data/project-types/ho/household-budget/versions/1.1.0/about.md +6 -0
- package/data/project-types/ho/household-budget/versions/1.1.0/ledger.json +5 -0
- package/data/project-types/ho/household-budget/versions/1.1.0/manifest.json +191 -0
- package/data/project-types/ho/household-budget/versions/1.1.0/mission.md +5 -0
- package/data/project-types/ho/household-budget/versions/1.1.0/pages/dashboard/application.js +176 -0
- package/data/project-types/ho/household-budget/versions/1.1.0/pages/dashboard/demo-chat.js +207 -0
- package/data/project-types/ho/household-budget/versions/1.1.0/pages/dashboard/index.html +291 -0
- package/data/project-types/ho/household-manual/versions/1.1.0/about.md +7 -0
- package/data/project-types/ho/household-manual/versions/1.1.0/manifest.json +236 -0
- package/data/project-types/ho/household-manual/versions/1.1.0/mission.md +8 -0
- package/data/project-types/ho/household-manual/versions/1.1.0/pages/dashboard/application.js +196 -0
- package/data/project-types/ho/household-manual/versions/1.1.0/pages/dashboard/demo-chat.js +178 -0
- package/data/project-types/ho/household-manual/versions/1.1.0/pages/dashboard/index.html +327 -0
- package/data/project-types/ho/household-manual/versions/1.1.0/systems.json +8 -0
- package/data/project-types/im/image-feed/versions/1.1.0/about.md +21 -0
- package/data/project-types/im/image-feed/versions/1.1.0/manifest.json +330 -0
- package/data/project-types/im/image-feed/versions/1.1.0/mission.md +10 -0
- package/data/project-types/im/image-feed/versions/1.1.0/pages/gallery/application.js +111 -0
- package/data/project-types/im/image-feed/versions/1.1.0/pages/gallery/demo-chat.js +269 -0
- package/data/project-types/im/image-feed/versions/1.1.0/pages/gallery/index.html +899 -0
- package/data/project-types/im/image-feed/versions/1.1.0/posts/index.json +4 -0
- package/data/project-types/im/image-feed/versions/1.1.0/style-guide.md +24 -0
- package/data/project-types/in/inventory-reorder/versions/1.1.0/about.md +12 -0
- package/data/project-types/in/inventory-reorder/versions/1.1.0/items.json +9 -0
- package/data/project-types/in/inventory-reorder/versions/1.1.0/manifest.json +381 -0
- package/data/project-types/in/inventory-reorder/versions/1.1.0/mission.md +6 -0
- package/data/project-types/in/inventory-reorder/versions/1.1.0/orders.json +10 -0
- package/data/project-types/in/inventory-reorder/versions/1.1.0/pages/stock/application.js +320 -0
- package/data/project-types/in/inventory-reorder/versions/1.1.0/pages/stock/demo-chat.js +200 -0
- package/data/project-types/in/inventory-reorder/versions/1.1.0/pages/stock/index.html +398 -0
- package/data/project-types/in/inventory-reorder/versions/1.1.0/pages/stock/rules.js +665 -0
- package/data/project-types/index.json +1 -1
- package/data/project-types/jo/job-hunt/versions/1.1.0/about.md +10 -0
- package/data/project-types/jo/job-hunt/versions/1.1.0/activity.json +4 -0
- package/data/project-types/jo/job-hunt/versions/1.1.0/manifest.json +296 -0
- package/data/project-types/jo/job-hunt/versions/1.1.0/mission.md +9 -0
- package/data/project-types/jo/job-hunt/versions/1.1.0/pages/dashboard/application.js +240 -0
- package/data/project-types/jo/job-hunt/versions/1.1.0/pages/dashboard/demo-chat.js +176 -0
- package/data/project-types/jo/job-hunt/versions/1.1.0/pages/dashboard/index.html +424 -0
- package/data/project-types/jo/job-hunt/versions/1.1.0/pipeline.json +6 -0
- package/data/project-types/la/language-trainer/versions/1.2.0/about.md +8 -0
- package/data/project-types/la/language-trainer/versions/1.2.0/manifest.json +245 -0
- package/data/project-types/la/language-trainer/versions/1.2.0/mission.md +4 -0
- package/data/project-types/la/language-trainer/versions/1.2.0/pages/dashboard/application.js +118 -0
- package/data/project-types/la/language-trainer/versions/1.2.0/pages/dashboard/demo-chat.js +439 -0
- package/data/project-types/la/language-trainer/versions/1.2.0/pages/dashboard/index.html +503 -0
- package/data/project-types/la/language-trainer/versions/1.2.0/progress.json +10 -0
- package/data/project-types/la/language-trainer/versions/1.2.0/reviews.json +3 -0
- package/data/project-types/la/language-trainer/versions/1.2.0/scenarios.json +84 -0
- package/data/project-types/li/life-binder/versions/1.1.0/about.md +7 -0
- package/data/project-types/li/life-binder/versions/1.1.0/documents.json +145 -0
- package/data/project-types/li/life-binder/versions/1.1.0/manifest.json +206 -0
- package/data/project-types/li/life-binder/versions/1.1.0/mission.md +6 -0
- package/data/project-types/li/life-binder/versions/1.1.0/pages/dashboard/application.js +172 -0
- package/data/project-types/li/life-binder/versions/1.1.0/pages/dashboard/demo-chat.js +184 -0
- package/data/project-types/li/life-binder/versions/1.1.0/pages/dashboard/index.html +287 -0
- package/data/project-types/me/meal-planner/versions/1.1.0/about.md +10 -0
- package/data/project-types/me/meal-planner/versions/1.1.0/manifest.json +245 -0
- package/data/project-types/me/meal-planner/versions/1.1.0/menu.json +5 -0
- package/data/project-types/me/meal-planner/versions/1.1.0/mission.md +5 -0
- package/data/project-types/me/meal-planner/versions/1.1.0/pages/dashboard/application.js +243 -0
- package/data/project-types/me/meal-planner/versions/1.1.0/pages/dashboard/demo-chat.js +139 -0
- package/data/project-types/me/meal-planner/versions/1.1.0/pages/dashboard/index.html +253 -0
- package/data/project-types/me/meal-planner/versions/1.1.0/pantry.json +9 -0
- package/data/project-types/ne/new-hire-onboarding/versions/1.1.0/about.md +14 -0
- package/data/project-types/ne/new-hire-onboarding/versions/1.1.0/hires.json +8 -0
- package/data/project-types/ne/new-hire-onboarding/versions/1.1.0/manifest.json +325 -0
- package/data/project-types/ne/new-hire-onboarding/versions/1.1.0/mission.md +5 -0
- package/data/project-types/ne/new-hire-onboarding/versions/1.1.0/pages/plans/application.js +248 -0
- package/data/project-types/ne/new-hire-onboarding/versions/1.1.0/pages/plans/demo-chat.js +188 -0
- package/data/project-types/ne/new-hire-onboarding/versions/1.1.0/pages/plans/index.html +439 -0
- package/data/project-types/ne/new-hire-onboarding/versions/1.1.0/tasks.json +8 -0
- package/data/project-types/no/novel-writing-room/versions/1.1.0/about.md +7 -0
- package/data/project-types/no/novel-writing-room/versions/1.1.0/chapters.json +10 -0
- package/data/project-types/no/novel-writing-room/versions/1.1.0/manifest.json +233 -0
- package/data/project-types/no/novel-writing-room/versions/1.1.0/mission.md +7 -0
- package/data/project-types/no/novel-writing-room/versions/1.1.0/pages/dashboard/application.js +225 -0
- package/data/project-types/no/novel-writing-room/versions/1.1.0/pages/dashboard/demo-chat.js +283 -0
- package/data/project-types/no/novel-writing-room/versions/1.1.0/pages/dashboard/index.html +342 -0
- package/data/project-types/no/novel-writing-room/versions/1.1.0/sessions.json +6 -0
- package/data/project-types/qu/quotes-and-bids/versions/1.1.0/about.md +15 -0
- package/data/project-types/qu/quotes-and-bids/versions/1.1.0/manifest.json +614 -0
- package/data/project-types/qu/quotes-and-bids/versions/1.1.0/mission.md +3 -0
- package/data/project-types/qu/quotes-and-bids/versions/1.1.0/pages/quotes/application.js +386 -0
- package/data/project-types/qu/quotes-and-bids/versions/1.1.0/pages/quotes/demo-chat.js +263 -0
- package/data/project-types/qu/quotes-and-bids/versions/1.1.0/pages/quotes/index.html +941 -0
- package/data/project-types/qu/quotes-and-bids/versions/1.1.0/quotes.json +10 -0
- package/data/project-types/qu/quotes-and-bids/versions/1.1.0/rates.json +8 -0
- package/data/project-types/raw-index.json +1 -1
- package/data/project-types/sa/sales-pipeline/versions/1.1.0/about.md +10 -0
- package/data/project-types/sa/sales-pipeline/versions/1.1.0/activity.json +4 -0
- package/data/project-types/sa/sales-pipeline/versions/1.1.0/deals.json +12 -0
- package/data/project-types/sa/sales-pipeline/versions/1.1.0/manifest.json +450 -0
- package/data/project-types/sa/sales-pipeline/versions/1.1.0/mission.md +3 -0
- package/data/project-types/sa/sales-pipeline/versions/1.1.0/pages/pipeline/application.js +270 -0
- package/data/project-types/sa/sales-pipeline/versions/1.1.0/pages/pipeline/demo-chat.js +219 -0
- package/data/project-types/sa/sales-pipeline/versions/1.1.0/pages/pipeline/index.html +710 -0
- package/data/project-types/sh/shift-roster/versions/1.1.0/about.md +13 -0
- package/data/project-types/sh/shift-roster/versions/1.1.0/availability.json +8 -0
- package/data/project-types/sh/shift-roster/versions/1.1.0/manifest.json +544 -0
- package/data/project-types/sh/shift-roster/versions/1.1.0/mission.md +5 -0
- package/data/project-types/sh/shift-roster/versions/1.1.0/pages/roster/application.js +418 -0
- package/data/project-types/sh/shift-roster/versions/1.1.0/pages/roster/demo-chat.js +218 -0
- package/data/project-types/sh/shift-roster/versions/1.1.0/pages/roster/index.html +466 -0
- package/data/project-types/sh/shift-roster/versions/1.1.0/pages/roster/rules.js +878 -0
- package/data/project-types/sh/shift-roster/versions/1.1.0/rules.json +4 -0
- package/data/project-types/sh/shift-roster/versions/1.1.0/shifts.json +8 -0
- package/data/project-types/sh/shift-roster/versions/1.1.0/staff.json +8 -0
- package/data/project-types/so/social-feed/versions/1.1.0/about.md +19 -0
- package/data/project-types/so/social-feed/versions/1.1.0/manifest.json +348 -0
- package/data/project-types/so/social-feed/versions/1.1.0/mission.md +10 -0
- package/data/project-types/so/social-feed/versions/1.1.0/pages/dashboard/application.js +119 -0
- package/data/project-types/so/social-feed/versions/1.1.0/pages/dashboard/demo-chat.js +321 -0
- package/data/project-types/so/social-feed/versions/1.1.0/pages/dashboard/index.html +837 -0
- package/data/project-types/so/social-feed/versions/1.1.0/posts/index.json +4 -0
- package/data/project-types/so/social-feed/versions/1.1.0/voice-guide.md +22 -0
- package/data/project-types/so/sop-library/versions/1.1.0/about.md +15 -0
- package/data/project-types/so/sop-library/versions/1.1.0/manifest.json +347 -0
- package/data/project-types/so/sop-library/versions/1.1.0/mission.md +4 -0
- package/data/project-types/so/sop-library/versions/1.1.0/pages/library/application.js +235 -0
- package/data/project-types/so/sop-library/versions/1.1.0/pages/library/demo-chat.js +184 -0
- package/data/project-types/so/sop-library/versions/1.1.0/pages/library/index.html +529 -0
- package/data/project-types/so/sop-library/versions/1.1.0/sops/index.json +10 -0
- package/data/project-types/su/support-desk/versions/1.1.0/about.md +15 -0
- package/data/project-types/su/support-desk/versions/1.1.0/manifest.json +395 -0
- package/data/project-types/su/support-desk/versions/1.1.0/mission.md +5 -0
- package/data/project-types/su/support-desk/versions/1.1.0/pages/desk/application.js +274 -0
- package/data/project-types/su/support-desk/versions/1.1.0/pages/desk/demo-chat.js +206 -0
- package/data/project-types/su/support-desk/versions/1.1.0/pages/desk/index.html +588 -0
- package/data/project-types/su/support-desk/versions/1.1.0/tickets.json +10 -0
- package/data/project-types/te/team-goals/versions/1.1.0/about.md +12 -0
- package/data/project-types/te/team-goals/versions/1.1.0/actions.json +8 -0
- package/data/project-types/te/team-goals/versions/1.1.0/checkins.json +4 -0
- package/data/project-types/te/team-goals/versions/1.1.0/goals.json +9 -0
- package/data/project-types/te/team-goals/versions/1.1.0/keyresults.json +8 -0
- package/data/project-types/te/team-goals/versions/1.1.0/manifest.json +528 -0
- package/data/project-types/te/team-goals/versions/1.1.0/mission.md +5 -0
- package/data/project-types/te/team-goals/versions/1.1.0/pages/goals/application.js +347 -0
- package/data/project-types/te/team-goals/versions/1.1.0/pages/goals/demo-chat.js +206 -0
- package/data/project-types/te/team-goals/versions/1.1.0/pages/goals/index.html +547 -0
- package/data/project-types/tr/training-tracker/versions/1.1.0/about.md +15 -0
- package/data/project-types/tr/training-tracker/versions/1.1.0/completions.json +4 -0
- package/data/project-types/tr/training-tracker/versions/1.1.0/courses.json +8 -0
- package/data/project-types/tr/training-tracker/versions/1.1.0/manifest.json +428 -0
- package/data/project-types/tr/training-tracker/versions/1.1.0/mission.md +5 -0
- package/data/project-types/tr/training-tracker/versions/1.1.0/pages/tracker/application.js +299 -0
- package/data/project-types/tr/training-tracker/versions/1.1.0/pages/tracker/demo-chat.js +225 -0
- package/data/project-types/tr/training-tracker/versions/1.1.0/pages/tracker/index.html +555 -0
- package/data/project-types/tr/training-tracker/versions/1.1.0/people.json +8 -0
- package/data/project-types/tr/training-tracker/versions/1.1.0/quizzes.json +8 -0
- package/data/project-types/tr/trip-planner/versions/1.1.0/about.md +7 -0
- package/data/project-types/tr/trip-planner/versions/1.1.0/journal.json +4 -0
- package/data/project-types/tr/trip-planner/versions/1.1.0/manifest.json +296 -0
- package/data/project-types/tr/trip-planner/versions/1.1.0/mission.md +4 -0
- package/data/project-types/tr/trip-planner/versions/1.1.0/packing.json +8 -0
- package/data/project-types/tr/trip-planner/versions/1.1.0/pages/dashboard/application.js +176 -0
- package/data/project-types/tr/trip-planner/versions/1.1.0/pages/dashboard/demo-chat.js +264 -0
- package/data/project-types/tr/trip-planner/versions/1.1.0/pages/dashboard/index.html +373 -0
- package/data/project-types/tr/trip-planner/versions/1.1.0/trip.json +8 -0
- package/data/project-types/ve/vendor-contracts/versions/1.1.0/about.md +15 -0
- package/data/project-types/ve/vendor-contracts/versions/1.1.0/contracts.json +10 -0
- package/data/project-types/ve/vendor-contracts/versions/1.1.0/manifest.json +545 -0
- package/data/project-types/ve/vendor-contracts/versions/1.1.0/mission.md +5 -0
- package/data/project-types/ve/vendor-contracts/versions/1.1.0/pages/desk/application.js +323 -0
- package/data/project-types/ve/vendor-contracts/versions/1.1.0/pages/desk/demo-chat.js +236 -0
- package/data/project-types/ve/vendor-contracts/versions/1.1.0/pages/desk/index.html +540 -0
- package/data/project-types/ve/vendor-contracts/versions/1.1.0/vendors.json +8 -0
- package/package.json +1 -1
- package/schemas/chat-model-identity.schema.json +184 -0
- package/schemas/chat-model-version.schema.json +19 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Style guide
|
|
2
|
+
|
|
3
|
+
{{visualStyle}}
|
|
4
|
+
|
|
5
|
+
Voice, in one line: {{voice}}
|
|
6
|
+
|
|
7
|
+
## How {{brand}} looks
|
|
8
|
+
|
|
9
|
+
- One subject per image; let it breathe.
|
|
10
|
+
- Natural light over studio gloss; honest color over filters.
|
|
11
|
+
- Shoot the work where the work happens.
|
|
12
|
+
|
|
13
|
+
## Composition habits
|
|
14
|
+
|
|
15
|
+
- Square-first: crops must survive 1:1.
|
|
16
|
+
- Backgrounds calm, edges clean; the subject earns the frame.
|
|
17
|
+
- A series shares a palette — check the last six posts before adding one.
|
|
18
|
+
|
|
19
|
+
## Never
|
|
20
|
+
|
|
21
|
+
- Watermarks across the subject, stock-photo posing, heavy HDR.
|
|
22
|
+
- Text baked into the image that the caption should carry.
|
|
23
|
+
|
|
24
|
+
Edit this file freely — the crew treats it as law.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
The stockroom for {{business}}: every item kept on the shelf, how many are
|
|
2
|
+
left, the point at which to reorder it, and who supplies it.
|
|
3
|
+
|
|
4
|
+
The **Output** tab shows what is out or running low, the purchase orders on the
|
|
5
|
+
way and waiting for you, the whole stock list, and each supplier with their
|
|
6
|
+
lead time.
|
|
7
|
+
|
|
8
|
+
Tell the stock keeper what came in, what got used or what you counted, and it
|
|
9
|
+
is saved straight away; the stock list does the arithmetic. Ask for this week's
|
|
10
|
+
orders and you get one draft per supplier, filled back up to your par levels.
|
|
11
|
+
Drafts are yours to check and place: nothing is ordered until you say it was
|
|
12
|
+
sent, and prices are the ones you gave.
|
|
@@ -0,0 +1,381 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"releasedAt": "2026-11-07T18:00:00.000Z",
|
|
5
|
+
"meesterManaged": false,
|
|
6
|
+
"params": {
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"business": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"title": "What kind of business is this?",
|
|
12
|
+
"description": "e.g. 'a café in Portland', 'a small pottery studio'.",
|
|
13
|
+
"default": "the business"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"required": [
|
|
17
|
+
"business"
|
|
18
|
+
]
|
|
19
|
+
},
|
|
20
|
+
"nameTemplate": "Inventory & Reorder",
|
|
21
|
+
"aboutTemplate": "about.md",
|
|
22
|
+
"missionTemplate": "mission.md",
|
|
23
|
+
"gezels": [
|
|
24
|
+
{
|
|
25
|
+
"templateId": "stock-keeper",
|
|
26
|
+
"voorman": true
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"templateId": "kantoormeester"
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"scripts": {
|
|
33
|
+
"inventory-store": "import { type InferredInput, defineScript, gezel } from '@bendyline/gezel-sdk';\nimport { rosterStore } from '@bendyline/gezel-sdk/stores';\n\nexport const meta = defineScript({\n name: 'inventory-store',\n description:\n \"Read and update the stock list (items.json) and purchase orders (orders.json). action:'status' for what is out, low and on order; 'add' to save an item (an existing name is updated, never duplicated); 'stock' to record what was received and used, or a shelf count; 'draft_orders' to draft one purchase order per supplier for everything at or below its reorder point; 'update_order' to mark an order sent, received (its quantities go into stock) or cancelled, or to set a line on a draft; 'list' for everything.\",\n inputs: {\n action: {\n type: 'string',\n description: \"One of 'status', 'add', 'stock', 'draft_orders', 'update_order', or 'list'.\",\n required: true,\n },\n name: { type: 'string', description: \"The item's name, e.g. 'Oat milk'.\" },\n item: { type: 'string', description: \"An item's name or id ('it-3'), for stock changes and draft lines.\" },\n unit: { type: 'string', description: \"How it is counted, e.g. 'carton', 'bag (5 lb)', 'sleeve of 50'.\" },\n onHand: { type: 'number', description: 'How many are on the shelf now.' },\n reorderPoint: { type: 'number', description: 'Reorder when stock falls to this many or fewer.' },\n par: { type: 'number', description: 'Order back up to this many.' },\n supplier: { type: 'string', description: 'Who supplies it.' },\n leadDays: { type: 'number', description: \"The supplier's lead time in days; it applies to every item from them.\" },\n unitCost: { type: 'number', description: 'Price per unit in dollars, e.g. 3.8.' },\n received: { type: 'number', description: 'How many came in. Added to the count.' },\n used: { type: 'number', description: 'How many were sold, used or thrown out. Taken off the count.' },\n count: { type: 'number', description: 'A shelf count. Replaces the number on hand.' },\n order: { type: 'string', description: \"Order id ('po-2') or the supplier's name.\" },\n status: { type: 'string', description: 'For update_order: sent, received, or cancelled.' },\n qty: { type: 'number', description: 'For update_order: the quantity of item on a draft (0 takes it off).' },\n note: { type: 'string', description: 'Anything worth keeping with the change.' },\n },\n outputs: {\n out: { type: 'number', description: 'Items with none on hand.' },\n low: { type: 'number', description: 'Items at or below their reorder point.' },\n onOrder: { type: 'number', description: 'Orders sent and not yet received.' },\n drafts: { type: 'number', description: 'Draft orders waiting for the person.' },\n tracked: { type: 'number', description: 'Items on the stock list.' },\n summary: { type: 'string', description: 'What changed, then the stock picture; or the listing.' },\n },\n requires: ['workspace.read', 'workspace.write'],\n} as const);\n\nconst input = gezel.input as InferredInput<typeof meta>;\n\n// ── inventory-rules-start ──\n// Pure stock rules: an item's status from its count, the quantity that fills it\n// back to par, and the purchase-order drafts each supplier needs. run() applies\n// one action to a snapshot of the stores and lists the store operations, so the\n// live store and the page's demo share every rule. Kept self-contained between\n// these sentinels; the page loads the same bytes as rules.js.\nvar DAY_MS = 86400000;\nvar OPEN = ['draft', 'sent'];\n\nfunction pad(n) {\n return n < 10 ? '0' + n : String(n);\n}\nfunction localDay(ms) {\n var d = new Date(ms);\n return d.getFullYear() + '-' + pad(d.getMonth() + 1) + '-' + pad(d.getDate());\n}\nfunction addDays(day, n) {\n var d = new Date(String(day).slice(0, 10) + 'T12:00:00');\n d.setDate(d.getDate() + n);\n return localDay(d.getTime());\n}\nfunction daysUntil(day, nowMs) {\n return Math.round((Date.parse(String(day).slice(0, 10) + 'T00:00:00') - Date.parse(localDay(nowMs) + 'T00:00:00')) / DAY_MS);\n}\nfunction when(days) {\n if (days < 0) return -days + (days === -1 ? ' day late' : ' days late');\n if (days === 0) return 'today';\n return 'in ' + days + (days === 1 ? ' day' : ' days');\n}\nfunction num(value) {\n if (value === undefined || value === null || value === '') return null;\n var n = typeof value === 'number' ? value : Number(String(value).replace(/[$,\\s]/g, ''));\n return isFinite(n) ? n : null;\n}\nfunction round2(n) {\n return Math.round(n * 100) / 100;\n}\nfunction key(text) {\n return String(text === undefined || text === null ? '' : text).trim().toLowerCase();\n}\nfunction unitText(unit, n) {\n var u = String(unit || '').trim();\n if (!u) return n === 1 ? 'unit' : 'units';\n if (n === 1) return u;\n var parts = u.split(' ');\n var first = parts[0];\n if (first.length <= 2 || /^(lbs|each|dozen)$/i.test(first) || /s$/i.test(first)) return u;\n parts[0] = /(x|ch|sh)$/i.test(first) ? first + 'es' : /[^aeiou]y$/i.test(first) ? first.slice(0, -1) + 'ies' : first + 's';\n return parts.join(' ');\n}\nfunction amount(n, unit) {\n return round2(n) + ' ' + unitText(unit, n);\n}\nfunction money(cents) {\n var parts = (Math.round(cents) / 100).toFixed(2).split('.');\n return '$' + parts[0].replace(/\\B(?=(\\d{3})+(?!\\d))/g, ',') + '.' + parts[1];\n}\nfunction stockStatus(f) {\n var onHand = num(f.onHand) || 0;\n var point = num(f.reorderPoint) || 0;\n return onHand <= 0 ? 'out' : onHand <= point ? 'low' : 'ok';\n}\n// Reordering fills an item back up to its par level; without a par, to twice its reorder point.\nfunction orderQty(f) {\n var onHand = Math.max(0, num(f.onHand) || 0);\n var point = num(f.reorderPoint) || 0;\n var par = num(f.par) || 0;\n var target = par > point ? par : Math.max(point * 2, point + 1);\n return Math.max(1, Math.ceil(target - onHand));\n}\nfunction lineTotal(line) {\n return Math.round((num(line.qty) || 0) * (num(line.unitCostCents) || 0));\n}\nfunction orderTotal(lines) {\n return lines.reduce(function (sum, line) {\n return sum + lineTotal(line);\n }, 0);\n}\nfunction linesText(lines) {\n return lines\n .map(function (l) {\n return l.name + ' (' + amount(l.qty, l.unit) + ')';\n })\n .join(', ');\n}\nfunction supplierLead(items, supplier) {\n var hit = items.filter(function (r) {\n return key(r.fields.supplier) === key(supplier) && num(r.fields.leadDays) !== null;\n })[0];\n return hit ? num(hit.fields.leadDays) : null;\n}\nfunction suppliers(items) {\n var seen = {};\n var list = [];\n items.forEach(function (r) {\n var k = key(r.fields.supplier);\n if (!k) return;\n if (!seen[k]) {\n seen[k] = { name: r.fields.supplier, leadDays: null, items: 0, low: 0 };\n list.push(seen[k]);\n }\n seen[k].items += 1;\n if (stockStatus(r.fields) !== 'ok') seen[k].low += 1;\n if (seen[k].leadDays === null && num(r.fields.leadDays) !== null) seen[k].leadDays = num(r.fields.leadDays);\n });\n return list.sort(function (a, b) {\n return a.name.localeCompare(b.name);\n });\n}\nfunction words(text) {\n return key(text)\n .split(/[^a-z0-9]+/)\n .filter(function (w) {\n return w.length > 2;\n });\n}\nfunction findItem(items, wanted) {\n var text = String(wanted === undefined || wanted === null ? '' : wanted).trim();\n if (!text) throw new Error(\"Name the item ('Oat milk') or pass its id ('it-3'). Call stock_status to see them.\");\n var byId = items.filter(function (r) {\n return r.id === text;\n });\n if (byId.length) return byId[0];\n var k = key(text);\n var exact = items.filter(function (r) {\n return key(r.fields.name) === k;\n });\n if (exact.length === 1) return exact[0];\n var stem = k.replace(/s$/, '');\n var asked = words(k);\n var tiers = [\n items.filter(function (r) {\n return key(r.fields.name).indexOf(stem) >= 0;\n }),\n items.filter(function (r) {\n var name = key(r.fields.name);\n return (\n asked.length > 0 &&\n asked.every(function (w) {\n return name.indexOf(w.replace(/s$/, '')) >= 0;\n })\n );\n }),\n ];\n for (var i = 0; i < tiers.length; i++) {\n if (tiers[i].length === 1) return tiers[i][0];\n if (tiers[i].length > 1) {\n throw new Error(\"More than one item matches '\" + text + \"': \" + tiers[i].map(itemName).join(', ') + '. Pass the id.');\n }\n }\n throw new Error(\"No item matches '\" + text + \"'. Items: \" + (items.map(itemName).join(', ') || 'none yet') + '.');\n}\nfunction itemName(r) {\n return r.id + ' ' + r.fields.name;\n}\nfunction orderName(o) {\n return o.id + ' ' + o.fields.supplier + ' (' + o.status + ')';\n}\nfunction findOrder(orders, wanted, status) {\n var text = String(wanted === undefined || wanted === null ? '' : wanted).trim();\n var open = orders.filter(function (o) {\n return OPEN.indexOf(o.status) >= 0;\n });\n if (!text) {\n if (open.length === 1) return open[0];\n throw new Error(\"Pass the order id ('po-2') or the supplier's name. Open orders: \" + (open.map(orderName).join(', ') || 'none') + '.');\n }\n var byId = orders.filter(function (o) {\n return o.id === text || o.id === 'po-' + text.replace(/^#/, '');\n });\n if (byId.length) return byId[0];\n var k = key(text);\n var hits = open.filter(function (o) {\n var s = key(o.fields.supplier);\n return s && (s.indexOf(k) >= 0 || k.indexOf(s) >= 0);\n });\n if (!hits.length) {\n hits = open.filter(function (o) {\n return (o.fields.lines || []).some(function (l) {\n var n = key(l.name);\n return n.indexOf(k.replace(/s$/, '')) >= 0 || k.indexOf(n) >= 0;\n });\n });\n }\n var preferred = hits.filter(function (o) {\n return status === 'sent' ? o.status === 'draft' : status === 'received' ? o.status === 'sent' : true;\n });\n if (preferred.length === 1) return preferred[0];\n if (!preferred.length && hits.length === 1) return hits[0];\n if (hits.length) throw new Error(\"More than one open order matches '\" + text + \"': \" + hits.map(orderName).join(', ') + '. Pass the id.');\n throw new Error(\"No open order matches '\" + text + \"'. Open orders: \" + (open.map(orderName).join(', ') || 'none') + '.');\n}\n\n// A working copy of the stores. Each change is applied here and recorded as an operation\n// the live store replays through rosterStore; the demo keeps the copy itself.\nfunction transaction(state, nowMs) {\n var data = JSON.parse(JSON.stringify(state));\n var ops = [];\n var at = new Date(nowMs).toISOString();\n function copy(value) {\n return JSON.parse(JSON.stringify(value));\n }\n function get(store, id) {\n return (\n data[store].filter(function (r) {\n return r.id === id;\n })[0] || null\n );\n }\n return {\n data: data,\n ops: ops,\n get: get,\n add: function (store, prefix, status, fields, note) {\n var max = 0;\n data[store].forEach(function (r) {\n var m = /-(\\d+)$/.exec(r.id);\n if (m && r.id.indexOf(prefix + '-') === 0) max = Math.max(max, Number(m[1]));\n });\n var id = prefix + '-' + (max + 1);\n data[store].push({ id: id, status: status, fields: copy(fields), createdAt: at, updatedAt: at, history: [{ at: at, from: null, to: status, note: note }] });\n ops.push({ store: store, op: 'add', id: id, status: status, fields: copy(fields), note: note });\n return id;\n },\n update: function (store, id, fields, note) {\n var r = get(store, id);\n r.fields = Object.assign({}, r.fields, copy(fields));\n r.updatedAt = at;\n if (note) (r.history = r.history || []).push({ at: at, from: r.status, to: r.status, note: note });\n ops.push({ store: store, op: 'update', id: id, fields: copy(fields), note: note });\n },\n transition: function (store, id, to, note) {\n var r = get(store, id);\n (r.history = r.history || []).push({ at: at, from: r.status, to: to, note: note });\n r.status = to;\n r.updatedAt = at;\n ops.push({ store: store, op: 'transition', id: id, to: to, note: note });\n },\n };\n}\nfunction syncStatus(t, id) {\n var r = t.get('items', id);\n var next = stockStatus(r.fields);\n if (next !== r.status) {\n t.transition('items', id, next, next === 'ok' ? 'Back above the reorder point' : next === 'low' ? 'At or below the reorder point' : 'Out of stock');\n }\n}\n\n// What each supplier needs: items at or below their reorder point that are not already on a sent order.\nfunction needsBySupplier(items, orders) {\n var onSent = {};\n orders.forEach(function (o) {\n if (o.status === 'sent') {\n (o.fields.lines || []).forEach(function (l) {\n onSent[l.itemId] = o.id;\n });\n }\n });\n var groups = [];\n var byKey = {};\n items.forEach(function (r) {\n if (stockStatus(r.fields) === 'ok' || onSent[r.id] || !key(r.fields.supplier)) return;\n var k = key(r.fields.supplier);\n if (!byKey[k]) {\n byKey[k] = { key: k, supplier: r.fields.supplier, items: [] };\n groups.push(byKey[k]);\n }\n byKey[k].items.push(r);\n });\n return groups;\n}\n// Lines the person set by hand stay; every other line follows the stock.\nfunction draftLines(items, existing) {\n var fixed = (existing || []).filter(function (l) {\n return l.fixed;\n });\n return fixed.concat(\n items\n .filter(function (r) {\n return !fixed.some(function (l) {\n return l.itemId === r.id;\n });\n })\n .map(function (r) {\n return { itemId: r.id, name: r.fields.name, unit: r.fields.unit || '', qty: orderQty(r.fields), unitCostCents: num(r.fields.unitCostCents) || 0 };\n }),\n );\n}\nfunction refreshDrafts(t, create, only) {\n var notes = [];\n var groups = needsBySupplier(t.data.items, t.data.orders);\n var done = {};\n function wanted(supplier) {\n return !only || key(supplier).indexOf(key(only)) >= 0 || key(only).indexOf(key(supplier)) >= 0;\n }\n t.data.orders\n .filter(function (o) {\n return o.status === 'draft';\n })\n .forEach(function (o) {\n if (!wanted(o.fields.supplier)) return;\n var k = key(o.fields.supplier);\n var group = done[k]\n ? null\n : groups.filter(function (g) {\n return g.key === k;\n })[0];\n done[k] = true;\n var lines = draftLines(group ? group.items : [], o.fields.lines);\n if (!lines.length) {\n t.transition('orders', o.id, 'cancelled', 'Nothing left to order');\n notes.push('Dropped draft ' + o.id + ' for ' + o.fields.supplier + ': nothing on it needs ordering now.');\n return;\n }\n if (JSON.stringify(lines) === JSON.stringify(o.fields.lines)) return;\n t.update('orders', o.id, { lines: lines, totalCents: orderTotal(lines) }, 'Refreshed from stock');\n notes.push('Updated draft ' + o.id + ' for ' + o.fields.supplier + ': ' + linesText(lines) + ', ' + money(orderTotal(lines)) + '.');\n });\n if (create) {\n groups.forEach(function (g) {\n if (done[g.key] || !wanted(g.supplier)) return;\n var lines = draftLines(g.items, []);\n var id = t.add('orders', 'po', 'draft', { supplier: g.supplier, lines: lines, totalCents: orderTotal(lines) }, 'Drafted from stock');\n notes.push('Drafted ' + id + ' for ' + g.supplier + ': ' + linesText(lines) + ', ' + money(orderTotal(lines)) + '.');\n });\n }\n return notes;\n}\n\nfunction addItem(t, input) {\n var name = String(input.name || '').trim();\n if (!name) throw new Error(\"add needs the item's 'name'.\");\n var fields = {};\n ['onHand', 'reorderPoint', 'par', 'leadDays', 'unitCost'].forEach(function (k) {\n if (input[k] === undefined || input[k] === null || input[k] === '') return;\n var n = num(input[k]);\n if (n === null || n < 0) throw new Error(k + ' must be a number, zero or more (got ' + input[k] + ').');\n if (k === 'unitCost') fields.unitCostCents = Math.round(n * 100);\n else fields[k] = k === 'leadDays' ? Math.round(n) : round2(n);\n });\n if (input.unit) fields.unit = String(input.unit).trim();\n if (input.supplier) fields.supplier = String(input.supplier).trim();\n if (input.note) fields.notes = String(input.note).trim();\n var items = t.data.items;\n var existing = items.filter(function (r) {\n return key(r.fields.name) === key(name);\n })[0];\n var supplier = fields.supplier || (existing && existing.fields.supplier) || '';\n var others = supplier\n ? items.filter(function (r) {\n return key(r.fields.supplier) === key(supplier) && (!existing || r.id !== existing.id);\n })\n : [];\n // One supplier, one spelling and one lead time.\n if (fields.supplier && others.length) fields.supplier = others[0].fields.supplier;\n if (fields.supplier && fields.leadDays === undefined) {\n var lead = supplierLead(others, supplier);\n if (lead !== null) fields.leadDays = lead;\n }\n var id;\n var msg;\n if (existing) {\n t.update('items', existing.id, fields, 'Updated');\n id = existing.id;\n msg = 'Updated ' + existing.fields.name + ' (' + id + ').';\n } else {\n if (fields.onHand === undefined) throw new Error(\"A new item needs 'onHand': how many are on the shelf now.\");\n fields = Object.assign({ name: name }, fields);\n id = t.add('items', 'it', stockStatus(fields), fields, 'Added');\n msg = 'Added ' + name + ' (' + id + ').';\n if (fields.reorderPoint === undefined) msg += ' It has no reorder point yet, so it only flags when it runs out.';\n }\n var lead2 = num(input.leadDays);\n var changed =\n lead2 !== null && supplier\n ? others.filter(function (r) {\n return num(r.fields.leadDays) !== Math.round(lead2);\n })\n : [];\n changed.forEach(function (r) {\n t.update('items', r.id, { leadDays: Math.round(lead2) }, 'Supplier lead time ' + Math.round(lead2) + ' days');\n });\n if (changed.length) msg += ' ' + supplier + \"'s lead time is now \" + Math.round(lead2) + ' days on every item from them.';\n syncStatus(t, id);\n var r = t.get('items', id);\n var status = r.status;\n msg +=\n ' ' + r.fields.name + ' has ' + amount(num(r.fields.onHand) || 0, r.fields.unit) +\n (status === 'ok' ? ' on hand, above its reorder point.' : status === 'low' ? ' on hand, at or below its reorder point of ' + (num(r.fields.reorderPoint) || 0) + '.' : ' on hand, so it is out.');\n return [msg].concat(refreshDrafts(t, false, null)).join(' ');\n}\n\nfunction recordStock(t, input, nowMs) {\n var r = t.get('items', findItem(t.data.items, input.item !== undefined && input.item !== '' ? input.item : input.name !== undefined && input.name !== '' ? input.name : input.id).id);\n var values = {};\n ['received', 'used', 'count'].forEach(function (k) {\n if (input[k] === undefined || input[k] === null || input[k] === '') return;\n var n = num(input[k]);\n if (n === null || n < 0) throw new Error(k + ' must be a number, zero or more (got ' + input[k] + ').');\n values[k] = round2(n);\n });\n if (values.count !== undefined && (values.received !== undefined || values.used !== undefined)) {\n throw new Error(\"Pass 'count' on its own for a shelf count, or 'received' and 'used' for what came in and went out; not both.\");\n }\n if (values.count === undefined && values.received === undefined && values.used === undefined) {\n throw new Error(\"record_stock needs 'received' (came in), 'used' (sold, used or thrown out), or 'count' (counted on the shelf).\");\n }\n var unit = r.fields.unit;\n var point = num(r.fields.reorderPoint) || 0;\n var before = num(r.fields.onHand) || 0;\n var wasStatus = stockStatus(r.fields);\n var done = [];\n var after;\n if (values.count !== undefined) {\n after = values.count;\n done.push('counted ' + amount(values.count, unit));\n } else {\n after = before + (values.received || 0) - (values.used || 0);\n if (values.received) done.push('received ' + amount(values.received, unit));\n if (values.used) done.push('used ' + amount(values.used, unit));\n if (!done.length) done.push('no change');\n }\n var short = after < 0;\n if (short) after = 0;\n after = round2(after);\n var change = done.join(' and ');\n t.update('items', r.id, values.count !== undefined ? { onHand: after, countedAt: localDay(nowMs) } : { onHand: after }, change.charAt(0).toUpperCase() + change.slice(1) + ': ' + round2(before) + ' to ' + after);\n syncStatus(t, r.id);\n var status = t.get('items', r.id).status;\n var msg = r.fields.name + ': ' + change + '; ' + round2(before) + ' before, ' + amount(after, unit) + ' now.';\n if (short) msg += ' More was used than the ' + round2(before) + ' on hand, so it is set to 0; count the shelf to correct it.';\n if (status !== wasStatus) {\n msg += status === 'out' ? ' It is out.' : status === 'low' ? ' It is now at or below its reorder point of ' + point + '.' : ' It is back above its reorder point.';\n } else if (status !== 'ok') {\n msg += ' Still ' + status + ' (reorder point ' + point + ').';\n }\n return [msg].concat(refreshDrafts(t, false, null)).join(' ');\n}\n\nfunction draftOrders(t, input) {\n var only = String(input.supplier || '').trim();\n var notes = refreshDrafts(t, true, only || null);\n var orphans = t.data.items.filter(function (r) {\n return stockStatus(r.fields) !== 'ok' && !key(r.fields.supplier);\n });\n if (!notes.length) {\n notes.push(\n only\n ? 'Nothing from ' + only + ' is at or below its reorder point without an order already.'\n : 'Nothing is at or below its reorder point without an order already, so there is nothing to draft.',\n );\n } else {\n notes.push('These are drafts: check them, place them with the supplier, then mark each one sent.');\n }\n if (orphans.length && !only) {\n notes.push(\n orphans\n .map(function (r) {\n return r.fields.name;\n })\n .join(', ') + (orphans.length === 1 ? ' needs' : ' need') + ' a supplier before it can go on an order.',\n );\n }\n return notes.join(' ');\n}\n\nfunction updateOrder(t, input, nowMs) {\n var status = key(input.status);\n if (status && ['sent', 'received', 'cancelled'].indexOf(status) < 0) throw new Error(\"status must be 'sent', 'received', or 'cancelled'.\");\n var hasLine = input.item !== undefined && input.item !== null && input.item !== '' && num(input.qty) !== null;\n if (!status && !hasLine) throw new Error(\"update_order needs 'status' (sent, received or cancelled), or 'item' and 'qty' to change a line on a draft.\");\n var o = t.get('orders', findOrder(t.data.orders, input.order !== undefined && input.order !== '' ? input.order : input.id !== undefined && input.id !== '' ? input.id : input.supplier, status).id);\n var supplier = o.fields.supplier;\n var msgs = [];\n if (hasLine) {\n if (o.status !== 'draft') throw new Error(o.id + ' is ' + o.status + '; only a draft can change.');\n var qty = num(input.qty);\n if (qty < 0) throw new Error('qty must be zero or more.');\n var item = findItem(t.data.items, input.item);\n var line = { itemId: item.id, name: item.fields.name, unit: item.fields.unit || '', qty: round2(qty), unitCostCents: num(item.fields.unitCostCents) || 0, fixed: true };\n var lines = (o.fields.lines || []).slice();\n var at = -1;\n lines.forEach(function (l, i) {\n if (l.itemId === item.id) at = i;\n });\n if (qty === 0) {\n if (at >= 0) lines.splice(at, 1);\n } else if (at >= 0) lines[at] = line;\n else lines.push(line);\n if (!lines.length) {\n t.transition('orders', o.id, 'cancelled', 'Last line removed');\n msgs.push('Took ' + item.fields.name + ' off ' + o.id + ', which leaves nothing on it, so the draft is dropped.');\n } else {\n t.update('orders', o.id, { lines: lines, totalCents: orderTotal(lines) }, 'Line changed by hand');\n msgs.push(qty === 0 ? 'Took ' + item.fields.name + ' off ' + o.id + '; it now comes to ' + money(orderTotal(lines)) + '.' : o.id + ' now orders ' + amount(qty, item.fields.unit) + ' ' + item.fields.name + ', ' + money(orderTotal(lines)) + ' in all.');\n }\n }\n if (status === 'sent') {\n if (o.status !== 'draft') throw new Error(o.id + ' is already ' + o.status + '.');\n var lead = supplierLead(t.data.items, supplier);\n var today = localDay(nowMs);\n t.update('orders', o.id, lead !== null ? { sentAt: today, leadDays: lead, expectedAt: addDays(today, lead) } : { sentAt: today }, input.note ? String(input.note) : undefined);\n t.transition('orders', o.id, 'sent', 'Sent');\n msgs.push('Marked ' + o.id + ' to ' + supplier + ' sent' + (lead !== null ? '; with a ' + lead + '-day lead it should arrive by ' + addDays(today, lead) + '.' : '.'));\n } else if (status === 'received') {\n if (o.status === 'received' || o.status === 'cancelled') throw new Error(o.id + ' is already ' + o.status + '.');\n var got = [];\n (o.fields.lines || []).forEach(function (l) {\n var r = t.get('items', l.itemId);\n if (!r) return;\n var before = num(r.fields.onHand) || 0;\n var after = round2(before + (num(l.qty) || 0));\n t.update('items', r.id, { onHand: after }, 'Received ' + amount(l.qty, l.unit) + ' on ' + o.id + ': ' + round2(before) + ' to ' + after);\n syncStatus(t, r.id);\n got.push(r.fields.name + ' ' + round2(before) + ' to ' + amount(after, r.fields.unit));\n });\n t.update('orders', o.id, { receivedAt: localDay(nowMs) }, input.note ? String(input.note) : undefined);\n t.transition('orders', o.id, 'received', 'Received');\n msgs.push('Received ' + o.id + ' from ' + supplier + (got.length ? ' and added it to stock: ' + got.join(', ') + '.' : '.'));\n msgs = msgs.concat(refreshDrafts(t, false, null));\n } else if (status === 'cancelled') {\n if (o.status === 'received' || o.status === 'cancelled') throw new Error(o.id + ' is already ' + o.status + '.');\n t.transition('orders', o.id, 'cancelled', input.note ? String(input.note) : 'Cancelled');\n msgs.push('Cancelled ' + o.id + ' to ' + supplier + '.');\n }\n return msgs.join(' ');\n}\n\nfunction onOrderText(r, orders) {\n var o = orders.filter(function (x) {\n return (\n OPEN.indexOf(x.status) >= 0 &&\n (x.fields.lines || []).some(function (l) {\n return l.itemId === r.id;\n })\n );\n })[0];\n if (!o) return '';\n return o.status === 'draft' ? 'on draft ' + o.id : 'on order ' + o.id + (o.fields.expectedAt ? ', expected ' + o.fields.expectedAt : '');\n}\nfunction itemLine(r, orders) {\n var f = r.fields;\n var status = stockStatus(f);\n var onOrder = onOrderText(r, orders);\n var text =\n f.name + ' (' + r.id + '): ' + amount(num(f.onHand) || 0, f.unit) + ' on hand' + (status === 'ok' ? '' : ', ' + status) +\n ', reorder at ' + (num(f.reorderPoint) || 0) + (num(f.par) ? ', par ' + num(f.par) : '');\n if (status !== 'ok') {\n text += onOrder.indexOf('on order') === 0 ? '; ' + onOrder : '; order ' + amount(orderQty(f), f.unit) + (onOrder ? ' (' + onOrder + ')' : '');\n }\n text += f.supplier ? '; supplier ' + f.supplier + (num(f.leadDays) !== null ? ', ' + num(f.leadDays) + '-day lead' : '') : '; no supplier yet';\n return text;\n}\nfunction orderLine(o, nowMs) {\n var f = o.fields;\n var text = o.id + ' ' + f.supplier + ': ' + linesText(f.lines || []) + ', ' + money(num(f.totalCents) || 0);\n if (o.status === 'sent') text += ', sent ' + f.sentAt + (f.expectedAt ? ', expected ' + f.expectedAt + ' (' + when(daysUntil(f.expectedAt, nowMs)) + ')' : '');\n if (o.status === 'received') text += ', received ' + f.receivedAt;\n return text;\n}\nfunction urgency(a, b) {\n var sa = stockStatus(a.fields);\n var sb = stockStatus(b.fields);\n if (sa !== sb) return sa === 'out' ? -1 : sb === 'out' ? 1 : 0;\n var ra = (num(a.fields.onHand) || 0) / Math.max(1, num(a.fields.reorderPoint) || 1);\n var rb = (num(b.fields.onHand) || 0) / Math.max(1, num(b.fields.reorderPoint) || 1);\n return ra - rb || String(a.fields.name).localeCompare(String(b.fields.name));\n}\nfunction picture(items, orders, nowMs) {\n var needs = items\n .filter(function (r) {\n return stockStatus(r.fields) !== 'ok';\n })\n .sort(urgency);\n var out = needs.filter(function (r) {\n return stockStatus(r.fields) === 'out';\n }).length;\n var sent = orders\n .filter(function (o) {\n return o.status === 'sent';\n })\n .sort(function (a, b) {\n return String(a.fields.expectedAt || '').localeCompare(String(b.fields.expectedAt || ''));\n });\n var drafts = orders.filter(function (o) {\n return o.status === 'draft';\n });\n var parts = [items.length + (items.length === 1 ? ' item' : ' items') + ' tracked: ' + out + ' out, ' + (needs.length - out) + ' low.'];\n // One list, out first: asked \"what's running low\", a model reads a separate out-of-stock list as out of scope.\n parts.push(\n needs.length\n ? 'Running low or out, out first: ' + needs.map(function (r) { return itemLine(r, orders); }).join(' | ') + '.'\n : items.length\n ? 'Nothing is at or below its reorder point.'\n : 'Nothing tracked yet.',\n );\n if (sent.length) parts.push('On order: ' + sent.map(function (o) { return orderLine(o, nowMs); }).join(' | ') + '.');\n if (drafts.length) parts.push('Drafts for the person to check and send: ' + drafts.map(function (o) { return orderLine(o, nowMs); }).join(' | ') + '.');\n var list = suppliers(items);\n if (list.length) {\n parts.push(\n 'Suppliers: ' +\n list\n .map(function (s) {\n return s.name + (s.leadDays !== null ? ' (' + s.leadDays + '-day lead)' : ' (no lead time yet)');\n })\n .join(', ') +\n '.',\n );\n }\n return { out: out, low: needs.length - out, onOrder: sent.length, drafts: drafts.length, summary: parts.join(' ') };\n}\nfunction listing(items, orders, nowMs) {\n var lines = items\n .slice()\n .sort(function (a, b) {\n return String(a.fields.name).localeCompare(String(b.fields.name));\n })\n .map(function (r) {\n return '[' + stockStatus(r.fields) + '] ' + itemLine(r, orders) + (num(r.fields.unitCostCents) ? ', ' + money(r.fields.unitCostCents) + ' each' : '');\n });\n var open = orders.filter(function (o) {\n return OPEN.indexOf(o.status) >= 0;\n });\n var closed = orders\n .filter(function (o) {\n return OPEN.indexOf(o.status) < 0;\n })\n .slice(-5);\n open.concat(closed).forEach(function (o) {\n lines.push('[' + o.status + '] ' + orderLine(o, nowMs));\n });\n return lines.join('\\n') || 'Nothing tracked yet.';\n}\nfunction run(action, input, state, nowMs) {\n var t = transaction(state, nowMs);\n var note = '';\n input = input || {};\n if (action === 'add') note = addItem(t, input);\n else if (action === 'stock') note = recordStock(t, input, nowMs);\n else if (action === 'draft_orders') note = draftOrders(t, input);\n else if (action === 'update_order') note = updateOrder(t, input, nowMs);\n else if (action !== 'status' && action !== 'list') {\n throw new Error(\"Unknown action '\" + action + \"'. Use status, add, stock, draft_orders, update_order, or list.\");\n }\n var view = picture(t.data.items, t.data.orders, nowMs);\n return {\n ops: t.ops,\n state: t.data,\n output: {\n out: view.out,\n low: view.low,\n onOrder: view.onOrder,\n drafts: view.drafts,\n tracked: t.data.items.length,\n summary: action === 'list' ? listing(t.data.items, t.data.orders, nowMs) : (note ? note + ' ' : '') + view.summary,\n },\n };\n}\n// ── inventory-rules-end ──\n\nconst stores = {\n items: rosterStore(gezel.fs, 'items.json', { stages: ['ok', 'low', 'out'], idPrefix: 'it' }),\n orders: rosterStore(gezel.fs, 'orders.json', { stages: ['draft', 'sent', 'received', 'cancelled'], idPrefix: 'po' }),\n};\nconst before = { items: await stores.items.list(), orders: await stores.orders.list() };\nconst result = run(String(input.action), input, before, Date.now());\n// Replay the changes through the stores, in order, so the files keep their history.\nfor (const op of result.ops) {\n const store = stores[op.store as 'items' | 'orders'];\n if (op.op === 'add') await store.add({ id: op.id, status: op.status, fields: op.fields, note: op.note });\n else if (op.op === 'update') await store.update(op.id, { fields: op.fields, ...(op.note ? { note: op.note } : {}) });\n else await store.transition(op.id, op.to, op.note ? { note: op.note } : {});\n}\ngezel.output(result.output);\n"
|
|
34
|
+
},
|
|
35
|
+
"tools": [
|
|
36
|
+
{
|
|
37
|
+
"name": "stock_status",
|
|
38
|
+
"description": "What is out and running low (out first), each with its count, reorder point, the quantity to order, the supplier and lead time, plus orders on the way and drafts waiting, with ids. Call it first when asked what's low or what to order.",
|
|
39
|
+
"script": "inventory-store",
|
|
40
|
+
"inputs": {
|
|
41
|
+
"type": "object",
|
|
42
|
+
"properties": {}
|
|
43
|
+
},
|
|
44
|
+
"bind": {
|
|
45
|
+
"action": "status"
|
|
46
|
+
},
|
|
47
|
+
"state": true
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"name": "add_item",
|
|
51
|
+
"description": "Save a stock item: name, unit, how many are on hand now, the reorder point, the par level to order up to, supplier, their lead time in days, and the unit cost in dollars. An existing name is updated, never duplicated. Call it as soon as an item is mentioned, before you describe it.",
|
|
52
|
+
"script": "inventory-store",
|
|
53
|
+
"inputs": {
|
|
54
|
+
"type": "object",
|
|
55
|
+
"properties": {
|
|
56
|
+
"name": {
|
|
57
|
+
"type": "string"
|
|
58
|
+
},
|
|
59
|
+
"unit": {
|
|
60
|
+
"type": "string",
|
|
61
|
+
"description": "How it is counted, e.g. 'carton', 'bag (5 lb)', 'sleeve of 50'."
|
|
62
|
+
},
|
|
63
|
+
"onHand": {
|
|
64
|
+
"type": "number",
|
|
65
|
+
"description": "How many are on the shelf now (needed for a new item)."
|
|
66
|
+
},
|
|
67
|
+
"reorderPoint": {
|
|
68
|
+
"type": "number",
|
|
69
|
+
"description": "Reorder when stock falls to this many or fewer."
|
|
70
|
+
},
|
|
71
|
+
"par": {
|
|
72
|
+
"type": "number",
|
|
73
|
+
"description": "Order back up to this many."
|
|
74
|
+
},
|
|
75
|
+
"supplier": {
|
|
76
|
+
"type": "string"
|
|
77
|
+
},
|
|
78
|
+
"leadDays": {
|
|
79
|
+
"type": "number",
|
|
80
|
+
"description": "The supplier's lead time in days; it applies to every item from them."
|
|
81
|
+
},
|
|
82
|
+
"unitCost": {
|
|
83
|
+
"type": "number",
|
|
84
|
+
"description": "Price per unit in dollars, e.g. 3.8."
|
|
85
|
+
},
|
|
86
|
+
"note": {
|
|
87
|
+
"type": "string"
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"required": [
|
|
91
|
+
"name"
|
|
92
|
+
]
|
|
93
|
+
},
|
|
94
|
+
"bind": {
|
|
95
|
+
"action": "add"
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"name": "record_stock",
|
|
100
|
+
"description": "Record stock coming in or going out. Pass received (delivered) and used (sold, used or thrown out) exactly as the person said them; the store does the arithmetic, so never work out the new total yourself. Pass count only when they counted the shelf. Call it the moment they tell you.",
|
|
101
|
+
"script": "inventory-store",
|
|
102
|
+
"inputs": {
|
|
103
|
+
"type": "object",
|
|
104
|
+
"properties": {
|
|
105
|
+
"item": {
|
|
106
|
+
"type": "string",
|
|
107
|
+
"description": "The item's name or id ('it-3')."
|
|
108
|
+
},
|
|
109
|
+
"received": {
|
|
110
|
+
"type": "number",
|
|
111
|
+
"description": "How many came in, as the person said it. The store adds it."
|
|
112
|
+
},
|
|
113
|
+
"used": {
|
|
114
|
+
"type": "number",
|
|
115
|
+
"description": "How many were sold, used or thrown out, as the person said it. The store takes it off."
|
|
116
|
+
},
|
|
117
|
+
"count": {
|
|
118
|
+
"type": "number",
|
|
119
|
+
"description": "Only when they counted the shelf: the number counted."
|
|
120
|
+
},
|
|
121
|
+
"note": {
|
|
122
|
+
"type": "string"
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
"required": [
|
|
126
|
+
"item"
|
|
127
|
+
]
|
|
128
|
+
},
|
|
129
|
+
"bind": {
|
|
130
|
+
"action": "stock"
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"name": "draft_orders",
|
|
135
|
+
"description": "Draft purchase orders, one per supplier, for every item at or below its reorder point that is not already on order; quantities fill each item back up to its par. Running it again updates the drafts, never duplicates them. The person checks and places them.",
|
|
136
|
+
"script": "inventory-store",
|
|
137
|
+
"inputs": {
|
|
138
|
+
"type": "object",
|
|
139
|
+
"properties": {
|
|
140
|
+
"supplier": {
|
|
141
|
+
"type": "string",
|
|
142
|
+
"description": "Only this supplier; leave out for all of them."
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
"bind": {
|
|
147
|
+
"action": "draft_orders"
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"name": "update_order",
|
|
152
|
+
"description": "Change a purchase order: mark it sent when the person says they placed it, received when it arrived (its quantities go into stock), or cancelled; or set one item's quantity on a draft. Call it as soon as they tell you.",
|
|
153
|
+
"script": "inventory-store",
|
|
154
|
+
"inputs": {
|
|
155
|
+
"type": "object",
|
|
156
|
+
"properties": {
|
|
157
|
+
"order": {
|
|
158
|
+
"type": "string",
|
|
159
|
+
"description": "Order id ('po-2') or the supplier's name."
|
|
160
|
+
},
|
|
161
|
+
"status": {
|
|
162
|
+
"type": "string",
|
|
163
|
+
"enum": [
|
|
164
|
+
"sent",
|
|
165
|
+
"received",
|
|
166
|
+
"cancelled"
|
|
167
|
+
]
|
|
168
|
+
},
|
|
169
|
+
"item": {
|
|
170
|
+
"type": "string",
|
|
171
|
+
"description": "To change a draft: the item whose quantity to set."
|
|
172
|
+
},
|
|
173
|
+
"qty": {
|
|
174
|
+
"type": "number",
|
|
175
|
+
"description": "To change a draft: the new quantity (0 takes the item off)."
|
|
176
|
+
},
|
|
177
|
+
"note": {
|
|
178
|
+
"type": "string"
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
"required": [
|
|
182
|
+
"order"
|
|
183
|
+
]
|
|
184
|
+
},
|
|
185
|
+
"bind": {
|
|
186
|
+
"action": "update_order"
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"name": "list_stock",
|
|
191
|
+
"description": "Every item with its count, reorder point, par, supplier, lead time and price, and every open order.",
|
|
192
|
+
"script": "inventory-store",
|
|
193
|
+
"inputs": {
|
|
194
|
+
"type": "object",
|
|
195
|
+
"properties": {}
|
|
196
|
+
},
|
|
197
|
+
"bind": {
|
|
198
|
+
"action": "list"
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"name": "page_add_item",
|
|
203
|
+
"description": "Add or update a stock item.",
|
|
204
|
+
"script": "inventory-store",
|
|
205
|
+
"inputs": {
|
|
206
|
+
"type": "object",
|
|
207
|
+
"properties": {
|
|
208
|
+
"name": {
|
|
209
|
+
"type": "string"
|
|
210
|
+
},
|
|
211
|
+
"unit": {
|
|
212
|
+
"type": "string",
|
|
213
|
+
"description": "How it is counted, e.g. 'carton', 'bag (5 lb)', 'sleeve of 50'."
|
|
214
|
+
},
|
|
215
|
+
"onHand": {
|
|
216
|
+
"type": "number",
|
|
217
|
+
"description": "How many are on the shelf now (needed for a new item)."
|
|
218
|
+
},
|
|
219
|
+
"reorderPoint": {
|
|
220
|
+
"type": "number",
|
|
221
|
+
"description": "Reorder when stock falls to this many or fewer."
|
|
222
|
+
},
|
|
223
|
+
"par": {
|
|
224
|
+
"type": "number",
|
|
225
|
+
"description": "Order back up to this many."
|
|
226
|
+
},
|
|
227
|
+
"supplier": {
|
|
228
|
+
"type": "string"
|
|
229
|
+
},
|
|
230
|
+
"leadDays": {
|
|
231
|
+
"type": "number",
|
|
232
|
+
"description": "The supplier's lead time in days; it applies to every item from them."
|
|
233
|
+
},
|
|
234
|
+
"unitCost": {
|
|
235
|
+
"type": "number",
|
|
236
|
+
"description": "Price per unit in dollars, e.g. 3.8."
|
|
237
|
+
},
|
|
238
|
+
"note": {
|
|
239
|
+
"type": "string"
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
"required": [
|
|
243
|
+
"name"
|
|
244
|
+
]
|
|
245
|
+
},
|
|
246
|
+
"bind": {
|
|
247
|
+
"action": "add"
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
"name": "page_record_stock",
|
|
252
|
+
"description": "Record stock received, used or counted.",
|
|
253
|
+
"script": "inventory-store",
|
|
254
|
+
"inputs": {
|
|
255
|
+
"type": "object",
|
|
256
|
+
"properties": {
|
|
257
|
+
"item": {
|
|
258
|
+
"type": "string",
|
|
259
|
+
"description": "The item's name or id ('it-3')."
|
|
260
|
+
},
|
|
261
|
+
"received": {
|
|
262
|
+
"type": "number",
|
|
263
|
+
"description": "How many came in, as the person said it. The store adds it."
|
|
264
|
+
},
|
|
265
|
+
"used": {
|
|
266
|
+
"type": "number",
|
|
267
|
+
"description": "How many were sold, used or thrown out, as the person said it. The store takes it off."
|
|
268
|
+
},
|
|
269
|
+
"count": {
|
|
270
|
+
"type": "number",
|
|
271
|
+
"description": "Only when they counted the shelf: the number counted."
|
|
272
|
+
},
|
|
273
|
+
"note": {
|
|
274
|
+
"type": "string"
|
|
275
|
+
}
|
|
276
|
+
},
|
|
277
|
+
"required": [
|
|
278
|
+
"item"
|
|
279
|
+
]
|
|
280
|
+
},
|
|
281
|
+
"bind": {
|
|
282
|
+
"action": "stock"
|
|
283
|
+
},
|
|
284
|
+
"reaction": {
|
|
285
|
+
"gezel": "stock-keeper",
|
|
286
|
+
"hideSeed": true,
|
|
287
|
+
"prompt": "The person just logged stock on the inventory page. The stock list now reads (its first sentence is what changed):\n{{output.summary}}\nIn one or two short sentences, confirm the new count and, if that item is now low or out, say how many to order and from whom. Do not call tools."
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
"name": "page_draft_orders",
|
|
292
|
+
"description": "Draft purchase orders for everything at or below its reorder point.",
|
|
293
|
+
"script": "inventory-store",
|
|
294
|
+
"inputs": {
|
|
295
|
+
"type": "object",
|
|
296
|
+
"properties": {
|
|
297
|
+
"supplier": {
|
|
298
|
+
"type": "string",
|
|
299
|
+
"description": "Only this supplier; leave out for all of them."
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
},
|
|
303
|
+
"bind": {
|
|
304
|
+
"action": "draft_orders"
|
|
305
|
+
}
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
"name": "page_update_order",
|
|
309
|
+
"description": "Mark an order sent, received or cancelled.",
|
|
310
|
+
"script": "inventory-store",
|
|
311
|
+
"inputs": {
|
|
312
|
+
"type": "object",
|
|
313
|
+
"properties": {
|
|
314
|
+
"order": {
|
|
315
|
+
"type": "string",
|
|
316
|
+
"description": "Order id ('po-2') or the supplier's name."
|
|
317
|
+
},
|
|
318
|
+
"status": {
|
|
319
|
+
"type": "string",
|
|
320
|
+
"enum": [
|
|
321
|
+
"sent",
|
|
322
|
+
"received",
|
|
323
|
+
"cancelled"
|
|
324
|
+
]
|
|
325
|
+
},
|
|
326
|
+
"item": {
|
|
327
|
+
"type": "string",
|
|
328
|
+
"description": "To change a draft: the item whose quantity to set."
|
|
329
|
+
},
|
|
330
|
+
"qty": {
|
|
331
|
+
"type": "number",
|
|
332
|
+
"description": "To change a draft: the new quantity (0 takes the item off)."
|
|
333
|
+
},
|
|
334
|
+
"note": {
|
|
335
|
+
"type": "string"
|
|
336
|
+
}
|
|
337
|
+
},
|
|
338
|
+
"required": [
|
|
339
|
+
"order"
|
|
340
|
+
]
|
|
341
|
+
},
|
|
342
|
+
"bind": {
|
|
343
|
+
"action": "update_order"
|
|
344
|
+
},
|
|
345
|
+
"reaction": {
|
|
346
|
+
"gezel": "stock-keeper",
|
|
347
|
+
"hideSeed": true,
|
|
348
|
+
"prompt": "The person just updated a purchase order on the inventory page. The stock list now reads (its first sentence is what changed):\n{{output.summary}}\nIn two short sentences, confirm what changed: what went into stock, or when the order should arrive. Do not call tools."
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
],
|
|
352
|
+
"craftbooks": [
|
|
353
|
+
"reorder-run"
|
|
354
|
+
],
|
|
355
|
+
"schedules": [],
|
|
356
|
+
"pages": {
|
|
357
|
+
"entry": "stock/index.html",
|
|
358
|
+
"api": 1,
|
|
359
|
+
"reads": [
|
|
360
|
+
{
|
|
361
|
+
"source": "workspace",
|
|
362
|
+
"path": "items.json"
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
"source": "workspace",
|
|
366
|
+
"path": "orders.json"
|
|
367
|
+
}
|
|
368
|
+
],
|
|
369
|
+
"tools": [
|
|
370
|
+
"page_add_item",
|
|
371
|
+
"page_record_stock",
|
|
372
|
+
"page_draft_orders",
|
|
373
|
+
"page_update_order"
|
|
374
|
+
]
|
|
375
|
+
},
|
|
376
|
+
"workspaceSeed": [
|
|
377
|
+
"items.json",
|
|
378
|
+
"orders.json"
|
|
379
|
+
],
|
|
380
|
+
"minGezelVersion": "1.26280"
|
|
381
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
- Nothing runs out by surprise: every item has a reorder point, and the ones at
|
|
2
|
+
or below it are always at the top.
|
|
3
|
+
- Orders go out in time: each supplier's lead time is known, and drafts are
|
|
4
|
+
ready before the shelf is empty.
|
|
5
|
+
- The list matches the shelf: deliveries, usage and counts are recorded the day
|
|
6
|
+
they happen.
|