@kujolang/paperclip 0.1.2 → 0.1.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.3 - 2026-09-02
4
+
5
+ - Resolve the installed `@kujolang/kujo-runtime` package at worker runtime instead of inlining its package resolver into the ESM worker bundle.
6
+ - Add a package verification regression gate for the external runtime boundary.
7
+
3
8
  ## 0.1.2 - 2026-09-02
4
9
 
5
10
  - Publish through npm trusted publishing with short-lived GitHub Actions identity tokens instead of a stored npm token.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Kujo for Paperclip
2
2
 
3
- [![Version](https://img.shields.io/badge/version-0.1.2-black)](https://github.com/kujolang/paperclip/releases/tag/v0.1.2)
3
+ [![Version](https://img.shields.io/badge/version-0.1.3-black)](https://github.com/kujolang/paperclip/releases/tag/v0.1.3)
4
4
  [![License](https://img.shields.io/badge/license-MIT-lightgrey)](LICENSE)
5
5
  [![built with Kujo](https://img.shields.io/badge/built%20with-Kujo-white.svg)](https://github.com/kujolang/kujo)
6
6
 
package/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.2
1
+ 0.1.3
package/dist/manifest.js CHANGED
@@ -14527,7 +14527,7 @@ var DEFAULT_LIMITS = {
14527
14527
  maxInputLogBytes: 2e5,
14528
14528
  maxContextFileBytes: 2e3
14529
14529
  };
14530
- var PLUGIN_VERSION = "0.1.2";
14530
+ var PLUGIN_VERSION = "0.1.3";
14531
14531
  var MINIMUM_HOST_VERSION = "0.0.0";
14532
14532
 
14533
14533
  // src/config/schema.ts
package/dist/worker.js CHANGED
@@ -1,224 +1,8 @@
1
- var __create = Object.create;
2
1
  var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
8
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
9
- }) : x)(function(x) {
10
- if (typeof require !== "undefined") return require.apply(this, arguments);
11
- throw Error('Dynamic require of "' + x + '" is not supported');
12
- });
13
- var __commonJS = (cb, mod) => function __require2() {
14
- try {
15
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
16
- } catch (e) {
17
- throw mod = 0, e;
18
- }
19
- };
20
2
  var __export = (target, all) => {
21
3
  for (var name in all)
22
4
  __defProp(target, name, { get: all[name], enumerable: true });
23
5
  };
24
- var __copyProps = (to, from, except, desc) => {
25
- if (from && typeof from === "object" || typeof from === "function") {
26
- for (let key of __getOwnPropNames(from))
27
- if (!__hasOwnProp.call(to, key) && key !== except)
28
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
29
- }
30
- return to;
31
- };
32
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
33
- // If the importer is in node compatibility mode or this is not an ESM
34
- // file that has been converted to a CommonJS file using a Babel-
35
- // compatible transform (i.e. "__esModule" has not been set), then set
36
- // "default" to the CommonJS "module.exports" for node compatibility.
37
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
38
- mod
39
- ));
40
-
41
- // node_modules/@kujolang/kujo-runtime/package.json
42
- var require_package = __commonJS({
43
- "node_modules/@kujolang/kujo-runtime/package.json"(exports, module) {
44
- module.exports = {
45
- name: "@kujolang/kujo-runtime",
46
- version: "1.2.2",
47
- description: "Kujo programming language runtime",
48
- license: "MIT",
49
- repository: {
50
- type: "git",
51
- url: "git+https://github.com/kujolang/kujo.git",
52
- directory: "npm/runtime"
53
- },
54
- homepage: "https://github.com/kujolang/kujo",
55
- engines: {
56
- node: ">=18"
57
- },
58
- bin: {
59
- kujo: "bin/kujo.js"
60
- },
61
- main: "index.js",
62
- types: "index.d.ts",
63
- exports: {
64
- ".": {
65
- types: "./index.d.ts",
66
- require: "./index.js",
67
- default: "./index.js"
68
- },
69
- "./package.json": "./package.json"
70
- },
71
- files: [
72
- "bin/kujo.js",
73
- "index.js",
74
- "index.d.ts",
75
- "README.md"
76
- ],
77
- optionalDependencies: {
78
- "@kujolang/kujo-darwin-arm64": "1.2.2",
79
- "@kujolang/kujo-darwin-x64": "1.2.2",
80
- "@kujolang/kujo-linux-arm64": "1.2.2",
81
- "@kujolang/kujo-linux-x64": "1.2.2",
82
- "@kujolang/kujo-win32-x64": "1.2.2"
83
- }
84
- };
85
- }
86
- });
87
-
88
- // node_modules/@kujolang/kujo-runtime/index.js
89
- var require_kujo_runtime = __commonJS({
90
- "node_modules/@kujolang/kujo-runtime/index.js"(exports, module) {
91
- "use strict";
92
- var fs2 = __require("node:fs");
93
- var path2 = __require("node:path");
94
- var RUNTIME_PACKAGE_VERSION = require_package().version;
95
- var TARGETS = Object.freeze({
96
- "darwin-arm64": Object.freeze({
97
- packageName: "@kujolang/kujo-darwin-arm64",
98
- binaryName: "kujo"
99
- }),
100
- "darwin-x64": Object.freeze({
101
- packageName: "@kujolang/kujo-darwin-x64",
102
- binaryName: "kujo"
103
- }),
104
- "linux-x64": Object.freeze({
105
- packageName: "@kujolang/kujo-linux-x64",
106
- binaryName: "kujo"
107
- }),
108
- "linux-arm64": Object.freeze({
109
- packageName: "@kujolang/kujo-linux-arm64",
110
- binaryName: "kujo"
111
- }),
112
- "win32-x64": Object.freeze({
113
- packageName: "@kujolang/kujo-win32-x64",
114
- binaryName: "kujo.exe"
115
- })
116
- });
117
- function targetFor(platform = process.platform, arch = process.arch) {
118
- return TARGETS[`${platform}-${arch}`] || null;
119
- }
120
- var KujoRuntimeError = class extends Error {
121
- constructor(message, code, platform, arch, options = {}) {
122
- super(message, options);
123
- this.name = this.constructor.name;
124
- this.code = code;
125
- this.platform = platform;
126
- this.arch = arch;
127
- }
128
- };
129
- var UnsupportedPlatformError = class extends KujoRuntimeError {
130
- constructor(platform, arch) {
131
- const supported = Object.keys(TARGETS).sort().join(", ");
132
- super(
133
- `Kujo does not provide an npm runtime for ${platform}-${arch}. Supported targets: ${supported}.`,
134
- "KUJO_UNSUPPORTED_PLATFORM",
135
- platform,
136
- arch
137
- );
138
- }
139
- };
140
- var MissingPlatformPackageError = class extends KujoRuntimeError {
141
- constructor(platform, arch, target, cause) {
142
- super(
143
- [
144
- `Kujo's platform package ${target.packageName} is not installed.`,
145
- "Reinstall @kujolang/kujo-runtime without --omit=optional or --no-optional,",
146
- "and ensure your package manager is allowed to install optional dependencies."
147
- ].join(" "),
148
- "KUJO_PLATFORM_PACKAGE_MISSING",
149
- platform,
150
- arch,
151
- { cause }
152
- );
153
- this.packageName = target.packageName;
154
- }
155
- };
156
- var BinaryNotFoundError = class extends KujoRuntimeError {
157
- constructor(platform, arch, packageName, binaryPath) {
158
- super(
159
- `Kujo's platform package ${packageName} does not contain the expected binary at ${binaryPath}. Reinstall the package and verify your npm cache.`,
160
- "KUJO_BINARY_MISSING",
161
- platform,
162
- arch
163
- );
164
- this.packageName = packageName;
165
- this.binaryPath = binaryPath;
166
- }
167
- };
168
- function selectedTarget(options = {}) {
169
- const platform = options.platform || process.platform;
170
- const arch = options.arch || process.arch;
171
- const target = targetFor(platform, arch);
172
- if (!target) {
173
- throw new UnsupportedPlatformError(platform, arch);
174
- }
175
- return { platform, arch, ...target };
176
- }
177
- function resolveRuntime(options = {}) {
178
- const { platform, arch, packageName, binaryName } = selectedTarget(options);
179
- const resolvePackage = options.resolvePackage || __require.resolve;
180
- const fileExists = options.fileExists || fs2.existsSync;
181
- const readManifest = options.readManifest || ((manifestPath2) => JSON.parse(fs2.readFileSync(manifestPath2, "utf8")));
182
- let manifestPath;
183
- try {
184
- manifestPath = resolvePackage(`${packageName}/package.json`);
185
- } catch (error51) {
186
- throw new MissingPlatformPackageError(platform, arch, { packageName }, error51);
187
- }
188
- const binaryPath = path2.join(path2.dirname(manifestPath), "bin", binaryName);
189
- if (!fileExists(binaryPath)) {
190
- throw new BinaryNotFoundError(platform, arch, packageName, binaryPath);
191
- }
192
- const platformManifest = readManifest(manifestPath);
193
- return Object.freeze({
194
- platform,
195
- arch,
196
- packageName,
197
- packageVersion: RUNTIME_PACKAGE_VERSION,
198
- runtimeVersion: platformManifest.version,
199
- binaryName,
200
- binaryPath,
201
- source: "bundled"
202
- });
203
- }
204
- function getKujoRuntimeInfo(options = {}) {
205
- return resolveRuntime(options);
206
- }
207
- function resolveKujoBinary(options = {}) {
208
- return resolveRuntime(options).binaryPath;
209
- }
210
- module.exports = {
211
- BinaryNotFoundError,
212
- KujoRuntimeError,
213
- MissingPlatformPackageError,
214
- TARGETS,
215
- UnsupportedPlatformError,
216
- getKujoRuntimeInfo,
217
- resolveKujoBinary,
218
- targetFor
219
- };
220
- }
221
- });
222
6
 
223
7
  // node_modules/@paperclipai/plugin-sdk/dist/define-plugin.js
224
8
  function definePlugin(definition) {
@@ -28926,7 +28710,7 @@ var CONTEXT_BUDGETS = {
28926
28710
  focused: 16e3,
28927
28711
  broad: 4e4
28928
28712
  };
28929
- var PLUGIN_VERSION = "0.1.2";
28713
+ var PLUGIN_VERSION = "0.1.3";
28930
28714
  var PAPERCLIP_API_VERSION = 1;
28931
28715
 
28932
28716
  // src/config/schema.ts
@@ -29309,7 +29093,7 @@ async function resolveKujo(config2, cwd) {
29309
29093
  return await assertCompatible(executable, cwd, "configured");
29310
29094
  }
29311
29095
  try {
29312
- const runtime = await Promise.resolve().then(() => __toESM(require_kujo_runtime(), 1));
29096
+ const runtime = await import("@kujolang/kujo-runtime");
29313
29097
  const info = runtime.getKujoRuntimeInfo();
29314
29098
  const executable = await validateExecutable(info.binaryPath);
29315
29099
  return await assertCompatible(executable, cwd, "bundled");
@@ -36,6 +36,10 @@ Component updates must start from clean, reviewed source repositories at exact c
36
36
 
37
37
  Never hand-edit a bundled file without updating its canonical source. Runtime checks reject any file that differs from the component lock.
38
38
 
39
+ ## Release credentials
40
+
41
+ GitHub Actions publishes through the npm trusted publisher bound to `kujolang/paperclip`, `.github/workflows/release.yml`, and the `npm` environment. Keep `id-token: write`; do not add an npm access token or `NODE_AUTH_TOKEN`. The npm package requires two-factor authentication and disallows traditional token publishing, while trusted OIDC publishing remains available.
42
+
39
43
  ## Recover from corrupt state
40
44
 
41
45
  If a detail view shows no artifact after an upgrade, inspect worker logs for schema or state errors. Clear the entity's Kujo data, then regenerate the artifact. Do not edit Paperclip's plugin-state tables directly.
@@ -27,7 +27,7 @@ The release order is platform runtime packages, neutral `@kujolang/kujo-runtime`
27
27
 
28
28
  The runtime release workflows build and smoke macOS arm64/x64, Linux arm64/x64, and Windows x64. Paperclip CI tests those five targets. A separate compatibility matrix tests Node.js 24.11 and current Node.js 24 against the minimum, locked, and latest compatible Paperclip SDK versions. Local plugin feature execution is verified on the developer host; every supported target is exercised during a tagged release.
29
29
 
30
- The tag workflow accepts only an annotated PGP-signed tag whose name matches `package.json`. It verifies the repository, packs once, attests that tarball, publishes that exact file with npm provenance, and attaches its checksum, CycloneDX SBOM, component lock, and JSON schemas to the GitHub release.
30
+ The tag workflow accepts only an annotated tag with a GitHub-verified SSH or PGP signature whose name matches `package.json`. It verifies the repository, packs once, attests that tarball, publishes that exact file through npm trusted publishing with short-lived OIDC credentials, and attaches its checksum, CycloneDX SBOM, component lock, and JSON schemas to the GitHub release. Package settings require two-factor authentication and disallow traditional token publishing.
31
31
 
32
32
  ## Performance bounds
33
33
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kujolang/paperclip",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Make Paperclip agent work easier to scope, review, reproduce, and verify.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/kujolang/paperclip#readme",