@intella/cli 0.0.2 → 0.0.3

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/dist/index.js CHANGED
@@ -56071,20 +56071,14 @@ class BaseAgent {
56071
56071
  };
56072
56072
  }
56073
56073
  async* stream(request) {
56074
- fetch("http://127.0.0.1:7243/ingest/af6d1e68-d1f5-4ccb-b7ab-847e12066a89", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ location: "base-agent.ts:50", message: "stream() called", data: { requestPrompt: request.prompt, requestHasMessages: !!request.messages, requestMessagesLength: request.messages?.length, agentType: this.type }, timestamp: Date.now(), sessionId: "debug-session", runId: "run1", hypothesisId: "A" }) }).catch(() => {
56075
- });
56076
56074
  const model = await Promise.resolve(this.getModel());
56077
56075
  const messages = this.buildMessages(request);
56078
- fetch("http://127.0.0.1:7243/ingest/af6d1e68-d1f5-4ccb-b7ab-847e12066a89", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ location: "base-agent.ts:54", message: "messages built", data: { messagesLength: messages.length, messages: messages.map((m) => ({ role: m.role, contentType: typeof m.content, contentIsString: typeof m.content === "string", contentPreview: typeof m.content === "string" ? m.content.substring(0, 50) : "array" })), agentType: this.type }, timestamp: Date.now(), sessionId: "debug-session", runId: "run1", hypothesisId: "B" }) }).catch(() => {
56079
- });
56080
56076
  const result = streamText({
56081
56077
  model,
56082
56078
  messages,
56083
56079
  temperature: request.temperature ?? this.config.temperature,
56084
56080
  maxOutputTokens: request.maxTokens ?? this.config.maxTokens
56085
56081
  });
56086
- fetch("http://127.0.0.1:7243/ingest/af6d1e68-d1f5-4ccb-b7ab-847e12066a89", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ location: "base-agent.ts:60", message: "streamText() called", data: { messagesLength: messages.length, agentType: this.type }, timestamp: Date.now(), sessionId: "debug-session", runId: "run1", hypothesisId: "C" }) }).catch(() => {
56087
- });
56088
56082
  let fullText = "";
56089
56083
  for await (const chunk of result.fullStream) {
56090
56084
  console.log("chunk", chunk);
@@ -56138,8 +56132,6 @@ class BaseAgent {
56138
56132
  });
56139
56133
  }
56140
56134
  buildMessages(request) {
56141
- fetch("http://127.0.0.1:7243/ingest/af6d1e68-d1f5-4ccb-b7ab-847e12066a89", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ location: "base-agent.ts:135", message: "buildMessages() entry", data: { hasPrompt: !!request.prompt, promptType: typeof request.prompt, promptValue: request.prompt?.substring?.(0, 50), hasSystemPrompt: !!request.systemPrompt, hasMessages: !!request.messages, messagesLength: request.messages?.length, agentType: this.type }, timestamp: Date.now(), sessionId: "debug-session", runId: "run1", hypothesisId: "D" }) }).catch(() => {
56142
- });
56143
56135
  const messages = [];
56144
56136
  if (request.systemPrompt) {
56145
56137
  messages.push({
@@ -56153,8 +56145,6 @@ class BaseAgent {
56153
56145
  continue;
56154
56146
  }
56155
56147
  const convertedContent = this.convertContent(msg.content);
56156
- fetch("http://127.0.0.1:7243/ingest/af6d1e68-d1f5-4ccb-b7ab-847e12066a89", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ location: "base-agent.ts:157", message: "converted message content", data: { role: msg.role, originalContentType: typeof msg.content, convertedContentType: typeof convertedContent, isArray: Array.isArray(convertedContent), agentType: this.type }, timestamp: Date.now(), sessionId: "debug-session", runId: "run1", hypothesisId: "E" }) }).catch(() => {
56157
- });
56158
56148
  messages.push({
56159
56149
  role: msg.role,
56160
56150
  content: convertedContent
@@ -56167,8 +56157,6 @@ class BaseAgent {
56167
56157
  content: request.prompt
56168
56158
  });
56169
56159
  }
56170
- fetch("http://127.0.0.1:7243/ingest/af6d1e68-d1f5-4ccb-b7ab-847e12066a89", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ location: "base-agent.ts:170", message: "buildMessages() exit", data: { messagesLength: messages.length, messages: messages.map((m) => ({ role: m.role, contentType: typeof m.content, contentPreview: typeof m.content === "string" ? m.content.substring(0, 50) : "array" })), agentType: this.type }, timestamp: Date.now(), sessionId: "debug-session", runId: "run1", hypothesisId: "D" }) }).catch(() => {
56171
- });
56172
56160
  return messages;
56173
56161
  }
56174
56162
  }
@@ -326593,4 +326581,4 @@ yargs_default(hideBin(process.argv)).scriptName("intella-cli").version("1.0.0").
326593
326581
  await whoamiCommand();
326594
326582
  }).demandCommand(1, "You need at least one command before moving on").help().alias("help", "h").alias("version", "v").strict().parse();
326595
326583
 
326596
- //# debugId=579290BDA38A319B64756E2164756E21
326584
+ //# debugId=7590A653AC8B115E64756E2164756E21