@roarkanalytics/sdk-mcp 4.0.1 → 4.2.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.
@@ -1653,6 +1653,199 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1653
1653
  },
1654
1654
  },
1655
1655
  },
1656
+ {
1657
+ name: 'list',
1658
+ endpoint: '/v1/agent-config',
1659
+ httpMethod: 'get',
1660
+ summary: 'List managed configs',
1661
+ description: 'List the managed agent configs in this project, most recent first.',
1662
+ stainlessPath: '(resource) agentConfig > (method) list',
1663
+ qualified: 'client.agentConfig.list',
1664
+ response:
1665
+ '{ data: { id: string; agentId: string; createdAt: string; key: string; productionRevisionId: string; stagingRevisionId: string; updatedAt: string; }[]; }',
1666
+ markdown:
1667
+ "## list\n\n`client.agentConfig.list(): { data: object[]; }`\n\n**get** `/v1/agent-config`\n\nList the managed agent configs in this project, most recent first.\n\n### Returns\n\n- `{ data: { id: string; agentId: string; createdAt: string; key: string; productionRevisionId: string; stagingRevisionId: string; updatedAt: string; }[]; }`\n\n - `data: { id: string; agentId: string; createdAt: string; key: string; productionRevisionId: string; stagingRevisionId: string; updatedAt: string; }[]`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst agentConfigs = await client.agentConfig.list();\n\nconsole.log(agentConfigs);\n```",
1668
+ perLanguage: {
1669
+ typescript: {
1670
+ method: 'client.agentConfig.list',
1671
+ example:
1672
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst agentConfigs = await client.agentConfig.list();\n\nconsole.log(agentConfigs.data);",
1673
+ },
1674
+ python: {
1675
+ method: 'agent_config.list',
1676
+ example:
1677
+ 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nagent_configs = client.agent_config.list()\nprint(agent_configs.data)',
1678
+ },
1679
+ http: {
1680
+ example:
1681
+ 'curl https://api.roark.ai/v1/agent-config \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
1682
+ },
1683
+ },
1684
+ },
1685
+ {
1686
+ name: 'getById',
1687
+ endpoint: '/v1/agent-config/{key}',
1688
+ httpMethod: 'get',
1689
+ summary: 'Get a managed config',
1690
+ description: 'Fetch one managed config with its channel pointers and recent revisions, newest first.',
1691
+ stainlessPath: '(resource) agentConfig > (method) getById',
1692
+ qualified: 'client.agentConfig.getByID',
1693
+ params: ['key: string;'],
1694
+ response:
1695
+ "{ data: { id: string; agentId: string; createdAt: string; key: string; productionRevisionId: string; revisions: { id: string; createdAt: string; createdByType: 'CUSTOMER' | 'AUTOIMPROVE'; document: object; parentRevisionId: string; summary: string; }[]; stagingRevisionId: string; updatedAt: string; }; }",
1696
+ markdown:
1697
+ "## getById\n\n`client.agentConfig.getByID(key: string): { data: object; }`\n\n**get** `/v1/agent-config/{key}`\n\nFetch one managed config with its channel pointers and recent revisions, newest first.\n\n### Parameters\n\n- `key: string`\n\n### Returns\n\n- `{ data: { id: string; agentId: string; createdAt: string; key: string; productionRevisionId: string; revisions: { id: string; createdAt: string; createdByType: 'CUSTOMER' | 'AUTOIMPROVE'; document: object; parentRevisionId: string; summary: string; }[]; stagingRevisionId: string; updatedAt: string; }; }`\n\n - `data: { id: string; agentId: string; createdAt: string; key: string; productionRevisionId: string; revisions: { id: string; createdAt: string; createdByType: 'CUSTOMER' | 'AUTOIMPROVE'; document: object; parentRevisionId: string; summary: string; }[]; stagingRevisionId: string; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.agentConfig.getByID('x');\n\nconsole.log(response);\n```",
1698
+ perLanguage: {
1699
+ typescript: {
1700
+ method: 'client.agentConfig.getByID',
1701
+ example:
1702
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.agentConfig.getByID('x');\n\nconsole.log(response.data);",
1703
+ },
1704
+ python: {
1705
+ method: 'agent_config.get_by_id',
1706
+ example:
1707
+ 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nresponse = client.agent_config.get_by_id(\n "x",\n)\nprint(response.data)',
1708
+ },
1709
+ http: {
1710
+ example:
1711
+ 'curl https://api.roark.ai/v1/agent-config/$KEY \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
1712
+ },
1713
+ },
1714
+ },
1715
+ {
1716
+ name: 'update',
1717
+ endpoint: '/v1/agent-config/{key}',
1718
+ httpMethod: 'put',
1719
+ summary: 'Write a config revision',
1720
+ description:
1721
+ 'Write a new revision onto a channel. Writing production creates the key when it does not exist; writing staging stages a candidate that only Roark-recognized simulation sessions will read. Every write is a new revision; nothing is overwritten.',
1722
+ stainlessPath: '(resource) agentConfig > (method) update',
1723
+ qualified: 'client.agentConfig.update',
1724
+ params: [
1725
+ 'key: string;',
1726
+ "channel: 'production' | 'staging';",
1727
+ 'document: object;',
1728
+ 'agentId?: string;',
1729
+ 'summary?: string;',
1730
+ ],
1731
+ response:
1732
+ '{ data: { id: string; agentId: string; createdAt: string; key: string; productionRevisionId: string; stagingRevisionId: string; updatedAt: string; }; }',
1733
+ markdown:
1734
+ "## update\n\n`client.agentConfig.update(key: string, channel: 'production' | 'staging', document: object, agentId?: string, summary?: string): { data: object; }`\n\n**put** `/v1/agent-config/{key}`\n\nWrite a new revision onto a channel. Writing production creates the key when it does not exist; writing staging stages a candidate that only Roark-recognized simulation sessions will read. Every write is a new revision; nothing is overwritten.\n\n### Parameters\n\n- `key: string`\n\n- `channel: 'production' | 'staging'`\n Which channel to write.\n\n- `document: object`\n The full config JSON for the new revision.\n\n- `agentId?: string`\n Link this config to a Roark agent (the one your calls report). Required before Autoimprove can run on it: the link is how a fix finds the config channel.\n\n- `summary?: string`\n One-line story of the change.\n\n### Returns\n\n- `{ data: { id: string; agentId: string; createdAt: string; key: string; productionRevisionId: string; stagingRevisionId: string; updatedAt: string; }; }`\n\n - `data: { id: string; agentId: string; createdAt: string; key: string; productionRevisionId: string; stagingRevisionId: string; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst agentConfig = await client.agentConfig.update('x', {\n channel: 'production',\n document: { foo: 'string' },\n});\n\nconsole.log(agentConfig);\n```",
1735
+ perLanguage: {
1736
+ typescript: {
1737
+ method: 'client.agentConfig.update',
1738
+ example:
1739
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst agentConfig = await client.agentConfig.update('x', {\n channel: 'production',\n document: { foo: 'string' },\n});\n\nconsole.log(agentConfig.data);",
1740
+ },
1741
+ python: {
1742
+ method: 'agent_config.update',
1743
+ example:
1744
+ 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nagent_config = client.agent_config.update(\n key="x",\n channel="production",\n document={\n "foo": "string",\n },\n)\nprint(agent_config.data)',
1745
+ },
1746
+ http: {
1747
+ example:
1748
+ 'curl https://api.roark.ai/v1/agent-config/$KEY \\\n -X PUT \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN" \\\n -d \'{\n "channel": "production",\n "document": {\n "foo": "string"\n }\n }\'',
1749
+ },
1750
+ },
1751
+ },
1752
+ {
1753
+ name: 'resolve',
1754
+ endpoint: '/v1/agent-config/{key}/resolve',
1755
+ httpMethod: 'post',
1756
+ summary: 'Resolve config for a session',
1757
+ description:
1758
+ 'The call your agent makes at session start. Returns the config JSON for this session, with per-session simulation recognition built in: when the session was originated by a Roark simulation (matched by caller number against the calls Roark has in flight), the STAGING revision is served for that session only, so Autoimprove candidates are tested on your real deployment. Real traffic always resolves to production; any recognition miss degrades to production too.\n\nOn the first fetch of an unknown key, pass `defaults` (your baked-in config): the key is registered and the defaults become revision 1. That makes integration a single call.\n\nCache the response per session; do not fetch per turn.',
1759
+ stainlessPath: '(resource) agentConfig > (method) resolve',
1760
+ qualified: 'client.agentConfig.resolve',
1761
+ params: [
1762
+ 'key: string;',
1763
+ 'defaults?: object;',
1764
+ 'session?: { calledNumber?: string; callerNumber?: string; sessionId?: string; };',
1765
+ ],
1766
+ response:
1767
+ "{ data: { channel: 'production' | 'staging'; document: object; key: string; revisionId: string; simulationJobId: string; }; }",
1768
+ markdown:
1769
+ "## resolve\n\n`client.agentConfig.resolve(key: string, defaults?: object, session?: { calledNumber?: string; callerNumber?: string; sessionId?: string; }): { data: object; }`\n\n**post** `/v1/agent-config/{key}/resolve`\n\nThe call your agent makes at session start. Returns the config JSON for this session, with per-session simulation recognition built in: when the session was originated by a Roark simulation (matched by caller number against the calls Roark has in flight), the STAGING revision is served for that session only, so Autoimprove candidates are tested on your real deployment. Real traffic always resolves to production; any recognition miss degrades to production too.\n\nOn the first fetch of an unknown key, pass `defaults` (your baked-in config): the key is registered and the defaults become revision 1. That makes integration a single call.\n\nCache the response per session; do not fetch per turn.\n\n### Parameters\n\n- `key: string`\n\n- `defaults?: object`\n Your baked-in config. On the first fetch of an unknown key this registers the config and becomes revision 1, so integration is a single call. Ignored once the key exists.\n\n- `session?: { calledNumber?: string; callerNumber?: string; sessionId?: string; }`\n Session context. When the call was originated by a Roark simulation, Roark recognizes it here and serves the staging revision for this session only; real traffic always gets production.\n\n### Returns\n\n- `{ data: { channel: 'production' | 'staging'; document: object; key: string; revisionId: string; simulationJobId: string; }; }`\n\n - `data: { channel: 'production' | 'staging'; document: object; key: string; revisionId: string; simulationJobId: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.agentConfig.resolve('x');\n\nconsole.log(response);\n```",
1770
+ perLanguage: {
1771
+ typescript: {
1772
+ method: 'client.agentConfig.resolve',
1773
+ example:
1774
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.agentConfig.resolve('x');\n\nconsole.log(response.data);",
1775
+ },
1776
+ python: {
1777
+ method: 'agent_config.resolve',
1778
+ example:
1779
+ 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nresponse = client.agent_config.resolve(\n key="x",\n)\nprint(response.data)',
1780
+ },
1781
+ http: {
1782
+ example:
1783
+ 'curl https://api.roark.ai/v1/agent-config/$KEY/resolve \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
1784
+ },
1785
+ },
1786
+ },
1787
+ {
1788
+ name: 'promote',
1789
+ endpoint: '/v1/agent-config/{key}/promote',
1790
+ httpMethod: 'post',
1791
+ summary: 'Promote staging to production',
1792
+ description:
1793
+ 'Point the production channel at the staging revision. Real traffic reads it from the next session onward; roll back by writing the prior revision id to production (the chain preserves every state).',
1794
+ stainlessPath: '(resource) agentConfig > (method) promote',
1795
+ qualified: 'client.agentConfig.promote',
1796
+ params: ['key: string;'],
1797
+ response:
1798
+ '{ data: { id: string; agentId: string; createdAt: string; key: string; productionRevisionId: string; stagingRevisionId: string; updatedAt: string; }; }',
1799
+ markdown:
1800
+ "## promote\n\n`client.agentConfig.promote(key: string): { data: object; }`\n\n**post** `/v1/agent-config/{key}/promote`\n\nPoint the production channel at the staging revision. Real traffic reads it from the next session onward; roll back by writing the prior revision id to production (the chain preserves every state).\n\n### Parameters\n\n- `key: string`\n\n### Returns\n\n- `{ data: { id: string; agentId: string; createdAt: string; key: string; productionRevisionId: string; stagingRevisionId: string; updatedAt: string; }; }`\n\n - `data: { id: string; agentId: string; createdAt: string; key: string; productionRevisionId: string; stagingRevisionId: string; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.agentConfig.promote('x');\n\nconsole.log(response);\n```",
1801
+ perLanguage: {
1802
+ typescript: {
1803
+ method: 'client.agentConfig.promote',
1804
+ example:
1805
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.agentConfig.promote('x');\n\nconsole.log(response.data);",
1806
+ },
1807
+ python: {
1808
+ method: 'agent_config.promote',
1809
+ example:
1810
+ 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nresponse = client.agent_config.promote(\n "x",\n)\nprint(response.data)',
1811
+ },
1812
+ http: {
1813
+ example:
1814
+ 'curl https://api.roark.ai/v1/agent-config/$KEY/promote \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
1815
+ },
1816
+ },
1817
+ },
1818
+ {
1819
+ name: 'deleteStaging',
1820
+ endpoint: '/v1/agent-config/{key}/staging',
1821
+ httpMethod: 'delete',
1822
+ summary: 'Discard the staging revision',
1823
+ description:
1824
+ 'Clear the staging channel. Production is untouched; recognized simulation sessions go back to reading production.',
1825
+ stainlessPath: '(resource) agentConfig > (method) deleteStaging',
1826
+ qualified: 'client.agentConfig.deleteStaging',
1827
+ params: ['key: string;'],
1828
+ response:
1829
+ '{ data: { id: string; agentId: string; createdAt: string; key: string; productionRevisionId: string; stagingRevisionId: string; updatedAt: string; }; }',
1830
+ markdown:
1831
+ "## deleteStaging\n\n`client.agentConfig.deleteStaging(key: string): { data: object; }`\n\n**delete** `/v1/agent-config/{key}/staging`\n\nClear the staging channel. Production is untouched; recognized simulation sessions go back to reading production.\n\n### Parameters\n\n- `key: string`\n\n### Returns\n\n- `{ data: { id: string; agentId: string; createdAt: string; key: string; productionRevisionId: string; stagingRevisionId: string; updatedAt: string; }; }`\n\n - `data: { id: string; agentId: string; createdAt: string; key: string; productionRevisionId: string; stagingRevisionId: string; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.agentConfig.deleteStaging('x');\n\nconsole.log(response);\n```",
1832
+ perLanguage: {
1833
+ typescript: {
1834
+ method: 'client.agentConfig.deleteStaging',
1835
+ example:
1836
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.agentConfig.deleteStaging('x');\n\nconsole.log(response.data);",
1837
+ },
1838
+ python: {
1839
+ method: 'agent_config.delete_staging',
1840
+ example:
1841
+ 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nresponse = client.agent_config.delete_staging(\n "x",\n)\nprint(response.data)',
1842
+ },
1843
+ http: {
1844
+ example:
1845
+ 'curl https://api.roark.ai/v1/agent-config/$KEY/staging \\\n -X DELETE \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
1846
+ },
1847
+ },
1848
+ },
1656
1849
  {
1657
1850
  name: 'list',
1658
1851
  endpoint: '/v1/autoimprove/job',
@@ -1663,9 +1856,9 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1663
1856
  stainlessPath: '(resource) autoimproveJob > (method) list',
1664
1857
  qualified: 'client.autoimproveJob.list',
1665
1858
  response:
1666
- "{ data: { id: string; agentId: string; baselineValue: number; concludedAt: string; createdAt: string; currentValue: number; customerIntegrationId: string; finalReport: string; initiatedByUserId: string; issueId: string; iterationCount: number; maxIterations: number; maxSimCalls: number; objectiveId: string; objectiveLabel: string; objectiveMetricDefinitionId: string; organizationId: string; projectId: string; simCallsUsed: number; stagingAgentId: string; stagingKind: 'DESIGNATED' | 'SHADOW'; status: string; targetValue: number; trigger: 'ISSUE' | 'RUN_THRESHOLD_FAILED' | 'USER' | 'DEGRADATION'; updatedAt: string; validationRunPlanId: string; workingMemory: string; }[]; }",
1859
+ "{ data: { id: string; agentId: string; baselineValue: number; concludedAt: string; createdAt: string; currentValue: number; customerIntegrationId: string; finalReport: string; initiatedByUserId: string; issueId: string; iterationCount: number; maxIterations: number; maxSimCalls: number; objectiveId: string; objectiveLabel: string; objectiveMetricDefinitionId: string; organizationId: string; projectId: string; simCallsUsed: number; stagingAgentId: string; stagingKind: 'DESIGNATED' | 'SHADOW' | 'CHANNEL'; status: string; targetValue: number; trigger: 'ISSUE' | 'RUN_THRESHOLD_FAILED' | 'USER' | 'DEGRADATION'; updatedAt: string; validationRunPlanId: string; workingMemory: string; }[]; }",
1667
1860
  markdown:
1668
- "## list\n\n`client.autoimproveJob.list(): { data: object[]; }`\n\n**get** `/v1/autoimprove/job`\n\nList the Autoimprove jobs in this project, most recent first, capped at 100.\n\nA job is one autonomous engagement: Roark improving one agent toward one objective metric on a staging copy, with a human-gated promote to production at the end.\n\n### Returns\n\n- `{ data: { id: string; agentId: string; baselineValue: number; concludedAt: string; createdAt: string; currentValue: number; customerIntegrationId: string; finalReport: string; initiatedByUserId: string; issueId: string; iterationCount: number; maxIterations: number; maxSimCalls: number; objectiveId: string; objectiveLabel: string; objectiveMetricDefinitionId: string; organizationId: string; projectId: string; simCallsUsed: number; stagingAgentId: string; stagingKind: 'DESIGNATED' | 'SHADOW'; status: string; targetValue: number; trigger: 'ISSUE' | 'RUN_THRESHOLD_FAILED' | 'USER' | 'DEGRADATION'; updatedAt: string; validationRunPlanId: string; workingMemory: string; }[]; }`\n\n - `data: { id: string; agentId: string; baselineValue: number; concludedAt: string; createdAt: string; currentValue: number; customerIntegrationId: string; finalReport: string; initiatedByUserId: string; issueId: string; iterationCount: number; maxIterations: number; maxSimCalls: number; objectiveId: string; objectiveLabel: string; objectiveMetricDefinitionId: string; organizationId: string; projectId: string; simCallsUsed: number; stagingAgentId: string; stagingKind: 'DESIGNATED' | 'SHADOW'; status: string; targetValue: number; trigger: 'ISSUE' | 'RUN_THRESHOLD_FAILED' | 'USER' | 'DEGRADATION'; updatedAt: string; validationRunPlanId: string; workingMemory: string; }[]`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst autoimproveJobs = await client.autoimproveJob.list();\n\nconsole.log(autoimproveJobs);\n```",
1861
+ "## list\n\n`client.autoimproveJob.list(): { data: object[]; }`\n\n**get** `/v1/autoimprove/job`\n\nList the Autoimprove jobs in this project, most recent first, capped at 100.\n\nA job is one autonomous engagement: Roark improving one agent toward one objective metric on a staging copy, with a human-gated promote to production at the end.\n\n### Returns\n\n- `{ data: { id: string; agentId: string; baselineValue: number; concludedAt: string; createdAt: string; currentValue: number; customerIntegrationId: string; finalReport: string; initiatedByUserId: string; issueId: string; iterationCount: number; maxIterations: number; maxSimCalls: number; objectiveId: string; objectiveLabel: string; objectiveMetricDefinitionId: string; organizationId: string; projectId: string; simCallsUsed: number; stagingAgentId: string; stagingKind: 'DESIGNATED' | 'SHADOW' | 'CHANNEL'; status: string; targetValue: number; trigger: 'ISSUE' | 'RUN_THRESHOLD_FAILED' | 'USER' | 'DEGRADATION'; updatedAt: string; validationRunPlanId: string; workingMemory: string; }[]; }`\n\n - `data: { id: string; agentId: string; baselineValue: number; concludedAt: string; createdAt: string; currentValue: number; customerIntegrationId: string; finalReport: string; initiatedByUserId: string; issueId: string; iterationCount: number; maxIterations: number; maxSimCalls: number; objectiveId: string; objectiveLabel: string; objectiveMetricDefinitionId: string; organizationId: string; projectId: string; simCallsUsed: number; stagingAgentId: string; stagingKind: 'DESIGNATED' | 'SHADOW' | 'CHANNEL'; status: string; targetValue: number; trigger: 'ISSUE' | 'RUN_THRESHOLD_FAILED' | 'USER' | 'DEGRADATION'; updatedAt: string; validationRunPlanId: string; workingMemory: string; }[]`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst autoimproveJobs = await client.autoimproveJob.list();\n\nconsole.log(autoimproveJobs);\n```",
1669
1862
  perLanguage: {
1670
1863
  typescript: {
1671
1864
  method: 'client.autoimproveJob.list',
@@ -1694,9 +1887,9 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1694
1887
  qualified: 'client.autoimproveJob.getByID',
1695
1888
  params: ['jobId: string;'],
1696
1889
  response:
1697
- "{ data: { id: string; agentId: string; baselineValue: number; concludedAt: string; createdAt: string; currentValue: number; customerIntegrationId: string; finalReport: string; initiatedByUserId: string; issueId: string; iterationCount: number; logEntries: { id: string; configPushId: string; createdAt: string; kind: string; orderIndex: number; passRateAfter: number; passRateBefore: number; questionOptions: string[]; simulationRunPlanJobId: string; text: string; trialCount: number; }[]; maxIterations: number; maxSimCalls: number; objectiveId: string; objectiveLabel: string; objectiveMetricDefinitionId: string; organizationId: string; projectId: string; simCallsUsed: number; stagingAgentId: string; stagingKind: 'DESIGNATED' | 'SHADOW'; status: string; targetValue: number; trigger: 'ISSUE' | 'RUN_THRESHOLD_FAILED' | 'USER' | 'DEGRADATION'; updatedAt: string; validationRunPlanId: string; workingMemory: string; }; }",
1890
+ "{ data: { id: string; agentId: string; baselineValue: number; concludedAt: string; createdAt: string; currentValue: number; customerIntegrationId: string; finalReport: string; initiatedByUserId: string; issueId: string; iterationCount: number; logEntries: { id: string; configPushId: string; createdAt: string; kind: string; orderIndex: number; passRateAfter: number; passRateBefore: number; questionOptions: string[]; simulationRunPlanJobId: string; text: string; trialCount: number; }[]; maxIterations: number; maxSimCalls: number; objectiveId: string; objectiveLabel: string; objectiveMetricDefinitionId: string; organizationId: string; projectId: string; simCallsUsed: number; stagingAgentId: string; stagingKind: 'DESIGNATED' | 'SHADOW' | 'CHANNEL'; status: string; targetValue: number; trigger: 'ISSUE' | 'RUN_THRESHOLD_FAILED' | 'USER' | 'DEGRADATION'; updatedAt: string; validationRunPlanId: string; workingMemory: string; }; }",
1698
1891
  markdown:
1699
- "## getById\n\n`client.autoimproveJob.getByID(jobId: string): { data: object; }`\n\n**get** `/v1/autoimprove/job/{jobId}`\n\nFetch one job with its full worklog: every step Roark took, the validation batches with their pass-rate movement, any question it is waiting on, and its final report once concluded.\n\n### Parameters\n\n- `jobId: string`\n\n### Returns\n\n- `{ data: { id: string; agentId: string; baselineValue: number; concludedAt: string; createdAt: string; currentValue: number; customerIntegrationId: string; finalReport: string; initiatedByUserId: string; issueId: string; iterationCount: number; logEntries: { id: string; configPushId: string; createdAt: string; kind: string; orderIndex: number; passRateAfter: number; passRateBefore: number; questionOptions: string[]; simulationRunPlanJobId: string; text: string; trialCount: number; }[]; maxIterations: number; maxSimCalls: number; objectiveId: string; objectiveLabel: string; objectiveMetricDefinitionId: string; organizationId: string; projectId: string; simCallsUsed: number; stagingAgentId: string; stagingKind: 'DESIGNATED' | 'SHADOW'; status: string; targetValue: number; trigger: 'ISSUE' | 'RUN_THRESHOLD_FAILED' | 'USER' | 'DEGRADATION'; updatedAt: string; validationRunPlanId: string; workingMemory: string; }; }`\n\n - `data: { id: string; agentId: string; baselineValue: number; concludedAt: string; createdAt: string; currentValue: number; customerIntegrationId: string; finalReport: string; initiatedByUserId: string; issueId: string; iterationCount: number; logEntries: { id: string; configPushId: string; createdAt: string; kind: string; orderIndex: number; passRateAfter: number; passRateBefore: number; questionOptions: string[]; simulationRunPlanJobId: string; text: string; trialCount: number; }[]; maxIterations: number; maxSimCalls: number; objectiveId: string; objectiveLabel: string; objectiveMetricDefinitionId: string; organizationId: string; projectId: string; simCallsUsed: number; stagingAgentId: string; stagingKind: 'DESIGNATED' | 'SHADOW'; status: string; targetValue: number; trigger: 'ISSUE' | 'RUN_THRESHOLD_FAILED' | 'USER' | 'DEGRADATION'; updatedAt: string; validationRunPlanId: string; workingMemory: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.autoimproveJob.getByID('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response);\n```",
1892
+ "## getById\n\n`client.autoimproveJob.getByID(jobId: string): { data: object; }`\n\n**get** `/v1/autoimprove/job/{jobId}`\n\nFetch one job with its full worklog: every step Roark took, the validation batches with their pass-rate movement, any question it is waiting on, and its final report once concluded.\n\n### Parameters\n\n- `jobId: string`\n\n### Returns\n\n- `{ data: { id: string; agentId: string; baselineValue: number; concludedAt: string; createdAt: string; currentValue: number; customerIntegrationId: string; finalReport: string; initiatedByUserId: string; issueId: string; iterationCount: number; logEntries: { id: string; configPushId: string; createdAt: string; kind: string; orderIndex: number; passRateAfter: number; passRateBefore: number; questionOptions: string[]; simulationRunPlanJobId: string; text: string; trialCount: number; }[]; maxIterations: number; maxSimCalls: number; objectiveId: string; objectiveLabel: string; objectiveMetricDefinitionId: string; organizationId: string; projectId: string; simCallsUsed: number; stagingAgentId: string; stagingKind: 'DESIGNATED' | 'SHADOW' | 'CHANNEL'; status: string; targetValue: number; trigger: 'ISSUE' | 'RUN_THRESHOLD_FAILED' | 'USER' | 'DEGRADATION'; updatedAt: string; validationRunPlanId: string; workingMemory: string; }; }`\n\n - `data: { id: string; agentId: string; baselineValue: number; concludedAt: string; createdAt: string; currentValue: number; customerIntegrationId: string; finalReport: string; initiatedByUserId: string; issueId: string; iterationCount: number; logEntries: { id: string; configPushId: string; createdAt: string; kind: string; orderIndex: number; passRateAfter: number; passRateBefore: number; questionOptions: string[]; simulationRunPlanJobId: string; text: string; trialCount: number; }[]; maxIterations: number; maxSimCalls: number; objectiveId: string; objectiveLabel: string; objectiveMetricDefinitionId: string; organizationId: string; projectId: string; simCallsUsed: number; stagingAgentId: string; stagingKind: 'DESIGNATED' | 'SHADOW' | 'CHANNEL'; status: string; targetValue: number; trigger: 'ISSUE' | 'RUN_THRESHOLD_FAILED' | 'USER' | 'DEGRADATION'; updatedAt: string; validationRunPlanId: string; workingMemory: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.autoimproveJob.getByID('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response);\n```",
1700
1893
  perLanguage: {
1701
1894
  typescript: {
1702
1895
  method: 'client.autoimproveJob.getByID',
@@ -1720,7 +1913,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1720
1913
  httpMethod: 'post',
1721
1914
  summary: 'Start an Autoimprove job',
1722
1915
  description:
1723
- 'Commission Roark on an objective. It clones the agent into a staging shadow (or uses your designated staging agent), authors a validation suite of simulated callers, measures a baseline, changes the staging configuration, and re-tests until the objective metric passes its target. Production is never touched by the loop; verified changes wait for promotion.\n\nRequires an active provider integration (Vapi or Retell) with agent config writes enabled. One live job per agent: starting a second returns a conflict.\n\nThe job runs asynchronously; poll GET /v1/autoimprove/job/{jobId} or watch it in the dashboard. When its status is NEEDS_INPUT, answer via the answer endpoint; when AWAITING_PROMOTE, promote or dismiss.',
1916
+ 'Commission Roark on an objective. It clones the agent into a staging shadow (or uses your designated staging agent), authors a validation suite of simulated callers, measures a baseline, changes the staging configuration, and re-tests until the objective metric passes its target. Production is never touched by the loop; verified changes wait for promotion.\n\nRequires an active provider integration (Vapi, Retell, or ElevenLabs) with agent config writes enabled. One live job per agent: starting a second returns a conflict.\n\nThe job runs asynchronously; poll GET /v1/autoimprove/job/{jobId} or watch it in the dashboard. When its status is NEEDS_INPUT, answer via the answer endpoint; when AWAITING_PROMOTE, promote or dismiss.',
1724
1917
  stainlessPath: '(resource) autoimproveJob > (method) create',
1725
1918
  qualified: 'client.autoimproveJob.create',
1726
1919
  params: [
@@ -1735,9 +1928,9 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1735
1928
  'validationRunPlanId?: string;',
1736
1929
  ],
1737
1930
  response:
1738
- "{ data: { id: string; agentId: string; baselineValue: number; concludedAt: string; createdAt: string; currentValue: number; customerIntegrationId: string; finalReport: string; initiatedByUserId: string; issueId: string; iterationCount: number; maxIterations: number; maxSimCalls: number; objectiveId: string; objectiveLabel: string; objectiveMetricDefinitionId: string; organizationId: string; projectId: string; simCallsUsed: number; stagingAgentId: string; stagingKind: 'DESIGNATED' | 'SHADOW'; status: string; targetValue: number; trigger: 'ISSUE' | 'RUN_THRESHOLD_FAILED' | 'USER' | 'DEGRADATION'; updatedAt: string; validationRunPlanId: string; workingMemory: string; }; }",
1931
+ "{ data: { id: string; agentId: string; baselineValue: number; concludedAt: string; createdAt: string; currentValue: number; customerIntegrationId: string; finalReport: string; initiatedByUserId: string; issueId: string; iterationCount: number; maxIterations: number; maxSimCalls: number; objectiveId: string; objectiveLabel: string; objectiveMetricDefinitionId: string; organizationId: string; projectId: string; simCallsUsed: number; stagingAgentId: string; stagingKind: 'DESIGNATED' | 'SHADOW' | 'CHANNEL'; status: string; targetValue: number; trigger: 'ISSUE' | 'RUN_THRESHOLD_FAILED' | 'USER' | 'DEGRADATION'; updatedAt: string; validationRunPlanId: string; workingMemory: string; }; }",
1739
1932
  markdown:
1740
- "## create\n\n`client.autoimproveJob.create(agentId: string, objectiveLabel: string, objectiveMetricDefinitionId: string, customerIntegrationId?: string, maxIterations?: number, maxSimCalls?: number, stagingAgentId?: string, targetValue?: number, validationRunPlanId?: string): { data: object; }`\n\n**post** `/v1/autoimprove/job`\n\nCommission Roark on an objective. It clones the agent into a staging shadow (or uses your designated staging agent), authors a validation suite of simulated callers, measures a baseline, changes the staging configuration, and re-tests until the objective metric passes its target. Production is never touched by the loop; verified changes wait for promotion.\n\nRequires an active provider integration (Vapi or Retell) with agent config writes enabled. One live job per agent: starting a second returns a conflict.\n\nThe job runs asynchronously; poll GET /v1/autoimprove/job/{jobId} or watch it in the dashboard. When its status is NEEDS_INPUT, answer via the answer endpoint; when AWAITING_PROMOTE, promote or dismiss.\n\n### Parameters\n\n- `agentId: string`\n The production agent to improve. It is never modified until you promote.\n\n- `objectiveLabel: string`\n Human-readable label for the objective, shown everywhere the job appears.\n\n- `objectiveMetricDefinitionId: string`\n The metric that defines success: a pass/fail metric, or a threshold variant of a scale metric (for example \"PII Handling >= 4\"). Roark measures the pass rate of this metric across simulated calls.\n\n- `customerIntegrationId?: string`\n The provider integration whose credentials Roark uses. Omit to use the project's active integration for the agent's provider. The integration must have agent config writes enabled.\n\n- `maxIterations?: number`\n Cap on decision turns. Defaults to 50.\n\n- `maxSimCalls?: number`\n Cap on simulated calls dialed. Defaults to 200.\n\n- `stagingAgentId?: string`\n An existing agent to stage changes on instead of the default shadow clone. Must be a different agent from agentId, on the same provider.\n\n- `targetValue?: number`\n The pass-rate percentage that counts as fixed. Defaults to 90.\n\n- `validationRunPlanId?: string`\n An existing simulation run plan to validate with. Omit to let Roark author its own suite.\n\n### Returns\n\n- `{ data: { id: string; agentId: string; baselineValue: number; concludedAt: string; createdAt: string; currentValue: number; customerIntegrationId: string; finalReport: string; initiatedByUserId: string; issueId: string; iterationCount: number; maxIterations: number; maxSimCalls: number; objectiveId: string; objectiveLabel: string; objectiveMetricDefinitionId: string; organizationId: string; projectId: string; simCallsUsed: number; stagingAgentId: string; stagingKind: 'DESIGNATED' | 'SHADOW'; status: string; targetValue: number; trigger: 'ISSUE' | 'RUN_THRESHOLD_FAILED' | 'USER' | 'DEGRADATION'; updatedAt: string; validationRunPlanId: string; workingMemory: string; }; }`\n\n - `data: { id: string; agentId: string; baselineValue: number; concludedAt: string; createdAt: string; currentValue: number; customerIntegrationId: string; finalReport: string; initiatedByUserId: string; issueId: string; iterationCount: number; maxIterations: number; maxSimCalls: number; objectiveId: string; objectiveLabel: string; objectiveMetricDefinitionId: string; organizationId: string; projectId: string; simCallsUsed: number; stagingAgentId: string; stagingKind: 'DESIGNATED' | 'SHADOW'; status: string; targetValue: number; trigger: 'ISSUE' | 'RUN_THRESHOLD_FAILED' | 'USER' | 'DEGRADATION'; updatedAt: string; validationRunPlanId: string; workingMemory: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst autoimproveJob = await client.autoimproveJob.create({\n agentId: 'b3b0c8e2-4c1d-4f6a-9e2b-1a2b3c4d5e6f',\n objectiveLabel: 'Consent collection should pass',\n objectiveMetricDefinitionId: 'f2f0c8e2-4c1d-4f6a-9e2b-1a2b3c4d5e6f',\n});\n\nconsole.log(autoimproveJob);\n```",
1933
+ "## create\n\n`client.autoimproveJob.create(agentId: string, objectiveLabel: string, objectiveMetricDefinitionId: string, customerIntegrationId?: string, maxIterations?: number, maxSimCalls?: number, stagingAgentId?: string, targetValue?: number, validationRunPlanId?: string): { data: object; }`\n\n**post** `/v1/autoimprove/job`\n\nCommission Roark on an objective. It clones the agent into a staging shadow (or uses your designated staging agent), authors a validation suite of simulated callers, measures a baseline, changes the staging configuration, and re-tests until the objective metric passes its target. Production is never touched by the loop; verified changes wait for promotion.\n\nRequires an active provider integration (Vapi, Retell, or ElevenLabs) with agent config writes enabled. One live job per agent: starting a second returns a conflict.\n\nThe job runs asynchronously; poll GET /v1/autoimprove/job/{jobId} or watch it in the dashboard. When its status is NEEDS_INPUT, answer via the answer endpoint; when AWAITING_PROMOTE, promote or dismiss.\n\n### Parameters\n\n- `agentId: string`\n The production agent to improve. It is never modified until you promote.\n\n- `objectiveLabel: string`\n Human-readable label for the objective, shown everywhere the job appears.\n\n- `objectiveMetricDefinitionId: string`\n The metric that defines success: a pass/fail metric, or a threshold variant of a scale metric (for example \"PII Handling >= 4\"). Roark measures the pass rate of this metric across simulated calls.\n\n- `customerIntegrationId?: string`\n The provider integration whose credentials Roark uses. Omit to use the project's active integration for the agent's provider. The integration must have agent config writes enabled.\n\n- `maxIterations?: number`\n Cap on decision turns. Defaults to 50.\n\n- `maxSimCalls?: number`\n Cap on simulated calls dialed. Defaults to 200.\n\n- `stagingAgentId?: string`\n An existing agent to stage changes on instead of the default shadow clone. Must be a different agent from agentId, on the same provider.\n\n- `targetValue?: number`\n The pass-rate percentage that counts as fixed. Defaults to 90.\n\n- `validationRunPlanId?: string`\n An existing simulation run plan to validate with. Omit to let Roark author its own suite.\n\n### Returns\n\n- `{ data: { id: string; agentId: string; baselineValue: number; concludedAt: string; createdAt: string; currentValue: number; customerIntegrationId: string; finalReport: string; initiatedByUserId: string; issueId: string; iterationCount: number; maxIterations: number; maxSimCalls: number; objectiveId: string; objectiveLabel: string; objectiveMetricDefinitionId: string; organizationId: string; projectId: string; simCallsUsed: number; stagingAgentId: string; stagingKind: 'DESIGNATED' | 'SHADOW' | 'CHANNEL'; status: string; targetValue: number; trigger: 'ISSUE' | 'RUN_THRESHOLD_FAILED' | 'USER' | 'DEGRADATION'; updatedAt: string; validationRunPlanId: string; workingMemory: string; }; }`\n\n - `data: { id: string; agentId: string; baselineValue: number; concludedAt: string; createdAt: string; currentValue: number; customerIntegrationId: string; finalReport: string; initiatedByUserId: string; issueId: string; iterationCount: number; maxIterations: number; maxSimCalls: number; objectiveId: string; objectiveLabel: string; objectiveMetricDefinitionId: string; organizationId: string; projectId: string; simCallsUsed: number; stagingAgentId: string; stagingKind: 'DESIGNATED' | 'SHADOW' | 'CHANNEL'; status: string; targetValue: number; trigger: 'ISSUE' | 'RUN_THRESHOLD_FAILED' | 'USER' | 'DEGRADATION'; updatedAt: string; validationRunPlanId: string; workingMemory: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst autoimproveJob = await client.autoimproveJob.create({\n agentId: 'b3b0c8e2-4c1d-4f6a-9e2b-1a2b3c4d5e6f',\n objectiveLabel: 'Consent collection should pass',\n objectiveMetricDefinitionId: 'f2f0c8e2-4c1d-4f6a-9e2b-1a2b3c4d5e6f',\n});\n\nconsole.log(autoimproveJob);\n```",
1741
1934
  perLanguage: {
1742
1935
  typescript: {
1743
1936
  method: 'client.autoimproveJob.create',
@@ -1796,9 +1989,9 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1796
1989
  qualified: 'client.autoimproveJob.promote',
1797
1990
  params: ['jobId: string;'],
1798
1991
  response:
1799
- "{ data: { id: string; agentId: string; baselineValue: number; concludedAt: string; createdAt: string; currentValue: number; customerIntegrationId: string; finalReport: string; initiatedByUserId: string; issueId: string; iterationCount: number; maxIterations: number; maxSimCalls: number; objectiveId: string; objectiveLabel: string; objectiveMetricDefinitionId: string; organizationId: string; projectId: string; simCallsUsed: number; stagingAgentId: string; stagingKind: 'DESIGNATED' | 'SHADOW'; status: string; targetValue: number; trigger: 'ISSUE' | 'RUN_THRESHOLD_FAILED' | 'USER' | 'DEGRADATION'; updatedAt: string; validationRunPlanId: string; workingMemory: string; }; }",
1992
+ "{ data: { id: string; agentId: string; baselineValue: number; concludedAt: string; createdAt: string; currentValue: number; customerIntegrationId: string; finalReport: string; initiatedByUserId: string; issueId: string; iterationCount: number; maxIterations: number; maxSimCalls: number; objectiveId: string; objectiveLabel: string; objectiveMetricDefinitionId: string; organizationId: string; projectId: string; simCallsUsed: number; stagingAgentId: string; stagingKind: 'DESIGNATED' | 'SHADOW' | 'CHANNEL'; status: string; targetValue: number; trigger: 'ISSUE' | 'RUN_THRESHOLD_FAILED' | 'USER' | 'DEGRADATION'; updatedAt: string; validationRunPlanId: string; workingMemory: string; }; }",
1800
1993
  markdown:
1801
- "## promote\n\n`client.autoimproveJob.promote(jobId: string): { data: object; }`\n\n**post** `/v1/autoimprove/job/{jobId}/promote`\n\nApply the verified staging changes to the PRODUCTION agent. Only a job in AWAITING_PROMOTE can be promoted.\n\nA snapshot of the production configuration is taken immediately before the write, so the promote is fully rollbackable. After the promote the staging shadow and its phone number are cleaned up.\n\n### Parameters\n\n- `jobId: string`\n\n### Returns\n\n- `{ data: { id: string; agentId: string; baselineValue: number; concludedAt: string; createdAt: string; currentValue: number; customerIntegrationId: string; finalReport: string; initiatedByUserId: string; issueId: string; iterationCount: number; maxIterations: number; maxSimCalls: number; objectiveId: string; objectiveLabel: string; objectiveMetricDefinitionId: string; organizationId: string; projectId: string; simCallsUsed: number; stagingAgentId: string; stagingKind: 'DESIGNATED' | 'SHADOW'; status: string; targetValue: number; trigger: 'ISSUE' | 'RUN_THRESHOLD_FAILED' | 'USER' | 'DEGRADATION'; updatedAt: string; validationRunPlanId: string; workingMemory: string; }; }`\n\n - `data: { id: string; agentId: string; baselineValue: number; concludedAt: string; createdAt: string; currentValue: number; customerIntegrationId: string; finalReport: string; initiatedByUserId: string; issueId: string; iterationCount: number; maxIterations: number; maxSimCalls: number; objectiveId: string; objectiveLabel: string; objectiveMetricDefinitionId: string; organizationId: string; projectId: string; simCallsUsed: number; stagingAgentId: string; stagingKind: 'DESIGNATED' | 'SHADOW'; status: string; targetValue: number; trigger: 'ISSUE' | 'RUN_THRESHOLD_FAILED' | 'USER' | 'DEGRADATION'; updatedAt: string; validationRunPlanId: string; workingMemory: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.autoimproveJob.promote('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response);\n```",
1994
+ "## promote\n\n`client.autoimproveJob.promote(jobId: string): { data: object; }`\n\n**post** `/v1/autoimprove/job/{jobId}/promote`\n\nApply the verified staging changes to the PRODUCTION agent. Only a job in AWAITING_PROMOTE can be promoted.\n\nA snapshot of the production configuration is taken immediately before the write, so the promote is fully rollbackable. After the promote the staging shadow and its phone number are cleaned up.\n\n### Parameters\n\n- `jobId: string`\n\n### Returns\n\n- `{ data: { id: string; agentId: string; baselineValue: number; concludedAt: string; createdAt: string; currentValue: number; customerIntegrationId: string; finalReport: string; initiatedByUserId: string; issueId: string; iterationCount: number; maxIterations: number; maxSimCalls: number; objectiveId: string; objectiveLabel: string; objectiveMetricDefinitionId: string; organizationId: string; projectId: string; simCallsUsed: number; stagingAgentId: string; stagingKind: 'DESIGNATED' | 'SHADOW' | 'CHANNEL'; status: string; targetValue: number; trigger: 'ISSUE' | 'RUN_THRESHOLD_FAILED' | 'USER' | 'DEGRADATION'; updatedAt: string; validationRunPlanId: string; workingMemory: string; }; }`\n\n - `data: { id: string; agentId: string; baselineValue: number; concludedAt: string; createdAt: string; currentValue: number; customerIntegrationId: string; finalReport: string; initiatedByUserId: string; issueId: string; iterationCount: number; maxIterations: number; maxSimCalls: number; objectiveId: string; objectiveLabel: string; objectiveMetricDefinitionId: string; organizationId: string; projectId: string; simCallsUsed: number; stagingAgentId: string; stagingKind: 'DESIGNATED' | 'SHADOW' | 'CHANNEL'; status: string; targetValue: number; trigger: 'ISSUE' | 'RUN_THRESHOLD_FAILED' | 'USER' | 'DEGRADATION'; updatedAt: string; validationRunPlanId: string; workingMemory: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.autoimproveJob.promote('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response);\n```",
1802
1995
  perLanguage: {
1803
1996
  typescript: {
1804
1997
  method: 'client.autoimproveJob.promote',
@@ -1827,9 +2020,9 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1827
2020
  qualified: 'client.autoimproveJob.dismiss',
1828
2021
  params: ['jobId: string;'],
1829
2022
  response:
1830
- "{ data: { id: string; agentId: string; baselineValue: number; concludedAt: string; createdAt: string; currentValue: number; customerIntegrationId: string; finalReport: string; initiatedByUserId: string; issueId: string; iterationCount: number; maxIterations: number; maxSimCalls: number; objectiveId: string; objectiveLabel: string; objectiveMetricDefinitionId: string; organizationId: string; projectId: string; simCallsUsed: number; stagingAgentId: string; stagingKind: 'DESIGNATED' | 'SHADOW'; status: string; targetValue: number; trigger: 'ISSUE' | 'RUN_THRESHOLD_FAILED' | 'USER' | 'DEGRADATION'; updatedAt: string; validationRunPlanId: string; workingMemory: string; }; }",
2023
+ "{ data: { id: string; agentId: string; baselineValue: number; concludedAt: string; createdAt: string; currentValue: number; customerIntegrationId: string; finalReport: string; initiatedByUserId: string; issueId: string; iterationCount: number; maxIterations: number; maxSimCalls: number; objectiveId: string; objectiveLabel: string; objectiveMetricDefinitionId: string; organizationId: string; projectId: string; simCallsUsed: number; stagingAgentId: string; stagingKind: 'DESIGNATED' | 'SHADOW' | 'CHANNEL'; status: string; targetValue: number; trigger: 'ISSUE' | 'RUN_THRESHOLD_FAILED' | 'USER' | 'DEGRADATION'; updatedAt: string; validationRunPlanId: string; workingMemory: string; }; }",
1831
2024
  markdown:
1832
- "## dismiss\n\n`client.autoimproveJob.dismiss(jobId: string): { data: object; }`\n\n**post** `/v1/autoimprove/job/{jobId}/dismiss`\n\nDiscard a verified job without promoting: production stays untouched and the staging resources are cleaned up. Only a job in AWAITING_PROMOTE can be dismissed.\n\n### Parameters\n\n- `jobId: string`\n\n### Returns\n\n- `{ data: { id: string; agentId: string; baselineValue: number; concludedAt: string; createdAt: string; currentValue: number; customerIntegrationId: string; finalReport: string; initiatedByUserId: string; issueId: string; iterationCount: number; maxIterations: number; maxSimCalls: number; objectiveId: string; objectiveLabel: string; objectiveMetricDefinitionId: string; organizationId: string; projectId: string; simCallsUsed: number; stagingAgentId: string; stagingKind: 'DESIGNATED' | 'SHADOW'; status: string; targetValue: number; trigger: 'ISSUE' | 'RUN_THRESHOLD_FAILED' | 'USER' | 'DEGRADATION'; updatedAt: string; validationRunPlanId: string; workingMemory: string; }; }`\n\n - `data: { id: string; agentId: string; baselineValue: number; concludedAt: string; createdAt: string; currentValue: number; customerIntegrationId: string; finalReport: string; initiatedByUserId: string; issueId: string; iterationCount: number; maxIterations: number; maxSimCalls: number; objectiveId: string; objectiveLabel: string; objectiveMetricDefinitionId: string; organizationId: string; projectId: string; simCallsUsed: number; stagingAgentId: string; stagingKind: 'DESIGNATED' | 'SHADOW'; status: string; targetValue: number; trigger: 'ISSUE' | 'RUN_THRESHOLD_FAILED' | 'USER' | 'DEGRADATION'; updatedAt: string; validationRunPlanId: string; workingMemory: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.autoimproveJob.dismiss('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response);\n```",
2025
+ "## dismiss\n\n`client.autoimproveJob.dismiss(jobId: string): { data: object; }`\n\n**post** `/v1/autoimprove/job/{jobId}/dismiss`\n\nDiscard a verified job without promoting: production stays untouched and the staging resources are cleaned up. Only a job in AWAITING_PROMOTE can be dismissed.\n\n### Parameters\n\n- `jobId: string`\n\n### Returns\n\n- `{ data: { id: string; agentId: string; baselineValue: number; concludedAt: string; createdAt: string; currentValue: number; customerIntegrationId: string; finalReport: string; initiatedByUserId: string; issueId: string; iterationCount: number; maxIterations: number; maxSimCalls: number; objectiveId: string; objectiveLabel: string; objectiveMetricDefinitionId: string; organizationId: string; projectId: string; simCallsUsed: number; stagingAgentId: string; stagingKind: 'DESIGNATED' | 'SHADOW' | 'CHANNEL'; status: string; targetValue: number; trigger: 'ISSUE' | 'RUN_THRESHOLD_FAILED' | 'USER' | 'DEGRADATION'; updatedAt: string; validationRunPlanId: string; workingMemory: string; }; }`\n\n - `data: { id: string; agentId: string; baselineValue: number; concludedAt: string; createdAt: string; currentValue: number; customerIntegrationId: string; finalReport: string; initiatedByUserId: string; issueId: string; iterationCount: number; maxIterations: number; maxSimCalls: number; objectiveId: string; objectiveLabel: string; objectiveMetricDefinitionId: string; organizationId: string; projectId: string; simCallsUsed: number; stagingAgentId: string; stagingKind: 'DESIGNATED' | 'SHADOW' | 'CHANNEL'; status: string; targetValue: number; trigger: 'ISSUE' | 'RUN_THRESHOLD_FAILED' | 'USER' | 'DEGRADATION'; updatedAt: string; validationRunPlanId: string; workingMemory: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.autoimproveJob.dismiss('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response);\n```",
1833
2026
  perLanguage: {
1834
2027
  typescript: {
1835
2028
  method: 'client.autoimproveJob.dismiss',
@@ -2412,6 +2605,37 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2412
2605
  },
2413
2606
  },
2414
2607
  },
2608
+ {
2609
+ name: 'build',
2610
+ endpoint: '/v1/agent/build',
2611
+ httpMethod: 'post',
2612
+ summary: 'Build a Roark-hosted agent',
2613
+ description:
2614
+ 'Creates a new Roark-hosted agent from a one-line job description. Roark authors the system prompt and hosts the config, so the agent is live and self-improvable from creation.',
2615
+ stainlessPath: '(resource) agent > (method) build',
2616
+ qualified: 'client.agent.build',
2617
+ params: ['jobDescription: string;', 'name: string;', 'voice?: string;'],
2618
+ response:
2619
+ '{ data: { id: string; createdAt: string; customId: string; description: string; name: string; updatedAt: string; }; }',
2620
+ markdown:
2621
+ "## build\n\n`client.agent.build(jobDescription: string, name: string, voice?: string): { data: object; }`\n\n**post** `/v1/agent/build`\n\nCreates a new Roark-hosted agent from a one-line job description. Roark authors the system prompt and hosts the config, so the agent is live and self-improvable from creation.\n\n### Parameters\n\n- `jobDescription: string`\n One-line description of what the agent should do. Roark authors the system prompt from this.\n\n- `name: string`\n Name of the agent\n\n- `voice?: string`\n Optional voice label for the hosted agent\n\n### Returns\n\n- `{ data: { id: string; createdAt: string; customId: string; description: string; name: string; updatedAt: string; }; }`\n\n - `data: { id: string; createdAt: string; customId: string; description: string; name: string; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark();\n\nconst response = await client.agent.build({ jobDescription: 'x', name: 'x' });\n\nconsole.log(response);\n```",
2622
+ perLanguage: {
2623
+ typescript: {
2624
+ method: 'client.agent.build',
2625
+ example:
2626
+ "import Roark from '@roarkanalytics/sdk';\n\nconst client = new Roark({\n bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.agent.build({ jobDescription: 'x', name: 'x' });\n\nconsole.log(response.data);",
2627
+ },
2628
+ python: {
2629
+ method: 'agent.build',
2630
+ example:
2631
+ 'import os\nfrom roark_analytics import Roark\n\nclient = Roark(\n bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted\n)\nresponse = client.agent.build(\n job_description="x",\n name="x",\n)\nprint(response.data)',
2632
+ },
2633
+ http: {
2634
+ example:
2635
+ 'curl https://api.roark.ai/v1/agent/build \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN" \\\n -d \'{\n "jobDescription": "x",\n "name": "x"\n }\'',
2636
+ },
2637
+ },
2638
+ },
2415
2639
  {
2416
2640
  name: 'update',
2417
2641
  endpoint: '/v1/agent/{agentId}',
package/src/methods.ts CHANGED
@@ -286,6 +286,42 @@ export const sdkMethods: SdkMethod[] = [
286
286
  httpMethod: 'get',
287
287
  httpPath: '/v1/simulation/template',
288
288
  },
289
+ {
290
+ clientCallName: 'client.agentConfig.update',
291
+ fullyQualifiedName: 'agentConfig.update',
292
+ httpMethod: 'put',
293
+ httpPath: '/v1/agent-config/{key}',
294
+ },
295
+ {
296
+ clientCallName: 'client.agentConfig.list',
297
+ fullyQualifiedName: 'agentConfig.list',
298
+ httpMethod: 'get',
299
+ httpPath: '/v1/agent-config',
300
+ },
301
+ {
302
+ clientCallName: 'client.agentConfig.deleteStaging',
303
+ fullyQualifiedName: 'agentConfig.deleteStaging',
304
+ httpMethod: 'delete',
305
+ httpPath: '/v1/agent-config/{key}/staging',
306
+ },
307
+ {
308
+ clientCallName: 'client.agentConfig.getByID',
309
+ fullyQualifiedName: 'agentConfig.getByID',
310
+ httpMethod: 'get',
311
+ httpPath: '/v1/agent-config/{key}',
312
+ },
313
+ {
314
+ clientCallName: 'client.agentConfig.promote',
315
+ fullyQualifiedName: 'agentConfig.promote',
316
+ httpMethod: 'post',
317
+ httpPath: '/v1/agent-config/{key}/promote',
318
+ },
319
+ {
320
+ clientCallName: 'client.agentConfig.resolve',
321
+ fullyQualifiedName: 'agentConfig.resolve',
322
+ httpMethod: 'post',
323
+ httpPath: '/v1/agent-config/{key}/resolve',
324
+ },
289
325
  {
290
326
  clientCallName: 'client.autoimproveJob.create',
291
327
  fullyQualifiedName: 'autoimproveJob.create',
@@ -424,6 +460,12 @@ export const sdkMethods: SdkMethod[] = [
424
460
  httpMethod: 'get',
425
461
  httpPath: '/v1/agent',
426
462
  },
463
+ {
464
+ clientCallName: 'client.agent.build',
465
+ fullyQualifiedName: 'agent.build',
466
+ httpMethod: 'post',
467
+ httpPath: '/v1/agent/build',
468
+ },
427
469
  {
428
470
  clientCallName: 'client.agent.getByID',
429
471
  fullyQualifiedName: 'agent.getByID',
package/src/server.ts CHANGED
@@ -28,7 +28,7 @@ export const newMcpServer = async ({
28
28
  new McpServer(
29
29
  {
30
30
  name: 'roarkanalytics_sdk_api',
31
- version: '4.0.1', // x-release-please-version
31
+ version: '4.2.0', // x-release-please-version
32
32
  },
33
33
  {
34
34
  instructions: await getInstructions({ stainlessApiKey, customInstructionsPath }),