@arbidocs/react 0.4.2 → 0.4.4
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/README.md +24 -0
- package/dist/{chunk-3CLGHHME.js → chunk-MIJRORQL.js} +395 -313
- package/dist/chunk-MIJRORQL.js.map +1 -0
- package/dist/{chunk-OU2QLIKS.cjs → chunk-ORKGCXG3.cjs} +444 -361
- package/dist/chunk-ORKGCXG3.cjs.map +1 -0
- package/dist/index.cjs +990 -1337
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1820 -291
- package/dist/index.d.ts +1820 -291
- package/dist/index.js +743 -1123
- package/dist/index.js.map +1 -1
- package/dist/ui/index.cjs +126 -126
- package/dist/ui/index.d.cts +12 -12
- package/dist/ui/index.d.ts +12 -12
- package/dist/ui/index.js +1 -1
- package/package.json +3 -3
- package/dist/chunk-3CLGHHME.js.map +0 -1
- package/dist/chunk-OU2QLIKS.cjs.map +0 -1
package/README.md
CHANGED
|
@@ -93,6 +93,8 @@ That's it — three hooks and you have a streaming RAG chat.
|
|
|
93
93
|
|------|---------|-------------------|
|
|
94
94
|
| `useArbi()` | `Arbi` instance | Always |
|
|
95
95
|
| `useWorkspaces()` | User's workspaces | Logged in |
|
|
96
|
+
| `useArbiShellWorkspaces(options)` | Workspaces as shell/gallery view models, the active one, `open(workspace)` (select, then `onOpened`) | Logged in |
|
|
97
|
+
| `useShellWorkspaces(options)` | Same, over a list and `select` you supply (no provider needed) | Always |
|
|
96
98
|
| `useDocuments(workspaceId)` | Workspace documents | Workspace selected |
|
|
97
99
|
| `useConversations(workspaceId)` | Workspace conversations | Workspace selected |
|
|
98
100
|
| `useTags(workspaceId)` | Workspace tags | Workspace selected |
|
|
@@ -124,3 +126,25 @@ queryClient.invalidateQueries({ queryKey: arbiQueryKeys.documents(workspaceId) }
|
|
|
124
126
|
## Peer dependencies
|
|
125
127
|
|
|
126
128
|
- `react` >= 18
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
## Tasks, agents, skills, contacts and credits
|
|
132
|
+
|
|
133
|
+
Hooks for an "AI workforce" and a messages screen. Writes invalidate through `arbiQueryKeys`, so
|
|
134
|
+
`useTasks`, `useAgents`, `useConfigs` and `useDirectMessages` refresh by themselves.
|
|
135
|
+
|
|
136
|
+
```tsx
|
|
137
|
+
const create = useCreateTask() // mutateAsync(CreateTaskRequest) -> TaskResponse
|
|
138
|
+
const run = useRunTask() // approves a run parked for access (temporary grant), then runs
|
|
139
|
+
const runs = useTaskRuns(taskId) // polls while a run is in flight
|
|
140
|
+
const save = useSaveAgentConfig() // { agentExtId, sections: { Agents: { PERSONA, ... } } }
|
|
141
|
+
const grant = useGrantAgentAccess() // { agentExtId, workspaceId, mode?: { kind: 'standing' | 'temporary' } }
|
|
142
|
+
const contacts = usePendingContacts() // + useAddContacts(), useRemoveContacts()
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Form-to-request mappings (`taskComposerToCreateRequest`, `composePersona`, ...) are in
|
|
146
|
+
`@arbidocs/blocks/agents`. Usage is reported in **credits**, not dollars: use
|
|
147
|
+
`formatCredits(n)`, `creditsToUsd(n)` and the `metered` flag on `useProjectUsage` /
|
|
148
|
+
`useProjectsUsage` (`false` = this deployment does not record usage). `DirectMessages` takes
|
|
149
|
+
`listHeader`, `listLead`, `startByEmail` and `hideOwnContact`. See `docs/design/blocks-package.md`
|
|
150
|
+
("Hooks and mappings a host should not rewrite").
|