@pi-in-go/pigpen-extension-port 0.1.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/CREDITS.md +21 -0
- package/LICENSE +21 -0
- package/README.md +52 -0
- package/package.json +37 -0
- package/provenance.json +18 -0
- package/skills/pigpen-pi-extension-port/SKILL.md +532 -0
- package/skills/pigpen-pi-extension-port/references/fakehost_test.go.txt +548 -0
- package/skills/pigpen-pi-extension-port/references/ts-to-go-patterns.md +218 -0
- package/skills/pigpen-pi-extension-port/references/twin_test.go.txt +28 -0
package/CREDITS.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Credits
|
|
2
|
+
|
|
3
|
+
The `pigpen-pi-extension-port` Skill adapts the PiG Porter procedure and
|
|
4
|
+
TypeScript-to-Go translation rules from PiG.
|
|
5
|
+
|
|
6
|
+
Authors and copyright attribution: Michael Kinsy.
|
|
7
|
+
Source repository: https://github.com/MichaelKinsy/PiG.
|
|
8
|
+
|
|
9
|
+
Reviewed revision: `d86eb93f217e64b655e9ee6f48c93a9afd107697`.
|
|
10
|
+
|
|
11
|
+
- [PiG Porter Skill](https://github.com/MichaelKinsy/PiG/blob/d86eb93f217e64b655e9ee6f48c93a9afd107697/piglets/porter/skills/pig-porter/SKILL.md)
|
|
12
|
+
- [TypeScript-to-Go porting](https://github.com/MichaelKinsy/PiG/blob/d86eb93f217e64b655e9ee6f48c93a9afd107697/docs/typescript-to-go-porting.md)
|
|
13
|
+
|
|
14
|
+
License: [MIT](LICENSE). Pigpen's adaptation removes core-repository assumptions
|
|
15
|
+
and adds Package distribution and extension-specific completion checks. It does
|
|
16
|
+
not copy or replace PiG's core parity engine.
|
|
17
|
+
|
|
18
|
+
The L-rules in the Skill are those of PiG's 0.99 port progress record
|
|
19
|
+
(`docs/plan/upgrade-0.99.1-progress.md` in PiG `v0.4.0`, same authors and license).
|
|
20
|
+
The fake-host and fake-CLI test patterns come from Pigpen's herdr Go port
|
|
21
|
+
(`pigpen-herdr-go`), and the equivalence workflow from Pigpen's `extension-equivalence` Package.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Michael Kinsy
|
|
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
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Extension porting Package
|
|
2
|
+
|
|
3
|
+
This Package supplies `pigpen-pi-extension-port`, a strict, proof-checked procedure for
|
|
4
|
+
porting a Pi TypeScript extension to a **Go** PiG extension. It contains no extension and
|
|
5
|
+
needs no Node runtime to install; the proof steps use the
|
|
6
|
+
[`extension-equivalence`](../extension-equivalence/README.md) Package.
|
|
7
|
+
|
|
8
|
+
The workflow, in order: SDK gap check, tests first (a fake PiG host over `net.Pipe`, and
|
|
9
|
+
scripted scenarios recorded from the original under Pi), red, Go implementation, a
|
|
10
|
+
differential check that the original under Pi and the port under PiG produce identical
|
|
11
|
+
traces, a mutation check, a Piglet Binary build with the extension fused, and a Package
|
|
12
|
+
with provenance back to the original and its license.
|
|
13
|
+
|
|
14
|
+
| File | Content |
|
|
15
|
+
|---|---|
|
|
16
|
+
| `skills/pigpen-pi-extension-port/SKILL.md` | The workflow and completion checklist, with the L-rules from PiG's own port. |
|
|
17
|
+
| `references/ts-to-go-patterns.md` | Event mapping, async and Promise, dialogs, exec and child processes, error text, strings and numbers, Windows paths, known SDK gaps and host differences. |
|
|
18
|
+
| `references/fakehost_test.go.txt` | The fake-host test harness to copy into a port (`fakehost_test.go`). |
|
|
19
|
+
|
|
20
|
+
## Use independently
|
|
21
|
+
|
|
22
|
+
From the Pigpen checkout root:
|
|
23
|
+
|
|
24
|
+
```sh
|
|
25
|
+
pig package validate ./components/extension-port
|
|
26
|
+
pig install ./components/extension-port
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Then invoke the Skill in a PiG session:
|
|
30
|
+
|
|
31
|
+
```text
|
|
32
|
+
/skill:pigpen-pi-extension-port port <original.ts> to <target-directory>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Pigpen's own ports are dispatched from [`ports/ports.json`](../../ports/README.md): give the Skill one row,
|
|
36
|
+
`/skill:pigpen-pi-extension-port port row <id>`, and it takes the pinned upstream, target, license and credit from
|
|
37
|
+
the row and keeps the row's status (`porting`, then `review`) up to date.
|
|
38
|
+
|
|
39
|
+
The local install references this checkout; keep it at its installed path and use `pig remove`
|
|
40
|
+
with the same path to remove it. The [`pig-extension-porter`](../../piglets/pig-extension-porter/README.md)
|
|
41
|
+
Piglet selects this Skill together with the equivalence extension, from a generated local stage
|
|
42
|
+
(`npm run stage`); that does not install the Package into user settings.
|
|
43
|
+
|
|
44
|
+
The Skill guides an agent. It does not certify a port or run an automatic translator. The
|
|
45
|
+
package keyword `pig-package` lets pi-in-go.dev's Package catalog discover it once published;
|
|
46
|
+
it is `private` until the owner publishes it. No public package or Piglet Binary has been released.
|
|
47
|
+
|
|
48
|
+
## License and credits
|
|
49
|
+
|
|
50
|
+
[MIT](LICENSE). The procedure adapts PiG's upstream-first porter and translation rules and PiG's
|
|
51
|
+
0.99 port lessons; the herdr Go port contributed the fake-host and fake-CLI test patterns. See
|
|
52
|
+
[CREDITS.md](CREDITS.md).
|
package/package.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@pi-in-go/pigpen-extension-port",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Test-first, proof-checked procedure for porting Pi TypeScript extensions to native Go PiG extensions",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"pig-package",
|
|
7
|
+
"extension-porting",
|
|
8
|
+
"skill",
|
|
9
|
+
"pigpen"
|
|
10
|
+
],
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"author": "Michael Kinsy",
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git+https://github.com/MichaelKinsy/pigpen.git",
|
|
16
|
+
"directory": "components/extension-port"
|
|
17
|
+
},
|
|
18
|
+
"homepage": "https://github.com/MichaelKinsy/pigpen/tree/main/components/extension-port#readme",
|
|
19
|
+
"bugs": {
|
|
20
|
+
"url": "https://github.com/MichaelKinsy/pigpen/issues"
|
|
21
|
+
},
|
|
22
|
+
"publishConfig": {
|
|
23
|
+
"access": "public"
|
|
24
|
+
},
|
|
25
|
+
"files": [
|
|
26
|
+
"skills",
|
|
27
|
+
"README.md",
|
|
28
|
+
"LICENSE",
|
|
29
|
+
"CREDITS.md",
|
|
30
|
+
"provenance.json"
|
|
31
|
+
],
|
|
32
|
+
"pi": {
|
|
33
|
+
"skills": [
|
|
34
|
+
"skills/pigpen-pi-extension-port"
|
|
35
|
+
]
|
|
36
|
+
}
|
|
37
|
+
}
|
package/provenance.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"origin": "ported",
|
|
3
|
+
"authors": ["Michael Kinsy"],
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"licenseFile": "LICENSE",
|
|
6
|
+
"upstreams": [
|
|
7
|
+
{
|
|
8
|
+
"name": "PiG Porter",
|
|
9
|
+
"authors": ["Michael Kinsy"],
|
|
10
|
+
"url": "https://github.com/MichaelKinsy/PiG",
|
|
11
|
+
"revision": "d86eb93f217e64b655e9ee6f48c93a9afd107697",
|
|
12
|
+
"path": "skills/pigpen-pi-extension-port",
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"licenseFile": "LICENSE",
|
|
15
|
+
"attributionFile": "CREDITS.md"
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
}
|