@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,145 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TASK_REQUIRED_TEMPLATE_FIELDS = exports.TASK_FILENAME_PATTERN = exports.TASK_STEM_PATTERN = exports.TASK_RESERVED_DIRECTORIES = exports.TASK_TYPE_TO_COLLECTION = exports.TASK_CANONICAL_COLLECTIONS = exports.TASK_CANONICAL_TYPES = exports.TASK_STATUS_TRANSITIONS = exports.TASK_VALID_STATUSES = void 0;
4
+ exports.canonicalCollectionForTaskType = canonicalCollectionForTaskType;
5
+ exports.normalizeTaskType = normalizeTaskType;
6
+ exports.normalizeTaskStatus = normalizeTaskStatus;
7
+ exports.isCanonicalTaskFilename = isCanonicalTaskFilename;
8
+ exports.validateTransition = validateTransition;
9
+ exports.renderTaskTransitionLines = renderTaskTransitionLines;
10
+ const runtime_1 = require("../../nerves/runtime");
11
+ exports.TASK_VALID_STATUSES = [
12
+ "drafting",
13
+ "processing",
14
+ "validating",
15
+ "collaborating",
16
+ "paused",
17
+ "blocked",
18
+ "done",
19
+ ];
20
+ exports.TASK_STATUS_TRANSITIONS = {
21
+ drafting: ["processing", "collaborating"],
22
+ processing: ["validating", "paused", "blocked"],
23
+ validating: ["done", "processing", "collaborating"],
24
+ collaborating: ["processing", "validating", "paused"],
25
+ paused: ["processing", "blocked"],
26
+ blocked: ["processing", "paused"],
27
+ done: [],
28
+ };
29
+ exports.TASK_CANONICAL_TYPES = [
30
+ "one-shot",
31
+ "ongoing",
32
+ "habit",
33
+ ];
34
+ exports.TASK_CANONICAL_COLLECTIONS = [
35
+ "one-shots",
36
+ "ongoing",
37
+ "habits",
38
+ ];
39
+ exports.TASK_TYPE_TO_COLLECTION = {
40
+ "one-shot": "one-shots",
41
+ ongoing: "ongoing",
42
+ habit: "habits",
43
+ };
44
+ exports.TASK_RESERVED_DIRECTORIES = ["templates", ".trash", "archive"];
45
+ exports.TASK_STEM_PATTERN = /^\d{4}-\d{2}-\d{2}-\d{4}-[a-z0-9][a-z0-9-]*$/;
46
+ exports.TASK_FILENAME_PATTERN = /^\d{4}-\d{2}-\d{2}-\d{4}-[a-z0-9][a-z0-9-]*\.md$/;
47
+ exports.TASK_REQUIRED_TEMPLATE_FIELDS = {
48
+ "one-shot": [
49
+ "type",
50
+ "category",
51
+ "title",
52
+ "status",
53
+ "validator",
54
+ "requester",
55
+ "cadence",
56
+ "scheduledAt",
57
+ "lastRun",
58
+ "created",
59
+ "updated",
60
+ "parent_task",
61
+ "depends_on",
62
+ "child_tasks",
63
+ "artifacts",
64
+ ],
65
+ ongoing: [
66
+ "type",
67
+ "category",
68
+ "title",
69
+ "status",
70
+ "validator",
71
+ "requester",
72
+ "cadence",
73
+ "scheduledAt",
74
+ "lastRun",
75
+ "created",
76
+ "updated",
77
+ "child_tasks",
78
+ "artifacts",
79
+ ],
80
+ habit: [
81
+ "type",
82
+ "category",
83
+ "title",
84
+ "status",
85
+ "validator",
86
+ "requester",
87
+ "cadence",
88
+ "scheduledAt",
89
+ "lastRun",
90
+ "created",
91
+ "updated",
92
+ "child_tasks",
93
+ "artifacts",
94
+ ],
95
+ };
96
+ function canonicalCollectionForTaskType(type) {
97
+ return exports.TASK_TYPE_TO_COLLECTION[type];
98
+ }
99
+ function normalizeTaskType(value) {
100
+ if (typeof value !== "string")
101
+ return null;
102
+ const normalized = value.trim().toLowerCase();
103
+ return exports.TASK_CANONICAL_TYPES.includes(normalized)
104
+ ? normalized
105
+ : null;
106
+ }
107
+ function normalizeTaskStatus(value) {
108
+ if (typeof value !== "string")
109
+ return null;
110
+ const normalized = value.trim().toLowerCase();
111
+ return exports.TASK_VALID_STATUSES.includes(normalized)
112
+ ? normalized
113
+ : null;
114
+ }
115
+ function isCanonicalTaskFilename(value) {
116
+ return typeof value === "string" && exports.TASK_FILENAME_PATTERN.test(value);
117
+ }
118
+ function validateTransition(from, to) {
119
+ (0, runtime_1.emitNervesEvent)({
120
+ event: "mind.step_start",
121
+ component: "mind",
122
+ message: "validating task status transition",
123
+ meta: { from, to },
124
+ });
125
+ if (from === to) {
126
+ return { ok: true, from, to };
127
+ }
128
+ const allowed = exports.TASK_STATUS_TRANSITIONS[from];
129
+ if (!allowed.includes(to)) {
130
+ return {
131
+ ok: false,
132
+ from,
133
+ to,
134
+ reason: `invalid transition: ${from} -> ${to}`,
135
+ };
136
+ }
137
+ return { ok: true, from, to };
138
+ }
139
+ function renderTaskTransitionLines() {
140
+ return exports.TASK_VALID_STATUSES.map((from) => {
141
+ const to = exports.TASK_STATUS_TRANSITIONS[from];
142
+ const rendered = to.length > 0 ? to.map((next) => `\`${next}\``).join(", ") : "(terminal)";
143
+ return `- \`${from}\` -> ${rendered}`;
144
+ });
145
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });