agentful 0.4.19 → 0.4.21
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/NOTICE +3 -1
- package/THIRD-PARTY-LICENSES.txt +75 -2
- package/dist/index.cjs +170 -9
- package/package.json +1 -1
package/NOTICE
CHANGED
|
@@ -20,4 +20,6 @@ Third-party software
|
|
|
20
20
|
--------------------------------------------------------------------------
|
|
21
21
|
This CLI downloads and runs the opencode engine
|
|
22
22
|
(https://github.com/anomalyco/opencode), which is distributed under the MIT
|
|
23
|
-
License.
|
|
23
|
+
License. It also includes the npm packages commander, fflate and ignore, each
|
|
24
|
+
under the MIT License. The full notices are reproduced in
|
|
25
|
+
THIRD-PARTY-LICENSES.txt.
|
package/THIRD-PARTY-LICENSES.txt
CHANGED
|
@@ -31,5 +31,78 @@ SOFTWARE.
|
|
|
31
31
|
|
|
32
32
|
## Bundled npm dependencies
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
The following packages are compiled into the CLI itself. Each is
|
|
35
|
+
distributed under the MIT License; their notices are reproduced below.
|
|
36
|
+
|
|
37
|
+
### commander (https://github.com/tj/commander.js)
|
|
38
|
+
|
|
39
|
+
(The MIT License)
|
|
40
|
+
|
|
41
|
+
Copyright (c) 2011 TJ Holowaychuk <tj@vision-media.ca>
|
|
42
|
+
|
|
43
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
44
|
+
a copy of this software and associated documentation files (the
|
|
45
|
+
'Software'), to deal in the Software without restriction, including
|
|
46
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
47
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
48
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
49
|
+
the following conditions:
|
|
50
|
+
|
|
51
|
+
The above copyright notice and this permission notice shall be
|
|
52
|
+
included in all copies or substantial portions of the Software.
|
|
53
|
+
|
|
54
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
|
55
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
56
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
57
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
58
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
59
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
60
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
61
|
+
|
|
62
|
+
### fflate (https://github.com/101arrowz/fflate)
|
|
63
|
+
|
|
64
|
+
MIT License
|
|
65
|
+
|
|
66
|
+
Copyright (c) 2026 Arjun Barrett
|
|
67
|
+
|
|
68
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
69
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
70
|
+
in the Software without restriction, including without limitation the rights
|
|
71
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
72
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
73
|
+
furnished to do so, subject to the following conditions:
|
|
74
|
+
|
|
75
|
+
The above copyright notice and this permission notice shall be included in all
|
|
76
|
+
copies or substantial portions of the Software.
|
|
77
|
+
|
|
78
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
79
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
80
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
81
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
82
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
83
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
84
|
+
SOFTWARE.
|
|
85
|
+
|
|
86
|
+
### ignore (https://github.com/kaelzhang/node-ignore)
|
|
87
|
+
|
|
88
|
+
Copyright (c) 2013 Kael Zhang <i@kael.me>, contributors
|
|
89
|
+
http://kael.me/
|
|
90
|
+
|
|
91
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
92
|
+
a copy of this software and associated documentation files (the
|
|
93
|
+
"Software"), to deal in the Software without restriction, including
|
|
94
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
95
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
96
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
97
|
+
the following conditions:
|
|
98
|
+
|
|
99
|
+
The above copyright notice and this permission notice shall be
|
|
100
|
+
included in all copies or substantial portions of the Software.
|
|
101
|
+
|
|
102
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
103
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
104
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
105
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
106
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
107
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
108
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/dist/index.cjs
CHANGED
|
@@ -3044,7 +3044,7 @@ var VERSION, brand, useColor, wrap, paint, tuiDesign, sym, ui;
|
|
|
3044
3044
|
var init_branding = __esm({
|
|
3045
3045
|
"src/branding.ts"() {
|
|
3046
3046
|
"use strict";
|
|
3047
|
-
VERSION = "0.4.
|
|
3047
|
+
VERSION = "0.4.21" ? "0.4.21" : null.version;
|
|
3048
3048
|
brand = {
|
|
3049
3049
|
name: "agentful",
|
|
3050
3050
|
// the command users type
|
|
@@ -7966,15 +7966,68 @@ async function backendCommand() {
|
|
|
7966
7966
|
|
|
7967
7967
|
// src/commands/open.ts
|
|
7968
7968
|
init_branding();
|
|
7969
|
+
|
|
7970
|
+
// src/lib/previewOpen.ts
|
|
7971
|
+
var PREVIEW_PROJECT_ID = /^[a-z0-9]{10,20}$/i;
|
|
7972
|
+
function isPreviewProjectId(projectId) {
|
|
7973
|
+
return typeof projectId === "string" && PREVIEW_PROJECT_ID.test(projectId);
|
|
7974
|
+
}
|
|
7975
|
+
function assertProjectId(projectId) {
|
|
7976
|
+
if (!isPreviewProjectId(projectId)) {
|
|
7977
|
+
throw new ApiError(
|
|
7978
|
+
0,
|
|
7979
|
+
"invalid_project_id",
|
|
7980
|
+
`"${projectId}" is not a valid project id \u2014 check .agentful/project.json or run \`agentful init\`.`
|
|
7981
|
+
);
|
|
7982
|
+
}
|
|
7983
|
+
}
|
|
7984
|
+
function previewAddress(projectId) {
|
|
7985
|
+
assertProjectId(projectId);
|
|
7986
|
+
return `https://preview-${projectId}.${PREVIEW_DOMAIN}/`;
|
|
7987
|
+
}
|
|
7988
|
+
function appPreviewRoute(projectId) {
|
|
7989
|
+
assertProjectId(projectId);
|
|
7990
|
+
return `${APP_URL}/preview/${projectId}`;
|
|
7991
|
+
}
|
|
7992
|
+
function withPreviewTicket(address, ticket) {
|
|
7993
|
+
const url = new URL(address);
|
|
7994
|
+
url.searchParams.set("ticket", ticket);
|
|
7995
|
+
return url.toString();
|
|
7996
|
+
}
|
|
7997
|
+
async function fetchPreviewTicket(auth, projectId) {
|
|
7998
|
+
assertProjectId(projectId);
|
|
7999
|
+
const body = await request(
|
|
8000
|
+
`${PUBLIC_API_URL}/api/workspaces/${encodeURIComponent(auth.user_id)}/${projectId}/preview-ticket`,
|
|
8001
|
+
{ method: "POST", token: auth.pb_token, timeoutMs: 15e3 }
|
|
8002
|
+
);
|
|
8003
|
+
if (typeof body.ticket !== "string" || !body.ticket) {
|
|
8004
|
+
throw new ApiError(0, "preview_ticket_missing", "The workspace API returned no preview ticket.");
|
|
8005
|
+
}
|
|
8006
|
+
return body.ticket;
|
|
8007
|
+
}
|
|
8008
|
+
async function previewOpenTarget(auth, projectId) {
|
|
8009
|
+
const address = previewAddress(projectId);
|
|
8010
|
+
try {
|
|
8011
|
+
const ticket = await fetchPreviewTicket(auth, projectId);
|
|
8012
|
+
return { url: withPreviewTicket(address, ticket), shown: address };
|
|
8013
|
+
} catch (err2) {
|
|
8014
|
+
if (err2 instanceof ApiError && [401, 403, 404].includes(err2.status)) throw err2;
|
|
8015
|
+
const route = appPreviewRoute(projectId);
|
|
8016
|
+
const reason = err2 instanceof Error ? err2.message : String(err2);
|
|
8017
|
+
return { url: route, shown: route, warning: `Could not get a preview ticket (${reason}); opening it through the app instead.` };
|
|
8018
|
+
}
|
|
8019
|
+
}
|
|
8020
|
+
|
|
8021
|
+
// src/commands/open.ts
|
|
7969
8022
|
async function openCommand() {
|
|
7970
8023
|
const project = requireProject();
|
|
7971
8024
|
const auth = await ensureAuth();
|
|
7972
|
-
const
|
|
7973
|
-
|
|
7974
|
-
ui.step(`Opening ${ui.url(shown)}`);
|
|
7975
|
-
if (!openInBrowser(url)) {
|
|
7976
|
-
ui.info(
|
|
7977
|
-
ui.info(ui.url(
|
|
8025
|
+
const target = await previewOpenTarget(auth, project.projectId);
|
|
8026
|
+
if (target.warning) ui.warn(target.warning);
|
|
8027
|
+
ui.step(`Opening ${ui.url(target.shown)}`);
|
|
8028
|
+
if (!openInBrowser(target.url)) {
|
|
8029
|
+
ui.info("Could not launch a browser \u2014 open this address and sign in to Agentful there if asked:");
|
|
8030
|
+
ui.info(ui.url(appPreviewRoute(project.projectId)));
|
|
7978
8031
|
}
|
|
7979
8032
|
}
|
|
7980
8033
|
|
|
@@ -8134,7 +8187,7 @@ async function ensureEngine() {
|
|
|
8134
8187
|
}
|
|
8135
8188
|
(0, import_node_fs11.chmodSync)(binPath, 493);
|
|
8136
8189
|
ui.ok(`Engine ready.`);
|
|
8137
|
-
console.log(paint.dim("
|
|
8190
|
+
console.log(paint.dim(" Third-party licenses: run `agentful licenses`"));
|
|
8138
8191
|
return binPath;
|
|
8139
8192
|
}
|
|
8140
8193
|
|
|
@@ -10130,7 +10183,115 @@ async function pullCommand(opts) {
|
|
|
10130
10183
|
}
|
|
10131
10184
|
|
|
10132
10185
|
// THIRD-PARTY-LICENSES.txt
|
|
10133
|
-
var THIRD_PARTY_LICENSES_default =
|
|
10186
|
+
var THIRD_PARTY_LICENSES_default = `Third-party software distributed with the Agentful CLI
|
|
10187
|
+
======================================================
|
|
10188
|
+
|
|
10189
|
+
## Agentful engine (opencode)
|
|
10190
|
+
|
|
10191
|
+
The Agentful CLI downloads and runs the opencode engine
|
|
10192
|
+
(https://github.com/anomalyco/opencode) as its local coding engine.
|
|
10193
|
+
It is distributed under the MIT License, reproduced below.
|
|
10194
|
+
|
|
10195
|
+
MIT License
|
|
10196
|
+
|
|
10197
|
+
Copyright (c) 2025 opencode
|
|
10198
|
+
|
|
10199
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
10200
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
10201
|
+
in the Software without restriction, including without limitation the rights
|
|
10202
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10203
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10204
|
+
furnished to do so, subject to the following conditions:
|
|
10205
|
+
|
|
10206
|
+
The above copyright notice and this permission notice shall be included in all
|
|
10207
|
+
copies or substantial portions of the Software.
|
|
10208
|
+
|
|
10209
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
10210
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
10211
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
10212
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
10213
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
10214
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
10215
|
+
SOFTWARE.
|
|
10216
|
+
|
|
10217
|
+
## Bundled npm dependencies
|
|
10218
|
+
|
|
10219
|
+
The following packages are compiled into the CLI itself. Each is
|
|
10220
|
+
distributed under the MIT License; their notices are reproduced below.
|
|
10221
|
+
|
|
10222
|
+
### commander (https://github.com/tj/commander.js)
|
|
10223
|
+
|
|
10224
|
+
(The MIT License)
|
|
10225
|
+
|
|
10226
|
+
Copyright (c) 2011 TJ Holowaychuk <tj@vision-media.ca>
|
|
10227
|
+
|
|
10228
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
10229
|
+
a copy of this software and associated documentation files (the
|
|
10230
|
+
'Software'), to deal in the Software without restriction, including
|
|
10231
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
10232
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
10233
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
10234
|
+
the following conditions:
|
|
10235
|
+
|
|
10236
|
+
The above copyright notice and this permission notice shall be
|
|
10237
|
+
included in all copies or substantial portions of the Software.
|
|
10238
|
+
|
|
10239
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
|
10240
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
10241
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
10242
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
10243
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
10244
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
10245
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
10246
|
+
|
|
10247
|
+
### fflate (https://github.com/101arrowz/fflate)
|
|
10248
|
+
|
|
10249
|
+
MIT License
|
|
10250
|
+
|
|
10251
|
+
Copyright (c) 2026 Arjun Barrett
|
|
10252
|
+
|
|
10253
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
10254
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
10255
|
+
in the Software without restriction, including without limitation the rights
|
|
10256
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10257
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10258
|
+
furnished to do so, subject to the following conditions:
|
|
10259
|
+
|
|
10260
|
+
The above copyright notice and this permission notice shall be included in all
|
|
10261
|
+
copies or substantial portions of the Software.
|
|
10262
|
+
|
|
10263
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
10264
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
10265
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
10266
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
10267
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
10268
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
10269
|
+
SOFTWARE.
|
|
10270
|
+
|
|
10271
|
+
### ignore (https://github.com/kaelzhang/node-ignore)
|
|
10272
|
+
|
|
10273
|
+
Copyright (c) 2013 Kael Zhang <i@kael.me>, contributors
|
|
10274
|
+
http://kael.me/
|
|
10275
|
+
|
|
10276
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
10277
|
+
a copy of this software and associated documentation files (the
|
|
10278
|
+
"Software"), to deal in the Software without restriction, including
|
|
10279
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
10280
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
10281
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
10282
|
+
the following conditions:
|
|
10283
|
+
|
|
10284
|
+
The above copyright notice and this permission notice shall be
|
|
10285
|
+
included in all copies or substantial portions of the Software.
|
|
10286
|
+
|
|
10287
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
10288
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
10289
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
10290
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
10291
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
10292
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
10293
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
10294
|
+
`;
|
|
10134
10295
|
|
|
10135
10296
|
// src/commands/licenses.ts
|
|
10136
10297
|
init_branding();
|