@uidu/skills 0.6.0 → 0.6.2
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/package.json +2 -2
- package/skills/uidu/SKILL.md +104 -18
- package/skills/uidu/metadata.json +1 -1
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uidu/skills",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"description": "Agent skills for the uidu SDK — installable via the open agent skills ecosystem (skills.sh).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "uidu",
|
|
7
7
|
"repository": "https://github.com/uidu-org/api.js/tree/main/packages/skills",
|
|
8
|
-
"homepage": "https://
|
|
8
|
+
"homepage": "https://developers.uidu.org",
|
|
9
9
|
"type": "module",
|
|
10
10
|
"files": [
|
|
11
11
|
"skills",
|
package/skills/uidu/SKILL.md
CHANGED
|
@@ -72,11 +72,51 @@ uidu workspace credentials --json # api key + secret
|
|
|
72
72
|
uidu create my-app -t events # delegates to create-uidu-app
|
|
73
73
|
```
|
|
74
74
|
|
|
75
|
-
Entities
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
75
|
+
Entities and the verbs each supports (generated from the CLI's registry — a verb marked `—`
|
|
76
|
+
fails with `does not support <verb>`):
|
|
77
|
+
|
|
78
|
+
<!-- BEGIN sdk:cli-resources — generated by scripts/sdk-manifest.mjs, do not edit -->
|
|
79
|
+
|
|
80
|
+
| Entity | list | get | create | update | delete |
|
|
81
|
+
| --------------------- | :--: | :-: | :----: | :----: | :----: |
|
|
82
|
+
| `events` | ✓ | ✓ | ✓ | ✓ | — |
|
|
83
|
+
| `attendances` | — | — | ✓ | — | — |
|
|
84
|
+
| `stories` | ✓ | ✓ | ✓ | ✓ | — |
|
|
85
|
+
| `donations` | ✓ | ✓ | ✓ | ✓ | ✓ |
|
|
86
|
+
| `courses` | ✓ | ✓ | ✓ | ✓ | ✓ |
|
|
87
|
+
| `forms` | ✓ | ✓ | ✓ | ✓ | ✓ |
|
|
88
|
+
| `contacts` | ✓ | ✓ | ✓ | — | ✓ |
|
|
89
|
+
| `deals` | ✓ | ✓ | ✓ | ✓ | — |
|
|
90
|
+
| `goals` | ✓ | ✓ | — | ✓ | — |
|
|
91
|
+
| `timeframes` | ✓ | — | — | — | — |
|
|
92
|
+
| `employees` | ✓ | — | ✓ | ✓ | — |
|
|
93
|
+
| `employments` | — | — | ✓ | ✓ | ✓ |
|
|
94
|
+
| `offices` | ✓ | — | — | — | — |
|
|
95
|
+
| `roles` | ✓ | — | — | — | — |
|
|
96
|
+
| `ccnls` | ✓ | — | ✓ | — | — |
|
|
97
|
+
| `bookings` | ✓ | ✓ | — | — | — |
|
|
98
|
+
| `calls` | ✓ | ✓ | — | — | — |
|
|
99
|
+
| `jobs` | ✓ | ✓ | — | — | — |
|
|
100
|
+
| `applications` | ✓ | — | ✓ | — | — |
|
|
101
|
+
| `campaigns` | ✓ | ✓ | — | — | — |
|
|
102
|
+
| `kb-collections` | ✓ | ✓ | ✓ | ✓ | ✓ |
|
|
103
|
+
| `kb-articles` | ✓ | ✓ | ✓ | ✓ | ✓ |
|
|
104
|
+
| `channel` | ✓ | ✓ | ✓ | ✓ | ✓ |
|
|
105
|
+
| `time-clocks` | — | — | ✓ | — | — |
|
|
106
|
+
| `compensations` | — | — | ✓ | ✓ | ✓ |
|
|
107
|
+
| `tasks` | — | — | ✓ | ✓ | ✓ |
|
|
108
|
+
| `benefits` | — | — | ✓ | — | — |
|
|
109
|
+
| `benefit-enrollments` | — | — | ✓ | — | — |
|
|
110
|
+
| `notes` | — | — | ✓ | ✓ | ✓ |
|
|
111
|
+
| `projects` | ✓ | — | — | — | — |
|
|
112
|
+
| `sites` | — | — | ✓ | — | — |
|
|
113
|
+
| `spaces` | — | — | ✓ | ✓ | ✓ |
|
|
114
|
+
|
|
115
|
+
<!-- END sdk:cli-resources -->
|
|
116
|
+
|
|
117
|
+
Anything the backend exposes as a tool-flagged action but the CLI has no noun for yet:
|
|
118
|
+
`uidu tools call <ActionKey> --attributes '<json>'` (associations as GlobalIDs). Config resolves
|
|
119
|
+
**flags → env (`UIDU_*`) → `~/.uidu/config.json`** (written by `uidu login`).
|
|
80
120
|
|
|
81
121
|
## Who the app acts for — one rule
|
|
82
122
|
|
|
@@ -91,7 +131,10 @@ What changes the code is **who the request acts for**:
|
|
|
91
131
|
|
|
92
132
|
The write functions live in `@uidu/client`, so anything the CLI provisions you can also do
|
|
93
133
|
from a Next.js server action / route handler / RSC. **Never put the account Bearer token in a
|
|
94
|
-
browser client component.**
|
|
134
|
+
browser client component.** That covers the visitor-facing writes too — a form response, a
|
|
135
|
+
donation, an RSVP, a job application is submitted from a **server action**, never with the
|
|
136
|
+
`publicToken` from the browser. Full explanation:
|
|
137
|
+
https://developers.uidu.org/docs/foundations/authentication. Authoring mutations return a payload with an `errors` array —
|
|
95
138
|
always check it (non-empty = validation failure).
|
|
96
139
|
|
|
97
140
|
One app can mix the rows: public pages rendered on the server with `publicToken`, and a members'
|
|
@@ -210,16 +253,16 @@ open deals" is asking about data uidu has — read it. **Create a Model only for
|
|
|
210
253
|
place for** (the app's own bookings, a checklist, a log). Copying existing records into a Model
|
|
211
254
|
gives the person a second copy that drifts from the real one.
|
|
212
255
|
|
|
213
|
-
| The workspace's…
|
|
214
|
-
|
|
|
215
|
-
| Goals / OKRs (key results = subgoals)
|
|
216
|
-
| Contacts, organisations
|
|
217
|
-
| Deals (CRM)
|
|
218
|
-
| People (employees)
|
|
219
|
-
| Tasks, notes
|
|
220
|
-
| Events, courses, bookings, calendars
|
|
221
|
-
| Forms, donations, stories, help center | see [Patterns by Scope](#patterns-by-scope)
|
|
222
|
-
| The app's own Models
|
|
256
|
+
| The workspace's… | Functions (`@uidu/client`) | Inside a custom app |
|
|
257
|
+
| -------------------------------------- | ------------------------------------------------------------------------- | -------------------------- |
|
|
258
|
+
| Goals / OKRs (key results = subgoals) | `listGoals`, `getGoal`, `listTimeframes`; `updateGoal` | **read** (no `updateGoal`) |
|
|
259
|
+
| Contacts, organisations | `listContacts`, `getContact`; `createContact` | not yet |
|
|
260
|
+
| Deals (CRM) | `listDeals`, `getDeal`; `createDeal`, `updateDeal` | not yet |
|
|
261
|
+
| People (employees) | `listEmployees`, `getEmployee`, `listOffices`, `listCircles`, `listRoles` | not yet |
|
|
262
|
+
| Tasks, notes | `updateTask`, `createTask`, `updateNote`, `createNote` (no list) | not yet |
|
|
263
|
+
| Events, courses, bookings, calendars | `listEvents`, `listCourses`, `listBookings`, `listCalendars`, … | not yet |
|
|
264
|
+
| Forms, donations, stories, help center | see [Patterns by Scope](#patterns-by-scope) | not yet |
|
|
265
|
+
| The app's own Models | `ensureModel`, `listModelItems`, `createModelItem`, … | read and write |
|
|
223
266
|
|
|
224
267
|
On a server with an account token (`apiKey`) every row works; "not yet" means a custom app's
|
|
225
268
|
session token is refused for it. **When the data exists in uidu but is not reachable from a custom
|
|
@@ -244,7 +287,7 @@ const objectives = goals.filter((g) => !g.parentId);
|
|
|
244
287
|
const behind = objectives.filter((g) => isGoalBehind(g, { tolerance: 0.1 }));
|
|
245
288
|
|
|
246
289
|
goalValue(goal, goal.targetValue); // 45 for a 45% target, 1200 for €1,200
|
|
247
|
-
goalProgress(goal);
|
|
290
|
+
goalProgress(goal); // 0.45 — done fraction
|
|
248
291
|
```
|
|
249
292
|
|
|
250
293
|
`isGoalBehind` compares progress with the share of the timeframe already gone (`goalTimeElapsed`);
|
|
@@ -656,10 +699,53 @@ offers to fill it in for you). The site templates add a configured `src/lib/uidu
|
|
|
656
699
|
server-rendered listing + dynamic detail page; `custom-app` has no token to configure and
|
|
657
700
|
reads everything in client components.
|
|
658
701
|
|
|
702
|
+
## Full API Index
|
|
703
|
+
|
|
704
|
+
Every `@uidu/client` function, by domain — generated from the source, so if a function isn't
|
|
705
|
+
here it doesn't exist (yet). Domains marked "reads need Bearer" hold private data: a public token
|
|
706
|
+
sees nothing. Per-function auth, signatures and descriptions: https://developers.uidu.org/docs/reference/client.
|
|
707
|
+
|
|
708
|
+
<!-- BEGIN sdk:domain-index — generated by scripts/sdk-manifest.mjs, do not edit -->
|
|
709
|
+
|
|
710
|
+
- **Client & utilities** — `createClient`, `fromBridge`, `normalizeFieldValueContent`, `normalizeFieldValuesAttributes`, `paginate`
|
|
711
|
+
- **CMS — Sites** · CLI: `sites` — `createSite`, `getPageBySlug`, `getSingletonBlock`, `getSite`, `getSiteByDomain`, `listSitePages`
|
|
712
|
+
- **CMS — Projects (legacy)** · CLI: `projects` — `createFieldValue`, `createPage`, `createPageBlock`, `createProject`, `getPage`, `getTemplate`, `listPages`, `listProjects`
|
|
713
|
+
- **Stories** · CLI: `stories` — `createStory`, `getStory`, `listStories`, `updateStory`
|
|
714
|
+
- **Help center** · CLI: `channel` — `createChannel`, `deleteChannel`, `getChannel`, `listChannels`, `updateChannel`
|
|
715
|
+
- **Knowledge base** · CLI: `kb-collections`, `kb-articles` — `createKbArticle`, `createKbCollection`, `deleteKbArticle`, `deleteKbCollection`, `getKbArticle`, `getKbCollection`, `listKbArticles`, `listKbCollections`, `updateKbArticle`, `updateKbCollection`
|
|
716
|
+
- **Search** — `search`
|
|
717
|
+
- **Forms** · CLI: `forms` — `createForm`, `createFormResponse`, `deleteForm`, `getForm`, `listForms`, `updateForm`, `updateFormResponse`
|
|
718
|
+
- **Events** · CLI: `events`, `attendances` — `createAttendance`, `createEvent`, `getEvent`, `listEvents`, `updateEvent`
|
|
719
|
+
- **Donations** · CLI: `donations` — `createDonation`, `createDonationCampaign`, `deleteDonationCampaign`, `getDonationCampaign`, `listDonationCampaigns`, `updateDonationCampaign`
|
|
720
|
+
- **Courses** · CLI: `courses` — `createCourse`, `deleteCourse`, `getCourse`, `getEnrollment`, `getLecture`, `listCourses`, `listEnrollments`, `listLectures`, `updateCourse`
|
|
721
|
+
- **Calls** · CLI: `calls` — `getCall`, `listCalls`
|
|
722
|
+
- **Jobs & applications** · CLI: `jobs`, `applications` — `completeApplication`, `createApplication`, `getJob`, `listApplications`, `listJobs`, `updateApplication`
|
|
723
|
+
- **Contacts & deals** · reads need Bearer · CLI: `contacts`, `deals` — `createContact`, `createDeal`, `deleteContact`, `getContact`, `getDeal`, `listContacts`, `listDeals`, `updateDeal`
|
|
724
|
+
- **Campaigns** · reads need Bearer · CLI: `campaigns` — `getCampaign`, `listCampaigns`, `listEmailCampaigns`
|
|
725
|
+
- **People (HR)** · reads need Bearer · CLI: `employees`, `employments`, `offices`, `roles`, `ccnls`, `time-clocks`, `compensations`, `benefits`, `benefit-enrollments` — `contractEvents`, `createBenefit`, `createBenefitEnrollment`, `createCcnl`, `createCompensation`, `createEmployee`, `createEmployment`, `createTimeClock`, `deleteCompensation`, `deleteEmployment`, `getEmployee`, `listCcnls`, `listCircles`, `listEmployees`, `listEmploymentHistory`, `listKinds`, `listOffices`, `listRoles`, `terminateEmployment`, `updateCompensation`, `updateEmployee`, `updateEmployment`, `weekStartFor`
|
|
726
|
+
- **Goals (OKRs)** · reads need Bearer · CLI: `goals`, `timeframes` — `getGoal`, `goalProgress`, `goalTimeElapsed`, `goalValue`, `isGoalBehind`, `listGoals`, `listTimeframes`, `toGoalRaw`, `updateGoal`
|
|
727
|
+
- **Spaces, tasks & notes** · CLI: `tasks`, `notes`, `spaces` — `createNote`, `createSpace`, `createTask`, `deleteNote`, `deleteSpace`, `deleteTask`, `updateNote`, `updateSpace`, `updateTask`
|
|
728
|
+
- **Bookings & calendars** · reads need Bearer · CLI: `bookings` — `getBooking`, `getCalendar`, `getCalendarEvent`, `listBookings`, `listCalendarEvents`, `listCalendars`
|
|
729
|
+
- **Models (custom data)** · reads need Bearer — `createField`, `createFieldOption`, `createModel`, `createModelItem`, `deleteField`, `deleteFieldOption`, `deleteFieldValue`, `deleteModelItem`, `ensureModel`, `getModel`, `getModelItem`, `listModelItems`, `listModels`, `toFieldValuesAttributes`, `updateField`, `updateFieldOption`, `updateFieldValue`, `updateModel`, `updateModelItem`
|
|
730
|
+
- **Provisioning & actions** — `createWorkspace`, `executeAction`, `generateWorkspaceApiCredentials`
|
|
731
|
+
|
|
732
|
+
<!-- END sdk:domain-index -->
|
|
733
|
+
|
|
734
|
+
`@uidu/react`:
|
|
735
|
+
|
|
736
|
+
<!-- BEGIN sdk:react-surface — generated by scripts/sdk-manifest.mjs, do not edit -->
|
|
737
|
+
|
|
738
|
+
- **Components:** `BlockRenderer` — Render exactly one block from a page's `pageBlocks` array, by shortname.; `DynamicForm` — Render a uidu form (from `getForm`, `call.form`, …) as HTML inputs and hand the parsed values to your `action`, typically a `createFormResponse` Server Action.; `PageBlocks` — Render a page's blocks in order, each with the component keyed by its shortname in `components`; blocks with no match render `fallback`, or nothing.; `RichText` — Render a Tiptap (ProseMirror) JSON document as React elements.; `UiduAppProvider` — Connects a custom app to the uidu page framing it (`@uidu/app-bridge`) and hands the tree its state through `useUiduApp`. Once connected, the children also sit inside a `<UiduProvider>` with a session-backed client, so `useUiduClient()` works as anywhere else.; `UiduProvider` — Provide a `UiduClient` to the tree, either a `client` you built or one made from `workspace`/`publicToken`/`endpoint`, plus an SWR fetcher backed by it.
|
|
739
|
+
- **Hooks:** `useFields` — Normalize a `fieldValues` array into a `{ shortname: value }` map so blocks can access their fields by name without walking the GraphQL shape.; `useQuery` — Generic client-side data-fetching hook: runs `document` against the `UiduClient` from the nearest `<UiduProvider>` via SWR, so calls are cached and deduplicated by operation name + variables.; `useUidu` — The nearest `UiduProvider`'s `{ client, endpoint }`; throws outside a provider.; `useUiduApp` — The custom app's bridge state: `connecting`, `ready` or `error`.; `useUiduClient` — The `UiduClient` from the nearest `UiduProvider`; throws outside a provider.
|
|
740
|
+
- **Utilities:** `formatSalaryRange` — Format a job's salary range (`salaryMin`/`salaryMax`) into a display string. Returns `null` when the job advertises no salary, so callers can hide the field. Handles open-ended ranges ("From …", "Up to …") and a single figure.; `getBlockShortname` — The shortname a page block is rendered by (its template block's, else its own), or null.; `toText` — Flatten any uidu field-content value into a plain string. Handles raw strings, numbers, Slate-style rich text nodes (`{ type, children }`, `{ text }`), arrays of nodes, and wrapper objects with a `value` field.
|
|
741
|
+
|
|
742
|
+
<!-- END sdk:react-surface -->
|
|
743
|
+
|
|
659
744
|
## See Also
|
|
660
745
|
|
|
661
|
-
- uidu docs: https://
|
|
746
|
+
- uidu docs: https://developers.uidu.org
|
|
662
747
|
- Source: https://github.com/uidu-org/api.js
|
|
663
748
|
- `@uidu/client`: https://github.com/uidu-org/api.js/tree/main/packages/client
|
|
664
749
|
- `@uidu/react`: https://github.com/uidu-org/api.js/tree/main/packages/react
|
|
665
750
|
- `create-uidu-app`: https://github.com/uidu-org/api.js/tree/main/packages/create-uidu-app
|
|
751
|
+
- Machine-readable manifest of the whole SDK (exports, domains, auth, CLI verbs): https://github.com/uidu-org/api.js/blob/main/docs/sdk-manifest.json
|