openyida 2026.10.13 → 2026.10.14
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 +76 -23
- package/bin/yida.js +32 -2
- package/lib/agent/PROTOCOL.md +201 -0
- package/lib/agent/ask-human-help.js +19 -0
- package/lib/agent/ask-human.js +222 -0
- package/lib/agent/cmd.js +405 -0
- package/lib/agent/command-receipt.js +84 -0
- package/lib/agent/connection-store.js +148 -0
- package/lib/agent/diagnostic-log.js +133 -0
- package/lib/agent/frozen-bundle.js +298 -0
- package/lib/agent/managed-command-map.js +47 -0
- package/lib/agent/managed-context.js +40 -0
- package/lib/agent/managed-run.js +84 -0
- package/lib/agent/mutation-receipt.js +82 -0
- package/lib/agent/private-directory.js +63 -0
- package/lib/agent/provider-preflight.js +257 -0
- package/lib/agent/providers.js +4 -0
- package/lib/agent/runtime-catalog.json +42 -0
- package/lib/agent/runtime-manifest.js +96 -0
- package/lib/agent/runtime-package.js +155 -0
- package/lib/agent/stdio.js +321 -0
- package/lib/app/check-prd-completeness.js +15 -4
- package/lib/app/create-form/batch.js +30 -9
- package/lib/app/create-form.js +7 -2
- package/lib/app/custom-theme.js +13 -3
- package/lib/app/get-schema.js +6 -1
- package/lib/app/update-app.js +13 -1
- package/lib/app/update-form-config.js +71 -80
- package/lib/asset/asset-plan.js +6 -4
- package/lib/auth/profile-lock.js +89 -0
- package/lib/auth/token-auth.js +57 -6
- package/lib/auth/token-store.js +26 -2
- package/lib/core/command-manifest.js +202 -118
- package/lib/core/locales/en.js +48 -4
- package/lib/core/locales/zh.js +48 -4
- package/lib/core/managed-policy.js +88 -0
- package/lib/core/query-data.js +22 -3
- package/lib/core/sample.js +1 -0
- package/lib/core/update.js +3 -1
- package/lib/core/utils.js +34 -1
- package/lib/design-plan/materialize.js +4 -21
- package/lib/design-plan/render-html.js +299 -0
- package/lib/page-config/save-share-config.js +16 -5
- package/lib/samples/yida-data-management/empty-query.js +69 -0
- package/package.json +10 -1
- package/scripts/postinstall.js +2 -2
- package/yida-skills/SKILL.md +32 -2
- package/yida-skills/references/local-agent-diagnostics.md +154 -0
- package/yida-skills/references/local-agent-preflight.md +56 -0
- package/yida-skills/references/query-condition-guide.md +223 -195
- package/yida-skills/skills/yida-app/workflow/plan/step-4-deliver.md +11 -3
- package/yida-skills/skills/yida-canvas-data-binding/SKILL.md +8 -5
- package/yida-skills/skills/yida-data-management/SKILL.md +64 -19
- package/yida-skills/skills/yida-data-management/references/data-format-guide.md +61 -25
- package/yida-skills/skills/yida-data-source-connectors/SKILL.md +6 -0
- package/yida-skills/skills/yida-design/SKILL.md +2 -0
- package/yida-skills/skills/yida-design/references/ask-human-interaction-contract.md +2 -0
- package/yida-skills/skills/yida-design/templates/design-themes/README.md +1 -1
- package/yida-skills/skills/yida-document-markdown/SKILL.md +6 -0
- package/yida-skills/skills/yida-image-assets/SKILL.md +1 -1
- package/yida-skills/skills/yida-tingji/SKILL.md +4 -0
- package/yida-skills/skills-index.json +52 -7
package/lib/auth/token-store.js
CHANGED
|
@@ -293,6 +293,7 @@ function normalizeTokenSession(session = {}) {
|
|
|
293
293
|
auth_source: session.auth_source || session.authSource,
|
|
294
294
|
auth_store: session.auth_store || session.authStore,
|
|
295
295
|
auth_profile: session.auth_profile || session.authProfile,
|
|
296
|
+
auth_generation: session.auth_generation,
|
|
296
297
|
persistence_scope: session.persistence_scope || session.persistenceScope,
|
|
297
298
|
runtime_binding_id: session.runtime_binding_id || session.runtimeBindingId,
|
|
298
299
|
user_auth_store_writable: typeof session.user_auth_store_writable === 'boolean'
|
|
@@ -505,6 +506,12 @@ function deleteUserAuthProfile(authProfile, options = {}) {
|
|
|
505
506
|
}
|
|
506
507
|
|
|
507
508
|
let deleted = false;
|
|
509
|
+
// Persist invalidation before removal so an in-flight refresh cannot
|
|
510
|
+
// resurrect a deleted profile, including a later login with the same ID.
|
|
511
|
+
writeJsonFileAtomic(path.join(resolveUserAuthDir(options), 'revocations', `${normalizedAuthProfile}.json`), {
|
|
512
|
+
generation: crypto.randomBytes(16).toString('hex'),
|
|
513
|
+
revoked_at: new Date().toISOString(),
|
|
514
|
+
});
|
|
508
515
|
try {
|
|
509
516
|
const profileFile = getUserProfileFilePath(normalizedAuthProfile, options);
|
|
510
517
|
if (profileFile && fs.existsSync(profileFile)) {
|
|
@@ -567,6 +574,7 @@ function saveUserTokenSession(session, options = {}) {
|
|
|
567
574
|
const profileSession = normalizeTokenSession({
|
|
568
575
|
...normalized,
|
|
569
576
|
auth_profile: authProfile,
|
|
577
|
+
auth_generation: crypto.randomBytes(16).toString('hex'),
|
|
570
578
|
auth_source: 'user_profile',
|
|
571
579
|
auth_store: 'user',
|
|
572
580
|
persistence_scope: 'user',
|
|
@@ -581,11 +589,11 @@ function saveUserTokenSession(session, options = {}) {
|
|
|
581
589
|
writeJsonFileAtomic(getUserProfileFilePath(authProfile, options), payload);
|
|
582
590
|
let pointerWarning;
|
|
583
591
|
try {
|
|
584
|
-
saveAuthProfilePointer(profileSession, options);
|
|
592
|
+
if (options.persistProfilePointer !== false) {saveAuthProfilePointer(profileSession, options);}
|
|
585
593
|
} catch (error) {
|
|
586
594
|
pointerWarning = `project_auth_pointer_unavailable: ${error.message}`;
|
|
587
595
|
}
|
|
588
|
-
clearProjectLegacyTokenSession(options);
|
|
596
|
+
if (options.persistProfilePointer !== false) {clearProjectLegacyTokenSession(options);}
|
|
589
597
|
if (pointerWarning) {
|
|
590
598
|
return attachAuthStoreMetadata(profileSession, {
|
|
591
599
|
warning: pointerWarning,
|
|
@@ -958,6 +966,21 @@ function loadTokenSession(options = {}) {
|
|
|
958
966
|
return resolveTokenSession(options).session;
|
|
959
967
|
}
|
|
960
968
|
|
|
969
|
+
function authProfileRevision(authProfile, options = {}) {
|
|
970
|
+
const session = loadUserProfileFile(authProfile, options);
|
|
971
|
+
if (!session) {return null;}
|
|
972
|
+
let revocation;
|
|
973
|
+
try {
|
|
974
|
+
revocation = fs.readFileSync(path.join(resolveUserAuthDir(options), 'revocations', `${sanitizeProfileName(authProfile)}.json`), 'utf8');
|
|
975
|
+
} catch (error) {
|
|
976
|
+
if (error.code !== 'ENOENT') {throw error;}
|
|
977
|
+
revocation = '';
|
|
978
|
+
}
|
|
979
|
+
return crypto.createHash('sha256').update(JSON.stringify([
|
|
980
|
+
session.auth_generation, session.access_token, session.refresh_token, revocation,
|
|
981
|
+
])).digest('hex');
|
|
982
|
+
}
|
|
983
|
+
|
|
961
984
|
function clearTokenSession(options = {}) {
|
|
962
985
|
clearAuthProfilePointer(options);
|
|
963
986
|
clearProjectLegacyTokenSession(options);
|
|
@@ -986,6 +1009,7 @@ function maskToken(token) {
|
|
|
986
1009
|
|
|
987
1010
|
module.exports = {
|
|
988
1011
|
getTokenFilePath,
|
|
1012
|
+
authProfileRevision,
|
|
989
1013
|
getAuthProfilePointerFilePath,
|
|
990
1014
|
getUserProfileFilePath,
|
|
991
1015
|
resolveUserAuthDir,
|