@talonic/docs 0.8.1 → 0.9.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/dist/index.d.ts CHANGED
@@ -2192,6 +2192,30 @@ declare const OPENAPI_SPEC: {
2192
2192
  };
2193
2193
  };
2194
2194
  };
2195
+ '/v1/agent/context': {
2196
+ get: {
2197
+ operationId: string;
2198
+ summary: string;
2199
+ tags: string[];
2200
+ responses: {
2201
+ '200': {
2202
+ description: string;
2203
+ };
2204
+ };
2205
+ };
2206
+ };
2207
+ '/v1/agent/tools': {
2208
+ get: {
2209
+ operationId: string;
2210
+ summary: string;
2211
+ tags: string[];
2212
+ responses: {
2213
+ '200': {
2214
+ description: string;
2215
+ };
2216
+ };
2217
+ };
2218
+ };
2195
2219
  };
2196
2220
  };
2197
2221
  declare const API_FAQ: {
package/dist/index.js CHANGED
@@ -533,7 +533,7 @@ var NAV_SECTIONS = [
533
533
  },
534
534
  {
535
535
  id: "sources",
536
- label: "Inputs",
536
+ label: "Sources",
537
537
  children: [
538
538
  { id: "list-sources", label: "List Inputs" },
539
539
  { id: "create-source", label: "Create Input" },
@@ -685,6 +685,14 @@ var NAV_SECTIONS = [
685
685
  { id: "webhook-retries", label: "Retry Policy" }
686
686
  ]
687
687
  },
688
+ {
689
+ id: "agent",
690
+ label: "Agent",
691
+ children: [
692
+ { id: "agent-context", label: "Get Workspace Context" },
693
+ { id: "agent-tools", label: "List Agent Tools" }
694
+ ]
695
+ },
688
696
  {
689
697
  id: "errors-rate-limits",
690
698
  label: "Errors & Rate Limits",
@@ -3306,6 +3314,68 @@ function verifyWebhook(payload, signature, secret) {
3306
3314
  ] })
3307
3315
  ] }) }),
3308
3316
  /* @__PURE__ */ jsx5("p", { className: "text-[14px] text-void-text-muted leading-relaxed", children: "After 4 failed attempts, the delivery is marked as failed. You can check delivery status and replay events from the dashboard." }),
3317
+ /* @__PURE__ */ jsx5(SectionHeading, { id: "agent", children: "Agent" }),
3318
+ /* @__PURE__ */ jsx5("p", { className: "text-[15px] text-void-text-secondary leading-relaxed mb-6", children: "The Agent API provides programmatic access to the same AI assistant capabilities available in the Talonic platform UI. Use the context endpoint to retrieve a comprehensive workspace snapshot, and the tools endpoint to discover all available agent capabilities." }),
3319
+ /* @__PURE__ */ jsx5("div", { id: "agent-context", className: "scroll-mt-6", children: /* @__PURE__ */ jsx5(
3320
+ EndpointBlock,
3321
+ {
3322
+ method: "GET",
3323
+ path: "/v1/agent/context",
3324
+ summary: "Returns a comprehensive workspace overview including document stats, schemas, active runs, field registry summary, and recent activity.",
3325
+ description: "Requires read scope. Use this endpoint to build dashboards or provide context to external AI integrations.",
3326
+ children: /* @__PURE__ */ jsx5(CodeBlock, { title: "Response", children: `{
3327
+ "organizationName": "Phoenix",
3328
+ "documents": {
3329
+ "total": 810,
3330
+ "completedThisWeek": 155,
3331
+ "completedLast24h": 42,
3332
+ "processing": 3
3333
+ },
3334
+ "documentTypes": [
3335
+ { "id": "uuid", "name": "Invoice", "documentCount": 320 }
3336
+ ],
3337
+ "schemas": [
3338
+ { "id": "uuid", "name": "Invoice Header", "fieldCount": 12, "version": 3 }
3339
+ ],
3340
+ "activeRuns": [
3341
+ { "id": "uuid", "name": "Schema_V13", "status": "extraction", "documentCount": 142 }
3342
+ ],
3343
+ "fieldRegistry": {
3344
+ "totalFields": 245,
3345
+ "tier1": 80,
3346
+ "tier2": 120,
3347
+ "tier3": 45
3348
+ },
3349
+ "recentActivity": [
3350
+ {
3351
+ "type": "user_uploaded",
3352
+ "message": "42 documents uploaded",
3353
+ "timestamp": "2026-04-25T09:30:00Z",
3354
+ "actor": "Avi"
3355
+ }
3356
+ ]
3357
+ }` })
3358
+ }
3359
+ ) }),
3360
+ /* @__PURE__ */ jsx5("div", { id: "agent-tools", className: "scroll-mt-6", children: /* @__PURE__ */ jsx5(
3361
+ EndpointBlock,
3362
+ {
3363
+ method: "GET",
3364
+ path: "/v1/agent/tools",
3365
+ summary: "Lists all tools available to the embedded agent, including their impact level and description.",
3366
+ description: "Requires read scope. Each tool declares whether it performs a read or write operation.",
3367
+ children: /* @__PURE__ */ jsx5(CodeBlock, { title: "Response", children: `{
3368
+ "tools": [
3369
+ {
3370
+ "name": "list_schemas",
3371
+ "impact": "read",
3372
+ "description": "Lists all user-defined schemas."
3373
+ }
3374
+ ],
3375
+ "totalCount": 35
3376
+ }` })
3377
+ }
3378
+ ) }),
3309
3379
  /* @__PURE__ */ jsx5(SectionHeading, { id: "errors-rate-limits", children: "Errors & Rate Limits" }),
3310
3380
  /* @__PURE__ */ jsx5(SubHeading, { id: "error-format", children: "Error Format" }),
3311
3381
  /* @__PURE__ */ jsx5("p", { className: "text-[15px] text-void-text-secondary leading-relaxed mb-4", children: "All errors return a consistent JSON structure with a machine-readable code and a human-readable message." }),
@@ -3425,6 +3495,15 @@ var NAV_SECTIONS2 = [
3425
3495
  { id: "getting-started", label: "Getting Started" }
3426
3496
  ]
3427
3497
  },
3498
+ {
3499
+ id: "agent",
3500
+ label: "AI Agent",
3501
+ children: [
3502
+ { id: "agent-capabilities", label: "Capabilities" },
3503
+ { id: "agent-impact", label: "Impact Levels" },
3504
+ { id: "agent-dashboard", label: "Dashboard" }
3505
+ ]
3506
+ },
3428
3507
  {
3429
3508
  id: "sources-docs",
3430
3509
  label: "Inputs & Documents",
@@ -3679,7 +3758,7 @@ function PlatformGuide({ LinkComponent }) {
3679
3758
  /* @__PURE__ */ jsx6(MockNavItem, { label: "Dashboard" }),
3680
3759
  /* @__PURE__ */ jsx6(MockNavItem, { label: "Sources", active: true }),
3681
3760
  /* @__PURE__ */ jsx6(MockNavItem, { label: "Documents", indent: true }),
3682
- /* @__PURE__ */ jsx6(MockNavItem, { label: "Field Library", indent: true }),
3761
+ /* @__PURE__ */ jsx6(MockNavItem, { label: "Field Registry", indent: true }),
3683
3762
  /* @__PURE__ */ jsx6(MockNavItem, { label: "Structuring" }),
3684
3763
  /* @__PURE__ */ jsx6(MockNavItem, { label: "Schemas", indent: true }),
3685
3764
  /* @__PURE__ */ jsx6(MockNavItem, { label: "Cases", indent: true }),
@@ -3695,6 +3774,51 @@ function PlatformGuide({ LinkComponent }) {
3695
3774
  /* @__PURE__ */ jsx6("strong", { children: "Structuring \u2192 Runs \u2192 New" }),
3696
3775
  " to create your first extraction job."
3697
3776
  ] }),
3777
+ /* @__PURE__ */ jsx6(SectionHeading, { id: "agent", children: "AI Agent" }),
3778
+ /* @__PURE__ */ jsxs6(P, { children: [
3779
+ "Talonic includes an embedded AI agent accessible from every page via",
3780
+ " ",
3781
+ /* @__PURE__ */ jsx6("kbd", { className: "px-1.5 py-0.5 text-[11px] font-mono bg-void-surface-2 border border-void-border rounded", children: "\u2318I" }),
3782
+ " ",
3783
+ "(",
3784
+ /* @__PURE__ */ jsx6("kbd", { className: "px-1.5 py-0.5 text-[11px] font-mono bg-void-surface-2 border border-void-border rounded", children: "Ctrl+I" }),
3785
+ " on Windows). The agent understands your workspace context and can inspect schemas, search documents, analyze extraction quality, explore cases, and build schemas \u2014 all through natural language."
3786
+ ] }),
3787
+ /* @__PURE__ */ jsx6(SubHeading, { id: "agent-capabilities", children: "What the Agent Can Do" }),
3788
+ /* @__PURE__ */ jsx6(P, { children: "The agent has deep access to your workspace and can help with:" }),
3789
+ /* @__PURE__ */ jsx6(
3790
+ ParamTable,
3791
+ {
3792
+ title: "Agent capabilities",
3793
+ params: [
3794
+ { name: "Workspace overview", type: "read", description: "Document stats, recent activity, and schema health at a glance." },
3795
+ { name: "Schema management", type: "read / draft", description: "List, inspect, create drafts, add fields, and publish schemas." },
3796
+ { name: "Document exploration", type: "read", description: "Search documents, view extracted fields, and read OCR markdown." },
3797
+ { name: "Extraction analysis", type: "read", description: "Run status, telemetry (capture/resolve/synthesize rates), and grid stats." },
3798
+ { name: "Field registry", type: "read", description: "Browse discovered fields, check promotion candidates, and view semantic clusters." },
3799
+ { name: "Cases & linking", type: "read", description: "List cases, explore document connections, and view anomalies." },
3800
+ { name: "Quality", type: "read", description: "Benchmark results and regression detection between runs." },
3801
+ { name: "Delivery", type: "read", description: "Check delivery status and preview binding output." }
3802
+ ]
3803
+ }
3804
+ ),
3805
+ /* @__PURE__ */ jsx6(SubHeading, { id: "agent-impact", children: "Impact Levels" }),
3806
+ /* @__PURE__ */ jsx6(P, { children: "Every agent action is classified into an impact level that determines how it executes. Higher-impact operations require progressively more explicit confirmation." }),
3807
+ /* @__PURE__ */ jsx6(
3808
+ ParamTable,
3809
+ {
3810
+ title: "Impact levels",
3811
+ params: [
3812
+ { name: "read", type: "impact", description: "Executed immediately with no side effects. Queries, searches, and inspections." },
3813
+ { name: "draft_mutation", type: "impact", description: "Creates or modifies drafts. Workshop-first \u2014 nothing is published without confirmation." },
3814
+ { name: "live_mutation", type: "impact", description: "Requires explicit user confirmation before executing. Affects live data." },
3815
+ { name: "irreversible", type: "impact", description: 'Requires keyword confirmation (e.g., typing "DELETE"). Cannot be undone.' }
3816
+ ]
3817
+ }
3818
+ ),
3819
+ /* @__PURE__ */ jsx6(Callout, { children: "The agent always operates workshop-first: schema changes create drafts, not live versions. You review and publish when ready." }),
3820
+ /* @__PURE__ */ jsx6(SubHeading, { id: "agent-dashboard", children: "Dashboard Integration" }),
3821
+ /* @__PURE__ */ jsx6(P, { children: "The home page (click the Talonic logo) shows smart suggested prompts based on your workspace state. Prompts adapt to what is happening: active runs, schema creation opportunities, document types waiting for extraction. The agent input field lets you type any question directly from the dashboard." }),
3698
3822
  /* @__PURE__ */ jsx6(SectionHeading, { id: "sources-docs", children: "Inputs & Documents" }),
3699
3823
  /* @__PURE__ */ jsx6(P, { children: "Sources are the entry point for all data. Every document belongs to a source \u2014 whether uploaded manually, synced from Google Drive, or ingested via API." }),
3700
3824
  /* @__PURE__ */ jsx6(SubHeading, { id: "uploading", children: "Uploading Documents" }),
@@ -3828,10 +3952,10 @@ function PlatformGuide({ LinkComponent }) {
3828
3952
  /* @__PURE__ */ jsx6(SubHeading, { id: "field-registry", children: "Field Registry" }),
3829
3953
  /* @__PURE__ */ jsxs6(P, { children: [
3830
3954
  "Navigate to ",
3831
- /* @__PURE__ */ jsx6("strong", { children: "Sources Inputs \u2192rarr; Field Library" }),
3955
+ /* @__PURE__ */ jsx6("strong", { children: "Sources \u2192 Field Registry" }),
3832
3956
  " to explore the registry. Every canonical field is displayed with its tier, data type, occurrence count, and document types."
3833
3957
  ] }),
3834
- /* @__PURE__ */ jsx6(UiExcerpt, { title: "Field Library \u2014 Registry Table", caption: "Fields are organized by tier with occurrence counts, data types, and master instruction status.", children: /* @__PURE__ */ jsx6("div", { className: "border border-void-border rounded-lg overflow-hidden", children: /* @__PURE__ */ jsxs6("table", { className: "w-full text-[12px]", children: [
3958
+ /* @__PURE__ */ jsx6(UiExcerpt, { title: "Field Registry \u2014 Registry Table", caption: "Fields are organized by tier with occurrence counts, data types, and master instruction status.", children: /* @__PURE__ */ jsx6("div", { className: "border border-void-border rounded-lg overflow-hidden", children: /* @__PURE__ */ jsxs6("table", { className: "w-full text-[12px]", children: [
3835
3959
  /* @__PURE__ */ jsx6("thead", { children: /* @__PURE__ */ jsxs6("tr", { className: "bg-void-surface-2/50 border-b border-void-border", children: [
3836
3960
  /* @__PURE__ */ jsx6("th", { className: "text-left px-3 py-2 text-[10px] text-void-text-muted font-medium uppercase tracking-wider", children: "Field Name" }),
3837
3961
  /* @__PURE__ */ jsx6("th", { className: "text-left px-3 py-2 text-[10px] text-void-text-muted font-medium uppercase tracking-wider", children: "Tier" }),
@@ -3886,7 +4010,7 @@ function PlatformGuide({ LinkComponent }) {
3886
4010
  /* @__PURE__ */ jsxs6(Callout, { children: [
3887
4011
  "Click ",
3888
4012
  /* @__PURE__ */ jsx6("strong", { children: '"Synthesize All"' }),
3889
- " in the Field Library to generate instructions for all qualifying fields. This runs the combined pipeline: embed \u2192 resolve \u2192 synthesize."
4013
+ " in the Field Registry to generate instructions for all qualifying fields. This runs the combined pipeline: embed \u2192 resolve \u2192 synthesize."
3890
4014
  ] }),
3891
4015
  /* @__PURE__ */ jsx6(SectionHeading, { id: "schemas-templates", children: "Schemas & Templates" }),
3892
4016
  /* @__PURE__ */ jsx6(P, { children: "Schemas define the structure of your output data. There are two types: AI-generated schemas created per document type, and user templates you define yourself." }),
@@ -4703,7 +4827,7 @@ var API_NAV_SECTIONS = [
4703
4827
  { id: "get-job", label: "Get Job" },
4704
4828
  { id: "cancel-job", label: "Cancel Job" }
4705
4829
  ] },
4706
- { id: "sources", label: "Inputs", children: [
4830
+ { id: "sources", label: "Sources", children: [
4707
4831
  { id: "list-sources", label: "List Inputs" },
4708
4832
  { id: "create-source", label: "Create Input" },
4709
4833
  { id: "manage-source", label: "Get / Update / Delete" },
@@ -4796,6 +4920,10 @@ var API_NAV_SECTIONS = [
4796
4920
  { id: "credits-usage-daily", label: "Daily Usage" },
4797
4921
  { id: "credits-usage-log", label: "Usage Log" }
4798
4922
  ] },
4923
+ { id: "agent", label: "Agent", children: [
4924
+ { id: "agent-context", label: "Get Workspace Context" },
4925
+ { id: "agent-tools", label: "List Agent Tools" }
4926
+ ] },
4799
4927
  { id: "errors-rate-limits", label: "Errors & Rate Limits", children: [
4800
4928
  { id: "error-format", label: "Error Format" },
4801
4929
  { id: "error-codes", label: "Error Codes" },
@@ -4809,6 +4937,11 @@ var PLATFORM_NAV_SECTIONS = [
4809
4937
  { id: "platform-flow", label: "Platform Flow" },
4810
4938
  { id: "getting-started", label: "Getting Started" }
4811
4939
  ] },
4940
+ { id: "agent", label: "AI Agent", children: [
4941
+ { id: "agent-capabilities", label: "Capabilities" },
4942
+ { id: "agent-impact", label: "Impact Levels" },
4943
+ { id: "agent-dashboard", label: "Dashboard" }
4944
+ ] },
4812
4945
  { id: "sources-docs", label: "Inputs & Documents", children: [
4813
4946
  { id: "uploading", label: "Uploading Documents" },
4814
4947
  { id: "supported-formats", label: "Supported Formats" },
@@ -4902,10 +5035,12 @@ var API_SECTION_META = [
4902
5035
  { id: "structuring", title: "Structuring API", description: "Validation checks CRUD, approval gates with configurable rules, result check outcomes, pending approvals queue, and delivery triggers." },
4903
5036
  { id: "validation", title: "Validation API", description: "Golden sample management and validation runs for measuring extraction accuracy against ground truth datasets." },
4904
5037
  { id: "credits", title: "Credits API", description: "Credit balance, transaction history, aggregate usage summaries, daily usage breakdown, and per-request usage log." },
5038
+ { id: "agent", title: "Agent API", description: "Workspace context snapshot and agent tool discovery endpoints for programmatic access to embedded AI assistant capabilities." },
4905
5039
  { id: "errors-rate-limits", title: "Errors & Rate Limits", description: "Error response format, error codes, rate limit tiers by plan, and rate limit headers." }
4906
5040
  ];
4907
5041
  var PLATFORM_SECTION_META = [
4908
5042
  { id: "overview", title: "Platform Overview", description: "Core concepts, platform flow, and getting started guide for the Talonic document structuring platform." },
5043
+ { id: "agent", title: "AI Agent", description: "Embedded AI assistant accessible via Cmd+I from any page. Inspects schemas, searches documents, analyzes extraction quality, explores cases, and builds schemas through natural language." },
4909
5044
  { id: "sources-docs", title: "Inputs & Documents", description: "Upload documents via drag-and-drop, API, or connectors. 25+ formats supported with automatic OCR and classification." },
4910
5045
  { id: "field-intelligence", title: "Field Intelligence", description: "Unified field registry with tier system, semantic clustering, and AI-synthesized master extraction instructions." },
4911
5046
  { id: "schemas-templates", title: "Schemas & Templates", description: "AI-generated schemas per document type and user-defined templates with field matching, reference tables, and versioning." },
@@ -5277,6 +5412,13 @@ var OPENAPI_SPEC = {
5277
5412
  // Expanded: Reference Data
5278
5413
  "/v1/reference-data/create": {
5279
5414
  post: { operationId: "createReferenceDataJson", summary: "Create reference data from JSON", tags: ["Reference Data"], responses: { "201": { description: "Reference dataset created" } } }
5415
+ },
5416
+ // Agent
5417
+ "/v1/agent/context": {
5418
+ get: { operationId: "getAgentContext", summary: "Get comprehensive workspace context", tags: ["Agent"], responses: { "200": { description: "Workspace overview with documents, schemas, runs, field registry, and recent activity" } } }
5419
+ },
5420
+ "/v1/agent/tools": {
5421
+ get: { operationId: "listAgentTools", summary: "List all agent tools", tags: ["Agent"], responses: { "200": { description: "List of available agent tools with impact level and description" } } }
5280
5422
  }
5281
5423
  }
5282
5424
  };