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

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 (114) 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 +485 -0
  21. package/dist/heart/daemon/daemon-cli.js +626 -0
  22. package/dist/heart/daemon/daemon-entry.js +74 -0
  23. package/dist/heart/daemon/daemon.js +310 -0
  24. package/dist/heart/daemon/hatch-flow.js +284 -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/message-router.js +98 -0
  28. package/dist/heart/daemon/ouro-bot-entry.js +23 -0
  29. package/dist/heart/daemon/ouro-bot-wrapper.js +90 -0
  30. package/dist/heart/daemon/ouro-entry.js +23 -0
  31. package/dist/heart/daemon/ouro-uti.js +212 -0
  32. package/dist/heart/daemon/process-manager.js +220 -0
  33. package/dist/heart/daemon/runtime-logging.js +98 -0
  34. package/dist/heart/daemon/subagent-installer.js +125 -0
  35. package/dist/heart/daemon/task-scheduler.js +237 -0
  36. package/dist/heart/harness.js +26 -0
  37. package/dist/heart/identity.js +270 -0
  38. package/dist/heart/kicks.js +144 -0
  39. package/dist/heart/primitives.js +4 -0
  40. package/dist/heart/providers/anthropic.js +329 -0
  41. package/dist/heart/providers/azure.js +66 -0
  42. package/dist/heart/providers/minimax.js +53 -0
  43. package/dist/heart/providers/openai-codex.js +162 -0
  44. package/dist/heart/streaming.js +412 -0
  45. package/dist/heart/turn-coordinator.js +62 -0
  46. package/dist/inner-worker-entry.js +4 -0
  47. package/dist/mind/associative-recall.js +176 -0
  48. package/dist/mind/bundle-manifest.js +118 -0
  49. package/dist/mind/context.js +218 -0
  50. package/dist/mind/first-impressions.js +43 -0
  51. package/dist/mind/format.js +56 -0
  52. package/dist/mind/friends/channel.js +41 -0
  53. package/dist/mind/friends/resolver.js +84 -0
  54. package/dist/mind/friends/store-file.js +171 -0
  55. package/dist/mind/friends/store.js +4 -0
  56. package/dist/mind/friends/tokens.js +26 -0
  57. package/dist/mind/friends/types.js +21 -0
  58. package/dist/mind/memory.js +326 -0
  59. package/dist/mind/phrases.js +43 -0
  60. package/dist/mind/prompt.js +254 -0
  61. package/dist/mind/token-estimate.js +119 -0
  62. package/dist/nerves/cli-logging.js +31 -0
  63. package/dist/nerves/coverage/audit-rules.js +81 -0
  64. package/dist/nerves/coverage/audit.js +200 -0
  65. package/dist/nerves/coverage/cli-main.js +5 -0
  66. package/dist/nerves/coverage/cli.js +51 -0
  67. package/dist/nerves/coverage/contract.js +23 -0
  68. package/dist/nerves/coverage/file-completeness.js +46 -0
  69. package/dist/nerves/coverage/run-artifacts.js +77 -0
  70. package/dist/nerves/coverage/source-scanner.js +34 -0
  71. package/dist/nerves/index.js +152 -0
  72. package/dist/nerves/runtime.js +38 -0
  73. package/dist/repertoire/ado-client.js +211 -0
  74. package/dist/repertoire/ado-context.js +73 -0
  75. package/dist/repertoire/ado-semantic.js +841 -0
  76. package/dist/repertoire/ado-templates.js +146 -0
  77. package/dist/repertoire/coding/index.js +36 -0
  78. package/dist/repertoire/coding/manager.js +489 -0
  79. package/dist/repertoire/coding/monitor.js +60 -0
  80. package/dist/repertoire/coding/reporter.js +45 -0
  81. package/dist/repertoire/coding/spawner.js +102 -0
  82. package/dist/repertoire/coding/tools.js +167 -0
  83. package/dist/repertoire/coding/types.js +2 -0
  84. package/dist/repertoire/data/ado-endpoints.json +122 -0
  85. package/dist/repertoire/data/graph-endpoints.json +212 -0
  86. package/dist/repertoire/github-client.js +64 -0
  87. package/dist/repertoire/graph-client.js +118 -0
  88. package/dist/repertoire/skills.js +156 -0
  89. package/dist/repertoire/tasks/board.js +122 -0
  90. package/dist/repertoire/tasks/index.js +210 -0
  91. package/dist/repertoire/tasks/lifecycle.js +80 -0
  92. package/dist/repertoire/tasks/middleware.js +65 -0
  93. package/dist/repertoire/tasks/parser.js +173 -0
  94. package/dist/repertoire/tasks/scanner.js +132 -0
  95. package/dist/repertoire/tasks/transitions.js +145 -0
  96. package/dist/repertoire/tasks/types.js +2 -0
  97. package/dist/repertoire/tools-base.js +622 -0
  98. package/dist/repertoire/tools-github.js +53 -0
  99. package/dist/repertoire/tools-teams.js +308 -0
  100. package/dist/repertoire/tools.js +199 -0
  101. package/dist/senses/cli-entry.js +15 -0
  102. package/dist/senses/cli.js +523 -0
  103. package/dist/senses/commands.js +98 -0
  104. package/dist/senses/inner-dialog-worker.js +61 -0
  105. package/dist/senses/inner-dialog.js +216 -0
  106. package/dist/senses/teams-entry.js +15 -0
  107. package/dist/senses/teams.js +695 -0
  108. package/dist/senses/trust-gate.js +150 -0
  109. package/package.json +34 -11
  110. package/subagents/README.md +71 -0
  111. package/subagents/work-doer.md +233 -0
  112. package/subagents/work-merger.md +593 -0
  113. package/subagents/work-planner.md +373 -0
  114. package/bin/ouro.js +0 -6
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+ // ADO context helper -- shared by all semantic ADO tools.
3
+ // Extracts org/project from model-provided args or runs discovery cascade.
4
+ // Re-discovery on 403 naturally handled: scope discovery APIs reflect current access.
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.resolveAdoContext = resolveAdoContext;
7
+ const ado_client_1 = require("./ado-client");
8
+ const runtime_1 = require("../nerves/runtime");
9
+ /**
10
+ * Resolve ADO organization and project for a semantic tool.
11
+ * If org/project are provided by the model, use them directly.
12
+ * Otherwise, run discovery cascade: discover orgs, auto-select if single,
13
+ * then discover projects, auto-select if single.
14
+ *
15
+ * @param token - ADO OAuth token
16
+ * @param context - ResolvedContext from the context kernel
17
+ * @param args - optional org/project from the model
18
+ */
19
+ async function resolveAdoContext(token, context, args) {
20
+ (0, runtime_1.emitNervesEvent)({
21
+ component: "repertoire",
22
+ event: "repertoire.ado_context_resolve",
23
+ message: "resolving ado context",
24
+ meta: {},
25
+ });
26
+ // Reject if ADO integration is not available
27
+ if (!context.channel.availableIntegrations.includes("ado")) {
28
+ return { ok: false, error: "ADO integration is not available in this channel." };
29
+ }
30
+ try {
31
+ // Resolve organization
32
+ let org = args?.organization;
33
+ if (!org) {
34
+ const orgs = await (0, ado_client_1.discoverOrganizations)(token);
35
+ if (orgs.length === 0) {
36
+ return { ok: false, error: "No ADO organizations found for this user." };
37
+ }
38
+ if (orgs.length === 1) {
39
+ org = orgs[0];
40
+ }
41
+ else {
42
+ return {
43
+ ok: false,
44
+ error: `Multiple ADO organizations found. Please specify which one:\n${orgs.map(o => `- ${o}`).join("\n")}`,
45
+ };
46
+ }
47
+ }
48
+ // Resolve project
49
+ let project = args?.project;
50
+ if (!project) {
51
+ const projects = await (0, ado_client_1.discoverProjects)(token, org);
52
+ if (projects.length === 0) {
53
+ return { ok: false, error: `No projects found in organization "${org}".` };
54
+ }
55
+ if (projects.length === 1) {
56
+ project = projects[0];
57
+ }
58
+ else {
59
+ return {
60
+ ok: false,
61
+ error: `Multiple projects found in "${org}". Please specify which one:\n${projects.map(p => `- ${p}`).join("\n")}`,
62
+ };
63
+ }
64
+ }
65
+ return { ok: true, organization: org, project };
66
+ }
67
+ catch (err) {
68
+ return {
69
+ ok: false,
70
+ error: `error discovering ADO context: ${err instanceof Error ? err.message : String(err)}`,
71
+ };
72
+ }
73
+ }