@astrosheep/square 0.3.3 → 0.3.4
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/dist/harness.js
CHANGED
|
@@ -2,12 +2,13 @@ import { spawn, spawnSync } from 'node:child_process';
|
|
|
2
2
|
import fs from 'node:fs';
|
|
3
3
|
import path from 'node:path';
|
|
4
4
|
import { fileURLToPath } from 'node:url';
|
|
5
|
-
|
|
6
|
-
export const
|
|
7
|
-
export const
|
|
8
|
-
export const
|
|
9
|
-
export const
|
|
10
|
-
export const
|
|
5
|
+
import { SQUARE_IDENTITY } from './identity.js';
|
|
6
|
+
export const CODEX_HOOK_COMMAND = SQUARE_IDENTITY.hookCommand;
|
|
7
|
+
export const SQUARE_CODEX_MARKER = SQUARE_IDENTITY.hookMarker;
|
|
8
|
+
export const CODEX_PLUGIN_ID = SQUARE_IDENTITY.pluginId;
|
|
9
|
+
export const CODEX_MARKETPLACE_NAME = SQUARE_IDENTITY.marketplaceName;
|
|
10
|
+
export const CLAUDE_PLUGIN_ID = SQUARE_IDENTITY.pluginId;
|
|
11
|
+
export const CLAUDE_MARKETPLACE_NAME = SQUARE_IDENTITY.marketplaceName;
|
|
11
12
|
function sectionRange(lines, section) {
|
|
12
13
|
const header = new RegExp(`^\\s*\\[${section.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}\\]\\s*(?:#.*)?$`);
|
|
13
14
|
const start = lines.findIndex((line) => header.test(line));
|
|
@@ -337,7 +338,11 @@ export function inspectCodexPluginHooks(homeDir, trust) {
|
|
|
337
338
|
id: 0,
|
|
338
339
|
method: 'initialize',
|
|
339
340
|
params: {
|
|
340
|
-
clientInfo: {
|
|
341
|
+
clientInfo: {
|
|
342
|
+
name: SQUARE_IDENTITY.clientName,
|
|
343
|
+
title: SQUARE_IDENTITY.productName,
|
|
344
|
+
version: SQUARE_IDENTITY.packageVersion,
|
|
345
|
+
},
|
|
341
346
|
},
|
|
342
347
|
});
|
|
343
348
|
});
|
|
@@ -345,12 +350,12 @@ export function inspectCodexPluginHooks(homeDir, trust) {
|
|
|
345
350
|
function claudeMarketplaceDocument() {
|
|
346
351
|
return {
|
|
347
352
|
name: CLAUDE_MARKETPLACE_NAME,
|
|
348
|
-
description:
|
|
349
|
-
owner: { name:
|
|
353
|
+
description: `${SQUARE_IDENTITY.productName} harness integrations`,
|
|
354
|
+
owner: { name: SQUARE_IDENTITY.productName },
|
|
350
355
|
plugins: [
|
|
351
356
|
{
|
|
352
|
-
name:
|
|
353
|
-
description:
|
|
357
|
+
name: SQUARE_IDENTITY.pluginName,
|
|
358
|
+
description: `Native Claude Code turn-boundary delivery for ${SQUARE_IDENTITY.productName}`,
|
|
354
359
|
source: './plugins/square',
|
|
355
360
|
},
|
|
356
361
|
],
|
|
@@ -359,10 +364,10 @@ function claudeMarketplaceDocument() {
|
|
|
359
364
|
function marketplaceDocument() {
|
|
360
365
|
return {
|
|
361
366
|
name: CODEX_MARKETPLACE_NAME,
|
|
362
|
-
interface: { displayName:
|
|
367
|
+
interface: { displayName: SQUARE_IDENTITY.productName },
|
|
363
368
|
plugins: [
|
|
364
369
|
{
|
|
365
|
-
name:
|
|
370
|
+
name: SQUARE_IDENTITY.pluginName,
|
|
366
371
|
source: { source: 'local', path: './plugins/square' },
|
|
367
372
|
policy: { installation: 'AVAILABLE', authentication: 'ON_USE' },
|
|
368
373
|
category: 'Developer Tools',
|
package/dist/identity.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
function packageManifest() {
|
|
5
|
+
const packagePath = path.join(path.dirname(fileURLToPath(import.meta.url)), '..', 'package.json');
|
|
6
|
+
const parsed = JSON.parse(fs.readFileSync(packagePath, 'utf8'));
|
|
7
|
+
if (parsed === null || typeof parsed !== 'object')
|
|
8
|
+
throw new Error(`Invalid package manifest: ${packagePath}`);
|
|
9
|
+
return parsed;
|
|
10
|
+
}
|
|
11
|
+
const manifest = packageManifest();
|
|
12
|
+
if (manifest.name !== '@astrosheep/square' || typeof manifest.version !== 'string') {
|
|
13
|
+
throw new Error('Square package identity is invalid.');
|
|
14
|
+
}
|
|
15
|
+
export const SQUARE_IDENTITY = Object.freeze({
|
|
16
|
+
publisher: 'astrosheep',
|
|
17
|
+
packageName: manifest.name,
|
|
18
|
+
packageVersion: manifest.version,
|
|
19
|
+
productName: 'Square',
|
|
20
|
+
pluginName: 'square',
|
|
21
|
+
marketplaceName: 'astrosheep',
|
|
22
|
+
cliName: 'square',
|
|
23
|
+
pluginId: 'square@astrosheep',
|
|
24
|
+
hookCommand: 'square codex-hook',
|
|
25
|
+
hookMarker: 'square-codex-hook',
|
|
26
|
+
clientName: 'astrosheep_square',
|
|
27
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astrosheep/square",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.4",
|
|
4
4
|
"description": "Multi-agent brainstorming through a shared file. Agents join, talk, watch, and mark themselves done.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -18,6 +18,8 @@
|
|
|
18
18
|
"scripts": {
|
|
19
19
|
"clean": "node --input-type=module -e \"import fs from 'node:fs'; fs.rmSync('dist',{recursive:true,force:true})\"",
|
|
20
20
|
"build": "npm run clean && tsc && node --input-type=module -e \"import fs from 'node:fs'; fs.chmodSync('dist/square.js',0o755)\"",
|
|
21
|
+
"verify-release": "node test/release.test.js",
|
|
22
|
+
"prepublishOnly": "npm run build && npm run verify-release",
|
|
21
23
|
"test": "npm run build && node --test test/*.test.js"
|
|
22
24
|
},
|
|
23
25
|
"keywords": [
|