@oya-ai/browser 1.0.297 → 1.0.298
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 +83 -2
- package/dist/index.d.ts +83 -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,60 @@
|
|
|
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
|
+
/** Synchronous JavaScript body evaluated in isolation. */ code: string;
|
|
13
|
+
} | {
|
|
14
|
+
/** Selects the execution contract. */ kind: 'workflow';
|
|
15
|
+
/** Ordered function calls in this workflow. */ steps: {
|
|
16
|
+
/** Named function or workflow selected for execution. */ tool: string;
|
|
17
|
+
/** Select original arguments, the previous result, or a one-based index of an earlier step. */ from: 'input' | 'previous' | number;
|
|
18
|
+
}[];
|
|
19
|
+
});
|
|
20
|
+
/** Self-contained program saved independently of the persona and device. */
|
|
21
|
+
interface AssistantProgram {
|
|
22
|
+
/** JavaScript handlers keyed by lifecycle event. */ events: Partial<Record<AssistantEvent, string>>;
|
|
23
|
+
/** Definitions offered to the model. */ tools: AssistantTool[];
|
|
24
|
+
}
|
|
25
|
+
/** Compare-and-swap revision used to protect concurrent edits. */
|
|
26
|
+
interface AssistantProgramRevision {
|
|
27
|
+
/** Discoverable event contracts with safe sample payloads. */ eventCatalog?: {
|
|
28
|
+
/** Stable runtime event identifier. */ name: AssistantEvent;
|
|
29
|
+
/** Picker label for this event. */ label: string;
|
|
30
|
+
/** Lifecycle stage shown in the picker. */ group: string;
|
|
31
|
+
/** Boundary that dispatches the event. */ when: string;
|
|
32
|
+
/** Example JSON payload for a draft test. */ sample: object;
|
|
33
|
+
/** Return contract enforced at runtime. */ help: string;
|
|
34
|
+
/** Suggested JavaScript function body. */ code: string;
|
|
35
|
+
}[];
|
|
36
|
+
/** Assistant-owned events and callable tools. */ program: AssistantProgram;
|
|
37
|
+
/** Saved version required for a conditional write. */ revision: number;
|
|
38
|
+
}
|
|
39
|
+
/** Results are visible only to the project running this explicit draft test. */
|
|
40
|
+
interface ProgramPreview {
|
|
41
|
+
/** Whether the sample completed successfully. */ ok: boolean;
|
|
42
|
+
/** JSON value returned by execution. */ output?: unknown;
|
|
43
|
+
/** Builder-facing failure detail when execution fails. */ error?: string;
|
|
44
|
+
/** Steps observed during this execution. */ trace: {
|
|
45
|
+
/** Display or callable name used to identify this entry. */ name: string;
|
|
46
|
+
/** Lines printed by this step during an explicit draft test. */ logs?: string[];
|
|
47
|
+
/** Outcome recorded for this step. */ status: 'completed' | 'failed' | 'skipped' | 'handler failed';
|
|
48
|
+
/** Workflow owning an execution step. */ workflow?: string;
|
|
49
|
+
/** One-based step position. */ step?: number;
|
|
50
|
+
/** Function implementing this step. */ tool?: string;
|
|
51
|
+
/** Safe failure category. */ reason?: string;
|
|
52
|
+
/** Bounded sample arguments seen by this step during a draft test. */ input?: unknown;
|
|
53
|
+
/** JSON value returned by execution. */ output?: unknown;
|
|
54
|
+
/** Builder-facing failure detail when execution fails. */ error?: string;
|
|
55
|
+
}[];
|
|
56
|
+
}
|
|
57
|
+
|
|
1
58
|
/**
|
|
2
59
|
* Types for browsers themselves: starting one, what a page looks like to the
|
|
3
60
|
* SDK, the results of CAPTCHA and MFA handling, and the fleet listing.
|
|
@@ -1264,11 +1321,14 @@ interface CookiesImported {
|
|
|
1264
1321
|
total: number;
|
|
1265
1322
|
}
|
|
1266
1323
|
|
|
1324
|
+
/** Managed assistant definitions and durable conversational messages for a project's backend. */
|
|
1325
|
+
|
|
1267
1326
|
/** Instructions and display name chosen by the builder. */
|
|
1268
1327
|
interface AssistantDefinition {
|
|
1328
|
+
/** Optional device preset for fresh, signed-out browsers. */ browserProfileId?: string | null;
|
|
1269
1329
|
/** Project-owned skills to apply when replying. */ skillIds?: string[];
|
|
1270
1330
|
/** Enabled first-party plugins. */ plugins?: 'public-web'[];
|
|
1271
|
-
/** Apps
|
|
1331
|
+
/** Apps enabled for the assistant. */ connections?: ('googlecalendar' | 'hackernews' | 'jira' | 'clickup' | 'linkedin' | 'facebook' | 'gmail' | 'slack' | 'googledrive' | 'googlesheets')[];
|
|
1272
1332
|
/** Pin a supported project model or inherit the default. */
|
|
1273
1333
|
model?: {
|
|
1274
1334
|
provider: string; /** Model identifier. */
|
|
@@ -1294,6 +1354,16 @@ interface AssistantMessage {
|
|
|
1294
1354
|
text: string;
|
|
1295
1355
|
/** Saved response after completion. */
|
|
1296
1356
|
reply?: string | null;
|
|
1357
|
+
/** A private terminal observer is still updating the receipt. */ tracePending?: boolean;
|
|
1358
|
+
/** Execution metadata present only on private dashboard test receipts. */
|
|
1359
|
+
trace?: {
|
|
1360
|
+
/** Lifecycle name or registered tool. */ name: string;
|
|
1361
|
+
/** Operation or observer result. */ status: string;
|
|
1362
|
+
/** Workflow that owns the step. */ workflow?: string;
|
|
1363
|
+
/** One-based step position. */ step?: number;
|
|
1364
|
+
/** Registered function name. */ tool?: string;
|
|
1365
|
+
/** Safe failure category. */ reason?: string;
|
|
1366
|
+
}[];
|
|
1297
1367
|
/** WhatsApp transport status after a reply is saved. */
|
|
1298
1368
|
delivery?: 'queued' | 'unknown' | 'submitted';
|
|
1299
1369
|
}
|
|
@@ -1319,6 +1389,13 @@ interface AssistantSkill {
|
|
|
1319
1389
|
/** Builder-selected name. */ name: string;
|
|
1320
1390
|
/** Private instructions. */ instructions: string;
|
|
1321
1391
|
}
|
|
1392
|
+
/** Explicit sample input for one draft event or tool. */
|
|
1393
|
+
interface AssistantSampleRequest {
|
|
1394
|
+
/** Assistant-owned events and callable tools. */ program: AssistantProgram;
|
|
1395
|
+
/** Selects the execution contract. */ kind: 'event' | 'tool';
|
|
1396
|
+
/** Display or callable name used to identify this entry. */ name: string;
|
|
1397
|
+
/** JSON arguments supplied to the selected function. */ input: unknown;
|
|
1398
|
+
}
|
|
1322
1399
|
|
|
1323
1400
|
/**
|
|
1324
1401
|
* The shapes Browser's methods take and return that are not part of the
|
|
@@ -1756,7 +1833,11 @@ declare class Oya {
|
|
|
1756
1833
|
send: (id: string, body: AssistantInput) => Promise<AssistantMessage>;
|
|
1757
1834
|
message: (id: string, messageId: string) => Promise<AssistantMessage>;
|
|
1758
1835
|
forget: (id: string, contact: string) => Promise<void>;
|
|
1836
|
+
getProgram: (id: string) => Promise<AssistantProgramRevision>;
|
|
1837
|
+
saveProgram: (id: string, body: AssistantProgramRevision) => Promise<AssistantProgramRevision>;
|
|
1838
|
+
testProgram: (id: string, body: AssistantSampleRequest) => Promise<ProgramPreview>;
|
|
1759
1839
|
listSkills: () => Promise<AssistantSkill[]>;
|
|
1840
|
+
deleteSkill: (id: string) => Promise<void>;
|
|
1760
1841
|
createSkill: (body: Omit<AssistantSkill, "id">) => Promise<AssistantSkill>;
|
|
1761
1842
|
list: () => Promise<Assistant[]>;
|
|
1762
1843
|
create: (body: AssistantDefinition) => Promise<Assistant>;
|
|
@@ -1771,4 +1852,4 @@ declare class Oya {
|
|
|
1771
1852
|
}
|
|
1772
1853
|
|
|
1773
1854
|
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 };
|
|
1855
|
+
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,60 @@
|
|
|
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
|
+
/** Synchronous JavaScript body evaluated in isolation. */ code: string;
|
|
13
|
+
} | {
|
|
14
|
+
/** Selects the execution contract. */ kind: 'workflow';
|
|
15
|
+
/** Ordered function calls in this workflow. */ steps: {
|
|
16
|
+
/** Named function or workflow selected for execution. */ tool: string;
|
|
17
|
+
/** Select original arguments, the previous result, or a one-based index of an earlier step. */ from: 'input' | 'previous' | number;
|
|
18
|
+
}[];
|
|
19
|
+
});
|
|
20
|
+
/** Self-contained program saved independently of the persona and device. */
|
|
21
|
+
interface AssistantProgram {
|
|
22
|
+
/** JavaScript handlers keyed by lifecycle event. */ events: Partial<Record<AssistantEvent, string>>;
|
|
23
|
+
/** Definitions offered to the model. */ tools: AssistantTool[];
|
|
24
|
+
}
|
|
25
|
+
/** Compare-and-swap revision used to protect concurrent edits. */
|
|
26
|
+
interface AssistantProgramRevision {
|
|
27
|
+
/** Discoverable event contracts with safe sample payloads. */ eventCatalog?: {
|
|
28
|
+
/** Stable runtime event identifier. */ name: AssistantEvent;
|
|
29
|
+
/** Picker label for this event. */ label: string;
|
|
30
|
+
/** Lifecycle stage shown in the picker. */ group: string;
|
|
31
|
+
/** Boundary that dispatches the event. */ when: string;
|
|
32
|
+
/** Example JSON payload for a draft test. */ sample: object;
|
|
33
|
+
/** Return contract enforced at runtime. */ help: string;
|
|
34
|
+
/** Suggested JavaScript function body. */ code: string;
|
|
35
|
+
}[];
|
|
36
|
+
/** Assistant-owned events and callable tools. */ program: AssistantProgram;
|
|
37
|
+
/** Saved version required for a conditional write. */ revision: number;
|
|
38
|
+
}
|
|
39
|
+
/** Results are visible only to the project running this explicit draft test. */
|
|
40
|
+
interface ProgramPreview {
|
|
41
|
+
/** Whether the sample completed successfully. */ ok: boolean;
|
|
42
|
+
/** JSON value returned by execution. */ output?: unknown;
|
|
43
|
+
/** Builder-facing failure detail when execution fails. */ error?: string;
|
|
44
|
+
/** Steps observed during this execution. */ trace: {
|
|
45
|
+
/** Display or callable name used to identify this entry. */ name: string;
|
|
46
|
+
/** Lines printed by this step during an explicit draft test. */ logs?: string[];
|
|
47
|
+
/** Outcome recorded for this step. */ status: 'completed' | 'failed' | 'skipped' | 'handler failed';
|
|
48
|
+
/** Workflow owning an execution step. */ workflow?: string;
|
|
49
|
+
/** One-based step position. */ step?: number;
|
|
50
|
+
/** Function implementing this step. */ tool?: string;
|
|
51
|
+
/** Safe failure category. */ reason?: string;
|
|
52
|
+
/** Bounded sample arguments seen by this step during a draft test. */ input?: unknown;
|
|
53
|
+
/** JSON value returned by execution. */ output?: unknown;
|
|
54
|
+
/** Builder-facing failure detail when execution fails. */ error?: string;
|
|
55
|
+
}[];
|
|
56
|
+
}
|
|
57
|
+
|
|
1
58
|
/**
|
|
2
59
|
* Types for browsers themselves: starting one, what a page looks like to the
|
|
3
60
|
* SDK, the results of CAPTCHA and MFA handling, and the fleet listing.
|
|
@@ -1264,11 +1321,14 @@ interface CookiesImported {
|
|
|
1264
1321
|
total: number;
|
|
1265
1322
|
}
|
|
1266
1323
|
|
|
1324
|
+
/** Managed assistant definitions and durable conversational messages for a project's backend. */
|
|
1325
|
+
|
|
1267
1326
|
/** Instructions and display name chosen by the builder. */
|
|
1268
1327
|
interface AssistantDefinition {
|
|
1328
|
+
/** Optional device preset for fresh, signed-out browsers. */ browserProfileId?: string | null;
|
|
1269
1329
|
/** Project-owned skills to apply when replying. */ skillIds?: string[];
|
|
1270
1330
|
/** Enabled first-party plugins. */ plugins?: 'public-web'[];
|
|
1271
|
-
/** Apps
|
|
1331
|
+
/** Apps enabled for the assistant. */ connections?: ('googlecalendar' | 'hackernews' | 'jira' | 'clickup' | 'linkedin' | 'facebook' | 'gmail' | 'slack' | 'googledrive' | 'googlesheets')[];
|
|
1272
1332
|
/** Pin a supported project model or inherit the default. */
|
|
1273
1333
|
model?: {
|
|
1274
1334
|
provider: string; /** Model identifier. */
|
|
@@ -1294,6 +1354,16 @@ interface AssistantMessage {
|
|
|
1294
1354
|
text: string;
|
|
1295
1355
|
/** Saved response after completion. */
|
|
1296
1356
|
reply?: string | null;
|
|
1357
|
+
/** A private terminal observer is still updating the receipt. */ tracePending?: boolean;
|
|
1358
|
+
/** Execution metadata present only on private dashboard test receipts. */
|
|
1359
|
+
trace?: {
|
|
1360
|
+
/** Lifecycle name or registered tool. */ name: string;
|
|
1361
|
+
/** Operation or observer result. */ status: string;
|
|
1362
|
+
/** Workflow that owns the step. */ workflow?: string;
|
|
1363
|
+
/** One-based step position. */ step?: number;
|
|
1364
|
+
/** Registered function name. */ tool?: string;
|
|
1365
|
+
/** Safe failure category. */ reason?: string;
|
|
1366
|
+
}[];
|
|
1297
1367
|
/** WhatsApp transport status after a reply is saved. */
|
|
1298
1368
|
delivery?: 'queued' | 'unknown' | 'submitted';
|
|
1299
1369
|
}
|
|
@@ -1319,6 +1389,13 @@ interface AssistantSkill {
|
|
|
1319
1389
|
/** Builder-selected name. */ name: string;
|
|
1320
1390
|
/** Private instructions. */ instructions: string;
|
|
1321
1391
|
}
|
|
1392
|
+
/** Explicit sample input for one draft event or tool. */
|
|
1393
|
+
interface AssistantSampleRequest {
|
|
1394
|
+
/** Assistant-owned events and callable tools. */ program: AssistantProgram;
|
|
1395
|
+
/** Selects the execution contract. */ kind: 'event' | 'tool';
|
|
1396
|
+
/** Display or callable name used to identify this entry. */ name: string;
|
|
1397
|
+
/** JSON arguments supplied to the selected function. */ input: unknown;
|
|
1398
|
+
}
|
|
1322
1399
|
|
|
1323
1400
|
/**
|
|
1324
1401
|
* The shapes Browser's methods take and return that are not part of the
|
|
@@ -1756,7 +1833,11 @@ declare class Oya {
|
|
|
1756
1833
|
send: (id: string, body: AssistantInput) => Promise<AssistantMessage>;
|
|
1757
1834
|
message: (id: string, messageId: string) => Promise<AssistantMessage>;
|
|
1758
1835
|
forget: (id: string, contact: string) => Promise<void>;
|
|
1836
|
+
getProgram: (id: string) => Promise<AssistantProgramRevision>;
|
|
1837
|
+
saveProgram: (id: string, body: AssistantProgramRevision) => Promise<AssistantProgramRevision>;
|
|
1838
|
+
testProgram: (id: string, body: AssistantSampleRequest) => Promise<ProgramPreview>;
|
|
1759
1839
|
listSkills: () => Promise<AssistantSkill[]>;
|
|
1840
|
+
deleteSkill: (id: string) => Promise<void>;
|
|
1760
1841
|
createSkill: (body: Omit<AssistantSkill, "id">) => Promise<AssistantSkill>;
|
|
1761
1842
|
list: () => Promise<Assistant[]>;
|
|
1762
1843
|
create: (body: AssistantDefinition) => Promise<Assistant>;
|
|
@@ -1771,4 +1852,4 @@ declare class Oya {
|
|
|
1771
1852
|
}
|
|
1772
1853
|
|
|
1773
1854
|
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 };
|
|
1855
|
+
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.298",
|
|
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",
|