@oya-ai/browser 1.0.297 → 1.0.299
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/dist/index.cjs +11 -0
- package/dist/index.d.cts +84 -2
- package/dist/index.d.ts +84 -2
- package/dist/index.js +11 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -993,6 +993,8 @@ var gateways = (http) => ({
|
|
|
993
993
|
var skills = (http) => ({
|
|
994
994
|
/** List available reusable instructions. */
|
|
995
995
|
listSkills: async () => (await http().request("GET", "/api/assistants")).skills,
|
|
996
|
+
/** Permanently remove a project skill and detach it from every assistant. */
|
|
997
|
+
deleteSkill: (id) => http().request("DELETE", "/api/assistants/skills/" + segment(id, "skill ID")),
|
|
996
998
|
/** Save instructions once for several assistants. */
|
|
997
999
|
createSkill: (body) => http().request("POST", "/api/assistants/skills", body)
|
|
998
1000
|
});
|
|
@@ -1008,6 +1010,14 @@ var definitions = (http) => ({
|
|
|
1008
1010
|
/** Remove this assistant and its messages. */
|
|
1009
1011
|
remove: (id) => http().request("DELETE", path(id))
|
|
1010
1012
|
});
|
|
1013
|
+
var programs = (http) => ({
|
|
1014
|
+
/** Load a saved program and its revision. */
|
|
1015
|
+
getProgram: (id) => http().request("GET", path(id) + "/program"),
|
|
1016
|
+
/** Replace a program if its revision is still current. */
|
|
1017
|
+
saveProgram: (id, body) => http().request("PUT", path(id) + "/program", body),
|
|
1018
|
+
/** Preview a draft without delivering a message. */
|
|
1019
|
+
testProgram: (id, body) => http().request("POST", path(id) + "/program/test", body)
|
|
1020
|
+
});
|
|
1011
1021
|
var conversations = (http) => ({
|
|
1012
1022
|
/** Submit a contact message for asynchronous processing. */
|
|
1013
1023
|
send: (id, body) => http().request("POST", path(id) + "/messages", body),
|
|
@@ -1019,6 +1029,7 @@ var conversations = (http) => ({
|
|
|
1019
1029
|
var assistantApi = (http) => ({
|
|
1020
1030
|
...definitions(http),
|
|
1021
1031
|
...skills(http),
|
|
1032
|
+
...programs(http),
|
|
1022
1033
|
...conversations(http),
|
|
1023
1034
|
...gateways(http)
|
|
1024
1035
|
});
|
package/dist/index.d.cts
CHANGED
|
@@ -1,3 +1,61 @@
|
|
|
1
|
+
/** Typed authoring contracts for an assistant's event functions and callable tools. */
|
|
2
|
+
type AssistantEvent = 'contact.first_seen' | 'turn.started' | 'message.received' | 'reply.prepared' | 'turn.completed' | 'turn.failed' | 'model.started' | 'model.succeeded' | 'model.failed' | 'browser.started' | 'browser.succeeded' | 'browser.failed' | 'tool.started' | 'tool.succeeded' | 'tool.failed' | 'workflow.started' | 'workflow.succeeded' | 'workflow.failed' | 'workflow.step.started' | 'workflow.step.succeeded' | 'workflow.step.failed' | 'whatsapp.connected' | 'whatsapp.disconnected' | 'whatsapp.reply.queued' | 'whatsapp.reply.submitted' | 'whatsapp.delivery.uncertain';
|
|
3
|
+
/** Required fields shared by functions and workflows offered to the model. */
|
|
4
|
+
interface ToolDefinition {
|
|
5
|
+
/** Stable model-facing identifier. */ name: string;
|
|
6
|
+
/** When to call this tool. */ description: string;
|
|
7
|
+
/** Named string arguments. */ inputs: string[];
|
|
8
|
+
}
|
|
9
|
+
/** A synchronous JavaScript body or an ordered sequence of named functions. */
|
|
10
|
+
type AssistantTool = ToolDefinition & ({
|
|
11
|
+
/** Selects the execution contract. */ kind: 'function';
|
|
12
|
+
/** Optional JSON reference data supplied only to this function as the data argument. */ data?: unknown;
|
|
13
|
+
/** Synchronous JavaScript body evaluated in isolation. */ code: string;
|
|
14
|
+
} | {
|
|
15
|
+
/** Selects the execution contract. */ kind: 'workflow';
|
|
16
|
+
/** Ordered function calls in this workflow. */ steps: {
|
|
17
|
+
/** Named function or workflow selected for execution. */ tool: string;
|
|
18
|
+
/** Select original arguments, the previous result, or a one-based index of an earlier step. */ from: 'input' | 'previous' | number;
|
|
19
|
+
}[];
|
|
20
|
+
});
|
|
21
|
+
/** Self-contained program saved independently of the persona and device. */
|
|
22
|
+
interface AssistantProgram {
|
|
23
|
+
/** JavaScript handlers keyed by lifecycle event. */ events: Partial<Record<AssistantEvent, string>>;
|
|
24
|
+
/** Definitions offered to the model. */ tools: AssistantTool[];
|
|
25
|
+
}
|
|
26
|
+
/** Compare-and-swap revision used to protect concurrent edits. */
|
|
27
|
+
interface AssistantProgramRevision {
|
|
28
|
+
/** Discoverable event contracts with safe sample payloads. */ eventCatalog?: {
|
|
29
|
+
/** Stable runtime event identifier. */ name: AssistantEvent;
|
|
30
|
+
/** Picker label for this event. */ label: string;
|
|
31
|
+
/** Lifecycle stage shown in the picker. */ group: string;
|
|
32
|
+
/** Boundary that dispatches the event. */ when: string;
|
|
33
|
+
/** Example JSON payload for a draft test. */ sample: object;
|
|
34
|
+
/** Return contract enforced at runtime. */ help: string;
|
|
35
|
+
/** Suggested JavaScript function body. */ code: string;
|
|
36
|
+
}[];
|
|
37
|
+
/** Assistant-owned events and callable tools. */ program: AssistantProgram;
|
|
38
|
+
/** Saved version required for a conditional write. */ revision: number;
|
|
39
|
+
}
|
|
40
|
+
/** Results are visible only to the project running this explicit draft test. */
|
|
41
|
+
interface ProgramPreview {
|
|
42
|
+
/** Whether the sample completed successfully. */ ok: boolean;
|
|
43
|
+
/** JSON value returned by execution. */ output?: unknown;
|
|
44
|
+
/** Builder-facing failure detail when execution fails. */ error?: string;
|
|
45
|
+
/** Steps observed during this execution. */ trace: {
|
|
46
|
+
/** Display or callable name used to identify this entry. */ name: string;
|
|
47
|
+
/** Lines printed by this step during an explicit draft test. */ logs?: string[];
|
|
48
|
+
/** Outcome recorded for this step. */ status: 'completed' | 'failed' | 'skipped' | 'handler failed';
|
|
49
|
+
/** Workflow owning an execution step. */ workflow?: string;
|
|
50
|
+
/** One-based step position. */ step?: number;
|
|
51
|
+
/** Function implementing this step. */ tool?: string;
|
|
52
|
+
/** Safe failure category. */ reason?: string;
|
|
53
|
+
/** Bounded sample arguments seen by this step during a draft test. */ input?: unknown;
|
|
54
|
+
/** JSON value returned by execution. */ output?: unknown;
|
|
55
|
+
/** Builder-facing failure detail when execution fails. */ error?: string;
|
|
56
|
+
}[];
|
|
57
|
+
}
|
|
58
|
+
|
|
1
59
|
/**
|
|
2
60
|
* Types for browsers themselves: starting one, what a page looks like to the
|
|
3
61
|
* SDK, the results of CAPTCHA and MFA handling, and the fleet listing.
|
|
@@ -1264,11 +1322,14 @@ interface CookiesImported {
|
|
|
1264
1322
|
total: number;
|
|
1265
1323
|
}
|
|
1266
1324
|
|
|
1325
|
+
/** Managed assistant definitions and durable conversational messages for a project's backend. */
|
|
1326
|
+
|
|
1267
1327
|
/** Instructions and display name chosen by the builder. */
|
|
1268
1328
|
interface AssistantDefinition {
|
|
1329
|
+
/** Optional device preset for fresh, signed-out browsers. */ browserProfileId?: string | null;
|
|
1269
1330
|
/** Project-owned skills to apply when replying. */ skillIds?: string[];
|
|
1270
1331
|
/** Enabled first-party plugins. */ plugins?: 'public-web'[];
|
|
1271
|
-
/** Apps
|
|
1332
|
+
/** Apps enabled for the assistant. */ connections?: ('googlecalendar' | 'hackernews' | 'jira' | 'clickup' | 'linkedin' | 'facebook' | 'gmail' | 'slack' | 'googledrive' | 'googlesheets')[];
|
|
1272
1333
|
/** Pin a supported project model or inherit the default. */
|
|
1273
1334
|
model?: {
|
|
1274
1335
|
provider: string; /** Model identifier. */
|
|
@@ -1294,6 +1355,16 @@ interface AssistantMessage {
|
|
|
1294
1355
|
text: string;
|
|
1295
1356
|
/** Saved response after completion. */
|
|
1296
1357
|
reply?: string | null;
|
|
1358
|
+
/** A private terminal observer is still updating the receipt. */ tracePending?: boolean;
|
|
1359
|
+
/** Execution metadata present only on private dashboard test receipts. */
|
|
1360
|
+
trace?: {
|
|
1361
|
+
/** Lifecycle name or registered tool. */ name: string;
|
|
1362
|
+
/** Operation or observer result. */ status: string;
|
|
1363
|
+
/** Workflow that owns the step. */ workflow?: string;
|
|
1364
|
+
/** One-based step position. */ step?: number;
|
|
1365
|
+
/** Registered function name. */ tool?: string;
|
|
1366
|
+
/** Safe failure category. */ reason?: string;
|
|
1367
|
+
}[];
|
|
1297
1368
|
/** WhatsApp transport status after a reply is saved. */
|
|
1298
1369
|
delivery?: 'queued' | 'unknown' | 'submitted';
|
|
1299
1370
|
}
|
|
@@ -1319,6 +1390,13 @@ interface AssistantSkill {
|
|
|
1319
1390
|
/** Builder-selected name. */ name: string;
|
|
1320
1391
|
/** Private instructions. */ instructions: string;
|
|
1321
1392
|
}
|
|
1393
|
+
/** Explicit sample input for one draft event or tool. */
|
|
1394
|
+
interface AssistantSampleRequest {
|
|
1395
|
+
/** Assistant-owned events and callable tools. */ program: AssistantProgram;
|
|
1396
|
+
/** Selects the execution contract. */ kind: 'event' | 'tool';
|
|
1397
|
+
/** Display or callable name used to identify this entry. */ name: string;
|
|
1398
|
+
/** JSON arguments supplied to the selected function. */ input: unknown;
|
|
1399
|
+
}
|
|
1322
1400
|
|
|
1323
1401
|
/**
|
|
1324
1402
|
* The shapes Browser's methods take and return that are not part of the
|
|
@@ -1756,7 +1834,11 @@ declare class Oya {
|
|
|
1756
1834
|
send: (id: string, body: AssistantInput) => Promise<AssistantMessage>;
|
|
1757
1835
|
message: (id: string, messageId: string) => Promise<AssistantMessage>;
|
|
1758
1836
|
forget: (id: string, contact: string) => Promise<void>;
|
|
1837
|
+
getProgram: (id: string) => Promise<AssistantProgramRevision>;
|
|
1838
|
+
saveProgram: (id: string, body: AssistantProgramRevision) => Promise<AssistantProgramRevision>;
|
|
1839
|
+
testProgram: (id: string, body: AssistantSampleRequest) => Promise<ProgramPreview>;
|
|
1759
1840
|
listSkills: () => Promise<AssistantSkill[]>;
|
|
1841
|
+
deleteSkill: (id: string) => Promise<void>;
|
|
1760
1842
|
createSkill: (body: Omit<AssistantSkill, "id">) => Promise<AssistantSkill>;
|
|
1761
1843
|
list: () => Promise<Assistant[]>;
|
|
1762
1844
|
create: (body: AssistantDefinition) => Promise<Assistant>;
|
|
@@ -1771,4 +1853,4 @@ declare class Oya {
|
|
|
1771
1853
|
}
|
|
1772
1854
|
|
|
1773
1855
|
export { Browser, MAX_FILE_BYTES, Oya, OyaError, Run, Oya as default, file };
|
|
1774
|
-
export type { Activity, Analysis, AnalyzeOptions, Assistant, AssistantDefinition, AssistantInput, AssistantMessage, AssistantSkill, AttentionRequest, Block, BrowserDetail, BrowserInfo, CaptchaResult, CaptchaSolver, Config, ConfigUpdate, ControlCredential, ControlEvent, ControlOverview, ControlRole, ControlSession, Cookie, CookieFormat, DesktopOptions, EcsAuth, EcsConfig, Element, FileValue, Fingerprint, Health, HumanInputAction, ImportOptions, LlmCatalogEntry, LlmProvider, MfaConfig, MfaResult, ModelOptions, OyaOptions, PageFormat, PersonaGroup, PersonaInfo, PersonaPrefs, PlayResult, Playbook, PlaybookAnswer, PlaybookExport, PlaybookSummary, ProjectSettings, Provider, ProxyCreate, ProxyInfo, RecoverOptions, RunData, RunInfo, RunResult, SandboxRuntime, Signup, SignupOptions, SiteCredentials, StartOptions, StartResult, StopResult, SubmitOptions };
|
|
1856
|
+
export type { Activity, Analysis, AnalyzeOptions, Assistant, AssistantDefinition, AssistantEvent, AssistantInput, AssistantMessage, AssistantProgram, AssistantProgramRevision, AssistantSampleRequest, AssistantSkill, AssistantTool, AttentionRequest, Block, BrowserDetail, BrowserInfo, CaptchaResult, CaptchaSolver, Config, ConfigUpdate, ControlCredential, ControlEvent, ControlOverview, ControlRole, ControlSession, Cookie, CookieFormat, DesktopOptions, EcsAuth, EcsConfig, Element, FileValue, Fingerprint, Health, HumanInputAction, ImportOptions, LlmCatalogEntry, LlmProvider, MfaConfig, MfaResult, ModelOptions, OyaOptions, PageFormat, PersonaGroup, PersonaInfo, PersonaPrefs, PlayResult, Playbook, PlaybookAnswer, PlaybookExport, PlaybookSummary, ProgramPreview, ProjectSettings, Provider, ProxyCreate, ProxyInfo, RecoverOptions, RunData, RunInfo, RunResult, SandboxRuntime, Signup, SignupOptions, SiteCredentials, StartOptions, StartResult, StopResult, SubmitOptions };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,61 @@
|
|
|
1
|
+
/** Typed authoring contracts for an assistant's event functions and callable tools. */
|
|
2
|
+
type AssistantEvent = 'contact.first_seen' | 'turn.started' | 'message.received' | 'reply.prepared' | 'turn.completed' | 'turn.failed' | 'model.started' | 'model.succeeded' | 'model.failed' | 'browser.started' | 'browser.succeeded' | 'browser.failed' | 'tool.started' | 'tool.succeeded' | 'tool.failed' | 'workflow.started' | 'workflow.succeeded' | 'workflow.failed' | 'workflow.step.started' | 'workflow.step.succeeded' | 'workflow.step.failed' | 'whatsapp.connected' | 'whatsapp.disconnected' | 'whatsapp.reply.queued' | 'whatsapp.reply.submitted' | 'whatsapp.delivery.uncertain';
|
|
3
|
+
/** Required fields shared by functions and workflows offered to the model. */
|
|
4
|
+
interface ToolDefinition {
|
|
5
|
+
/** Stable model-facing identifier. */ name: string;
|
|
6
|
+
/** When to call this tool. */ description: string;
|
|
7
|
+
/** Named string arguments. */ inputs: string[];
|
|
8
|
+
}
|
|
9
|
+
/** A synchronous JavaScript body or an ordered sequence of named functions. */
|
|
10
|
+
type AssistantTool = ToolDefinition & ({
|
|
11
|
+
/** Selects the execution contract. */ kind: 'function';
|
|
12
|
+
/** Optional JSON reference data supplied only to this function as the data argument. */ data?: unknown;
|
|
13
|
+
/** Synchronous JavaScript body evaluated in isolation. */ code: string;
|
|
14
|
+
} | {
|
|
15
|
+
/** Selects the execution contract. */ kind: 'workflow';
|
|
16
|
+
/** Ordered function calls in this workflow. */ steps: {
|
|
17
|
+
/** Named function or workflow selected for execution. */ tool: string;
|
|
18
|
+
/** Select original arguments, the previous result, or a one-based index of an earlier step. */ from: 'input' | 'previous' | number;
|
|
19
|
+
}[];
|
|
20
|
+
});
|
|
21
|
+
/** Self-contained program saved independently of the persona and device. */
|
|
22
|
+
interface AssistantProgram {
|
|
23
|
+
/** JavaScript handlers keyed by lifecycle event. */ events: Partial<Record<AssistantEvent, string>>;
|
|
24
|
+
/** Definitions offered to the model. */ tools: AssistantTool[];
|
|
25
|
+
}
|
|
26
|
+
/** Compare-and-swap revision used to protect concurrent edits. */
|
|
27
|
+
interface AssistantProgramRevision {
|
|
28
|
+
/** Discoverable event contracts with safe sample payloads. */ eventCatalog?: {
|
|
29
|
+
/** Stable runtime event identifier. */ name: AssistantEvent;
|
|
30
|
+
/** Picker label for this event. */ label: string;
|
|
31
|
+
/** Lifecycle stage shown in the picker. */ group: string;
|
|
32
|
+
/** Boundary that dispatches the event. */ when: string;
|
|
33
|
+
/** Example JSON payload for a draft test. */ sample: object;
|
|
34
|
+
/** Return contract enforced at runtime. */ help: string;
|
|
35
|
+
/** Suggested JavaScript function body. */ code: string;
|
|
36
|
+
}[];
|
|
37
|
+
/** Assistant-owned events and callable tools. */ program: AssistantProgram;
|
|
38
|
+
/** Saved version required for a conditional write. */ revision: number;
|
|
39
|
+
}
|
|
40
|
+
/** Results are visible only to the project running this explicit draft test. */
|
|
41
|
+
interface ProgramPreview {
|
|
42
|
+
/** Whether the sample completed successfully. */ ok: boolean;
|
|
43
|
+
/** JSON value returned by execution. */ output?: unknown;
|
|
44
|
+
/** Builder-facing failure detail when execution fails. */ error?: string;
|
|
45
|
+
/** Steps observed during this execution. */ trace: {
|
|
46
|
+
/** Display or callable name used to identify this entry. */ name: string;
|
|
47
|
+
/** Lines printed by this step during an explicit draft test. */ logs?: string[];
|
|
48
|
+
/** Outcome recorded for this step. */ status: 'completed' | 'failed' | 'skipped' | 'handler failed';
|
|
49
|
+
/** Workflow owning an execution step. */ workflow?: string;
|
|
50
|
+
/** One-based step position. */ step?: number;
|
|
51
|
+
/** Function implementing this step. */ tool?: string;
|
|
52
|
+
/** Safe failure category. */ reason?: string;
|
|
53
|
+
/** Bounded sample arguments seen by this step during a draft test. */ input?: unknown;
|
|
54
|
+
/** JSON value returned by execution. */ output?: unknown;
|
|
55
|
+
/** Builder-facing failure detail when execution fails. */ error?: string;
|
|
56
|
+
}[];
|
|
57
|
+
}
|
|
58
|
+
|
|
1
59
|
/**
|
|
2
60
|
* Types for browsers themselves: starting one, what a page looks like to the
|
|
3
61
|
* SDK, the results of CAPTCHA and MFA handling, and the fleet listing.
|
|
@@ -1264,11 +1322,14 @@ interface CookiesImported {
|
|
|
1264
1322
|
total: number;
|
|
1265
1323
|
}
|
|
1266
1324
|
|
|
1325
|
+
/** Managed assistant definitions and durable conversational messages for a project's backend. */
|
|
1326
|
+
|
|
1267
1327
|
/** Instructions and display name chosen by the builder. */
|
|
1268
1328
|
interface AssistantDefinition {
|
|
1329
|
+
/** Optional device preset for fresh, signed-out browsers. */ browserProfileId?: string | null;
|
|
1269
1330
|
/** Project-owned skills to apply when replying. */ skillIds?: string[];
|
|
1270
1331
|
/** Enabled first-party plugins. */ plugins?: 'public-web'[];
|
|
1271
|
-
/** Apps
|
|
1332
|
+
/** Apps enabled for the assistant. */ connections?: ('googlecalendar' | 'hackernews' | 'jira' | 'clickup' | 'linkedin' | 'facebook' | 'gmail' | 'slack' | 'googledrive' | 'googlesheets')[];
|
|
1272
1333
|
/** Pin a supported project model or inherit the default. */
|
|
1273
1334
|
model?: {
|
|
1274
1335
|
provider: string; /** Model identifier. */
|
|
@@ -1294,6 +1355,16 @@ interface AssistantMessage {
|
|
|
1294
1355
|
text: string;
|
|
1295
1356
|
/** Saved response after completion. */
|
|
1296
1357
|
reply?: string | null;
|
|
1358
|
+
/** A private terminal observer is still updating the receipt. */ tracePending?: boolean;
|
|
1359
|
+
/** Execution metadata present only on private dashboard test receipts. */
|
|
1360
|
+
trace?: {
|
|
1361
|
+
/** Lifecycle name or registered tool. */ name: string;
|
|
1362
|
+
/** Operation or observer result. */ status: string;
|
|
1363
|
+
/** Workflow that owns the step. */ workflow?: string;
|
|
1364
|
+
/** One-based step position. */ step?: number;
|
|
1365
|
+
/** Registered function name. */ tool?: string;
|
|
1366
|
+
/** Safe failure category. */ reason?: string;
|
|
1367
|
+
}[];
|
|
1297
1368
|
/** WhatsApp transport status after a reply is saved. */
|
|
1298
1369
|
delivery?: 'queued' | 'unknown' | 'submitted';
|
|
1299
1370
|
}
|
|
@@ -1319,6 +1390,13 @@ interface AssistantSkill {
|
|
|
1319
1390
|
/** Builder-selected name. */ name: string;
|
|
1320
1391
|
/** Private instructions. */ instructions: string;
|
|
1321
1392
|
}
|
|
1393
|
+
/** Explicit sample input for one draft event or tool. */
|
|
1394
|
+
interface AssistantSampleRequest {
|
|
1395
|
+
/** Assistant-owned events and callable tools. */ program: AssistantProgram;
|
|
1396
|
+
/** Selects the execution contract. */ kind: 'event' | 'tool';
|
|
1397
|
+
/** Display or callable name used to identify this entry. */ name: string;
|
|
1398
|
+
/** JSON arguments supplied to the selected function. */ input: unknown;
|
|
1399
|
+
}
|
|
1322
1400
|
|
|
1323
1401
|
/**
|
|
1324
1402
|
* The shapes Browser's methods take and return that are not part of the
|
|
@@ -1756,7 +1834,11 @@ declare class Oya {
|
|
|
1756
1834
|
send: (id: string, body: AssistantInput) => Promise<AssistantMessage>;
|
|
1757
1835
|
message: (id: string, messageId: string) => Promise<AssistantMessage>;
|
|
1758
1836
|
forget: (id: string, contact: string) => Promise<void>;
|
|
1837
|
+
getProgram: (id: string) => Promise<AssistantProgramRevision>;
|
|
1838
|
+
saveProgram: (id: string, body: AssistantProgramRevision) => Promise<AssistantProgramRevision>;
|
|
1839
|
+
testProgram: (id: string, body: AssistantSampleRequest) => Promise<ProgramPreview>;
|
|
1759
1840
|
listSkills: () => Promise<AssistantSkill[]>;
|
|
1841
|
+
deleteSkill: (id: string) => Promise<void>;
|
|
1760
1842
|
createSkill: (body: Omit<AssistantSkill, "id">) => Promise<AssistantSkill>;
|
|
1761
1843
|
list: () => Promise<Assistant[]>;
|
|
1762
1844
|
create: (body: AssistantDefinition) => Promise<Assistant>;
|
|
@@ -1771,4 +1853,4 @@ declare class Oya {
|
|
|
1771
1853
|
}
|
|
1772
1854
|
|
|
1773
1855
|
export { Browser, MAX_FILE_BYTES, Oya, OyaError, Run, Oya as default, file };
|
|
1774
|
-
export type { Activity, Analysis, AnalyzeOptions, Assistant, AssistantDefinition, AssistantInput, AssistantMessage, AssistantSkill, AttentionRequest, Block, BrowserDetail, BrowserInfo, CaptchaResult, CaptchaSolver, Config, ConfigUpdate, ControlCredential, ControlEvent, ControlOverview, ControlRole, ControlSession, Cookie, CookieFormat, DesktopOptions, EcsAuth, EcsConfig, Element, FileValue, Fingerprint, Health, HumanInputAction, ImportOptions, LlmCatalogEntry, LlmProvider, MfaConfig, MfaResult, ModelOptions, OyaOptions, PageFormat, PersonaGroup, PersonaInfo, PersonaPrefs, PlayResult, Playbook, PlaybookAnswer, PlaybookExport, PlaybookSummary, ProjectSettings, Provider, ProxyCreate, ProxyInfo, RecoverOptions, RunData, RunInfo, RunResult, SandboxRuntime, Signup, SignupOptions, SiteCredentials, StartOptions, StartResult, StopResult, SubmitOptions };
|
|
1856
|
+
export type { Activity, Analysis, AnalyzeOptions, Assistant, AssistantDefinition, AssistantEvent, AssistantInput, AssistantMessage, AssistantProgram, AssistantProgramRevision, AssistantSampleRequest, AssistantSkill, AssistantTool, AttentionRequest, Block, BrowserDetail, BrowserInfo, CaptchaResult, CaptchaSolver, Config, ConfigUpdate, ControlCredential, ControlEvent, ControlOverview, ControlRole, ControlSession, Cookie, CookieFormat, DesktopOptions, EcsAuth, EcsConfig, Element, FileValue, Fingerprint, Health, HumanInputAction, ImportOptions, LlmCatalogEntry, LlmProvider, MfaConfig, MfaResult, ModelOptions, OyaOptions, PageFormat, PersonaGroup, PersonaInfo, PersonaPrefs, PlayResult, Playbook, PlaybookAnswer, PlaybookExport, PlaybookSummary, ProgramPreview, ProjectSettings, Provider, ProxyCreate, ProxyInfo, RecoverOptions, RunData, RunInfo, RunResult, SandboxRuntime, Signup, SignupOptions, SiteCredentials, StartOptions, StartResult, StopResult, SubmitOptions };
|
package/dist/index.js
CHANGED
|
@@ -961,6 +961,8 @@ var gateways = (http) => ({
|
|
|
961
961
|
var skills = (http) => ({
|
|
962
962
|
/** List available reusable instructions. */
|
|
963
963
|
listSkills: async () => (await http().request("GET", "/api/assistants")).skills,
|
|
964
|
+
/** Permanently remove a project skill and detach it from every assistant. */
|
|
965
|
+
deleteSkill: (id) => http().request("DELETE", "/api/assistants/skills/" + segment(id, "skill ID")),
|
|
964
966
|
/** Save instructions once for several assistants. */
|
|
965
967
|
createSkill: (body) => http().request("POST", "/api/assistants/skills", body)
|
|
966
968
|
});
|
|
@@ -976,6 +978,14 @@ var definitions = (http) => ({
|
|
|
976
978
|
/** Remove this assistant and its messages. */
|
|
977
979
|
remove: (id) => http().request("DELETE", path(id))
|
|
978
980
|
});
|
|
981
|
+
var programs = (http) => ({
|
|
982
|
+
/** Load a saved program and its revision. */
|
|
983
|
+
getProgram: (id) => http().request("GET", path(id) + "/program"),
|
|
984
|
+
/** Replace a program if its revision is still current. */
|
|
985
|
+
saveProgram: (id, body) => http().request("PUT", path(id) + "/program", body),
|
|
986
|
+
/** Preview a draft without delivering a message. */
|
|
987
|
+
testProgram: (id, body) => http().request("POST", path(id) + "/program/test", body)
|
|
988
|
+
});
|
|
979
989
|
var conversations = (http) => ({
|
|
980
990
|
/** Submit a contact message for asynchronous processing. */
|
|
981
991
|
send: (id, body) => http().request("POST", path(id) + "/messages", body),
|
|
@@ -987,6 +997,7 @@ var conversations = (http) => ({
|
|
|
987
997
|
var assistantApi = (http) => ({
|
|
988
998
|
...definitions(http),
|
|
989
999
|
...skills(http),
|
|
1000
|
+
...programs(http),
|
|
990
1001
|
...conversations(http),
|
|
991
1002
|
...gateways(http)
|
|
992
1003
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oya-ai/browser",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.299",
|
|
4
4
|
"description": "TypeScript SDK for Oya, the HIPAA-compliant agentic browser: start cloud browsers, run playbooks, attach Playwright.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://oyabrowser.com",
|