@bendyline/gilde 0.3.5 → 0.3.7
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/gemma4-12b-q4.json +7 -3
- package/authoring/chat-models/muse-glimmer-30b-q4.json +29 -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 +21 -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 +27 -7
- package/authoring/page-demo-bootstrap.js +96 -23
- package/data/chat-models/ge/gemma4-12b-q4/manifest.json +46 -3
- package/data/chat-models/ge/gemma4-12b-q4/versions/1.2.1/manifest.json +141 -0
- package/data/chat-models/ge/gemma4-e4b-q4/manifest.json +5 -0
- package/data/chat-models/index.json +1 -1
- package/data/chat-models/mu/muse-glimmer-30b-q4/manifest.json +25 -2
- package/data/chat-models/mu/muse-glimmer-30b-q4/versions/1.0.3/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/or/ornith1.5-9b-q4/manifest.json +5 -0
- package/data/chat-models/or/ornith1.5-9b-q8/manifest.json +5 -0
- package/data/chat-models/qw/qwen3.5-9b-q4/manifest.json +5 -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 +25 -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-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 +27 -7
- package/data/chat-models/qw/qwen3.8-flash-next-q2/versions/1.0.3/manifest.json +47 -0
- 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/al/alert-rules/versions/1.0.6/craftbook.json +383 -0
- package/data/craftbook-templates/al/alert-rules/versions/1.0.6/test.json +145 -0
- package/data/craftbook-templates/index.json +1 -1
- package/data/craftbook-templates/raw-index.json +1 -1
- package/data/craftbook-templates/re/refactor-module/versions/2.0.8/craftbook.json +754 -0
- package/data/craftbook-templates/re/refactor-module/versions/2.0.8/test.json +241 -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.0.0/manifest.json +1 -1
- package/data/project-types/qu/quotes-and-bids/versions/1.0.0/pages/quotes/index.html +1 -1
- 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 +215 -0
- package/schemas/chat-model-version.schema.json +85 -0
- package/schemas/craftbook-doc.schema.json +15 -0
- package/schemas/craftbook-template-version.schema.json +12 -0
- package/schemas/craftbook-test.schema.json +12 -0
|
@@ -0,0 +1,325 @@
|
|
|
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é with 12 staff', 'a six-person design studio'.",
|
|
13
|
+
"default": "the business"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"required": [
|
|
17
|
+
"business"
|
|
18
|
+
]
|
|
19
|
+
},
|
|
20
|
+
"nameTemplate": "New Hire Onboarding",
|
|
21
|
+
"aboutTemplate": "about.md",
|
|
22
|
+
"missionTemplate": "mission.md",
|
|
23
|
+
"gezels": [
|
|
24
|
+
{
|
|
25
|
+
"templateId": "training-coordinator",
|
|
26
|
+
"voorman": true
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"templateId": "kantoormeester"
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"scripts": {
|
|
33
|
+
"onboarding-store": "import { type InferredInput, defineScript, gezel } from '@bendyline/gezel-sdk';\nimport { rosterStore } from '@bendyline/gezel-sdk/stores';\n\nexport const meta = defineScript({\n name: 'onboarding-store',\n description:\n \"Read and update the onboarding plans: hires.json (each new hire, their start date, manager and buddy) and tasks.json (every step of every plan, with a phase, an owner and a due date). action:'status' for open steps due soon (overdue first) and each hire's progress; 'add_hire' to add a hire with the standard plan (an existing name is updated, never duplicated); 'add_task' to add a step to a plan; 'complete' to check steps off; 'list' for whole plans.\",\n inputs: {\n action: { type: 'string', description: \"One of 'status', 'add_hire', 'add_task', 'complete', or 'list'.\", required: true },\n name: { type: 'string', description: \"For add_hire: the new hire's full name.\" },\n role: { type: 'string', description: \"For add_hire: their job, e.g. 'Barista'.\" },\n startOn: { type: 'string', description: \"For add_hire: their first day, YYYY-MM-DD or a weekday like 'monday'.\" },\n manager: { type: 'string', description: 'For add_hire: their manager.' },\n buddy: { type: 'string', description: 'For add_hire: the teammate who shows them around the first week.' },\n hire: { type: 'string', description: \"Hire id (e.g. 'h-2') or name; a first name is enough when it is unique.\" },\n title: { type: 'string', description: 'For add_task: what needs doing.' },\n phase: {\n type: 'string',\n description: \"before day one, day one, first week, 30 days, 60 days, or 90 days. For complete: checks off every open step in that phase.\",\n },\n owner: { type: 'string', description: 'For add_task: who does it.' },\n dueOn: { type: 'string', description: 'For add_task: the due date, YYYY-MM-DD; default the phase’s usual day.' },\n task: { type: 'string', description: \"For complete: a step's id (e.g. 't-4') or words from its title; several separated by commas.\" },\n reopen: { type: 'boolean', description: 'For complete: put a checked step back on the list.' },\n note: { type: 'string', description: 'What happened.' },\n withinDays: { type: 'number', description: 'How many days ahead count as due soon (default 7).' },\n },\n outputs: {\n active: { type: 'number', description: 'Hires still onboarding.' },\n overdue: { type: 'number', description: 'Open steps past their due date.' },\n dueSoon: { type: 'number', description: 'Open steps due within the window.' },\n summary: { type: 'string', description: 'What changed, then the onboarding 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// ── onboarding-rules-start ──\n// Pure derivations: dates in local calendar days, record matching, the\n// standard plan, phase names, task matching, and the picture the crew reads.\n// Kept self-contained between these sentinels so tests execute the shipped\n// bytes.\nvar DAY_MS = 86400000;\nvar WEEKDAYS = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];\nvar MONTH_KEYS = ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec'];\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 noon(day) {\n return new Date(String(day).slice(0, 10) + 'T12:00:00');\n}\nfunction addDays(day, n) {\n var d = noon(day);\n d.setDate(d.getDate() + n);\n return localDay(d.getTime());\n}\nfunction addMonths(day, months) {\n var d = noon(day);\n var date = d.getDate();\n d.setDate(1);\n d.setMonth(d.getMonth() + months);\n // The 31st rolls to the last day of a shorter month, not into the next one.\n d.setDate(Math.min(date, new Date(d.getFullYear(), d.getMonth() + 1, 0).getDate()));\n return localDay(d.getTime());\n}\nfunction daysLeft(day, nowMs) {\n var due = Date.parse(String(day).slice(0, 10) + 'T00:00:00');\n var today = Date.parse(localDay(nowMs) + 'T00:00:00');\n return Math.round((due - today) / DAY_MS);\n}\nfunction dayName(day) {\n return WEEKDAYS[noon(day).getDay()];\n}\nfunction parseDay(text, nowMs, direction) {\n var raw = String(text == null ? '' : text).trim().toLowerCase().replace(/[.,]/g, ' ').replace(/\\s+/g, ' ').trim();\n if (!raw) return null;\n var iso = raw.match(/^(\\d{4})-(\\d{1,2})-(\\d{1,2})(?:t.*)?$/);\n if (iso) return iso[1] + '-' + pad(Number(iso[2])) + '-' + pad(Number(iso[3]));\n var today = localDay(nowMs);\n if (raw === 'today' || raw === 'now') return today;\n if (raw === 'tomorrow') return addDays(today, 1);\n if (raw === 'yesterday') return addDays(today, -1);\n var rel = raw.match(/^(?:in )?(\\d{1,3}) (day|days|week|weeks)( ago| from now)?$/);\n if (rel) {\n var n = Number(rel[1]) * (rel[2].charAt(0) === 'w' ? 7 : 1);\n return addDays(today, rel[3] === ' ago' ? -n : n);\n }\n var wd = raw.match(/^(this |next |last |on |coming )?(sun|mon|tue|wed|thu|fri|sat)[a-z]*$/);\n if (wd) {\n var target = ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat'].indexOf(wd[2]);\n var now = noon(today).getDay();\n if (direction === 'past' || wd[1] === 'last ') {\n var back = (now - target + 7) % 7;\n return addDays(today, -(wd[1] === 'last ' && back === 0 ? 7 : back));\n }\n if (wd[1] === 'this ') return addDays(today, (target - now + 7) % 7);\n return addDays(today, ((target - now + 6) % 7) + 1);\n }\n var md = raw.match(/^(?:[a-z]+day )?([a-z]{3,9}) (\\d{1,2})(?:st|nd|rd|th)?(?: (\\d{4}))?$/);\n var dm = raw.match(/^(?:[a-z]+day )?(\\d{1,2})(?:st|nd|rd|th)? (?:of )?([a-z]{3,9})(?: (\\d{4}))?$/);\n var parts = md ? { month: md[1], date: md[2], year: md[3] } : dm ? { month: dm[2], date: dm[1], year: dm[3] } : null;\n if (parts) {\n var m = MONTH_KEYS.indexOf(parts.month.slice(0, 3));\n if (m < 0) return null;\n var date = Number(parts.date);\n if (date < 1 || date > 31) return null;\n if (parts.year) return parts.year + '-' + pad(m + 1) + '-' + pad(date);\n var year = noon(today).getFullYear();\n var guess = year + '-' + pad(m + 1) + '-' + pad(date);\n var d = daysLeft(guess, nowMs);\n if (direction === 'past' && d > 0) guess = year - 1 + guess.slice(4);\n if (direction !== 'past' && d < 0) guess = year + 1 + guess.slice(4);\n return guess;\n }\n return null;\n}\nfunction matches(records, text, labelOf) {\n var wanted = String(text == null ? '' : text).trim().toLowerCase().replace(/['\\u2019]s\\b/g, '').replace(/\\s+/g, ' ');\n if (!wanted) return [];\n var tiers = [\n function (r) { return String(r.id).toLowerCase() === wanted; },\n function (r) { return labelOf(r).toLowerCase() === wanted; },\n function (r) { return labelOf(r).toLowerCase().indexOf(wanted) === 0; },\n function (r) { return (' ' + labelOf(r).toLowerCase() + ' ').indexOf(' ' + wanted + ' ') >= 0; },\n function (r) { return labelOf(r).toLowerCase().indexOf(wanted) >= 0; },\n function (r) { var l = labelOf(r).toLowerCase(); return l.length >= 3 && wanted.indexOf(l) >= 0; },\n ];\n for (var i = 0; i < tiers.length; i++) {\n var hit = records.filter(tiers[i]);\n if (hit.length) return hit;\n }\n return [];\n}\nfunction describe(records, labelOf) {\n return records.map(function (r) { return r.id + ' ' + labelOf(r); }).join(', ');\n}\nfunction splitList(text) {\n var raw = String(text == null ? '' : text).trim();\n if (/^\\[/.test(raw)) {\n try {\n var parsed = JSON.parse(raw);\n if (Array.isArray(parsed)) return parsed.map(function (s) { return String(s).trim(); }).filter(Boolean);\n } catch (e) {\n // Not JSON after all; split it as text.\n }\n }\n return raw\n .split(/\\s*[,;\\n]+\\s*/)\n .map(function (s) { return s.replace(/^(and|or|plus)\\s+/i, '').replace(/[.\\s]+$/, '').trim(); })\n .filter(Boolean);\n}\nvar PHASES = ['before day one', 'day one', 'first week', '30 days', '60 days', '90 days'];\nvar PHASE_OFFSET = { 'before day one': -2, 'day one': 0, 'first week': 4, '30 days': 30, '60 days': 60, '90 days': 90 };\n// The standard plan every new hire starts with; offsets are days from the first day.\nvar PLAN = [\n ['before day one', 'Send a welcome note with the start time, place and what to bring', 'manager', -5],\n ['before day one', 'Set up email and scheduling accounts', 'office', -3],\n ['before day one', 'Prepare uniform, keys and workspace', 'office', -2],\n ['before day one', 'Collect tax, payroll and emergency-contact forms', 'office', -1],\n ['day one', 'Tour, introductions and safety basics', 'manager', 0],\n ['day one', 'Pair with a buddy for the first week', 'manager', 0],\n ['first week', 'Shadow shifts with the buddy', 'buddy', 3],\n ['first week', 'Enroll in the training the role needs', 'training', 4],\n ['first week', 'First-week check-in', 'manager', 5],\n ['30 days', '30-day check-in: what is going well, what is unclear', 'manager', 30],\n ['30 days', 'Required certificates on file', 'training', 30],\n ['60 days', '60-day check-in', 'manager', 60],\n ['90 days', '90-day review and goals for the next quarter', 'manager', 90],\n];\nvar TASK_STOP = ['with', 'from', 'that', 'this', 'have', 'done', 'were', 'they', 'their', 'into', 'about', 'what'];\n\nfunction ownerFor(kind, hire) {\n var f = (hire && hire.fields) || {};\n if (kind === 'manager') return f.manager || 'Manager';\n if (kind === 'buddy') return f.buddy || 'Buddy';\n if (kind === 'office') return 'Office';\n if (kind === 'training') return 'Training';\n return String(kind || '');\n}\nfunction planFor(hire) {\n return PLAN.map(function (p) {\n return { phase: p[0], title: p[1], ownerKind: p[2], owner: ownerFor(p[2], hire), offset: p[3], dueAt: addDays(hire.fields.startOn, p[3]) };\n });\n}\nfunction phaseOf(text) {\n var raw = String(text == null ? '' : text).trim().toLowerCase();\n if (!raw) return null;\n if (PHASES.indexOf(raw) >= 0) return raw;\n if (/before|prior|ahead|pre-?start|preboard/.test(raw)) return 'before day one';\n if (/\\b(day (one|1)|first day|start day|day of)\\b/.test(raw)) return 'day one';\n if (/\\b(first|1st) week\\b|\\bweek (one|1)\\b|^week$/.test(raw)) return 'first week';\n if (/\\b(30|thirty)\\b|first month|one month/.test(raw)) return '30 days';\n if (/\\b(60|sixty)\\b|two months/.test(raw)) return '60 days';\n if (/\\b(90|ninety)\\b|three months/.test(raw)) return '90 days';\n return null;\n}\nfunction keyWords(text) {\n return (String(text == null ? '' : text).toLowerCase().match(/[a-z0-9]+/g) || [])\n .filter(function (w) { return w.length >= 4 && TASK_STOP.indexOf(w) < 0; })\n .map(function (w) { return w.length > 4 ? w.replace(/s$/, '') : w; });\n}\nfunction taskMatches(tasks, text) {\n var hit = matches(tasks, text, function (t) { return String(t.fields.title || ''); });\n if (hit.length) return hit;\n var want = keyWords(text);\n if (!want.length) return [];\n var best = [];\n var score = 0;\n tasks.forEach(function (t) {\n var have = keyWords(t.fields.title);\n var s = want.filter(function (w) { return have.indexOf(w) >= 0; }).length;\n if (s > score) {\n best = [t];\n score = s;\n } else if (s === score && s > 0) best.push(t);\n });\n return score >= Math.min(2, want.length) ? best : [];\n}\nfunction whenText(day, nowMs) {\n var d = daysLeft(day, nowMs);\n return d < 0 ? -d + (d === -1 ? ' day late' : ' days late') : d === 0 ? 'due today' : d === 1 ? 'due tomorrow' : 'due ' + dayName(day) + ' ' + day;\n}\nfunction startText(hire, nowMs) {\n var d = daysLeft(hire.fields.startOn, nowMs);\n return d > 0 ? 'starts ' + dayName(hire.fields.startOn) + ' ' + hire.fields.startOn + ', in ' + d + (d === 1 ? ' day' : ' days') : d === 0 ? 'starts today' : 'day ' + (1 - d) + ', started ' + hire.fields.startOn;\n}\nfunction taskLine(t, nowMs) {\n return t.fields.title + ' (' + t.id + ', ' + (t.fields.owner || 'no owner') + ', ' + whenText(t.fields.dueAt, nowMs) + ')';\n}\nfunction picture(hires, tasks, nowMs, withinDays) {\n var active = hires.filter(function (h) { return h.status !== 'done'; }).sort(function (a, b) { return String(a.fields.startOn).localeCompare(String(b.fields.startOn)); });\n var byDue = function (a, b) { return String(a.fields.dueAt).localeCompare(String(b.fields.dueAt)); };\n var open = tasks.filter(function (t) { return t.status !== 'done' && active.some(function (h) { return h.id === t.fields.hireId; }); });\n var overdue = open.filter(function (t) { return daysLeft(t.fields.dueAt, nowMs) < 0; }).sort(byDue);\n var soon = open.filter(function (t) { var d = daysLeft(t.fields.dueAt, nowMs); return d >= 0 && d <= withinDays; }).sort(byDue);\n var parts = [active.length + (active.length === 1 ? ' new hire' : ' new hires') + ' onboarding, ' + overdue.length + (overdue.length === 1 ? ' step' : ' steps') + ' overdue.'];\n // One list, overdue first: \"what's due this week\" and \"what's overdue\" are both answered from it.\n var due = overdue.concat(soon);\n parts.push(\n due.length\n ? 'Open steps due within ' + withinDays + ' days, overdue first: ' + due.map(function (t) { return t.fields.hireName + ': ' + taskLine(t, nowMs); }).join(' | ') + '.'\n : 'Nothing due in the next ' + withinDays + ' days.',\n );\n active.forEach(function (h) {\n var mine = tasks.filter(function (t) { return t.fields.hireId === h.id; });\n var left = mine.filter(function (t) { return t.status !== 'done'; }).sort(byDue);\n var before = daysLeft(h.fields.startOn, nowMs) > 0 ? left.filter(function (t) { return t.fields.phase === 'before day one'; }) : [];\n parts.push(\n h.fields.name + ' (' + h.id + ', ' + (h.fields.role || 'no role') + ', ' + startText(h, nowMs) +\n (h.fields.manager ? ', manager ' + h.fields.manager : '') + (h.fields.buddy ? ', buddy ' + h.fields.buddy : '') + '): ' +\n (mine.length - left.length) + ' of ' + mine.length + ' steps done' +\n (before.length ? '; still to do before day one: ' + before.map(function (t) { return taskLine(t, nowMs); }).join('; ') : left.length ? '; next: ' + taskLine(left[0], nowMs) : '') + '.',\n );\n });\n return { active: active.length, overdue: overdue.length, dueSoon: soon.length, summary: parts.join(' ') };\n}\n// ── onboarding-rules-end ──\n\nconst hires = rosterStore(gezel.fs, 'hires.json', { stages: ['active', 'done'], idPrefix: 'h' });\nconst tasks = rosterStore(gezel.fs, 'tasks.json', { stages: ['todo', 'done'], idPrefix: 't' });\nconst now = Date.now();\nconst withinDays = typeof input.withinDays === 'number' && input.withinDays > 0 ? Math.round(input.withinDays) : 7;\nconst nameOf = (r: { fields: Record<string, unknown> }) => String(r.fields.name ?? '');\nconst titleOf = (r: { fields: Record<string, unknown> }) => String(r.fields.title ?? '');\n\nasync function resolveHire(text?: string) {\n const all = await hires.list();\n if (!text) {\n const active = all.filter((h) => h.status !== 'done');\n if (active.length === 1) return active[0]!;\n throw new Error(\"Pass 'hire' (id or name). New hires: \" + (describe(all, nameOf) || 'none yet; add one with add_hire') + '.');\n }\n let hits = matches(all.filter((h) => h.status !== 'done'), text, nameOf);\n if (!hits.length) hits = matches(all, text, nameOf);\n if (hits.length === 1) return hits[0]!;\n if (hits.length > 1) throw new Error(\"More than one hire matches '\" + text + \"': \" + describe(hits, nameOf) + '. Pass the id.');\n throw new Error(\"No new hire matches '\" + text + \"'. New hires: \" + (describe(all, nameOf) || 'none yet; add one with add_hire') + '.');\n}\n\n// A plan whose every step is checked off is finished; a new or reopened step puts it back.\nasync function settle(hireId: string): Promise<string> {\n const hire = await hires.get(hireId);\n if (!hire) return '';\n const mine = (await tasks.list()).filter((t) => t.fields.hireId === hireId);\n const left = mine.filter((t) => t.status !== 'done').length;\n if (!left && mine.length && hire.status !== 'done') {\n await hires.transition(hireId, 'done', { note: 'Every step done' });\n return ' ' + nameOf(hire) + \"'s plan is complete.\";\n }\n if (left && hire.status === 'done') await hires.transition(hireId, 'active');\n return '';\n}\n\nlet note = '';\n\nif (input.action === 'add_hire') {\n if (!input.name || !input.name.trim()) throw new Error(\"add_hire needs 'name'.\");\n const name = input.name.trim();\n const startOn = input.startOn ? parseDay(input.startOn, now, 'future') : null;\n if (input.startOn && !startOn) throw new Error(\"startOn must be a date like '2026-11-09' or a weekday like 'monday'.\");\n const fields: Record<string, unknown> = {\n ...(input.role ? { role: input.role.trim() } : {}),\n ...(startOn ? { startOn } : {}),\n ...(input.manager ? { manager: input.manager.trim() } : {}),\n ...(input.buddy ? { buddy: input.buddy.trim() } : {}),\n ...(input.note ? { notes: input.note.trim() } : {}),\n };\n const existing = (await hires.list()).find((h) => nameOf(h).toLowerCase() === name.toLowerCase());\n if (existing) {\n const updated = await hires.update(existing.id, { fields });\n // A moved start date or a named manager/buddy carries into the open standard steps.\n let moved = 0;\n for (const t of (await tasks.list()).filter((x) => x.fields.hireId === existing.id && x.status !== 'done')) {\n const patch: Record<string, unknown> = {};\n if (typeof t.fields.offset === 'number' && startOn && startOn !== existing.fields.startOn) patch.dueAt = addDays(startOn, t.fields.offset);\n if (t.fields.ownerKind && (input.manager || input.buddy)) patch.owner = ownerFor(t.fields.ownerKind, updated);\n if (Object.keys(patch).length) {\n await tasks.update(t.id, { fields: patch });\n if (patch.dueAt) moved += 1;\n }\n }\n note = 'Updated ' + name + ' (' + existing.id + ')' + (moved ? '; moved ' + moved + ' open steps to the new start date.' : '.');\n } else {\n if (!startOn) throw new Error(\"A new hire needs 'startOn', their first day (YYYY-MM-DD or a weekday).\");\n const hire = await hires.add({ status: 'active', fields: { name, role: '', ...fields } });\n for (const step of planFor(hire)) {\n await tasks.add({\n status: 'todo',\n fields: {\n hireId: hire.id,\n hireName: name,\n title: step.title,\n phase: step.phase,\n owner: step.owner,\n ownerKind: step.ownerKind,\n offset: step.offset,\n dueAt: step.dueAt,\n },\n });\n }\n note = 'Added ' + name + ' (' + hire.id + '), first day ' + dayName(startOn) + ' ' + startOn + ', with the standard ' + PLAN.length + '-step plan.';\n }\n} else if (input.action === 'add_task') {\n if (!input.title || !input.title.trim()) throw new Error(\"add_task needs 'title'.\");\n const hire = await resolveHire(input.hire);\n const phase = input.phase ? phaseOf(input.phase) : null;\n if (input.phase && !phase) throw new Error('phase must be one of ' + PHASES.join(', ') + '.');\n const dueAt = input.dueOn ? parseDay(input.dueOn, now, 'future') : null;\n if (input.dueOn && !dueAt) throw new Error(\"dueOn must be a date like '2026-11-12'.\");\n const title = input.title.trim();\n const existing = (await tasks.list()).find((t) => t.fields.hireId === hire.id && titleOf(t).toLowerCase() === title.toLowerCase());\n const usePhase = phase ?? (existing ? String(existing.fields.phase) : 'first week');\n const fields: Record<string, unknown> = {\n phase: usePhase,\n ...(input.owner ? { owner: input.owner.trim() } : {}),\n ...(input.note ? { notes: input.note.trim() } : {}),\n dueAt: dueAt ?? (existing && !phase ? existing.fields.dueAt : addDays(String(hire.fields.startOn), PHASE_OFFSET[usePhase])),\n };\n if (existing) {\n await tasks.update(existing.id, { fields });\n note = 'Updated the step ' + title + ' (' + existing.id + ') for ' + nameOf(hire) + '.';\n } else {\n const record = await tasks.add({ status: 'todo', fields: { hireId: hire.id, hireName: nameOf(hire), title, owner: '', ...fields } });\n note = 'Added ' + title + ' (' + record.id + ') to ' + nameOf(hire) + \"'s \" + usePhase + ', ' + whenText(String(record.fields.dueAt), now) + '.';\n }\n note += await settle(hire.id);\n} else if (input.action === 'complete') {\n const all = await tasks.list();\n const hire = input.hire ? await resolveHire(input.hire) : null;\n const scope = all.filter((t) => (!hire || t.fields.hireId === hire.id) && (input.reopen ? t.status === 'done' : t.status !== 'done'));\n let picked: typeof all = [];\n if (input.task) {\n for (const piece of String(input.task).split(/\\s*[,;]\\s*/).filter(Boolean)) {\n const hits = taskMatches(scope, piece);\n if (hits.length > 1) throw new Error(\"More than one step matches '\" + piece + \"': \" + hits.map((t: (typeof all)[number]) => t.id + ' ' + String(t.fields.hireName) + ': ' + titleOf(t)).join('; ') + '. Pass the id or the hire.');\n if (!hits.length) {\n const done = all.find((t) => t.id === piece.trim() || (!input.reopen && t.status === 'done' && titleOf(t).toLowerCase() === piece.trim().toLowerCase()));\n if (done && !input.reopen) continue;\n throw new Error(\"No open step matches '\" + piece + \"'\" + (hire ? ' for ' + nameOf(hire) : '') + '. Open steps: ' + (scope.slice(0, 12).map((t) => t.id + ' ' + String(t.fields.hireName) + ': ' + titleOf(t)).join('; ') || 'none') + '.');\n }\n if (!picked.some((t) => t.id === hits[0].id)) picked.push(hits[0]);\n }\n } else if (input.phase) {\n const phase = phaseOf(input.phase);\n if (!phase) throw new Error('phase must be one of ' + PHASES.join(', ') + '.');\n if (!hire) throw new Error(\"Pass 'hire' with 'phase'.\");\n picked = scope.filter((t) => t.fields.phase === phase);\n } else {\n throw new Error(\"complete needs 'task' (an id or words from the step) or 'hire' with 'phase'.\");\n }\n for (const t of picked) {\n if (input.reopen) await tasks.transition(t.id, 'todo', input.note ? { note: input.note } : {});\n else {\n await tasks.update(t.id, { fields: { doneAt: localDay(now), ...(input.note ? { notes: input.note.trim() } : {}) } });\n await tasks.transition(t.id, 'done', input.note ? { note: input.note } : {});\n }\n }\n const hireIds = Array.from(new Set(picked.map((t) => String(t.fields.hireId))));\n note = picked.length\n ? (input.reopen ? 'Reopened ' : 'Checked off ') + picked.map((t) => String(t.fields.hireName) + ': ' + titleOf(t)).join('; ') + '.'\n : 'Nothing left to check off there.';\n for (const id of hireIds) note += await settle(id);\n} else if (input.action !== 'status' && input.action !== 'list') {\n throw new Error(\"Unknown action '\" + input.action + \"'. Use status, add_hire, add_task, complete, or list.\");\n}\n\nconst allHires = await hires.list();\nconst allTasks = await tasks.list();\nconst view = picture(allHires, allTasks, now, withinDays);\nlet summary = (note ? note + ' ' : '') + view.summary;\nif (input.action === 'list') {\n const wanted = input.hire ? [await resolveHire(input.hire)] : allHires;\n summary =\n wanted\n .map((h) => {\n const mine = allTasks.filter((t) => t.fields.hireId === h.id).sort((a, b) => String(a.fields.dueAt).localeCompare(String(b.fields.dueAt)));\n return (\n nameOf(h) + ' (' + h.id + ', ' + String(h.fields.role || 'no role') + ', ' + startText(h, now) + (h.status === 'done' ? ', plan complete' : '') + '):\\n' +\n mine.map((t) => '[' + t.status + '] ' + String(t.fields.phase) + ': ' + taskLine(t, now)).join('\\n')\n );\n })\n .join('\\n\\n') || 'No new hires yet.';\n}\ngezel.output({ active: view.active, overdue: view.overdue, dueSoon: view.dueSoon, summary });\n"
|
|
34
|
+
},
|
|
35
|
+
"tools": [
|
|
36
|
+
{
|
|
37
|
+
"name": "onboarding_status",
|
|
38
|
+
"description": "Every new hire's onboarding at a glance: open steps due within 7 days with overdue first, then each hire's start date, progress and what is still to do before day one, with hire and step ids. Call it first when asked what is due, what is overdue, or how someone's first weeks are going.",
|
|
39
|
+
"script": "onboarding-store",
|
|
40
|
+
"inputs": {
|
|
41
|
+
"type": "object",
|
|
42
|
+
"properties": {
|
|
43
|
+
"withinDays": {
|
|
44
|
+
"type": "number"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"bind": {
|
|
49
|
+
"action": "status"
|
|
50
|
+
},
|
|
51
|
+
"state": true
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"name": "add_hire",
|
|
55
|
+
"description": "Add a new hire with the standard plan (accounts, equipment and paperwork before day one, a first-day welcome, a first week with a buddy, and 30, 60 and 90-day check-ins), or update one: full name, role, first day (YYYY-MM-DD or a weekday like 'monday'), manager and buddy. An existing name is updated, never duplicated, and a new start date moves the open steps. Call it as soon as a new hire is mentioned.",
|
|
56
|
+
"script": "onboarding-store",
|
|
57
|
+
"inputs": {
|
|
58
|
+
"type": "object",
|
|
59
|
+
"properties": {
|
|
60
|
+
"name": {
|
|
61
|
+
"type": "string"
|
|
62
|
+
},
|
|
63
|
+
"role": {
|
|
64
|
+
"type": "string"
|
|
65
|
+
},
|
|
66
|
+
"startOn": {
|
|
67
|
+
"type": "string"
|
|
68
|
+
},
|
|
69
|
+
"manager": {
|
|
70
|
+
"type": "string"
|
|
71
|
+
},
|
|
72
|
+
"buddy": {
|
|
73
|
+
"type": "string"
|
|
74
|
+
},
|
|
75
|
+
"note": {
|
|
76
|
+
"type": "string"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"required": [
|
|
80
|
+
"name"
|
|
81
|
+
]
|
|
82
|
+
},
|
|
83
|
+
"bind": {
|
|
84
|
+
"action": "add_hire"
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"name": "add_task",
|
|
89
|
+
"description": "Add a step to a new hire's plan: the hire, what needs doing, the phase (before day one, day one, first week, 30 days, 60 days or 90 days), who owns it, and a due date if one was given. An existing title is updated, never duplicated. Call it as soon as the person asks.",
|
|
90
|
+
"script": "onboarding-store",
|
|
91
|
+
"inputs": {
|
|
92
|
+
"type": "object",
|
|
93
|
+
"properties": {
|
|
94
|
+
"hire": {
|
|
95
|
+
"type": "string"
|
|
96
|
+
},
|
|
97
|
+
"title": {
|
|
98
|
+
"type": "string"
|
|
99
|
+
},
|
|
100
|
+
"phase": {
|
|
101
|
+
"type": "string",
|
|
102
|
+
"enum": [
|
|
103
|
+
"before day one",
|
|
104
|
+
"day one",
|
|
105
|
+
"first week",
|
|
106
|
+
"30 days",
|
|
107
|
+
"60 days",
|
|
108
|
+
"90 days"
|
|
109
|
+
]
|
|
110
|
+
},
|
|
111
|
+
"owner": {
|
|
112
|
+
"type": "string"
|
|
113
|
+
},
|
|
114
|
+
"dueOn": {
|
|
115
|
+
"type": "string"
|
|
116
|
+
},
|
|
117
|
+
"note": {
|
|
118
|
+
"type": "string"
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
"required": [
|
|
122
|
+
"title"
|
|
123
|
+
]
|
|
124
|
+
},
|
|
125
|
+
"bind": {
|
|
126
|
+
"action": "add_task"
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"name": "complete_task",
|
|
131
|
+
"description": "Check off steps the moment the person says they are done: task (a step's id or words from its title, several separated by commas) and the hire's name, or the hire with a phase to check off everything in it. Call it before you reply.",
|
|
132
|
+
"script": "onboarding-store",
|
|
133
|
+
"inputs": {
|
|
134
|
+
"type": "object",
|
|
135
|
+
"properties": {
|
|
136
|
+
"hire": {
|
|
137
|
+
"type": "string"
|
|
138
|
+
},
|
|
139
|
+
"task": {
|
|
140
|
+
"type": "string"
|
|
141
|
+
},
|
|
142
|
+
"phase": {
|
|
143
|
+
"type": "string",
|
|
144
|
+
"enum": [
|
|
145
|
+
"before day one",
|
|
146
|
+
"day one",
|
|
147
|
+
"first week",
|
|
148
|
+
"30 days",
|
|
149
|
+
"60 days",
|
|
150
|
+
"90 days"
|
|
151
|
+
]
|
|
152
|
+
},
|
|
153
|
+
"note": {
|
|
154
|
+
"type": "string"
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
"bind": {
|
|
159
|
+
"action": "complete"
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"name": "list_plan",
|
|
164
|
+
"description": "A whole plan, or every plan: each step with its phase, owner, due date and whether it is done.",
|
|
165
|
+
"script": "onboarding-store",
|
|
166
|
+
"inputs": {
|
|
167
|
+
"type": "object",
|
|
168
|
+
"properties": {
|
|
169
|
+
"hire": {
|
|
170
|
+
"type": "string"
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
"bind": {
|
|
175
|
+
"action": "list"
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"name": "page_add_hire",
|
|
180
|
+
"description": "Add or update a new hire with the standard plan.",
|
|
181
|
+
"script": "onboarding-store",
|
|
182
|
+
"inputs": {
|
|
183
|
+
"type": "object",
|
|
184
|
+
"properties": {
|
|
185
|
+
"name": {
|
|
186
|
+
"type": "string"
|
|
187
|
+
},
|
|
188
|
+
"role": {
|
|
189
|
+
"type": "string"
|
|
190
|
+
},
|
|
191
|
+
"startOn": {
|
|
192
|
+
"type": "string"
|
|
193
|
+
},
|
|
194
|
+
"manager": {
|
|
195
|
+
"type": "string"
|
|
196
|
+
},
|
|
197
|
+
"buddy": {
|
|
198
|
+
"type": "string"
|
|
199
|
+
},
|
|
200
|
+
"note": {
|
|
201
|
+
"type": "string"
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
"required": [
|
|
205
|
+
"name"
|
|
206
|
+
]
|
|
207
|
+
},
|
|
208
|
+
"bind": {
|
|
209
|
+
"action": "add_hire"
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"name": "page_complete_task",
|
|
214
|
+
"description": "Check off or reopen a step.",
|
|
215
|
+
"script": "onboarding-store",
|
|
216
|
+
"inputs": {
|
|
217
|
+
"type": "object",
|
|
218
|
+
"properties": {
|
|
219
|
+
"hire": {
|
|
220
|
+
"type": "string"
|
|
221
|
+
},
|
|
222
|
+
"task": {
|
|
223
|
+
"type": "string"
|
|
224
|
+
},
|
|
225
|
+
"phase": {
|
|
226
|
+
"type": "string",
|
|
227
|
+
"enum": [
|
|
228
|
+
"before day one",
|
|
229
|
+
"day one",
|
|
230
|
+
"first week",
|
|
231
|
+
"30 days",
|
|
232
|
+
"60 days",
|
|
233
|
+
"90 days"
|
|
234
|
+
]
|
|
235
|
+
},
|
|
236
|
+
"note": {
|
|
237
|
+
"type": "string"
|
|
238
|
+
},
|
|
239
|
+
"reopen": {
|
|
240
|
+
"type": "boolean"
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
"bind": {
|
|
245
|
+
"action": "complete"
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
"name": "page_add_task",
|
|
250
|
+
"description": "Add a step to a plan.",
|
|
251
|
+
"script": "onboarding-store",
|
|
252
|
+
"inputs": {
|
|
253
|
+
"type": "object",
|
|
254
|
+
"properties": {
|
|
255
|
+
"hire": {
|
|
256
|
+
"type": "string"
|
|
257
|
+
},
|
|
258
|
+
"title": {
|
|
259
|
+
"type": "string"
|
|
260
|
+
},
|
|
261
|
+
"phase": {
|
|
262
|
+
"type": "string",
|
|
263
|
+
"enum": [
|
|
264
|
+
"before day one",
|
|
265
|
+
"day one",
|
|
266
|
+
"first week",
|
|
267
|
+
"30 days",
|
|
268
|
+
"60 days",
|
|
269
|
+
"90 days"
|
|
270
|
+
]
|
|
271
|
+
},
|
|
272
|
+
"owner": {
|
|
273
|
+
"type": "string"
|
|
274
|
+
},
|
|
275
|
+
"dueOn": {
|
|
276
|
+
"type": "string"
|
|
277
|
+
},
|
|
278
|
+
"note": {
|
|
279
|
+
"type": "string"
|
|
280
|
+
}
|
|
281
|
+
},
|
|
282
|
+
"required": [
|
|
283
|
+
"title"
|
|
284
|
+
]
|
|
285
|
+
},
|
|
286
|
+
"bind": {
|
|
287
|
+
"action": "add_task"
|
|
288
|
+
},
|
|
289
|
+
"reaction": {
|
|
290
|
+
"gezel": "training-coordinator",
|
|
291
|
+
"hideSeed": true,
|
|
292
|
+
"prompt": "The person just added a step to a new hire's plan on the onboarding page. The plans now read (the first sentence is what changed):\n{{output.summary}}\nIn two short sentences, confirm the step with its owner and due date, and name that hire's next open step. Do not call tools."
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
],
|
|
296
|
+
"craftbooks": [
|
|
297
|
+
"onboarding-checklist",
|
|
298
|
+
"handbook-section"
|
|
299
|
+
],
|
|
300
|
+
"schedules": [],
|
|
301
|
+
"pages": {
|
|
302
|
+
"entry": "plans/index.html",
|
|
303
|
+
"api": 1,
|
|
304
|
+
"reads": [
|
|
305
|
+
{
|
|
306
|
+
"source": "workspace",
|
|
307
|
+
"path": "hires.json"
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
"source": "workspace",
|
|
311
|
+
"path": "tasks.json"
|
|
312
|
+
}
|
|
313
|
+
],
|
|
314
|
+
"tools": [
|
|
315
|
+
"page_add_hire",
|
|
316
|
+
"page_complete_task",
|
|
317
|
+
"page_add_task"
|
|
318
|
+
]
|
|
319
|
+
},
|
|
320
|
+
"workspaceSeed": [
|
|
321
|
+
"hires.json",
|
|
322
|
+
"tasks.json"
|
|
323
|
+
],
|
|
324
|
+
"minGezelVersion": "1.26280"
|
|
325
|
+
}
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
// App-owned composition; platform components come from the Gezel host.
|
|
2
|
+
(function(){
|
|
3
|
+
'use strict';
|
|
4
|
+
var config={
|
|
5
|
+
"title": "At the onboarding desk",
|
|
6
|
+
"description": "Add a new hire, check off a step, or add something to their plan.",
|
|
7
|
+
"load": "loadPlans",
|
|
8
|
+
"tabs": [
|
|
9
|
+
{
|
|
10
|
+
"id": "home",
|
|
11
|
+
"label": "Home",
|
|
12
|
+
"sections": [
|
|
13
|
+
".tiles",
|
|
14
|
+
"#due-section"
|
|
15
|
+
],
|
|
16
|
+
"actions": [
|
|
17
|
+
"add_hire",
|
|
18
|
+
"add_task"
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"id": "hires",
|
|
23
|
+
"label": "New hires",
|
|
24
|
+
"sections": [
|
|
25
|
+
"#plans-section"
|
|
26
|
+
],
|
|
27
|
+
"actions": [
|
|
28
|
+
"add_hire",
|
|
29
|
+
"add_task"
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"filter": {
|
|
34
|
+
"container": "#plans",
|
|
35
|
+
"selector": ".plan",
|
|
36
|
+
"label": "Find a new hire",
|
|
37
|
+
"placeholder": "Name or role"
|
|
38
|
+
},
|
|
39
|
+
"placeholder": "Who is starting, and when?",
|
|
40
|
+
"actions": [
|
|
41
|
+
{
|
|
42
|
+
"tool": "add_hire",
|
|
43
|
+
"pageTool": "page_add_hire",
|
|
44
|
+
"title": "New hire details",
|
|
45
|
+
"fields": [
|
|
46
|
+
{
|
|
47
|
+
"name": "name",
|
|
48
|
+
"label": "Full name",
|
|
49
|
+
"required": true,
|
|
50
|
+
"placeholder": "Mira Okafor"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"name": "role",
|
|
54
|
+
"label": "Role",
|
|
55
|
+
"required": true,
|
|
56
|
+
"placeholder": "Barista"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"name": "startOn",
|
|
60
|
+
"label": "First day",
|
|
61
|
+
"type": "date",
|
|
62
|
+
"required": true
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"name": "manager",
|
|
66
|
+
"label": "Manager"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"name": "buddy",
|
|
70
|
+
"label": "First-week buddy"
|
|
71
|
+
}
|
|
72
|
+
],
|
|
73
|
+
"buttonLabel": "Add a new hire",
|
|
74
|
+
"description": "A name already here is updated, and a new first day moves their open steps."
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"tool": "complete_task",
|
|
78
|
+
"pageTool": "page_complete_task",
|
|
79
|
+
"title": "Check off a step",
|
|
80
|
+
"submitLabel": "Check off",
|
|
81
|
+
"fields": [
|
|
82
|
+
{
|
|
83
|
+
"name": "task",
|
|
84
|
+
"label": "Step",
|
|
85
|
+
"required": true,
|
|
86
|
+
"options": [],
|
|
87
|
+
"records": {
|
|
88
|
+
"path": "tasks.json",
|
|
89
|
+
"list": "records",
|
|
90
|
+
"labelFields": [
|
|
91
|
+
"fields.hireName",
|
|
92
|
+
"fields.title"
|
|
93
|
+
],
|
|
94
|
+
"where": {
|
|
95
|
+
"field": "status",
|
|
96
|
+
"not": [
|
|
97
|
+
"done"
|
|
98
|
+
]
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"name": "note",
|
|
104
|
+
"label": "Note"
|
|
105
|
+
}
|
|
106
|
+
],
|
|
107
|
+
"rowOnly": true
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"tool": "add_task",
|
|
111
|
+
"pageTool": "page_add_task",
|
|
112
|
+
"title": "Add a step",
|
|
113
|
+
"fields": [
|
|
114
|
+
{
|
|
115
|
+
"name": "hire",
|
|
116
|
+
"label": "New hire",
|
|
117
|
+
"required": true,
|
|
118
|
+
"options": [],
|
|
119
|
+
"records": {
|
|
120
|
+
"path": "hires.json",
|
|
121
|
+
"list": "records",
|
|
122
|
+
"labelFields": [
|
|
123
|
+
"fields.name",
|
|
124
|
+
"fields.role"
|
|
125
|
+
],
|
|
126
|
+
"where": {
|
|
127
|
+
"field": "status",
|
|
128
|
+
"not": [
|
|
129
|
+
"done"
|
|
130
|
+
]
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"name": "title",
|
|
136
|
+
"label": "What needs doing",
|
|
137
|
+
"required": true,
|
|
138
|
+
"placeholder": "Latte art session with Hana"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"name": "phase",
|
|
142
|
+
"label": "When",
|
|
143
|
+
"required": true,
|
|
144
|
+
"options": [
|
|
145
|
+
"before day one",
|
|
146
|
+
"day one",
|
|
147
|
+
"first week",
|
|
148
|
+
"30 days",
|
|
149
|
+
"60 days",
|
|
150
|
+
"90 days"
|
|
151
|
+
]
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"name": "owner",
|
|
155
|
+
"label": "Owner"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"name": "dueOn",
|
|
159
|
+
"label": "Due",
|
|
160
|
+
"type": "date"
|
|
161
|
+
}
|
|
162
|
+
],
|
|
163
|
+
"submitLabel": "Add step"
|
|
164
|
+
}
|
|
165
|
+
]
|
|
166
|
+
};
|
|
167
|
+
// Shared app composition v2 (the Gezel app UX guide). On hosts with page components version 2,
|
|
168
|
+
// actions are keys that open dialogs, settings are inline forms, and config.tabs groups the page into
|
|
169
|
+
// Home, noun and Settings tabs. Older hosts keep the expandable forms and an "On this page" list.
|
|
170
|
+
function boot(){
|
|
171
|
+
var api=window.gezel,kit=api&&api.ui.components,main=document.querySelector('main');if(!api||!main)return;
|
|
172
|
+
var handles=[],stops=[],stopped=false,forms=[],revision=0,byTool={};
|
|
173
|
+
// An action's key is its id when two forms share one tool, otherwise its tool.
|
|
174
|
+
function keyOf(action){return action.id||action.tool;}
|
|
175
|
+
(config.actions||[]).forEach(function(action){byTool[keyOf(action)]=action;});
|
|
176
|
+
var problem=document.createElement('p');problem.className='app-problem';problem.hidden=true;problem.setAttribute('role','status');main.prepend(problem);
|
|
177
|
+
function error(e){problem.hidden=false;problem.textContent='Could not refresh this view. '+(e.message||'Try again.');}
|
|
178
|
+
if(!kit||!kit.appLayout){problem.hidden=false;problem.textContent='Update Gezel to use the fullscreen conversation and page controls.';return;}
|
|
179
|
+
var layout=kit.appLayout(main,{title:config.title,description:config.description,chat:config.chat===false?false:{lockRecipient:!config.crew,showAddress:!!config.crew,showThreads:false,placeholder:config.placeholder||'Talk with your companion…',attachments:!!config.attachments,dictation:!!config.dictation}});handles.push(layout);
|
|
180
|
+
var modern=kit.version>=2&&typeof kit.tabs==='function';
|
|
181
|
+
document.documentElement.toggleAttribute('data-app-legacy',!modern);
|
|
182
|
+
function valueAt(object,path){return path.split('.').reduce(function(value,key){return value==null?undefined:value[key];},object);}
|
|
183
|
+
// People read dates, not ISO strings: "2026-11-12" becomes "Thu, Nov 12" in choice labels.
|
|
184
|
+
function shown(value){if(typeof value!=='string'||!/^\d{4}-\d{2}-\d{2}$/.test(value))return value;var date=new Date(value+'T12:00:00');return isFinite(date)?date.toLocaleDateString(undefined,{weekday:'short',month:'short',day:'numeric'}):value;}
|
|
185
|
+
// A choice list may leave out finished records: {field:'status', not:['done']} or {field, in:[...]}.
|
|
186
|
+
function included(record,where){if(!where)return true;var value=valueAt(record,where.field);if(where.in&&where.in.indexOf(value)<0)return false;if(where.not&&where.not.indexOf(value)>=0)return false;return true;}
|
|
187
|
+
function mountForm(mount,action,options){
|
|
188
|
+
var fields=action.fields.map(function(f){return Object.assign({},f);});
|
|
189
|
+
var form={action:action,fields:fields,last:'',inline:!!options&&options.presentation==='inline'};
|
|
190
|
+
form.handle=kit.actionForm(mount,Object.assign({title:action.title,description:action.description,buttonLabel:action.buttonLabel,successMessage:action.successMessage,tool:action.pageTool,fields:fields,mapInput:action.mapInput,submitLabel:action.submitLabel||'Save',onSaved:async function(){window.dispatchEvent(new Event('gezel-app-data-changed'));if(form.inline)setTimeout(function(){void refreshCurrent(form);},0);}},options||{}));
|
|
191
|
+
handles.push(form.handle);forms.push(form);return form;
|
|
192
|
+
}
|
|
193
|
+
function recordPaths(){return Array.from(new Set(forms.flatMap(function(form){return form.fields.filter(function(f){return f.records;}).map(function(f){return f.records.path;});})));}
|
|
194
|
+
async function refreshChoices(){var current=++revision;try{var paths=recordPaths();var docs=await Promise.all(paths.map(function(path){return api.data.read(path);}));if(stopped||revision!==current)return;forms.forEach(function(form){form.fields.forEach(function(field){if(!field.records)return;var spec=field.records,doc=docs[paths.indexOf(spec.path)],records=(valueAt(doc,spec.list)||[]).filter(function(record){return included(record,spec.where);});field.options=records.map(function(record){return {value:record.id,label:spec.labelFields.map(function(path){return shown(valueAt(record,path));}).filter(Boolean).join(' · ')};});});var next=JSON.stringify(form.fields);if(next!==form.last){form.last=next;form.handle.update({fields:form.fields});}});}catch(e){error(e);}}
|
|
195
|
+
// A settings form shows what is saved now: action.current = {path, fields: {formField: 'data.path'}}. A form being edited is left alone.
|
|
196
|
+
// The form just saved refreshes after its save settles (it ignores resets while busy), even though focus is still on its Save key.
|
|
197
|
+
async function refreshCurrent(saved){try{await Promise.all(forms.filter(function(form){return form.inline&&form.action.current&&form.handle.reset&&(!saved||form===saved);}).map(async function(form){var spec=form.action.current,doc=await api.data.read(spec.path);if(stopped||form!==saved&&form.handle.element.matches(':focus-within'))return;var values={};Object.keys(spec.fields).forEach(function(name){var value=valueAt(doc,spec.fields[name]);if(value!==undefined&&value!==null)values[name]=value;});form.handle.reset(values);}));}catch(e){error(e);}}
|
|
198
|
+
function headerEnd(){var heading=main.querySelector('h1'),sub=heading&&heading.nextElementSibling&&heading.nextElementSibling.tagName==='P'?heading.nextElementSibling:null;return config.headerEnd?main.querySelector(config.headerEnd):sub||heading;}
|
|
199
|
+
function insertAfterHeader(node){var anchor=headerEnd();if(anchor)anchor.after(node);else main.prepend(node);}
|
|
200
|
+
// Keys for the given tools, the first (or the named one) drawn as the view's one primary.
|
|
201
|
+
function actionBar(tools,primary){var row=document.createElement('div');row.className='app-actionbar';tools=(tools||[]).filter(function(tool){return byTool[tool];});if(primary===undefined)primary=tools[0];tools.forEach(function(tool){var mount=document.createElement('div');row.append(mount);mountForm(mount,byTool[tool],{presentation:'dialog',primary:tool===primary});});row.hidden=!tools.length;return row;}
|
|
202
|
+
if(!modern)buildLegacy();else if(config.tabs)buildTabs();else insertAfterHeader(actionBar(config.bar||(config.actions||[]).filter(function(action){return !action.rowOnly;}).map(keyOf),config.primary));
|
|
203
|
+
if(modern)buildRowDialogs();
|
|
204
|
+
void refreshChoices();void refreshCurrent();
|
|
205
|
+
// Pages announce their own edits; a demo's watches fire only for the sample conversation, so listen as well.
|
|
206
|
+
function dataChanged(){void refreshChoices();void refreshCurrent();}
|
|
207
|
+
window.addEventListener('gezel-app-data-changed',dataChanged);stops.push(function(){window.removeEventListener('gezel-app-data-changed',dataChanged);});
|
|
208
|
+
recordPaths().forEach(function(path){stops.push(api.data.watch(path,refreshChoices));});
|
|
209
|
+
Array.from(new Set(forms.filter(function(form){return form.inline&&form.action.current;}).map(function(form){return form.action.current.path;}))).forEach(function(path){stops.push(api.data.watch(path,function(){void refreshCurrent();}));});
|
|
210
|
+
// config.filter: {container, selector, label, placeholder?, minItems?}, or the older [container, selector, label].
|
|
211
|
+
var filter=Array.isArray(config.filter)?{container:config.filter[0],selector:config.filter[1],label:config.filter[2]}:config.filter;
|
|
212
|
+
if(filter&&kit.collectionFilter){var container=document.querySelector(filter.container);if(container){var search=document.createElement('div');search.className='app-search';container.before(search);handles.push(kit.collectionFilter(search,{container:container,selector:filter.selector,label:filter.label,placeholder:filter.placeholder,minItems:filter.minItems===undefined?8:filter.minItems}));}}
|
|
213
|
+
function buildTabs(){
|
|
214
|
+
var bar=document.createElement('div'),last=bar,specs=[];bar.className='app-tabs';insertAfterHeader(bar);
|
|
215
|
+
config.tabs.forEach(function(tab){
|
|
216
|
+
var panel=document.createElement('div');panel.className='app-panel';panel.id='app-panel-'+tab.id;last.after(panel);last=panel;
|
|
217
|
+
if((tab.actions||[]).length)panel.append(actionBar(tab.actions,tab.primary));
|
|
218
|
+
var settings=(tab.settings||[]).filter(function(tool){return byTool[tool];});
|
|
219
|
+
if(settings.length){var box=document.createElement('div');box.className='app-settings';panel.append(box);settings.forEach(function(tool){var mount=document.createElement('div');box.append(mount);mountForm(mount,byTool[tool],{presentation:'inline',clearOnSave:false,submitLabel:byTool[tool].submitLabel||'Save changes'});});}
|
|
220
|
+
(tab.sections||[]).forEach(function(selector){main.querySelectorAll(selector).forEach(function(node){if(!node.closest('.app-panel'))panel.append(node);});});
|
|
221
|
+
specs.push({id:tab.id,label:tab.label,panel:panel,count:tab.badge});
|
|
222
|
+
});
|
|
223
|
+
var tabs=kit.tabs(bar,{label:config.tabsLabel||'App sections',tabs:specs.map(function(spec){return {id:spec.id,label:spec.label,panel:spec.panel};})});handles.push(tabs);
|
|
224
|
+
// A tab's badge mirrors a count the page already shows (tab.badge is that element's selector), so the two never disagree.
|
|
225
|
+
var shown='';
|
|
226
|
+
function badges(){var next=specs.map(function(spec){var node=spec.count?document.querySelector(spec.count):null,text=node?node.textContent.trim():'';return {id:spec.id,label:spec.label,panel:spec.panel,badge:/^[1-9][0-9]*$/.test(text)?text:''};}),key=next.map(function(tab){return tab.badge;}).join('|');if(key!==shown){shown=key;tabs.update({tabs:next});}}
|
|
227
|
+
if(specs.some(function(spec){return spec.count;})){var observer=new MutationObserver(badges);observer.observe(main,{subtree:true,childList:true,characterData:true});stops.push(function(){observer.disconnect();});badges();}
|
|
228
|
+
window.appTabs={select:function(id){tabs.select(id);}};
|
|
229
|
+
}
|
|
230
|
+
// Any action can open from a record: <button data-app-action="tool" data-app-values='{"id":"…"}'>. These dialogs sit
|
|
231
|
+
// outside the tab panels, so a hidden tab never hides one.
|
|
232
|
+
function buildRowDialogs(){
|
|
233
|
+
var box=document.createElement('div'),openers={};box.className='app-dialogs';main.append(box);
|
|
234
|
+
(config.actions||[]).forEach(function(action){var mount=document.createElement('div');box.append(mount);openers[keyOf(action)]=mountForm(mount,action,{presentation:'dialog',trigger:false});});
|
|
235
|
+
main.addEventListener('click',function(event){var target=event.target.closest&&event.target.closest('[data-app-action]');var form=target&&openers[target.getAttribute('data-app-action')];if(!form)return;event.preventDefault();var values={};try{values=JSON.parse(target.getAttribute('data-app-values')||'{}');}catch(_){}form.handle.open(values);});
|
|
236
|
+
}
|
|
237
|
+
function buildLegacy(){
|
|
238
|
+
var actions=document.createElement('div');actions.className='app-actions';actions.hidden=!(config.actions||[]).length;
|
|
239
|
+
var anchor=main.querySelector('h1');if(anchor){var after=anchor.nextElementSibling;after?after.after(actions):anchor.after(actions);}else main.prepend(actions);
|
|
240
|
+
(config.actions||[]).forEach(function(action){var mount=document.createElement('div');actions.append(mount);mountForm(mount,action);});
|
|
241
|
+
var skip='dialog,[role=dialog]'+(config.navExclude?','+config.navExclude:'');
|
|
242
|
+
var headings=Array.from(main.querySelectorAll('h2')).filter(function(h){return h.textContent.trim()&&!h.closest(skip);});
|
|
243
|
+
if(headings.length>1&&headings.length<10){var nav=document.createElement('nav');nav.className='app-section-nav';nav.setAttribute('aria-label','On this page');headings.forEach(function(h,index){if(!h.id)h.id='app-section-'+index;var id=h.id,label=Array.from(h.childNodes).filter(function(n){return n.nodeType===3;}).map(function(n){return n.data;}).join('').trim()||h.textContent.trim(),link=document.createElement('a');link.href='#'+id;link.textContent=label;link.onclick=function(event){var target=document.getElementById(id);if(target){event.preventDefault();target.scrollIntoView({block:'start'});}};nav.append(link);});actions.before(nav);}
|
|
244
|
+
}
|
|
245
|
+
window.addEventListener('pagehide',function(){stopped=true;revision++;stops.forEach(function(stop){stop();});handles.reverse().forEach(function(handle){handle.destroy();});},{once:true});
|
|
246
|
+
}
|
|
247
|
+
if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',boot,{once:true});else boot();
|
|
248
|
+
})();
|