farming-code 2.2.28 → 2.2.29
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 +9 -31
- package/README.zh_cn.md +8 -30
- package/THIRD_PARTY_NOTICES.md +25 -6
- package/backend/acp/packaged-claude-acp.js +13 -0
- package/backend/acp/packaged-codex-acp.js +2 -2
- package/backend/acp-runtime.js +37 -2
- package/backend/acp-transcript.js +174 -9
- package/backend/agent-manager.js +27 -2
- package/backend/config-manager.js +44 -0
- package/backend/data/LICENSE.agent-browser +201 -0
- package/backend/data/runtime-dependency-manifest.json +199 -0
- package/backend/data/runtime-dependency-sources.json +5 -0
- package/backend/executable-discovery.js +7 -0
- package/backend/farming-agent-bootstrap.zh_cn.md +4 -2
- package/backend/farming-app-cli.js +160 -64
- package/backend/farming-cli.js +5 -3
- package/backend/index-html.js +13 -0
- package/backend/main-agent-skills.js +6 -10
- package/backend/npm-update-helper.js +43 -6
- package/backend/provider-adapters.js +10 -0
- package/backend/runtime-dependency-manager.js +759 -0
- package/backend/runtime-executable-invocation.js +20 -0
- package/backend/server-process-identity.js +47 -0
- package/backend/server.js +140 -157
- package/backend/slash-command-discovery.js +138 -1
- package/backend/storage-layout.js +15 -0
- package/backend/update-service.js +27 -1
- package/config/farming.install.env.example +4 -0
- package/dist/acp/LICENSE.claude-agent-acp +191 -0
- package/dist/acp/LICENSE.claude-agent-sdk +1 -0
- package/dist/acp/claude-agent-acp-0.59.0.mjs +41606 -0
- package/dist/assets/{App-CM7Cy-l4.css → App-BKNUILuL.css} +1 -1
- package/dist/assets/App-Ex2oVVXO.js +693 -0
- package/dist/assets/{FileEditorMarkdownPreview-DYOMm-b1.js → FileEditorMarkdownPreview-Cs9cLv8a.js} +1 -1
- package/dist/assets/FileEditorPane-CNtuGjQ3.js +2 -0
- package/dist/assets/IconGlyphs-BClgag6E.js +1 -0
- package/dist/assets/ProjectFilesSection-Cf2BEcAN.js +12 -0
- package/dist/assets/ReviewPage-BRuxFaH5.js +3 -0
- package/dist/assets/code-dark-BEZTQwYZ.css +1 -0
- package/dist/assets/{index-BzQO3pUr.js → index-CQNaZc3l.js} +2 -2
- package/dist/assets/main-DK9Sy7-c.css +1 -0
- package/dist/assets/{workspace-editor-monaco-tXA-udGx.js → workspace-editor-monaco-CJNwbpCy.js} +1 -1
- package/dist/assets/workspace-editor-monaco-CO9w8YV0.js +1 -0
- package/dist/assets/workspace-view-state-BjKPYp0E.js +7 -0
- package/dist/index.html +32 -3
- package/extensions/browser/backend/agent-browser-runtime.js +1041 -0
- package/extensions/browser/backend/browser-mcp-server.js +352 -0
- package/extensions/browser/backend/browser-resource-manager.js +899 -114
- package/extensions/browser/backend/browser-resource-store.js +47 -6
- package/extensions/browser/backend/browser-router.js +7 -2
- package/extensions/browser/backend/executable-discovery.js +146 -13
- package/extensions/browser/bin/farming-browser +384 -30
- package/extensions/browser/frontend/BrowserSidebarPortals.tsx +17 -19
- package/extensions/browser/frontend/BrowserViewer.tsx +217 -46
- package/extensions/browser/frontend/browser.css +68 -17
- package/extensions/browser/frontend/types.ts +6 -0
- package/extensions/browser/frontend/useBrowserResources.ts +10 -3
- package/index.html +31 -2
- package/package.json +10 -6
- package/shared/backend-connection-status.d.ts +12 -0
- package/shared/backend-connection-status.js +35 -4
- package/backend/agent-activity.js +0 -35
- package/dist/assets/App-CPG4WcjO.js +0 -658
- package/dist/assets/FileEditorPane-DXXq82aM.js +0 -2
- package/dist/assets/IconGlyphs-DrdPjYXr.js +0 -1
- package/dist/assets/ProjectFilesSection-CP66XVPl.js +0 -12
- package/dist/assets/ReviewPage-w21MEPD6.js +0 -3
- package/dist/assets/code-dark-BDjwj7Um.css +0 -1
- package/dist/assets/main-BlVUXfxa.css +0 -1
- package/dist/assets/workspace-editor-monaco-CFEfFNcA.js +0 -1
- package/dist/assets/workspace-view-state-BS_V8JVs.js +0 -7
- package/extensions/browser/backend/cdp-browser-runtime.js +0 -648
- package/extensions/browser/backend/cdp-client.js +0 -167
- /package/dist/acp/{codex-acp-1.1.4.js → codex-acp-1.1.4.mjs} +0 -0
|
@@ -85,9 +85,13 @@ const PERSISTED_SETTING_KEYS = new Set([
|
|
|
85
85
|
'theme',
|
|
86
86
|
'appearance',
|
|
87
87
|
'language',
|
|
88
|
+
'restReminderIntervalSeconds',
|
|
88
89
|
'heartbeatInterval',
|
|
89
90
|
'dangerouslySkipAgentPermissionsByDefault',
|
|
90
91
|
'browserExtensionEnabled',
|
|
92
|
+
'browserSource',
|
|
93
|
+
'browserExecutablePath',
|
|
94
|
+
'browserExternalCdpUrl',
|
|
91
95
|
'crtSkinEffectsEnabled',
|
|
92
96
|
'crtDynamicHeatEnabled',
|
|
93
97
|
'crtTerminalFontSize',
|
|
@@ -317,9 +321,13 @@ class ConfigManager {
|
|
|
317
321
|
theme: 'terminal',
|
|
318
322
|
appearance: 'system',
|
|
319
323
|
language: 'en',
|
|
324
|
+
restReminderIntervalSeconds: null,
|
|
320
325
|
heartbeatInterval: 1000,
|
|
321
326
|
dangerouslySkipAgentPermissionsByDefault: false,
|
|
322
327
|
browserExtensionEnabled: false,
|
|
328
|
+
browserSource: process.env.FARMING_BROWSER_CDP_URL ? 'external-cdp' : 'system',
|
|
329
|
+
browserExecutablePath: process.env.FARMING_BROWSER_EXECUTABLE || '',
|
|
330
|
+
browserExternalCdpUrl: process.env.FARMING_BROWSER_CDP_URL || 'http://127.0.0.1:9222',
|
|
323
331
|
crtSkinEffectsEnabled: true,
|
|
324
332
|
crtDynamicHeatEnabled: false,
|
|
325
333
|
crtTerminalFontSize: DEFAULT_CRT_TERMINAL_FONT_SIZE,
|
|
@@ -355,9 +363,13 @@ class ConfigManager {
|
|
|
355
363
|
theme: 'terminal',
|
|
356
364
|
appearance: 'system',
|
|
357
365
|
language: 'en',
|
|
366
|
+
restReminderIntervalSeconds: null,
|
|
358
367
|
heartbeatInterval: 1000,
|
|
359
368
|
dangerouslySkipAgentPermissionsByDefault: false,
|
|
360
369
|
browserExtensionEnabled: false,
|
|
370
|
+
browserSource: process.env.FARMING_BROWSER_CDP_URL ? 'external-cdp' : 'system',
|
|
371
|
+
browserExecutablePath: process.env.FARMING_BROWSER_EXECUTABLE || '',
|
|
372
|
+
browserExternalCdpUrl: process.env.FARMING_BROWSER_CDP_URL || 'http://127.0.0.1:9222',
|
|
361
373
|
crtSkinEffectsEnabled: true,
|
|
362
374
|
crtDynamicHeatEnabled: false,
|
|
363
375
|
crtTerminalFontSize: DEFAULT_CRT_TERMINAL_FONT_SIZE,
|
|
@@ -419,7 +431,14 @@ class ConfigManager {
|
|
|
419
431
|
this.runHistoryStore.init({ legacyTaskHistory });
|
|
420
432
|
this.settings.appearance = this.normalizeAppearance(this.settings.appearance);
|
|
421
433
|
this.settings.language = this.normalizeLanguage(this.settings.language);
|
|
434
|
+
this.settings.restReminderIntervalSeconds = this.normalizeRestReminderIntervalSeconds(
|
|
435
|
+
this.settings.restReminderIntervalSeconds,
|
|
436
|
+
);
|
|
422
437
|
this.settings.browserExtensionEnabled = this.settings.browserExtensionEnabled === true;
|
|
438
|
+
this.settings.browserSource = this.normalizeBrowserSource(this.settings.browserSource);
|
|
439
|
+
this.settings.browserExecutablePath = this.normalizeBrowserSetting(this.settings.browserExecutablePath);
|
|
440
|
+
this.settings.browserExternalCdpUrl = this.normalizeBrowserSetting(this.settings.browserExternalCdpUrl)
|
|
441
|
+
|| 'http://127.0.0.1:9222';
|
|
423
442
|
this.settings.crtSkinEffectsEnabled = this.settings.crtSkinEffectsEnabled !== false;
|
|
424
443
|
this.settings.crtDynamicHeatEnabled = this.settings.crtDynamicHeatEnabled === true;
|
|
425
444
|
this.settings.crtTerminalFontSize = this.normalizeCrtTerminalFontSize(this.settings.crtTerminalFontSize);
|
|
@@ -452,6 +471,16 @@ class ConfigManager {
|
|
|
452
471
|
);
|
|
453
472
|
}
|
|
454
473
|
|
|
474
|
+
normalizeRestReminderIntervalSeconds(value) {
|
|
475
|
+
if (value === null || value === undefined || value === '') return null;
|
|
476
|
+
const seconds = Number(value);
|
|
477
|
+
if (!Number.isInteger(seconds)) return null;
|
|
478
|
+
if (seconds === 0 || seconds === 5) return seconds;
|
|
479
|
+
return seconds >= 60 && seconds <= 240 * 60 && seconds % 60 === 0
|
|
480
|
+
? seconds
|
|
481
|
+
: null;
|
|
482
|
+
}
|
|
483
|
+
|
|
455
484
|
normalizeCrtTerminalFontSize(value) {
|
|
456
485
|
const fontSize = Number(value);
|
|
457
486
|
if (!Number.isFinite(fontSize)) return DEFAULT_CRT_TERMINAL_FONT_SIZE;
|
|
@@ -579,6 +608,14 @@ class ConfigManager {
|
|
|
579
608
|
return ['en', 'zh'].includes(language) ? language : 'en';
|
|
580
609
|
}
|
|
581
610
|
|
|
611
|
+
normalizeBrowserSource(source) {
|
|
612
|
+
return source === 'external-cdp' ? source : 'system';
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
normalizeBrowserSetting(value) {
|
|
616
|
+
return String(value || '').trim().slice(0, 2000);
|
|
617
|
+
}
|
|
618
|
+
|
|
582
619
|
normalizeUpdateUrl(value) {
|
|
583
620
|
const url = String(value || '').trim();
|
|
584
621
|
if (!url) return DEFAULT_UPDATE_URL;
|
|
@@ -1070,7 +1107,14 @@ class ConfigManager {
|
|
|
1070
1107
|
}
|
|
1071
1108
|
nextSettings.appearance = this.normalizeAppearance(nextSettings.appearance);
|
|
1072
1109
|
nextSettings.language = this.normalizeLanguage(nextSettings.language);
|
|
1110
|
+
nextSettings.restReminderIntervalSeconds = this.normalizeRestReminderIntervalSeconds(
|
|
1111
|
+
nextSettings.restReminderIntervalSeconds,
|
|
1112
|
+
);
|
|
1073
1113
|
nextSettings.browserExtensionEnabled = nextSettings.browserExtensionEnabled === true;
|
|
1114
|
+
nextSettings.browserSource = this.normalizeBrowserSource(nextSettings.browserSource);
|
|
1115
|
+
nextSettings.browserExecutablePath = this.normalizeBrowserSetting(nextSettings.browserExecutablePath);
|
|
1116
|
+
nextSettings.browserExternalCdpUrl = this.normalizeBrowserSetting(nextSettings.browserExternalCdpUrl)
|
|
1117
|
+
|| 'http://127.0.0.1:9222';
|
|
1074
1118
|
nextSettings.crtSkinEffectsEnabled = nextSettings.crtSkinEffectsEnabled !== false;
|
|
1075
1119
|
nextSettings.crtDynamicHeatEnabled = nextSettings.crtDynamicHeatEnabled === true;
|
|
1076
1120
|
nextSettings.crtTerminalFontSize = this.normalizeCrtTerminalFontSize(nextSettings.crtTerminalFontSize);
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2025 Vercel Inc.
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"dependencies": {
|
|
4
|
+
"codex": {
|
|
5
|
+
"version": "0.144.6",
|
|
6
|
+
"probe": {
|
|
7
|
+
"args": [
|
|
8
|
+
"--version"
|
|
9
|
+
]
|
|
10
|
+
},
|
|
11
|
+
"artifacts": {
|
|
12
|
+
"darwin-arm64": {
|
|
13
|
+
"url": "https://registry.npmjs.org/@openai/codex/-/codex-0.144.6-darwin-arm64.tgz",
|
|
14
|
+
"integrity": "sha512-6zgvh70MzBNSeT17HEhSOrmmGGZGAKzSC7x6JAq+edkJkdPYA9P0I1tG7aJ49GlBkBxuC+MKBH1qm6+2Cghcww==",
|
|
15
|
+
"archive": "tgz",
|
|
16
|
+
"archivePrefix": "package/vendor/aarch64-apple-darwin",
|
|
17
|
+
"entry": "bin/codex"
|
|
18
|
+
},
|
|
19
|
+
"darwin-x64": {
|
|
20
|
+
"url": "https://registry.npmjs.org/@openai/codex/-/codex-0.144.6-darwin-x64.tgz",
|
|
21
|
+
"integrity": "sha512-THRyPG0zSU6M8NQAge1LHEHsJDnoH4BpKsfJHB/qe3Fm+Wf6zqAmWJFlOKzBm27m0K2Hq3za4Ac2I5p5i4yp/A==",
|
|
22
|
+
"archive": "tgz",
|
|
23
|
+
"archivePrefix": "package/vendor/x86_64-apple-darwin",
|
|
24
|
+
"entry": "bin/codex"
|
|
25
|
+
},
|
|
26
|
+
"linux-arm64": {
|
|
27
|
+
"url": "https://registry.npmjs.org/@openai/codex/-/codex-0.144.6-linux-arm64.tgz",
|
|
28
|
+
"integrity": "sha512-PGiLXMN+2IQRkf7tOLi64dMInjU1pRLbz0Rwfj/yt2Y97SZQqAjFQoi2wmswmqtqMDnfwCPTC1DRXVQkvU6T6Q==",
|
|
29
|
+
"archive": "tgz",
|
|
30
|
+
"archivePrefix": "package/vendor/aarch64-unknown-linux-musl",
|
|
31
|
+
"entry": "bin/codex"
|
|
32
|
+
},
|
|
33
|
+
"linux-arm64-musl": {
|
|
34
|
+
"url": "https://registry.npmjs.org/@openai/codex/-/codex-0.144.6-linux-arm64.tgz",
|
|
35
|
+
"integrity": "sha512-PGiLXMN+2IQRkf7tOLi64dMInjU1pRLbz0Rwfj/yt2Y97SZQqAjFQoi2wmswmqtqMDnfwCPTC1DRXVQkvU6T6Q==",
|
|
36
|
+
"archive": "tgz",
|
|
37
|
+
"archivePrefix": "package/vendor/aarch64-unknown-linux-musl",
|
|
38
|
+
"entry": "bin/codex"
|
|
39
|
+
},
|
|
40
|
+
"linux-x64": {
|
|
41
|
+
"url": "https://registry.npmjs.org/@openai/codex/-/codex-0.144.6-linux-x64.tgz",
|
|
42
|
+
"integrity": "sha512-4E7EnzCg0OnBxCyYnwJ+qnZwWHYe0YScr5ucKWbngE9u4+0XrpWELqq2Kn9jl5GZK8MDjU7PrJwFIwusHOHjuw==",
|
|
43
|
+
"archive": "tgz",
|
|
44
|
+
"archivePrefix": "package/vendor/x86_64-unknown-linux-musl",
|
|
45
|
+
"entry": "bin/codex"
|
|
46
|
+
},
|
|
47
|
+
"linux-x64-musl": {
|
|
48
|
+
"url": "https://registry.npmjs.org/@openai/codex/-/codex-0.144.6-linux-x64.tgz",
|
|
49
|
+
"integrity": "sha512-4E7EnzCg0OnBxCyYnwJ+qnZwWHYe0YScr5ucKWbngE9u4+0XrpWELqq2Kn9jl5GZK8MDjU7PrJwFIwusHOHjuw==",
|
|
50
|
+
"archive": "tgz",
|
|
51
|
+
"archivePrefix": "package/vendor/x86_64-unknown-linux-musl",
|
|
52
|
+
"entry": "bin/codex"
|
|
53
|
+
},
|
|
54
|
+
"win32-arm64": {
|
|
55
|
+
"url": "https://registry.npmjs.org/@openai/codex/-/codex-0.144.6-win32-arm64.tgz",
|
|
56
|
+
"integrity": "sha512-SpMjXJLW43JzMP0K62mVcYfmFcpk0BK4AOgYmWSfyZHs3iRtHMd0UYw7605n/9lwkT2EqbwQLT2omZFeKJFzwA==",
|
|
57
|
+
"archive": "tgz",
|
|
58
|
+
"archivePrefix": "package/vendor/aarch64-pc-windows-msvc",
|
|
59
|
+
"entry": "bin/codex.exe"
|
|
60
|
+
},
|
|
61
|
+
"win32-x64": {
|
|
62
|
+
"url": "https://registry.npmjs.org/@openai/codex/-/codex-0.144.6-win32-x64.tgz",
|
|
63
|
+
"integrity": "sha512-dN39VnjEthKz5io1RNWwZDtErdSn07nW3pGUgvlA6DMxgm/nuGaIAZO/sG/Hgxq/x5j9HteAENfrFgVkpZ0lFg==",
|
|
64
|
+
"archive": "tgz",
|
|
65
|
+
"archivePrefix": "package/vendor/x86_64-pc-windows-msvc",
|
|
66
|
+
"entry": "bin/codex.exe"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"claude": {
|
|
71
|
+
"version": "0.3.207",
|
|
72
|
+
"reportedVersion": "2.1.0",
|
|
73
|
+
"managedProbe": false,
|
|
74
|
+
"probe": {
|
|
75
|
+
"args": [
|
|
76
|
+
"--version"
|
|
77
|
+
]
|
|
78
|
+
},
|
|
79
|
+
"artifacts": {
|
|
80
|
+
"darwin-arm64": {
|
|
81
|
+
"url": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-darwin-arm64/-/claude-agent-sdk-darwin-arm64-0.3.207.tgz",
|
|
82
|
+
"integrity": "sha512-08xSo1FDx8h0aLhL5tvcRxa2SMmcUV3aDWeZiEJVTclyiDAs61BgTjAxCg+SZcu1CndjJO8cfO0yM5dhamxz3g==",
|
|
83
|
+
"archive": "tgz",
|
|
84
|
+
"archivePrefix": "package",
|
|
85
|
+
"entry": "claude"
|
|
86
|
+
},
|
|
87
|
+
"darwin-x64": {
|
|
88
|
+
"url": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-darwin-x64/-/claude-agent-sdk-darwin-x64-0.3.207.tgz",
|
|
89
|
+
"integrity": "sha512-1o7K4EYqyCixZ/oeOZSh7AzSy6TM86xoOuf4VuORjPSS31hBnoqY0NGZd27+2VDs9LGtsdksmsTqcNGx9xd1hA==",
|
|
90
|
+
"archive": "tgz",
|
|
91
|
+
"archivePrefix": "package",
|
|
92
|
+
"entry": "claude"
|
|
93
|
+
},
|
|
94
|
+
"linux-arm64": {
|
|
95
|
+
"url": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-linux-arm64/-/claude-agent-sdk-linux-arm64-0.3.207.tgz",
|
|
96
|
+
"integrity": "sha512-X4uezYOifDiNTTmmugfRCdg3nNamrr1LFRY9hg30vWYTShL+bbN+nfC3KaFfSYCl4GTtsEEUbYdOTC2F3bBpcA==",
|
|
97
|
+
"archive": "tgz",
|
|
98
|
+
"archivePrefix": "package",
|
|
99
|
+
"entry": "claude"
|
|
100
|
+
},
|
|
101
|
+
"linux-arm64-musl": {
|
|
102
|
+
"url": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-linux-arm64-musl/-/claude-agent-sdk-linux-arm64-musl-0.3.207.tgz",
|
|
103
|
+
"integrity": "sha512-oPj+g2DslhH4Y9nCTs7al4t9wZv78FZwLFQwOCg99BXuz1o0ZOpKmxyvR7J9eBR+GPszeMMS8gYplQTiZC9o2w==",
|
|
104
|
+
"archive": "tgz",
|
|
105
|
+
"archivePrefix": "package",
|
|
106
|
+
"entry": "claude"
|
|
107
|
+
},
|
|
108
|
+
"linux-x64": {
|
|
109
|
+
"url": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-linux-x64/-/claude-agent-sdk-linux-x64-0.3.207.tgz",
|
|
110
|
+
"integrity": "sha512-Kg6BPH8Ee0ny/oEUWJmvT1jCRBne4jVpRSOMsJcYp1Fav1rMEgpU219oJJs+LWwx4ifuuLtNWedqJNnVw7mnKg==",
|
|
111
|
+
"archive": "tgz",
|
|
112
|
+
"archivePrefix": "package",
|
|
113
|
+
"entry": "claude"
|
|
114
|
+
},
|
|
115
|
+
"linux-x64-musl": {
|
|
116
|
+
"url": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-linux-x64-musl/-/claude-agent-sdk-linux-x64-musl-0.3.207.tgz",
|
|
117
|
+
"integrity": "sha512-uRv+D5oG/7EYr41FAJ9IPo2pZYBe2ZMaA6nSHCeizsgPxCSMtl5bNppmU21+jZJvo4hivObEgkGFERAhdGqygg==",
|
|
118
|
+
"archive": "tgz",
|
|
119
|
+
"archivePrefix": "package",
|
|
120
|
+
"entry": "claude"
|
|
121
|
+
},
|
|
122
|
+
"win32-arm64": {
|
|
123
|
+
"url": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-win32-arm64/-/claude-agent-sdk-win32-arm64-0.3.207.tgz",
|
|
124
|
+
"integrity": "sha512-9fWpUzfkXlPAg2tf8JpQe7w9avFaomAUbfAwyAmykQgSIf66LwaJjvI5hNqhNqczRKyfsXPn3ei2S5HKlmFP+Q==",
|
|
125
|
+
"archive": "tgz",
|
|
126
|
+
"archivePrefix": "package",
|
|
127
|
+
"entry": "claude.exe"
|
|
128
|
+
},
|
|
129
|
+
"win32-x64": {
|
|
130
|
+
"url": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-win32-x64/-/claude-agent-sdk-win32-x64-0.3.207.tgz",
|
|
131
|
+
"integrity": "sha512-YPjVT0q6aXEM2MgN4CI6/9fqiTXwETji+4NoPOzCYuqAkhXZqp30Jsk7/NHqYGNNSfURKrsuAoliKB0rsbpbjg==",
|
|
132
|
+
"archive": "tgz",
|
|
133
|
+
"archivePrefix": "package",
|
|
134
|
+
"entry": "claude.exe"
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"agentBrowser": {
|
|
139
|
+
"version": "0.32.3",
|
|
140
|
+
"probe": {
|
|
141
|
+
"args": [
|
|
142
|
+
"--version"
|
|
143
|
+
]
|
|
144
|
+
},
|
|
145
|
+
"artifacts": {
|
|
146
|
+
"darwin-arm64": {
|
|
147
|
+
"url": "https://registry.npmjs.org/agent-browser/-/agent-browser-0.32.3.tgz",
|
|
148
|
+
"integrity": "sha512-jwmqex/vEFNWx7X/W3JnZSWm5C+46SFKWDXYD7timGPCcvqHZtdVIBnKGUz7iCJYflQg4DrtxWUWzuin9+zoyA==",
|
|
149
|
+
"archive": "tgz",
|
|
150
|
+
"archiveEntry": "package/bin/agent-browser-darwin-arm64",
|
|
151
|
+
"entry": "agent-browser"
|
|
152
|
+
},
|
|
153
|
+
"darwin-x64": {
|
|
154
|
+
"url": "https://registry.npmjs.org/agent-browser/-/agent-browser-0.32.3.tgz",
|
|
155
|
+
"integrity": "sha512-jwmqex/vEFNWx7X/W3JnZSWm5C+46SFKWDXYD7timGPCcvqHZtdVIBnKGUz7iCJYflQg4DrtxWUWzuin9+zoyA==",
|
|
156
|
+
"archive": "tgz",
|
|
157
|
+
"archiveEntry": "package/bin/agent-browser-darwin-x64",
|
|
158
|
+
"entry": "agent-browser"
|
|
159
|
+
},
|
|
160
|
+
"linux-arm64": {
|
|
161
|
+
"url": "https://registry.npmjs.org/agent-browser/-/agent-browser-0.32.3.tgz",
|
|
162
|
+
"integrity": "sha512-jwmqex/vEFNWx7X/W3JnZSWm5C+46SFKWDXYD7timGPCcvqHZtdVIBnKGUz7iCJYflQg4DrtxWUWzuin9+zoyA==",
|
|
163
|
+
"archive": "tgz",
|
|
164
|
+
"archiveEntry": "package/bin/agent-browser-linux-arm64",
|
|
165
|
+
"entry": "agent-browser"
|
|
166
|
+
},
|
|
167
|
+
"linux-arm64-musl": {
|
|
168
|
+
"url": "https://registry.npmjs.org/agent-browser/-/agent-browser-0.32.3.tgz",
|
|
169
|
+
"integrity": "sha512-jwmqex/vEFNWx7X/W3JnZSWm5C+46SFKWDXYD7timGPCcvqHZtdVIBnKGUz7iCJYflQg4DrtxWUWzuin9+zoyA==",
|
|
170
|
+
"archive": "tgz",
|
|
171
|
+
"archiveEntry": "package/bin/agent-browser-linux-musl-arm64",
|
|
172
|
+
"entry": "agent-browser"
|
|
173
|
+
},
|
|
174
|
+
"linux-x64": {
|
|
175
|
+
"url": "https://registry.npmjs.org/agent-browser/-/agent-browser-0.32.3.tgz",
|
|
176
|
+
"integrity": "sha512-jwmqex/vEFNWx7X/W3JnZSWm5C+46SFKWDXYD7timGPCcvqHZtdVIBnKGUz7iCJYflQg4DrtxWUWzuin9+zoyA==",
|
|
177
|
+
"archive": "tgz",
|
|
178
|
+
"archiveEntry": "package/bin/agent-browser-linux-x64",
|
|
179
|
+
"entry": "agent-browser"
|
|
180
|
+
},
|
|
181
|
+
"linux-x64-musl": {
|
|
182
|
+
"url": "https://registry.npmjs.org/agent-browser/-/agent-browser-0.32.3.tgz",
|
|
183
|
+
"integrity": "sha512-jwmqex/vEFNWx7X/W3JnZSWm5C+46SFKWDXYD7timGPCcvqHZtdVIBnKGUz7iCJYflQg4DrtxWUWzuin9+zoyA==",
|
|
184
|
+
"archive": "tgz",
|
|
185
|
+
"archiveEntry": "package/bin/agent-browser-linux-musl-x64",
|
|
186
|
+
"entry": "agent-browser"
|
|
187
|
+
},
|
|
188
|
+
"win32-x64": {
|
|
189
|
+
"url": "https://registry.npmjs.org/agent-browser/-/agent-browser-0.32.3.tgz",
|
|
190
|
+
"integrity": "sha512-jwmqex/vEFNWx7X/W3JnZSWm5C+46SFKWDXYD7timGPCcvqHZtdVIBnKGUz7iCJYflQg4DrtxWUWzuin9+zoyA==",
|
|
191
|
+
"archive": "tgz",
|
|
192
|
+
"archiveEntry": "package/bin/agent-browser-win32-x64.exe",
|
|
193
|
+
"entry": "agent-browser.exe"
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
"manifestId": "e84575670b5e7bb7b429a960ac6b6c17ae21ed8cb4ab25836cec8c582091ef5f"
|
|
199
|
+
}
|
|
@@ -86,6 +86,13 @@ function clearExecutableVersionCache() {
|
|
|
86
86
|
|
|
87
87
|
function getPreferredExecutableCandidates(agentName, pathEnv = process.env.PATH || '') {
|
|
88
88
|
const pathCandidates = getPathDirectories(pathEnv).map((dir) => path.join(dir, agentName));
|
|
89
|
+
if (agentName === 'claude') {
|
|
90
|
+
return [
|
|
91
|
+
process.env.FARMING_CLAUDE_BIN || '',
|
|
92
|
+
process.env.CLAUDE_CODE_EXECUTABLE || '',
|
|
93
|
+
...pathCandidates,
|
|
94
|
+
].filter(Boolean);
|
|
95
|
+
}
|
|
89
96
|
if (agentName !== 'codex') return pathCandidates;
|
|
90
97
|
|
|
91
98
|
return [
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
你由 Farming 启动并托管。Farming 是一个供用户同时运行、观察和管理多个 AI 编程 Agent 的工作区,统一承载 Agent 对话、终端、项目文件,以及可由用户和 Agent 共同使用的扩展资源。
|
|
2
2
|
|
|
3
|
-
Farming 可能为当前会话提供系统浏览器、Agent 协作等能力。能力是否可用以 `farming capabilities`
|
|
3
|
+
Farming 可能为当前会话提供系统浏览器、Agent 协作等能力。能力是否可用以 `"$FARMING_CLI_BIN_DIR/farming" capabilities` 的实时结果为准,不要自行假设。必须通过 `"$FARMING_CLI_BIN_DIR/farming"` 调用托管当前 Agent 的 Farming 实例;不要依赖 Shell 的 `PATH`,因为登录 Shell 可能把另一个 Farming 安装解析为 `farming`。下文帮助文本中的 `farming` 均代表这个精确入口。
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Farming 将 `agent-browser` 封装为 Farming Browser:Agent 可以通过结构化快照和操作命令更好地查看、调试和操作网页,用户也能在 Farming Viewer 中看到并理解同一个浏览器会话的进展,必要时直接接管。
|
|
6
|
+
|
|
7
|
+
当任务涉及打开、查看、调试或操作网页时,先运行 `"$FARMING_CLI_BIN_DIR/farming" capabilities`。Browser 可用时,Farming Browser 是默认浏览器路径:必须优先使用它,先复用当前 Project 的已有 Browser,或按需创建新的 Browser,并把需要用户复查的最终页面留在该 Browser 中。这样会创建 Farming 内可点击、可接管的共享 Browser Resource。不要改用 Provider 自带的通用 Browser、Chrome、Playwright、Puppeteer、Computer Use 或其他仅 Agent 可见的浏览器工具;只有 Farming Browser 不可用、任务明确需要尚未支持的能力,或用户明确指定其他工具时才例外。先用 `"$FARMING_CLI_BIN_DIR/farming" browser list` 发现 Browser;需要标准流程时运行 `"$FARMING_CLI_BIN_DIR/farming" browser help workflow`,只在当前步骤需要时再展开某个帮助主题或具体子命令。
|