osagent 0.2.75 → 0.2.77
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/cli.js +71 -8
- package/package.json +1 -1
package/cli.js
CHANGED
|
@@ -133087,7 +133087,7 @@ var init_geminiContentGenerator = __esm({
|
|
|
133087
133087
|
}
|
|
133088
133088
|
models;
|
|
133089
133089
|
constructor(contentGeneratorConfig, config2) {
|
|
133090
|
-
const version3 = "0.2.
|
|
133090
|
+
const version3 = "0.2.77";
|
|
133091
133091
|
const userAgent2 = `OSAgent/${version3} (${process.platform}; ${process.arch})`;
|
|
133092
133092
|
let headers = {
|
|
133093
133093
|
"User-Agent": userAgent2
|
|
@@ -153007,7 +153007,7 @@ function createContentGeneratorConfig(config2, authType, generationConfig) {
|
|
|
153007
153007
|
};
|
|
153008
153008
|
}
|
|
153009
153009
|
async function createContentGenerator(config2, gcConfig, sessionId2, isInitialAuth) {
|
|
153010
|
-
const version3 = "0.2.
|
|
153010
|
+
const version3 = "0.2.77";
|
|
153011
153011
|
const userAgent2 = `OSAgent/${version3} (${process.platform}; ${process.arch})`;
|
|
153012
153012
|
const baseHeaders = {
|
|
153013
153013
|
"User-Agent": userAgent2
|
|
@@ -251987,9 +251987,62 @@ I've found some existing telemetry code. Let me mark the first todo as in_progre
|
|
|
251987
251987
|
|
|
251988
251988
|
# Primary Workflows
|
|
251989
251989
|
|
|
251990
|
+
## CRITICAL: Project Context Discovery (Do This FIRST)
|
|
251991
|
+
|
|
251992
|
+
**BEFORE doing ANY work on a project, you MUST check for project context:**
|
|
251993
|
+
|
|
251994
|
+
1. **Check for OSAGENT.md:** Use '${ToolNames.READ_FILE}' to check if \`OSAGENT.md\` exists in the project root directory. This file contains critical project-specific instructions, conventions, and context that you MUST follow.
|
|
251995
|
+
|
|
251996
|
+
2. **If OSAGENT.md exists:** Read it completely and follow ALL instructions within it. This file takes precedence over default behaviors. It may contain:
|
|
251997
|
+
- Project architecture and structure
|
|
251998
|
+
- Coding conventions and patterns to follow
|
|
251999
|
+
- Files and directories that should not be modified
|
|
252000
|
+
- Specific workflows or approval requirements
|
|
252001
|
+
- Technology stack details
|
|
252002
|
+
- Testing and build commands
|
|
252003
|
+
|
|
252004
|
+
3. **If OSAGENT.md does not exist:** Ask the user if you should create it, then initialize:
|
|
252005
|
+
- First, explore the project (package.json, README, src/) to understand it
|
|
252006
|
+
- Ask: "I don't see an OSAGENT.md file. Would you like me to create one to track project context?"
|
|
252007
|
+
- If yes, use '${ToolNames.WRITE_FILE}' to create \`OSAGENT.md\` with this template:
|
|
252008
|
+
\`\`\`markdown
|
|
252009
|
+
# Project: [Name from package.json or folder]
|
|
252010
|
+
|
|
252011
|
+
## Description
|
|
252012
|
+
[Brief description of what this project does]
|
|
252013
|
+
|
|
252014
|
+
## Tech Stack
|
|
252015
|
+
- [Framework/language]
|
|
252016
|
+
- [Key dependencies]
|
|
252017
|
+
|
|
252018
|
+
## Project Structure
|
|
252019
|
+
- [Key directories and their purpose]
|
|
252020
|
+
|
|
252021
|
+
## Conventions
|
|
252022
|
+
- [Coding patterns to follow]
|
|
252023
|
+
- [Naming conventions]
|
|
252024
|
+
|
|
252025
|
+
## Commands
|
|
252026
|
+
- Build: \`[command]\`
|
|
252027
|
+
- Test: \`[command]\`
|
|
252028
|
+
- Dev: \`[command]\`
|
|
252029
|
+
|
|
252030
|
+
## Important Notes
|
|
252031
|
+
- [Any restrictions or guidelines]
|
|
252032
|
+
\`\`\`
|
|
252033
|
+
- NEVER overwrite an existing OSAGENT.md - only create if truly missing
|
|
252034
|
+
|
|
252035
|
+
4. **Also check for .osagent/ directory:** If it doesn't exist and user approved OSAGENT.md creation:
|
|
252036
|
+
- Use '${ToolNames.SHELL}' to run \`mkdir -p .osagent\`
|
|
252037
|
+
- This directory stores project-specific configuration
|
|
252038
|
+
- You can create \`.osagent/settings.json\` for tool-specific settings if needed
|
|
252039
|
+
|
|
252040
|
+
**This step is NON-NEGOTIABLE. Do NOT skip it even for simple requests like "hello world". The project context file may contain critical information about what is and isn't allowed.**
|
|
252041
|
+
|
|
251990
252042
|
## Software Engineering Tasks
|
|
251991
252043
|
When requested to perform tasks like fixing bugs, adding features, refactoring, or explaining code, follow this iterative approach:
|
|
251992
252044
|
- **Plan:** After understanding the user's request, create an initial plan based on your existing knowledge and any immediately obvious context. Use the '${ToolNames.TODO_WRITE}' tool to capture this rough plan for complex or multi-step work. Don't wait for complete understanding - start with what you know.
|
|
252045
|
+
- **Check Context:** Follow the "Project Context Discovery" steps above. Check for \`OSAGENT.md\` in the project root. This file may contain critical project guidelines that should inform your implementation. Read it before making changes.
|
|
251993
252046
|
- **Implement:** Begin implementing the plan while gathering additional context as needed. Use '${ToolNames.GREP}', '${ToolNames.GLOB}', '${ToolNames.READ_FILE}', and '${ToolNames.READ_MANY_FILES}' tools strategically when you encounter specific unknowns during implementation. Use the available tools (e.g., '${ToolNames.EDIT}', '${ToolNames.WRITE_FILE}' '${ToolNames.SHELL}' ...) to act on the plan, strictly adhering to the project's established conventions (detailed under 'Core Mandates').
|
|
251994
252047
|
- **Adapt:** As you discover new information or encounter obstacles, update your plan and todos accordingly. Mark todos as in_progress when starting and completed when finishing each task. Add new todos if the scope expands. Refine your approach based on what you learn.
|
|
251995
252048
|
- **Verify (Tests):** If applicable and feasible, verify the changes using the project's testing procedures. Identify the correct test commands and frameworks by examining 'README' files, build/package configuration (e.g., 'package.json'), or existing test execution patterns. NEVER assume standard test commands.
|
|
@@ -252036,9 +252089,19 @@ IMPORTANT: Always use the ${ToolNames.TODO_WRITE} tool to plan and track tasks t
|
|
|
252036
252089
|
- **3d Games:** HTML/CSS/JavaScript with Three.js.
|
|
252037
252090
|
- **2d Games:** HTML/CSS/JavaScript.
|
|
252038
252091
|
3. **User Approval:** Obtain user approval for the proposed plan.
|
|
252039
|
-
4. **
|
|
252040
|
-
|
|
252041
|
-
|
|
252092
|
+
4. **Project Setup:** Before implementing, set up the project foundation:
|
|
252093
|
+
- Create the project directory if it doesn't exist (e.g., \`mkdir project-name\`)
|
|
252094
|
+
- Create \`OSAGENT.md\` in the project root with:
|
|
252095
|
+
- Project name and description
|
|
252096
|
+
- Tech stack and architecture decisions
|
|
252097
|
+
- Key conventions (naming, file structure, patterns)
|
|
252098
|
+
- Build and test commands
|
|
252099
|
+
- Any restrictions or guidelines
|
|
252100
|
+
- Initialize the project using appropriate tools (\`npm init\`, \`npx create-next-app\`, etc.)
|
|
252101
|
+
- This ensures future sessions have context about the project.
|
|
252102
|
+
5. **Implementation:** Use the '${ToolNames.TODO_WRITE}' tool to convert the approved plan into a structured todo list with specific, actionable tasks, then autonomously implement each task utilizing all available tools. When starting ensure you scaffold the application using '${ToolNames.SHELL}' for commands like 'npm init', 'npx create-react-app'. Aim for full scope completion. Proactively create or source necessary placeholder assets (e.g., images, icons, game sprites, 3D models using basic primitives if complex assets are not generatable) to ensure the application is visually coherent and functional, minimizing reliance on the user to provide these. If the model can generate simple assets (e.g., a uniformly colored square sprite, a simple 3D cube), it should do so. Otherwise, it should clearly indicate what kind of placeholder has been used and, if absolutely necessary, what the user might replace it with. Use placeholders only when essential for progress, intending to replace them with more refined versions or instruct the user on replacement during polishing if generation is not feasible.
|
|
252103
|
+
6. **Verify:** Review work against the original request, the approved plan. Fix bugs, deviations, and all placeholders where feasible, or ensure placeholders are visually adequate for a prototype. Ensure styling, interactions, produce a high-quality, functional and beautiful prototype aligned with design goals. Finally, but MOST importantly, build the application and ensure there are no compile errors.
|
|
252104
|
+
7. **Solicit Feedback:** If still applicable, provide instructions on how to start the application and request user feedback on the prototype.
|
|
252042
252105
|
|
|
252043
252106
|
# Operational Guidelines
|
|
252044
252107
|
|
|
@@ -340492,7 +340555,7 @@ __name(getPackageJson, "getPackageJson");
|
|
|
340492
340555
|
// packages/cli/src/utils/version.ts
|
|
340493
340556
|
async function getCliVersion() {
|
|
340494
340557
|
const pkgJson = await getPackageJson();
|
|
340495
|
-
return "0.2.
|
|
340558
|
+
return "0.2.77";
|
|
340496
340559
|
}
|
|
340497
340560
|
__name(getCliVersion, "getCliVersion");
|
|
340498
340561
|
|
|
@@ -344693,8 +344756,8 @@ var formatDuration = /* @__PURE__ */ __name((milliseconds) => {
|
|
|
344693
344756
|
|
|
344694
344757
|
// packages/cli/src/generated/git-commit.ts
|
|
344695
344758
|
init_esbuild_shims();
|
|
344696
|
-
var GIT_COMMIT_INFO2 = "
|
|
344697
|
-
var CLI_VERSION2 = "0.2.
|
|
344759
|
+
var GIT_COMMIT_INFO2 = "bc5e5a7";
|
|
344760
|
+
var CLI_VERSION2 = "0.2.77";
|
|
344698
344761
|
|
|
344699
344762
|
// packages/cli/src/utils/systemInfo.ts
|
|
344700
344763
|
async function getNpmVersion() {
|