@novalabai/adk 2.6.0 → 2.8.1

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.
Files changed (75) hide show
  1. package/dist/client.d.ts +15 -0
  2. package/dist/client.d.ts.map +1 -1
  3. package/dist/client.js +20 -0
  4. package/dist/client.js.map +1 -1
  5. package/dist/core/errors.d.ts +18 -0
  6. package/dist/core/errors.d.ts.map +1 -1
  7. package/dist/core/errors.js +21 -1
  8. package/dist/core/errors.js.map +1 -1
  9. package/dist/core/http.d.ts +15 -0
  10. package/dist/core/http.d.ts.map +1 -1
  11. package/dist/core/http.js +93 -3
  12. package/dist/core/http.js.map +1 -1
  13. package/dist/index.d.ts +16 -1
  14. package/dist/index.d.ts.map +1 -1
  15. package/dist/index.js +15 -2
  16. package/dist/index.js.map +1 -1
  17. package/dist/resources/auto-agent.d.ts +53 -0
  18. package/dist/resources/auto-agent.d.ts.map +1 -0
  19. package/dist/resources/auto-agent.js +61 -0
  20. package/dist/resources/auto-agent.js.map +1 -0
  21. package/dist/resources/billing.d.ts +14 -2
  22. package/dist/resources/billing.d.ts.map +1 -1
  23. package/dist/resources/billing.js +15 -1
  24. package/dist/resources/billing.js.map +1 -1
  25. package/dist/resources/chat.d.ts +27 -0
  26. package/dist/resources/chat.d.ts.map +1 -1
  27. package/dist/resources/chat.js +31 -0
  28. package/dist/resources/chat.js.map +1 -1
  29. package/dist/resources/files.d.ts +59 -0
  30. package/dist/resources/files.d.ts.map +1 -0
  31. package/dist/resources/files.js +59 -0
  32. package/dist/resources/files.js.map +1 -0
  33. package/dist/resources/history.d.ts +33 -1
  34. package/dist/resources/history.d.ts.map +1 -1
  35. package/dist/resources/history.js +43 -3
  36. package/dist/resources/history.js.map +1 -1
  37. package/dist/resources/planner.d.ts +66 -0
  38. package/dist/resources/planner.d.ts.map +1 -0
  39. package/dist/resources/planner.js +80 -0
  40. package/dist/resources/planner.js.map +1 -0
  41. package/dist/resources/repair.d.ts +73 -0
  42. package/dist/resources/repair.d.ts.map +1 -0
  43. package/dist/resources/repair.js +100 -0
  44. package/dist/resources/repair.js.map +1 -0
  45. package/dist/resources/voice.d.ts +47 -0
  46. package/dist/resources/voice.d.ts.map +1 -0
  47. package/dist/resources/voice.js +64 -0
  48. package/dist/resources/voice.js.map +1 -0
  49. package/dist/types/auto-agent.d.ts +64 -0
  50. package/dist/types/auto-agent.d.ts.map +1 -0
  51. package/dist/types/auto-agent.js +10 -0
  52. package/dist/types/auto-agent.js.map +1 -0
  53. package/dist/types/billing.d.ts +17 -0
  54. package/dist/types/billing.d.ts.map +1 -1
  55. package/dist/types/chat-stream.d.ts +166 -0
  56. package/dist/types/chat-stream.d.ts.map +1 -0
  57. package/dist/types/chat-stream.js +48 -0
  58. package/dist/types/chat-stream.js.map +1 -0
  59. package/dist/types/files.d.ts +18 -0
  60. package/dist/types/files.d.ts.map +1 -0
  61. package/dist/types/files.js +4 -0
  62. package/dist/types/files.js.map +1 -0
  63. package/dist/types/planner.d.ts +68 -0
  64. package/dist/types/planner.d.ts.map +1 -0
  65. package/dist/types/planner.js +11 -0
  66. package/dist/types/planner.js.map +1 -0
  67. package/dist/types/repair.d.ts +79 -0
  68. package/dist/types/repair.d.ts.map +1 -0
  69. package/dist/types/repair.js +16 -0
  70. package/dist/types/repair.js.map +1 -0
  71. package/dist/types/voice.d.ts +16 -0
  72. package/dist/types/voice.d.ts.map +1 -0
  73. package/dist/types/voice.js +4 -0
  74. package/dist/types/voice.js.map +1 -0
  75. package/package.json +1 -1
@@ -0,0 +1,18 @@
1
+ /** Types for Nova's file-upload API (chat attachments). */
2
+ export interface FileUploadResponse {
3
+ file_id: string;
4
+ /** The session this file is bound to (newly created if none was provided) */
5
+ session_id: string;
6
+ filename: string;
7
+ content_type: string;
8
+ /** Bytes */
9
+ size: number;
10
+ /** Backend storage key (null when running on local /tmp fallback) */
11
+ s3_key?: string | null;
12
+ /**
13
+ * First N chars of extracted text — what gets inlined into chat prompts.
14
+ * Empty for binary types we can't extract from.
15
+ */
16
+ extracted_head?: string | null;
17
+ }
18
+ //# sourceMappingURL=files.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../src/types/files.ts"],"names":[],"mappings":"AAAA,2DAA2D;AAE3D,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,6EAA6E;IAC7E,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,qEAAqE;IACrE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC"}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ /** Types for Nova's file-upload API (chat attachments). */
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ //# sourceMappingURL=files.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"files.js","sourceRoot":"","sources":["../../src/types/files.ts"],"names":[],"mappings":";AAAA,2DAA2D"}
@@ -0,0 +1,68 @@
1
+ /**
2
+ * Types for Nova's Planner API.
3
+ *
4
+ * The Planner takes a high-level goal, decomposes it into a DAG of agent
5
+ * steps, and runs each step against the right specialist. Each step's
6
+ * result lands in `result_summary` (short label) + `result_full` (full
7
+ * artifact body, e.g. complete deck HTML, document body, image URL).
8
+ */
9
+ /** Body for POST /v1/planner/plan. */
10
+ export interface PlanCreateRequest {
11
+ /** Plain-English goal — Nova decomposes it */
12
+ goal: string;
13
+ /** When true, the planner pulls user memory snippets to inform decomposition */
14
+ use_memory?: boolean;
15
+ }
16
+ /** One step in a Plan's DAG. */
17
+ export interface PlanStep {
18
+ id: string;
19
+ /** Specialist name — e.g. 'marketing', 'deck_builder' */
20
+ agent: string;
21
+ /** The instruction this step runs */
22
+ action: string;
23
+ params?: Record<string, unknown>;
24
+ /** Other step ids that must finish first */
25
+ depends_on?: string[];
26
+ requires_approval?: boolean;
27
+ rationale?: string;
28
+ /** Status flow: pending → running → succeeded / failed / waiting_approval / skipped */
29
+ status: string;
30
+ /**
31
+ * One-liner label like "Built slide deck (60KB)". Capped at 8000 chars
32
+ * to keep planner re-prompts small.
33
+ */
34
+ result_summary?: string | null;
35
+ /**
36
+ * Full artifact body when the step produced one (e.g. complete deck HTML).
37
+ * Use this to render previews; result_summary stays as the inline label.
38
+ */
39
+ result_full?: string | null;
40
+ model_used?: string | null;
41
+ duration_ms?: number | null;
42
+ }
43
+ /** A planner-generated DAG plus its execution state. */
44
+ export interface Plan {
45
+ id: string;
46
+ goal: string;
47
+ user_id: string;
48
+ steps: PlanStep[];
49
+ created_at: number;
50
+ /** draft / running / done / failed / cancelled */
51
+ status: string;
52
+ version: number;
53
+ /**
54
+ * The [ATTACHED FILES] block that was in scope when the plan was created.
55
+ * Prepended to every step's prompt at execute time so each specialist
56
+ * sees the uploaded files. Empty when no attachments were in scope.
57
+ */
58
+ attachments_context?: string;
59
+ }
60
+ /** Response from GET /v1/planner/plans. */
61
+ export interface PlanList {
62
+ plans: Plan[];
63
+ }
64
+ /** Response from GET /v1/planner/agents — every specialist the planner can call. */
65
+ export interface AgentList {
66
+ agents: Array<Record<string, unknown>>;
67
+ }
68
+ //# sourceMappingURL=planner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"planner.d.ts","sourceRoot":"","sources":["../../src/types/planner.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,sCAAsC;AACtC,MAAM,WAAW,iBAAiB;IAChC,8CAA8C;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,gFAAgF;IAChF,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,gCAAgC;AAChC,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,yDAAyD;IACzD,KAAK,EAAE,MAAM,CAAC;IACd,qCAAqC;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,4CAA4C;IAC5C,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uFAAuF;IACvF,MAAM,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED,wDAAwD;AACxD,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,kDAAkD;IAClD,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,2CAA2C;AAC3C,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,IAAI,EAAE,CAAC;CACf;AAED,oFAAoF;AACpF,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACxC"}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ /**
3
+ * Types for Nova's Planner API.
4
+ *
5
+ * The Planner takes a high-level goal, decomposes it into a DAG of agent
6
+ * steps, and runs each step against the right specialist. Each step's
7
+ * result lands in `result_summary` (short label) + `result_full` (full
8
+ * artifact body, e.g. complete deck HTML, document body, image URL).
9
+ */
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ //# sourceMappingURL=planner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"planner.js","sourceRoot":"","sources":["../../src/types/planner.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG"}
@@ -0,0 +1,79 @@
1
+ /**
2
+ * Types for Nova's Repair Agent API.
3
+ *
4
+ * The Repair Agent observes chat-pipeline failures, diagnoses them with
5
+ * a Sonnet-backed analyzer, proposes unified-diff fixes, and (optionally)
6
+ * opens an autonomous draft PR via the GitHub REST API.
7
+ *
8
+ * Phases:
9
+ * R1 narrative diagnosis (Sonnet writes 4-section markdown)
10
+ * R2 tool-using diagnosis (read files, grep, recurse)
11
+ * R3 unified-diff fix proposal
12
+ * R4 autonomous draft PR
13
+ */
14
+ /** One entry in the recent-cases list. */
15
+ export interface RepairCaseSummary {
16
+ case_id: string;
17
+ agent_id?: string | null;
18
+ task_id?: string | null;
19
+ error_class?: string | null;
20
+ error_message?: string | null;
21
+ created_at: number;
22
+ status: string;
23
+ has_diagnosis: boolean;
24
+ has_fix: boolean;
25
+ }
26
+ /** Response from GET /v1/repair/cases. */
27
+ export interface RepairCaseListResponse {
28
+ count: number;
29
+ /** Raw case dicts. Use case.case_id, case.status, case.agent_id, etc. */
30
+ cases: Array<Record<string, unknown>>;
31
+ }
32
+ /**
33
+ * Full case detail.
34
+ *
35
+ * Backend persists arbitrary fields per phase (R1 adds diagnosis_md,
36
+ * R3 adds fix_md, R4 adds pr_url, etc.). Common fields surfaced
37
+ * explicitly; full payload available via `raw`.
38
+ */
39
+ export interface RepairCase {
40
+ case_id: string;
41
+ agent_id?: string | null;
42
+ task_id?: string | null;
43
+ error_class?: string | null;
44
+ error_message?: string | null;
45
+ traceback_head?: string | null;
46
+ pipeline_tail?: Array<Record<string, unknown>> | null;
47
+ diagnosis_md?: string | null;
48
+ fix_md?: string | null;
49
+ pr_url?: string | null;
50
+ status: string;
51
+ created_at: number;
52
+ /** Full backend payload (every field the backend persisted). */
53
+ raw: Record<string, unknown>;
54
+ }
55
+ /** Response from POST /v1/repair/cases/{id}/propose-fix (R3). */
56
+ export interface ProposeFixResponse {
57
+ case_id: string;
58
+ /** Markdown-formatted unified diff or fix narrative */
59
+ fix_md: string;
60
+ /** True when the agent decided no confident fix exists for this case */
61
+ no_fix_proposed: boolean;
62
+ }
63
+ /** Response from POST /v1/repair/cases/{id}/apply-fix (R4). */
64
+ export interface ApplyFixResponse {
65
+ case_id: string;
66
+ /** True when a draft PR was opened successfully */
67
+ ok: boolean;
68
+ /** When ok=false: where the apply path stopped (e.g. 'no_patches', 'gh_failure') */
69
+ stage?: string | null;
70
+ /** Human-readable failure reason */
71
+ reason?: string | null;
72
+ /** Draft PR URL when ok=true */
73
+ pr_url?: string | null;
74
+ /** Branch name the patches landed on */
75
+ branch?: string | null;
76
+ /** How many file-level patches landed */
77
+ patches_applied: number;
78
+ }
79
+ //# sourceMappingURL=repair.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repair.d.ts","sourceRoot":"","sources":["../../src/types/repair.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,0CAA0C;AAC1C,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,OAAO,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,0CAA0C;AAC1C,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,yEAAyE;IACzE,KAAK,EAAE,KAAK,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,wCAAwC;IACxC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,yCAAyC;IACzC,eAAe,EAAE,MAAM,CAAC;CACzB"}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ /**
3
+ * Types for Nova's Repair Agent API.
4
+ *
5
+ * The Repair Agent observes chat-pipeline failures, diagnoses them with
6
+ * a Sonnet-backed analyzer, proposes unified-diff fixes, and (optionally)
7
+ * opens an autonomous draft PR via the GitHub REST API.
8
+ *
9
+ * Phases:
10
+ * R1 narrative diagnosis (Sonnet writes 4-section markdown)
11
+ * R2 tool-using diagnosis (read files, grep, recurse)
12
+ * R3 unified-diff fix proposal
13
+ * R4 autonomous draft PR
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ //# sourceMappingURL=repair.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repair.js","sourceRoot":"","sources":["../../src/types/repair.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG"}
@@ -0,0 +1,16 @@
1
+ /** Types for Nova's voice API (V1 — speech-to-text). */
2
+ export interface TranscribeResponse {
3
+ /** Transcribed text. Empty when error is non-null. */
4
+ text: string;
5
+ /** Server-side transcription duration in ms */
6
+ duration_ms: number;
7
+ /** Whisper model that handled the request, e.g. 'whisper-1' */
8
+ model_used: string;
9
+ /**
10
+ * Set when transcription failed: 'no_api_key', 'audio_empty',
11
+ * 'audio_too_large', 'http_<status>', or an exception class name.
12
+ * When error is set, text is empty — surface this to the user.
13
+ */
14
+ error: string | null;
15
+ }
16
+ //# sourceMappingURL=voice.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"voice.d.ts","sourceRoot":"","sources":["../../src/types/voice.ts"],"names":[],"mappings":"AAAA,wDAAwD;AAExD,MAAM,WAAW,kBAAkB;IACjC,sDAAsD;IACtD,IAAI,EAAE,MAAM,CAAC;IACb,+CAA+C;IAC/C,WAAW,EAAE,MAAM,CAAC;IACpB,+DAA+D;IAC/D,UAAU,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB"}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ /** Types for Nova's voice API (V1 — speech-to-text). */
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ //# sourceMappingURL=voice.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"voice.js","sourceRoot":"","sources":["../../src/types/voice.ts"],"names":[],"mappings":";AAAA,wDAAwD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@novalabai/adk",
3
- "version": "2.6.0",
3
+ "version": "2.8.1",
4
4
  "description": "NovaLab Agent Development Kit — Build, test, and deploy Nova AI agents with multi-agent orchestration, smart model routing, trust layer, and confidence scoring",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",