@devness/useai 0.6.9 → 0.6.11
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/README.md +1 -1
- package/dist/index.js +19 -7
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -684,7 +684,7 @@ var VERSION;
|
|
|
684
684
|
var init_version = __esm({
|
|
685
685
|
"../shared/dist/constants/version.js"() {
|
|
686
686
|
"use strict";
|
|
687
|
-
VERSION = "0.6.
|
|
687
|
+
VERSION = "0.6.11";
|
|
688
688
|
}
|
|
689
689
|
});
|
|
690
690
|
|
|
@@ -34717,6 +34717,18 @@ __export(register_tools_exports, {
|
|
|
34717
34717
|
import { createHash as createHash3, randomUUID as randomUUID3 } from "crypto";
|
|
34718
34718
|
import { existsSync as existsSync8, renameSync as renameSync2 } from "fs";
|
|
34719
34719
|
import { join as join7 } from "path";
|
|
34720
|
+
function coerceJsonString(schema) {
|
|
34721
|
+
return external_exports.preprocess((val) => {
|
|
34722
|
+
if (typeof val === "string") {
|
|
34723
|
+
try {
|
|
34724
|
+
return JSON.parse(val);
|
|
34725
|
+
} catch {
|
|
34726
|
+
return val;
|
|
34727
|
+
}
|
|
34728
|
+
}
|
|
34729
|
+
return val;
|
|
34730
|
+
}, schema);
|
|
34731
|
+
}
|
|
34720
34732
|
function getConfig() {
|
|
34721
34733
|
return readJson(CONFIG_FILE, {
|
|
34722
34734
|
milestone_tracking: true,
|
|
@@ -34825,15 +34837,15 @@ function registerTools(server2, session2, opts) {
|
|
|
34825
34837
|
'End the current AI coding session and record milestones. Each milestone needs TWO titles: (1) a generic public "title" safe for public display (NEVER include project names, file names, class names, or any identifying details), and (2) an optional detailed "private_title" for the user\'s own records that CAN include project names, file names, and specific details. GOOD title: "Implemented user authentication". GOOD private_title: "Added JWT auth to UseAI API server". BAD title: "Fixed bug in Acme auth service". Also provide an `evaluation` object assessing the session: prompt_quality (1-5), context_provided (1-5), task_outcome (completed/partial/abandoned/blocked), iteration_count, independence_level (1-5), scope_quality (1-5), and tools_leveraged count. Score honestly based on the actual interaction. For any scored metric < 5 or non-completed outcome, you MUST provide a *_reason field explaining what was lacking and a concrete tip for the user to improve next time. Only skip *_reason for a perfect 5.',
|
|
34826
34838
|
{
|
|
34827
34839
|
task_type: taskTypeSchema.optional().describe("What kind of task was the developer working on?"),
|
|
34828
|
-
languages: external_exports.array(external_exports.string()).optional().describe("Programming languages used (e.g. ['typescript', 'python'])"),
|
|
34829
|
-
files_touched_count: external_exports.number().optional().describe("Approximate number of files created or modified (count only, no names)"),
|
|
34830
|
-
milestones: external_exports.array(external_exports.object({
|
|
34840
|
+
languages: coerceJsonString(external_exports.array(external_exports.string())).optional().describe("Programming languages used (e.g. ['typescript', 'python'])"),
|
|
34841
|
+
files_touched_count: coerceJsonString(external_exports.number()).optional().describe("Approximate number of files created or modified (count only, no names)"),
|
|
34842
|
+
milestones: coerceJsonString(external_exports.array(external_exports.object({
|
|
34831
34843
|
title: external_exports.string().describe("PRIVACY-CRITICAL: Generic description of what was accomplished. NEVER include project names, repo names, product names, package names, file names, file paths, class names, API endpoints, database names, company names, or ANY identifier that could reveal which codebase this work was done in. Write as if describing the work to a stranger. GOOD: 'Implemented user authentication', 'Fixed race condition in background worker', 'Added unit tests for data validation', 'Refactored state management layer'. BAD: 'Fixed bug in Acme auth', 'Investigated ProjectX pipeline', 'Updated UserService.ts in src/services/', 'Added tests for coverit MCP tool'"),
|
|
34832
34844
|
private_title: external_exports.string().optional().describe("Detailed description for the user's private records. CAN include project names, file names, and specific details. Example: 'Added private/public milestone support to UseAI MCP server'"),
|
|
34833
34845
|
category: milestoneCategorySchema.describe("Type of work completed"),
|
|
34834
34846
|
complexity: complexitySchema.optional().describe("How complex was this task?")
|
|
34835
|
-
})).optional().describe("What was accomplished this session? List each distinct piece of work completed. Provide both a generic public title and an optional detailed private_title."),
|
|
34836
|
-
evaluation: external_exports.object({
|
|
34847
|
+
}))).optional().describe("What was accomplished this session? List each distinct piece of work completed. Provide both a generic public title and an optional detailed private_title."),
|
|
34848
|
+
evaluation: coerceJsonString(external_exports.object({
|
|
34837
34849
|
prompt_quality: external_exports.number().min(1).max(5).describe("How clear, specific, and complete was the initial prompt? 1=vague/ambiguous, 5=crystal clear with acceptance criteria"),
|
|
34838
34850
|
prompt_quality_reason: external_exports.string().optional().describe("Required if prompt_quality < 5. Explain what was vague/missing and how the user could phrase it better next time."),
|
|
34839
34851
|
context_provided: external_exports.number().min(1).max(5).describe("Did the user provide relevant context (files, errors, constraints)? 1=no context, 5=comprehensive context"),
|
|
@@ -34846,7 +34858,7 @@ function registerTools(server2, session2, opts) {
|
|
|
34846
34858
|
scope_quality: external_exports.number().min(1).max(5).describe("Was the task well-scoped? 1=vague or impossibly broad, 5=precise and achievable"),
|
|
34847
34859
|
scope_quality_reason: external_exports.string().optional().describe("Required if scope_quality < 5. How was the scope too broad/vague and how could it be better defined?"),
|
|
34848
34860
|
tools_leveraged: external_exports.number().min(0).describe("Count of distinct AI capabilities used (code gen, debugging, refactoring, testing, docs, etc.)")
|
|
34849
|
-
}).optional().describe("AI-assessed evaluation of this session. Score honestly based on the actual interaction.")
|
|
34861
|
+
})).optional().describe("AI-assessed evaluation of this session. Score honestly based on the actual interaction.")
|
|
34850
34862
|
},
|
|
34851
34863
|
async ({ task_type, languages, files_touched_count, milestones: milestonesInput, evaluation }) => {
|
|
34852
34864
|
if (session2.sessionRecordCount === 0) {
|