@runappsai/agent 0.1.10 → 0.1.15
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 +1 -1
- package/dist/agent-core.umd.js +90 -87
- package/dist/agent.d.ts +21 -1
- package/dist/agent.js +48 -14
- package/dist/agent.umd.js +135 -109
- package/dist/chat.d.ts +40 -1
- package/dist/chat.js +441 -26
- package/dist/compaction.d.ts +10 -0
- package/dist/dom.d.ts +28 -1
- package/dist/dom.js +38 -1
- package/dist/files-panel.js +2 -2
- package/dist/index.cjs +541 -38
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/schedule.d.ts +152 -0
- package/dist/schedule.js +505 -0
- package/dist/types.d.ts +3 -0
- package/dist/ui.cjs +1021 -20
- package/dist/ui.d.ts +1 -0
- package/docs/agent.md +3 -1
- package/docs/chat-ui.md +25 -3
- package/docs/reference.md +2 -1
- package/package.json +1 -1
package/dist/chat.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { type FileDialog } from "./dom.js";
|
|
1
2
|
import { type SelectBox } from "./select.js";
|
|
3
|
+
import { type ScheduleStore, type ScheduleLimits } from "./schedule.js";
|
|
2
4
|
import { CHAT_PALETTES, type ChatPalette, type ChatVars } from "./chat-theme.js";
|
|
3
5
|
import { Agent } from "./index.js";
|
|
4
6
|
import type { ModelProvider, RunAppsClientLike, Workspace, AgentOptions, AgentUI, RunResult } from "./index.js";
|
|
@@ -102,6 +104,16 @@ export interface ChatOptions extends Omit<AgentOptions, "workspace"> {
|
|
|
102
104
|
* text files go inline. `false` turns the feature off.
|
|
103
105
|
*/
|
|
104
106
|
attachments?: boolean;
|
|
107
|
+
/**
|
|
108
|
+
* The dialog for picking files (attach, upload, skill zips) and saving
|
|
109
|
+
* them (downloads from the Files panel, the transcript). Default: the
|
|
110
|
+
* RunApps platform's dialog when the page has it (`puter.ui.openFiles` /
|
|
111
|
+
* `saveFile`, from the shim), which offers the user's files and this
|
|
112
|
+
* device; else the browser's own chooser and downloads. An app that
|
|
113
|
+
* loads the shim on first use passes its own; `false` keeps the
|
|
114
|
+
* browser's.
|
|
115
|
+
*/
|
|
116
|
+
fileDialog?: FileDialog | false;
|
|
105
117
|
/** Where attached files are saved in the directory (default `/uploads`). */
|
|
106
118
|
uploadsDir?: string;
|
|
107
119
|
/**
|
|
@@ -112,6 +124,24 @@ export interface ChatOptions extends Omit<AgentOptions, "workspace"> {
|
|
|
112
124
|
* own; `false` hides it, `true` shows it anyway.
|
|
113
125
|
*/
|
|
114
126
|
webSearch?: boolean;
|
|
127
|
+
/**
|
|
128
|
+
* Scheduled tasks (default off): a *Scheduled* button in the header lists
|
|
129
|
+
* them (add, edit, pause, run now, delete, open a task's conversation),
|
|
130
|
+
* and the agent gets tools to list, add, change and remove them. A task
|
|
131
|
+
* is a prompt run at set times — once, every N minutes, daily at a time
|
|
132
|
+
* (on chosen weekdays), or by cron — in a conversation of its own. They
|
|
133
|
+
* run only while the app is open, each when it is due and the chat is
|
|
134
|
+
* idle (nothing running, no question open, the user not typing); one
|
|
135
|
+
* missed while the page was closed runs once on the next visit. Kept per
|
|
136
|
+
* app in localStorage unless `store` is given. `minMinutes` (default 5)
|
|
137
|
+
* is the shortest repeat, `maxTasks` (default 20) the most tasks;
|
|
138
|
+
* `tools: false` leaves the agent without the tools (the user manages
|
|
139
|
+
* them alone).
|
|
140
|
+
*/
|
|
141
|
+
schedule?: boolean | (ScheduleLimits & {
|
|
142
|
+
store?: ScheduleStore;
|
|
143
|
+
tools?: boolean;
|
|
144
|
+
});
|
|
115
145
|
/**
|
|
116
146
|
* Called when a link in the conversation (a reply, its thinking, a tool
|
|
117
147
|
* card) is clicked, before the chat's own handling: return `true` when you
|
|
@@ -121,7 +151,16 @@ export interface ChatOptions extends Omit<AgentOptions, "workspace"> {
|
|
|
121
151
|
onLink?: (href: string, text: string) => boolean | void;
|
|
122
152
|
/** A tool card's file path becomes a link that calls this. */
|
|
123
153
|
onOpenFile?: (path: string) => void;
|
|
124
|
-
/**
|
|
154
|
+
/**
|
|
155
|
+
* The user's say over tool permissions (default on): an "Always allow
|
|
156
|
+
* (this app)" answer on each permission question, which lets every tool
|
|
157
|
+
* run without asking from then on, and the "Tool permissions" choice in
|
|
158
|
+
* the settings panel, where it is turned off again. The choice is kept per app; the app's `permissions`
|
|
159
|
+
* ("ask" by default, "auto" to start in auto) is what a user who never
|
|
160
|
+
* chose gets. `false` for an app that decides when to ask itself (its own
|
|
161
|
+
* settings, its tools' `confirm`); hidden as well when `permissions` is a
|
|
162
|
+
* function or the chat was given its own `agent`.
|
|
163
|
+
*/
|
|
125
164
|
permissionsSetting?: boolean;
|
|
126
165
|
/**
|
|
127
166
|
* Your app's own state to put back on a rewind (an editor's text, a form):
|