@quolu/lattice 0.101.0 → 0.102.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/README.md +1 -1
- package/package.json +1 -1
- package/src/chart-cli.mjs +16 -7
- package/src/cli-help.mjs +3 -3
- package/src/setup-cli.mjs +2 -1
package/README.md
CHANGED
|
@@ -176,7 +176,7 @@ AIの設定がまだ無い初回は`lattice setup --host claude --json`のよう
|
|
|
176
176
|
|
|
177
177
|
結果はOS・AI・機能別に返す。Windows nativeの製品hookとGrokの製品hookは`unsupported`、
|
|
178
178
|
利用者が無効化したMCPは`disabled`として保持する。対応MCPの登録・確認は続行し、
|
|
179
|
-
|
|
179
|
+
`ready`と`partial`(未対応・利用者の無効化だけで、失敗は無い)はexit 0、`failed`だけexit 1である。
|
|
180
180
|
設定形式と機能表は[導入契約](https://github.com/kitepon/Lattice/blob/main/docs/01_integration-package.md#製品所有のai導入入口)を参照。
|
|
181
181
|
|
|
182
182
|
## Quick start
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quolu/lattice",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.102.0",
|
|
4
4
|
"description": "Schedulability compiler for multi-agent development: observe real code boundaries, refactor the conflicting seam, recompile the plan for parallel execution",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Quo / クオ at kitepon.dev",
|
package/src/chart-cli.mjs
CHANGED
|
@@ -175,24 +175,33 @@ function projectIdOf(env, dir) {
|
|
|
175
175
|
return env[PROJECT_ID_ENV] || path.basename(dir);
|
|
176
176
|
}
|
|
177
177
|
|
|
178
|
-
/**
|
|
178
|
+
/**
|
|
179
|
+
* K4 `chart set [--name <text>] [--created-by <id>]`, at least one; `created` = K5 made the chart in this run.
|
|
180
|
+
* Without --name the patch has no `name` key, so the name stays as is (null stays null): the a102 sidecar migration.
|
|
181
|
+
*/
|
|
179
182
|
async function chartSet({ cwd, env, flags, created }) {
|
|
180
|
-
|
|
181
|
-
|
|
183
|
+
if (!('name' in flags) && !('created-by' in flags)) {
|
|
184
|
+
throw refusal('CHART_NAME_INVALID', 'chart_set_flag_missing', { field: '--name',
|
|
185
|
+
rule: '--name, --created-by or both',
|
|
186
|
+
next_action: 'lattice chart set --name <text> [--created-by <id>] (or --created-by <id> alone)' });
|
|
187
|
+
}
|
|
188
|
+
const name = 'name' in flags ? (typeof flags.name === 'string' ? flags.name.trim() : null) : undefined;
|
|
189
|
+
if (name !== undefined && !validChartName(name)) {
|
|
182
190
|
throw refusal('CHART_NAME_INVALID', 'chart_name_invalid', { field: '--name',
|
|
183
191
|
rule: '1-40 characters after trimming, no control characters',
|
|
184
192
|
next_action: 'lattice chart set --name <text>' });
|
|
185
193
|
}
|
|
186
|
-
const explicit = typeof flags['created-by'] === 'string' ? flags['created-by'].trim() :
|
|
194
|
+
const explicit = 'created-by' in flags ? (typeof flags['created-by'] === 'string' ? flags['created-by'].trim() : null)
|
|
195
|
+
: undefined;
|
|
187
196
|
if (explicit !== undefined && !validChartName(explicit)) {
|
|
188
197
|
throw refusal('CHART_NAME_INVALID', 'chart_created_by_invalid', { field: '--created-by',
|
|
189
198
|
rule: '1-40 characters after trimming, no control characters',
|
|
190
|
-
next_action: 'lattice chart set --
|
|
199
|
+
next_action: 'lattice chart set --created-by <id>' });
|
|
191
200
|
}
|
|
192
201
|
const dir = await repoRoot(cwd);
|
|
193
202
|
const createdBy = explicit ?? (created ? env[SEAT_ID_ENV] || null : undefined);
|
|
194
203
|
const { meta, unchanged } = await writeTodoChartMeta({ repoRoot: dir,
|
|
195
|
-
patch: { name, ...(createdBy === undefined ? {} : { created_by: createdBy }) } });
|
|
204
|
+
patch: { ...(name === undefined ? {} : { name }), ...(createdBy === undefined ? {} : { created_by: createdBy }) } });
|
|
196
205
|
return { schema: 'lattice.chart_set_result.v1', project_id: projectIdOf(env, dir), name: meta.name,
|
|
197
206
|
created_by: meta.created_by, created_at: meta.created_at, unchanged };
|
|
198
207
|
}
|
|
@@ -317,7 +326,7 @@ export async function runChartCli({ argv, cwd, env, stdout, stderr, created = fa
|
|
|
317
326
|
} else if (group === 'chart' && command === 'set') {
|
|
318
327
|
const { flags, rest } = parseFlagMap(words.slice(2));
|
|
319
328
|
if (rest.length > 0 || Object.keys(flags).some((key) => !['name', 'created-by'].includes(key))) {
|
|
320
|
-
return usage(stderr, 'chart set --name <text> [--created-by <id>] [--json]');
|
|
329
|
+
return usage(stderr, 'chart set [--name <text>] [--created-by <id>] [--json]');
|
|
321
330
|
}
|
|
322
331
|
result = await chartSet({ cwd, env, flags, created });
|
|
323
332
|
} else if (group === 'chart' && command === 'repo' && sub === 'bind') {
|
package/src/cli-help.mjs
CHANGED
|
@@ -258,7 +258,7 @@ registerはLATTICE_BRIDGE_REGISTRAR_SSH_HOSTとLATTICE_BRIDGE_REGISTRAR_SCRIPT
|
|
|
258
258
|
host省略時は既存AI設定を検出する。明示hostは初回設定を作成する。
|
|
259
259
|
setupは登録・hook準備・MCP接続確認まで実行する。更新後も同じコマンドを使う。
|
|
260
260
|
statusは設定変更をせず登録とMCP接続を診断する。
|
|
261
|
-
結果は機能別のverified/unsupported/disabled/failed。ready
|
|
261
|
+
結果は機能別のverified/unsupported/disabled/failed。ready/partialはexit 0、failedだけexit 1。
|
|
262
262
|
Windows製品hookとGrok製品hookは未対応として返し、MCPは独立して実行する。
|
|
263
263
|
`,
|
|
264
264
|
hooks: `Usage: lattice hooks <install|status|uninstall|emit> --host <claude|codex|cursor>
|
|
@@ -321,8 +321,8 @@ const SUBCOMMAND_USAGE = Object.freeze({
|
|
|
321
321
|
charts: 'charts list [--json] | source [--project <id>]... [--json] # LATTICE_CHARTS_ROOT配下の全工程表を1プロセスで読む',
|
|
322
322
|
'charts list': 'charts list [--json] # lattice.charts_list_result.v1 {charts_root, charts:[{project_id, name, created_by, created_at, source}], findings}',
|
|
323
323
|
'charts source': 'charts source [--project <id>]... [--json] # lattice.charts_source_result.v1 {charts:{<id>: <source>|null}}(--project無し=全工程表)',
|
|
324
|
-
chart: 'chart set --name <text> [--created-by <id>] [--json] | repo bind --url <url> --branch <branch> [--json] | repo sync [--json]',
|
|
325
|
-
'chart set': 'chart set --name <text> [--created-by <id>] [--json] # lattice.chart_set_result.v1
|
|
324
|
+
chart: 'chart set [--name <text>] [--created-by <id>] [--json] | repo bind --url <url> --branch <branch> [--json] | repo sync [--json]',
|
|
325
|
+
'chart set': 'chart set [--name <text>] [--created-by <id>] [--json] # lattice.chart_set_result.v1(どちらか1つ以上。名前は1-40字・制御文字なし。--nameが無ければ名前はそのまま。--created-byは作成者が空の時だけ)',
|
|
326
326
|
'chart repo': 'chart repo bind --url <url> --branch <branch> [--json] | sync [--json] # lattice.chart_repo_result.v1',
|
|
327
327
|
'chart repo bind': 'chart repo bind --url <url> --branch <branch> [--json] # コード工程表のrepoを記録する',
|
|
328
328
|
'chart repo sync': 'chart repo sync [--json] # depth-1 fetch、accepted_tipからだけ前進(reset/forceしない)、その後sensor。status current|synced|dirty|diverged|failed',
|
package/src/setup-cli.mjs
CHANGED
|
@@ -121,5 +121,6 @@ export async function runSetupCli({ argv, stdout, env = process.env, platform =
|
|
|
121
121
|
platform, state, ...(hosts.length ? {} : { code: 'HOST_NOT_PRESENT',
|
|
122
122
|
message: 'このHOMEにはAIの設定フォルダがありません',
|
|
123
123
|
next_action: 'lattice setup --host <claude|codex|grok|cursor>' }), hosts: results })}\n`);
|
|
124
|
-
|
|
124
|
+
// partial = designed-unsupported or user-disabled only; nothing failed, so callers must not count it as failure.
|
|
125
|
+
return state === 'failed' ? 1 : 0;
|
|
125
126
|
}
|