@causyne/agent 1.20.7 → 1.20.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.
Files changed (42) hide show
  1. package/package.json +1 -1
  2. package/src/acp/agentCatalog.js +9 -3
  3. package/src/acp/agentCatalog.ts +20 -4
  4. package/src/agentLoop.js +167 -34
  5. package/src/agentLoop.ts +188 -37
  6. package/src/commands.js +25 -10
  7. package/src/compiledSkills.js +7330 -319
  8. package/src/computerUse/types.js +8 -0
  9. package/src/computerUse/types.ts +121 -0
  10. package/src/computerUse/visionGrounding.js +87 -29
  11. package/src/computerUse/visionGrounding.ts +108 -36
  12. package/src/decisionPolicy.js +7 -9
  13. package/src/decisionPolicy.ts +7 -9
  14. package/src/documentEngine/antiSlopAuditor.js +13 -43
  15. package/src/documentEngine/antiSlopAuditor.ts +15 -47
  16. package/src/documentEngine/documentForge.js +3 -3
  17. package/src/documentEngine/documentForge.ts +3 -3
  18. package/src/dynamicCatalogue.js +568 -77
  19. package/src/dynamicCatalogue.ts +608 -79
  20. package/src/launchIntent.js +3 -3
  21. package/src/launchIntent.ts +3 -3
  22. package/src/planCache.js +4 -14
  23. package/src/planCache.ts +4 -14
  24. package/src/providers/acp.js +39 -4
  25. package/src/providers/acp.ts +42 -4
  26. package/src/providers/antigravity.d.ts +7 -1
  27. package/src/providers/antigravity.js +222 -34
  28. package/src/providers/antigravity.ts +220 -33
  29. package/src/providers/base.d.ts +2 -0
  30. package/src/providers/pi.js +3 -1
  31. package/src/providers/pi.ts +4 -2
  32. package/src/sandbox.js +7 -10
  33. package/src/smartToolsUse.js +203 -0
  34. package/src/smartToolsUse.ts +263 -0
  35. package/src/taskShape.js +7 -7
  36. package/src/taskShape.ts +7 -7
  37. package/src/toolPacks.js +5 -5
  38. package/src/tools/blenderAutomator.js +198 -11
  39. package/src/tools/documentForge.js +1 -1
  40. package/src/tools/documentForge.ts +1 -1
  41. package/src/tui/modelPicker.js +288 -69
  42. package/src/tui/modelPicker.ts +333 -72
@@ -6,18 +6,6 @@
6
6
  * Enforces authentic human cadence, strict hyphenation rules, and zero ungrounded placeholders.
7
7
  */
8
8
  const BANNED_LONG_DASHES = /[—–]/g;
9
- const AI_SLOP_CLICHES_ID = [
10
- /\bsangatlah\b/i,
11
- /\btak terbantahkan\b/i,
12
- /\brevolusioner\b/i,
13
- /\bgame[- ]?changer\b/i,
14
- /\bdi era yang serba\b/i,
15
- /\bmari kita\b/i,
16
- /\btidak dapat dipungkiri\b/i,
17
- /\bperlu diingat bahwa\b/i,
18
- /\bdalam lanskap modern\b/i,
19
- /\bmerupakan sebuah bukti nyata\b/i
20
- ];
21
9
  const AI_SLOP_CLICHES_EN = [
22
10
  /\bdelve(?:s|d|ing)?\b/i,
23
11
  /\bcrucial(?:ly)?\b/i,
@@ -36,8 +24,8 @@ const AI_SLOP_CLICHES_EN = [
36
24
  /\bholistic approach\b/i
37
25
  ];
38
26
  const PLACEHOLDER_BRACKETS = [
39
- /\[(?:insert|masukkan|isi|tbd|todo|placeholder|nama|tanggal|lokasi)[^\]]*\]/i,
40
- /<(?:insert|masukkan|isi|tbd|todo|placeholder)[^>]*>/i
27
+ /\[(?:insert|placeholder|tbd|todo|name|date|location)[^\]]*\]/i,
28
+ /<(?:insert|placeholder|tbd|todo)[^>]*>/i
41
29
  ];
42
30
  /**
43
31
  * Scan raw text or HTML content for AI slop, long em-dashes, and placeholder tokens.
@@ -45,7 +33,6 @@ const PLACEHOLDER_BRACKETS = [
45
33
  export function auditTextContent(content, options = {}) {
46
34
  const findings = [];
47
35
  const lines = (content || '').split(/\r?\n/);
48
- const lang = options.language || 'both';
49
36
  const strictDashes = options.strictDashes !== false;
50
37
  lines.forEach((line, idx) => {
51
38
  const lineNum = idx + 1;
@@ -75,34 +62,17 @@ export function auditTextContent(content, options = {}) {
75
62
  });
76
63
  }
77
64
  }
78
- // 3. AI Slop Cliches (ID)
79
- if (lang === 'id' || lang === 'both') {
80
- for (const pat of AI_SLOP_CLICHES_ID) {
81
- const m = line.match(pat);
82
- if (m) {
83
- findings.push({
84
- rule: 'anti_ai_slop_phrase_id',
85
- severity: 'warning',
86
- match: m[0],
87
- line: lineNum,
88
- message: `Found formulaic AI phrase "${m[0]}". Rewrite in authentic, direct human voice.`
89
- });
90
- }
91
- }
92
- }
93
- // 4. AI Slop Cliches (EN)
94
- if (lang === 'en' || lang === 'both') {
95
- for (const pat of AI_SLOP_CLICHES_EN) {
96
- const m = line.match(pat);
97
- if (m) {
98
- findings.push({
99
- rule: 'anti_ai_slop_phrase_en',
100
- severity: 'warning',
101
- match: m[0],
102
- line: lineNum,
103
- message: `Found generic AI trope "${m[0]}". Replace with concrete, factual language.`
104
- });
105
- }
65
+ // 3. AI Slop Cliches (EN)
66
+ for (const pat of AI_SLOP_CLICHES_EN) {
67
+ const m = line.match(pat);
68
+ if (m) {
69
+ findings.push({
70
+ rule: 'anti_ai_slop_phrase_en',
71
+ severity: 'warning',
72
+ match: m[0],
73
+ line: lineNum,
74
+ message: `Found generic AI trope "${m[0]}". Replace with concrete, factual language.`
75
+ });
106
76
  }
107
77
  }
108
78
  });
@@ -31,25 +31,12 @@ export interface ArithmeticCategory {
31
31
 
32
32
  export interface ArithmeticBudgetSpec {
33
33
  categories: ArithmeticCategory[];
34
- grossUpTaxRate?: number; // e.g. 0.025 for 2.5% PPh 21
34
+ grossUpTaxRate?: number; // e.g. 0.025 for 2.5% withholding tax
35
35
  targetGross?: number;
36
36
  }
37
37
 
38
38
  const BANNED_LONG_DASHES = /[—–]/g;
39
39
 
40
- const AI_SLOP_CLICHES_ID = [
41
- /\bsangatlah\b/i,
42
- /\btak terbantahkan\b/i,
43
- /\brevolusioner\b/i,
44
- /\bgame[- ]?changer\b/i,
45
- /\bdi era yang serba\b/i,
46
- /\bmari kita\b/i,
47
- /\btidak dapat dipungkiri\b/i,
48
- /\bperlu diingat bahwa\b/i,
49
- /\bdalam lanskap modern\b/i,
50
- /\bmerupakan sebuah bukti nyata\b/i
51
- ];
52
-
53
40
  const AI_SLOP_CLICHES_EN = [
54
41
  /\bdelve(?:s|d|ing)?\b/i,
55
42
  /\bcrucial(?:ly)?\b/i,
@@ -69,20 +56,19 @@ const AI_SLOP_CLICHES_EN = [
69
56
  ];
70
57
 
71
58
  const PLACEHOLDER_BRACKETS = [
72
- /\[(?:insert|masukkan|isi|tbd|todo|placeholder|nama|tanggal|lokasi)[^\]]*\]/i,
73
- /<(?:insert|masukkan|isi|tbd|todo|placeholder)[^>]*>/i
59
+ /\[(?:insert|placeholder|tbd|todo|name|date|location)[^\]]*\]/i,
60
+ /<(?:insert|placeholder|tbd|todo)[^>]*>/i
74
61
  ];
75
62
 
76
63
  /**
77
64
  * Scan raw text or HTML content for AI slop, long em-dashes, and placeholder tokens.
78
65
  */
79
- export function auditTextContent(content: string, options: { language?: 'id' | 'en' | 'both'; strictDashes?: boolean } = {}): {
66
+ export function auditTextContent(content: string, options: { strictDashes?: boolean } = {}): {
80
67
  clean: boolean;
81
68
  findings: SlopAuditFinding[];
82
69
  } {
83
70
  const findings: SlopAuditFinding[] = [];
84
71
  const lines = (content || '').split(/\r?\n/);
85
- const lang = options.language || 'both';
86
72
  const strictDashes = options.strictDashes !== false;
87
73
 
88
74
  lines.forEach((line, idx) => {
@@ -116,35 +102,17 @@ export function auditTextContent(content: string, options: { language?: 'id' | '
116
102
  }
117
103
  }
118
104
 
119
- // 3. AI Slop Cliches (ID)
120
- if (lang === 'id' || lang === 'both') {
121
- for (const pat of AI_SLOP_CLICHES_ID) {
122
- const m = line.match(pat);
123
- if (m) {
124
- findings.push({
125
- rule: 'anti_ai_slop_phrase_id',
126
- severity: 'warning',
127
- match: m[0],
128
- line: lineNum,
129
- message: `Found formulaic AI phrase "${m[0]}". Rewrite in authentic, direct human voice.`
130
- });
131
- }
132
- }
133
- }
134
-
135
- // 4. AI Slop Cliches (EN)
136
- if (lang === 'en' || lang === 'both') {
137
- for (const pat of AI_SLOP_CLICHES_EN) {
138
- const m = line.match(pat);
139
- if (m) {
140
- findings.push({
141
- rule: 'anti_ai_slop_phrase_en',
142
- severity: 'warning',
143
- match: m[0],
144
- line: lineNum,
145
- message: `Found generic AI trope "${m[0]}". Replace with concrete, factual language.`
146
- });
147
- }
105
+ // 3. AI Slop Cliches (EN)
106
+ for (const pat of AI_SLOP_CLICHES_EN) {
107
+ const m = line.match(pat);
108
+ if (m) {
109
+ findings.push({
110
+ rule: 'anti_ai_slop_phrase_en',
111
+ severity: 'warning',
112
+ match: m[0],
113
+ line: lineNum,
114
+ message: `Found generic AI trope "${m[0]}". Replace with concrete, factual language.`
115
+ });
148
116
  }
149
117
  }
150
118
  });
@@ -53,7 +53,7 @@ export function compileDocumentHtml(spec) {
53
53
  size: A4 portrait;
54
54
  margin: 20mm 18mm 18mm 18mm;
55
55
  @bottom-right {
56
- content: "Halaman " counter(page);
56
+ content: "Page " counter(page);
57
57
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
58
58
  font-size: 8.5pt;
59
59
  color: #64748b;
@@ -213,7 +213,7 @@ tr:nth-child(even) td {
213
213
  <div class="cover-content">
214
214
  <div class="cover-title">${escapeHtml(spec.title)}</div>
215
215
  ${spec.subtitle ? `<div class="cover-subtitle">${escapeHtml(spec.subtitle)}</div>` : ''}
216
- ${spec.authorOrProposer ? `<div class="cover-meta">Disusun oleh: <strong>${escapeHtml(spec.authorOrProposer)}</strong></div>` : ''}
216
+ ${spec.authorOrProposer ? `<div class="cover-meta">Prepared by: <strong>${escapeHtml(spec.authorOrProposer)}</strong></div>` : ''}
217
217
  </div>
218
218
  <div class="cover-band-bottom"></div>
219
219
  </div>`;
@@ -251,7 +251,7 @@ tr:nth-child(even) td {
251
251
  }
252
252
  bodyHtml += '\n</div>';
253
253
  const html = `<!DOCTYPE html>
254
- <html lang="id">
254
+ <html lang="en">
255
255
  <head>
256
256
  <meta charset="UTF-8">
257
257
  <title>${escapeHtml(spec.title)}</title>
@@ -104,7 +104,7 @@ export function compileDocumentHtml(spec: FormalDocumentSpec): { html: string; c
104
104
  size: A4 portrait;
105
105
  margin: 20mm 18mm 18mm 18mm;
106
106
  @bottom-right {
107
- content: "Halaman " counter(page);
107
+ content: "Page " counter(page);
108
108
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
109
109
  font-size: 8.5pt;
110
110
  color: #64748b;
@@ -266,7 +266,7 @@ tr:nth-child(even) td {
266
266
  <div class="cover-content">
267
267
  <div class="cover-title">${escapeHtml(spec.title)}</div>
268
268
  ${spec.subtitle ? `<div class="cover-subtitle">${escapeHtml(spec.subtitle)}</div>` : ''}
269
- ${spec.authorOrProposer ? `<div class="cover-meta">Disusun oleh: <strong>${escapeHtml(spec.authorOrProposer)}</strong></div>` : ''}
269
+ ${spec.authorOrProposer ? `<div class="cover-meta">Prepared by: <strong>${escapeHtml(spec.authorOrProposer)}</strong></div>` : ''}
270
270
  </div>
271
271
  <div class="cover-band-bottom"></div>
272
272
  </div>`;
@@ -306,7 +306,7 @@ tr:nth-child(even) td {
306
306
  bodyHtml += '\n</div>';
307
307
 
308
308
  const html = `<!DOCTYPE html>
309
- <html lang="id">
309
+ <html lang="en">
310
310
  <head>
311
311
  <meta charset="UTF-8">
312
312
  <title>${escapeHtml(spec.title)}</title>