@ottocode/server 0.1.260 → 0.1.262

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/package.json +4 -3
  2. package/src/index.ts +5 -4
  3. package/src/openapi/register.ts +92 -0
  4. package/src/openapi/route.ts +22 -0
  5. package/src/routes/ask.ts +210 -99
  6. package/src/routes/auth.ts +1701 -626
  7. package/src/routes/branch.ts +281 -90
  8. package/src/routes/config/agents.ts +79 -32
  9. package/src/routes/config/cwd.ts +46 -14
  10. package/src/routes/config/debug.ts +159 -30
  11. package/src/routes/config/defaults.ts +182 -64
  12. package/src/routes/config/main.ts +109 -73
  13. package/src/routes/config/models.ts +304 -137
  14. package/src/routes/config/providers.ts +462 -166
  15. package/src/routes/config/utils.ts +2 -2
  16. package/src/routes/doctor.ts +395 -161
  17. package/src/routes/files.ts +650 -260
  18. package/src/routes/git/branch.ts +143 -52
  19. package/src/routes/git/commit.ts +347 -141
  20. package/src/routes/git/diff.ts +239 -116
  21. package/src/routes/git/init.ts +103 -23
  22. package/src/routes/git/pull.ts +167 -65
  23. package/src/routes/git/push.ts +222 -117
  24. package/src/routes/git/remote.ts +401 -100
  25. package/src/routes/git/staging.ts +502 -141
  26. package/src/routes/git/status.ts +171 -78
  27. package/src/routes/mcp.ts +1129 -404
  28. package/src/routes/openapi.ts +27 -4
  29. package/src/routes/ottorouter.ts +1221 -389
  30. package/src/routes/provider-usage.ts +153 -36
  31. package/src/routes/research.ts +817 -370
  32. package/src/routes/root.ts +50 -6
  33. package/src/routes/session-approval.ts +228 -54
  34. package/src/routes/session-files.ts +265 -134
  35. package/src/routes/session-messages.ts +330 -150
  36. package/src/routes/session-stream.ts +83 -2
  37. package/src/routes/sessions.ts +1830 -780
  38. package/src/routes/skills.ts +849 -161
  39. package/src/routes/terminals.ts +469 -103
  40. package/src/routes/tunnel.ts +394 -118
  41. package/src/runtime/ask/service.ts +1 -0
  42. package/src/runtime/message/compaction-limits.ts +3 -3
  43. package/src/runtime/provider/reasoning.ts +2 -1
  44. package/src/runtime/session/db-operations.ts +4 -3
  45. package/src/runtime/utils/token.ts +7 -2
  46. package/src/tools/adapter.ts +21 -0
  47. package/src/openapi/paths/ask.ts +0 -81
  48. package/src/openapi/paths/auth.ts +0 -687
  49. package/src/openapi/paths/branch.ts +0 -102
  50. package/src/openapi/paths/config.ts +0 -485
  51. package/src/openapi/paths/doctor.ts +0 -165
  52. package/src/openapi/paths/files.ts +0 -236
  53. package/src/openapi/paths/git.ts +0 -690
  54. package/src/openapi/paths/mcp.ts +0 -339
  55. package/src/openapi/paths/messages.ts +0 -103
  56. package/src/openapi/paths/ottorouter.ts +0 -594
  57. package/src/openapi/paths/provider-usage.ts +0 -59
  58. package/src/openapi/paths/research.ts +0 -227
  59. package/src/openapi/paths/session-approval.ts +0 -93
  60. package/src/openapi/paths/session-extras.ts +0 -336
  61. package/src/openapi/paths/session-files.ts +0 -91
  62. package/src/openapi/paths/sessions.ts +0 -210
  63. package/src/openapi/paths/skills.ts +0 -377
  64. package/src/openapi/paths/stream.ts +0 -26
  65. package/src/openapi/paths/terminals.ts +0 -226
  66. package/src/openapi/paths/tunnel.ts +0 -163
  67. package/src/openapi/spec.ts +0 -73
@@ -1,81 +0,0 @@
1
- import { errorResponse, projectQueryParam } from '../helpers';
2
-
3
- export const askPaths = {
4
- '/v1/ask': {
5
- post: {
6
- tags: ['ask'],
7
- operationId: 'ask',
8
- summary: 'Send a prompt using the ask service',
9
- description:
10
- 'Streamlined endpoint used by the CLI to send prompts and receive assistant responses. Creates sessions as needed and reuses the last session when requested.',
11
- parameters: [projectQueryParam()],
12
- requestBody: {
13
- required: true,
14
- content: {
15
- 'application/json': {
16
- schema: {
17
- type: 'object',
18
- required: ['prompt'],
19
- properties: {
20
- prompt: {
21
- type: 'string',
22
- description: 'User prompt to send to the assistant.',
23
- },
24
- agent: {
25
- type: 'string',
26
- description: 'Optional agent name to use for this request.',
27
- },
28
- provider: {
29
- $ref: '#/components/schemas/Provider',
30
- description:
31
- 'Optional provider override. When omitted the agent and config defaults apply.',
32
- },
33
- model: {
34
- type: 'string',
35
- description:
36
- 'Optional model override for the selected provider.',
37
- },
38
- reasoningText: {
39
- type: 'boolean',
40
- description:
41
- 'Enable extended thinking / reasoning for models that support it.',
42
- },
43
- reasoningLevel: {
44
- type: 'string',
45
- enum: ['minimal', 'low', 'medium', 'high', 'max', 'xhigh'],
46
- description:
47
- 'Optional reasoning intensity override for supported providers/models.',
48
- },
49
- sessionId: {
50
- type: 'string',
51
- description: 'Send the prompt to a specific session.',
52
- },
53
- last: {
54
- type: 'boolean',
55
- description:
56
- 'If true, reuse the most recent session for the project.',
57
- },
58
- jsonMode: {
59
- type: 'boolean',
60
- description:
61
- 'Request structured JSON output when supported by the agent.',
62
- },
63
- },
64
- },
65
- },
66
- },
67
- },
68
- responses: {
69
- 202: {
70
- description: 'Accepted',
71
- content: {
72
- 'application/json': {
73
- schema: { $ref: '#/components/schemas/AskResponse' },
74
- },
75
- },
76
- },
77
- 400: errorResponse(),
78
- },
79
- },
80
- },
81
- } as const;