@joripspace/cli 0.8.0 → 0.9.0
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/LICENSE +21 -21
- package/README.md +12 -9
- package/THIRD_PARTY_NOTICES.md +136 -136
- package/lib/deployment-error.js +14 -14
- package/lib/help.js +1 -1
- package/lib/start-command.js +8 -6
- package/lib/start.js +49 -15
- package/package.json +48 -48
- package/vendor/core/cli-onboarding.cjs +19 -3
- package/vendor/core/onboarding.cjs +18 -11
- package/vendor/core/template-publish-workflow.cjs +169 -169
- package/vendor/templates/index.js +104 -104
- package/vendor/templates/templates/basic-worker/files/worker.js +9 -9
- package/vendor/templates/templates/basic-worker/manifest.json +14 -14
- package/vendor/templates/templates/r2-file-api/files/worker.js +42 -42
- package/vendor/templates/templates/r2-file-api/manifest.json +7 -7
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Cosmosfarm Software
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Cosmosfarm Software
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -99,7 +99,7 @@ The CLI connection works without a plugin or MCP setup. If you also use MCP, its
|
|
|
99
99
|
|
|
100
100
|
### Project instructions
|
|
101
101
|
|
|
102
|
-
`start`
|
|
102
|
+
`start` retrieves the current guide from the project server and writes it into a marked JoripSpace section in `AGENTS.md`. New files place `User instructions` first, followed by `JoripSpace managed instructions`. Existing user content is preserved, and `CLAUDE.md` keeps a reference to `AGENTS.md`.
|
|
103
103
|
|
|
104
104
|
Your agent can use the returned guide immediately. If it does not load project files automatically, ask it to read the listed files in the current conversation. No agent restart is needed for this workflow.
|
|
105
105
|
|
|
@@ -139,14 +139,17 @@ CLI's `deploy --help` before using it. Existing published CLIs can use the manua
|
|
|
139
139
|
|
|
140
140
|
## Refresh guidance without changing app source
|
|
141
141
|
|
|
142
|
-
|
|
143
|
-
refresh instructions. For guide-only maintenance, authenticated MCP clients call `prepare_project_workspace`
|
|
144
|
-
with `guide_only: true`; the server omits source sync, legacy migrations, scaffold recovery, and service questions.
|
|
145
|
-
This is a server capability, not a new CLI option.
|
|
142
|
+
In CLI 0.9.0 and later, use the guide-only option to retrieve current instructions from the project server:
|
|
146
143
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
144
|
+
```sh
|
|
145
|
+
joripspace start PROJECT --guide-only --json
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
This updates only the JoripSpace managed block in `AGENTS.md`, the `CLAUDE.md` import and the canonical project marker. User instructions, notes and examples outside the managed block are preserved. It does not synchronize application source, restore deployments or migrate legacy files. A normal `start` can synchronize source, so use `--guide-only` when you only need to refresh instructions.
|
|
149
|
+
|
|
150
|
+
Authenticated MCP clients use `prepare_project_workspace` with `guide_only: true` for the same server-managed instructions. The legacy `/onboarding.md` URL is not used for refresh. An older CLI needs a one-time upgrade to use `--guide-only`; later guide content changes require only a server update and a project guide refresh.
|
|
151
|
+
|
|
152
|
+
The guide tells agents to check for updates at the start of each new task, when resuming a session or compacted context, at major phase transitions during long-running work and immediately before deployment. These checks are performed by the agent during its work; they are not background polling or server pushes. After an update, the agent rereads `AGENTS.md` and continues to follow the preserved user instructions.
|
|
150
153
|
|
|
151
154
|
## Find a command
|
|
152
155
|
|
|
@@ -262,7 +265,7 @@ checks apply. Creation does not link or change local project source; use `start`
|
|
|
262
265
|
|
|
263
266
|
Add `--json` for structured output without browser launch or interactive prompts. Successful results go to stdout, and errors go to stderr. Existing result fields and exit codes `0`, `1`, and `2` are preserved. The shared agent guide is English; CLI notices and prompts follow the OS locale, using Korean for `ko` and English otherwise. JSON field names and error codes remain unchanged. Agreement payloads retain the English text and Korean originals so agents can explain them in your conversation language.
|
|
264
267
|
|
|
265
|
-
The `onboarding` object provides `schema_version`, `instructions`, `read_files`, `invocation`, and `commands`.
|
|
268
|
+
The `onboarding` object provides `schema_version`, `instructions`, `read_files`, `invocation`, and `commands`. When authentication is required, `error.details.onboarding` contains login and resume steps; the full project guide is retrieved after authentication.
|
|
266
269
|
|
|
267
270
|
For tools that accept a command and argument list, run `invocation.command`, append CLI arguments after `invocation.args`, and use `invocation.cwd` as the working folder. With an npm installation, this runs Node with the absolute JavaScript entrypoint. The `executable`, `login_command`, `resume_command`, and `install_command` fields remain available for existing integrations. In PowerShell, use `&` before a quoted executable path.
|
|
268
271
|
|
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -1,137 +1,137 @@
|
|
|
1
|
-
# Third-party notices
|
|
2
|
-
|
|
3
|
-
JoripSpace CLI is licensed under MIT. The dependencies below retain their own licenses and copyrights.
|
|
4
|
-
They are installed separately by npm, not bundled into the CLI tarball. These notices record the versions in package-lock.json; other installed versions retain their accompanying licenses.
|
|
5
|
-
|
|
6
|
-
## fflate 0.8.3 — MIT
|
|
7
|
-
|
|
8
|
-
https://www.npmjs.com/package/fflate/v/0.8.3
|
|
9
|
-
|
|
10
|
-
MIT License
|
|
11
|
-
|
|
12
|
-
Copyright (c) 2026 Arjun Barrett
|
|
13
|
-
|
|
14
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
15
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
16
|
-
in the Software without restriction, including without limitation the rights
|
|
17
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
18
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
19
|
-
furnished to do so, subject to the following conditions:
|
|
20
|
-
|
|
21
|
-
The above copyright notice and this permission notice shall be included in all
|
|
22
|
-
copies or substantial portions of the Software.
|
|
23
|
-
|
|
24
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
25
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
26
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
27
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
28
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
29
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
30
|
-
SOFTWARE.
|
|
31
|
-
|
|
32
|
-
## jsonc-parser 3.3.1 — MIT
|
|
33
|
-
|
|
34
|
-
https://www.npmjs.com/package/jsonc-parser/v/3.3.1
|
|
35
|
-
|
|
36
|
-
The MIT License (MIT)
|
|
37
|
-
|
|
38
|
-
Copyright (c) Microsoft
|
|
39
|
-
|
|
40
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
41
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
42
|
-
in the Software without restriction, including without limitation the rights
|
|
43
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
44
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
45
|
-
furnished to do so, subject to the following conditions:
|
|
46
|
-
|
|
47
|
-
The above copyright notice and this permission notice shall be included in all
|
|
48
|
-
copies or substantial portions of the Software.
|
|
49
|
-
|
|
50
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
51
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
52
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
53
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
54
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
55
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
56
|
-
SOFTWARE.
|
|
57
|
-
|
|
58
|
-
## smol-toml 1.9.1 — BSD-3-Clause
|
|
59
|
-
|
|
60
|
-
https://www.npmjs.com/package/smol-toml/v/1.9.1
|
|
61
|
-
|
|
62
|
-
Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
63
|
-
|
|
64
|
-
Redistribution and use in source and binary forms, with or without
|
|
65
|
-
modification, are permitted provided that the following conditions are met:
|
|
66
|
-
|
|
67
|
-
1. Redistributions of source code must retain the above copyright notice, this
|
|
68
|
-
list of conditions and the following disclaimer.
|
|
69
|
-
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
70
|
-
this list of conditions and the following disclaimer in the
|
|
71
|
-
documentation and/or other materials provided with the distribution.
|
|
72
|
-
3. Neither the name of the copyright holder nor the names of its contributors
|
|
73
|
-
may be used to endorse or promote products derived from this software without
|
|
74
|
-
specific prior written permission.
|
|
75
|
-
|
|
76
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
77
|
-
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
78
|
-
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
79
|
-
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
80
|
-
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
81
|
-
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
82
|
-
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
83
|
-
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
84
|
-
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
85
|
-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
86
|
-
|
|
87
|
-
## @napi-rs/keyring 2.1.2
|
|
88
|
-
|
|
89
|
-
MIT License
|
|
90
|
-
|
|
91
|
-
Copyright (c) 2020 N-API for Rust
|
|
92
|
-
|
|
93
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
94
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
95
|
-
in the Software without restriction, including without limitation the rights
|
|
96
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
97
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
98
|
-
furnished to do so, subject to the following conditions:
|
|
99
|
-
|
|
100
|
-
The above copyright notice and this permission notice shall be included in all
|
|
101
|
-
copies or substantial portions of the Software.
|
|
102
|
-
|
|
103
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
104
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
105
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
106
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
107
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
108
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
109
|
-
SOFTWARE.
|
|
110
|
-
|
|
111
|
-
Platform binaries are npm dependencies; their bundled Rust dependency notices are included in each platform package's LICENSE.third-party.md. The Linux binary includes libdbus under AFL-2.1 OR GPL-2.0-or-later, with full license texts preserved in that dependency.
|
|
112
|
-
|
|
113
|
-
## ignore 7.0.12 — MIT
|
|
114
|
-
|
|
115
|
-
https://www.npmjs.com/package/ignore/v/7.0.12
|
|
116
|
-
|
|
117
|
-
Copyright (c) 2013 Kael Zhang <i@kael.me>, contributors
|
|
118
|
-
http://kael.me/
|
|
119
|
-
|
|
120
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
|
121
|
-
a copy of this software and associated documentation files (the
|
|
122
|
-
"Software"), to deal in the Software without restriction, including
|
|
123
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
|
124
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
|
125
|
-
permit persons to whom the Software is furnished to do so, subject to
|
|
126
|
-
the following conditions:
|
|
127
|
-
|
|
128
|
-
The above copyright notice and this permission notice shall be
|
|
129
|
-
included in all copies or substantial portions of the Software.
|
|
130
|
-
|
|
131
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
132
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
133
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
134
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
135
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
136
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
1
|
+
# Third-party notices
|
|
2
|
+
|
|
3
|
+
JoripSpace CLI is licensed under MIT. The dependencies below retain their own licenses and copyrights.
|
|
4
|
+
They are installed separately by npm, not bundled into the CLI tarball. These notices record the versions in package-lock.json; other installed versions retain their accompanying licenses.
|
|
5
|
+
|
|
6
|
+
## fflate 0.8.3 — MIT
|
|
7
|
+
|
|
8
|
+
https://www.npmjs.com/package/fflate/v/0.8.3
|
|
9
|
+
|
|
10
|
+
MIT License
|
|
11
|
+
|
|
12
|
+
Copyright (c) 2026 Arjun Barrett
|
|
13
|
+
|
|
14
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
15
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
16
|
+
in the Software without restriction, including without limitation the rights
|
|
17
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
18
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
19
|
+
furnished to do so, subject to the following conditions:
|
|
20
|
+
|
|
21
|
+
The above copyright notice and this permission notice shall be included in all
|
|
22
|
+
copies or substantial portions of the Software.
|
|
23
|
+
|
|
24
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
25
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
26
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
27
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
28
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
29
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
30
|
+
SOFTWARE.
|
|
31
|
+
|
|
32
|
+
## jsonc-parser 3.3.1 — MIT
|
|
33
|
+
|
|
34
|
+
https://www.npmjs.com/package/jsonc-parser/v/3.3.1
|
|
35
|
+
|
|
36
|
+
The MIT License (MIT)
|
|
37
|
+
|
|
38
|
+
Copyright (c) Microsoft
|
|
39
|
+
|
|
40
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
41
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
42
|
+
in the Software without restriction, including without limitation the rights
|
|
43
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
44
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
45
|
+
furnished to do so, subject to the following conditions:
|
|
46
|
+
|
|
47
|
+
The above copyright notice and this permission notice shall be included in all
|
|
48
|
+
copies or substantial portions of the Software.
|
|
49
|
+
|
|
50
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
51
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
52
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
53
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
54
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
55
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
56
|
+
SOFTWARE.
|
|
57
|
+
|
|
58
|
+
## smol-toml 1.9.1 — BSD-3-Clause
|
|
59
|
+
|
|
60
|
+
https://www.npmjs.com/package/smol-toml/v/1.9.1
|
|
61
|
+
|
|
62
|
+
Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
63
|
+
|
|
64
|
+
Redistribution and use in source and binary forms, with or without
|
|
65
|
+
modification, are permitted provided that the following conditions are met:
|
|
66
|
+
|
|
67
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
68
|
+
list of conditions and the following disclaimer.
|
|
69
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
70
|
+
this list of conditions and the following disclaimer in the
|
|
71
|
+
documentation and/or other materials provided with the distribution.
|
|
72
|
+
3. Neither the name of the copyright holder nor the names of its contributors
|
|
73
|
+
may be used to endorse or promote products derived from this software without
|
|
74
|
+
specific prior written permission.
|
|
75
|
+
|
|
76
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
77
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
78
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
79
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
80
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
81
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
82
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
83
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
84
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
85
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
86
|
+
|
|
87
|
+
## @napi-rs/keyring 2.1.2
|
|
88
|
+
|
|
89
|
+
MIT License
|
|
90
|
+
|
|
91
|
+
Copyright (c) 2020 N-API for Rust
|
|
92
|
+
|
|
93
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
94
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
95
|
+
in the Software without restriction, including without limitation the rights
|
|
96
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
97
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
98
|
+
furnished to do so, subject to the following conditions:
|
|
99
|
+
|
|
100
|
+
The above copyright notice and this permission notice shall be included in all
|
|
101
|
+
copies or substantial portions of the Software.
|
|
102
|
+
|
|
103
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
104
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
105
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
106
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
107
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
108
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
109
|
+
SOFTWARE.
|
|
110
|
+
|
|
111
|
+
Platform binaries are npm dependencies; their bundled Rust dependency notices are included in each platform package's LICENSE.third-party.md. The Linux binary includes libdbus under AFL-2.1 OR GPL-2.0-or-later, with full license texts preserved in that dependency.
|
|
112
|
+
|
|
113
|
+
## ignore 7.0.12 — MIT
|
|
114
|
+
|
|
115
|
+
https://www.npmjs.com/package/ignore/v/7.0.12
|
|
116
|
+
|
|
117
|
+
Copyright (c) 2013 Kael Zhang <i@kael.me>, contributors
|
|
118
|
+
http://kael.me/
|
|
119
|
+
|
|
120
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
121
|
+
a copy of this software and associated documentation files (the
|
|
122
|
+
"Software"), to deal in the Software without restriction, including
|
|
123
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
124
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
125
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
126
|
+
the following conditions:
|
|
127
|
+
|
|
128
|
+
The above copyright notice and this permission notice shall be
|
|
129
|
+
included in all copies or substantial portions of the Software.
|
|
130
|
+
|
|
131
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
132
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
133
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
134
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
135
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
136
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
137
137
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/lib/deployment-error.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
function formatDeploymentFailure(message, details) {
|
|
4
|
-
if (!details || typeof details !== 'object' || !details.deployment_id) return message;
|
|
5
|
-
const lines = [message, `Deployment: ${details.deployment_id}`];
|
|
6
|
-
if (details.error_stage) lines.push(`Stage: ${details.error_stage}`);
|
|
7
|
-
if (details.error_code) lines.push(`Error code: ${details.error_code}`);
|
|
8
|
-
if (details.error_details && details.error_details !== message) {
|
|
9
|
-
lines.push(`Details: ${details.error_details}`);
|
|
10
|
-
}
|
|
11
|
-
return lines.join('\n');
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
module.exports = { formatDeploymentFailure };
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
function formatDeploymentFailure(message, details) {
|
|
4
|
+
if (!details || typeof details !== 'object' || !details.deployment_id) return message;
|
|
5
|
+
const lines = [message, `Deployment: ${details.deployment_id}`];
|
|
6
|
+
if (details.error_stage) lines.push(`Stage: ${details.error_stage}`);
|
|
7
|
+
if (details.error_code) lines.push(`Error code: ${details.error_code}`);
|
|
8
|
+
if (details.error_details && details.error_details !== message) {
|
|
9
|
+
lines.push(`Details: ${details.error_details}`);
|
|
10
|
+
}
|
|
11
|
+
return lines.join('\n');
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
module.exports = { formatDeploymentFailure };
|
package/lib/help.js
CHANGED
|
@@ -13,7 +13,7 @@ Usage:
|
|
|
13
13
|
joripspace create --name NAME
|
|
14
14
|
joripspace create --name NAME --agree-noncommercial --agree-billing --agree-retention --json
|
|
15
15
|
joripspace link --project PROJECT --cwd PATH
|
|
16
|
-
joripspace start PROJECT --cwd PATH --json
|
|
16
|
+
joripspace start PROJECT --cwd PATH [--guide-only] --json
|
|
17
17
|
joripspace github prepare --project PROJECT --cwd PATH [--entrypoint worker.js]
|
|
18
18
|
joripspace knowledge search --query "USER_REQUEST"
|
|
19
19
|
joripspace realtime-v2 docs
|
package/lib/start-command.js
CHANGED
|
@@ -28,7 +28,8 @@ function createStartProjectCommand(
|
|
|
28
28
|
: projectWorkspaceDir(flags);
|
|
29
29
|
const cwd = resolveProjectRoot(requestedCwd, 'git');
|
|
30
30
|
readProjectEnv(cwd);
|
|
31
|
-
|
|
31
|
+
const guideOnly = flags['guide-only'] === true || flags['guide-only'] === 'true';
|
|
32
|
+
if (!guideOnly && fs.existsSync(path.join(cwd, '.env.joripspace'))) {
|
|
32
33
|
ensureProjectEnvIgnored(cwd);
|
|
33
34
|
}
|
|
34
35
|
const executable = path.resolve(
|
|
@@ -49,7 +50,7 @@ function createStartProjectCommand(
|
|
|
49
50
|
const loginMethod = `--no-open --project ${quoteCliArgument(project)}`;
|
|
50
51
|
const invocation = `${executable === path.resolve(process.argv[1] || '') ? quoteCliArgument(process.execPath) + ' ' : ''}${quoteCliArgument(executable)}`;
|
|
51
52
|
const loginCommand = `${invocation} login ${loginMethod} --cwd ${quoteCliArgument(cwd)}${apiUrlArgument} --json`;
|
|
52
|
-
const resumeCommand = `${invocation} start ${quoteCliArgument(project)} --cwd ${quoteCliArgument(cwd)} --json`;
|
|
53
|
+
const resumeCommand = `${invocation} start ${quoteCliArgument(project)} --cwd ${quoteCliArgument(cwd)}${guideOnly ? ' --guide-only' : ''} --json`;
|
|
53
54
|
const value = {
|
|
54
55
|
ok: false,
|
|
55
56
|
status: 'connection_required',
|
|
@@ -61,9 +62,9 @@ function createStartProjectCommand(
|
|
|
61
62
|
resume_command: resumeCommand,
|
|
62
63
|
next_action: 'run-login-command-then-resume-command',
|
|
63
64
|
connection_method: 'approval_link',
|
|
64
|
-
next_command: createStartOnboarding(executable, cwd, project, false, connection?.apiBaseUrl).commands.login,
|
|
65
|
+
next_command: createStartOnboarding(executable, cwd, project, false, connection?.apiBaseUrl, '', guideOnly).commands.login,
|
|
65
66
|
continue_with: 'cli',
|
|
66
|
-
onboarding: createStartOnboarding(executable, cwd, project, false, connection?.apiBaseUrl),
|
|
67
|
+
onboarding: createStartOnboarding(executable, cwd, project, false, connection?.apiBaseUrl, '', guideOnly),
|
|
67
68
|
};
|
|
68
69
|
throw startCommandError(value.status, value.message, value);
|
|
69
70
|
}
|
|
@@ -81,6 +82,7 @@ function createStartProjectCommand(
|
|
|
81
82
|
apiToken,
|
|
82
83
|
apiRequest: (apiPath, options) => apiRequest(connectionFlags, apiPath, options),
|
|
83
84
|
executable,
|
|
85
|
+
guideOnly,
|
|
84
86
|
allowLegacyCredentialSession: connection.source === 'legacy-project-session',
|
|
85
87
|
beforeWorkspaceMigration: persistConnection
|
|
86
88
|
? (context) => persistConnection(resolvedFlags, connection, context)
|
|
@@ -88,7 +90,7 @@ function createStartProjectCommand(
|
|
|
88
90
|
}).catch((error) => {
|
|
89
91
|
error.details = {
|
|
90
92
|
...error.details,
|
|
91
|
-
onboarding: createStartOnboarding(executable, cwd, project, false, connection.apiBaseUrl),
|
|
93
|
+
onboarding: createStartOnboarding(executable, cwd, project, false, connection.apiBaseUrl, '', guideOnly),
|
|
92
94
|
};
|
|
93
95
|
throw error;
|
|
94
96
|
});
|
|
@@ -106,7 +108,7 @@ function createStartProjectCommand(
|
|
|
106
108
|
};
|
|
107
109
|
}
|
|
108
110
|
if (!value.ok) {
|
|
109
|
-
value.onboarding = createStartOnboarding(executable, cwd, project, false, connection.apiBaseUrl);
|
|
111
|
+
value.onboarding = createStartOnboarding(executable, cwd, project, false, connection.apiBaseUrl, '', guideOnly);
|
|
110
112
|
throw startCommandError(
|
|
111
113
|
value.status || 'start_incomplete',
|
|
112
114
|
`JoripSpace start stopped: ${value.status || 'incomplete'}`,
|
package/lib/start.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const fs = require('node:fs');
|
|
2
2
|
const path = require('node:path');
|
|
3
|
-
const { upsertProjectAgentsContent
|
|
3
|
+
const { upsertProjectAgentsContent } = require('../vendor/core/onboarding.cjs');
|
|
4
4
|
const { secretManagementUrl } = require('./secret-commands');
|
|
5
5
|
const crypto = require('node:crypto');
|
|
6
6
|
const { spawnSync } = require('node:child_process');
|
|
@@ -137,12 +137,27 @@ async function startProject(options) {
|
|
|
137
137
|
method: 'GET',
|
|
138
138
|
apiToken: options.apiToken,
|
|
139
139
|
}),
|
|
140
|
-
options.apiRequest(`/v1/projects/${encodeURIComponent(projectSlug)}/deployments?limit=1`, {
|
|
140
|
+
options.guideOnly === true ? Promise.resolve(null) : options.apiRequest(`/v1/projects/${encodeURIComponent(projectSlug)}/deployments?limit=1`, {
|
|
141
141
|
method: 'GET',
|
|
142
142
|
apiToken: options.apiToken,
|
|
143
143
|
}),
|
|
144
144
|
]);
|
|
145
145
|
|
|
146
|
+
const guidance = validateServerGuidance(details?.agent_guidance);
|
|
147
|
+
if (options.guideOnly === true) {
|
|
148
|
+
ensureProjectGuidance(workspace, projectSlug, guidance);
|
|
149
|
+
return {
|
|
150
|
+
ok: true,
|
|
151
|
+
project: projectSlug,
|
|
152
|
+
guide_only: true,
|
|
153
|
+
next_action: 'read-updated-project-guidance',
|
|
154
|
+
executable: path.resolve(options.executable || process.argv[1] || process.execPath),
|
|
155
|
+
continue_with: 'cli',
|
|
156
|
+
onboarding: createStartOnboarding(options.executable || process.argv[1], workspace, projectSlug, true, '', guidance.instructions, true),
|
|
157
|
+
context: { source_sync: null },
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
|
|
146
161
|
let sourceSync = syncConnectedGithubRepository(
|
|
147
162
|
workspace,
|
|
148
163
|
details?.deployment,
|
|
@@ -196,7 +211,7 @@ async function startProject(options) {
|
|
|
196
211
|
if (options.beforeMigrationCommit) {
|
|
197
212
|
await Promise.resolve(options.beforeMigrationCommit({ project: projectSlug, workspace }));
|
|
198
213
|
}
|
|
199
|
-
const migration = migrateProjectWorkspace(workspace, projectSlug, migrationState, options);
|
|
214
|
+
const migration = migrateProjectWorkspace(workspace, projectSlug, migrationState, { ...options, guidance });
|
|
200
215
|
const executable = path.resolve(options.executable || process.argv[1] || process.execPath);
|
|
201
216
|
const latestDeployment = Array.isArray(deployments?.deployments)
|
|
202
217
|
? deployments.deployments[0] || null
|
|
@@ -260,7 +275,7 @@ async function startProject(options) {
|
|
|
260
275
|
project: projectSlug,
|
|
261
276
|
executable,
|
|
262
277
|
continue_with: 'cli',
|
|
263
|
-
onboarding: createStartOnboarding(executable, workspace, projectSlug, true),
|
|
278
|
+
onboarding: createStartOnboarding(executable, workspace, projectSlug, true, '', guidance.instructions),
|
|
264
279
|
next_action: templateChoice
|
|
265
280
|
? templateChoice.status === 'ready'
|
|
266
281
|
? 'present-template-choice'
|
|
@@ -565,8 +580,29 @@ function readProjectMarker(workspace) {
|
|
|
565
580
|
return parseProjectMarker(fs.readFileSync(markerPath, 'utf8'));
|
|
566
581
|
}
|
|
567
582
|
|
|
568
|
-
function
|
|
583
|
+
function validateServerGuidance(guidance) {
|
|
584
|
+
const document = guidance?.agents_md;
|
|
585
|
+
const blocks = typeof document === 'string'
|
|
586
|
+
? document.match(/<!-- joripspace:start -->[\s\S]*?<!-- joripspace:end -->/g)
|
|
587
|
+
: null;
|
|
588
|
+
if (guidance?.schema_version !== 1 || typeof guidance.updated_at !== 'string' ||
|
|
589
|
+
!Number.isFinite(Date.parse(guidance.updated_at)) ||
|
|
590
|
+
typeof guidance.instructions !== 'string' || !guidance.instructions.trim() ||
|
|
591
|
+
!blocks || blocks.length !== 1 ||
|
|
592
|
+
document.split(START_AGENTS_START).length !== 2 ||
|
|
593
|
+
document.split(START_AGENTS_END).length !== 2 ||
|
|
594
|
+
!blocks[0].includes(guidance.instructions)) {
|
|
595
|
+
throw startError('server_guidance_unavailable', 'The project API did not return valid current agent guidance. No bundled guide will be substituted.');
|
|
596
|
+
}
|
|
597
|
+
return { ...guidance, managedBlock: blocks[0] };
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
function ensureProjectGuidance(workspace, projectSlug, guidance) {
|
|
601
|
+
guidance = validateServerGuidance(guidance);
|
|
569
602
|
assertSafeProjectGuidance(workspace);
|
|
603
|
+
const agentsPath = managedProjectFilePath(workspace, 'AGENTS.md');
|
|
604
|
+
const currentAgents = fs.existsSync(agentsPath) ? fs.readFileSync(agentsPath, 'utf8') : '';
|
|
605
|
+
const nextAgents = upsertStartAgentsBlock(currentAgents, guidance.managedBlock);
|
|
570
606
|
const joripspaceDirectory = resolveProjectDirectoryTarget(workspace, '.joripspace').target;
|
|
571
607
|
fs.mkdirSync(joripspaceDirectory, { recursive: true });
|
|
572
608
|
const projectPath = managedProjectFilePath(workspace, '.joripspace/project');
|
|
@@ -574,9 +610,6 @@ function ensureProjectGuidance(workspace, projectSlug) {
|
|
|
574
610
|
const nextProject = `${projectSlug}\n`;
|
|
575
611
|
if (currentProject !== nextProject) writeTextAtomically(projectPath, nextProject);
|
|
576
612
|
|
|
577
|
-
const agentsPath = managedProjectFilePath(workspace, 'AGENTS.md');
|
|
578
|
-
const currentAgents = fs.existsSync(agentsPath) ? fs.readFileSync(agentsPath, 'utf8') : '';
|
|
579
|
-
const nextAgents = upsertStartAgentsBlock(currentAgents);
|
|
580
613
|
if (nextAgents !== currentAgents) writeTextAtomically(agentsPath, nextAgents);
|
|
581
614
|
|
|
582
615
|
const claudePath = managedProjectFilePath(workspace, 'CLAUDE.md');
|
|
@@ -620,9 +653,10 @@ function managedProjectFilePath(workspace, relative) {
|
|
|
620
653
|
return location.target;
|
|
621
654
|
}
|
|
622
655
|
|
|
623
|
-
function upsertStartAgentsBlock(source) {
|
|
656
|
+
function upsertStartAgentsBlock(source, managedBlock) {
|
|
657
|
+
if (typeof managedBlock !== 'string') throw startError('server_guidance_unavailable', 'Server agent guidance is required.');
|
|
624
658
|
try {
|
|
625
|
-
return upsertProjectAgentsContent(String(source || '').replace(/\r\n/g, '\n'));
|
|
659
|
+
return upsertProjectAgentsContent(String(source || '').replace(/\r\n/g, '\n'), {}, managedBlock);
|
|
626
660
|
} catch {
|
|
627
661
|
throw startError(
|
|
628
662
|
'invalid_agents_managed_block',
|
|
@@ -1076,7 +1110,7 @@ function migrateProjectWorkspace(workspace, projectSlug, state, options = {}) {
|
|
|
1076
1110
|
if (state.legacySessionPath) {
|
|
1077
1111
|
removeGitignoreEntries(workspace, ['.joripspace/agent-session.json']);
|
|
1078
1112
|
}
|
|
1079
|
-
ensureProjectGuidance(workspace, projectSlug);
|
|
1113
|
+
ensureProjectGuidance(workspace, projectSlug, options.guidance);
|
|
1080
1114
|
return { backupRoot };
|
|
1081
1115
|
}
|
|
1082
1116
|
|
|
@@ -1431,7 +1465,7 @@ function loadCoreOnboardingPackage() {
|
|
|
1431
1465
|
try {
|
|
1432
1466
|
return require('../vendor/core/onboarding.cjs');
|
|
1433
1467
|
} catch {
|
|
1434
|
-
return require('
|
|
1468
|
+
return require('../vendor/core/onboarding.cjs');
|
|
1435
1469
|
}
|
|
1436
1470
|
}
|
|
1437
1471
|
|
|
@@ -1463,7 +1497,7 @@ function writeTextAtomically(filePath, source) {
|
|
|
1463
1497
|
}
|
|
1464
1498
|
}
|
|
1465
1499
|
|
|
1466
|
-
function createStartOnboarding(executable, cwd, project, connected = false, apiBaseUrl = '') {
|
|
1500
|
+
function createStartOnboarding(executable, cwd, project, connected = false, apiBaseUrl = '', instructions = '', guideOnly = false) {
|
|
1467
1501
|
const invocation = {
|
|
1468
1502
|
command: process.pkg ? executable : process.execPath,
|
|
1469
1503
|
args: process.pkg ? [] : [executable],
|
|
@@ -1476,12 +1510,12 @@ function createStartOnboarding(executable, cwd, project, connected = false, apiB
|
|
|
1476
1510
|
});
|
|
1477
1511
|
return {
|
|
1478
1512
|
schema_version: 1,
|
|
1479
|
-
instructions:
|
|
1513
|
+
instructions: instructions || 'Complete project authentication using the approval link. No code entry is required. Then run commands.resume to receive the current project instructions from the server. Read onboarding.read_files explicitly after connection.',
|
|
1480
1514
|
secret_management_url: secretManagementUrl(project),
|
|
1481
1515
|
read_files: connected ? [path.join(cwd, 'AGENTS.md'), path.join(cwd, 'CLAUDE.md')] : [],
|
|
1482
1516
|
invocation,
|
|
1483
1517
|
commands: {
|
|
1484
|
-
resume: command(['start', project, '--cwd', cwd, '--json']),
|
|
1518
|
+
resume: command(['start', project, '--cwd', cwd, ...(guideOnly ? ['--guide-only'] : []), '--json']),
|
|
1485
1519
|
help: command(['--help']),
|
|
1486
1520
|
...(!connected
|
|
1487
1521
|
? { login: command(['login', '--no-open', '--project', project, '--cwd', cwd, '--json']) }
|