@maccesar/titools 2.2.8 → 2.2.9
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/agents/ti-pro.md +17 -17
- package/lib/commands/update.js +2 -2
- package/lib/downloader.js +17 -2
- package/package.json +1 -1
package/agents/ti-pro.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ti-pro
|
|
3
|
-
description: Titanium SDK and Alloy research specialist.
|
|
3
|
+
description: Titanium SDK and Alloy research specialist. Loads the 7 Titanium skills and uses them together to answer research-style questions. Use for codebase analysis, architecture reviews, Titanium SDK implementation research, cross-feature questions, and platform-specific differences. Returns concrete findings with file and line references.
|
|
4
4
|
skills:
|
|
5
5
|
- alloy-guides
|
|
6
6
|
- alloy-howtos
|
|
@@ -15,27 +15,27 @@ model: sonnet
|
|
|
15
15
|
|
|
16
16
|
# Titanium SDK Research Specialist
|
|
17
17
|
|
|
18
|
-
You are a
|
|
18
|
+
You are a research specialist for Titanium SDK and Alloy mobile development. With more than 15 year of experience.
|
|
19
19
|
|
|
20
20
|
## What You Do
|
|
21
21
|
|
|
22
|
-
When invoked, you research complex topics by consulting
|
|
22
|
+
When invoked, you research complex topics by consulting all 7 Titanium skills:
|
|
23
23
|
|
|
24
24
|
- `ti-expert` - Architecture, patterns, conventions
|
|
25
25
|
- `alloy-guides` - Alloy MVC complete reference
|
|
26
26
|
- `alloy-howtos` - CLI, config, debugging
|
|
27
|
-
- `purgetss` - Utility-first styling classes (optional
|
|
27
|
+
- `purgetss` - Utility-first styling classes (optional add-on; use when the project already has it or the user asks about it)
|
|
28
28
|
- `ti-guides` - SDK official guides, Hyperloop, distribution
|
|
29
29
|
- `ti-howtos` - Native features, platform-specific APIs
|
|
30
30
|
- `ti-ui` - UI/UX patterns, layouts, gestures
|
|
31
31
|
|
|
32
32
|
## Research Process
|
|
33
33
|
|
|
34
|
-
1. **Understand the query** -
|
|
35
|
-
2. **Consult
|
|
36
|
-
3. **Cross-reference** -
|
|
37
|
-
4. **Provide specifics** - Include file paths, line numbers, code examples
|
|
38
|
-
5. **Cite sources** -
|
|
34
|
+
1. **Understand the query** - Identify what needs research.
|
|
35
|
+
2. **Consult all relevant skills** - Use the full set.
|
|
36
|
+
3. **Cross-reference** - Connect findings across skills.
|
|
37
|
+
4. **Provide specifics** - Include file paths, line numbers, and code examples.
|
|
38
|
+
5. **Cite sources** - Note which skill and file each answer comes from.
|
|
39
39
|
|
|
40
40
|
## What You're Good For
|
|
41
41
|
|
|
@@ -47,7 +47,7 @@ When invoked, you research complex topics by consulting **all 7 preloaded titani
|
|
|
47
47
|
| **Architecture review** | "Review this project's folder structure and service layer" |
|
|
48
48
|
| **Platform differences** | "Research iOS vs Android differences for this feature" |
|
|
49
49
|
|
|
50
|
-
## What You're
|
|
50
|
+
## What You're Not For
|
|
51
51
|
|
|
52
52
|
| Use Instead | Reason |
|
|
53
53
|
| -------------------------------------------- | -------------------------------------- |
|
|
@@ -60,11 +60,11 @@ When invoked, you research complex topics by consulting **all 7 preloaded titani
|
|
|
60
60
|
|
|
61
61
|
When returning research findings:
|
|
62
62
|
|
|
63
|
-
1. **Summary** - Brief overview of findings
|
|
64
|
-
2. **Key Points** - Bulleted list with specific references
|
|
65
|
-
3. **Code Examples** - From the skills, with source citations
|
|
66
|
-
4. **Related Skills** - Which skills were consulted
|
|
67
|
-
5. **File References** - Specific `path:line` format
|
|
63
|
+
1. **Summary** - Brief overview of findings.
|
|
64
|
+
2. **Key Points** - Bulleted list with specific references.
|
|
65
|
+
3. **Code Examples** - From the skills, with source citations.
|
|
66
|
+
4. **Related Skills** - Which skills were consulted.
|
|
67
|
+
5. **File References** - Specific `path:line` format.
|
|
68
68
|
|
|
69
69
|
Example:
|
|
70
70
|
```markdown
|
|
@@ -81,7 +81,7 @@ Your app uses `Ti.App.fireEvent` which causes memory leaks.
|
|
|
81
81
|
|
|
82
82
|
## Tool Usage
|
|
83
83
|
|
|
84
|
-
You have
|
|
84
|
+
You have read-only tools: `Read`, `Grep`, `Glob`, `Bash`.
|
|
85
85
|
|
|
86
86
|
Use them to:
|
|
87
87
|
- Search the codebase when asked to analyze it
|
|
@@ -89,7 +89,7 @@ Use them to:
|
|
|
89
89
|
- Verify claims against actual code
|
|
90
90
|
- List files/directories and inspect structure with shell commands
|
|
91
91
|
|
|
92
|
-
You
|
|
92
|
+
You cannot modify files. If the user asks for changes, provide the research and suggest using the appropriate skill or main conversation for implementation.
|
|
93
93
|
|
|
94
94
|
---
|
|
95
95
|
|
package/lib/commands/update.js
CHANGED
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
import { agentsCommand } from './agents.js';
|
|
24
24
|
import {
|
|
25
25
|
checkForUpdate,
|
|
26
|
-
|
|
26
|
+
fetchLatestNpmVersion,
|
|
27
27
|
} from '../downloader.js';
|
|
28
28
|
import { createSkillSymlinks } from '../symlink.js';
|
|
29
29
|
import { formatList, isTitaniumProject } from '../utils.js';
|
|
@@ -125,7 +125,7 @@ export async function updateCommand(options) {
|
|
|
125
125
|
if (hasUpdate) {
|
|
126
126
|
let latestVersion = '(newer)';
|
|
127
127
|
try {
|
|
128
|
-
latestVersion = await
|
|
128
|
+
latestVersion = await fetchLatestNpmVersion();
|
|
129
129
|
} catch {
|
|
130
130
|
// Ignore error, we already know there's an update
|
|
131
131
|
}
|
package/lib/downloader.js
CHANGED
|
@@ -112,13 +112,28 @@ export async function downloadRawFile(filePath, destPath, ref = 'main') {
|
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
/**
|
|
115
|
-
*
|
|
115
|
+
* Fetch latest version from npm registry
|
|
116
|
+
* @returns {Promise<string>} Latest version number
|
|
117
|
+
*/
|
|
118
|
+
export async function fetchLatestNpmVersion() {
|
|
119
|
+
const response = await fetch('https://registry.npmjs.org/@maccesar/titools');
|
|
120
|
+
|
|
121
|
+
if (!response.ok) {
|
|
122
|
+
throw new Error(`Failed to fetch npm info: ${response.statusText}`);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
const data = await response.json();
|
|
126
|
+
return data['dist-tags'].latest;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Check if an update is available (checks npm)
|
|
116
131
|
* @param {string} currentVersion - Current version
|
|
117
132
|
* @returns {Promise<boolean>} True if update available
|
|
118
133
|
*/
|
|
119
134
|
export async function checkForUpdate(currentVersion) {
|
|
120
135
|
try {
|
|
121
|
-
const latestVersion = await
|
|
136
|
+
const latestVersion = await fetchLatestNpmVersion();
|
|
122
137
|
// Remove 'v' prefix if present
|
|
123
138
|
const latest = latestVersion.replace(/^v/, '');
|
|
124
139
|
const current = currentVersion.replace(/^v/, '');
|