@phyzess/pappra 0.1.0-beta.4 → 0.1.0-beta.5
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
CHANGED
|
@@ -63,7 +63,7 @@ requires an explicit controller. They are not needed for the core workflow above
|
|
|
63
63
|
- **Knowledge:** workspace and private document catalogs with explicit preview/apply operations.
|
|
64
64
|
- **Continuity:** private task checkpoints and bounded advisory resume packets. Resume never grants execution by itself.
|
|
65
65
|
- **Code intelligence:** status, explicit preparation and bounded query for selected repositories. Text/structure fallback is available when the optional graph engine is absent.
|
|
66
|
-
- **Host integrations:** optional Pi, Codex and Claude Code adapters that merge Pappra-owned entries without taking over user configuration. Hooks are copied as a dependency-free bundle into the host root; `host bundle` exports a
|
|
66
|
+
- **Host integrations:** optional Pi, Codex and Claude Code adapters that merge Pappra-owned entries without taking over user configuration. Hooks are copied as a dependency-free bundle into the host root; `host bundle --marketplace` exports a local marketplace that Claude Code and Codex accept, without registering it. `host install --mode plugin` fails closed until plugin registration and callability are verified in a real session.
|
|
67
67
|
- **Bounded collaboration:** an optional, explicitly controlled one-request workflow. It is not a scheduler or daemon.
|
|
68
68
|
|
|
69
69
|
## Optional integrations and support
|
|
@@ -87,7 +87,7 @@ The check runs the source policy, type checks, formatting, deterministic tests a
|
|
|
87
87
|
|
|
88
88
|
## Status and limits
|
|
89
89
|
|
|
90
|
-
Pappra is development software (`0.1.0-beta.
|
|
90
|
+
Pappra is development software (`0.1.0-beta.5`) published as `@phyzess/pappra` under the `beta` dist-tag. Releases are published from GitHub Actions with npm trusted publishing (OIDC), so no npm token is stored in this repository. Pin either the moving `beta` tag or an exact version such as `@phyzess/pappra@0.1.0-beta.5`, because pre-release versions are never republished.
|
|
91
91
|
|
|
92
92
|
The deterministic suite covers synthetic workspaces, fixtures and local process boundaries. It does not establish real-model behavior, native host callability on every platform, CodeGraph completeness, Windows/Linux parity or production performance. A host adapter version pin is an observed support claim, not proof that a particular native installation will load or run correctly.
|
|
93
93
|
|
|
@@ -11,5 +11,6 @@ export interface HostCommandOptions {
|
|
|
11
11
|
readonly apply: boolean;
|
|
12
12
|
readonly out: string | null;
|
|
13
13
|
readonly mode: 'project-settings' | 'plugin' | null;
|
|
14
|
+
readonly marketplace: boolean;
|
|
14
15
|
}
|
|
15
16
|
export declare function runHostCommand(options: HostCommandOptions, output: CliOutput): Promise<number>;
|
|
@@ -133,6 +133,7 @@ export async function runHostCommand(options, output) {
|
|
|
133
133
|
hostVersion: options.hostVersion ?? HOST_SUPPORT[options.host].version,
|
|
134
134
|
outDir: options.out,
|
|
135
135
|
packageVersion: getPackageInfo().version,
|
|
136
|
+
marketplace: options.marketplace,
|
|
136
137
|
});
|
|
137
138
|
if (options.json) {
|
|
138
139
|
output.stdout(`${JSON.stringify({ ok: true, command: 'host', action: 'bundle', ...exported })}\n`);
|
package/dist/cli/run.js
CHANGED
|
@@ -25,6 +25,7 @@ function parseOptions(args) {
|
|
|
25
25
|
tarball: { type: 'string' },
|
|
26
26
|
out: { type: 'string' },
|
|
27
27
|
mode: { type: 'string' },
|
|
28
|
+
marketplace: { type: 'boolean' },
|
|
28
29
|
bind: { type: 'boolean' },
|
|
29
30
|
force: { type: 'boolean' },
|
|
30
31
|
'no-interactive': { type: 'boolean' },
|
|
@@ -250,6 +251,10 @@ export async function runCli(args, output) {
|
|
|
250
251
|
failure(output, json, 'invalid_arguments', '--out is only valid for host.');
|
|
251
252
|
return 2;
|
|
252
253
|
}
|
|
254
|
+
if (command !== 'host' && values.marketplace === true) {
|
|
255
|
+
failure(output, json, 'invalid_arguments', '--marketplace is only valid for host bundle.');
|
|
256
|
+
return 2;
|
|
257
|
+
}
|
|
253
258
|
if (command !== 'host' &&
|
|
254
259
|
values.mode !== undefined &&
|
|
255
260
|
command !== 'runtime') {
|
|
@@ -659,6 +664,7 @@ export async function runCli(args, output) {
|
|
|
659
664
|
hasContinuityOptions(values) ||
|
|
660
665
|
(values.apply === true && action !== 'install') ||
|
|
661
666
|
(values.mode !== undefined && action !== 'install') ||
|
|
667
|
+
(values.marketplace === true && action !== 'bundle') ||
|
|
662
668
|
(values['host-root'] !== undefined && action === null) ||
|
|
663
669
|
(values['host-version'] !== undefined && action === null);
|
|
664
670
|
if (values.help) {
|
|
@@ -686,6 +692,7 @@ export async function runCli(args, output) {
|
|
|
686
692
|
mode: values.mode === 'project-settings' || values.mode === 'plugin'
|
|
687
693
|
? values.mode
|
|
688
694
|
: null,
|
|
695
|
+
marketplace: values.marketplace === true,
|
|
689
696
|
}, output);
|
|
690
697
|
}
|
|
691
698
|
if (command !== null) {
|
|
@@ -19,4 +19,6 @@ export declare function exportHostPluginBundle(options: {
|
|
|
19
19
|
readonly hostVersion: string;
|
|
20
20
|
readonly outDir: string;
|
|
21
21
|
readonly packageVersion: string;
|
|
22
|
+
/** Writes a marketplace root with the plugin under `pappra/`. */
|
|
23
|
+
readonly marketplace?: boolean;
|
|
22
24
|
}): Promise<HostPluginBundle>;
|
|
@@ -10,24 +10,15 @@ function pluginHookExpression(host) {
|
|
|
10
10
|
: './hooks/pappra-hook.mjs';
|
|
11
11
|
}
|
|
12
12
|
function hostManifest(host, version) {
|
|
13
|
-
if (host === 'claude') {
|
|
13
|
+
if (host === 'claude' || host === 'codex') {
|
|
14
|
+
// Codex reads the Claude plugin manifest path, so one manifest serves both.
|
|
14
15
|
return {
|
|
15
16
|
path: '.claude-plugin/plugin.json',
|
|
16
17
|
value: {
|
|
17
18
|
name: 'pappra',
|
|
18
19
|
version,
|
|
19
20
|
description: 'Portable workspace knowledge and continuity for coding agents.',
|
|
20
|
-
|
|
21
|
-
},
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
if (host === 'codex') {
|
|
25
|
-
return {
|
|
26
|
-
path: 'plugin.json',
|
|
27
|
-
value: {
|
|
28
|
-
name: 'pappra',
|
|
29
|
-
version,
|
|
30
|
-
description: 'Portable workspace knowledge and continuity for coding agents.',
|
|
21
|
+
author: { name: 'phyzess' },
|
|
31
22
|
hooks: './hooks/hooks.json',
|
|
32
23
|
},
|
|
33
24
|
};
|
|
@@ -53,15 +44,20 @@ function hostManifest(host, version) {
|
|
|
53
44
|
* load or trust it.
|
|
54
45
|
*/
|
|
55
46
|
export async function exportHostPluginBundle(options) {
|
|
56
|
-
const
|
|
47
|
+
const outRoot = resolve(options.outDir);
|
|
48
|
+
if (options.marketplace === true && options.host === 'pi') {
|
|
49
|
+
throw new Error('Pi installs a directory directly; a marketplace wrapper is not supported.');
|
|
50
|
+
}
|
|
51
|
+
const pluginPrefix = options.marketplace === true ? 'pappra/' : '';
|
|
52
|
+
const pluginRoot = options.marketplace === true ? join(outRoot, 'pappra') : outRoot;
|
|
57
53
|
const payload = await loadHostBundle(options.host, options.packageVersion, {
|
|
58
54
|
hookSource: join(getPackageRoot(), 'dist/hosts/integration/pappra-hook.mjs'),
|
|
59
55
|
hookExpression: pluginHookExpression(options.host),
|
|
60
56
|
});
|
|
61
57
|
const written = [];
|
|
62
58
|
const writeEntry = async (path, bytes) => {
|
|
63
|
-
const target = join(
|
|
64
|
-
if (!isPathInside(
|
|
59
|
+
const target = join(outRoot, ...path.split('/'));
|
|
60
|
+
if (!isPathInside(outRoot, target)) {
|
|
65
61
|
throw new Error(`Unsafe plugin bundle path: ${path}`);
|
|
66
62
|
}
|
|
67
63
|
await mkdir(dirname(target), { recursive: true });
|
|
@@ -73,7 +69,7 @@ export async function exportHostPluginBundle(options) {
|
|
|
73
69
|
// templates are only an intermediate artifact.
|
|
74
70
|
if (options.host !== 'pi' && path.startsWith('templates/'))
|
|
75
71
|
continue;
|
|
76
|
-
await writeEntry(path
|
|
72
|
+
await writeEntry(`${pluginPrefix}${path}`, bytes);
|
|
77
73
|
}
|
|
78
74
|
const expression = pluginHookExpression(options.host);
|
|
79
75
|
if (options.host === 'pi') {
|
|
@@ -81,20 +77,35 @@ export async function exportHostPluginBundle(options) {
|
|
|
81
77
|
if (entry === undefined) {
|
|
82
78
|
throw new Error('Pi plugin bundle is missing its extension entry.');
|
|
83
79
|
}
|
|
84
|
-
await writeEntry(
|
|
80
|
+
await writeEntry(`${pluginPrefix}extensions/pappra/index.ts`, entry);
|
|
85
81
|
}
|
|
86
82
|
else {
|
|
87
83
|
const patch = renderHookConfigPatch(options.host, expression);
|
|
88
|
-
await writeEntry(
|
|
84
|
+
await writeEntry(`${pluginPrefix}hooks/hooks.json`, Buffer.from(`${JSON.stringify(patch, null, 2)}\n`));
|
|
89
85
|
}
|
|
90
86
|
const manifest = hostManifest(options.host, options.packageVersion);
|
|
91
|
-
await writeEntry(manifest.path
|
|
87
|
+
await writeEntry(`${pluginPrefix}${manifest.path}`, Buffer.from(`${JSON.stringify(manifest.value, null, 2)}\n`));
|
|
88
|
+
if (options.marketplace === true) {
|
|
89
|
+
await writeEntry('.claude-plugin/marketplace.json', Buffer.from(`${JSON.stringify({
|
|
90
|
+
name: 'pappra-local',
|
|
91
|
+
owner: { name: 'phyzess' },
|
|
92
|
+
description: 'Local Pappra plugin marketplace exported by pappra host bundle.',
|
|
93
|
+
plugins: [
|
|
94
|
+
{
|
|
95
|
+
name: 'pappra',
|
|
96
|
+
source: './pappra',
|
|
97
|
+
description: 'Portable workspace knowledge and continuity for coding agents.',
|
|
98
|
+
author: { name: 'phyzess' },
|
|
99
|
+
},
|
|
100
|
+
],
|
|
101
|
+
}, null, 2)}\n`));
|
|
102
|
+
}
|
|
92
103
|
return {
|
|
93
104
|
host: options.host,
|
|
94
|
-
outDir,
|
|
105
|
+
outDir: pluginRoot,
|
|
95
106
|
files: written.sort((left, right) => left.localeCompare(right)),
|
|
96
|
-
pluginManifest: manifest.path
|
|
97
|
-
hookConfig: options.host === 'pi' ? null :
|
|
107
|
+
pluginManifest: `${pluginPrefix}${manifest.path}`,
|
|
108
|
+
hookConfig: options.host === 'pi' ? null : `${pluginPrefix}hooks/hooks.json`,
|
|
98
109
|
registration: options.host === 'claude'
|
|
99
110
|
? [
|
|
100
111
|
'Register the directory as a local plugin or marketplace entry; Pappra does not add it to host settings.',
|