@perplexity-ai/perplexity_ai 0.36.0 → 0.37.0
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/CHANGELOG.md +8 -0
- package/lib/add-output-text.d.mts +4 -4
- package/lib/add-output-text.d.mts.map +1 -1
- package/lib/add-output-text.d.ts +4 -4
- package/lib/add-output-text.d.ts.map +1 -1
- package/lib/add-output-text.js +4 -3
- package/lib/add-output-text.js.map +1 -1
- package/lib/add-output-text.mjs +4 -3
- package/lib/add-output-text.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/responses/responses.d.mts +271 -4
- package/resources/responses/responses.d.mts.map +1 -1
- package/resources/responses/responses.d.ts +271 -4
- package/resources/responses/responses.d.ts.map +1 -1
- package/resources/responses/responses.js.map +1 -1
- package/resources/responses/responses.mjs.map +1 -1
- package/src/lib/add-output-text.ts +14 -10
- package/src/resources/responses/responses.ts +365 -4
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -242,7 +242,18 @@ export type OutputItem =
|
|
|
242
242
|
| OutputItem.FetchURLResultsOutputItem
|
|
243
243
|
| FunctionCallOutputItem
|
|
244
244
|
| OutputItem.McpListToolsOutputItem
|
|
245
|
-
| OutputItem.McpCallOutputItem
|
|
245
|
+
| OutputItem.McpCallOutputItem
|
|
246
|
+
| OutputItem.SkillLoadedOutputItem
|
|
247
|
+
| OutputItem.AdvisorResultOutputItem
|
|
248
|
+
| OutputItem.SandboxResultsOutputItem
|
|
249
|
+
| OutputItem.SandboxWriteFileOutputItem
|
|
250
|
+
| OutputItem.SandboxReadFileOutputItem
|
|
251
|
+
| OutputItem.SandboxEditFileOutputItem
|
|
252
|
+
| OutputItem.SandboxGrepOutputItem
|
|
253
|
+
| OutputItem.SandboxGlobOutputItem
|
|
254
|
+
| OutputItem.SandboxApplyPatchOutputItem
|
|
255
|
+
| OutputItem.ShareFileOutputItem
|
|
256
|
+
| OutputItem.UnknownOutputItem;
|
|
246
257
|
|
|
247
258
|
export namespace OutputItem {
|
|
248
259
|
export interface MessageOutputItem {
|
|
@@ -360,6 +371,236 @@ export namespace OutputItem {
|
|
|
360
371
|
*/
|
|
361
372
|
output?: string;
|
|
362
373
|
}
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* Per-call result emitted by the `load_skill` tool. Only the resolved skill name
|
|
377
|
+
* is surfaced here; the skill body itself lives in the function_call_output input
|
|
378
|
+
* item the model consumes on its next turn.
|
|
379
|
+
*/
|
|
380
|
+
export interface SkillLoadedOutputItem {
|
|
381
|
+
/**
|
|
382
|
+
* Name of the skill that was loaded.
|
|
383
|
+
*/
|
|
384
|
+
name: string;
|
|
385
|
+
|
|
386
|
+
type: 'skill_loaded';
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
* Preview API. Advisor tool invocation emitted in `response.output[]`. The advisor
|
|
391
|
+
* result is server-side guidance consumed by the agent loop; it is not a
|
|
392
|
+
* client-executable function call.
|
|
393
|
+
*/
|
|
394
|
+
export interface AdvisorResultOutputItem {
|
|
395
|
+
call_id: string;
|
|
396
|
+
|
|
397
|
+
/**
|
|
398
|
+
* Status of a response or output item
|
|
399
|
+
*/
|
|
400
|
+
status: 'completed' | 'failed' | 'in_progress' | 'queued' | 'cancelled' | 'requires_action';
|
|
401
|
+
|
|
402
|
+
type: 'advisor_result';
|
|
403
|
+
|
|
404
|
+
/**
|
|
405
|
+
* Guidance returned by the advisor model.
|
|
406
|
+
*/
|
|
407
|
+
advice?: string;
|
|
408
|
+
|
|
409
|
+
/**
|
|
410
|
+
* Raw JSON arguments the executor passed to the advisor tool.
|
|
411
|
+
*/
|
|
412
|
+
arguments?: string;
|
|
413
|
+
|
|
414
|
+
/**
|
|
415
|
+
* Non-fatal advisor error code when the advisor call failed.
|
|
416
|
+
*/
|
|
417
|
+
error_code?: string;
|
|
418
|
+
|
|
419
|
+
/**
|
|
420
|
+
* Non-fatal advisor error message when the advisor call failed.
|
|
421
|
+
*/
|
|
422
|
+
error_message?: string;
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
* Parsed advisor question when present in arguments.
|
|
426
|
+
*/
|
|
427
|
+
question?: string;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
/**
|
|
431
|
+
* Sandbox tool results emitted in `response.output[]`. Cost is aggregated into
|
|
432
|
+
* `Usage.tool_calls_details.sandbox.cost_usd`; this item does not carry
|
|
433
|
+
* per-execution cost.
|
|
434
|
+
*/
|
|
435
|
+
export interface SandboxResultsOutputItem {
|
|
436
|
+
call_id: string;
|
|
437
|
+
|
|
438
|
+
code: string;
|
|
439
|
+
|
|
440
|
+
language: 'python' | 'bash';
|
|
441
|
+
|
|
442
|
+
results: Array<SandboxResultsOutputItem.Result>;
|
|
443
|
+
|
|
444
|
+
status: 'in_progress' | 'completed' | 'failed' | 'timed_out';
|
|
445
|
+
|
|
446
|
+
type: 'sandbox_results';
|
|
447
|
+
|
|
448
|
+
container_id?: string;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
export namespace SandboxResultsOutputItem {
|
|
452
|
+
/**
|
|
453
|
+
* One sandbox execution result. `status` describes whether the sandbox runner
|
|
454
|
+
* completed, failed, or timed out. `exit_code` is the program exit code, so
|
|
455
|
+
* `status: completed` can still have a non-zero `exit_code`.
|
|
456
|
+
*/
|
|
457
|
+
export interface Result {
|
|
458
|
+
duration_ms: number;
|
|
459
|
+
|
|
460
|
+
exit_code: number;
|
|
461
|
+
|
|
462
|
+
status: 'in_progress' | 'completed' | 'failed' | 'timed_out';
|
|
463
|
+
|
|
464
|
+
stderr: string;
|
|
465
|
+
|
|
466
|
+
stdout: string;
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
/**
|
|
471
|
+
* Per-invocation result of the `write` tool inside the sandbox.
|
|
472
|
+
*/
|
|
473
|
+
export interface SandboxWriteFileOutputItem {
|
|
474
|
+
call_id: string;
|
|
475
|
+
|
|
476
|
+
file_path: string;
|
|
477
|
+
|
|
478
|
+
type: 'sandbox_write_file';
|
|
479
|
+
|
|
480
|
+
error?: string;
|
|
481
|
+
|
|
482
|
+
size_bytes?: number;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
/**
|
|
486
|
+
* Per-invocation result of the `read` tool inside the sandbox.
|
|
487
|
+
*/
|
|
488
|
+
export interface SandboxReadFileOutputItem {
|
|
489
|
+
call_id: string;
|
|
490
|
+
|
|
491
|
+
file_path: string;
|
|
492
|
+
|
|
493
|
+
type: 'sandbox_read_file';
|
|
494
|
+
|
|
495
|
+
content?: string;
|
|
496
|
+
|
|
497
|
+
error?: string;
|
|
498
|
+
|
|
499
|
+
start_line?: number;
|
|
500
|
+
|
|
501
|
+
total_lines?: number;
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
/**
|
|
505
|
+
* Per-invocation result of the `edit` tool inside the sandbox.
|
|
506
|
+
*/
|
|
507
|
+
export interface SandboxEditFileOutputItem {
|
|
508
|
+
call_id: string;
|
|
509
|
+
|
|
510
|
+
type: 'sandbox_edit_file';
|
|
511
|
+
|
|
512
|
+
error?: string;
|
|
513
|
+
|
|
514
|
+
file_path?: string;
|
|
515
|
+
|
|
516
|
+
message?: string;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
/**
|
|
520
|
+
* Per-invocation result of the `grep` tool inside the sandbox.
|
|
521
|
+
*/
|
|
522
|
+
export interface SandboxGrepOutputItem {
|
|
523
|
+
call_id: string;
|
|
524
|
+
|
|
525
|
+
type: 'sandbox_grep';
|
|
526
|
+
|
|
527
|
+
count?: number;
|
|
528
|
+
|
|
529
|
+
error?: string;
|
|
530
|
+
|
|
531
|
+
files?: Array<string>;
|
|
532
|
+
|
|
533
|
+
truncated?: boolean;
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
/**
|
|
537
|
+
* Per-invocation result of the `glob` tool inside the sandbox.
|
|
538
|
+
*/
|
|
539
|
+
export interface SandboxGlobOutputItem {
|
|
540
|
+
call_id: string;
|
|
541
|
+
|
|
542
|
+
type: 'sandbox_glob';
|
|
543
|
+
|
|
544
|
+
count?: number;
|
|
545
|
+
|
|
546
|
+
error?: string;
|
|
547
|
+
|
|
548
|
+
files?: Array<string>;
|
|
549
|
+
|
|
550
|
+
truncated?: boolean;
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
/**
|
|
554
|
+
* Per-invocation result of the `apply_patch` tool inside the sandbox.
|
|
555
|
+
*/
|
|
556
|
+
export interface SandboxApplyPatchOutputItem {
|
|
557
|
+
call_id: string;
|
|
558
|
+
|
|
559
|
+
type: 'sandbox_apply_patch';
|
|
560
|
+
|
|
561
|
+
added?: Array<string>;
|
|
562
|
+
|
|
563
|
+
deleted?: Array<string>;
|
|
564
|
+
|
|
565
|
+
error?: string;
|
|
566
|
+
|
|
567
|
+
modified?: Array<string>;
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
/**
|
|
571
|
+
* Result of one `share_file` tool call. On success, file_id and filename identify
|
|
572
|
+
* a sandbox file downloadable at url.
|
|
573
|
+
*/
|
|
574
|
+
export interface ShareFileOutputItem {
|
|
575
|
+
call_id: string;
|
|
576
|
+
|
|
577
|
+
type: 'share_file';
|
|
578
|
+
|
|
579
|
+
error?: string;
|
|
580
|
+
|
|
581
|
+
file_id?: string;
|
|
582
|
+
|
|
583
|
+
filename?: string;
|
|
584
|
+
|
|
585
|
+
size_bytes?: number;
|
|
586
|
+
|
|
587
|
+
/**
|
|
588
|
+
* Relative download path, /v1/responses/{id}/files/{file_id}/content.
|
|
589
|
+
*/
|
|
590
|
+
url?: string;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
/**
|
|
594
|
+
* Forward-compat fallback for proto OutputItem variants the gateway does not yet
|
|
595
|
+
* have a typed schema for.
|
|
596
|
+
*/
|
|
597
|
+
export interface UnknownOutputItem {
|
|
598
|
+
item_name: string;
|
|
599
|
+
|
|
600
|
+
payload: { [key: string]: unknown };
|
|
601
|
+
|
|
602
|
+
type: 'unknown';
|
|
603
|
+
}
|
|
363
604
|
}
|
|
364
605
|
|
|
365
606
|
/**
|
|
@@ -418,6 +659,7 @@ export interface ResponseFileList {
|
|
|
418
659
|
* - `response.reasoning.fetch_url_queries`: URL fetch queries issued
|
|
419
660
|
* - `response.reasoning.fetch_url_results`: URL fetch results received
|
|
420
661
|
* - `response.reasoning.stopped`: Reasoning phase complete
|
|
662
|
+
* - `response.skill.loaded`: load_skill resolved a skill body
|
|
421
663
|
*/
|
|
422
664
|
export type ResponseStreamChunk =
|
|
423
665
|
| ResponseStreamChunk.ResponseCreatedEvent
|
|
@@ -433,7 +675,8 @@ export type ResponseStreamChunk =
|
|
|
433
675
|
| ResponseStreamChunk.SearchResultsEvent
|
|
434
676
|
| ResponseStreamChunk.FetchURLQueriesEvent
|
|
435
677
|
| ResponseStreamChunk.FetchURLResultsEvent
|
|
436
|
-
| ResponseStreamChunk.ReasoningStoppedEvent
|
|
678
|
+
| ResponseStreamChunk.ReasoningStoppedEvent
|
|
679
|
+
| ResponseStreamChunk.ResponseSkillLoadedEvent;
|
|
437
680
|
|
|
438
681
|
export namespace ResponseStreamChunk {
|
|
439
682
|
/**
|
|
@@ -892,6 +1135,28 @@ export namespace ResponseStreamChunk {
|
|
|
892
1135
|
|
|
893
1136
|
thought?: string;
|
|
894
1137
|
}
|
|
1138
|
+
|
|
1139
|
+
/**
|
|
1140
|
+
* Skill loaded event (type: "response.skill.loaded"). Fires when load_skill
|
|
1141
|
+
* resolves a known skill. The skill body stays in the model conversation prefix;
|
|
1142
|
+
* this event carries only the name for client rendering.
|
|
1143
|
+
*/
|
|
1144
|
+
export interface ResponseSkillLoadedEvent {
|
|
1145
|
+
/**
|
|
1146
|
+
* Name of the skill that was loaded.
|
|
1147
|
+
*/
|
|
1148
|
+
name: string;
|
|
1149
|
+
|
|
1150
|
+
/**
|
|
1151
|
+
* Monotonically increasing sequence number for event ordering
|
|
1152
|
+
*/
|
|
1153
|
+
sequence_number: number;
|
|
1154
|
+
|
|
1155
|
+
/**
|
|
1156
|
+
* SSE event type discriminator (always "response.skill.loaded")
|
|
1157
|
+
*/
|
|
1158
|
+
type: 'response.skill.loaded';
|
|
1159
|
+
}
|
|
895
1160
|
}
|
|
896
1161
|
|
|
897
1162
|
export interface ResponsesCreateParams {
|
|
@@ -924,7 +1189,7 @@ export interface ResponsesCreateParams {
|
|
|
924
1189
|
|
|
925
1190
|
/**
|
|
926
1191
|
* Maximum number of research loop steps. If provided, overrides the preset's
|
|
927
|
-
* max_steps value. Must be >= 1 if specified. Maximum allowed is
|
|
1192
|
+
* max_steps value. Must be >= 1 if specified. Maximum allowed is 100.
|
|
928
1193
|
*/
|
|
929
1194
|
max_steps?: number;
|
|
930
1195
|
|
|
@@ -965,6 +1230,15 @@ export interface ResponsesCreateParams {
|
|
|
965
1230
|
*/
|
|
966
1231
|
response_format?: Shared.ResponseFormat;
|
|
967
1232
|
|
|
1233
|
+
/**
|
|
1234
|
+
* Built-in and request-scoped inline skills available to the model. Skill metadata
|
|
1235
|
+
* is disclosed to the model up front; full instructions are loaded on demand
|
|
1236
|
+
* through the `load_skill` tool. Selecting any skill enables the sandbox tool for
|
|
1237
|
+
* the request. Requests with skills run on the durable backend and skills are not
|
|
1238
|
+
* echoed back on Response objects.
|
|
1239
|
+
*/
|
|
1240
|
+
skills?: Array<ResponsesCreateParams.BuiltinSkill | ResponsesCreateParams.InlineSkill>;
|
|
1241
|
+
|
|
968
1242
|
/**
|
|
969
1243
|
* OpenAI-compatible storage toggle. When false, the response is hidden from later
|
|
970
1244
|
* retrieve calls, and the echoed response reports `store: false`. It can still be
|
|
@@ -999,6 +1273,45 @@ export namespace ResponsesCreateParams {
|
|
|
999
1273
|
effort?: 'minimal' | 'low' | 'medium' | 'high' | 'xhigh';
|
|
1000
1274
|
}
|
|
1001
1275
|
|
|
1276
|
+
/**
|
|
1277
|
+
* Selects a built-in skill from the catalog by name.
|
|
1278
|
+
*/
|
|
1279
|
+
export interface BuiltinSkill {
|
|
1280
|
+
/**
|
|
1281
|
+
* Built-in skill to make available to the model. office is the full Office bundle
|
|
1282
|
+
* (enables all four leaves). office/docx, office/pdf, office/pptx, office/xlsx
|
|
1283
|
+
* each create polished documents of that type from scratch, with structural
|
|
1284
|
+
* validation and visual QA.
|
|
1285
|
+
*/
|
|
1286
|
+
name: 'office' | 'office/docx' | 'office/pdf' | 'office/pptx' | 'office/xlsx';
|
|
1287
|
+
|
|
1288
|
+
type: 'builtin';
|
|
1289
|
+
}
|
|
1290
|
+
|
|
1291
|
+
/**
|
|
1292
|
+
* Request-scoped skill defined inline. Inline skills have no files or sandbox
|
|
1293
|
+
* mounts and are never echoed back in the response.
|
|
1294
|
+
*/
|
|
1295
|
+
export interface InlineSkill {
|
|
1296
|
+
/**
|
|
1297
|
+
* Short discovery description, limited to 1,024 UTF-8 bytes.
|
|
1298
|
+
*/
|
|
1299
|
+
description: string;
|
|
1300
|
+
|
|
1301
|
+
/**
|
|
1302
|
+
* Instructions returned by `load_skill`, limited to 65,536 UTF-8 bytes per skill
|
|
1303
|
+
* and 262,144 bytes across the request.
|
|
1304
|
+
*/
|
|
1305
|
+
instructions: string;
|
|
1306
|
+
|
|
1307
|
+
/**
|
|
1308
|
+
* Request-scoped lowercase ASCII name separated by single hyphens.
|
|
1309
|
+
*/
|
|
1310
|
+
name: string;
|
|
1311
|
+
|
|
1312
|
+
type: 'inline';
|
|
1313
|
+
}
|
|
1314
|
+
|
|
1002
1315
|
export interface WebSearchTool {
|
|
1003
1316
|
type: 'web_search';
|
|
1004
1317
|
|
|
@@ -1332,7 +1645,7 @@ export interface ResponseCreateParamsBase {
|
|
|
1332
1645
|
|
|
1333
1646
|
/**
|
|
1334
1647
|
* Maximum number of research loop steps. If provided, overrides the preset's
|
|
1335
|
-
* max_steps value. Must be >= 1 if specified. Maximum allowed is
|
|
1648
|
+
* max_steps value. Must be >= 1 if specified. Maximum allowed is 100.
|
|
1336
1649
|
*/
|
|
1337
1650
|
max_steps?: number;
|
|
1338
1651
|
|
|
@@ -1373,6 +1686,15 @@ export interface ResponseCreateParamsBase {
|
|
|
1373
1686
|
*/
|
|
1374
1687
|
response_format?: Shared.ResponseFormat;
|
|
1375
1688
|
|
|
1689
|
+
/**
|
|
1690
|
+
* Built-in and request-scoped inline skills available to the model. Skill metadata
|
|
1691
|
+
* is disclosed to the model up front; full instructions are loaded on demand
|
|
1692
|
+
* through the `load_skill` tool. Selecting any skill enables the sandbox tool for
|
|
1693
|
+
* the request. Requests with skills run on the durable backend and skills are not
|
|
1694
|
+
* echoed back on Response objects.
|
|
1695
|
+
*/
|
|
1696
|
+
skills?: Array<ResponseCreateParams.BuiltinSkill | ResponseCreateParams.InlineSkill>;
|
|
1697
|
+
|
|
1376
1698
|
/**
|
|
1377
1699
|
* OpenAI-compatible storage toggle. When false, the response is hidden from later
|
|
1378
1700
|
* retrieve calls, and the echoed response reports `store: false`. It can still be
|
|
@@ -1407,6 +1729,45 @@ export namespace ResponseCreateParams {
|
|
|
1407
1729
|
effort?: 'minimal' | 'low' | 'medium' | 'high' | 'xhigh';
|
|
1408
1730
|
}
|
|
1409
1731
|
|
|
1732
|
+
/**
|
|
1733
|
+
* Selects a built-in skill from the catalog by name.
|
|
1734
|
+
*/
|
|
1735
|
+
export interface BuiltinSkill {
|
|
1736
|
+
/**
|
|
1737
|
+
* Built-in skill to make available to the model. office is the full Office bundle
|
|
1738
|
+
* (enables all four leaves). office/docx, office/pdf, office/pptx, office/xlsx
|
|
1739
|
+
* each create polished documents of that type from scratch, with structural
|
|
1740
|
+
* validation and visual QA.
|
|
1741
|
+
*/
|
|
1742
|
+
name: 'office' | 'office/docx' | 'office/pdf' | 'office/pptx' | 'office/xlsx';
|
|
1743
|
+
|
|
1744
|
+
type: 'builtin';
|
|
1745
|
+
}
|
|
1746
|
+
|
|
1747
|
+
/**
|
|
1748
|
+
* Request-scoped skill defined inline. Inline skills have no files or sandbox
|
|
1749
|
+
* mounts and are never echoed back in the response.
|
|
1750
|
+
*/
|
|
1751
|
+
export interface InlineSkill {
|
|
1752
|
+
/**
|
|
1753
|
+
* Short discovery description, limited to 1,024 UTF-8 bytes.
|
|
1754
|
+
*/
|
|
1755
|
+
description: string;
|
|
1756
|
+
|
|
1757
|
+
/**
|
|
1758
|
+
* Instructions returned by `load_skill`, limited to 65,536 UTF-8 bytes per skill
|
|
1759
|
+
* and 262,144 bytes across the request.
|
|
1760
|
+
*/
|
|
1761
|
+
instructions: string;
|
|
1762
|
+
|
|
1763
|
+
/**
|
|
1764
|
+
* Request-scoped lowercase ASCII name separated by single hyphens.
|
|
1765
|
+
*/
|
|
1766
|
+
name: string;
|
|
1767
|
+
|
|
1768
|
+
type: 'inline';
|
|
1769
|
+
}
|
|
1770
|
+
|
|
1410
1771
|
export interface WebSearchTool {
|
|
1411
1772
|
type: 'web_search';
|
|
1412
1773
|
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.37.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.37.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.37.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.37.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|