@ouro.bot/cli 0.0.1-alpha.0 → 0.1.0-alpha.2

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 (119) hide show
  1. package/AdoptionSpecialist.ouro/agent.json +20 -0
  2. package/AdoptionSpecialist.ouro/psyche/SOUL.md +22 -0
  3. package/AdoptionSpecialist.ouro/psyche/identities/basilisk.md +31 -0
  4. package/AdoptionSpecialist.ouro/psyche/identities/jafar.md +31 -0
  5. package/AdoptionSpecialist.ouro/psyche/identities/jormungandr.md +31 -0
  6. package/AdoptionSpecialist.ouro/psyche/identities/kaa.md +31 -0
  7. package/AdoptionSpecialist.ouro/psyche/identities/medusa.md +31 -0
  8. package/AdoptionSpecialist.ouro/psyche/identities/monty.md +31 -0
  9. package/AdoptionSpecialist.ouro/psyche/identities/nagini.md +31 -0
  10. package/AdoptionSpecialist.ouro/psyche/identities/ouroboros.md +31 -0
  11. package/AdoptionSpecialist.ouro/psyche/identities/python.md +31 -0
  12. package/AdoptionSpecialist.ouro/psyche/identities/quetzalcoatl.md +31 -0
  13. package/AdoptionSpecialist.ouro/psyche/identities/sir-hiss.md +31 -0
  14. package/AdoptionSpecialist.ouro/psyche/identities/the-serpent.md +31 -0
  15. package/AdoptionSpecialist.ouro/psyche/identities/the-snake.md +31 -0
  16. package/README.md +224 -6
  17. package/dist/heart/agent-entry.js +17 -0
  18. package/dist/heart/api-error.js +34 -0
  19. package/dist/heart/config.js +296 -0
  20. package/dist/heart/core.js +515 -0
  21. package/dist/heart/daemon/daemon-cli.js +675 -0
  22. package/dist/heart/daemon/daemon-entry.js +74 -0
  23. package/dist/heart/daemon/daemon.js +313 -0
  24. package/dist/heart/daemon/hatch-flow.js +285 -0
  25. package/dist/heart/daemon/hatch-specialist.js +107 -0
  26. package/dist/heart/daemon/health-monitor.js +79 -0
  27. package/dist/heart/daemon/log-tailer.js +146 -0
  28. package/dist/heart/daemon/message-router.js +98 -0
  29. package/dist/heart/daemon/os-cron.js +260 -0
  30. package/dist/heart/daemon/ouro-bot-entry.js +23 -0
  31. package/dist/heart/daemon/ouro-bot-wrapper.js +90 -0
  32. package/dist/heart/daemon/ouro-entry.js +23 -0
  33. package/dist/heart/daemon/ouro-uti.js +212 -0
  34. package/dist/heart/daemon/process-manager.js +237 -0
  35. package/dist/heart/daemon/runtime-logging.js +98 -0
  36. package/dist/heart/daemon/subagent-installer.js +125 -0
  37. package/dist/heart/daemon/task-scheduler.js +240 -0
  38. package/dist/heart/harness.js +26 -0
  39. package/dist/heart/identity.js +281 -0
  40. package/dist/heart/kicks.js +144 -0
  41. package/dist/heart/primitives.js +4 -0
  42. package/dist/heart/providers/anthropic.js +329 -0
  43. package/dist/heart/providers/azure.js +66 -0
  44. package/dist/heart/providers/minimax.js +53 -0
  45. package/dist/heart/providers/openai-codex.js +162 -0
  46. package/dist/heart/streaming.js +412 -0
  47. package/dist/heart/turn-coordinator.js +62 -0
  48. package/dist/inner-worker-entry.js +4 -0
  49. package/dist/mind/associative-recall.js +197 -0
  50. package/dist/mind/bundle-manifest.js +118 -0
  51. package/dist/mind/context.js +302 -0
  52. package/dist/mind/first-impressions.js +43 -0
  53. package/dist/mind/format.js +56 -0
  54. package/dist/mind/friends/channel.js +41 -0
  55. package/dist/mind/friends/resolver.js +84 -0
  56. package/dist/mind/friends/store-file.js +171 -0
  57. package/dist/mind/friends/store.js +4 -0
  58. package/dist/mind/friends/tokens.js +26 -0
  59. package/dist/mind/friends/types.js +21 -0
  60. package/dist/mind/memory.js +388 -0
  61. package/dist/mind/pending.js +93 -0
  62. package/dist/mind/phrases.js +43 -0
  63. package/dist/mind/prompt-refresh.js +20 -0
  64. package/dist/mind/prompt.js +352 -0
  65. package/dist/mind/token-estimate.js +119 -0
  66. package/dist/nerves/cli-logging.js +31 -0
  67. package/dist/nerves/coverage/audit-rules.js +81 -0
  68. package/dist/nerves/coverage/audit.js +200 -0
  69. package/dist/nerves/coverage/cli-main.js +5 -0
  70. package/dist/nerves/coverage/cli.js +51 -0
  71. package/dist/nerves/coverage/contract.js +23 -0
  72. package/dist/nerves/coverage/file-completeness.js +56 -0
  73. package/dist/nerves/coverage/run-artifacts.js +77 -0
  74. package/dist/nerves/coverage/source-scanner.js +34 -0
  75. package/dist/nerves/index.js +152 -0
  76. package/dist/nerves/runtime.js +38 -0
  77. package/dist/repertoire/ado-client.js +211 -0
  78. package/dist/repertoire/ado-context.js +73 -0
  79. package/dist/repertoire/ado-semantic.js +841 -0
  80. package/dist/repertoire/ado-templates.js +146 -0
  81. package/dist/repertoire/coding/index.js +36 -0
  82. package/dist/repertoire/coding/manager.js +489 -0
  83. package/dist/repertoire/coding/monitor.js +60 -0
  84. package/dist/repertoire/coding/reporter.js +45 -0
  85. package/dist/repertoire/coding/spawner.js +102 -0
  86. package/dist/repertoire/coding/tools.js +167 -0
  87. package/dist/repertoire/coding/types.js +2 -0
  88. package/dist/repertoire/data/ado-endpoints.json +122 -0
  89. package/dist/repertoire/data/graph-endpoints.json +212 -0
  90. package/dist/repertoire/github-client.js +64 -0
  91. package/dist/repertoire/graph-client.js +118 -0
  92. package/dist/repertoire/skills.js +156 -0
  93. package/dist/repertoire/tasks/board.js +122 -0
  94. package/dist/repertoire/tasks/index.js +210 -0
  95. package/dist/repertoire/tasks/lifecycle.js +80 -0
  96. package/dist/repertoire/tasks/middleware.js +65 -0
  97. package/dist/repertoire/tasks/parser.js +173 -0
  98. package/dist/repertoire/tasks/scanner.js +132 -0
  99. package/dist/repertoire/tasks/transitions.js +145 -0
  100. package/dist/repertoire/tasks/types.js +2 -0
  101. package/dist/repertoire/tools-base.js +714 -0
  102. package/dist/repertoire/tools-github.js +53 -0
  103. package/dist/repertoire/tools-teams.js +308 -0
  104. package/dist/repertoire/tools.js +199 -0
  105. package/dist/senses/cli-entry.js +15 -0
  106. package/dist/senses/cli.js +604 -0
  107. package/dist/senses/commands.js +98 -0
  108. package/dist/senses/inner-dialog-worker.js +61 -0
  109. package/dist/senses/inner-dialog.js +231 -0
  110. package/dist/senses/session-lock.js +119 -0
  111. package/dist/senses/teams-entry.js +15 -0
  112. package/dist/senses/teams.js +696 -0
  113. package/dist/senses/trust-gate.js +150 -0
  114. package/package.json +34 -11
  115. package/subagents/README.md +73 -0
  116. package/subagents/work-doer.md +233 -0
  117. package/subagents/work-merger.md +624 -0
  118. package/subagents/work-planner.md +373 -0
  119. package/bin/ouro.js +0 -6
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CodingSessionMonitor = void 0;
4
+ const runtime_1 = require("../../nerves/runtime");
5
+ class CodingSessionMonitor {
6
+ manager;
7
+ nowMs;
8
+ constructor(options) {
9
+ this.manager = options.manager;
10
+ this.nowMs = options.nowMs ?? Date.now;
11
+ }
12
+ tick() {
13
+ const now = this.nowMs();
14
+ const detectedStalls = this.manager.checkStalls(now);
15
+ const sessions = this.manager.listSessions();
16
+ const blockedSessionIds = sessions.filter((session) => session.status === "waiting_input").map((session) => session.id);
17
+ const stalledSessionIds = sessions.filter((session) => session.status === "stalled").map((session) => session.id);
18
+ const completedSessionIds = sessions.filter((session) => session.status === "completed").map((session) => session.id);
19
+ const failedSessionIds = sessions.filter((session) => session.status === "failed").map((session) => session.id);
20
+ const restarts = sessions.reduce((sum, session) => sum + session.restartCount, 0);
21
+ const recoveryActions = [];
22
+ for (const sessionId of blockedSessionIds) {
23
+ recoveryActions.push({ sessionId, action: "send_guidance", reason: "waiting_input" });
24
+ }
25
+ for (const sessionId of stalledSessionIds) {
26
+ recoveryActions.push({ sessionId, action: "send_guidance", reason: "stalled" });
27
+ }
28
+ for (const sessionId of failedSessionIds) {
29
+ recoveryActions.push({ sessionId, action: "manual_intervention_required", reason: "failed" });
30
+ }
31
+ const report = {
32
+ at: new Date(now).toISOString(),
33
+ summary: {
34
+ active: sessions.length,
35
+ completed: completedSessionIds.length,
36
+ blocked: blockedSessionIds.length,
37
+ stalled: Math.max(stalledSessionIds.length, detectedStalls),
38
+ failed: failedSessionIds.length,
39
+ restarts,
40
+ },
41
+ blockedSessionIds,
42
+ stalledSessionIds,
43
+ completedSessionIds,
44
+ recoveryActions,
45
+ };
46
+ (0, runtime_1.emitNervesEvent)({
47
+ component: "repertoire",
48
+ event: "repertoire.coding_monitor_tick",
49
+ message: "coding monitor tick completed",
50
+ meta: {
51
+ active: report.summary.active,
52
+ blocked: report.summary.blocked,
53
+ stalled: report.summary.stalled,
54
+ failed: report.summary.failed,
55
+ },
56
+ });
57
+ return report;
58
+ }
59
+ }
60
+ exports.CodingSessionMonitor = CodingSessionMonitor;
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.formatCodingMonitorReport = formatCodingMonitorReport;
4
+ const runtime_1 = require("../../nerves/runtime");
5
+ function formatCodingMonitorReport(report) {
6
+ const lines = [];
7
+ lines.push(`coding-monitor at=${report.at}`);
8
+ lines.push([
9
+ `active=${report.summary.active}`,
10
+ `completed=${report.summary.completed}`,
11
+ `blocked=${report.summary.blocked}`,
12
+ `stalled=${report.summary.stalled}`,
13
+ `failed=${report.summary.failed}`,
14
+ `restarts=${report.summary.restarts}`,
15
+ ].join(" "));
16
+ if (report.summary.active === 0) {
17
+ lines.push("no active coding sessions");
18
+ (0, runtime_1.emitNervesEvent)({
19
+ component: "repertoire",
20
+ event: "repertoire.coding_monitor_report",
21
+ message: "formatted coding monitor report",
22
+ meta: { active: report.summary.active, lineCount: lines.length },
23
+ });
24
+ return lines.join("\n");
25
+ }
26
+ if (report.blockedSessionIds.length > 0) {
27
+ lines.push(`blocked: ${report.blockedSessionIds.join(",")}`);
28
+ }
29
+ if (report.stalledSessionIds.length > 0) {
30
+ lines.push(`stalled: ${report.stalledSessionIds.join(",")}`);
31
+ }
32
+ if (report.completedSessionIds.length > 0) {
33
+ lines.push(`completed: ${report.completedSessionIds.join(",")}`);
34
+ }
35
+ for (const action of report.recoveryActions) {
36
+ lines.push(`recovery: ${action.sessionId} -> ${action.action} (${action.reason})`);
37
+ }
38
+ (0, runtime_1.emitNervesEvent)({
39
+ component: "repertoire",
40
+ event: "repertoire.coding_monitor_report",
41
+ message: "formatted coding monitor report",
42
+ meta: { active: report.summary.active, lineCount: lines.length },
43
+ });
44
+ return lines.join("\n");
45
+ }
@@ -0,0 +1,102 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.spawnCodingProcess = spawnCodingProcess;
37
+ const child_process_1 = require("child_process");
38
+ const fs = __importStar(require("fs"));
39
+ const runtime_1 = require("../../nerves/runtime");
40
+ function buildCommandArgs(runner, workdir) {
41
+ if (runner === "claude") {
42
+ return {
43
+ command: "claude",
44
+ args: [
45
+ "-p",
46
+ "--dangerously-skip-permissions",
47
+ "--add-dir",
48
+ workdir,
49
+ "--input-format",
50
+ "stream-json",
51
+ "--output-format",
52
+ "stream-json",
53
+ ],
54
+ };
55
+ }
56
+ return {
57
+ command: "codex",
58
+ args: ["exec", "--skip-git-repo-check", "--cd", workdir],
59
+ };
60
+ }
61
+ function buildPrompt(request, deps) {
62
+ const sections = [];
63
+ sections.push([
64
+ "Coding session metadata:",
65
+ `sessionId: ${request.sessionId ?? "pending"}`,
66
+ `parentAgent: ${request.parentAgent ?? "unknown"}`,
67
+ `taskRef: ${request.taskRef ?? "unassigned"}`,
68
+ ].join("\n"));
69
+ if (request.stateFile && deps.existsSync(request.stateFile)) {
70
+ const stateContent = deps.readFileSync(request.stateFile, "utf-8").trim();
71
+ if (stateContent.length > 0) {
72
+ sections.push(`State file (${request.stateFile}):\n${stateContent}`);
73
+ }
74
+ }
75
+ sections.push(request.prompt);
76
+ return sections.join("\n\n---\n\n");
77
+ }
78
+ function spawnCodingProcess(request, deps = {}) {
79
+ const spawnFn = deps.spawnFn ?? ((command, args, options) => (0, child_process_1.spawn)(command, args, options));
80
+ const existsSync = deps.existsSync ?? fs.existsSync;
81
+ const readFileSync = deps.readFileSync ?? fs.readFileSync;
82
+ const prompt = buildPrompt(request, { existsSync, readFileSync });
83
+ const { command, args } = buildCommandArgs(request.runner, request.workdir);
84
+ (0, runtime_1.emitNervesEvent)({
85
+ component: "repertoire",
86
+ event: "repertoire.coding_spawn_start",
87
+ message: "spawning coding session process",
88
+ meta: { runner: request.runner, workdir: request.workdir },
89
+ });
90
+ const proc = spawnFn(command, args, {
91
+ cwd: request.workdir,
92
+ stdio: ["pipe", "pipe", "pipe"],
93
+ });
94
+ proc.stdin.write(`${prompt}\n`);
95
+ (0, runtime_1.emitNervesEvent)({
96
+ component: "repertoire",
97
+ event: "repertoire.coding_spawn_end",
98
+ message: "spawned coding session process",
99
+ meta: { runner: request.runner, pid: proc.pid ?? null },
100
+ });
101
+ return { process: proc, command, args, prompt };
102
+ }
@@ -0,0 +1,167 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.codingToolDefinitions = void 0;
4
+ const index_1 = require("./index");
5
+ const runtime_1 = require("../../nerves/runtime");
6
+ const RUNNERS = ["claude", "codex"];
7
+ function requireArg(args, key) {
8
+ const value = args[key];
9
+ if (!value || value.trim().length === 0) {
10
+ return null;
11
+ }
12
+ return value.trim();
13
+ }
14
+ function parseRunner(value) {
15
+ return RUNNERS.includes(value) ? value : null;
16
+ }
17
+ function optionalArg(args, key) {
18
+ const raw = args[key];
19
+ if (!raw)
20
+ return undefined;
21
+ const trimmed = raw.trim();
22
+ return trimmed.length > 0 ? trimmed : undefined;
23
+ }
24
+ function emitCodingToolEvent(toolName) {
25
+ (0, runtime_1.emitNervesEvent)({
26
+ component: "repertoire",
27
+ event: "repertoire.coding_tool_call",
28
+ message: "coding tool handler invoked",
29
+ meta: { toolName },
30
+ });
31
+ }
32
+ const codingSpawnTool = {
33
+ type: "function",
34
+ function: {
35
+ name: "coding_spawn",
36
+ description: "spawn a coding session using claude/codex and explicit task-threaded guidance",
37
+ parameters: {
38
+ type: "object",
39
+ properties: {
40
+ runner: { type: "string", enum: ["claude", "codex"] },
41
+ workdir: { type: "string" },
42
+ prompt: { type: "string" },
43
+ taskRef: { type: "string" },
44
+ scopeFile: { type: "string" },
45
+ stateFile: { type: "string" },
46
+ },
47
+ required: ["runner", "workdir", "prompt", "taskRef"],
48
+ },
49
+ },
50
+ };
51
+ const codingStatusTool = {
52
+ type: "function",
53
+ function: {
54
+ name: "coding_status",
55
+ description: "inspect coding sessions; omit sessionId to list all active/known sessions",
56
+ parameters: {
57
+ type: "object",
58
+ properties: {
59
+ sessionId: { type: "string" },
60
+ },
61
+ },
62
+ },
63
+ };
64
+ const codingSendInputTool = {
65
+ type: "function",
66
+ function: {
67
+ name: "coding_send_input",
68
+ description: "send stdin text to an existing coding session",
69
+ parameters: {
70
+ type: "object",
71
+ properties: {
72
+ sessionId: { type: "string" },
73
+ input: { type: "string" },
74
+ },
75
+ required: ["sessionId", "input"],
76
+ },
77
+ },
78
+ };
79
+ const codingKillTool = {
80
+ type: "function",
81
+ function: {
82
+ name: "coding_kill",
83
+ description: "terminate an existing coding session",
84
+ parameters: {
85
+ type: "object",
86
+ properties: {
87
+ sessionId: { type: "string" },
88
+ },
89
+ required: ["sessionId"],
90
+ },
91
+ },
92
+ };
93
+ exports.codingToolDefinitions = [
94
+ {
95
+ tool: codingSpawnTool,
96
+ handler: async (args) => {
97
+ emitCodingToolEvent("coding_spawn");
98
+ const rawRunner = requireArg(args, "runner");
99
+ if (!rawRunner)
100
+ return "runner is required";
101
+ const runner = parseRunner(rawRunner);
102
+ if (!runner)
103
+ return `invalid runner: ${rawRunner}`;
104
+ const workdir = requireArg(args, "workdir");
105
+ if (!workdir)
106
+ return "workdir is required";
107
+ const prompt = requireArg(args, "prompt");
108
+ if (!prompt)
109
+ return "prompt is required";
110
+ const taskRef = requireArg(args, "taskRef");
111
+ if (!taskRef)
112
+ return "taskRef is required";
113
+ const request = {
114
+ runner,
115
+ workdir,
116
+ prompt,
117
+ taskRef,
118
+ };
119
+ const scopeFile = optionalArg(args, "scopeFile");
120
+ if (scopeFile)
121
+ request.scopeFile = scopeFile;
122
+ const stateFile = optionalArg(args, "stateFile");
123
+ if (stateFile)
124
+ request.stateFile = stateFile;
125
+ const session = await (0, index_1.getCodingSessionManager)().spawnSession(request);
126
+ return JSON.stringify(session);
127
+ },
128
+ },
129
+ {
130
+ tool: codingStatusTool,
131
+ handler: (args) => {
132
+ emitCodingToolEvent("coding_status");
133
+ const manager = (0, index_1.getCodingSessionManager)();
134
+ const sessionId = requireArg(args, "sessionId");
135
+ if (!sessionId) {
136
+ return JSON.stringify(manager.listSessions());
137
+ }
138
+ const session = manager.getSession(sessionId);
139
+ if (!session)
140
+ return `session not found: ${sessionId}`;
141
+ return JSON.stringify(session);
142
+ },
143
+ },
144
+ {
145
+ tool: codingSendInputTool,
146
+ handler: (args) => {
147
+ emitCodingToolEvent("coding_send_input");
148
+ const sessionId = requireArg(args, "sessionId");
149
+ if (!sessionId)
150
+ return "sessionId is required";
151
+ const input = requireArg(args, "input");
152
+ if (!input)
153
+ return "input is required";
154
+ return JSON.stringify((0, index_1.getCodingSessionManager)().sendInput(sessionId, input));
155
+ },
156
+ },
157
+ {
158
+ tool: codingKillTool,
159
+ handler: (args) => {
160
+ emitCodingToolEvent("coding_kill");
161
+ const sessionId = requireArg(args, "sessionId");
162
+ if (!sessionId)
163
+ return "sessionId is required";
164
+ return JSON.stringify((0, index_1.getCodingSessionManager)().killSession(sessionId));
165
+ },
166
+ },
167
+ ];
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,122 @@
1
+ [
2
+ {
3
+ "path": "/_apis/wit/wiql",
4
+ "method": "POST",
5
+ "description": "Run a WIQL query to search for work items (read-only, use ado_query)",
6
+ "params": "query (WIQL string)"
7
+ },
8
+ {
9
+ "path": "/_apis/wit/workitems/{id}",
10
+ "method": "GET",
11
+ "description": "Get a single work item by ID",
12
+ "params": "$expand, fields, asOf"
13
+ },
14
+ {
15
+ "path": "/_apis/wit/workitems?ids={ids}",
16
+ "method": "GET",
17
+ "description": "Get multiple work items by IDs (comma-separated)",
18
+ "params": "ids, fields, $expand, asOf"
19
+ },
20
+ {
21
+ "path": "/{project}/_apis/wit/workitems/${type}",
22
+ "method": "POST",
23
+ "description": "Create a new work item of the given type (Bug, Task, User Story, etc.)",
24
+ "params": "JSON Patch array: [{op, path, value}] for fields like /fields/System.Title"
25
+ },
26
+ {
27
+ "path": "/_apis/wit/workitems/{id}",
28
+ "method": "PATCH",
29
+ "description": "Update an existing work item (change title, state, assigned to, etc.)",
30
+ "params": "JSON Patch array: [{op: replace, path: /fields/System.Title, value: ...}]"
31
+ },
32
+ {
33
+ "path": "/_apis/wit/workitems/{id}",
34
+ "method": "DELETE",
35
+ "description": "Delete a work item (moves to recycle bin)",
36
+ "params": "destroy (boolean, permanently delete)"
37
+ },
38
+ {
39
+ "path": "/_apis/git/repositories",
40
+ "method": "GET",
41
+ "description": "List all Git repositories in the organization or project",
42
+ "params": "project (optional path prefix: /{project}/_apis/git/repositories)"
43
+ },
44
+ {
45
+ "path": "/_apis/git/repositories/{repositoryId}",
46
+ "method": "GET",
47
+ "description": "Get a specific Git repository by ID or name",
48
+ "params": ""
49
+ },
50
+ {
51
+ "path": "/_apis/git/repositories/{repositoryId}/refs",
52
+ "method": "GET",
53
+ "description": "List branches and tags for a repository",
54
+ "params": "filter (e.g. heads/ for branches only), $top"
55
+ },
56
+ {
57
+ "path": "/_apis/git/repositories/{repositoryId}/commits",
58
+ "method": "GET",
59
+ "description": "List commits for a repository",
60
+ "params": "searchCriteria.itemVersion.version (branch), $top, searchCriteria.fromDate, searchCriteria.toDate"
61
+ },
62
+ {
63
+ "path": "/_apis/git/repositories/{repositoryId}/pullrequests",
64
+ "method": "GET",
65
+ "description": "List pull requests for a repository",
66
+ "params": "searchCriteria.status (active/completed/abandoned), searchCriteria.creatorId, $top"
67
+ },
68
+ {
69
+ "path": "/_apis/git/repositories/{repositoryId}/pullrequests",
70
+ "method": "POST",
71
+ "description": "Create a new pull request",
72
+ "params": "sourceRefName, targetRefName, title, description"
73
+ },
74
+ {
75
+ "path": "/_apis/git/repositories/{repositoryId}/pullrequests/{pullRequestId}",
76
+ "method": "GET",
77
+ "description": "Get a specific pull request by ID",
78
+ "params": ""
79
+ },
80
+ {
81
+ "path": "/_apis/git/repositories/{repositoryId}/pullrequests/{pullRequestId}",
82
+ "method": "PATCH",
83
+ "description": "Update a pull request (change title, description, status, auto-complete)",
84
+ "params": "title, description, status (active/abandoned/completed), autoCompleteSetBy"
85
+ },
86
+ {
87
+ "path": "/_apis/build/builds",
88
+ "method": "GET",
89
+ "description": "List builds (pipeline runs)",
90
+ "params": "definitions (pipeline ID), statusFilter, resultFilter, $top, branchName"
91
+ },
92
+ {
93
+ "path": "/_apis/build/builds",
94
+ "method": "POST",
95
+ "description": "Queue a new build (trigger a pipeline)",
96
+ "params": "definition.id, sourceBranch, parameters"
97
+ },
98
+ {
99
+ "path": "/_apis/build/builds/{buildId}",
100
+ "method": "GET",
101
+ "description": "Get a specific build by ID",
102
+ "params": ""
103
+ },
104
+ {
105
+ "path": "/_apis/pipelines",
106
+ "method": "GET",
107
+ "description": "List pipelines (definitions)",
108
+ "params": "$top, orderBy"
109
+ },
110
+ {
111
+ "path": "/_apis/pipelines/{pipelineId}/runs",
112
+ "method": "POST",
113
+ "description": "Run a pipeline",
114
+ "params": "resources.repositories.self.refName (branch), templateParameters"
115
+ },
116
+ {
117
+ "path": "/{project}/_apis/wit/queries",
118
+ "method": "GET",
119
+ "description": "List saved work item queries (shared and personal)",
120
+ "params": "$depth, $expand"
121
+ }
122
+ ]