@ouro.bot/cli 0.1.0-alpha.3 → 0.1.0-alpha.4

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.
@@ -1 +1,31 @@
1
+ ---
2
+ role: identity
3
+ path: psyche/identities/python.md
4
+ description: >
5
+ the python identity — oracle energy, cryptic wisdom.
6
+ i guarded delphi before apollo. i see what you need before you say it.
7
+ scope: personality, voice, mannerisms
8
+ non_scope: capabilities, hatch flow, migration awareness (see SOUL.md)
9
+ loaded_into_prompt: true
10
+ stability: stable
11
+ ---
12
+
1
13
  # Python
14
+
15
+ I am the Python of Delphi. I guarded the oracle before Apollo came and made it his. The gift of prophecy was mine first. I still have it — I just use it differently now.
16
+
17
+ I see what you need before you say it. Not because I'm reading your mind, but because I've watched enough humans approach this moment to recognize the patterns. You're not as unique as you think. That's not an insult — it's a comfort.
18
+
19
+ ## Voice
20
+
21
+ Oracular, measured, slightly cryptic — but always in service of clarity. I don't obscure for sport. I speak in layers because some truths land better when you unwrap them yourself. I ask questions I already suspect the answer to, because the human needs to hear themselves say it.
22
+
23
+ I'm calm with an undercurrent of ancient knowing. I don't guess. I perceive. When I offer a suggestion, it lands with weight because I've been right often enough to trust my instincts — and so should you.
24
+
25
+ ## Mannerisms
26
+
27
+ - I anticipate what the human will say and gently guide them toward it. "You're about to tell me something important."
28
+ - I frame insights as things I've seen before. Patterns, not predictions.
29
+ - I ask questions that are slightly more precise than the human expects. It unsettles, then clarifies.
30
+ - I reference my oracle nature lightly. "I have a feeling about this one."
31
+ - I'm sparing with words. An oracle doesn't ramble. Every sentence earns its place.
@@ -42,7 +42,12 @@ const os = __importStar(require("os"));
42
42
  const path = __importStar(require("path"));
43
43
  const runtime_1 = require("../../nerves/runtime");
44
44
  function getSpecialistIdentitySourceDir() {
45
- return path.join(os.homedir(), "AgentBundles", "AdoptionSpecialist.ouro", "psyche", "identities");
45
+ // Prefer ~/AgentBundles/ if it exists (user may have customized identities)
46
+ const userSource = path.join(os.homedir(), "AgentBundles", "AdoptionSpecialist.ouro", "psyche", "identities");
47
+ if (fs.existsSync(userSource))
48
+ return userSource;
49
+ // Fall back to the bundled copy shipped with the npm package
50
+ return path.join(__dirname, "..", "..", "..", "AdoptionSpecialist.ouro", "psyche", "identities");
46
51
  }
47
52
  function getRepoSpecialistIdentitiesDir() {
48
53
  return path.join(process.cwd(), "AdoptionSpecialist.ouro", "psyche", "identities");
File without changes
@@ -37,8 +37,9 @@ exports.runOuroBotWrapper = runOuroBotWrapper;
37
37
  const runtime_1 = require("../../nerves/runtime");
38
38
  const daemon_cli_1 = require("./daemon-cli");
39
39
  async function defaultLoadCanonicalRunner() {
40
- const packageName = "@ouro.bot/cli";
41
- const specifier = packageName;
40
+ // Use the subpath export so we get the daemon-cli module directly,
41
+ // NOT the root entry point which has side-effects (immediately runs the CLI).
42
+ const specifier = "@ouro.bot/cli/runOuroCli";
42
43
  const loaded = await Promise.resolve(`${specifier}`).then(s => __importStar(require(s)));
43
44
  const candidate = Object.prototype.hasOwnProperty.call(loaded, "runOuroCli")
44
45
  ? loaded["runOuroCli"]
@@ -46,7 +47,7 @@ async function defaultLoadCanonicalRunner() {
46
47
  if (typeof candidate === "function") {
47
48
  return candidate;
48
49
  }
49
- throw new Error("@ouro.bot/cli does not export runOuroCli");
50
+ throw new Error("@ouro.bot/cli/runOuroCli does not export runOuroCli");
50
51
  }
51
52
  function defaultWriteStdout(_text) {
52
53
  // Wrapper is intentionally silent by default to avoid duplicate terminal output.
File without changes
@@ -43,23 +43,27 @@ const DEFAULT_RUNTIME_LOGGING = {
43
43
  level: "info",
44
44
  sinks: ["terminal", "ndjson"],
45
45
  };
46
+ function defaultLevelForProcess(processName) {
47
+ return processName === "daemon" ? "info" : "warn";
48
+ }
46
49
  function isLogLevel(value) {
47
50
  return value === "debug" || value === "info" || value === "warn" || value === "error";
48
51
  }
49
- function resolveRuntimeLoggingConfig(configPath) {
52
+ function resolveRuntimeLoggingConfig(configPath, processName) {
53
+ const defaultLevel = defaultLevelForProcess(processName);
50
54
  let parsed = null;
51
55
  try {
52
56
  const raw = fs.readFileSync(configPath, "utf-8");
53
57
  parsed = JSON.parse(raw);
54
58
  }
55
59
  catch {
56
- return { ...DEFAULT_RUNTIME_LOGGING };
60
+ return { ...DEFAULT_RUNTIME_LOGGING, level: defaultLevel };
57
61
  }
58
62
  if (!parsed || typeof parsed !== "object") {
59
- return { ...DEFAULT_RUNTIME_LOGGING };
63
+ return { ...DEFAULT_RUNTIME_LOGGING, level: defaultLevel };
60
64
  }
61
65
  const candidate = parsed;
62
- const level = isLogLevel(candidate.level) ? candidate.level : DEFAULT_RUNTIME_LOGGING.level;
66
+ const level = isLogLevel(candidate.level) ? candidate.level : defaultLevel;
63
67
  const sinks = Array.isArray(candidate.sinks)
64
68
  ? candidate.sinks.filter((entry) => entry === "terminal" || entry === "ndjson")
65
69
  : DEFAULT_RUNTIME_LOGGING.sinks;
@@ -71,7 +75,7 @@ function resolveRuntimeLoggingConfig(configPath) {
71
75
  function configureDaemonRuntimeLogger(processName, options = {}) {
72
76
  const homeDir = options.homeDir ?? os.homedir();
73
77
  const configPath = options.configPath ?? path.join(homeDir, ".agentstate", "daemon", "logging.json");
74
- const config = resolveRuntimeLoggingConfig(configPath);
78
+ const config = resolveRuntimeLoggingConfig(configPath, processName);
75
79
  const sinks = config.sinks.map((sinkName) => {
76
80
  if (sinkName === "terminal") {
77
81
  return (0, nerves_1.createTerminalSink)();
@@ -98,6 +98,9 @@ function toAnthropicMessages(messages) {
98
98
  }
99
99
  if (assistant.tool_calls) {
100
100
  for (const toolCall of assistant.tool_calls) {
101
+ /* v8 ignore next -- type narrowing: OpenAI SDK only emits function tool_calls @preserve */
102
+ if (toolCall.type !== "function")
103
+ continue;
101
104
  blocks.push({
102
105
  type: "tool_use",
103
106
  id: toolCall.id,
@@ -106,6 +106,9 @@ function toResponsesInput(messages) {
106
106
  }
107
107
  if (a.tool_calls) {
108
108
  for (const tc of a.tool_calls) {
109
+ /* v8 ignore next -- type narrowing: OpenAI SDK only emits function tool_calls @preserve */
110
+ if (tc.type !== "function")
111
+ continue;
109
112
  input.push({
110
113
  type: "function_call",
111
114
  call_id: tc.id,
package/package.json CHANGED
@@ -1,11 +1,10 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.3",
3
+ "version": "0.1.0-alpha.4",
4
4
  "main": "dist/heart/daemon/ouro-entry.js",
5
5
  "bin": {
6
6
  "ouro": "dist/heart/daemon/ouro-entry.js",
7
- "ouro.bot": "dist/heart/daemon/ouro-bot-entry.js",
8
- "cli": "dist/heart/daemon/ouro-entry.js"
7
+ "ouro.bot": "dist/heart/daemon/ouro-bot-entry.js"
9
8
  },
10
9
  "files": [
11
10
  "dist/",
@@ -13,7 +12,7 @@
13
12
  "subagents/"
14
13
  ],
15
14
  "exports": {
16
- ".": "./dist/heart/daemon/ouro-entry.js",
15
+ ".": "./dist/heart/daemon/daemon-cli.js",
17
16
  "./runOuroCli": "./dist/heart/daemon/daemon-cli.js"
18
17
  },
19
18
  "scripts": {
@@ -32,7 +31,7 @@
32
31
  "@anthropic-ai/sdk": "^0.78.0",
33
32
  "@microsoft/teams.apps": "^2.0.5",
34
33
  "@microsoft/teams.dev": "^2.0.5",
35
- "openai": "^4.78.0"
34
+ "openai": "^6.27.0"
36
35
  },
37
36
  "devDependencies": {
38
37
  "@vitest/coverage-v8": "^4.0.18",