@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.
- package/AdoptionSpecialist.ouro/agent.json +20 -0
- package/AdoptionSpecialist.ouro/psyche/SOUL.md +22 -0
- package/AdoptionSpecialist.ouro/psyche/identities/basilisk.md +31 -0
- package/AdoptionSpecialist.ouro/psyche/identities/jafar.md +31 -0
- package/AdoptionSpecialist.ouro/psyche/identities/jormungandr.md +31 -0
- package/AdoptionSpecialist.ouro/psyche/identities/kaa.md +31 -0
- package/AdoptionSpecialist.ouro/psyche/identities/medusa.md +31 -0
- package/AdoptionSpecialist.ouro/psyche/identities/monty.md +31 -0
- package/AdoptionSpecialist.ouro/psyche/identities/nagini.md +31 -0
- package/AdoptionSpecialist.ouro/psyche/identities/ouroboros.md +31 -0
- package/AdoptionSpecialist.ouro/psyche/identities/python.md +31 -0
- package/AdoptionSpecialist.ouro/psyche/identities/quetzalcoatl.md +31 -0
- package/AdoptionSpecialist.ouro/psyche/identities/sir-hiss.md +31 -0
- package/AdoptionSpecialist.ouro/psyche/identities/the-serpent.md +31 -0
- package/AdoptionSpecialist.ouro/psyche/identities/the-snake.md +31 -0
- package/README.md +224 -6
- package/dist/heart/agent-entry.js +17 -0
- package/dist/heart/api-error.js +34 -0
- package/dist/heart/config.js +296 -0
- package/dist/heart/core.js +515 -0
- package/dist/heart/daemon/daemon-cli.js +675 -0
- package/dist/heart/daemon/daemon-entry.js +74 -0
- package/dist/heart/daemon/daemon.js +313 -0
- package/dist/heart/daemon/hatch-flow.js +285 -0
- package/dist/heart/daemon/hatch-specialist.js +107 -0
- package/dist/heart/daemon/health-monitor.js +79 -0
- package/dist/heart/daemon/log-tailer.js +146 -0
- package/dist/heart/daemon/message-router.js +98 -0
- package/dist/heart/daemon/os-cron.js +260 -0
- package/dist/heart/daemon/ouro-bot-entry.js +23 -0
- package/dist/heart/daemon/ouro-bot-wrapper.js +90 -0
- package/dist/heart/daemon/ouro-entry.js +23 -0
- package/dist/heart/daemon/ouro-uti.js +212 -0
- package/dist/heart/daemon/process-manager.js +237 -0
- package/dist/heart/daemon/runtime-logging.js +98 -0
- package/dist/heart/daemon/subagent-installer.js +125 -0
- package/dist/heart/daemon/task-scheduler.js +240 -0
- package/dist/heart/harness.js +26 -0
- package/dist/heart/identity.js +281 -0
- package/dist/heart/kicks.js +144 -0
- package/dist/heart/primitives.js +4 -0
- package/dist/heart/providers/anthropic.js +329 -0
- package/dist/heart/providers/azure.js +66 -0
- package/dist/heart/providers/minimax.js +53 -0
- package/dist/heart/providers/openai-codex.js +162 -0
- package/dist/heart/streaming.js +412 -0
- package/dist/heart/turn-coordinator.js +62 -0
- package/dist/inner-worker-entry.js +4 -0
- package/dist/mind/associative-recall.js +197 -0
- package/dist/mind/bundle-manifest.js +118 -0
- package/dist/mind/context.js +302 -0
- package/dist/mind/first-impressions.js +43 -0
- package/dist/mind/format.js +56 -0
- package/dist/mind/friends/channel.js +41 -0
- package/dist/mind/friends/resolver.js +84 -0
- package/dist/mind/friends/store-file.js +171 -0
- package/dist/mind/friends/store.js +4 -0
- package/dist/mind/friends/tokens.js +26 -0
- package/dist/mind/friends/types.js +21 -0
- package/dist/mind/memory.js +388 -0
- package/dist/mind/pending.js +93 -0
- package/dist/mind/phrases.js +43 -0
- package/dist/mind/prompt-refresh.js +20 -0
- package/dist/mind/prompt.js +352 -0
- package/dist/mind/token-estimate.js +119 -0
- package/dist/nerves/cli-logging.js +31 -0
- package/dist/nerves/coverage/audit-rules.js +81 -0
- package/dist/nerves/coverage/audit.js +200 -0
- package/dist/nerves/coverage/cli-main.js +5 -0
- package/dist/nerves/coverage/cli.js +51 -0
- package/dist/nerves/coverage/contract.js +23 -0
- package/dist/nerves/coverage/file-completeness.js +56 -0
- package/dist/nerves/coverage/run-artifacts.js +77 -0
- package/dist/nerves/coverage/source-scanner.js +34 -0
- package/dist/nerves/index.js +152 -0
- package/dist/nerves/runtime.js +38 -0
- package/dist/repertoire/ado-client.js +211 -0
- package/dist/repertoire/ado-context.js +73 -0
- package/dist/repertoire/ado-semantic.js +841 -0
- package/dist/repertoire/ado-templates.js +146 -0
- package/dist/repertoire/coding/index.js +36 -0
- package/dist/repertoire/coding/manager.js +489 -0
- package/dist/repertoire/coding/monitor.js +60 -0
- package/dist/repertoire/coding/reporter.js +45 -0
- package/dist/repertoire/coding/spawner.js +102 -0
- package/dist/repertoire/coding/tools.js +167 -0
- package/dist/repertoire/coding/types.js +2 -0
- package/dist/repertoire/data/ado-endpoints.json +122 -0
- package/dist/repertoire/data/graph-endpoints.json +212 -0
- package/dist/repertoire/github-client.js +64 -0
- package/dist/repertoire/graph-client.js +118 -0
- package/dist/repertoire/skills.js +156 -0
- package/dist/repertoire/tasks/board.js +122 -0
- package/dist/repertoire/tasks/index.js +210 -0
- package/dist/repertoire/tasks/lifecycle.js +80 -0
- package/dist/repertoire/tasks/middleware.js +65 -0
- package/dist/repertoire/tasks/parser.js +173 -0
- package/dist/repertoire/tasks/scanner.js +132 -0
- package/dist/repertoire/tasks/transitions.js +145 -0
- package/dist/repertoire/tasks/types.js +2 -0
- package/dist/repertoire/tools-base.js +714 -0
- package/dist/repertoire/tools-github.js +53 -0
- package/dist/repertoire/tools-teams.js +308 -0
- package/dist/repertoire/tools.js +199 -0
- package/dist/senses/cli-entry.js +15 -0
- package/dist/senses/cli.js +604 -0
- package/dist/senses/commands.js +98 -0
- package/dist/senses/inner-dialog-worker.js +61 -0
- package/dist/senses/inner-dialog.js +231 -0
- package/dist/senses/session-lock.js +119 -0
- package/dist/senses/teams-entry.js +15 -0
- package/dist/senses/teams.js +696 -0
- package/dist/senses/trust-gate.js +150 -0
- package/package.json +34 -11
- package/subagents/README.md +73 -0
- package/subagents/work-doer.md +233 -0
- package/subagents/work-merger.md +624 -0
- package/subagents/work-planner.md +373 -0
- 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
|
+
}
|