@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.
- package/CHANGELOG.md +14 -0
- package/code-tool-worker.d.mts.map +1 -1
- package/code-tool-worker.d.ts.map +1 -1
- package/code-tool-worker.js +7 -0
- package/code-tool-worker.js.map +1 -1
- package/code-tool-worker.mjs +7 -0
- package/code-tool-worker.mjs.map +1 -1
- package/local-docs-search.d.mts.map +1 -1
- package/local-docs-search.d.ts.map +1 -1
- package/local-docs-search.js +195 -11
- package/local-docs-search.js.map +1 -1
- package/local-docs-search.mjs +195 -11
- package/local-docs-search.mjs.map +1 -1
- package/methods.d.mts.map +1 -1
- package/methods.d.ts.map +1 -1
- package/methods.js +42 -0
- package/methods.js.map +1 -1
- package/methods.mjs +42 -0
- package/methods.mjs.map +1 -1
- package/package.json +1 -1
- package/server.js +1 -1
- package/server.mjs +1 -1
- package/src/code-tool-worker.ts +7 -0
- package/src/local-docs-search.ts +235 -11
- package/src/methods.ts +42 -0
- package/src/server.ts +1 -1
package/local-docs-search.mjs
CHANGED
|
@@ -1357,6 +1357,165 @@ const EMBEDDED_METHODS = [
|
|
|
1357
1357
|
},
|
|
1358
1358
|
},
|
|
1359
1359
|
},
|
|
1360
|
+
{
|
|
1361
|
+
name: 'list',
|
|
1362
|
+
endpoint: '/v1/agent-config',
|
|
1363
|
+
httpMethod: 'get',
|
|
1364
|
+
summary: 'List managed configs',
|
|
1365
|
+
description: 'List the managed agent configs in this project, most recent first.',
|
|
1366
|
+
stainlessPath: '(resource) agentConfig > (method) list',
|
|
1367
|
+
qualified: 'client.agentConfig.list',
|
|
1368
|
+
response: '{ data: { id: string; agentId: string; createdAt: string; key: string; productionRevisionId: string; stagingRevisionId: string; updatedAt: string; }[]; }',
|
|
1369
|
+
markdown: "## 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```",
|
|
1370
|
+
perLanguage: {
|
|
1371
|
+
typescript: {
|
|
1372
|
+
method: 'client.agentConfig.list',
|
|
1373
|
+
example: "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);",
|
|
1374
|
+
},
|
|
1375
|
+
python: {
|
|
1376
|
+
method: 'agent_config.list',
|
|
1377
|
+
example: '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)',
|
|
1378
|
+
},
|
|
1379
|
+
http: {
|
|
1380
|
+
example: 'curl https://api.roark.ai/v1/agent-config \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
1381
|
+
},
|
|
1382
|
+
},
|
|
1383
|
+
},
|
|
1384
|
+
{
|
|
1385
|
+
name: 'getById',
|
|
1386
|
+
endpoint: '/v1/agent-config/{key}',
|
|
1387
|
+
httpMethod: 'get',
|
|
1388
|
+
summary: 'Get a managed config',
|
|
1389
|
+
description: 'Fetch one managed config with its channel pointers and recent revisions, newest first.',
|
|
1390
|
+
stainlessPath: '(resource) agentConfig > (method) getById',
|
|
1391
|
+
qualified: 'client.agentConfig.getByID',
|
|
1392
|
+
params: ['key: string;'],
|
|
1393
|
+
response: "{ 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; }; }",
|
|
1394
|
+
markdown: "## 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```",
|
|
1395
|
+
perLanguage: {
|
|
1396
|
+
typescript: {
|
|
1397
|
+
method: 'client.agentConfig.getByID',
|
|
1398
|
+
example: "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);",
|
|
1399
|
+
},
|
|
1400
|
+
python: {
|
|
1401
|
+
method: 'agent_config.get_by_id',
|
|
1402
|
+
example: '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)',
|
|
1403
|
+
},
|
|
1404
|
+
http: {
|
|
1405
|
+
example: 'curl https://api.roark.ai/v1/agent-config/$KEY \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
1406
|
+
},
|
|
1407
|
+
},
|
|
1408
|
+
},
|
|
1409
|
+
{
|
|
1410
|
+
name: 'update',
|
|
1411
|
+
endpoint: '/v1/agent-config/{key}',
|
|
1412
|
+
httpMethod: 'put',
|
|
1413
|
+
summary: 'Write a config revision',
|
|
1414
|
+
description: '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.',
|
|
1415
|
+
stainlessPath: '(resource) agentConfig > (method) update',
|
|
1416
|
+
qualified: 'client.agentConfig.update',
|
|
1417
|
+
params: [
|
|
1418
|
+
'key: string;',
|
|
1419
|
+
"channel: 'production' | 'staging';",
|
|
1420
|
+
'document: object;',
|
|
1421
|
+
'agentId?: string;',
|
|
1422
|
+
'summary?: string;',
|
|
1423
|
+
],
|
|
1424
|
+
response: '{ data: { id: string; agentId: string; createdAt: string; key: string; productionRevisionId: string; stagingRevisionId: string; updatedAt: string; }; }',
|
|
1425
|
+
markdown: "## 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```",
|
|
1426
|
+
perLanguage: {
|
|
1427
|
+
typescript: {
|
|
1428
|
+
method: 'client.agentConfig.update',
|
|
1429
|
+
example: "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);",
|
|
1430
|
+
},
|
|
1431
|
+
python: {
|
|
1432
|
+
method: 'agent_config.update',
|
|
1433
|
+
example: '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)',
|
|
1434
|
+
},
|
|
1435
|
+
http: {
|
|
1436
|
+
example: '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 }\'',
|
|
1437
|
+
},
|
|
1438
|
+
},
|
|
1439
|
+
},
|
|
1440
|
+
{
|
|
1441
|
+
name: 'resolve',
|
|
1442
|
+
endpoint: '/v1/agent-config/{key}/resolve',
|
|
1443
|
+
httpMethod: 'post',
|
|
1444
|
+
summary: 'Resolve config for a session',
|
|
1445
|
+
description: '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.',
|
|
1446
|
+
stainlessPath: '(resource) agentConfig > (method) resolve',
|
|
1447
|
+
qualified: 'client.agentConfig.resolve',
|
|
1448
|
+
params: [
|
|
1449
|
+
'key: string;',
|
|
1450
|
+
'defaults?: object;',
|
|
1451
|
+
'session?: { calledNumber?: string; callerNumber?: string; sessionId?: string; };',
|
|
1452
|
+
],
|
|
1453
|
+
response: "{ data: { channel: 'production' | 'staging'; document: object; key: string; revisionId: string; simulationJobId: string; }; }",
|
|
1454
|
+
markdown: "## 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```",
|
|
1455
|
+
perLanguage: {
|
|
1456
|
+
typescript: {
|
|
1457
|
+
method: 'client.agentConfig.resolve',
|
|
1458
|
+
example: "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);",
|
|
1459
|
+
},
|
|
1460
|
+
python: {
|
|
1461
|
+
method: 'agent_config.resolve',
|
|
1462
|
+
example: '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)',
|
|
1463
|
+
},
|
|
1464
|
+
http: {
|
|
1465
|
+
example: 'curl https://api.roark.ai/v1/agent-config/$KEY/resolve \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
1466
|
+
},
|
|
1467
|
+
},
|
|
1468
|
+
},
|
|
1469
|
+
{
|
|
1470
|
+
name: 'promote',
|
|
1471
|
+
endpoint: '/v1/agent-config/{key}/promote',
|
|
1472
|
+
httpMethod: 'post',
|
|
1473
|
+
summary: 'Promote staging to production',
|
|
1474
|
+
description: '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).',
|
|
1475
|
+
stainlessPath: '(resource) agentConfig > (method) promote',
|
|
1476
|
+
qualified: 'client.agentConfig.promote',
|
|
1477
|
+
params: ['key: string;'],
|
|
1478
|
+
response: '{ data: { id: string; agentId: string; createdAt: string; key: string; productionRevisionId: string; stagingRevisionId: string; updatedAt: string; }; }',
|
|
1479
|
+
markdown: "## 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```",
|
|
1480
|
+
perLanguage: {
|
|
1481
|
+
typescript: {
|
|
1482
|
+
method: 'client.agentConfig.promote',
|
|
1483
|
+
example: "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);",
|
|
1484
|
+
},
|
|
1485
|
+
python: {
|
|
1486
|
+
method: 'agent_config.promote',
|
|
1487
|
+
example: '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)',
|
|
1488
|
+
},
|
|
1489
|
+
http: {
|
|
1490
|
+
example: 'curl https://api.roark.ai/v1/agent-config/$KEY/promote \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
1491
|
+
},
|
|
1492
|
+
},
|
|
1493
|
+
},
|
|
1494
|
+
{
|
|
1495
|
+
name: 'deleteStaging',
|
|
1496
|
+
endpoint: '/v1/agent-config/{key}/staging',
|
|
1497
|
+
httpMethod: 'delete',
|
|
1498
|
+
summary: 'Discard the staging revision',
|
|
1499
|
+
description: 'Clear the staging channel. Production is untouched; recognized simulation sessions go back to reading production.',
|
|
1500
|
+
stainlessPath: '(resource) agentConfig > (method) deleteStaging',
|
|
1501
|
+
qualified: 'client.agentConfig.deleteStaging',
|
|
1502
|
+
params: ['key: string;'],
|
|
1503
|
+
response: '{ data: { id: string; agentId: string; createdAt: string; key: string; productionRevisionId: string; stagingRevisionId: string; updatedAt: string; }; }',
|
|
1504
|
+
markdown: "## 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```",
|
|
1505
|
+
perLanguage: {
|
|
1506
|
+
typescript: {
|
|
1507
|
+
method: 'client.agentConfig.deleteStaging',
|
|
1508
|
+
example: "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);",
|
|
1509
|
+
},
|
|
1510
|
+
python: {
|
|
1511
|
+
method: 'agent_config.delete_staging',
|
|
1512
|
+
example: '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)',
|
|
1513
|
+
},
|
|
1514
|
+
http: {
|
|
1515
|
+
example: 'curl https://api.roark.ai/v1/agent-config/$KEY/staging \\\n -X DELETE \\\n -H "Authorization: Bearer $ROARK_API_BEARER_TOKEN"',
|
|
1516
|
+
},
|
|
1517
|
+
},
|
|
1518
|
+
},
|
|
1360
1519
|
{
|
|
1361
1520
|
name: 'list',
|
|
1362
1521
|
endpoint: '/v1/autoimprove/job',
|
|
@@ -1365,8 +1524,8 @@ const EMBEDDED_METHODS = [
|
|
|
1365
1524
|
description: 'List 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.',
|
|
1366
1525
|
stainlessPath: '(resource) autoimproveJob > (method) list',
|
|
1367
1526
|
qualified: 'client.autoimproveJob.list',
|
|
1368
|
-
response: "{ 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; }[]; }",
|
|
1369
|
-
markdown: "## 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```",
|
|
1527
|
+
response: "{ 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; }[]; }",
|
|
1528
|
+
markdown: "## 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```",
|
|
1370
1529
|
perLanguage: {
|
|
1371
1530
|
typescript: {
|
|
1372
1531
|
method: 'client.autoimproveJob.list',
|
|
@@ -1390,8 +1549,8 @@ const EMBEDDED_METHODS = [
|
|
|
1390
1549
|
stainlessPath: '(resource) autoimproveJob > (method) getById',
|
|
1391
1550
|
qualified: 'client.autoimproveJob.getByID',
|
|
1392
1551
|
params: ['jobId: string;'],
|
|
1393
|
-
response: "{ 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; }; }",
|
|
1394
|
-
markdown: "## 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```",
|
|
1552
|
+
response: "{ 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; }; }",
|
|
1553
|
+
markdown: "## 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```",
|
|
1395
1554
|
perLanguage: {
|
|
1396
1555
|
typescript: {
|
|
1397
1556
|
method: 'client.autoimproveJob.getByID',
|
|
@@ -1411,7 +1570,7 @@ const EMBEDDED_METHODS = [
|
|
|
1411
1570
|
endpoint: '/v1/autoimprove/job',
|
|
1412
1571
|
httpMethod: 'post',
|
|
1413
1572
|
summary: 'Start an Autoimprove job',
|
|
1414
|
-
description: '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
|
|
1573
|
+
description: '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.',
|
|
1415
1574
|
stainlessPath: '(resource) autoimproveJob > (method) create',
|
|
1416
1575
|
qualified: 'client.autoimproveJob.create',
|
|
1417
1576
|
params: [
|
|
@@ -1425,8 +1584,8 @@ const EMBEDDED_METHODS = [
|
|
|
1425
1584
|
'targetValue?: number;',
|
|
1426
1585
|
'validationRunPlanId?: string;',
|
|
1427
1586
|
],
|
|
1428
|
-
response: "{ 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; }; }",
|
|
1429
|
-
markdown: "## 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
|
|
1587
|
+
response: "{ 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; }; }",
|
|
1588
|
+
markdown: "## 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```",
|
|
1430
1589
|
perLanguage: {
|
|
1431
1590
|
typescript: {
|
|
1432
1591
|
method: 'client.autoimproveJob.create',
|
|
@@ -1475,8 +1634,8 @@ const EMBEDDED_METHODS = [
|
|
|
1475
1634
|
stainlessPath: '(resource) autoimproveJob > (method) promote',
|
|
1476
1635
|
qualified: 'client.autoimproveJob.promote',
|
|
1477
1636
|
params: ['jobId: string;'],
|
|
1478
|
-
response: "{ 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; }; }",
|
|
1479
|
-
markdown: "## 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```",
|
|
1637
|
+
response: "{ 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; }; }",
|
|
1638
|
+
markdown: "## 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```",
|
|
1480
1639
|
perLanguage: {
|
|
1481
1640
|
typescript: {
|
|
1482
1641
|
method: 'client.autoimproveJob.promote',
|
|
@@ -1500,8 +1659,8 @@ const EMBEDDED_METHODS = [
|
|
|
1500
1659
|
stainlessPath: '(resource) autoimproveJob > (method) dismiss',
|
|
1501
1660
|
qualified: 'client.autoimproveJob.dismiss',
|
|
1502
1661
|
params: ['jobId: string;'],
|
|
1503
|
-
response: "{ 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; }; }",
|
|
1504
|
-
markdown: "## 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```",
|
|
1662
|
+
response: "{ 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; }; }",
|
|
1663
|
+
markdown: "## 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```",
|
|
1505
1664
|
perLanguage: {
|
|
1506
1665
|
typescript: {
|
|
1507
1666
|
method: 'client.autoimproveJob.dismiss',
|
|
@@ -1986,6 +2145,31 @@ const EMBEDDED_METHODS = [
|
|
|
1986
2145
|
},
|
|
1987
2146
|
},
|
|
1988
2147
|
},
|
|
2148
|
+
{
|
|
2149
|
+
name: 'build',
|
|
2150
|
+
endpoint: '/v1/agent/build',
|
|
2151
|
+
httpMethod: 'post',
|
|
2152
|
+
summary: 'Build a Roark-hosted agent',
|
|
2153
|
+
description: '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.',
|
|
2154
|
+
stainlessPath: '(resource) agent > (method) build',
|
|
2155
|
+
qualified: 'client.agent.build',
|
|
2156
|
+
params: ['jobDescription: string;', 'name: string;', 'voice?: string;'],
|
|
2157
|
+
response: '{ data: { id: string; createdAt: string; customId: string; description: string; name: string; updatedAt: string; }; }',
|
|
2158
|
+
markdown: "## 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```",
|
|
2159
|
+
perLanguage: {
|
|
2160
|
+
typescript: {
|
|
2161
|
+
method: 'client.agent.build',
|
|
2162
|
+
example: "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);",
|
|
2163
|
+
},
|
|
2164
|
+
python: {
|
|
2165
|
+
method: 'agent.build',
|
|
2166
|
+
example: '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)',
|
|
2167
|
+
},
|
|
2168
|
+
http: {
|
|
2169
|
+
example: '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 }\'',
|
|
2170
|
+
},
|
|
2171
|
+
},
|
|
2172
|
+
},
|
|
1989
2173
|
{
|
|
1990
2174
|
name: 'update',
|
|
1991
2175
|
endpoint: '/v1/agent/{agentId}',
|