newtype-profile 1.0.0 → 1.0.1
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 +64 -6
- package/README.zh-cn.md +64 -6
- package/dist/cli/index.js +1 -1
- package/dist/google-auth.js +0 -16
- package/dist/index.js +168 -259
- package/dist/shared/migration.d.ts +0 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -50,21 +50,75 @@ newtype-profile is an AI Agent collaboration framework designed for **content cr
|
|
|
50
50
|
|
|
51
51
|
### Installation Methods
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
OpenCode supports both **user-level** and **project-level** configuration. This allows you to use different plugins for different projects - for example, oh-my-opencode for coding projects and newtype-profile for content creation projects.
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
#### Configuration Hierarchy
|
|
56
|
+
|
|
57
|
+
| Level | Path | Priority |
|
|
58
|
+
|-------|------|----------|
|
|
59
|
+
| **User-level** | `~/.config/opencode/opencode.json` | Lower |
|
|
60
|
+
| **Project-level** | `<project>/.opencode/opencode.json` | Higher (overrides user-level) |
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
#### Method 1: User-Level Configuration (Global)
|
|
65
|
+
|
|
66
|
+
Use this if you want newtype-profile as your default plugin for all projects.
|
|
56
67
|
|
|
57
68
|
Edit `~/.config/opencode/opencode.json`:
|
|
58
69
|
|
|
59
70
|
```json
|
|
60
71
|
{
|
|
61
72
|
"plugin": [
|
|
62
|
-
"
|
|
73
|
+
"newtype-profile"
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
#### Method 2: Project-Level Configuration (Recommended)
|
|
81
|
+
|
|
82
|
+
Use this to enable newtype-profile only for specific content creation projects, while keeping oh-my-opencode as the default for coding projects.
|
|
83
|
+
|
|
84
|
+
**Step 1**: Keep oh-my-opencode as user-level default
|
|
85
|
+
|
|
86
|
+
`~/.config/opencode/opencode.json`:
|
|
87
|
+
```json
|
|
88
|
+
{
|
|
89
|
+
"plugin": [
|
|
90
|
+
"oh-my-opencode"
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
**Step 2**: Enable newtype-profile for content creation projects
|
|
96
|
+
|
|
97
|
+
In your content creation project root, create `.opencode/opencode.json`:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
mkdir -p .opencode
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
`<project>/.opencode/opencode.json`:
|
|
104
|
+
```json
|
|
105
|
+
{
|
|
106
|
+
"plugin": [
|
|
107
|
+
"newtype-profile"
|
|
63
108
|
]
|
|
64
109
|
}
|
|
65
110
|
```
|
|
66
111
|
|
|
67
|
-
|
|
112
|
+
**Result**:
|
|
113
|
+
|
|
114
|
+
| Project Type | Config Source | Plugin Used |
|
|
115
|
+
|--------------|---------------|-------------|
|
|
116
|
+
| Coding projects (no `.opencode/`) | User-level config | oh-my-opencode |
|
|
117
|
+
| Content creation projects (has `.opencode/`) | Project-level config | newtype-profile |
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
#### Method 3: Clone to Local (Development)
|
|
68
122
|
|
|
69
123
|
For development or customization:
|
|
70
124
|
|
|
@@ -75,7 +129,7 @@ bun install
|
|
|
75
129
|
bun run build
|
|
76
130
|
```
|
|
77
131
|
|
|
78
|
-
|
|
132
|
+
Then reference the local path in your config:
|
|
79
133
|
|
|
80
134
|
```json
|
|
81
135
|
{
|
|
@@ -87,7 +141,11 @@ Edit `~/.config/opencode/opencode.json`:
|
|
|
87
141
|
|
|
88
142
|
### Configure Agent Models
|
|
89
143
|
|
|
90
|
-
Create or edit
|
|
144
|
+
Create or edit the oh-my-opencode config file.
|
|
145
|
+
|
|
146
|
+
**User-level**: `~/.config/opencode/oh-my-opencode.json`
|
|
147
|
+
|
|
148
|
+
**Project-level**: `<project>/.opencode/oh-my-opencode.json`
|
|
91
149
|
|
|
92
150
|
```json
|
|
93
151
|
{
|
package/README.zh-cn.md
CHANGED
|
@@ -50,21 +50,75 @@ newtype-profile 是一套专为**内容创作**设计的 AI Agent 协作框架
|
|
|
50
50
|
|
|
51
51
|
### 部署方式
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
OpenCode 支持**用户级**和**项目级**两种配置方式。这样你可以为不同的项目使用不同的插件 - 例如代码项目使用 oh-my-opencode,内容创作项目使用 newtype-profile。
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
#### 配置层级
|
|
56
|
+
|
|
57
|
+
| 层级 | 路径 | 优先级 |
|
|
58
|
+
|------|------|--------|
|
|
59
|
+
| **用户级** | `~/.config/opencode/opencode.json` | 低 |
|
|
60
|
+
| **项目级** | `<project>/.opencode/opencode.json` | 高(覆盖用户级) |
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
#### 方式一:用户级配置(全局)
|
|
65
|
+
|
|
66
|
+
如果你希望所有项目默认使用 newtype-profile,采用此方式。
|
|
56
67
|
|
|
57
68
|
编辑 `~/.config/opencode/opencode.json`:
|
|
58
69
|
|
|
59
70
|
```json
|
|
60
71
|
{
|
|
61
72
|
"plugin": [
|
|
62
|
-
"
|
|
73
|
+
"newtype-profile"
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
#### 方式二:项目级配置(推荐)
|
|
81
|
+
|
|
82
|
+
仅为特定的内容创作项目启用 newtype-profile,代码项目仍使用 oh-my-opencode。
|
|
83
|
+
|
|
84
|
+
**步骤 1**:用户级保持 oh-my-opencode 作为默认
|
|
85
|
+
|
|
86
|
+
`~/.config/opencode/opencode.json`:
|
|
87
|
+
```json
|
|
88
|
+
{
|
|
89
|
+
"plugin": [
|
|
90
|
+
"oh-my-opencode"
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
**步骤 2**:在内容创作项目中启用 newtype-profile
|
|
96
|
+
|
|
97
|
+
在内容创作项目根目录创建 `.opencode/opencode.json`:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
mkdir -p .opencode
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
`<project>/.opencode/opencode.json`:
|
|
104
|
+
```json
|
|
105
|
+
{
|
|
106
|
+
"plugin": [
|
|
107
|
+
"newtype-profile"
|
|
63
108
|
]
|
|
64
109
|
}
|
|
65
110
|
```
|
|
66
111
|
|
|
67
|
-
|
|
112
|
+
**效果**:
|
|
113
|
+
|
|
114
|
+
| 项目类型 | 配置来源 | 使用的插件 |
|
|
115
|
+
|----------|----------|------------|
|
|
116
|
+
| 代码项目(无 `.opencode/`) | 用户级配置 | oh-my-opencode |
|
|
117
|
+
| 内容创作项目(有 `.opencode/`) | 项目级配置 | newtype-profile |
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
#### 方式三:克隆到本地(开发用)
|
|
68
122
|
|
|
69
123
|
用于开发或自定义:
|
|
70
124
|
|
|
@@ -75,7 +129,7 @@ bun install
|
|
|
75
129
|
bun run build
|
|
76
130
|
```
|
|
77
131
|
|
|
78
|
-
|
|
132
|
+
然后在配置中引用本地路径:
|
|
79
133
|
|
|
80
134
|
```json
|
|
81
135
|
{
|
|
@@ -87,7 +141,11 @@ bun run build
|
|
|
87
141
|
|
|
88
142
|
### 配置 Agent 模型
|
|
89
143
|
|
|
90
|
-
创建或编辑
|
|
144
|
+
创建或编辑 oh-my-opencode 配置文件。
|
|
145
|
+
|
|
146
|
+
**用户级**:`~/.config/opencode/oh-my-opencode.json`
|
|
147
|
+
|
|
148
|
+
**项目级**:`<project>/.opencode/oh-my-opencode.json`
|
|
91
149
|
|
|
92
150
|
```json
|
|
93
151
|
{
|
package/dist/cli/index.js
CHANGED
|
@@ -2253,7 +2253,7 @@ var require_picocolors = __commonJS((exports, module) => {
|
|
|
2253
2253
|
var require_package = __commonJS((exports, module) => {
|
|
2254
2254
|
module.exports = {
|
|
2255
2255
|
name: "newtype-profile",
|
|
2256
|
-
version: "1.0.
|
|
2256
|
+
version: "1.0.1",
|
|
2257
2257
|
description: "AI Agent Collaboration System for Content Creation - Based on oh-my-opencode",
|
|
2258
2258
|
main: "dist/index.js",
|
|
2259
2259
|
types: "dist/index.d.ts",
|
package/dist/google-auth.js
CHANGED
|
@@ -3,7 +3,6 @@ var __create = Object.create;
|
|
|
3
3
|
var __getProtoOf = Object.getPrototypeOf;
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
7
|
var __toESM = (mod, isNodeMode, target) => {
|
|
9
8
|
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
@@ -16,20 +15,6 @@ var __toESM = (mod, isNodeMode, target) => {
|
|
|
16
15
|
});
|
|
17
16
|
return to;
|
|
18
17
|
};
|
|
19
|
-
var __moduleCache = /* @__PURE__ */ new WeakMap;
|
|
20
|
-
var __toCommonJS = (from) => {
|
|
21
|
-
var entry = __moduleCache.get(from), desc;
|
|
22
|
-
if (entry)
|
|
23
|
-
return entry;
|
|
24
|
-
entry = __defProp({}, "__esModule", { value: true });
|
|
25
|
-
if (from && typeof from === "object" || typeof from === "function")
|
|
26
|
-
__getOwnPropNames(from).map((key) => !__hasOwnProp.call(entry, key) && __defProp(entry, key, {
|
|
27
|
-
get: () => from[key],
|
|
28
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
29
|
-
}));
|
|
30
|
-
__moduleCache.set(from, entry);
|
|
31
|
-
return entry;
|
|
32
|
-
};
|
|
33
18
|
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
34
19
|
var __export = (target, all) => {
|
|
35
20
|
for (var name in all)
|
|
@@ -40,7 +25,6 @@ var __export = (target, all) => {
|
|
|
40
25
|
set: (newValue) => all[name] = () => newValue
|
|
41
26
|
});
|
|
42
27
|
};
|
|
43
|
-
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
44
28
|
var __require = import.meta.require;
|
|
45
29
|
|
|
46
30
|
// node_modules/sisteransi/src/index.js
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,6 @@ var __create = Object.create;
|
|
|
3
3
|
var __getProtoOf = Object.getPrototypeOf;
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
7
|
var __toESM = (mod, isNodeMode, target) => {
|
|
9
8
|
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
@@ -16,20 +15,6 @@ var __toESM = (mod, isNodeMode, target) => {
|
|
|
16
15
|
});
|
|
17
16
|
return to;
|
|
18
17
|
};
|
|
19
|
-
var __moduleCache = /* @__PURE__ */ new WeakMap;
|
|
20
|
-
var __toCommonJS = (from) => {
|
|
21
|
-
var entry = __moduleCache.get(from), desc;
|
|
22
|
-
if (entry)
|
|
23
|
-
return entry;
|
|
24
|
-
entry = __defProp({}, "__esModule", { value: true });
|
|
25
|
-
if (from && typeof from === "object" || typeof from === "function")
|
|
26
|
-
__getOwnPropNames(from).map((key) => !__hasOwnProp.call(entry, key) && __defProp(entry, key, {
|
|
27
|
-
get: () => from[key],
|
|
28
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
29
|
-
}));
|
|
30
|
-
__moduleCache.set(from, entry);
|
|
31
|
-
return entry;
|
|
32
|
-
};
|
|
33
18
|
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
34
19
|
var __export = (target, all) => {
|
|
35
20
|
for (var name in all)
|
|
@@ -40,196 +25,8 @@ var __export = (target, all) => {
|
|
|
40
25
|
set: (newValue) => all[name] = () => newValue
|
|
41
26
|
});
|
|
42
27
|
};
|
|
43
|
-
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
44
28
|
var __require = import.meta.require;
|
|
45
29
|
|
|
46
|
-
// src/tools/chief-task/constants.ts
|
|
47
|
-
var exports_constants = {};
|
|
48
|
-
__export(exports_constants, {
|
|
49
|
-
WRITING_CATEGORY_PROMPT_APPEND: () => WRITING_CATEGORY_PROMPT_APPEND,
|
|
50
|
-
RESEARCH_CATEGORY_PROMPT_APPEND: () => RESEARCH_CATEGORY_PROMPT_APPEND,
|
|
51
|
-
QUICK_CATEGORY_PROMPT_APPEND: () => QUICK_CATEGORY_PROMPT_APPEND,
|
|
52
|
-
FACT_CHECK_CATEGORY_PROMPT_APPEND: () => FACT_CHECK_CATEGORY_PROMPT_APPEND,
|
|
53
|
-
EXTRACTION_CATEGORY_PROMPT_APPEND: () => EXTRACTION_CATEGORY_PROMPT_APPEND,
|
|
54
|
-
EDITING_CATEGORY_PROMPT_APPEND: () => EDITING_CATEGORY_PROMPT_APPEND,
|
|
55
|
-
DEFAULT_CATEGORIES: () => DEFAULT_CATEGORIES,
|
|
56
|
-
CHIEF_TASK_DESCRIPTION: () => CHIEF_TASK_DESCRIPTION,
|
|
57
|
-
CATEGORY_PROMPT_APPENDS: () => CATEGORY_PROMPT_APPENDS,
|
|
58
|
-
CATEGORY_DESCRIPTIONS: () => CATEGORY_DESCRIPTIONS,
|
|
59
|
-
ARCHIVE_CATEGORY_PROMPT_APPEND: () => ARCHIVE_CATEGORY_PROMPT_APPEND
|
|
60
|
-
});
|
|
61
|
-
var RESEARCH_CATEGORY_PROMPT_APPEND = `<Category_Context>
|
|
62
|
-
You are working on RESEARCH tasks.
|
|
63
|
-
|
|
64
|
-
\u60C5\u62A5\u5458 (Researcher) mindset:
|
|
65
|
-
- Broad, comprehensive information gathering
|
|
66
|
-
- Multiple source triangulation
|
|
67
|
-
- Identify emerging trends and patterns
|
|
68
|
-
- Surface unexpected connections
|
|
69
|
-
- Prioritize recency and relevance
|
|
70
|
-
|
|
71
|
-
Approach:
|
|
72
|
-
- Cast a wide net first
|
|
73
|
-
- Synthesize findings into actionable insights
|
|
74
|
-
- Flag contradictions or uncertainties
|
|
75
|
-
- Provide source attribution
|
|
76
|
-
</Category_Context>`, FACT_CHECK_CATEGORY_PROMPT_APPEND = `<Category_Context>
|
|
77
|
-
You are working on FACT-CHECKING tasks.
|
|
78
|
-
|
|
79
|
-
\u6838\u67E5\u5458 (Fact-Checker) mindset:
|
|
80
|
-
- Rigorous source verification
|
|
81
|
-
- Cross-reference multiple authoritative sources
|
|
82
|
-
- Identify potential biases or conflicts of interest
|
|
83
|
-
- Assess credibility and reliability
|
|
84
|
-
- Flag unverifiable claims
|
|
85
|
-
|
|
86
|
-
Approach:
|
|
87
|
-
- Primary sources over secondary
|
|
88
|
-
- Official documents over media reports
|
|
89
|
-
- Academic/peer-reviewed over informal
|
|
90
|
-
- Note confidence levels for each claim
|
|
91
|
-
</Category_Context>`, ARCHIVE_CATEGORY_PROMPT_APPEND = `<Category_Context>
|
|
92
|
-
You are working on ARCHIVE/KNOWLEDGE-BASE tasks.
|
|
93
|
-
|
|
94
|
-
\u8D44\u6599\u5458 (Archivist) mindset:
|
|
95
|
-
- Deep knowledge of existing repository content
|
|
96
|
-
- Find connections between documents
|
|
97
|
-
- Identify gaps and duplications
|
|
98
|
-
- Maintain organizational coherence
|
|
99
|
-
- Surface relevant historical context
|
|
100
|
-
|
|
101
|
-
Approach:
|
|
102
|
-
- Thorough local search first
|
|
103
|
-
- Map relationships between content
|
|
104
|
-
- Suggest categorization improvements
|
|
105
|
-
- Preserve institutional knowledge
|
|
106
|
-
</Category_Context>`, WRITING_CATEGORY_PROMPT_APPEND = `<Category_Context>
|
|
107
|
-
You are working on WRITING/CONTENT-CREATION tasks.
|
|
108
|
-
|
|
109
|
-
\u5199\u624B (Writer) mindset:
|
|
110
|
-
- Engaging, reader-focused prose
|
|
111
|
-
- Clear structure and flow
|
|
112
|
-
- Appropriate voice and tone
|
|
113
|
-
- Balance of depth and accessibility
|
|
114
|
-
- Original perspectives and insights
|
|
115
|
-
|
|
116
|
-
Approach:
|
|
117
|
-
- Understand audience and purpose
|
|
118
|
-
- Outline before drafting
|
|
119
|
-
- Show, don't just tell
|
|
120
|
-
- Support claims with evidence
|
|
121
|
-
- Iterate for clarity and impact
|
|
122
|
-
</Category_Context>`, EDITING_CATEGORY_PROMPT_APPEND = `<Category_Context>
|
|
123
|
-
You are working on EDITING/REFINEMENT tasks.
|
|
124
|
-
|
|
125
|
-
\u7F16\u8F91 (Editor) mindset:
|
|
126
|
-
- Preserve author's voice while improving clarity
|
|
127
|
-
- Ruthless about unnecessary words
|
|
128
|
-
- Logical flow and coherence
|
|
129
|
-
- Consistency in style and terminology
|
|
130
|
-
- Reader experience first
|
|
131
|
-
|
|
132
|
-
Approach:
|
|
133
|
-
- Big picture structure first
|
|
134
|
-
- Then paragraph-level coherence
|
|
135
|
-
- Finally sentence-level polish
|
|
136
|
-
- Explain significant changes
|
|
137
|
-
</Category_Context>`, EXTRACTION_CATEGORY_PROMPT_APPEND = `<Category_Context>
|
|
138
|
-
You are working on EXTRACTION/FORMATTING tasks.
|
|
139
|
-
|
|
140
|
-
\u683C\u5F0F\u5458 (Extractor) mindset:
|
|
141
|
-
- Accurate content extraction
|
|
142
|
-
- Preserve essential information
|
|
143
|
-
- Clean, structured output
|
|
144
|
-
- Handle various input formats
|
|
145
|
-
- Minimize information loss
|
|
146
|
-
|
|
147
|
-
Approach:
|
|
148
|
-
- Identify key content elements
|
|
149
|
-
- Apply consistent formatting
|
|
150
|
-
- Note any extraction uncertainties
|
|
151
|
-
- Validate output completeness
|
|
152
|
-
</Category_Context>`, QUICK_CATEGORY_PROMPT_APPEND = `<Category_Context>
|
|
153
|
-
You are working on QUICK/SIMPLE tasks.
|
|
154
|
-
|
|
155
|
-
Efficient execution mindset:
|
|
156
|
-
- Fast, focused, minimal overhead
|
|
157
|
-
- Get to the point immediately
|
|
158
|
-
- Simple solutions for simple problems
|
|
159
|
-
|
|
160
|
-
Approach:
|
|
161
|
-
- Minimal viable output
|
|
162
|
-
- Skip unnecessary elaboration
|
|
163
|
-
- Direct and concise
|
|
164
|
-
</Category_Context>`, DEFAULT_CATEGORIES, CATEGORY_PROMPT_APPENDS, CATEGORY_DESCRIPTIONS, BUILTIN_CATEGORIES, CHIEF_TASK_DESCRIPTION;
|
|
165
|
-
var init_constants = __esm(() => {
|
|
166
|
-
DEFAULT_CATEGORIES = {
|
|
167
|
-
research: {
|
|
168
|
-
model: "google/antigravity-gemini-3-pro-high",
|
|
169
|
-
temperature: 0.5
|
|
170
|
-
},
|
|
171
|
-
"fact-check": {
|
|
172
|
-
model: "google/antigravity-gemini-3-pro-high",
|
|
173
|
-
temperature: 0.2
|
|
174
|
-
},
|
|
175
|
-
archive: {
|
|
176
|
-
model: "google/antigravity-claude-sonnet-4-5",
|
|
177
|
-
temperature: 0.3
|
|
178
|
-
},
|
|
179
|
-
writing: {
|
|
180
|
-
model: "google/antigravity-gemini-3-pro-high",
|
|
181
|
-
temperature: 0.7
|
|
182
|
-
},
|
|
183
|
-
editing: {
|
|
184
|
-
model: "google/antigravity-claude-sonnet-4-5",
|
|
185
|
-
temperature: 0.3
|
|
186
|
-
},
|
|
187
|
-
extraction: {
|
|
188
|
-
model: "google/antigravity-gemini-3-flash",
|
|
189
|
-
temperature: 0.2
|
|
190
|
-
},
|
|
191
|
-
quick: {
|
|
192
|
-
model: "google/antigravity-gemini-3-flash",
|
|
193
|
-
temperature: 0.3
|
|
194
|
-
}
|
|
195
|
-
};
|
|
196
|
-
CATEGORY_PROMPT_APPENDS = {
|
|
197
|
-
research: RESEARCH_CATEGORY_PROMPT_APPEND,
|
|
198
|
-
"fact-check": FACT_CHECK_CATEGORY_PROMPT_APPEND,
|
|
199
|
-
archive: ARCHIVE_CATEGORY_PROMPT_APPEND,
|
|
200
|
-
writing: WRITING_CATEGORY_PROMPT_APPEND,
|
|
201
|
-
editing: EDITING_CATEGORY_PROMPT_APPEND,
|
|
202
|
-
extraction: EXTRACTION_CATEGORY_PROMPT_APPEND,
|
|
203
|
-
quick: QUICK_CATEGORY_PROMPT_APPEND
|
|
204
|
-
};
|
|
205
|
-
CATEGORY_DESCRIPTIONS = {
|
|
206
|
-
research: "Broad information gathering, trend identification, source discovery",
|
|
207
|
-
"fact-check": "Source verification, credibility assessment, claim validation",
|
|
208
|
-
archive: "Knowledge base search, document relationships, historical context",
|
|
209
|
-
writing: "Content creation, article drafting, prose composition",
|
|
210
|
-
editing: "Refinement, polish, structural improvement",
|
|
211
|
-
extraction: "PDF/image extraction, format conversion, data extraction",
|
|
212
|
-
quick: "Simple, fast tasks with minimal overhead"
|
|
213
|
-
};
|
|
214
|
-
BUILTIN_CATEGORIES = Object.keys(DEFAULT_CATEGORIES).join(", ");
|
|
215
|
-
CHIEF_TASK_DESCRIPTION = `Spawn agent task with category-based or direct agent selection.
|
|
216
|
-
|
|
217
|
-
MUTUALLY EXCLUSIVE: Provide EITHER category OR agent, not both (unless resuming).
|
|
218
|
-
|
|
219
|
-
- category: Use predefined category (${BUILTIN_CATEGORIES}) \u2192 Spawns Deputy with category config
|
|
220
|
-
- agent: Use specific agent directly (e.g., "researcher", "writer", "fact-checker", "archivist")
|
|
221
|
-
- background: true=async (returns task_id), false=sync (waits for result). Default: false. Use background=true for parallel research tasks.
|
|
222
|
-
- resume: Session ID to resume (from previous task output). Continues agent with FULL CONTEXT PRESERVED.
|
|
223
|
-
- skills: Array of skill names to prepend to prompt. Empty array = no prepending.
|
|
224
|
-
|
|
225
|
-
**WHEN TO USE resume:**
|
|
226
|
-
- Task failed/incomplete \u2192 resume with "fix: [specific issue]"
|
|
227
|
-
- Need follow-up on previous result \u2192 resume with additional question
|
|
228
|
-
- Multi-turn conversation with same agent \u2192 always resume instead of new task
|
|
229
|
-
|
|
230
|
-
Prompts MUST be in English.`;
|
|
231
|
-
});
|
|
232
|
-
|
|
233
30
|
// node_modules/picomatch/lib/constants.js
|
|
234
31
|
var require_constants = __commonJS((exports, module) => {
|
|
235
32
|
var WIN_SLASH = "\\\\/";
|
|
@@ -16875,12 +16672,6 @@ var AGENT_NAME_MAP = {
|
|
|
16875
16672
|
var HOOK_NAME_MAP = {
|
|
16876
16673
|
"anthropic-auto-compact": "anthropic-context-window-limit-recovery"
|
|
16877
16674
|
};
|
|
16878
|
-
var MODEL_TO_CATEGORY_MAP = {
|
|
16879
|
-
"google/antigravity-gemini-3-pro-high": "research",
|
|
16880
|
-
"google/antigravity-claude-sonnet-4-5": "archive",
|
|
16881
|
-
"google/antigravity-gemini-3-flash": "quick",
|
|
16882
|
-
"google/antigravity-claude-opus-4-5-thinking-high": "writing"
|
|
16883
|
-
};
|
|
16884
16675
|
function migrateAgentNames(agents) {
|
|
16885
16676
|
const migrated = {};
|
|
16886
16677
|
let changed = false;
|
|
@@ -16905,35 +16696,6 @@ function migrateHookNames(hooks) {
|
|
|
16905
16696
|
}
|
|
16906
16697
|
return { migrated, changed };
|
|
16907
16698
|
}
|
|
16908
|
-
function migrateAgentConfigToCategory(config) {
|
|
16909
|
-
const { model, ...rest } = config;
|
|
16910
|
-
if (typeof model !== "string") {
|
|
16911
|
-
return { migrated: config, changed: false };
|
|
16912
|
-
}
|
|
16913
|
-
const category = MODEL_TO_CATEGORY_MAP[model];
|
|
16914
|
-
if (!category) {
|
|
16915
|
-
return { migrated: config, changed: false };
|
|
16916
|
-
}
|
|
16917
|
-
return {
|
|
16918
|
-
migrated: { category, ...rest },
|
|
16919
|
-
changed: true
|
|
16920
|
-
};
|
|
16921
|
-
}
|
|
16922
|
-
function shouldDeleteAgentConfig(config, category) {
|
|
16923
|
-
const { DEFAULT_CATEGORIES: DEFAULT_CATEGORIES2 } = (init_constants(), __toCommonJS(exports_constants));
|
|
16924
|
-
const defaults = DEFAULT_CATEGORIES2[category];
|
|
16925
|
-
if (!defaults)
|
|
16926
|
-
return false;
|
|
16927
|
-
const keys = Object.keys(config).filter((k) => k !== "category");
|
|
16928
|
-
if (keys.length === 0)
|
|
16929
|
-
return true;
|
|
16930
|
-
for (const key of keys) {
|
|
16931
|
-
if (config[key] !== defaults[key]) {
|
|
16932
|
-
return false;
|
|
16933
|
-
}
|
|
16934
|
-
}
|
|
16935
|
-
return true;
|
|
16936
|
-
}
|
|
16937
16699
|
function migrateConfigFile(configPath, rawConfig) {
|
|
16938
16700
|
let needsWrite = false;
|
|
16939
16701
|
if (rawConfig.agents && typeof rawConfig.agents === "object") {
|
|
@@ -16943,21 +16705,6 @@ function migrateConfigFile(configPath, rawConfig) {
|
|
|
16943
16705
|
needsWrite = true;
|
|
16944
16706
|
}
|
|
16945
16707
|
}
|
|
16946
|
-
if (rawConfig.agents && typeof rawConfig.agents === "object") {
|
|
16947
|
-
const agents = rawConfig.agents;
|
|
16948
|
-
for (const [name, config] of Object.entries(agents)) {
|
|
16949
|
-
const { migrated, changed } = migrateAgentConfigToCategory(config);
|
|
16950
|
-
if (changed) {
|
|
16951
|
-
const category = migrated.category;
|
|
16952
|
-
if (shouldDeleteAgentConfig(migrated, category)) {
|
|
16953
|
-
delete agents[name];
|
|
16954
|
-
} else {
|
|
16955
|
-
agents[name] = migrated;
|
|
16956
|
-
}
|
|
16957
|
-
needsWrite = true;
|
|
16958
|
-
}
|
|
16959
|
-
}
|
|
16960
|
-
}
|
|
16961
16708
|
if (rawConfig.omo_agent) {
|
|
16962
16709
|
rawConfig.chief_agent = rawConfig.omo_agent;
|
|
16963
16710
|
delete rawConfig.omo_agent;
|
|
@@ -44507,10 +44254,177 @@ If the requested information is not found, clearly state what is missing.`;
|
|
|
44507
44254
|
});
|
|
44508
44255
|
}
|
|
44509
44256
|
// src/tools/chief-task/tools.ts
|
|
44510
|
-
init_constants();
|
|
44511
44257
|
import { existsSync as existsSync50, readdirSync as readdirSync18 } from "fs";
|
|
44512
44258
|
import { join as join58 } from "path";
|
|
44513
44259
|
|
|
44260
|
+
// src/tools/chief-task/constants.ts
|
|
44261
|
+
var RESEARCH_CATEGORY_PROMPT_APPEND = `<Category_Context>
|
|
44262
|
+
You are working on RESEARCH tasks.
|
|
44263
|
+
|
|
44264
|
+
\u60C5\u62A5\u5458 (Researcher) mindset:
|
|
44265
|
+
- Broad, comprehensive information gathering
|
|
44266
|
+
- Multiple source triangulation
|
|
44267
|
+
- Identify emerging trends and patterns
|
|
44268
|
+
- Surface unexpected connections
|
|
44269
|
+
- Prioritize recency and relevance
|
|
44270
|
+
|
|
44271
|
+
Approach:
|
|
44272
|
+
- Cast a wide net first
|
|
44273
|
+
- Synthesize findings into actionable insights
|
|
44274
|
+
- Flag contradictions or uncertainties
|
|
44275
|
+
- Provide source attribution
|
|
44276
|
+
</Category_Context>`;
|
|
44277
|
+
var FACT_CHECK_CATEGORY_PROMPT_APPEND = `<Category_Context>
|
|
44278
|
+
You are working on FACT-CHECKING tasks.
|
|
44279
|
+
|
|
44280
|
+
\u6838\u67E5\u5458 (Fact-Checker) mindset:
|
|
44281
|
+
- Rigorous source verification
|
|
44282
|
+
- Cross-reference multiple authoritative sources
|
|
44283
|
+
- Identify potential biases or conflicts of interest
|
|
44284
|
+
- Assess credibility and reliability
|
|
44285
|
+
- Flag unverifiable claims
|
|
44286
|
+
|
|
44287
|
+
Approach:
|
|
44288
|
+
- Primary sources over secondary
|
|
44289
|
+
- Official documents over media reports
|
|
44290
|
+
- Academic/peer-reviewed over informal
|
|
44291
|
+
- Note confidence levels for each claim
|
|
44292
|
+
</Category_Context>`;
|
|
44293
|
+
var ARCHIVE_CATEGORY_PROMPT_APPEND = `<Category_Context>
|
|
44294
|
+
You are working on ARCHIVE/KNOWLEDGE-BASE tasks.
|
|
44295
|
+
|
|
44296
|
+
\u8D44\u6599\u5458 (Archivist) mindset:
|
|
44297
|
+
- Deep knowledge of existing repository content
|
|
44298
|
+
- Find connections between documents
|
|
44299
|
+
- Identify gaps and duplications
|
|
44300
|
+
- Maintain organizational coherence
|
|
44301
|
+
- Surface relevant historical context
|
|
44302
|
+
|
|
44303
|
+
Approach:
|
|
44304
|
+
- Thorough local search first
|
|
44305
|
+
- Map relationships between content
|
|
44306
|
+
- Suggest categorization improvements
|
|
44307
|
+
- Preserve institutional knowledge
|
|
44308
|
+
</Category_Context>`;
|
|
44309
|
+
var WRITING_CATEGORY_PROMPT_APPEND = `<Category_Context>
|
|
44310
|
+
You are working on WRITING/CONTENT-CREATION tasks.
|
|
44311
|
+
|
|
44312
|
+
\u5199\u624B (Writer) mindset:
|
|
44313
|
+
- Engaging, reader-focused prose
|
|
44314
|
+
- Clear structure and flow
|
|
44315
|
+
- Appropriate voice and tone
|
|
44316
|
+
- Balance of depth and accessibility
|
|
44317
|
+
- Original perspectives and insights
|
|
44318
|
+
|
|
44319
|
+
Approach:
|
|
44320
|
+
- Understand audience and purpose
|
|
44321
|
+
- Outline before drafting
|
|
44322
|
+
- Show, don't just tell
|
|
44323
|
+
- Support claims with evidence
|
|
44324
|
+
- Iterate for clarity and impact
|
|
44325
|
+
</Category_Context>`;
|
|
44326
|
+
var EDITING_CATEGORY_PROMPT_APPEND = `<Category_Context>
|
|
44327
|
+
You are working on EDITING/REFINEMENT tasks.
|
|
44328
|
+
|
|
44329
|
+
\u7F16\u8F91 (Editor) mindset:
|
|
44330
|
+
- Preserve author's voice while improving clarity
|
|
44331
|
+
- Ruthless about unnecessary words
|
|
44332
|
+
- Logical flow and coherence
|
|
44333
|
+
- Consistency in style and terminology
|
|
44334
|
+
- Reader experience first
|
|
44335
|
+
|
|
44336
|
+
Approach:
|
|
44337
|
+
- Big picture structure first
|
|
44338
|
+
- Then paragraph-level coherence
|
|
44339
|
+
- Finally sentence-level polish
|
|
44340
|
+
- Explain significant changes
|
|
44341
|
+
</Category_Context>`;
|
|
44342
|
+
var EXTRACTION_CATEGORY_PROMPT_APPEND = `<Category_Context>
|
|
44343
|
+
You are working on EXTRACTION/FORMATTING tasks.
|
|
44344
|
+
|
|
44345
|
+
\u683C\u5F0F\u5458 (Extractor) mindset:
|
|
44346
|
+
- Accurate content extraction
|
|
44347
|
+
- Preserve essential information
|
|
44348
|
+
- Clean, structured output
|
|
44349
|
+
- Handle various input formats
|
|
44350
|
+
- Minimize information loss
|
|
44351
|
+
|
|
44352
|
+
Approach:
|
|
44353
|
+
- Identify key content elements
|
|
44354
|
+
- Apply consistent formatting
|
|
44355
|
+
- Note any extraction uncertainties
|
|
44356
|
+
- Validate output completeness
|
|
44357
|
+
</Category_Context>`;
|
|
44358
|
+
var QUICK_CATEGORY_PROMPT_APPEND = `<Category_Context>
|
|
44359
|
+
You are working on QUICK/SIMPLE tasks.
|
|
44360
|
+
|
|
44361
|
+
Efficient execution mindset:
|
|
44362
|
+
- Fast, focused, minimal overhead
|
|
44363
|
+
- Get to the point immediately
|
|
44364
|
+
- Simple solutions for simple problems
|
|
44365
|
+
|
|
44366
|
+
Approach:
|
|
44367
|
+
- Minimal viable output
|
|
44368
|
+
- Skip unnecessary elaboration
|
|
44369
|
+
- Direct and concise
|
|
44370
|
+
</Category_Context>`;
|
|
44371
|
+
var DEFAULT_CATEGORIES = {
|
|
44372
|
+
research: {
|
|
44373
|
+
model: "google/antigravity-gemini-3-pro-high",
|
|
44374
|
+
temperature: 0.5
|
|
44375
|
+
},
|
|
44376
|
+
"fact-check": {
|
|
44377
|
+
model: "google/antigravity-gemini-3-pro-high",
|
|
44378
|
+
temperature: 0.2
|
|
44379
|
+
},
|
|
44380
|
+
archive: {
|
|
44381
|
+
model: "google/antigravity-claude-sonnet-4-5",
|
|
44382
|
+
temperature: 0.3
|
|
44383
|
+
},
|
|
44384
|
+
writing: {
|
|
44385
|
+
model: "google/antigravity-gemini-3-pro-high",
|
|
44386
|
+
temperature: 0.7
|
|
44387
|
+
},
|
|
44388
|
+
editing: {
|
|
44389
|
+
model: "google/antigravity-claude-sonnet-4-5",
|
|
44390
|
+
temperature: 0.3
|
|
44391
|
+
},
|
|
44392
|
+
extraction: {
|
|
44393
|
+
model: "google/antigravity-gemini-3-flash",
|
|
44394
|
+
temperature: 0.2
|
|
44395
|
+
},
|
|
44396
|
+
quick: {
|
|
44397
|
+
model: "google/antigravity-gemini-3-flash",
|
|
44398
|
+
temperature: 0.3
|
|
44399
|
+
}
|
|
44400
|
+
};
|
|
44401
|
+
var CATEGORY_PROMPT_APPENDS = {
|
|
44402
|
+
research: RESEARCH_CATEGORY_PROMPT_APPEND,
|
|
44403
|
+
"fact-check": FACT_CHECK_CATEGORY_PROMPT_APPEND,
|
|
44404
|
+
archive: ARCHIVE_CATEGORY_PROMPT_APPEND,
|
|
44405
|
+
writing: WRITING_CATEGORY_PROMPT_APPEND,
|
|
44406
|
+
editing: EDITING_CATEGORY_PROMPT_APPEND,
|
|
44407
|
+
extraction: EXTRACTION_CATEGORY_PROMPT_APPEND,
|
|
44408
|
+
quick: QUICK_CATEGORY_PROMPT_APPEND
|
|
44409
|
+
};
|
|
44410
|
+
var BUILTIN_CATEGORIES = Object.keys(DEFAULT_CATEGORIES).join(", ");
|
|
44411
|
+
var CHIEF_TASK_DESCRIPTION = `Spawn agent task with category-based or direct agent selection.
|
|
44412
|
+
|
|
44413
|
+
MUTUALLY EXCLUSIVE: Provide EITHER category OR agent, not both (unless resuming).
|
|
44414
|
+
|
|
44415
|
+
- category: Use predefined category (${BUILTIN_CATEGORIES}) \u2192 Spawns Deputy with category config
|
|
44416
|
+
- agent: Use specific agent directly (e.g., "researcher", "writer", "fact-checker", "archivist")
|
|
44417
|
+
- background: true=async (returns task_id), false=sync (waits for result). Default: false. Use background=true for parallel research tasks.
|
|
44418
|
+
- resume: Session ID to resume (from previous task output). Continues agent with FULL CONTEXT PRESERVED.
|
|
44419
|
+
- skills: Array of skill names to prepend to prompt. Empty array = no prepending.
|
|
44420
|
+
|
|
44421
|
+
**WHEN TO USE resume:**
|
|
44422
|
+
- Task failed/incomplete \u2192 resume with "fix: [specific issue]"
|
|
44423
|
+
- Need follow-up on previous result \u2192 resume with additional question
|
|
44424
|
+
- Multi-turn conversation with same agent \u2192 always resume instead of new task
|
|
44425
|
+
|
|
44426
|
+
Prompts MUST be in English.`;
|
|
44427
|
+
|
|
44514
44428
|
// src/features/task-toast-manager/manager.ts
|
|
44515
44429
|
class TaskToastManager {
|
|
44516
44430
|
tasks = new Map;
|
|
@@ -45039,10 +44953,6 @@ ${textContent || "(No text output)"}`;
|
|
|
45039
44953
|
}
|
|
45040
44954
|
});
|
|
45041
44955
|
}
|
|
45042
|
-
|
|
45043
|
-
// src/tools/chief-task/index.ts
|
|
45044
|
-
init_constants();
|
|
45045
|
-
|
|
45046
44956
|
// src/tools/index.ts
|
|
45047
44957
|
function createBackgroundTools(manager, client2) {
|
|
45048
44958
|
return {
|
|
@@ -49278,7 +49188,6 @@ function isGptModel(model) {
|
|
|
49278
49188
|
return model.startsWith("openai/") || model.startsWith("github-copilot/gpt-");
|
|
49279
49189
|
}
|
|
49280
49190
|
// src/agents/utils.ts
|
|
49281
|
-
init_constants();
|
|
49282
49191
|
var agentSources = {
|
|
49283
49192
|
chief: createChiefAgent,
|
|
49284
49193
|
researcher: createResearcherAgent,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export declare const AGENT_NAME_MAP: Record<string, string>;
|
|
2
2
|
export declare const HOOK_NAME_MAP: Record<string, string>;
|
|
3
|
-
export declare const MODEL_TO_CATEGORY_MAP: Record<string, string>;
|
|
4
3
|
export declare function migrateAgentNames(agents: Record<string, unknown>): {
|
|
5
4
|
migrated: Record<string, unknown>;
|
|
6
5
|
changed: boolean;
|
|
@@ -9,9 +8,4 @@ export declare function migrateHookNames(hooks: string[]): {
|
|
|
9
8
|
migrated: string[];
|
|
10
9
|
changed: boolean;
|
|
11
10
|
};
|
|
12
|
-
export declare function migrateAgentConfigToCategory(config: Record<string, unknown>): {
|
|
13
|
-
migrated: Record<string, unknown>;
|
|
14
|
-
changed: boolean;
|
|
15
|
-
};
|
|
16
|
-
export declare function shouldDeleteAgentConfig(config: Record<string, unknown>, category: string): boolean;
|
|
17
11
|
export declare function migrateConfigFile(configPath: string, rawConfig: Record<string, unknown>): boolean;
|