@howaboua/pi-durable-sites 0.0.0-stage → 0.10.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 +22 -0
- package/NOTICE +20 -0
- package/README.md +48 -2
- package/dist/activation.js +1103 -0
- package/dist/index.js +1072 -0
- package/dist/packages/sites/src/activation.d.ts +8 -0
- package/dist/packages/sites/src/auth.d.ts +7 -0
- package/dist/packages/sites/src/client.d.ts +36 -0
- package/dist/packages/sites/src/docs.d.ts +1 -0
- package/dist/packages/sites/src/documentation.d.ts +2 -0
- package/dist/packages/sites/src/facade.d.ts +4 -0
- package/dist/packages/sites/src/index.d.ts +146 -0
- package/dist/packages/sites/src/local-project.d.ts +23 -0
- package/dist/packages/sites/src/native-git.d.ts +11 -0
- package/dist/packages/sites/src/native-project.d.ts +4 -0
- package/dist/packages/sites/src/operations.d.ts +19 -0
- package/dist/packages/sites/src/redact.d.ts +2 -0
- package/package.json +65 -5
package/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 pasky
|
|
4
|
+
Copyright (c) 2026 Igor Warzocha
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE.
|
package/NOTICE
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
Applicable PR #552 changes adapted from howaboua-pi-stuff revision
|
|
2
|
+
1338b66a1067c254fec46746ef96b6bd9456148b. TypeScript execution mode
|
|
3
|
+
and QuickJS Notebook are excluded. See docs/parity for native adaptations.
|
|
4
|
+
|
|
5
|
+
Source alignment inspected at Pi Stuff revision 7f3295e67a8e6146b2a6922b56a06fa4db5c3a32.
|
|
6
|
+
See docs/parity for carried changes and explicit native-environment exclusions.
|
|
7
|
+
|
|
8
|
+
@howaboua/pi-durable-sites
|
|
9
|
+
|
|
10
|
+
Sites facade, operations, RPC client, redaction, local-project behavior and
|
|
11
|
+
on-demand guides adapted from IgorWarzocha/howaboua-pi-stuff:
|
|
12
|
+
packages/pi-chatgpt-sites at 69f50cf70e8a7b05c2349be6227f521b6504f80e.
|
|
13
|
+
Copyright (c) 2026 pasky
|
|
14
|
+
Copyright (c) 2026 Igor Warzocha
|
|
15
|
+
MIT licensed. The upstream license is reproduced in LICENSE.
|
|
16
|
+
|
|
17
|
+
Modified for Durable-native ordinary tool registrations, Models OAuth,
|
|
18
|
+
explicit namespace-matched filesystem and Git capabilities, owned execution,
|
|
19
|
+
bundled documentation and bounded, non-retrying transport failures.
|
|
20
|
+
No Pi ExtensionAPI, TUI, compatibility wrapper or upstream runtime is included.
|
package/README.md
CHANGED
|
@@ -1,3 +1,49 @@
|
|
|
1
|
-
#
|
|
1
|
+
# ChatGPT Sites for Pi Durable
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Manage Sites, save committed source and deploy explicitly as private or shared. The `sites` facade includes access, environment, domains, analytics, diagnostics, database and schedules. `sites_documentation` provides bounded guides and current operation schemas.
|
|
4
|
+
|
|
5
|
+
Register ordinary Durable tools. Code and Notebook discover them automatically.
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
npm install https://github.com/IgorWarzocha/pi-durable-components/releases/download/v0.10.0/howaboua-pi-durable-sites-0.10.0.tgz
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import { NodeExecutionEnv } from "@earendil-works/pi-durable/env/node";
|
|
13
|
+
import {
|
|
14
|
+
createNativeSitesProjectCapability,
|
|
15
|
+
createSitesExtension,
|
|
16
|
+
} from "@howaboua/pi-durable-sites";
|
|
17
|
+
|
|
18
|
+
const env = new NodeExecutionEnv({ cwd: projectDirectory });
|
|
19
|
+
const project = createNativeSitesProjectCapability(env);
|
|
20
|
+
const sites = createSitesExtension({
|
|
21
|
+
models,
|
|
22
|
+
projectForEnvironment: (environment) =>
|
|
23
|
+
environment.id === project.id ? project : undefined,
|
|
24
|
+
});
|
|
25
|
+
registry.install(sites);
|
|
26
|
+
// Select sites in the conversation's extensions and supply env through Harness.
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Requires Node 22.19 or newer, Git and a host-configured ChatGPT Codex OAuth provider in `Models`. `providerId` defaults to `openai-codex`. Custom provider IDs are accepted only with OAuth and the canonical ChatGPT backend route. No ambient Pi credentials, configurable Responses URLs or automatic login. Optional `fetch` supplies host-owned egress to the fixed Sites endpoint.
|
|
30
|
+
|
|
31
|
+
The native project capability accepts only Durable's local `NodeExecutionEnv`. Other execution namespaces require an explicitly authorized `SitesProjectCapability` with matching `id`. No filesystem or Git fallback to the host. The capability owns exclusive binding locks, atomic manifest updates and direct-argument Git execution with owned cancellation.
|
|
32
|
+
|
|
33
|
+
## Use
|
|
34
|
+
|
|
35
|
+
```json
|
|
36
|
+
{}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Returns help without authentication or filesystem access. Call `sites_documentation({"topic":"version.save"})` for the current schema. Calls use `{resource, action, params}`. Omitted `project_id` comes from `.openai/hosting.json`. `params.project_dir` selects a project root.
|
|
40
|
+
|
|
41
|
+
1. Reuse the bound project or call `site.create` once. Commit the returned binding and intended source.
|
|
42
|
+
2. Call `version.save` or `version.publish_private` with a clean worktree, including untracked files. These push exact committed HEAD, never caller-supplied commits or archives. Git hooks and automatic publication on push are disabled.
|
|
43
|
+
3. Call `deployment.deploy` with `visibility: "private"` or `"shared"` and the saved version ID. The facade never silently chooses shared deployment or widens access.
|
|
44
|
+
|
|
45
|
+
Side effects are unsafe to replay. A failed or interrupted request can have an uncertain outcome. Inspect remote state before issuing another side effect. When deployment fails after saving, reuse the returned `saved_version_id`. When site creation succeeds but binding persistence fails, recover the returned `project_id` in `.openai/hosting.json` rather than creating another site. An interrupted create can leave `hosting.lock`. Resolve the uncertain operation before removing a stale lock.
|
|
46
|
+
|
|
47
|
+
Outputs redact credentials and secret environment values. Results are capped at 32 KB and documentation at 16 KB. Schema checks preserve the source facade's unknown-field and required-field validation, not full JSON Schema validation. Source saves rely on remote build fallback. No archive uploader or unattended schedule writer is supplied.
|
|
48
|
+
|
|
49
|
+
Offline validation uses real Durable Harness, Models OAuth fixtures and temporary Git repositories. It does not establish live account access, provider compatibility or deployment success.
|